]> sjero.net Git - wget/blobdiff - configure.in
[svn] Use autoheader to generate config.h.in.
[wget] / configure.in
index dbd019b0df9b4f9b8f8f2a0434fbfd7cfcb00fe5..35eaed8aa9b6f881411bbf9409fb870b46c6cd16 100644 (file)
@@ -29,9 +29,13 @@ dnl
 dnl Process this file with autoconf to produce a configure script.
 dnl
 
-AC_INIT(src/version.c)
+AC_INIT([src/version.c])
 AC_PREREQ(2.50)
-AC_CONFIG_HEADER(src/config.h)
+
+AC_CONFIG_HEADERS([src/config.h])
+AH_BOTTOM([
+#include "config-post.h"
+])
 
 dnl
 dnl What version of Wget are we building?
@@ -54,7 +58,7 @@ dnl Process features.
 dnl
 AC_ARG_WITH(socks,
   [  --with-socks            use the socks library],
-  [AC_DEFINE([HAVE_SOCKS], [],
+  [AC_DEFINE([HAVE_SOCKS], 1,
              [Define if you wish to compile with socks support.])]
 )
 
@@ -65,19 +69,19 @@ AC_ARG_WITH(ssl,
 AC_ARG_ENABLE(opie,
 [  --disable-opie          disable support for opie or s/key FTP login],
 USE_OPIE=$enableval, USE_OPIE=yes)
-test x"${USE_OPIE}" = xyes && AC_DEFINE([USE_OPIE], [],
+test x"${USE_OPIE}" = xyes && AC_DEFINE([USE_OPIE], 1,
    [Define if you want the Opie support for FTP compiled in.])
 
 AC_ARG_ENABLE(digest,
 [  --disable-digest        disable support for HTTP digest authorization],
 USE_DIGEST=$enableval, USE_DIGEST=yes)
-test x"${USE_DIGEST}" = xyes && AC_DEFINE([USE_DIGEST], [],
+test x"${USE_DIGEST}" = xyes && AC_DEFINE([USE_DIGEST], 1,
    [Define if you want the HTTP Digest Authorization compiled in.])
 
 AC_ARG_ENABLE(debug,
 [  --disable-debug         disable support for debugging output],
 ENABLE_DEBUG=$enableval, ENABLE_DEBUG=yes)
-test x"${ENABLE_DEBUG}" = xyes && AC_DEFINE([ENABLE_DEBUG], [],
+test x"${ENABLE_DEBUG}" = xyes && AC_DEFINE([ENABLE_DEBUG], 1,
    [Define if you want the debug output support compiled in.])
 
 wget_need_md5=no
@@ -165,9 +169,15 @@ AC_C_BIGENDIAN
 dnl
 dnl Checks for headers
 dnl
-AC_CHECK_HEADERS(string.h stdarg.h unistd.h sys/time.h utime.h sys/utime.h)
-AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h sys/utsname.h)
-AC_CHECK_HEADERS(inttypes.h signal.h setjmp.h pwd.h)
+
+dnl Check for these even though we assume their presence.  This is
+dnl because Autoconf built-in macros expect their HAVE_* constants to
+dnl be available.
+AC_CHECK_HEADERS(sys/types.h sys/stat.h)
+
+AC_CHECK_HEADERS(string.h strings.h stdarg.h unistd.h sys/time.h)
+AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h utime.h sys/utime.h)
+AC_CHECK_HEADERS(stdint.h inttypes.h signal.h setjmp.h pwd.h)
 AC_HEADER_TIME
 
 dnl
@@ -379,7 +389,7 @@ main(){return 0;}
 
   if test x"$ssl_success" = xyes; then
     AC_MSG_NOTICE([compiling in support for SSL in $ssl_root])
-    AC_DEFINE([HAVE_SSL], [],
+    AC_DEFINE([HAVE_SSL], 1,
               [Define if SSL support should be compiled in.])
     AC_SUBST(SSL_INCLUDES)
     SSL_OBJ='gen_sslfunc$o'
@@ -428,7 +438,7 @@ then
       AC_COMPILE_IFELSE([#include <md5.h>
                         ], [
         AC_MSG_RESULT(yes)
-        AC_DEFINE([HAVE_SOLARIS_MD5], [], [Define to use Solaris MD5.])
+        AC_DEFINE([HAVE_SOLARIS_MD5], 1, [Define to use Solaris MD5.])
         LIBS="-lmd5 $LIBS"
         found_md5=yes
         AC_MSG_NOTICE([using the Solaris MD5 implementation])
@@ -440,7 +450,7 @@ then
   dnl implementation.
   if test x"$found_md5" = xno; then
     if test x"$ssl_success" = xyes; then
-      AC_DEFINE([HAVE_OPENSSL_MD5], [], [Define to use OpenSSL MD5.])
+      AC_DEFINE([HAVE_OPENSSL_MD5], 1, [Define to use OpenSSL MD5.])
       found_md5=yes
       AC_MSG_NOTICE([using the OpenSSL MD5 implementation])
     fi
@@ -448,13 +458,13 @@ then
 
   dnl If none of the above worked, use the one we ship with Wget.
   if test x"$found_md5" = xno; then
-    AC_DEFINE([HAVE_BUILTIN_MD5], [], [Define to use built-in MD5.])
+    AC_DEFINE([HAVE_BUILTIN_MD5], 1, [Define to use built-in MD5.])
     MD5_OBJ="$MD5_OBJ gnu-md5\$o"
     found_md5=yes
     AC_MSG_NOTICE([using the GNU MD5 implementation])
   fi
 fi
-AC_DEFINE([HAVE_MD5], [], [Define if we're compiling support for MD5.])
+AC_DEFINE([HAVE_MD5], 1, [Define if we're compiling support for MD5.])
 AC_SUBST(MD5_OBJ)
 
 dnl **********************************************************************