Newer
Older
CURL_CONFIGURE_CURL_SOCKLEN_T
TYPE_SOCKADDR_STORAGE
TYPE_SIG_ATOMIC_T
Yang Tse
committed
CURL_CHECK_FUNC_RECV
CURL_CHECK_FUNC_RECVFROM
Yang Tse
committed
CURL_CHECK_FUNC_SEND
Yang Tse
committed
CURL_CHECK_MSG_NOSIGNAL
CURL_CHECK_FUNC_ALARM
CURL_CHECK_FUNC_FCNTL
CURL_CHECK_FUNC_FREEADDRINFO
CURL_CHECK_FUNC_FREEIFADDRS
CURL_CHECK_FUNC_GETADDRINFO
CURL_CHECK_FUNC_GETHOSTBYADDR
CURL_CHECK_FUNC_GETHOSTBYADDR_R
CURL_CHECK_FUNC_GETHOSTBYNAME
CURL_CHECK_FUNC_GETHOSTBYNAME_R
CURL_CHECK_FUNC_GETHOSTNAME
CURL_CHECK_FUNC_GETIFADDRS
CURL_CHECK_FUNC_INET_NTOP
CURL_CHECK_FUNC_INET_PTON
CURL_CHECK_FUNC_IOCTL
CURL_CHECK_FUNC_IOCTLSOCKET
CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
CURL_CHECK_FUNC_LOCALTIME_R
CURL_CHECK_FUNC_SETSOCKOPT
CURL_CHECK_FUNC_SIGINTERRUPT
CURL_CHECK_FUNC_SIGNAL
CURL_CHECK_FUNC_SIGSETJMP
CURL_CHECK_FUNC_STRCASECMP
CURL_CHECK_FUNC_STRCASESTR
CURL_CHECK_FUNC_STRCMPI
CURL_CHECK_FUNC_STRICMP
CURL_CHECK_FUNC_STRLCAT
CURL_CHECK_FUNC_STRNCASECMP
CURL_CHECK_FUNC_STRNCMPI
CURL_CHECK_FUNC_STRNICMP
CURL_CHECK_FUNC_STRSTR
CURL_CHECK_FUNC_WRITEV
dnl Checks for library functions.
dnl AC_PROG_GCC_TRADITIONAL
dnl AC_FUNC_VPRINTF
Daniel Stenberg
committed
case $host in
*msdosdjgpp)
ac_cv_func_pipe=no
skipcheck_pipe=yes
AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
;;
esac
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
geteuid \
getpass_r \
getppid \
getprotobyname \
getpwuid \
getrlimit \
gettimeofday \
inet_addr \
perror \
pipe \
setlocale \
setmode \
setrlimit \
uname \
utime
],[
],[
func="$ac_func"
eval skipcheck=\$skipcheck_$func
if test "x$skipcheck" != "xyes"; then
AC_MSG_CHECKING([deeper for $func])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
]],[[
$func ();
]])
],[
AC_MSG_RESULT([yes])
eval "ac_cv_func_$func=yes"
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1],
[Define to 1 if you have the $func function.])
],[
AC_MSG_RESULT([but still no])
])
fi
])
dnl Check if the getnameinfo function is available
dnl and get the types of five of its arguments.
CURL_CHECK_FUNC_GETNAMEINFO
if test "$ipv6" = "yes"; then
if test "$ac_cv_func_getaddrinfo" = "yes"; then
AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
IPV6_ENABLED=1
AC_SUBST(IPV6_ENABLED)
fi
CURL_CHECK_NI_WITHSCOPEID
fi
dnl ************************************************************
dnl enable non-blocking communications
dnl
CURL_CHECK_OPTION_NONBLOCKING
CURL_CHECK_NONBLOCKING_SOCKET
dnl ************************************************************
dnl nroff tool stuff
dnl
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
AC_SUBST(PERL)
Daniel Stenberg
committed
if test -n "$NROFF"; then
dnl only check for nroff options if an nroff command was found
AC_MSG_CHECKING([how to use *nroff to get plain text from man pages])
MANOPT="-man"
mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
if test -z "$mancheck"; then
Daniel Stenberg
committed
MANOPT="-mandoc"
mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
if test -z "$mancheck"; then
MANOPT=""
AC_MSG_RESULT([failed])
AC_MSG_WARN([found no *nroff option to get plaintext from man pages])
else
AC_MSG_RESULT([$MANOPT])
fi
else
AC_MSG_RESULT([$MANOPT])
fi
Daniel Stenberg
committed
AC_SUBST(MANOPT)
fi
if test -z "$MANOPT"
then
dnl if no nroff tool was found, or no option that could convert man pages
dnl was found, then disable the built-in manual stuff
AC_MSG_WARN([disabling built-in manual])
USE_MANUAL="no";
fi
dnl *************************************************************************
dnl If the manual variable still is set, then we go with providing a built-in
dnl manual
if test "$USE_MANUAL" = "1"; then
AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
fi
dnl set variable for use in automakefile(s)
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
Daniel Stenberg
committed
AC_MSG_CHECKING([whether to enable c-ares])
AC_ARG_ENABLE(ares,
Daniel Stenberg
committed
AC_HELP_STRING([--enable-ares=PATH],[Enable c-ares for name lookups])
AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
;;
*) AC_MSG_RESULT(yes)
if test "x$IPV6_ENABLED" = "x1"; then
Daniel Stenberg
committed
AC_MSG_NOTICE([c-ares may not work properly with ipv6])
fi
Daniel Stenberg
committed
AC_DEFINE(USE_ARES, 1, [Define if you want to enable c-ares support])
dnl substitute HAVE_ARES for curl-config and similar
HAVE_ARES="1"
AC_SUBST(HAVE_ARES)
curl_ares_msg="enabled"
dnl For backwards compatibility default to includes/lib in srcdir/ares
dnl If a value is specified it is assumed that the libs are in $val/lib
dnl and the includes are in $val/include. This is the default setup for
dnl ares so it should not be a problem.
if test "x$enableval" = "xyes" ; then
if test -d "$srcdir/ares"; then
aresembedded="yes"
AC_CONFIG_SUBDIRS(ares)
dnl Since c-ares has installable configured header files, path
dnl inclusion is fully done in makefiles for in-tree builds.
fi
else
CPPFLAGS="$CPPFLAGS -I$enableval/include"
LDFLAGS="$LDFLAGS -L$enableval/lib"
fi
if test -z "$aresembedded"; then
dnl verify that a sufficient c-ares is here if we have pointed one
dnl out and don't use the "embedded" ares dir (in which case we don't
dnl check it because it might not have been built yet)
AC_MSG_CHECKING([that c-ares is good and recent enough])
AC_LINK_IFELSE([
#include <ares.h>
/* set of dummy functions in case c-ares was built with debug */
void curl_dofree() { }
void curl_sclose() { }
void curl_domalloc() { }
void curl_docalloc() { }
void curl_socket() { }
ares_channel channel;
ares_cancel(channel); /* added in 1.2.0 */
ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
],[
AC_MSG_RESULT([yes])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([c-ares library defective or too old])
])
fi
;;
esac ],
AC_MSG_RESULT(no)
)
dnl set variable for use in automakefile(s)
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$aresembedded = xyes)
dnl ************************************************************
dnl disable verbose text strings
dnl
AC_MSG_CHECKING([whether to enable verbose strings])
AC_ARG_ENABLE(verbose,
AC_HELP_STRING([--enable-verbose],[Enable verbose strings])
AC_HELP_STRING([--disable-verbose],[Disable verbose strings]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings])
curl_verbose_msg="no"
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
Daniel Stenberg
committed
dnl ************************************************************
dnl enable SSPI support
dnl
AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
Daniel Stenberg
committed
AC_ARG_ENABLE(sspi,
AC_HELP_STRING([--enable-sspi],[Enable SSPI])
AC_HELP_STRING([--disable-sspi],[Disable SSPI]),
[ case "$enableval" in
yes)
if test "$ac_cv_native_windows" = "yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
AC_SUBST(USE_WINDOWS_SSPI, [1])
curl_sspi_msg="yes"
else
AC_MSG_RESULT(no)
AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
fi
Daniel Stenberg
committed
;;
*)
AC_MSG_RESULT(no)
;;
esac ],
AC_MSG_RESULT(no)
)
dnl ************************************************************
dnl disable cryptographic authentication
dnl
AC_MSG_CHECKING([whether to enable cryptographic authentication methods])
AC_ARG_ENABLE(crypto-auth,
AC_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication])
AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication])
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
dnl ************************************************************
dnl disable cookies support
dnl
AC_MSG_CHECKING([whether to enable support for cookies])
AC_ARG_ENABLE(cookies,
AC_HELP_STRING([--enable-cookies],[Enable cookies support])
AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
dnl ************************************************************
dnl Enable hiding of internal symbols in library to reduce its size and
dnl speed dynamic linking of applications. This currently is only supported
dnl on gcc >= 4.0 and SunPro C.
dnl
AC_MSG_CHECKING([whether to enable hidden symbols in the library])
AC_ARG_ENABLE(hidden-symbols,
AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library])
AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
;;
AC_MSG_CHECKING([whether $CC supports it])
if test "$GCC" = yes ; then
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
AC_MSG_RESULT(yes)
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
CFLAGS="$CFLAGS -fvisibility=hidden"
else
AC_MSG_RESULT(no)
fi
else
dnl Test for SunPro cc
if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible])
CFLAGS="$CFLAGS -xldscope=hidden"
else
AC_MSG_RESULT(no)
fi
fi
;;
esac ],
AC_MSG_RESULT(no)
)
Daniel Stenberg
committed
dnl ************************************************************
dnl enforce SONAME bump
dnl
Daniel Stenberg
committed
AC_MSG_CHECKING([whether to enforce SONAME bump])
AC_ARG_ENABLE(soname-bump,
AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump])
AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]),
[ case "$enableval" in
yes) AC_MSG_RESULT(yes)
soname_bump=yes
;;
*)
Daniel Stenberg
committed
;;
esac ],
Daniel Stenberg
committed
AC_MSG_RESULT($soname_bump)
Daniel Stenberg
committed
)
AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes)
dnl ************************************************************
if test ! -z "$winsock_LIB"; then
dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes
dnl things work when built with c-ares). But we can't just move it last
dnl since then other stuff (SSL) won't build. So we simply append it to the
dnl end.
LIBS="$LIBS $winsock_LIB"
TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB"
fi
dnl
dnl All the library dependencies put into $LIB apply to libcurl only.
dnl Those in $CURL_LIBS apply to the curl command-line client only.
Dan Fandrich
committed
dnl Those in $TEST_SERVER_LIBS apply to test servers only.
dnl Those in $ALL_LIBS apply to all targets, including test targets.
dnl
LIBCURL_LIBS=$LIBS
AC_SUBST(LIBCURL_LIBS)
AC_SUBST(CURL_LIBS)
AC_SUBST(TEST_SERVER_LIBS)
Dan Fandrich
committed
LIBS=$ALL_LIBS dnl LIBS is a magic variable that's used for every link
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
Daniel Stenberg
committed
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
dnl
dnl For keeping supported features and protocols also in pkg-config file
dnl since it is more cross-compile frient than curl-config
dnl
if test "x$USE_SSLEAY" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
elif test -n "$SSL_ENABLED"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
fi
if test "@KRB4_ENABLED@" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4"
fi
if test "x$IPV6_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
fi
if test "x$HAVE_LIBZ" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
fi
if test "x$HAVE_ARES" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
fi
if test "x$IDN_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
fi
if test "x$USE_WINDOWS_SSPI" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
fi
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" -o "x$GNUTLS_ENABLED" = "x1"; then
Daniel Stenberg
committed
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
fi
AC_SUBST(SUPPORT_FEATURES)
dnl For supported protocols in pkg-config file
if test "x$CURL_DISABLE_HTTP" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
fi
fi
if test "x$CURL_DISABLE_FTP" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
fi
fi
if test "x$CURL_DISABLE_FILE" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
fi
if test "x$CURL_DISABLE_TELNET" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
fi
if test "x$CURL_DISABLE_LDAP" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
fi
if test "x$CURL_DISABLE_LDAPS" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
fi
if test "x$CURL_DISABLE_DICT" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
fi
if test "x$CURL_DISABLE_TFTP" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
fi
if test "x$USE_LIBSSH2" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
fi
AC_SUBST(SUPPORT_PROTOCOLS)
dnl squeeze whitespace out of some variables
squeeze CFLAGS
squeeze CPPFLAGS
squeeze DEFS
squeeze LDFLAGS
squeeze LIBS
squeeze CURL_LIBS
squeeze LIBCURL_LIBS
squeeze TEST_SERVER_LIBS
if test "x$want_curldebug_assumed" = "xyes" &&
test "x$want_curldebug" = "xyes" && test "x$HAVE_ARES" = "x1"; then
Yang Tse
committed
ac_configure_args="$ac_configure_args --enable-curldebug"
fi
AC_CONFIG_FILES([Makefile \
include/Makefile \
include/curl/Makefile \
src/Makefile \
packages/Makefile \
packages/Win32/Makefile \
packages/Win32/cygwin/Makefile \
packages/Linux/Makefile \
packages/Linux/RPM/Makefile \
packages/Linux/RPM/curl.spec \
packages/Linux/RPM/curl-ssl.spec \
Cris Bailiff
committed
packages/Solaris/Makefile \
packages/EPM/curl.list \
packages/EPM/Makefile \
packages/AIX/Makefile \
packages/AIX/RPM/Makefile \
packages/AIX/RPM/curl.spec \
])
AC_OUTPUT
AC_MSG_NOTICE([Configured to build curl/libcurl:
curl version: ${VERSION}
Host setup: ${host}
Install prefix: ${prefix}
Compiler: ${CC}
SSL support: ${curl_ssl_msg}
SSH support: ${curl_ssh_msg}
zlib support: ${curl_zlib_msg}
krb4 support: ${curl_krb4_msg}
GSSAPI support: ${curl_gss_msg}
c-ares support: ${curl_ares_msg}
ipv6 support: ${curl_ipv6_msg}
Build libcurl: Shared=${enable_shared}, Static=${enable_static}
Verbose errors: ${curl_verbose_msg}
Daniel Stenberg
committed
SSPI support: ${curl_sspi_msg}
Michal Marek
committed
ca cert bundle: ${ca}
ca cert path: ${capath}
Daniel Stenberg
committed
LDAP support: ${curl_ldap_msg}
LDAPS support: ${curl_ldaps_msg}
Daniel Stenberg
committed
if test "x$soname_bump" = "xyes"; then
cat <<EOM
SONAME bump: yes - WARNING: this library will be built with the SONAME
number bumped due to (a detected) ABI breakage.
See lib/README.curl_off_t for details on this.
EOM
fi