123
123
AC_DEFINE(BUILDING_LIBCURL, 1, [when building libcurl itself])
124
124
AC_MSG_RESULT(yes)
125
ļæ½ ļæ½AC_MSG_CHECKING([if we need CURL_STATICLIB])
125
AC_MSG_CHECKING([if we need CURL_STATICLIB])
126
126
if test "X$enable_shared" = "Xno"
128
128
AC_DEFINE(CURL_STATICLIB, 1, [when not building a shared library])
129
129
AC_MSG_RESULT(yes)
131
ļæ½ ļæ½ ļæ½AC_MSG_RESULT(no)
252
252
AC_MSG_RESULT(yes)
254
AC_MSG_CHECKING([whether to support tftp])
256
AC_HELP_STRING([--enable-tftp],[Enable TFTP support])
257
AC_HELP_STRING([--disable-tftp],[Disable TFTP support]),
258
[ case "$enableval" in
261
AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP])
262
AC_SUBST(CURL_DISABLE_TFTP, [1])
264
*) AC_MSG_RESULT(yes)
255
270
dnl **********************************************************************
256
271
dnl Check for built-in manual
567
582
AC_ARG_WITH(krb4,dnl
568
583
AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[
569
584
OPT_KRB4="$withval"
570
if test X"$OPT_KRB4" != Xyes
572
LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff"
573
KRB4LIB="$OPT_KRB4/lib$libsuff"
574
CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
575
KRB4INC="$OPT_KRB4/include"
585
if test X"$OPT_KRB4" != Xno; then
587
if test X"$OPT_KRB4" != Xyes; then
588
LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff"
589
KRB4LIB="$OPT_KRB4/lib$libsuff"
590
CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
591
KRB4INC="$OPT_KRB4/include"
580
596
AC_MSG_CHECKING([if Kerberos4 support is requested])
644
660
AC_ARG_WITH(spnego,
645
661
AC_HELP_STRING([--with-spnego=DIR],
646
[Specify location of SPNEGO library fbopenssl]),
647
[ SPNEGO_ROOT="$withval"
662
[Specify location of SPNEGO library fbopenssl]), [
663
SPNEGO_ROOT="$withval"
664
if test x"$SPNEGO_ROOT" != xno; then
650
669
AC_MSG_CHECKING([if SPNEGO support is requested])
651
670
if test x"$want_spnego" = xyes; then
683
702
AC_ARG_WITH(gssapi-libs,
684
703
AC_HELP_STRING([--with-gssapi-libs=DIR],
685
704
[Specify location of GSSAPI libs]),
686
[ GSSAPI_LIBS="-L$withval -lgssapi"
705
[ GSSAPI_LIBS="-L$withval"
690
709
AC_ARG_WITH(gssapi,
691
710
AC_HELP_STRING([--with-gssapi=DIR],
692
[Where to look for GSSAPI]),
693
[ GSSAPI_ROOT="$withval"
711
[Where to look for GSSAPI]), [
712
GSSAPI_ROOT="$withval"
713
if test x"$GSSAPI_ROOT" != xno; then
718
save_CPPFLAGS="$CPPFLAGS"
697
719
AC_MSG_CHECKING([if GSSAPI support is requested])
698
720
if test x"$want_gss" = xyes; then
699
723
if test -z "$GSSAPI_INCS"; then
700
724
if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
701
725
GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
706
730
CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
708
if test -z "$GSSAPI_LIB_DIR"; then
732
AC_CHECK_HEADER(gss.h,
734
dnl found in the given dirs
735
AC_DEFINE(HAVE_GSSGNU, 1, [if you have the GNU gssapi libraries])
739
dnl not found, check Heimdal
740
AC_CHECK_HEADER(gssapi.h,
742
dnl found in the given dirs
743
AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
746
dnl not found, check in gssapi/ subdir
747
AC_CHECK_HEADER(gssapi/gssapi.h,
750
AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
753
dnl no header found, disabling GSS
755
AC_MSG_WARN(disabling GSSAPI since no header files was found)
765
if test x"$want_gss" = xyes; then
766
AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries])
768
curl_gss_msg="enabled (MIT/Heimdal)"
770
if test -n "$gnu_gss"; then
771
curl_gss_msg="enabled (GNU GSS)"
772
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR -lgss"
773
elif test -z "$GSSAPI_LIB_DIR"; then
709
774
if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
710
775
gss_ldflags=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
711
776
LDFLAGS="$LDFLAGS $gss_ldflags"
715
780
LDFLAGS="$LDFLAGS -lgssapi"
718
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
783
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR -lgssapi"
722
AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries])
724
curl_gss_msg="enabled"
726
AC_CHECK_HEADER(gssapi.h,
728
dnl found in the given dirs
729
AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
732
dnl not found, check in gssapi/ subdir
733
AC_CHECK_HEADER(gssapi/gssapi.h,
735
AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
786
CPPFLAGS="$save_CPPFLAGS"
745
789
dnl **********************************************************************
768
812
dnl only do pkg-config magic when not cross-compiling
771
EXTRA_SSL=/usr/local/ssl ;;
815
PREFIX_OPENSSL=/usr/local/ssl
816
LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
773
819
dnl no --with-ssl option given, just check default places
774
820
if test x$cross_compiling != xyes; then
775
821
dnl only do pkg-config magic when not cross-compiling
780
827
dnl check the given --with-ssl spot
783
LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib$libsuff"
784
CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
829
PREFIX_OPENSSL=$OPT_SSL
830
LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
831
LDFLAGS="$LDFLAGS -L$LIB_OPENSSL"
832
CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
803
851
SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
804
852
SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
854
LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
806
856
dnl use the values pkg-config reported
807
857
LIBS="$LIBS $SSL_LIBS"
808
858
CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
833
883
LIBS="-lcrypto $LIBS"
835
LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib$libsuff"
836
CPPFLAGS="$CLEANCPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
885
LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
886
CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
837
887
AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
839
889
LIBS="-lcrypto $LIBS"], [
920
970
if test "$OPENSSL_ENABLED" = "1"; then
921
dnl when the ssl shared libs were found in a path that the run-time linker
922
dnl doesn't search through, we need to add it to LD_LIBRARY_PATH to
923
dnl prevent further configure tests to fail due to this
924
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$EXTRA_SSL/lib$libsuff"
925
export LD_LIBRARY_PATH
971
if test -n "$LIB_OPENSSL"; then
972
dnl when the ssl shared libs were found in a path that the run-time
973
dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
974
dnl to prevent further configure tests to fail due to this
976
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
977
export LD_LIBRARY_PATH
978
AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
964
1018
dnl ----------------------------------------------------
966
1020
dnl Default to compiler & linker defaults for GnuTLS files & libraries.
969
1023
AC_ARG_WITH(gnutls,dnl
970
1024
AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root (default: /usr/local/)])
974
1028
if test "$OPENSSL_ENABLED" != "1"; then
976
if test X"$OPT_GNUTLS" != Xoff; then
1030
if test X"$OPT_GNUTLS" != Xno; then
977
1031
if test "x$OPT_GNUTLS" = "xyes"; then
978
1032
check=`libgnutls-config --version 2>/dev/null`
979
1033
if test -n "$check"; then
1168
1223
dnl if there is a given path, check that FIRST
1169
1224
if test -n "$LIBIDN"; then
1170
1225
if test "x$LIBIDN" != "xyes"; then
1171
AC_MSG_WARN([moo moo $LIBIDN])
1172
1226
oldLDFLAGS=$LDFLAGS
1173
1227
oldCPPFLAGS=$CPPFLAGS
1174
1228
LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
1290
1344
dnl is there a strerror_r()
1291
1345
CURL_CHECK_STRERROR_R()
1293
AC_CHECK_FUNCS( gmtime_r )
1347
checkfor_gmtime_r="yes"
1350
if test x$cross_compiling != xyes; then
1352
if test x$checkfor_gmtime_r = xyes; then
1354
dnl if gmtime_r was found, verify that it actuall works, as (at least) HPUX
1355
dnl 10.20 is known to have a buggy one. If it doesn't work, disable use of
1358
AC_MSG_CHECKING([if gmtime_r exists and works])
1363
time_t local = 1170352587;
1366
putenv("TZ=CST6CDT");
1368
gmt = gmtime_r(&local, &keeper);
1372
return 1; /* failure */
1375
dnl success, do nothing
1377
AC_DEFINE(HAVE_GMTIME_R, 1, [if you have (a working) gmtime_r])
1379
dnl failure, now disable the function
1382
dnl not invoked when crosscompiling)
1386
dnl and for crosscompilings
1387
AC_CHECK_FUNCS(gmtime_r)
1447
1550
dnl if not found, $ac_func is the name we check for
1552
eval skipcheck=\$skipcheck_$func
1553
if test "x$skipcheck" != "xyes"; then
1449
1554
AC_MSG_CHECKING([deeper for $func])
1450
1555
AC_TRY_LINK( [],
1455
1560
AC_DEFINE_UNQUOTED($def, 1, [If you have $func]),
1456
1561
AC_MSG_RESULT(but still no)
1461
1566
dnl For some reason, the check above doesn't properly detect select() with
1493
1598
#ifdef HAVE_LIBGEN_H
1494
1599
#include <libgen.h>
1601
#ifdef HAVE_UNISTD_H
1606
AC_CHECK_DECL(inet_pton, ,
1607
AC_DEFINE(HAVE_NO_INET_PTON_PROTO, 1,
1608
[Defined if no inet_pton() prototype available]),
1610
#ifdef HAVE_ARPA_INET_H
1611
#include <arpa/inet.h>
1498
1616
AC_MSG_CHECKING([if we are Mac OS X (to disable poll)])
1594
1712
*) AC_MSG_RESULT(yes)
1596
1714
if test "x$IPV6_ENABLED" = "x1"; then
1597
AC_MSG_ERROR([ares doesn't work with ipv6, disable ipv6 to use ares])
1715
AC_MSG_NOTICE([ares may not work properly with ipv6])
1600
1718
AC_DEFINE(USE_ARES, 1, [Define if you want to enable ares support])