chiark / gitweb /
Fixed misdequoting of \<newline> in "-quoted strings; Removed -Werror by default...
[userv.git] / configure.in
index fb5a128a2b7f052aaa11907b453c0e2343df551d..2c7bb2d25c276e5e1684458f5dab6e52893d473b 100644 (file)
@@ -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 <errno.h>
+#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
@@ -126,8 +142,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)