X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv.git;a=blobdiff_plain;f=configure.in;h=f46c56a4c0c0252df0d60be669052763dd53ca58;hp=b42a7289a46c25b02d3157e2d5515f1c848c7d38;hb=5df3f68d0d1f7d3e82a4421ca5252b2be7c540f7;hpb=9f56f874416db295bdb50d448bd99cdd34db969d diff --git a/configure.in b/configure.in index b42a728..f46c56a 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ # userv - configure.in -# -# Copyright (C)1996-1997 Ian Jackson +# +# Copyright (C)1996-1997,1999-2000,2003 Ian Jackson # # This is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -32,13 +32,61 @@ AC_ARG_ENABLE(debug, if test "x$enable_debug" = xyes; then DEBUGDEFS="-DDEBUG -DVARDIR='\"$crdir/vd\"' -DSYSTEMCONFIGDIR='\"$crdir/slash-etc\"' -DSERVICEUSERDIR='\"$crdir/tilde\"'" DEBUGLIBS=-lefence + echo will build debugging version elif test "x$enable_debug" != xno; then AC_MSG_ERROR(--enable-debug does not allow any arguments except 'yes' and 'no') fi ]) AC_PROG_CC +AC_PROG_CPP AC_PROG_INSTALL +AC_CHECK_PROGS(MD5SUM_SIMPLE, md5sum md5 gmd5sum) + +CFLAGS="$CFLAGS -D_GNU_SOURCE" + +AC_CHECK_LIB(socket,socket) +AC_CHECK_FUNCS(setenv strsignal vsnprintf) + +AC_CACHE_CHECK(for EPROTO,userv_cv_hdr_eproto, + AC_EGREP_CPP(yes, +[ +#include +#ifdef EPROTO + yes +#endif +],userv_cv_hdr_eproto=yes,userv_cv_hdr_eproto=no)) +if test $userv_cv_hdr_eproto = yes +then + AC_DEFINE(HAVE_EPROTO) +fi + +AC_CACHE_CHECK(for LOG_AUTHPRIV,userv_cv_hdr_logauthpriv, + AC_EGREP_CPP(yes, +[ +#include +#ifdef LOG_AUTHPRIV + yes +#endif +],userv_cv_hdr_logauthpriv=yes,userv_cv_hdr_logauthpriv=no)) +if test $userv_cv_hdr_logauthpriv = yes +then + AC_DEFINE(HAVE_LOG_AUTHPRIV) +fi + +AC_CACHE_CHECK(for WCOREDUMP,userv_cv_hdr_wcoredump, + AC_EGREP_CPP(yes, +[ +#include +#include +#ifdef WCOREDUMP + yes +#endif +],userv_cv_hdr_wcoredump=yes,userv_cv_hdr_wcoredump=no)) +if test $userv_cv_hdr_wcoredump = yes +then + AC_DEFINE(HAVE_WCOREDUMP) +fi AC_SUBST(OPTIMISE) if test "${GCC-no}" = yes; then @@ -77,10 +125,10 @@ DPKG_CACHED_TRY_COMPILE(__attribute__((,,)),dpkg_cv_c_attribute_supported,, AC_MSG_RESULT(yes) AC_DEFINE(HAVE_GNUC25_NORETURN), AC_MSG_RESULT(no)) - DPKG_CACHED_TRY_COMPILE(__attribute__((const)),dpkg_cv_c_attribute_const,, - [extern int testfunction(int x) __attribute__((const))], + DPKG_CACHED_TRY_COMPILE(__attribute__((unused)),dpkg_cv_c_attribute_unused,, + [extern int testfunction(int x) __attribute__((unused))], AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GNUC25_CONST), + AC_DEFINE(HAVE_GNUC25_UNUSED), AC_MSG_RESULT(no)) DPKG_CACHED_TRY_COMPILE(__attribute__((format...)),dpkg_cv_attribute_format,, [extern int testfunction(char *y, ...) __attribute__((format(printf,1,2)))], @@ -125,8 +173,12 @@ DPKG_C_GCC_TRY_WARNS(-Wpointer-arith, dpkg_cv_c_gcc_warn_pointerarith) DPKG_C_GCC_TRY_WARNS(-Wimplicit -Wnested-externs, dpkg_cv_c_gcc_warn_implicit) if test "${GCC-no}" = yes; then - CWARNS="${CWARNS} -Wmissing-prototypes -Wstrict-prototypes -Werror" + CWARNS="${CWARNS} -Wmissing-prototypes -Wstrict-prototypes" fi [CFLAGS="`echo $CFLAGS $CWARNS | sed -e 's/-O[0-9]*/$(OPTIMISE)/'`"] +AC_SUBST(VERSION) +VERSION="`sed -n '/^userv (.*)/!d; s/^userv (//; s/).*//; p; q' debian/changelog`" +echo will build version $VERSION + AC_OUTPUT(Makefile)