2005-12-21 17:08:35 +01:00
|
|
|
AC_PREREQ(2.57)
|
2008-07-07 04:11:21 +02:00
|
|
|
|
|
|
|
dnl Version not hardcoded here. Fetched later from ares_version.h
|
|
|
|
AC_INIT([c-ares], [-],
|
|
|
|
[c-ares mailing list => http://cool.haxx.se/mailman/listinfo/c-ares])
|
|
|
|
|
2008-11-16 03:23:18 +01:00
|
|
|
CARES_OVERRIDE_AUTOCONF
|
|
|
|
|
2005-12-21 17:08:35 +01:00
|
|
|
AC_CONFIG_SRCDIR([ares_ipv6.h])
|
2009-07-14 15:38:50 +02:00
|
|
|
AM_CONFIG_HEADER([ares_config.h ares_build.h])
|
2005-09-18 18:44:49 +02:00
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
2008-10-02 05:56:55 +02:00
|
|
|
CARES_CHECK_OPTION_DEBUG
|
2008-10-07 15:13:34 +02:00
|
|
|
CARES_CHECK_OPTION_OPTIMIZE
|
2008-10-02 05:56:55 +02:00
|
|
|
CARES_CHECK_OPTION_WARNINGS
|
2009-05-26 16:50:45 +02:00
|
|
|
CARES_CHECK_OPTION_CURLDEBUG
|
2009-10-31 05:16:40 +01:00
|
|
|
CARES_CHECK_OPTION_SYMBOL_HIDING
|
2008-10-02 05:56:55 +02:00
|
|
|
|
2009-10-19 06:13:12 +02:00
|
|
|
CARES_CHECK_PATH_SEPARATOR_REQUIRED
|
2008-11-18 20:29:31 +01:00
|
|
|
|
2008-07-04 06:03:55 +02:00
|
|
|
dnl SED is mandatory for configure process and libtool.
|
2008-07-28 00:25:07 +02:00
|
|
|
dnl Set it now, allowing it to be changed later.
|
2008-07-04 06:03:55 +02:00
|
|
|
AC_PATH_PROG([SED], [sed], [not_found],
|
2008-07-02 19:42:08 +02:00
|
|
|
[$PATH:/usr/bin:/usr/local/bin])
|
2008-07-04 06:03:55 +02:00
|
|
|
if test -z "$SED" || test "$SED" = "not_found"; then
|
|
|
|
AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
|
2008-07-02 19:42:08 +02:00
|
|
|
fi
|
2008-07-28 01:43:53 +02:00
|
|
|
AC_SUBST([SED])
|
2008-07-02 19:42:08 +02:00
|
|
|
|
2008-07-04 06:03:55 +02:00
|
|
|
dnl GREP is mandatory for configure process and libtool.
|
2008-07-28 00:25:07 +02:00
|
|
|
dnl Set it now, allowing it to be changed later.
|
2008-07-04 06:03:55 +02:00
|
|
|
AC_PATH_PROG([GREP], [grep], [not_found],
|
2008-07-02 19:42:08 +02:00
|
|
|
[$PATH:/usr/bin:/usr/local/bin])
|
2008-07-04 06:03:55 +02:00
|
|
|
if test -z "$GREP" || test "$GREP" = "not_found"; then
|
|
|
|
AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
|
|
|
|
fi
|
2008-07-28 01:43:53 +02:00
|
|
|
AC_SUBST([GREP])
|
2008-07-04 06:03:55 +02:00
|
|
|
|
|
|
|
dnl EGREP is mandatory for configure process and libtool.
|
2008-07-28 00:25:07 +02:00
|
|
|
dnl Set it now, allowing it to be changed later.
|
2008-07-04 06:03:55 +02:00
|
|
|
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
|
|
|
|
AC_MSG_CHECKING([for egrep])
|
|
|
|
EGREP="$GREP -E"
|
|
|
|
AC_MSG_RESULT([$EGREP])
|
|
|
|
else
|
|
|
|
AC_PATH_PROG([EGREP], [egrep], [not_found],
|
|
|
|
[$PATH:/usr/bin:/usr/local/bin])
|
|
|
|
fi
|
|
|
|
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
|
|
|
|
AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
|
|
|
|
fi
|
2008-07-28 01:43:53 +02:00
|
|
|
AC_SUBST([EGREP])
|
2008-07-04 06:03:55 +02:00
|
|
|
|
|
|
|
dnl AR is mandatory for configure process and libtool.
|
2009-10-27 17:56:20 +01:00
|
|
|
dnl This is target dependent, so check it as a tool.
|
2008-07-04 06:03:55 +02:00
|
|
|
AC_PATH_TOOL([AR], [ar], [not_found],
|
|
|
|
[$PATH:/usr/bin:/usr/local/bin])
|
|
|
|
if test -z "$AR" || test "$AR" = "not_found"; then
|
|
|
|
AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
|
2008-07-02 19:42:08 +02:00
|
|
|
fi
|
2008-07-28 01:43:53 +02:00
|
|
|
AC_SUBST([AR])
|
2008-07-02 19:42:08 +02:00
|
|
|
|
2009-11-22 06:31:31 +01:00
|
|
|
dnl Remove non-configure distributed ares_build.h
|
|
|
|
if test -f ${srcdir}/ares_build.h; then
|
|
|
|
rm -f ${srcdir}/ares_build.h
|
|
|
|
fi
|
|
|
|
|
2008-07-07 04:11:21 +02:00
|
|
|
dnl Fetch c-ares version from ares_version.h
|
|
|
|
VERSION=`$SED -ne 's/^#define ARES_VERSION_STR "\(.*\)"/\1/p' ${srcdir}/ares_version.h`
|
|
|
|
AM_INIT_AUTOMAKE([c-ares], [$VERSION])
|
|
|
|
AC_MSG_CHECKING([c-ares version])
|
|
|
|
AC_MSG_RESULT([$VERSION])
|
|
|
|
|
2007-03-07 18:59:03 +01:00
|
|
|
dnl
|
|
|
|
dnl Detect the canonical host and target build environment
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
dnl Get system canonical name
|
|
|
|
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
|
|
|
|
|
2008-10-07 15:13:34 +02:00
|
|
|
CARES_CHECK_PROG_CC
|
2008-05-07 23:16:06 +02:00
|
|
|
AM_PROG_CC_C_O
|
2005-09-18 18:44:49 +02:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
2008-08-04 08:48:11 +02:00
|
|
|
dnl This defines _ALL_SOURCE for AIX
|
|
|
|
CARES_CHECK_AIX_ALL_SOURCE
|
|
|
|
|
2008-07-22 21:04:16 +02:00
|
|
|
dnl Our configure and build reentrant settings
|
2009-11-14 19:51:37 +01:00
|
|
|
CARES_CONFIGURE_THREAD_SAFE
|
2008-07-27 03:36:33 +02:00
|
|
|
CARES_CONFIGURE_REENTRANT
|
2008-07-22 21:04:16 +02:00
|
|
|
|
2008-07-15 18:43:39 +02:00
|
|
|
dnl check for how to do large files
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
2005-09-18 18:44:49 +02:00
|
|
|
case $host_os in
|
2008-05-19 04:50:29 +02:00
|
|
|
solaris*)
|
|
|
|
AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used])
|
|
|
|
;;
|
2005-09-18 18:44:49 +02:00
|
|
|
esac
|
|
|
|
|
2007-03-06 06:05:50 +01:00
|
|
|
dnl support building of Windows DLLs
|
2005-12-19 22:38:10 +01:00
|
|
|
AC_LIBTOOL_WIN32_DLL
|
|
|
|
|
2008-09-30 14:39:54 +02:00
|
|
|
dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
|
|
|
|
AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
|
2007-03-07 18:59:03 +01:00
|
|
|
case $host in
|
2008-09-30 14:39:54 +02:00
|
|
|
x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
|
2007-03-07 18:59:03 +01:00
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
with_pic=yes
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2005-12-20 09:51:34 +01:00
|
|
|
dnl libtool setup
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2009-10-29 02:02:54 +01:00
|
|
|
AC_MSG_CHECKING([if we need CARES_BUILDING_LIBRARY])
|
2009-10-28 20:45:26 +01:00
|
|
|
case $host in
|
|
|
|
*-*-mingw*)
|
2009-10-29 02:02:54 +01:00
|
|
|
AC_DEFINE(CARES_BUILDING_LIBRARY, 1, [when building c-ares library])
|
2009-10-28 20:45:26 +01:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_MSG_CHECKING([if we need CARES_STATICLIB])
|
|
|
|
if test "X$enable_shared" = "Xno"
|
|
|
|
then
|
|
|
|
AC_DEFINE(CARES_STATICLIB, 1, [when not building a shared library])
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2007-10-18 18:24:14 +02:00
|
|
|
dnl **********************************************************************
|
|
|
|
dnl platform/compiler/architecture specific checks/flags
|
|
|
|
dnl **********************************************************************
|
|
|
|
|
2008-10-02 05:56:55 +02:00
|
|
|
CARES_CHECK_COMPILER
|
2008-10-07 15:13:34 +02:00
|
|
|
CARES_SET_COMPILER_BASIC_OPTS
|
|
|
|
CARES_SET_COMPILER_DEBUG_OPTS
|
|
|
|
CARES_SET_COMPILER_OPTIMIZE_OPTS
|
|
|
|
CARES_SET_COMPILER_WARNING_OPTS
|
2008-09-29 21:14:52 +02:00
|
|
|
|
2008-10-22 13:10:56 +02:00
|
|
|
case $host in
|
|
|
|
#
|
|
|
|
x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
|
|
|
|
#
|
2008-10-20 17:56:08 +02:00
|
|
|
if test "$compiler_id" = "INTEL_UNIX_C"; then
|
2008-09-29 21:14:52 +02:00
|
|
|
#
|
2008-10-02 05:56:55 +02:00
|
|
|
if test "$compiler_num" -ge "900" &&
|
|
|
|
test "$compiler_num" -lt "1000"; then
|
2008-09-29 21:14:52 +02:00
|
|
|
dnl icc 9.X specific
|
2008-09-30 04:59:35 +02:00
|
|
|
CFLAGS="$CFLAGS -i-dynamic"
|
2008-09-29 21:14:52 +02:00
|
|
|
fi
|
|
|
|
#
|
2008-10-02 05:56:55 +02:00
|
|
|
if test "$compiler_num" -ge "1000"; then
|
2008-09-29 21:14:52 +02:00
|
|
|
dnl icc 10.X or later
|
2008-09-30 04:59:35 +02:00
|
|
|
CFLAGS="$CFLAGS -shared-intel"
|
2008-09-29 21:14:52 +02:00
|
|
|
fi
|
|
|
|
#
|
|
|
|
fi
|
2008-10-22 13:10:56 +02:00
|
|
|
;;
|
|
|
|
#
|
|
|
|
esac
|
2008-09-29 21:14:52 +02:00
|
|
|
|
2009-05-07 13:06:48 +02:00
|
|
|
CARES_CHECK_COMPILER_HALT_ON_ERROR
|
|
|
|
CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
2009-10-31 05:16:40 +01:00
|
|
|
CARES_CHECK_COMPILER_SYMBOL_HIDING
|
2008-06-20 20:09:48 +02:00
|
|
|
|
2009-05-28 16:38:04 +02:00
|
|
|
CARES_CHECK_NO_UNDEFINED
|
|
|
|
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
|
|
|
|
|
|
|
CARES_CHECK_CURLDEBUG
|
|
|
|
AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
|
|
|
|
|
2008-06-20 20:09:48 +02:00
|
|
|
dnl **********************************************************************
|
|
|
|
dnl Compilation based checks should not be done before this point.
|
|
|
|
dnl **********************************************************************
|
|
|
|
|
|
|
|
dnl **********************************************************************
|
|
|
|
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
|
|
|
dnl and ws2tcpip.h take precedence over any other further checks which
|
|
|
|
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
|
|
|
|
dnl this specific header files. And do them before its results are used.
|
|
|
|
dnl **********************************************************************
|
|
|
|
|
|
|
|
CURL_CHECK_HEADER_WINDOWS
|
|
|
|
CURL_CHECK_NATIVE_WINDOWS
|
|
|
|
case X-"$ac_cv_native_windows" in
|
|
|
|
X-yes)
|
|
|
|
CURL_CHECK_HEADER_WINSOCK
|
|
|
|
CURL_CHECK_HEADER_WINSOCK2
|
|
|
|
CURL_CHECK_HEADER_WS2TCPIP
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
ac_cv_header_winsock_h="no"
|
|
|
|
ac_cv_header_winsock2_h="no"
|
|
|
|
ac_cv_header_ws2tcpip_h="no"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2006-08-06 00:02:47 +02:00
|
|
|
dnl **********************************************************************
|
|
|
|
dnl Checks for libraries.
|
|
|
|
dnl **********************************************************************
|
|
|
|
|
2009-05-03 19:35:44 +02:00
|
|
|
CARES_CHECK_LIB_XNET
|
2009-04-30 20:35:36 +02:00
|
|
|
|
2006-08-06 00:02:47 +02:00
|
|
|
dnl gethostbyname without lib or in the nsl lib?
|
|
|
|
AC_CHECK_FUNC(gethostbyname,
|
|
|
|
[HAVE_GETHOSTBYNAME="1"
|
|
|
|
],
|
|
|
|
[ AC_CHECK_LIB(nsl, gethostbyname,
|
|
|
|
[HAVE_GETHOSTBYNAME="1"
|
|
|
|
LIBS="$LIBS -lnsl"
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
if test "$HAVE_GETHOSTBYNAME" != "1"
|
|
|
|
then
|
|
|
|
dnl gethostbyname in the socket lib?
|
|
|
|
AC_CHECK_LIB(socket, gethostbyname,
|
|
|
|
[HAVE_GETHOSTBYNAME="1"
|
|
|
|
LIBS="$LIBS -lsocket"
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl At least one system has been identified to require BOTH nsl and socket
|
|
|
|
dnl libs at the same time to link properly.
|
|
|
|
if test "$HAVE_GETHOSTBYNAME" != "1"
|
|
|
|
then
|
|
|
|
AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
|
|
|
|
my_ac_save_LIBS=$LIBS
|
|
|
|
LIBS="-lnsl -lsocket $LIBS"
|
2008-05-20 17:55:31 +02:00
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([[
|
|
|
|
]],[[
|
|
|
|
gethostbyname();
|
|
|
|
]])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
HAVE_GETHOSTBYNAME="1"
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
LIBS=$my_ac_save_LIBS
|
|
|
|
])
|
2006-08-06 00:02:47 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$HAVE_GETHOSTBYNAME" != "1"
|
|
|
|
then
|
2008-05-18 22:13:13 +02:00
|
|
|
dnl This is for winsock systems
|
|
|
|
if test "$ac_cv_header_windows_h" = "yes"; then
|
2008-05-19 04:50:29 +02:00
|
|
|
if test "$ac_cv_header_winsock_h" = "yes"; then
|
|
|
|
case $host in
|
|
|
|
*-*-mingw32ce*)
|
|
|
|
winsock_LIB="-lwinsock"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
winsock_LIB="-lwsock32"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
2008-05-18 22:13:13 +02:00
|
|
|
if test "$ac_cv_header_winsock2_h" = "yes"; then
|
|
|
|
winsock_LIB="-lws2_32"
|
|
|
|
fi
|
|
|
|
if test ! -z "$winsock_LIB"; then
|
|
|
|
my_ac_save_LIBS=$LIBS
|
|
|
|
LIBS="$winsock_LIB $LIBS"
|
|
|
|
AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
|
2008-05-20 17:55:31 +02:00
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([[
|
2008-05-18 22:13:13 +02:00
|
|
|
#ifdef HAVE_WINDOWS_H
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#endif
|
|
|
|
#include <windows.h>
|
|
|
|
#ifdef HAVE_WINSOCK2_H
|
|
|
|
#include <winsock2.h>
|
|
|
|
#else
|
|
|
|
#ifdef HAVE_WINSOCK_H
|
|
|
|
#include <winsock.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
2008-05-20 17:55:31 +02:00
|
|
|
]],[[
|
2008-05-18 22:13:13 +02:00
|
|
|
gethostbyname("www.dummysite.com");
|
2008-05-20 17:55:31 +02:00
|
|
|
]])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
HAVE_GETHOSTBYNAME="1"
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
winsock_LIB=""
|
|
|
|
LIBS=$my_ac_save_LIBS
|
2008-05-18 22:13:13 +02:00
|
|
|
])
|
|
|
|
fi
|
|
|
|
fi
|
2006-08-06 00:02:47 +02:00
|
|
|
fi
|
|
|
|
|
2008-05-20 17:55:31 +02:00
|
|
|
if test "$HAVE_GETHOSTBYNAME" != "1"
|
|
|
|
then
|
|
|
|
dnl This is for Minix 3.1
|
|
|
|
AC_MSG_CHECKING([for gethostbyname for Minix 3])
|
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([[
|
|
|
|
/* Older Minix versions may need <net/gen/netdb.h> here instead */
|
|
|
|
#include <netdb.h>
|
|
|
|
]],[[
|
|
|
|
gethostbyname("www.dummysite.com");
|
|
|
|
]])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
HAVE_GETHOSTBYNAME="1"
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
2006-08-06 00:02:47 +02:00
|
|
|
if test "$HAVE_GETHOSTBYNAME" != "1"
|
|
|
|
then
|
|
|
|
dnl This is for eCos with a stubbed DNS implementation
|
|
|
|
AC_MSG_CHECKING([for gethostbyname for eCos])
|
2008-05-20 17:55:31 +02:00
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([[
|
2006-08-06 00:02:47 +02:00
|
|
|
#include <stdio.h>
|
2008-05-20 17:55:31 +02:00
|
|
|
#include <netdb.h>
|
|
|
|
]],[[
|
|
|
|
gethostbyname("www.dummysite.com");
|
|
|
|
]])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
HAVE_GETHOSTBYNAME="1"
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
])
|
2006-08-06 00:02:47 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$HAVE_GETHOSTBYNAME" != "1"
|
|
|
|
then
|
|
|
|
dnl gethostbyname in the net lib - for BeOS
|
|
|
|
AC_CHECK_LIB(net, gethostbyname,
|
|
|
|
[HAVE_GETHOSTBYNAME="1"
|
|
|
|
LIBS="$LIBS -lnet"
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2008-11-18 02:57:28 +01:00
|
|
|
if test "$HAVE_GETHOSTBYNAME" != "1"; then
|
2006-08-06 00:02:47 +02:00
|
|
|
AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
|
|
|
|
fi
|
|
|
|
|
2006-08-06 12:58:47 +02:00
|
|
|
dnl resolve lib?
|
|
|
|
AC_CHECK_FUNC(strcasecmp, , [ AC_CHECK_LIB(resolve, strcasecmp) ])
|
|
|
|
|
|
|
|
if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
|
|
|
|
AC_CHECK_LIB(resolve, strcasecmp,
|
|
|
|
[LIBS="-lresolve $LIBS"],
|
|
|
|
,
|
|
|
|
-lnsl)
|
|
|
|
fi
|
2008-09-15 02:31:42 +02:00
|
|
|
ac_cv_func_strcasecmp="no"
|
2006-08-06 12:58:47 +02:00
|
|
|
|
2009-06-20 19:24:43 +02:00
|
|
|
CARES_CHECK_LIBS_CONNECT
|
2006-08-06 12:58:47 +02:00
|
|
|
|
2008-05-10 17:46:08 +02:00
|
|
|
dnl **********************************************************************
|
2008-05-12 04:04:21 +02:00
|
|
|
dnl In case that function clock_gettime with monotonic timer is available,
|
|
|
|
dnl check for additional required libraries.
|
2008-05-10 17:46:08 +02:00
|
|
|
dnl **********************************************************************
|
2008-05-12 04:04:21 +02:00
|
|
|
CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
|
2008-05-10 17:46:08 +02:00
|
|
|
|
2006-08-06 00:02:47 +02:00
|
|
|
AC_MSG_CHECKING([whether to use libgcc])
|
|
|
|
AC_ARG_ENABLE(libgcc,
|
|
|
|
AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
|
|
|
|
[ case "$enableval" in
|
|
|
|
yes)
|
|
|
|
LIBS="$LIBS -lgcc"
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
;;
|
|
|
|
*) AC_MSG_RESULT(no)
|
|
|
|
;;
|
|
|
|
esac ],
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
)
|
|
|
|
|
2007-02-07 19:13:40 +01:00
|
|
|
|
|
|
|
dnl Let's hope this split URL remains working:
|
|
|
|
dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
|
|
|
|
dnl genprogc/thread_quick_ref.htm
|
|
|
|
|
|
|
|
|
2006-08-06 00:02:47 +02:00
|
|
|
dnl **********************************************************************
|
|
|
|
dnl Back to "normal" configuring
|
|
|
|
dnl **********************************************************************
|
2006-08-03 23:19:40 +02:00
|
|
|
|
2005-12-19 22:38:10 +01:00
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
2005-09-18 18:44:49 +02:00
|
|
|
|
2006-07-11 22:40:38 +02:00
|
|
|
CURL_CHECK_HEADER_MALLOC
|
2009-04-21 12:26:58 +02:00
|
|
|
CURL_CHECK_HEADER_MEMORY
|
2006-07-11 22:40:38 +02:00
|
|
|
|
2005-09-18 18:44:49 +02:00
|
|
|
dnl check for a few basic system headers we need
|
|
|
|
AC_CHECK_HEADERS(
|
|
|
|
sys/types.h \
|
|
|
|
sys/time.h \
|
|
|
|
sys/select.h \
|
|
|
|
sys/socket.h \
|
|
|
|
sys/ioctl.h \
|
2007-07-04 11:01:40 +02:00
|
|
|
sys/param.h \
|
2008-09-16 18:42:48 +02:00
|
|
|
sys/uio.h \
|
2009-11-16 02:55:48 +01:00
|
|
|
assert.h \
|
2005-09-21 11:01:44 +02:00
|
|
|
netdb.h \
|
2005-09-18 18:44:49 +02:00
|
|
|
netinet/in.h \
|
2007-09-30 04:12:11 +02:00
|
|
|
netinet/tcp.h \
|
2005-09-18 18:44:49 +02:00
|
|
|
net/if.h \
|
2007-02-22 03:51:54 +01:00
|
|
|
errno.h \
|
2009-06-17 14:52:46 +02:00
|
|
|
socket.h \
|
2008-05-09 00:11:38 +02:00
|
|
|
strings.h \
|
2007-02-22 03:51:54 +01:00
|
|
|
stdbool.h \
|
2008-05-09 18:30:24 +02:00
|
|
|
time.h \
|
2009-04-14 15:50:32 +02:00
|
|
|
limits.h \
|
2005-09-18 18:44:49 +02:00
|
|
|
arpa/nameser.h \
|
|
|
|
arpa/nameser_compat.h \
|
2005-12-19 22:38:10 +01:00
|
|
|
arpa/inet.h,
|
|
|
|
dnl to do if not found
|
|
|
|
[],
|
|
|
|
dnl to do if found
|
|
|
|
[],
|
|
|
|
dnl default includes
|
2005-09-18 18:44:49 +02:00
|
|
|
[
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
|
|
#include <sys/time.h>
|
|
|
|
#endif
|
2005-09-18 18:44:49 +02:00
|
|
|
dnl We do this default-include simply to make sure that the nameser_compat.h
|
|
|
|
dnl header *REALLY* can be include after the new nameser.h. It seems AIX 5.1
|
|
|
|
dnl (and others?) is not designed to allow this.
|
|
|
|
#ifdef HAVE_ARPA_NAMESER_H
|
|
|
|
#include <arpa/nameser.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
dnl *Sigh* these are needed in order for net/if.h to get properly detected.
|
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
2005-09-18 18:44:49 +02:00
|
|
|
#endif
|
|
|
|
]
|
2005-12-19 22:38:10 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
2006-10-13 03:35:14 +02:00
|
|
|
CURL_CHECK_STRUCT_TIMEVAL
|
2005-12-19 22:38:10 +01:00
|
|
|
|
|
|
|
AC_CHECK_SIZEOF(size_t)
|
2009-04-28 18:47:33 +02:00
|
|
|
AC_CHECK_SIZEOF(int)
|
2005-12-19 22:38:10 +01:00
|
|
|
AC_CHECK_SIZEOF(long)
|
2009-04-28 18:47:33 +02:00
|
|
|
CARES_CONFIGURE_LONG
|
2005-12-19 22:38:10 +01:00
|
|
|
AC_CHECK_SIZEOF(time_t)
|
|
|
|
|
|
|
|
AC_CHECK_TYPE(long long,
|
2008-08-21 02:06:15 +02:00
|
|
|
[AC_DEFINE(HAVE_LONGLONG, 1,
|
|
|
|
[Define to 1 if the compiler supports the 'long long' data type.])]
|
2005-12-19 22:38:10 +01:00
|
|
|
longlong="yes"
|
|
|
|
)
|
|
|
|
|
|
|
|
if test "xyes" = "x$longlong"; then
|
|
|
|
AC_MSG_CHECKING([if numberLL works])
|
|
|
|
AC_COMPILE_IFELSE([long long val = 1000LL;],
|
|
|
|
[AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])]
|
|
|
|
AC_MSG_RESULT(yes),
|
|
|
|
AC_MSG_RESULT(no)
|
2005-09-18 18:44:49 +02:00
|
|
|
)
|
2005-12-19 22:38:10 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# check for ssize_t
|
|
|
|
AC_CHECK_TYPE(ssize_t, ,
|
|
|
|
AC_DEFINE(ssize_t, int, [the signed version of size_t]))
|
2005-09-18 18:44:49 +02:00
|
|
|
|
2007-02-22 03:51:54 +01:00
|
|
|
# check for bool type
|
|
|
|
AC_CHECK_TYPE([bool],[
|
|
|
|
AC_DEFINE(HAVE_BOOL_T, 1,
|
|
|
|
[Define to 1 if bool is an available type.])
|
|
|
|
], ,[
|
2007-02-22 17:44:43 +01:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2007-02-22 03:51:54 +01:00
|
|
|
#ifdef HAVE_STDBOOL_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
#endif
|
|
|
|
])
|
|
|
|
|
2009-04-28 18:47:33 +02:00
|
|
|
CARES_CONFIGURE_ARES_SOCKLEN_T
|
|
|
|
|
2005-12-19 22:38:10 +01:00
|
|
|
TYPE_IN_ADDR_T
|
|
|
|
|
|
|
|
TYPE_SOCKADDR_STORAGE
|
|
|
|
|
2006-11-22 19:41:34 +01:00
|
|
|
TYPE_SIG_ATOMIC_T
|
|
|
|
|
2006-11-25 02:02:52 +01:00
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
|
2006-07-04 15:03:32 +02:00
|
|
|
CURL_CHECK_FUNC_RECV
|
2008-07-16 21:16:41 +02:00
|
|
|
CURL_CHECK_FUNC_RECVFROM
|
2006-07-04 15:03:32 +02:00
|
|
|
CURL_CHECK_FUNC_SEND
|
2006-07-28 16:19:02 +02:00
|
|
|
CURL_CHECK_MSG_NOSIGNAL
|
|
|
|
|
2009-06-17 14:52:46 +02:00
|
|
|
CARES_CHECK_FUNC_CLOSESOCKET
|
2009-06-18 14:36:10 +02:00
|
|
|
CARES_CHECK_FUNC_CLOSESOCKET_CAMEL
|
2009-06-20 19:24:43 +02:00
|
|
|
CARES_CHECK_FUNC_CONNECT
|
2008-11-13 19:56:55 +01:00
|
|
|
CARES_CHECK_FUNC_FCNTL
|
2008-10-30 18:45:47 +01:00
|
|
|
CARES_CHECK_FUNC_FREEADDRINFO
|
2008-10-28 20:13:25 +01:00
|
|
|
CARES_CHECK_FUNC_GETADDRINFO
|
2008-11-18 02:57:28 +01:00
|
|
|
CARES_CHECK_FUNC_GETHOSTBYADDR
|
|
|
|
CARES_CHECK_FUNC_GETHOSTBYNAME
|
2008-09-17 10:14:00 +02:00
|
|
|
CARES_CHECK_FUNC_GETHOSTNAME
|
2008-09-17 13:31:37 +02:00
|
|
|
CARES_CHECK_FUNC_GETSERVBYPORT_R
|
2008-09-24 18:43:12 +02:00
|
|
|
CARES_CHECK_FUNC_INET_NTOP
|
2008-09-24 21:13:01 +02:00
|
|
|
CARES_CHECK_FUNC_INET_PTON
|
2008-11-13 19:56:55 +01:00
|
|
|
CARES_CHECK_FUNC_IOCTL
|
|
|
|
CARES_CHECK_FUNC_IOCTLSOCKET
|
|
|
|
CARES_CHECK_FUNC_IOCTLSOCKET_CAMEL
|
|
|
|
CARES_CHECK_FUNC_SETSOCKOPT
|
2009-06-17 14:52:46 +02:00
|
|
|
CARES_CHECK_FUNC_SOCKET
|
2008-09-15 02:31:42 +02:00
|
|
|
CARES_CHECK_FUNC_STRCASECMP
|
|
|
|
CARES_CHECK_FUNC_STRCMPI
|
2008-09-11 06:02:49 +02:00
|
|
|
CARES_CHECK_FUNC_STRDUP
|
2008-09-15 02:31:42 +02:00
|
|
|
CARES_CHECK_FUNC_STRICMP
|
|
|
|
CARES_CHECK_FUNC_STRNCASECMP
|
|
|
|
CARES_CHECK_FUNC_STRNCMPI
|
|
|
|
CARES_CHECK_FUNC_STRNICMP
|
2008-09-16 18:42:48 +02:00
|
|
|
CARES_CHECK_FUNC_WRITEV
|
2008-09-15 02:31:42 +02:00
|
|
|
|
2008-09-11 06:02:49 +02:00
|
|
|
|
2005-09-18 18:44:49 +02:00
|
|
|
dnl check for AF_INET6
|
|
|
|
CARES_CHECK_CONSTANT(
|
|
|
|
[
|
2005-12-19 22:38:10 +01:00
|
|
|
#undef inline
|
|
|
|
#ifdef HAVE_WINDOWS_H
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#endif
|
|
|
|
#include <windows.h>
|
|
|
|
#ifdef HAVE_WINSOCK2_H
|
|
|
|
#include <winsock2.h>
|
|
|
|
#endif
|
|
|
|
#else
|
2005-09-18 18:44:49 +02:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
], [PF_INET6],
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_PF_INET6,1,[Define to 1 if you have PF_INET6.])
|
|
|
|
)
|
|
|
|
|
|
|
|
dnl check for PF_INET6
|
|
|
|
CARES_CHECK_CONSTANT(
|
|
|
|
[
|
2005-12-19 22:38:10 +01:00
|
|
|
#undef inline
|
|
|
|
#ifdef HAVE_WINDOWS_H
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#endif
|
|
|
|
#include <windows.h>
|
|
|
|
#ifdef HAVE_WINSOCK2_H
|
|
|
|
#include <winsock2.h>
|
|
|
|
#endif
|
|
|
|
#else
|
2005-09-18 18:44:49 +02:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
], [AF_INET6],
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_AF_INET6,1,[Define to 1 if you have AF_INET6.])
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
dnl check for the in6_addr structure
|
|
|
|
CARES_CHECK_STRUCT(
|
|
|
|
[
|
2005-12-19 22:38:10 +01:00
|
|
|
#undef inline
|
|
|
|
#ifdef HAVE_WINDOWS_H
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2005-09-18 18:44:49 +02:00
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#include <windows.h>
|
2005-11-16 08:12:37 +01:00
|
|
|
#ifdef HAVE_WINSOCK2_H
|
|
|
|
#include <winsock2.h>
|
|
|
|
#ifdef HAVE_WS2TCPIP_H
|
2005-11-15 15:39:52 +01:00
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2005-09-18 18:44:49 +02:00
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
2005-12-19 22:38:10 +01:00
|
|
|
#endif
|
2005-09-18 18:44:49 +02:00
|
|
|
#endif
|
|
|
|
], [in6_addr],
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_STRUCT_IN6_ADDR,1,[Define to 1 if you have struct in6_addr.])
|
|
|
|
)
|
|
|
|
|
|
|
|
dnl check for the sockaddr_in6 structure
|
|
|
|
CARES_CHECK_STRUCT(
|
|
|
|
[
|
2005-12-19 22:38:10 +01:00
|
|
|
#undef inline
|
|
|
|
#ifdef HAVE_WINDOWS_H
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2005-09-18 18:44:49 +02:00
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#include <windows.h>
|
2005-11-16 08:12:37 +01:00
|
|
|
#ifdef HAVE_WINSOCK2_H
|
|
|
|
#include <winsock2.h>
|
|
|
|
#ifdef HAVE_WS2TCPIP_H
|
2005-11-15 15:39:52 +01:00
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2005-09-18 18:44:49 +02:00
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
2005-12-19 22:38:10 +01:00
|
|
|
#endif
|
2005-09-18 18:44:49 +02:00
|
|
|
#endif
|
|
|
|
], [sockaddr_in6],
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_STRUCT_SOCKADDR_IN6,1,
|
|
|
|
[Define to 1 if you have struct sockaddr_in6.]) ac_have_sockaddr_in6=yes
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_CHECK_MEMBER(struct sockaddr_in6.sin6_scope_id,
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID,1,
|
|
|
|
[Define to 1 if your struct sockaddr_in6 has sin6_scope_id.])
|
|
|
|
, ,
|
|
|
|
[
|
2005-12-19 22:38:10 +01:00
|
|
|
#undef inline
|
|
|
|
#ifdef HAVE_WINDOWS_H
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2005-09-18 18:44:49 +02:00
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#include <windows.h>
|
2005-11-16 08:12:37 +01:00
|
|
|
#ifdef HAVE_WINSOCK2_H
|
|
|
|
#include <winsock2.h>
|
|
|
|
#ifdef HAVE_WS2TCPIP_H
|
2005-11-15 15:39:52 +01:00
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2005-09-18 18:44:49 +02:00
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
2005-12-19 22:38:10 +01:00
|
|
|
#endif
|
2005-09-18 18:44:49 +02:00
|
|
|
#endif
|
2005-09-21 11:10:17 +02:00
|
|
|
])
|
2005-09-18 18:44:49 +02:00
|
|
|
|
|
|
|
dnl check for the addrinfo structure
|
2005-09-21 11:01:44 +02:00
|
|
|
AC_CHECK_MEMBER(struct addrinfo.ai_flags,
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_STRUCT_ADDRINFO,1,
|
|
|
|
[Define to 1 if you have struct addrinfo.]),,
|
2005-09-18 18:44:49 +02:00
|
|
|
[
|
2005-12-19 22:38:10 +01:00
|
|
|
#undef inline
|
|
|
|
#ifdef HAVE_WINDOWS_H
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2005-09-18 18:44:49 +02:00
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#include <windows.h>
|
|
|
|
#ifdef HAVE_WINSOCK2_H
|
2005-11-16 08:12:37 +01:00
|
|
|
#include <winsock2.h>
|
|
|
|
#ifdef HAVE_WS2TCPIP_H
|
2005-11-15 15:39:52 +01:00
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2005-09-18 18:44:49 +02:00
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
2005-09-21 11:01:44 +02:00
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETDB_H
|
|
|
|
#include <netdb.h>
|
2005-12-19 22:38:10 +01:00
|
|
|
#endif
|
2005-09-21 11:01:44 +02:00
|
|
|
#endif
|
|
|
|
]
|
2005-09-18 18:44:49 +02:00
|
|
|
)
|
|
|
|
|
2005-12-16 19:18:00 +01:00
|
|
|
|
2008-08-01 21:29:05 +02:00
|
|
|
AC_CHECK_FUNCS([bitncmp \
|
|
|
|
gettimeofday \
|
|
|
|
if_indextoname
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
func="$ac_func"
|
|
|
|
AC_MSG_CHECKING([deeper for $func])
|
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([[
|
|
|
|
]],[[
|
|
|
|
$func ();
|
|
|
|
]])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
eval "ac_cv_func_$func=yes"
|
2009-05-07 16:03:04 +02:00
|
|
|
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1],
|
2008-08-01 21:29:05 +02:00
|
|
|
[Define to 1 if you have the $func function.])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([but still no])
|
|
|
|
])
|
|
|
|
])
|
2005-12-16 19:18:00 +01:00
|
|
|
|
|
|
|
|
2005-09-18 18:44:49 +02:00
|
|
|
dnl Check for inet_net_pton
|
|
|
|
AC_CHECK_FUNCS(inet_net_pton)
|
|
|
|
dnl Again, some systems have it, but not IPv6
|
|
|
|
if test "$ac_cv_func_inet_net_pton" = "yes" ; then
|
|
|
|
AC_MSG_CHECKING(if inet_net_pton supports IPv6)
|
|
|
|
AC_TRY_RUN(
|
|
|
|
[
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
struct in6_addr addr6;
|
|
|
|
if (inet_net_pton(AF_INET6, "::1", &addr6, sizeof(addr6)) < 1)
|
|
|
|
exit(1);
|
|
|
|
else
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_INET_NET_PTON_IPV6,1,[Define to 1 if inet_net_pton supports IPv6.])
|
|
|
|
], AC_MSG_RESULT(no),AC_MSG_RESULT(no))
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
AC_CHECK_SIZEOF(struct in6_addr, ,
|
|
|
|
[
|
2005-12-19 22:38:10 +01:00
|
|
|
#undef inline
|
|
|
|
#ifdef HAVE_WINDOWS_H
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#endif
|
|
|
|
#include <windows.h>
|
|
|
|
#ifdef HAVE_WINSOCK2_H
|
|
|
|
#include <winsock2.h>
|
|
|
|
#ifdef HAVE_WS2TCPIP_H
|
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#else
|
2005-09-18 18:44:49 +02:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#endif
|
2005-09-18 18:44:49 +02:00
|
|
|
]
|
|
|
|
)
|
2005-12-19 22:38:10 +01:00
|
|
|
|
2005-09-18 18:44:49 +02:00
|
|
|
AC_CHECK_SIZEOF(struct in_addr, ,
|
|
|
|
[
|
2005-12-19 22:38:10 +01:00
|
|
|
#undef inline
|
|
|
|
#ifdef HAVE_WINDOWS_H
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#endif
|
|
|
|
#include <windows.h>
|
|
|
|
#ifdef HAVE_WINSOCK2_H
|
|
|
|
#include <winsock2.h>
|
|
|
|
#ifdef HAVE_WS2TCPIP_H
|
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#else
|
2005-09-18 18:44:49 +02:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
2005-12-19 22:38:10 +01:00
|
|
|
#endif
|
2005-09-18 18:44:49 +02:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2005-12-21 21:44:54 +01:00
|
|
|
|
|
|
|
dnl Check if the getnameinfo function is available
|
|
|
|
dnl and get the types of five of its arguments.
|
|
|
|
CURL_CHECK_FUNC_GETNAMEINFO
|
|
|
|
|
2005-09-18 18:44:49 +02:00
|
|
|
|
2005-11-15 00:14:54 +01:00
|
|
|
AC_C_BIGENDIAN(
|
2006-05-10 10:03:54 +02:00
|
|
|
[AC_DEFINE(ARES_BIG_ENDIAN, 1,
|
|
|
|
[define this if ares is built for a big endian system])],
|
2005-11-15 00:14:54 +01:00
|
|
|
,
|
|
|
|
[AC_MSG_WARN([couldn't figure out endianess, assuming little endian!])]
|
|
|
|
)
|
|
|
|
|
2007-05-30 23:37:17 +02:00
|
|
|
dnl Check for user-specified random device
|
|
|
|
AC_ARG_WITH(random,
|
|
|
|
AC_HELP_STRING([--with-random=FILE],
|
|
|
|
[read randomness from FILE (default=/dev/urandom)]),
|
|
|
|
[ RANDOM_FILE="$withval" ],
|
|
|
|
[
|
2007-12-03 11:22:29 +01:00
|
|
|
dnl Check for random device. If we're cross compiling, we can't
|
|
|
|
dnl check, and it's better to assume it doesn't exist than it is
|
|
|
|
dnl to fail on AC_CHECK_FILE or later.
|
|
|
|
if test "$cross_compiling" = "no"; then
|
|
|
|
AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([cannot check for /dev/urandom while cross compiling; assuming none])
|
|
|
|
fi
|
|
|
|
|
2007-05-30 23:37:17 +02:00
|
|
|
]
|
|
|
|
)
|
|
|
|
if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
|
|
|
|
AC_SUBST(RANDOM_FILE)
|
|
|
|
AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
|
|
|
|
[a suitable file/device to read random data from])
|
|
|
|
fi
|
|
|
|
|
2008-11-13 19:56:55 +01:00
|
|
|
CARES_CHECK_OPTION_NONBLOCKING
|
|
|
|
CARES_CHECK_NONBLOCKING_SOCKET
|
|
|
|
|
2009-10-31 05:16:40 +01:00
|
|
|
CARES_CONFIGURE_SYMBOL_HIDING
|
2009-10-28 20:45:26 +01:00
|
|
|
|
2008-06-09 03:06:48 +02:00
|
|
|
CARES_PRIVATE_LIBS="$LIBS"
|
|
|
|
AC_SUBST(CARES_PRIVATE_LIBS)
|
|
|
|
|
2008-10-07 15:13:34 +02:00
|
|
|
dnl squeeze whitespace out of some variables
|
|
|
|
|
2008-10-15 20:10:02 +02:00
|
|
|
squeeze CFLAGS
|
|
|
|
squeeze CPPFLAGS
|
|
|
|
squeeze DEFS
|
|
|
|
squeeze LDFLAGS
|
|
|
|
squeeze LIBS
|
2008-10-07 15:13:34 +02:00
|
|
|
|
2008-10-15 20:10:02 +02:00
|
|
|
squeeze CARES_PRIVATE_LIBS
|
2008-10-07 15:13:34 +02:00
|
|
|
|
2008-05-07 23:16:06 +02:00
|
|
|
AC_CONFIG_FILES([Makefile libcares.pc])
|
|
|
|
AC_OUTPUT
|