AM_C_PROTOTYPES
dnl
-dnl Checks for typedefs, structures, and compiler characteristics.
+dnl Checks for basic compiler characteristics.
dnl
AC_C_CONST
AC_C_INLINE
-AC_TYPE_SIZE_T
-AC_TYPE_PID_T
+AC_C_VOLATILE
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)
+AC_HEADER_TIME
+
dnl
dnl Check integral type sizes.
dnl
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
-AC_CHECK_HEADERS(inttypes.h)
-AC_CHECK_TYPES(uint32_t)
dnl
-dnl Checks for headers
+dnl Checks for system-specific types.
dnl
-AC_CHECK_HEADERS(string.h stdarg.h unistd.h sys/time.h utime.h sys/utime.h pwd.h)
-AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h sys/utsname.h)
-AC_CHECK_HEADERS(signal.h setjmp.h)
-AC_HEADER_TIME
+AC_TYPE_SIZE_T
+AC_TYPE_PID_T
+AC_CHECK_TYPES(uint32_t)
+AC_CHECK_TYPES(sig_atomic_t, [], [], [
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+])
dnl
dnl Return type of signal-handlers
dnl
AC_TYPE_SIGNAL
-dnl
-dnl Call several of Wget's macros.
-dnl
-WGET_STRUCT_UTIMBUF
-WGET_SOCKLEN_T
-
dnl
dnl Checks for library functions.
dnl
AC_FUNC_MMAP
AC_CHECK_FUNCS(strdup strstr strcasecmp strncasecmp strpbrk memmove)
AC_CHECK_FUNCS(gettimeofday mktime strptime strerror snprintf vsnprintf)
-AC_CHECK_FUNCS(select sigblock sigsetjmp signal symlink access isatty)
-AC_CHECK_FUNCS(uname gethostname usleep)
+AC_CHECK_FUNCS(usleep select sigblock sigsetjmp signal symlink access isatty)
+
+dnl
+dnl Call Wget's local macros defined in aclocal.
+dnl
+WGET_STRUCT_UTIMBUF
+WGET_SOCKLEN_T
+WGET_FNMATCH
+WGET_NANOSLEEP
+WGET_NSL_SOCKET
dnl
dnl Check if we need to compile in getopt.c.
dnl Checks for libraries.
dnl
-dnl On Solaris, -lnsl is needed to use gethostbyname. On "NCR MP-RAS
-dnl 3.0", however, gethostbyname is in libc, but -lnsl is still needed
-dnl to use -lsocket, as well as for functions such as inet_ntoa. We
-dnl look for such known offenders and if one of them is not found, we
-dnl check if -lnsl is needed.
-
-wget_check_in_nsl=NONE
-AC_CHECK_FUNCS(gethostbyname, [], [
- wget_check_in_nsl=gethostbyname
-])
-AC_CHECK_FUNCS(inet_ntoa, [], [
- wget_check_in_nsl=inet_ntoa
-])
-if test $wget_check_in_nsl != NONE; then
- AC_CHECK_LIB(nsl, $wget_check_in_nsl)
-fi
-
-AC_CHECK_LIB(socket, socket)
-
-dnl nanosleep on Solaris requires -lrt (more recently) or -lposix4
-dnl (older versions).
-
-AC_CHECK_FUNCS(nanosleep, [], [
- AC_CHECK_LIB(rt, nanosleep, [
- AC_DEFINE(HAVE_NANOSLEEP)
- LIBS="-lrt $LIBS"
- ], [
- AC_CHECK_LIB(posix4, nanosleep, [
- AC_DEFINE(HAVE_NANOSLEEP)
- LIBS="-lposix4 $LIBS"
- ])
- ])])
-
dnl #### This appears to be deficient with later versions of SOCKS.
if test "x${with_socks}" = xyes
then
if test x"$wget_need_md5" = xyes
then
- MD5_OBJ='gen-md5$o'
+ dnl This should be moved to an AC_DEFUN, but I'm not sure how to
+ dnl manipulate MD5_OBJ from the defun.
+ MD5_OBJ='gen-md5$o'
found_md5=no
dnl Check for the system MD5 library on Solaris. We don't check for
dnl specific to the Solaris MD5 library.
if test x"$found_md5" = xno; then
AC_CHECK_LIB(md5, md5_calc, [
- dnl There are programs that insert bogus <md5.h> in the include
- dnl path. That makes the system md5 library is useless to us.
- AC_CHECK_HEADERS([md5.h], [
+ dnl Some installations have bogus <md5.h> in the compiler's
+ dnl include path, making the system md5 library useless.
+ AC_MSG_CHECKING([whether md5.h can be included])
+ AC_COMPILE_IFELSE([#include <md5.h>
+ ], [
+ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SOLARIS_MD5)
LIBS="-lmd5 $LIBS"
found_md5=yes
- AC_MSG_NOTICE([using Solaris MD5 implementation])
- ])
+ AC_MSG_NOTICE([using the Solaris MD5 implementation])
+ ], [AC_MSG_RESULT(no)])
])
fi
if test x"$ssl_success" = xyes; then
AC_DEFINE(HAVE_OPENSSL_MD5)
found_md5=yes
- AC_MSG_NOTICE([using OpenSSL MD5 implementation])
+ AC_MSG_NOTICE([using the OpenSSL MD5 implementation])
fi
fi
AC_DEFINE(HAVE_BUILTIN_MD5)
MD5_OBJ="$MD5_OBJ gnu-md5\$o"
found_md5=yes
- AC_MSG_NOTICE([using GNU MD5 implementation])
+ AC_MSG_NOTICE([using the GNU MD5 implementation])
fi
fi
AC_DEFINE(HAVE_MD5)