Author: Perry Lorier <isomer@undernet.org>
[ircu2.10.12-pk.git] / configure.in
index 3244abcaee63f9fec2789dbc102dcdcab2b3064a..8af70805fcb2abd472579d699ef3aaeb81e5e71d 100644 (file)
@@ -41,8 +41,8 @@ ac_default_prefix=$unet_cv_prefix
 dnl Define the input and output configuration header file.
 AC_CONFIG_HEADER([config.h])
 
-dnl Demand at least version 2.13 of autoconf
-AC_PREREQ(2.13)
+dnl Demand at least version 2.50 of autoconf
+AC_PREREQ(2.50)
 
 dnl Find out what type of system we are
 AC_CANONICAL_HOST
@@ -108,7 +108,7 @@ AC_LIBRARY_NET
 
 dnl Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS(crypt.h poll.h stdint.h sys/devpoll.h sys/epoll.h sys/event.h sys/param.h sys/socket.h)
+AC_CHECK_HEADERS(crypt.h poll.h inttypes.h stdint.h sys/devpoll.h sys/epoll.h sys/event.h sys/param.h sys/socket.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics
 dnl AC_C_CONST
@@ -142,16 +142,18 @@ AC_PATH_PROGS(SHPROG, sh, /bin/sh)
 
 dnl (F)LEX - needed for the new conf file parser
 AC_PROG_LEX
-if test -x "$LEX"
-then 
+dnl The autoconf docs say $LEX defaults to 'lex'.  They lie.
+if test "$LEX" = ":" ; then
   AC_MSG_ERROR([Cannot find flex.])
+elif echo "" | $LEX -V -v --version > /dev/null 2>&1 ; then
+  :
+else
+  AC_MSG_ERROR([Cannot use $LEX as flex.])
 fi
 
-if test -z "$LEXLIB"
-then
-  AC_MSG_FAILURE([
-  Cannot find a library with yywrap() in, but flex was found.  
-  It's possible the compiler you're using ($CC) is incompatible with the 
+if test -z "$LEXLIB" ; then
+  AC_MSG_FAILURE([Cannot find a library with yywrap() in, but flex was found.
+  It's possible the compiler you're using ($CC) is incompatible with the
   installed library.])
 fi
 
@@ -159,9 +161,15 @@ LIBS="$LEXLIB $LIBS"
 
 dnl YACC - ditto
 AC_PROG_YACC
-if test -z "$YACC"
-then
+dnl The autoconf docs say $YACC defaults to 'yacc'.  This seems to be true,
+dnl but judging from AC_PROG_LEX, it may not stay true.
+if test "$YACC" = ":" ; then
   AC_MSG_ERROR([Cannot find yacc.])
+elif echo "" | $YACC -V -v --version > /dev/null 2>&1 ; then
+  :
+else
+dnl byacc does not seem to have any way to test for workingness, so only warn.
+  AC_MSG_WARN([$YACC may not work as yacc.])
 fi
 
 
@@ -745,7 +753,7 @@ AC_DEFINE_UNQUOTED(MAXCONNECTIONS, $unet_cv_with_maxcon,
 [Maximum number of network connections])
 
 dnl Finally really generate all output files:
-AC_OUTPUT(Makefile ircd/Makefile doc/Makefile, [echo timestamp > stamp-h])
+AC_OUTPUT(Makefile ircd/Makefile ircd/test/Makefile doc/Makefile, [echo timestamp > stamp-h])
 
 dnl Report configuration
 AC_OUTPUT_COMMANDS([echo "