1 dnl $Id: configure.in,v 1.1.1.1 1999-12-29 14:20:35 bagder Exp $
2 dnl Process this file with autoconf to produce a configure script.
4 AM_CONFIG_HEADER(config.h src/config.h)
5 AM_INIT_AUTOMAKE(curl,"6.3.1")
7 dnl Checks for programs.
12 dnl Check for AIX weirdos
15 dnl **********************************************************************
16 dnl Checks for libraries.
17 dnl **********************************************************************
20 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname))
23 AC_CHECK_FUNC(strcasecmp, , AC_CHECK_LIB(resolve, strcasecmp))
26 AC_CHECK_FUNC(connect, , AC_CHECK_LIB(socket, connect))
29 AC_CHECK_FUNC(gethostname, , AC_CHECK_LIB(ucb, gethostname))
32 AC_CHECK_FUNC(dlopen, , AC_CHECK_LIB(dl, dlopen))
34 dnl **********************************************************************
35 dnl Check for the presence of SSL libraries and headers
36 dnl **********************************************************************
38 dnl Default to compiler & linker defaults for SSL files & libraries.
41 [ --with-ssl[=DIR] where to look for SSL [compiler/linker default paths]
42 DIR points to the SSL installation [/usr/local/ssl]],
46 if test X"$OPT_SSL" = Xno
48 AC_MSG_WARN(SSL/https support disabled)
51 dnl Check for & handle argument to --with-ssl.
53 AC_MSG_CHECKING(where to look for SSL)
54 if test X"$OPT_SSL" = Xoff
56 AC_MSG_RESULT([defaults (or given in environment)])
58 test X"$OPT_SSL" = Xyes && OPT_SSL=/usr/local/ssl
59 LIBS="$LIBS -L$OPT_SSL/lib"
60 CPPFLAGS="$CPPFLAGS -I$OPT_SSL/include/openssl -I$OPT_SSL/include"
61 AC_MSG_RESULT([$OPT_SSL])
64 dnl check for crypto libs (part of SSLeay)
65 AC_CHECK_LIB(crypto, CRYPTO_lock)
67 if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then
68 dnl This is only reasonable to do if crypto actually is there: check for
69 dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
70 AC_CHECK_LIB(ssl, SSL_connect)
72 dnl Check for SSLeay headers
73 AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h openssl/pem.h openssl/ssl.h openssl/err.h)
75 if test $ac_cv_header_openssl_x509_h = no; then
76 AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
82 dnl **********************************************************************
83 dnl Check for the presence of ZLIB libraries and headers
84 dnl **********************************************************************
86 dnl Default to compiler & linker defaults for files & libraries.
88 dnl AC_ARG_WITH(zlib,dnl
89 dnl [ --with-zlib[=DIR] where to look for ZLIB [compiler/linker default paths]
90 dnl DIR points to the ZLIB installation prefix [/usr/local]],
91 dnl OPT_ZLIB=$withval,
94 dnl Check for & handle argument to --with-zlib.
96 dnl NOTE: We *always* look for ZLIB headers & libraries, all this option
97 dnl does is change where we look (by adjusting LIBS and CPPFLAGS.)
100 dnl AC_MSG_CHECKING(where to look for ZLIB)
101 dnl if test X"$OPT_ZLIB" = Xno
103 dnl AC_MSG_RESULT([defaults (or given in environment)])
105 dnl test X"$OPT_ZLIB" = Xyes && OPT_ZLIB=/usr/local
106 dnl LIBS="$LIBS -L$OPT_ZLIB/lib"
107 dnl CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
108 dnl AC_MSG_RESULT([$OPT_ZLIB])
112 dnl AC_CHECK_FUNC(gzread, , AC_CHECK_LIB(z, gzread))
114 dnl **********************************************************************
115 dnl Back to "normal" configuring
116 dnl **********************************************************************
118 dnl Checks for header files.
144 dnl Check for libz header
145 dnl AC_CHECK_HEADERS(zlib.h)
147 dnl Checks for typedefs, structures, and compiler characteristics.
154 # check for 'long double'
155 AC_CHECK_SIZEOF(long double, 8)
156 # check for 'long long'
157 AC_CHECK_SIZEOF(long long, 4)
159 dnl Get system canonical name
161 AC_DEFINE_UNQUOTED(OS, "${host}")
163 dnl Checks for library functions.
164 dnl AC_PROG_GCC_TRADITIONAL
167 AC_CHECK_FUNCS( socket \
189 AC_PATH_PROG( PERL, perl, ,
190 $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
193 AC_PATH_PROGS( NROFF, nroff gnroff, ,
194 $PATH:/usr/bin/:/usr/local/bin )
200 dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib,
201 dnl $PATH:/usr/bin/:/usr/local/bin )
204 AC_OUTPUT( Makefile \
210 perl/recursiveftpget.pl )