X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv.git;a=blobdiff_plain;f=configure.in;h=4eb36c08855ec9ded3ae6b8f6c5d6f13c58a9189;hp=fb5a128a2b7f052aaa11907b453c0e2343df551d;hb=a36c2e0235323aacb9c4ea55ae0201e656362059;hpb=db59ee1476515a65cfcca10a3059d8ccb2d24d32 diff --git a/configure.in b/configure.in index fb5a128..4eb36c0 100644 --- a/configure.in +++ b/configure.in @@ -39,8 +39,24 @@ AC_ARG_ENABLE(debug, ]) AC_PROG_CC +AC_PROG_CPP AC_PROG_INSTALL +CFLAGS="$CFLAGS -D_GNU_SOURCE" + +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_SUBST(OPTIMISE) if test "${GCC-no}" = yes; then OPTIMISE=-O2 @@ -130,4 +146,8 @@ if test "${GCC-no}" = yes; then 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' Changelog`" +echo will build version $VERSION + AC_OUTPUT(Makefile)