]> git.ipfire.org Git - thirdparty/curl.git/blame - configure.in
Initial revision
[thirdparty/curl.git] / configure.in
CommitLineData
ae1912cb
DS
1dnl $Id$
2dnl Process this file with autoconf to produce a configure script.
3AC_INIT(lib/urldata.h)
4AM_CONFIG_HEADER(config.h src/config.h)
5AM_INIT_AUTOMAKE(curl,"6.3.1")
6
7dnl Checks for programs.
8AC_PROG_CC
9AC_PROG_INSTALL
10AC_PROG_MAKE_SET
11
12dnl Check for AIX weirdos
13AC_AIX
14
15dnl **********************************************************************
16dnl Checks for libraries.
17dnl **********************************************************************
18
19dnl nsl lib?
20AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname))
21
22dnl resolve lib?
23AC_CHECK_FUNC(strcasecmp, , AC_CHECK_LIB(resolve, strcasecmp))
24
25dnl socket lib?
26AC_CHECK_FUNC(connect, , AC_CHECK_LIB(socket, connect))
27
28dnl ucb lib?
29AC_CHECK_FUNC(gethostname, , AC_CHECK_LIB(ucb, gethostname))
30
31dnl dl lib?
32AC_CHECK_FUNC(dlopen, , AC_CHECK_LIB(dl, dlopen))
33
34dnl **********************************************************************
35dnl Check for the presence of SSL libraries and headers
36dnl **********************************************************************
37
38dnl Default to compiler & linker defaults for SSL files & libraries.
39OPT_SSL=off
40AC_ARG_WITH(ssl,dnl
41[ --with-ssl[=DIR] where to look for SSL [compiler/linker default paths]
42 DIR points to the SSL installation [/usr/local/ssl]],
43 OPT_SSL=$withval
44)
45
46if test X"$OPT_SSL" = Xno
47then
48 AC_MSG_WARN(SSL/https support disabled)
49else
50
51 dnl Check for & handle argument to --with-ssl.
52
53 AC_MSG_CHECKING(where to look for SSL)
54 if test X"$OPT_SSL" = Xoff
55 then
56 AC_MSG_RESULT([defaults (or given in environment)])
57 else
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])
62 fi
63
64 dnl check for crypto libs (part of SSLeay)
65 AC_CHECK_LIB(crypto, CRYPTO_lock)
66
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)
71
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)
74
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)
77 fi
78
79 fi
80fi
81
82dnl **********************************************************************
83dnl Check for the presence of ZLIB libraries and headers
84dnl **********************************************************************
85
86dnl Default to compiler & linker defaults for files & libraries.
87dnl OPT_ZLIB=no
88dnl AC_ARG_WITH(zlib,dnl
89dnl [ --with-zlib[=DIR] where to look for ZLIB [compiler/linker default paths]
90dnl DIR points to the ZLIB installation prefix [/usr/local]],
91dnl OPT_ZLIB=$withval,
92dnl )
93
94dnl Check for & handle argument to --with-zlib.
95dnl
96dnl NOTE: We *always* look for ZLIB headers & libraries, all this option
97dnl does is change where we look (by adjusting LIBS and CPPFLAGS.)
98dnl
99
100dnl AC_MSG_CHECKING(where to look for ZLIB)
101dnl if test X"$OPT_ZLIB" = Xno
102dnl then
103dnl AC_MSG_RESULT([defaults (or given in environment)])
104dnl else
105dnl test X"$OPT_ZLIB" = Xyes && OPT_ZLIB=/usr/local
106dnl LIBS="$LIBS -L$OPT_ZLIB/lib"
107dnl CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
108dnl AC_MSG_RESULT([$OPT_ZLIB])
109dnl fi
110
111dnl z lib?
112dnl AC_CHECK_FUNC(gzread, , AC_CHECK_LIB(z, gzread))
113
114dnl **********************************************************************
115dnl Back to "normal" configuring
116dnl **********************************************************************
117
118dnl Checks for header files.
119AC_HEADER_STDC
120AC_CHECK_HEADERS( \
121 unistd.h \
122 arpa/inet.h \
123 net/if.h \
124 netinet/in.h \
125 netdb.h \
126 sys/select.h \
127 sys/socket.h \
128 sys/sockio.h \
129 sys/stat.h \
130 sys/types.h \
131 getopt.h \
132 sys/param.h \
133 termios.h \
134 termio.h \
135 sgtty.h \
136 fcntl.h \
137 dlfcn.h \
138 alloca.h \
139 winsock.h \
140 time.h \
141 io.h \
142)
143
144dnl Check for libz header
145dnl AC_CHECK_HEADERS(zlib.h)
146
147dnl Checks for typedefs, structures, and compiler characteristics.
148AC_C_CONST
149AC_TYPE_SIZE_T
150AC_HEADER_TIME
151
152# mprintf() checks:
153
154# check for 'long double'
155AC_CHECK_SIZEOF(long double, 8)
156# check for 'long long'
157AC_CHECK_SIZEOF(long long, 4)
158
159dnl Get system canonical name
160AC_CANONICAL_HOST
161AC_DEFINE_UNQUOTED(OS, "${host}")
162
163dnl Checks for library functions.
164dnl AC_PROG_GCC_TRADITIONAL
165AC_TYPE_SIGNAL
166AC_FUNC_VPRINTF
167AC_CHECK_FUNCS( socket \
168 select \
169 strdup \
170 strstr \
171 strftime \
172 uname \
173 strcasecmp \
174 gethostname \
175 gethostbyaddr \
176 getservbyname \
177 gettimeofday \
178 inet_addr \
179 inet_ntoa \
180 tcsetattr \
181 tcgetattr \
182 perror \
183 getpass \
184 closesocket
185)
186
187
188
189AC_PATH_PROG( PERL, perl, ,
190 $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
191AC_SUBST(PERL)
192
193AC_PATH_PROGS( NROFF, nroff gnroff, ,
194 $PATH:/usr/bin/:/usr/local/bin )
195AC_SUBST(NROFF)
196
197AC_PROG_RANLIB
198AC_PROG_YACC
199
200dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib,
201dnl $PATH:/usr/bin/:/usr/local/bin )
202dnl AC_SUBST(RANLIB)
203
204AC_OUTPUT( Makefile \
205 src/Makefile \
206 lib/Makefile \
207 perl/checklinks.pl \
208 perl/getlinks.pl \
209 perl/formfind.pl \
210 perl/recursiveftpget.pl )