dnl
dnl Process features.
dnl
-AC_ARG_WITH(socks,
- [ --with-socks use the socks library],
- [AC_DEFINE([HAVE_SOCKS], 1,
- [Define if you wish to compile with socks support.])]
-)
AC_ARG_WITH(ssl,
[[ --with-ssl[=SSL-ROOT] link with SSL support [default=auto]
test -z "$CC" && cc_specified=yes
AC_PROG_CC
+AC_AIX
+AM_PROG_CC_STDC
+dnl Turn on optimization by default. Specifically:
dnl
dnl if the user hasn't specified CFLAGS, then
-dnl if compiler is gcc, then use -O2 and some warning flags
-dnl else use os-specific flags or -O
-dnl
+dnl if compiler is gcc, then
+dnl use -O2 and some warning flags
+dnl else
+dnl use os-specific flags or -O
if test -n "$auto_cflags"; then
if test -n "$GCC"; then
CFLAGS="$CFLAGS -O2 -Wall -Wno-implicit"
fi
fi
-dnl
-dnl Handle AIX
-dnl
-AC_AIX
-
dnl
dnl Configure our included libtool and make sure it's regenerated when needed
dnl
esac
AC_SUBST(exeext)
-dnl
-dnl Check if we can handle prototypes.
-dnl
-AM_C_PROTOTYPES
-
dnl
dnl Checks for basic compiler characteristics.
dnl
AC_C_INLINE
AC_C_VOLATILE
AC_C_BIGENDIAN
+AC_C_PROTOTYPES
+
+if test x"$am_cv_prog_cc_stdc" != xno; then
+ true
+ AC_SUBST(U, [])
+ AC_SUBST(ANSI2KNR, [])
+else
+ AC_SUBST(U, [_])
+ AC_SUBST(ANSI2KNR, [./ansi2knr])
+fi
dnl
-dnl Checks for headers
+dnl Checks for header files that might be missing.
dnl
-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.
+dnl Check for basic headers, even those we assume the presence of.
+dnl This is because Autoconf default includes check for STDC_HEADERS,
+dnl HAVE_SYS_TYPES_H, etc. before including them.
+AC_HEADER_STDC
AC_CHECK_HEADERS(sys/types.h sys/stat.h)
-
-AC_CHECK_HEADERS(string.h strings.h stdarg.h unistd.h sys/time.h)
+dnl Now check for the others.
+AC_CHECK_HEADERS(string.h strings.h stdarg.h limits.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 Checks for libraries.
dnl
-dnl #### This appears to be deficient with later versions of SOCKS.
-if test "x${with_socks}" = xyes
-then
- AC_CHECK_LIB(resolv, main)
- AC_CHECK_LIB(socks, Rconnect)
-fi
-
dnl $with_ssl can be one of:
dnl - empty string or "auto", meaning autodetect SSL and use it if found.
dnl - "yes", meaning link with SSL or bail out.
CPPFLAGS="$SSL_INCLUDES $wget_save_CPPFLAGS"
AC_MSG_CHECKING([for includes])
-
- AC_TRY_CPP([#include <openssl/ssl.h>
+ AC_COMPILE_IFELSE([
+#include <openssl/ssl.h>
#include <openssl/rsa.h>
-],
- AC_MSG_RESULT(found); ssl_found_includes=yes,
+ ], [
+ AC_MSG_RESULT(found)
+ ssl_found_includes=yes
+ ], [
AC_MSG_RESULT([not found])
- )
+ ])
if test x"$ssl_found_includes" = xno; then
continue
WGET_WITH_NLS
dnl
-dnl Find makeinfo. If makeinfo is not found, look for Emacs. If
-dnl Emacs cannot be found, look for XEmacs.
+dnl Find makeinfo. We used to provide support for Emacs processing
+dnl Texinfo using `emacs -batch -eval ...' where makeinfo is
+dnl unavailable, but that broke with the addition of makeinfo-specific
+dnl command-line options, such as `-I'. Now we depend on makeinfo to
+dnl build the Info documentation.
dnl
-AC_CHECK_PROGS(MAKEINFO, makeinfo emacs xemacs)
-
-case "${MAKEINFO}" in
- *makeinfo) MAKEINFO="${MAKEINFO} \$(srcdir)/wget.texi" ;;
- *emacs | *xemacs) MAKEINFO="${MAKEINFO} -batch -q -no-site-file -eval '(find-file \"\$(srcdir)/wget.texi\")' -l texinfmt -f texinfo-format-buffer -f save-buffer" ;;
- *) MAKEINFO="makeinfo \$(srcdir)/wget.texi" ;;
-esac
+AC_CHECK_PROGS(MAKEINFO, makeinfo)
dnl
dnl Find perl and pod2man