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?
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.])]
)
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
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
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'
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])
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
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 **********************************************************************