]>
Commit | Line | Data |
---|---|---|
d551412a DS |
1 | #*************************************************************************** |
2 | # _ _ ____ _ | |
3 | # Project ___| | | | _ \| | | |
4 | # / __| | | | |_) | | | |
5 | # | (__| |_| | _ <| |___ | |
6 | # \___|\___/|_| \_\_____| | |
7 | # | |
35e1d653 | 8 | # Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. |
d551412a DS |
9 | # |
10 | # This software is licensed as described in the file COPYING, which | |
11 | # you should have received as part of this distribution. The terms | |
12 | # are also available at http://curl.haxx.se/docs/copyright.html. | |
13 | # | |
14 | # You may opt to use, copy, modify, merge, publish, distribute and/or sell | |
15 | # copies of the Software, and permit persons to whom the Software is | |
16 | # furnished to do so, under the terms of the COPYING file. | |
17 | # | |
18 | # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | |
19 | # KIND, either express or implied. | |
20 | # | |
b377e857 | 21 | #*************************************************************************** |
ae1912cb | 22 | dnl Process this file with autoconf to produce a configure script. |
7349940b | 23 | |
a147a079 | 24 | AC_PREREQ(2.57) |
7349940b | 25 | |
380ed8be | 26 | dnl We don't know the version number "statically" so we use a dash here |
d0dea8f8 | 27 | AC_INIT([curl], [-], [a suitable curl mailing list: http://curl.haxx.se/mail/]) |
d5ba0309 | 28 | |
3f01d9a0 YT |
29 | CURL_OVERRIDE_AUTOCONF |
30 | ||
d5ba0309 | 31 | dnl configure script copyright |
8a26a8d8 | 32 | AC_COPYRIGHT([Copyright (c) 1998 - 2011 Daniel Stenberg, <daniel@haxx.se> |
e16c1b8e | 33 | This configure script may be copied, distributed and modified under the |
d5ba0309 DS |
34 | terms of the curl license; see COPYING for more details]) |
35 | ||
93c53424 | 36 | AC_CONFIG_SRCDIR([lib/urldata.h]) |
f671d051 | 37 | AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h) |
4913a08c | 38 | AC_CONFIG_MACRO_DIR([m4]) |
ed29552b | 39 | AM_MAINTAINER_MODE |
8f5ffd94 | 40 | |
2245ac2f | 41 | CURL_CHECK_OPTION_DEBUG |
d930280a | 42 | CURL_CHECK_OPTION_OPTIMIZE |
2245ac2f | 43 | CURL_CHECK_OPTION_WARNINGS |
d6981cb5 | 44 | CURL_CHECK_OPTION_WERROR |
065047dc | 45 | CURL_CHECK_OPTION_CURLDEBUG |
22ed0f50 | 46 | CURL_CHECK_OPTION_ARES |
2245ac2f | 47 | |
f49427d3 | 48 | CURL_CHECK_PATH_SEPARATOR_REQUIRED |
4e4b6de5 | 49 | |
f7f76e17 CJ |
50 | # |
51 | # save the configure arguments | |
52 | # | |
53 | CONFIGURE_OPTIONS="\"$ac_configure_args\"" | |
54 | AC_SUBST(CONFIGURE_OPTIONS) | |
55 | ||
d6981cb5 | 56 | CURL_CFLAG_EXTRAS="" |
5393f08d | 57 | if test X"$want_werror" = Xyes; then |
d6981cb5 BG |
58 | CURL_CFLAG_EXTRAS="-Werror" |
59 | fi | |
60 | AC_SUBST(CURL_CFLAG_EXTRAS) | |
61 | ||
0b57c475 | 62 | dnl SED is mandatory for configure process and libtool. |
d2661cb4 | 63 | dnl Set it now, allowing it to be changed later. |
241b704e DS |
64 | if test -z "$SED"; then |
65 | dnl allow it to be overridden | |
66 | AC_PATH_PROG([SED], [sed], [not_found], | |
67 | [$PATH:/usr/bin:/usr/local/bin]) | |
68 | if test -z "$SED" || test "$SED" = "not_found"; then | |
69 | AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.]) | |
70 | fi | |
bfaab6ed | 71 | fi |
817efbc2 | 72 | AC_SUBST([SED]) |
075c5342 | 73 | |
0b57c475 | 74 | dnl GREP is mandatory for configure process and libtool. |
d2661cb4 | 75 | dnl Set it now, allowing it to be changed later. |
241b704e DS |
76 | if test -z "$GREP"; then |
77 | dnl allow it to be overridden | |
78 | AC_PATH_PROG([GREP], [grep], [not_found], | |
79 | [$PATH:/usr/bin:/usr/local/bin]) | |
80 | if test -z "$GREP" || test "$GREP" = "not_found"; then | |
81 | AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.]) | |
82 | fi | |
0b57c475 | 83 | fi |
817efbc2 | 84 | AC_SUBST([GREP]) |
0b57c475 YT |
85 | |
86 | dnl EGREP is mandatory for configure process and libtool. | |
d2661cb4 | 87 | dnl Set it now, allowing it to be changed later. |
241b704e DS |
88 | if test -z "$EGREP"; then |
89 | dnl allow it to be overridden | |
90 | if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then | |
91 | AC_MSG_CHECKING([for egrep]) | |
92 | EGREP="$GREP -E" | |
93 | AC_MSG_RESULT([$EGREP]) | |
94 | else | |
95 | AC_PATH_PROG([EGREP], [egrep], [not_found], | |
96 | [$PATH:/usr/bin:/usr/local/bin]) | |
97 | fi | |
3fc39a6e | 98 | fi |
0b57c475 YT |
99 | if test -z "$EGREP" || test "$EGREP" = "not_found"; then |
100 | AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.]) | |
101 | fi | |
817efbc2 | 102 | AC_SUBST([EGREP]) |
3fc39a6e | 103 | |
0b57c475 | 104 | dnl AR is mandatory for configure process and libtool. |
21af9bf1 | 105 | dnl This is target dependent, so check it as a tool. |
241b704e DS |
106 | if test -z "$AR"; then |
107 | dnl allow it to be overridden | |
108 | AC_PATH_TOOL([AR], [ar], [not_found], | |
109 | [$PATH:/usr/bin:/usr/local/bin]) | |
110 | if test -z "$AR" || test "$AR" = "not_found"; then | |
111 | AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.]) | |
112 | fi | |
3fc39a6e | 113 | fi |
817efbc2 | 114 | AC_SUBST([AR]) |
0b57c475 | 115 | |
faaaf626 | 116 | AC_SUBST(libext) |
9f7c6341 | 117 | |
f9e55c99 YT |
118 | dnl Remove non-configure distributed curlbuild.h |
119 | if test -f ${srcdir}/include/curl/curlbuild.h; then | |
120 | rm -f ${srcdir}/include/curl/curlbuild.h | |
121 | fi | |
122 | ||
7349940b | 123 | dnl figure out the libcurl version |
0355e33b | 124 | CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h` |
511f491c | 125 | AM_INIT_AUTOMAKE |
075c5342 | 126 | AC_MSG_CHECKING([curl version]) |
0355e33b | 127 | AC_MSG_RESULT($CURLVERSION) |
caf8c01e | 128 | |
ee4c1206 DS |
129 | AC_SUBST(CURLVERSION) |
130 | ||
1e5e0f9a DS |
131 | dnl |
132 | dnl we extract the numerical version for curl-config only | |
593170d1 | 133 | VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h` |
1e5e0f9a DS |
134 | AC_SUBST(VERSIONNUM) |
135 | ||
c503930b CB |
136 | dnl Solaris pkgadd support definitions |
137 | PKGADD_PKG="HAXXcurl" | |
138 | PKGADD_NAME="cURL - a client that groks URLs" | |
139 | PKGADD_VENDOR="curl.haxx.se" | |
140 | AC_SUBST(PKGADD_PKG) | |
141 | AC_SUBST(PKGADD_NAME) | |
142 | AC_SUBST(PKGADD_VENDOR) | |
143 | ||
cff90cf3 | 144 | dnl |
710e370c | 145 | dnl initialize all the info variables |
9e60d8fd | 146 | curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls} )" |
2147284c | 147 | curl_ssh_msg="no (--with-libssh2)" |
710e370c DS |
148 | curl_zlib_msg="no (--with-zlib)" |
149 | curl_krb4_msg="no (--with-krb4*)" | |
150 | curl_gss_msg="no (--with-gssapi)" | |
151 | curl_spnego_msg="no (--with-spnego)" | |
59cf93cc | 152 | curl_tls_srp_msg="no (--enable-tls-srp)" |
79dc74e8 | 153 | curl_res_msg="default (--enable-ares / --enable-threaded-resolver)" |
710e370c DS |
154 | curl_ipv6_msg="no (--enable-ipv6)" |
155 | curl_idn_msg="no (--with-libidn)" | |
156 | curl_manual_msg="no (--enable-manual)" | |
157 | curl_verbose_msg="enabled (--disable-verbose)" | |
8ed31c48 | 158 | curl_sspi_msg="no (--enable-sspi)" |
d0edb478 | 159 | curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)" |
4b60c3e9 | 160 | curl_ldaps_msg="no (--enable-ldaps)" |
4a8a7314 | 161 | curl_rtsp_msg="no (--enable-rtsp)" |
04cb15ae | 162 | curl_rtmp_msg="no (--with-librtmp)" |
108d7693 | 163 | init_ssl_msg=${curl_ssl_msg} |
c503930b | 164 | |
a0a47f27 DF |
165 | dnl |
166 | dnl Save anything in $LIBS for later | |
167 | dnl | |
168 | ALL_LIBS=$LIBS | |
169 | ||
caf8c01e DS |
170 | dnl |
171 | dnl Detect the canonical host and target build environment | |
172 | dnl | |
ae1912cb | 173 | |
c77f77a1 | 174 | AC_CANONICAL_HOST |
93c53424 | 175 | dnl Get system canonical name |
22a32389 | 176 | AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) |
1b1f143c | 177 | |
93c53424 | 178 | dnl Checks for programs. |
d930280a | 179 | CURL_CHECK_PROG_CC |
93c53424 | 180 | |
14240e9e YT |
181 | dnl Our curl_off_t internal and external configure settings |
182 | CURL_CONFIGURE_CURL_OFF_T | |
183 | ||
b4fdccf8 YT |
184 | dnl This defines _ALL_SOURCE for AIX |
185 | CURL_CHECK_AIX_ALL_SOURCE | |
186 | ||
1bc49007 | 187 | dnl Our configure and build reentrant settings |
1cbc93fb | 188 | CURL_CONFIGURE_THREAD_SAFE |
052f9dde | 189 | CURL_CONFIGURE_REENTRANT |
1bc49007 | 190 | |
d4ffc5ef | 191 | dnl check for how to do large files |
1b1f143c | 192 | AC_SYS_LARGEFILE |
d4ffc5ef | 193 | |
c84f84c7 | 194 | dnl support building of Windows DLLs |
1e8f0c57 DS |
195 | AC_LIBTOOL_WIN32_DLL |
196 | ||
6cea5158 DF |
197 | dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD |
198 | AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)]) | |
74befdfb | 199 | case $host in |
6cea5158 | 200 | x86_64*linux*|amd64*freebsd*|ia64*freebsd*) |
74befdfb YT |
201 | AC_MSG_RESULT([yes]) |
202 | with_pic=yes | |
203 | ;; | |
204 | *) | |
205 | AC_MSG_RESULT([no]) | |
206 | ;; | |
207 | esac | |
208 | ||
19f79e5a YT |
209 | AC_MSG_CHECKING([if compiler is icc (to build with PIC)]) |
210 | case $CC in | |
211 | icc | */icc) | |
212 | AC_MSG_RESULT([yes]) | |
213 | with_pic=yes | |
214 | ;; | |
215 | *) | |
216 | AC_MSG_RESULT([no]) | |
217 | ;; | |
218 | esac | |
219 | ||
1e8f0c57 | 220 | dnl libtool setup |
d20a0516 | 221 | AC_PROG_LIBTOOL |
93c53424 | 222 | |
fcfc6de9 | 223 | AC_MSG_CHECKING([if we need -mimpure-text]) |
5ab9d72e | 224 | mimpure=no |
fcfc6de9 DS |
225 | case $host in |
226 | *-*-solaris2*) | |
227 | if test "$GCC" = "yes"; then | |
228 | mimpure="yes" | |
229 | fi | |
230 | ;; | |
231 | *) | |
fcfc6de9 DS |
232 | ;; |
233 | esac | |
234 | AC_MSG_RESULT($mimpure) | |
235 | AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes) | |
157e6d4e DS |
236 | |
237 | dnl 'STATICLIB' is, in spite of its name, not generic but only for static-only | |
238 | dnl builds on Windows | |
bff96239 | 239 | AM_CONDITIONAL(STATICLIB, false) |
fcfc6de9 | 240 | |
4d815c99 DS |
241 | AC_MSG_CHECKING([if we need BUILDING_LIBCURL]) |
242 | case $host in | |
243 | *-*-mingw*) | |
244 | AC_DEFINE(BUILDING_LIBCURL, 1, [when building libcurl itself]) | |
245 | AC_MSG_RESULT(yes) | |
b29017f1 | 246 | AC_MSG_CHECKING([if we need CURL_STATICLIB]) |
0bb04082 DS |
247 | if test "X$enable_shared" = "Xno" |
248 | then | |
249 | AC_DEFINE(CURL_STATICLIB, 1, [when not building a shared library]) | |
250 | AC_MSG_RESULT(yes) | |
bff96239 | 251 | AM_CONDITIONAL(STATICLIB, true) |
b29017f1 DS |
252 | else |
253 | AC_MSG_RESULT(no) | |
0bb04082 | 254 | fi |
4d815c99 DS |
255 | ;; |
256 | *) | |
257 | AC_MSG_RESULT(no) | |
258 | ;; | |
259 | esac | |
260 | ||
9de4e5eb DF |
261 | # Determine whether all dependent libraries must be specified when linking |
262 | if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno" | |
263 | then | |
264 | REQUIRE_LIB_DEPS=no | |
265 | else | |
266 | REQUIRE_LIB_DEPS=yes | |
267 | fi | |
268 | AC_SUBST(REQUIRE_LIB_DEPS) | |
269 | ||
d1a1fcc6 DS |
270 | dnl The install stuff has already been taken care of by the automake stuff |
271 | dnl AC_PROG_INSTALL | |
ae1912cb DS |
272 | AC_PROG_MAKE_SET |
273 | ||
375cdf89 DS |
274 | dnl check if there's a way to force code inline |
275 | AC_C_INLINE | |
276 | ||
33ddeb6d YT |
277 | dnl ********************************************************************** |
278 | dnl platform/compiler/architecture specific checks/flags | |
279 | dnl ********************************************************************** | |
280 | ||
2245ac2f | 281 | CURL_CHECK_COMPILER |
d930280a YT |
282 | CURL_SET_COMPILER_BASIC_OPTS |
283 | CURL_SET_COMPILER_DEBUG_OPTS | |
284 | CURL_SET_COMPILER_OPTIMIZE_OPTS | |
285 | CURL_SET_COMPILER_WARNING_OPTS | |
9f8c40ed | 286 | |
19f79e5a | 287 | if test "$compiler_id" = "INTEL_UNIX_C"; then |
1054dc5e | 288 | # |
19f79e5a YT |
289 | if test "$compiler_num" -ge "1000"; then |
290 | dnl icc 10.X or later | |
291 | CFLAGS="$CFLAGS -shared-intel" | |
292 | elif test "$compiler_num" -ge "900"; then | |
293 | dnl icc 9.X specific | |
294 | CFLAGS="$CFLAGS -i-dynamic" | |
295 | fi | |
1054dc5e | 296 | # |
19f79e5a | 297 | fi |
9f8c40ed | 298 | |
2c61e9c7 YT |
299 | CURL_CHECK_COMPILER_HALT_ON_ERROR |
300 | CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE | |
301 | ||
065047dc YT |
302 | CURL_CHECK_NO_UNDEFINED |
303 | AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes) | |
304 | ||
305 | CURL_CHECK_CURLDEBUG | |
306 | AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes) | |
307 | ||
aa76dec3 YT |
308 | AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_curldebug = xyes) |
309 | ||
2c61e9c7 YT |
310 | dnl ********************************************************************** |
311 | dnl Compilation based checks should not be done before this point. | |
312 | dnl ********************************************************************** | |
313 | ||
314 | dnl ********************************************************************** | |
315 | dnl Make sure that our checks for headers windows.h winsock.h winsock2.h | |
316 | dnl and ws2tcpip.h take precedence over any other further checks which | |
317 | dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for | |
318 | dnl this specific header files. And do them before its results are used. | |
319 | dnl ********************************************************************** | |
320 | ||
321 | CURL_CHECK_HEADER_WINDOWS | |
322 | CURL_CHECK_NATIVE_WINDOWS | |
323 | case X-"$ac_cv_native_windows" in | |
324 | X-yes) | |
325 | CURL_CHECK_HEADER_WINSOCK | |
326 | CURL_CHECK_HEADER_WINSOCK2 | |
327 | CURL_CHECK_HEADER_WS2TCPIP | |
328 | CURL_CHECK_HEADER_WINLDAP | |
329 | CURL_CHECK_HEADER_WINBER | |
330 | ;; | |
331 | *) | |
332 | ac_cv_header_winsock_h="no" | |
333 | ac_cv_header_winsock2_h="no" | |
334 | ac_cv_header_ws2tcpip_h="no" | |
335 | ac_cv_header_winldap_h="no" | |
336 | ac_cv_header_winber_h="no" | |
337 | ;; | |
338 | esac | |
fef60d9d | 339 | CURL_CHECK_WIN32_LARGEFILE |
2c61e9c7 | 340 | |
fd3881ea DS |
341 | dnl ************************************************************ |
342 | dnl switch off particular protocols | |
343 | dnl | |
344 | AC_MSG_CHECKING([whether to support http]) | |
345 | AC_ARG_ENABLE(http, | |
f136f435 DS |
346 | AC_HELP_STRING([--enable-http],[Enable HTTP support]) |
347 | AC_HELP_STRING([--disable-http],[Disable HTTP support]), | |
fd3881ea DS |
348 | [ case "$enableval" in |
349 | no) | |
350 | AC_MSG_RESULT(no) | |
22a32389 | 351 | AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP]) |
4a8a7314 | 352 | AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP]) |
3955b313 | 353 | AC_SUBST(CURL_DISABLE_HTTP, [1]) |
4a8a7314 YT |
354 | AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP]) |
355 | AC_SUBST(CURL_DISABLE_RTSP, [1]) | |
fd3881ea DS |
356 | ;; |
357 | *) AC_MSG_RESULT(yes) | |
358 | ;; | |
359 | esac ], | |
360 | AC_MSG_RESULT(yes) | |
361 | ) | |
362 | AC_MSG_CHECKING([whether to support ftp]) | |
363 | AC_ARG_ENABLE(ftp, | |
f136f435 DS |
364 | AC_HELP_STRING([--enable-ftp],[Enable FTP support]) |
365 | AC_HELP_STRING([--disable-ftp],[Disable FTP support]), | |
fd3881ea DS |
366 | [ case "$enableval" in |
367 | no) | |
368 | AC_MSG_RESULT(no) | |
22a32389 | 369 | AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP]) |
3955b313 | 370 | AC_SUBST(CURL_DISABLE_FTP, [1]) |
fd3881ea DS |
371 | ;; |
372 | *) AC_MSG_RESULT(yes) | |
373 | ;; | |
374 | esac ], | |
375 | AC_MSG_RESULT(yes) | |
376 | ) | |
fd3881ea DS |
377 | AC_MSG_CHECKING([whether to support file]) |
378 | AC_ARG_ENABLE(file, | |
f136f435 DS |
379 | AC_HELP_STRING([--enable-file],[Enable FILE support]) |
380 | AC_HELP_STRING([--disable-file],[Disable FILE support]), | |
fd3881ea DS |
381 | [ case "$enableval" in |
382 | no) | |
383 | AC_MSG_RESULT(no) | |
22a32389 | 384 | AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE]) |
3955b313 | 385 | AC_SUBST(CURL_DISABLE_FILE, [1]) |
fd3881ea DS |
386 | ;; |
387 | *) AC_MSG_RESULT(yes) | |
388 | ;; | |
389 | esac ], | |
390 | AC_MSG_RESULT(yes) | |
391 | ) | |
392 | AC_MSG_CHECKING([whether to support ldap]) | |
393 | AC_ARG_ENABLE(ldap, | |
f136f435 DS |
394 | AC_HELP_STRING([--enable-ldap],[Enable LDAP support]) |
395 | AC_HELP_STRING([--disable-ldap],[Disable LDAP support]), | |
fd3881ea DS |
396 | [ case "$enableval" in |
397 | no) | |
398 | AC_MSG_RESULT(no) | |
22a32389 | 399 | AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) |
3955b313 | 400 | AC_SUBST(CURL_DISABLE_LDAP, [1]) |
fd3881ea | 401 | ;; |
a674654f | 402 | *) |
43d20d81 | 403 | AC_MSG_RESULT(yes) |
fd3881ea | 404 | ;; |
a674654f | 405 | esac ],[ |
43d20d81 | 406 | AC_MSG_RESULT(yes) ] |
fd3881ea | 407 | ) |
4b60c3e9 GK |
408 | AC_MSG_CHECKING([whether to support ldaps]) |
409 | AC_ARG_ENABLE(ldaps, | |
410 | AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support]) | |
411 | AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]), | |
412 | [ case "$enableval" in | |
413 | no) | |
414 | AC_MSG_RESULT(no) | |
415 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) | |
416 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
417 | ;; | |
e1c2c9be YT |
418 | *) if test "x$CURL_DISABLE_LDAP" = "x1" ; then |
419 | AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS) | |
420 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) | |
421 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
4b60c3e9 | 422 | else |
e1c2c9be YT |
423 | AC_MSG_RESULT(yes) |
424 | AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation]) | |
425 | AC_SUBST(HAVE_LDAP_SSL, [1]) | |
4b60c3e9 GK |
426 | fi |
427 | ;; | |
e1c2c9be YT |
428 | esac ],[ |
429 | if test "x$CURL_DISABLE_LDAP" = "x1" ; then | |
430 | AC_MSG_RESULT(no) | |
431 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) | |
432 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
433 | else | |
434 | AC_MSG_RESULT(yes) | |
435 | AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation]) | |
436 | AC_SUBST(HAVE_LDAP_SSL, [1]) | |
e1c2c9be | 437 | fi ] |
4b60c3e9 GK |
438 | ) |
439 | ||
bc4582b6 DS |
440 | AC_MSG_CHECKING([whether to support rtsp]) |
441 | AC_ARG_ENABLE(rtsp, | |
442 | AC_HELP_STRING([--enable-rtsp],[Enable RTSP support]) | |
443 | AC_HELP_STRING([--disable-rtsp],[Disable RTSP support]), | |
444 | [ case "$enableval" in | |
445 | no) | |
446 | AC_MSG_RESULT(no) | |
447 | AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP]) | |
448 | AC_SUBST(CURL_DISABLE_RTSP, [1]) | |
449 | ;; | |
c047fe8e DS |
450 | *) if test x$CURL_DISABLE_HTTP = x1 ; then |
451 | AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!) | |
452 | else | |
453 | AC_MSG_RESULT(yes) | |
454 | curl_rtsp_msg="enabled" | |
455 | fi | |
bc4582b6 | 456 | ;; |
4a8a7314 YT |
457 | esac ], |
458 | if test "x$CURL_DISABLE_HTTP" != "x1"; then | |
459 | AC_MSG_RESULT(yes) | |
460 | curl_rtsp_msg="enabled" | |
461 | else | |
462 | AC_MSG_RESULT(no) | |
463 | fi | |
bc4582b6 DS |
464 | ) |
465 | ||
6f8d4397 | 466 | AC_MSG_CHECKING([whether to support proxies]) |
f3ab5d55 DS |
467 | AC_ARG_ENABLE(proxy, |
468 | AC_HELP_STRING([--enable-proxy],[Enable proxy support]) | |
469 | AC_HELP_STRING([--disable-proxy],[Disable proxy support]), | |
470 | [ case "$enableval" in | |
471 | no) | |
472 | AC_MSG_RESULT(no) | |
473 | AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies]) | |
474 | AC_SUBST(CURL_DISABLE_PROXY, [1]) | |
475 | ;; | |
476 | *) AC_MSG_RESULT(yes) | |
477 | ;; | |
478 | esac ], | |
479 | AC_MSG_RESULT(yes) | |
480 | ) | |
481 | ||
fd3881ea DS |
482 | AC_MSG_CHECKING([whether to support dict]) |
483 | AC_ARG_ENABLE(dict, | |
f136f435 DS |
484 | AC_HELP_STRING([--enable-dict],[Enable DICT support]) |
485 | AC_HELP_STRING([--disable-dict],[Disable DICT support]), | |
fd3881ea DS |
486 | [ case "$enableval" in |
487 | no) | |
488 | AC_MSG_RESULT(no) | |
b9c60df0 | 489 | AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT]) |
3955b313 | 490 | AC_SUBST(CURL_DISABLE_DICT, [1]) |
fd3881ea DS |
491 | ;; |
492 | *) AC_MSG_RESULT(yes) | |
493 | ;; | |
494 | esac ], | |
495 | AC_MSG_RESULT(yes) | |
496 | ) | |
497 | AC_MSG_CHECKING([whether to support telnet]) | |
498 | AC_ARG_ENABLE(telnet, | |
f136f435 DS |
499 | AC_HELP_STRING([--enable-telnet],[Enable TELNET support]) |
500 | AC_HELP_STRING([--disable-telnet],[Disable TELNET support]), | |
fd3881ea DS |
501 | [ case "$enableval" in |
502 | no) | |
503 | AC_MSG_RESULT(no) | |
22a32389 | 504 | AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET]) |
3955b313 | 505 | AC_SUBST(CURL_DISABLE_TELNET, [1]) |
fd3881ea DS |
506 | ;; |
507 | *) AC_MSG_RESULT(yes) | |
508 | ;; | |
509 | esac ], | |
510 | AC_MSG_RESULT(yes) | |
511 | ) | |
56d9624b DS |
512 | AC_MSG_CHECKING([whether to support tftp]) |
513 | AC_ARG_ENABLE(tftp, | |
514 | AC_HELP_STRING([--enable-tftp],[Enable TFTP support]) | |
515 | AC_HELP_STRING([--disable-tftp],[Disable TFTP support]), | |
516 | [ case "$enableval" in | |
517 | no) | |
518 | AC_MSG_RESULT(no) | |
519 | AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP]) | |
520 | AC_SUBST(CURL_DISABLE_TFTP, [1]) | |
521 | ;; | |
522 | *) AC_MSG_RESULT(yes) | |
523 | ;; | |
524 | esac ], | |
525 | AC_MSG_RESULT(yes) | |
526 | ) | |
fd3881ea | 527 | |
92b9b468 DS |
528 | AC_MSG_CHECKING([whether to support pop3]) |
529 | AC_ARG_ENABLE(pop3, | |
530 | AC_HELP_STRING([--enable-pop3],[Enable POP3 support]) | |
531 | AC_HELP_STRING([--disable-pop3],[Disable POP3 support]), | |
532 | [ case "$enableval" in | |
533 | no) | |
534 | AC_MSG_RESULT(no) | |
535 | AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3]) | |
536 | AC_SUBST(CURL_DISABLE_POP3, [1]) | |
537 | ;; | |
538 | *) AC_MSG_RESULT(yes) | |
539 | ;; | |
540 | esac ], | |
541 | AC_MSG_RESULT(yes) | |
542 | ) | |
543 | ||
544 | ||
545 | AC_MSG_CHECKING([whether to support imap]) | |
546 | AC_ARG_ENABLE(imap, | |
547 | AC_HELP_STRING([--enable-imap],[Enable IMAP support]) | |
548 | AC_HELP_STRING([--disable-imap],[Disable IMAP support]), | |
549 | [ case "$enableval" in | |
550 | no) | |
551 | AC_MSG_RESULT(no) | |
552 | AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP]) | |
553 | AC_SUBST(CURL_DISABLE_IMAP, [1]) | |
554 | ;; | |
555 | *) AC_MSG_RESULT(yes) | |
556 | ;; | |
557 | esac ], | |
558 | AC_MSG_RESULT(yes) | |
559 | ) | |
560 | ||
561 | ||
562 | AC_MSG_CHECKING([whether to support smtp]) | |
563 | AC_ARG_ENABLE(smtp, | |
564 | AC_HELP_STRING([--enable-smtp],[Enable SMTP support]) | |
565 | AC_HELP_STRING([--disable-smtp],[Disable SMTP support]), | |
566 | [ case "$enableval" in | |
567 | no) | |
568 | AC_MSG_RESULT(no) | |
569 | AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP]) | |
570 | AC_SUBST(CURL_DISABLE_SMTP, [1]) | |
571 | ;; | |
572 | *) AC_MSG_RESULT(yes) | |
573 | ;; | |
574 | esac ], | |
575 | AC_MSG_RESULT(yes) | |
576 | ) | |
577 | ||
201637d4 CK |
578 | AC_MSG_CHECKING([whether to support gopher]) |
579 | AC_ARG_ENABLE(gopher, | |
580 | AC_HELP_STRING([--enable-gopher],[Enable Gopher support]) | |
581 | AC_HELP_STRING([--disable-gopher],[Disable Gopher support]), | |
582 | [ case "$enableval" in | |
583 | no) | |
584 | AC_MSG_RESULT(no) | |
585 | AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher]) | |
586 | AC_SUBST(CURL_DISABLE_GOPHER, [1]) | |
587 | ;; | |
588 | *) AC_MSG_RESULT(yes) | |
589 | ;; | |
590 | esac ], | |
591 | AC_MSG_RESULT(yes) | |
592 | ) | |
593 | ||
92b9b468 | 594 | |
f3663a9d DS |
595 | dnl ********************************************************************** |
596 | dnl Check for built-in manual | |
597 | dnl ********************************************************************** | |
598 | ||
599 | AC_MSG_CHECKING([whether to provide built-in manual]) | |
600 | AC_ARG_ENABLE(manual, | |
601 | AC_HELP_STRING([--enable-manual],[Enable built-in manual]) | |
602 | AC_HELP_STRING([--disable-manual],[Disable built-in manual]), | |
603 | [ case "$enableval" in | |
604 | no) | |
605 | AC_MSG_RESULT(no) | |
606 | ;; | |
607 | *) AC_MSG_RESULT(yes) | |
608 | USE_MANUAL="1" | |
609 | ;; | |
610 | esac ], | |
611 | AC_MSG_RESULT(yes) | |
612 | USE_MANUAL="1" | |
613 | ) | |
614 | dnl The actual use of the USE_MANUAL variable is done much later in this | |
615 | dnl script to allow other actions to disable it as well. | |
616 | ||
ae1912cb DS |
617 | dnl ********************************************************************** |
618 | dnl Checks for libraries. | |
619 | dnl ********************************************************************** | |
620 | ||
9b4253fe | 621 | CURL_CHECK_LIB_XNET |
c76e5382 | 622 | |
9f2780a2 DS |
623 | dnl gethostbyname without lib or in the nsl lib? |
624 | AC_CHECK_FUNC(gethostbyname, | |
625 | [HAVE_GETHOSTBYNAME="1" | |
626 | ], | |
627 | [ AC_CHECK_LIB(nsl, gethostbyname, | |
628 | [HAVE_GETHOSTBYNAME="1" | |
629 | LIBS="$LIBS -lnsl" | |
630 | ]) | |
631 | ]) | |
632 | ||
633 | if test "$HAVE_GETHOSTBYNAME" != "1" | |
634 | then | |
61fb8fea | 635 | dnl gethostbyname in the socket lib? |
9f2780a2 DS |
636 | AC_CHECK_LIB(socket, gethostbyname, |
637 | [HAVE_GETHOSTBYNAME="1" | |
638 | LIBS="$LIBS -lsocket" | |
639 | ]) | |
61fb8fea DS |
640 | fi |
641 | ||
9f2780a2 DS |
642 | dnl At least one system has been identified to require BOTH nsl and socket |
643 | dnl libs at the same time to link properly. | |
644 | if test "$HAVE_GETHOSTBYNAME" != "1" | |
645 | then | |
af43ce73 | 646 | AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs]) |
caf8c01e DS |
647 | my_ac_save_LIBS=$LIBS |
648 | LIBS="-lnsl -lsocket $LIBS" | |
8ad1928d YT |
649 | AC_LINK_IFELSE([ |
650 | AC_LANG_PROGRAM([[ | |
651 | ]],[[ | |
652 | gethostbyname(); | |
653 | ]]) | |
654 | ],[ | |
655 | AC_MSG_RESULT([yes]) | |
656 | HAVE_GETHOSTBYNAME="1" | |
657 | ],[ | |
658 | AC_MSG_RESULT([no]) | |
659 | LIBS=$my_ac_save_LIBS | |
660 | ]) | |
9f2780a2 | 661 | fi |
caf8c01e | 662 | |
9f2780a2 DS |
663 | if test "$HAVE_GETHOSTBYNAME" != "1" |
664 | then | |
560a82ae YT |
665 | dnl This is for winsock systems |
666 | if test "$ac_cv_header_windows_h" = "yes"; then | |
667 | if test "$ac_cv_header_winsock_h" = "yes"; then | |
512b9ac1 YT |
668 | case $host in |
669 | *-*-mingw32ce*) | |
670 | winsock_LIB="-lwinsock" | |
671 | ;; | |
672 | *) | |
673 | winsock_LIB="-lwsock32" | |
674 | ;; | |
675 | esac | |
560a82ae YT |
676 | fi |
677 | if test "$ac_cv_header_winsock2_h" = "yes"; then | |
678 | winsock_LIB="-lws2_32" | |
679 | fi | |
680 | if test ! -z "$winsock_LIB"; then | |
681 | my_ac_save_LIBS=$LIBS | |
682 | LIBS="$winsock_LIB $LIBS" | |
683 | AC_MSG_CHECKING([for gethostbyname in $winsock_LIB]) | |
8ad1928d YT |
684 | AC_LINK_IFELSE([ |
685 | AC_LANG_PROGRAM([[ | |
560a82ae YT |
686 | #ifdef HAVE_WINDOWS_H |
687 | #ifndef WIN32_LEAN_AND_MEAN | |
688 | #define WIN32_LEAN_AND_MEAN | |
689 | #endif | |
690 | #include <windows.h> | |
691 | #ifdef HAVE_WINSOCK2_H | |
692 | #include <winsock2.h> | |
693 | #else | |
694 | #ifdef HAVE_WINSOCK_H | |
695 | #include <winsock.h> | |
696 | #endif | |
697 | #endif | |
698 | #endif | |
8ad1928d | 699 | ]],[[ |
560a82ae | 700 | gethostbyname("www.dummysite.com"); |
8ad1928d YT |
701 | ]]) |
702 | ],[ | |
703 | AC_MSG_RESULT([yes]) | |
704 | HAVE_GETHOSTBYNAME="1" | |
705 | ],[ | |
706 | AC_MSG_RESULT([no]) | |
707 | winsock_LIB="" | |
708 | LIBS=$my_ac_save_LIBS | |
560a82ae YT |
709 | ]) |
710 | fi | |
711 | fi | |
684245d6 DF |
712 | fi |
713 | ||
0427e944 DF |
714 | if test "$HAVE_GETHOSTBYNAME" != "1" |
715 | then | |
716 | dnl This is for Minix 3.1 | |
717 | AC_MSG_CHECKING([for gethostbyname for Minix 3]) | |
8ad1928d YT |
718 | AC_LINK_IFELSE([ |
719 | AC_LANG_PROGRAM([[ | |
0427e944 | 720 | /* Older Minix versions may need <net/gen/netdb.h> here instead */ |
8ad1928d YT |
721 | #include <netdb.h> |
722 | ]],[[ | |
723 | gethostbyname("www.dummysite.com"); | |
724 | ]]) | |
725 | ],[ | |
726 | AC_MSG_RESULT([yes]) | |
727 | HAVE_GETHOSTBYNAME="1" | |
728 | ],[ | |
729 | AC_MSG_RESULT([no]) | |
730 | ]) | |
0427e944 DF |
731 | fi |
732 | ||
684245d6 DF |
733 | if test "$HAVE_GETHOSTBYNAME" != "1" |
734 | then | |
735 | dnl This is for eCos with a stubbed DNS implementation | |
736 | AC_MSG_CHECKING([for gethostbyname for eCos]) | |
8ad1928d YT |
737 | AC_LINK_IFELSE([ |
738 | AC_LANG_PROGRAM([[ | |
684245d6 | 739 | #include <stdio.h> |
8ad1928d YT |
740 | #include <netdb.h> |
741 | ]],[[ | |
742 | gethostbyname("www.dummysite.com"); | |
743 | ]]) | |
744 | ],[ | |
745 | AC_MSG_RESULT([yes]) | |
746 | HAVE_GETHOSTBYNAME="1" | |
747 | ],[ | |
748 | AC_MSG_RESULT([no]) | |
749 | ]) | |
9f2780a2 DS |
750 | fi |
751 | ||
b97606f0 DS |
752 | if test "$HAVE_GETHOSTBYNAME" != "1" |
753 | then | |
754 | dnl gethostbyname in the network lib - for Haiku OS | |
755 | AC_CHECK_LIB(network, gethostbyname, | |
756 | [HAVE_GETHOSTBYNAME="1" | |
757 | LIBS="$LIBS -lnetwork" | |
758 | ]) | |
759 | fi | |
760 | ||
58f4af79 DS |
761 | if test "$HAVE_GETHOSTBYNAME" != "1" |
762 | then | |
763 | dnl gethostbyname in the net lib - for BeOS | |
764 | AC_CHECK_LIB(net, gethostbyname, | |
765 | [HAVE_GETHOSTBYNAME="1" | |
766 | LIBS="$LIBS -lnet" | |
767 | ]) | |
768 | fi | |
769 | ||
770 | ||
9b12f096 | 771 | if test "$HAVE_GETHOSTBYNAME" != "1"; then |
9f2780a2 | 772 | AC_MSG_ERROR([couldn't find libraries for gethostbyname()]) |
caf8c01e DS |
773 | fi |
774 | ||
ae1912cb | 775 | dnl resolve lib? |
22a32389 | 776 | AC_CHECK_FUNC(strcasecmp, , [ AC_CHECK_LIB(resolve, strcasecmp) ]) |
ae1912cb | 777 | |
b174aeaa DS |
778 | if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then |
779 | AC_CHECK_LIB(resolve, strcasecmp, | |
780 | [LIBS="-lresolve $LIBS"], | |
781 | , | |
782 | -lnsl) | |
783 | fi | |
4c621bc6 | 784 | ac_cv_func_strcasecmp="no" |
b174aeaa | 785 | |
1ff4e900 | 786 | CURL_CHECK_LIBS_CONNECT |
ae1912cb | 787 | |
50a1d5ee YT |
788 | CURL_NETWORK_LIBS=$LIBS |
789 | ||
b380dd03 | 790 | dnl ********************************************************************** |
ed80eb5b YT |
791 | dnl In case that function clock_gettime with monotonic timer is available, |
792 | dnl check for additional required libraries. | |
b380dd03 | 793 | dnl ********************************************************************** |
ed80eb5b | 794 | CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC |
b380dd03 | 795 | |
c461254d DF |
796 | dnl ********************************************************************** |
797 | dnl The preceding library checks are all potentially useful for test | |
798 | dnl servers (for providing networking support). Save the list of required | |
799 | dnl libraries at this point for use while linking those test servers. | |
800 | dnl ********************************************************************** | |
801 | TEST_SERVER_LIBS=$LIBS | |
ae1912cb | 802 | |
c461254d | 803 | dnl ********************************************************************** |
075c5342 DS |
804 | AC_MSG_CHECKING([whether to use libgcc]) |
805 | AC_ARG_ENABLE(libgcc, | |
806 | AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]), | |
807 | [ case "$enableval" in | |
808 | yes) | |
a0a47f27 | 809 | ALL_LIBS="$ALL_LIBS -lgcc" |
075c5342 DS |
810 | AC_MSG_RESULT(yes) |
811 | ;; | |
812 | *) AC_MSG_RESULT(no) | |
813 | ;; | |
814 | esac ], | |
815 | AC_MSG_RESULT(no) | |
816 | ) | |
817 | ||
3ec605de | 818 | dnl ********************************************************************** |
d0edb478 | 819 | dnl Check for LDAP |
205f8b26 DF |
820 | dnl ********************************************************************** |
821 | ||
822 | LDAPLIBNAME="" | |
823 | AC_ARG_WITH(ldap-lib, | |
d0edb478 | 824 | AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]), |
205f8b26 DF |
825 | [LDAPLIBNAME="$withval"]) |
826 | ||
827 | LBERLIBNAME="" | |
828 | AC_ARG_WITH(lber-lib, | |
d0edb478 | 829 | AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]), |
205f8b26 DF |
830 | [LBERLIBNAME="$withval"]) |
831 | ||
832 | if test x$CURL_DISABLE_LDAP != x1 ; then | |
833 | ||
a171f60b YT |
834 | CURL_CHECK_HEADER_LBER |
835 | CURL_CHECK_HEADER_LDAP | |
836 | CURL_CHECK_HEADER_LDAPSSL | |
837 | CURL_CHECK_HEADER_LDAP_SSL | |
3337be81 | 838 | |
205f8b26 | 839 | if test -z "$LDAPLIBNAME" ; then |
43d20d81 YT |
840 | if test "$ac_cv_native_windows" = "yes"; then |
841 | dnl Windows uses a single and unique LDAP library name | |
842 | LDAPLIBNAME="wldap32" | |
843 | LBERLIBNAME="no" | |
844 | fi | |
205f8b26 DF |
845 | fi |
846 | ||
847 | if test "$LDAPLIBNAME" ; then | |
d0edb478 DS |
848 | AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [ |
849 | AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled]) | |
850 | AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) | |
851 | AC_SUBST(CURL_DISABLE_LDAP, [1])]) | |
c37cdbe2 DF |
852 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) |
853 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
205f8b26 | 854 | else |
4db954f8 YT |
855 | dnl Try to find the right ldap libraries for this system |
856 | CURL_CHECK_LIBS_LDAP | |
857 | case X-"$curl_cv_ldap_LIBS" in | |
858 | X-unknown) | |
859 | AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled]) | |
860 | AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) | |
861 | AC_SUBST(CURL_DISABLE_LDAP, [1]) | |
c37cdbe2 DF |
862 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) |
863 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
4db954f8 YT |
864 | ;; |
865 | esac | |
205f8b26 | 866 | fi |
d0edb478 DS |
867 | fi |
868 | ||
869 | if test x$CURL_DISABLE_LDAP != x1 ; then | |
205f8b26 DF |
870 | |
871 | if test "$LBERLIBNAME" ; then | |
d0edb478 | 872 | dnl If name is "no" then don't define this library at all |
205f8b26 | 873 | dnl (it's only needed if libldap.so's dependencies are broken). |
e16c1b8e | 874 | if test "$LBERLIBNAME" != "no" ; then |
d0edb478 DS |
875 | AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [ |
876 | AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled]) | |
877 | AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) | |
878 | AC_SUBST(CURL_DISABLE_LDAP, [1])]) | |
c37cdbe2 DF |
879 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) |
880 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
205f8b26 | 881 | fi |
d0edb478 DS |
882 | fi |
883 | fi | |
884 | ||
885 | if test x$CURL_DISABLE_LDAP != x1 ; then | |
2e056353 | 886 | AC_CHECK_FUNCS([ldap_url_parse ldap_init_fd]) |
d0edb478 DS |
887 | |
888 | if test "$LDAPLIBNAME" = "wldap32"; then | |
4b60c3e9 | 889 | curl_ldap_msg="enabled (winldap)" |
43d20d81 | 890 | AC_DEFINE(CURL_LDAP_WIN, 1, [Use Windows LDAP implementation]) |
d0edb478 | 891 | else |
4b60c3e9 | 892 | curl_ldap_msg="enabled (OpenLDAP)" |
e1c2c9be | 893 | if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then |
2e056353 | 894 | AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code]) |
b1c1b9bb | 895 | AC_SUBST(USE_OPENLDAP, [1]) |
2e056353 | 896 | fi |
205f8b26 DF |
897 | fi |
898 | fi | |
899 | ||
e4128f90 JC |
900 | if test x$CURL_DISABLE_LDAPS != x1 ; then |
901 | curl_ldaps_msg="enabled" | |
902 | fi | |
903 | ||
d1b17779 DS |
904 | dnl ********************************************************************** |
905 | dnl Checks for IPv6 | |
906 | dnl ********************************************************************** | |
907 | ||
908 | AC_MSG_CHECKING([whether to enable ipv6]) | |
909 | AC_ARG_ENABLE(ipv6, | |
910 | AC_HELP_STRING([--enable-ipv6],[Enable ipv6 (with ipv4) support]) | |
911 | AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]), | |
912 | [ case "$enableval" in | |
913 | no) | |
914 | AC_MSG_RESULT(no) | |
915 | ipv6=no | |
916 | ;; | |
917 | *) AC_MSG_RESULT(yes) | |
918 | ipv6=yes | |
919 | ;; | |
920 | esac ], | |
921 | ||
922 | AC_TRY_RUN([ /* is AF_INET6 available? */ | |
923 | #include <sys/types.h> | |
924 | #include <sys/socket.h> | |
925 | main() | |
926 | { | |
927 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) | |
928 | exit(1); | |
929 | else | |
930 | exit(0); | |
931 | } | |
932 | ], | |
933 | AC_MSG_RESULT(yes) | |
934 | ipv6=yes, | |
935 | AC_MSG_RESULT(no) | |
936 | ipv6=no, | |
937 | AC_MSG_RESULT(no) | |
938 | ipv6=no | |
939 | )) | |
940 | ||
941 | if test "$ipv6" = "yes"; then | |
cff90cf3 | 942 | curl_ipv6_msg="enabled" |
d1b17779 DS |
943 | fi |
944 | ||
6efde612 GK |
945 | # Check if struct sockaddr_in6 have sin6_scope_id member |
946 | if test "$ipv6" = yes; then | |
947 | AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member]) | |
948 | AC_TRY_COMPILE([ | |
949 | #include <sys/types.h> | |
950 | #include <netinet/in.h>] , | |
951 | struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes) | |
952 | if test "$have_sin6_scope_id" = yes; then | |
1cc50d31 GK |
953 | AC_MSG_RESULT([yes]) |
954 | AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member]) | |
6efde612 | 955 | else |
1cc50d31 | 956 | AC_MSG_RESULT([no]) |
6efde612 GK |
957 | fi |
958 | fi | |
959 | ||
7f67a28c DS |
960 | dnl ********************************************************************** |
961 | dnl Check if the operating system allows programs to write to their own argv[] | |
962 | dnl ********************************************************************** | |
963 | ||
964 | AC_MSG_CHECKING([if argv can be written to]) | |
465865c3 YT |
965 | AC_RUN_IFELSE([ |
966 | AC_LANG_SOURCE([[ | |
7f67a28c | 967 | int main(int argc, char ** argv) { |
465865c3 YT |
968 | argv[0][0] = ' '; |
969 | return (argv[0][0] == ' ')?0:1; | |
7f67a28c | 970 | } |
465865c3 YT |
971 | ]]) |
972 | ],[ | |
973 | curl_cv_writable_argv=yes | |
974 | ],[ | |
975 | curl_cv_writable_argv=no | |
976 | ],[ | |
977 | curl_cv_writable_argv=cross | |
0717e469 DS |
978 | ]) |
979 | case $curl_cv_writable_argv in | |
980 | yes) | |
77431568 GK |
981 | AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv]) |
982 | AC_MSG_RESULT(yes) | |
983 | ;; | |
0717e469 | 984 | no) |
77431568 GK |
985 | AC_MSG_RESULT(no) |
986 | ;; | |
0717e469 | 987 | *) |
a139ce90 DS |
988 | AC_MSG_RESULT(no) |
989 | AC_MSG_WARN([the previous check could not be made default was used]) | |
77431568 | 990 | ;; |
0717e469 | 991 | esac |
7f67a28c | 992 | |
00505c92 DS |
993 | dnl ********************************************************************** |
994 | dnl Check for the presence of Kerberos4 libraries and headers | |
995 | dnl ********************************************************************** | |
996 | ||
997 | AC_ARG_WITH(krb4-includes, | |
f136f435 DS |
998 | AC_HELP_STRING([--with-krb4-includes=DIR], |
999 | [Specify location of kerberos4 headers]),[ | |
00505c92 DS |
1000 | CPPFLAGS="$CPPFLAGS -I$withval" |
1001 | KRB4INC="$withval" | |
1002 | want_krb4=yes | |
1003 | ]) | |
1004 | ||
1005 | AC_ARG_WITH(krb4-libs, | |
f136f435 | 1006 | AC_HELP_STRING([--with-krb4-libs=DIR],[Specify location of kerberos4 libs]),[ |
00505c92 DS |
1007 | LDFLAGS="$LDFLAGS -L$withval" |
1008 | KRB4LIB="$withval" | |
1009 | want_krb4=yes | |
1010 | ]) | |
1011 | ||
1012 | ||
1013 | OPT_KRB4=off | |
1014 | AC_ARG_WITH(krb4,dnl | |
f136f435 | 1015 | AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[ |
00505c92 | 1016 | OPT_KRB4="$withval" |
5872e8dd DF |
1017 | if test X"$OPT_KRB4" != Xno; then |
1018 | want_krb4="yes" | |
1019 | if test X"$OPT_KRB4" != Xyes; then | |
1020 | LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff" | |
1021 | KRB4LIB="$OPT_KRB4/lib$libsuff" | |
1022 | CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include" | |
1023 | KRB4INC="$OPT_KRB4/include" | |
1024 | fi | |
00505c92 | 1025 | fi |
00505c92 DS |
1026 | ]) |
1027 | ||
1028 | AC_MSG_CHECKING([if Kerberos4 support is requested]) | |
1029 | ||
1030 | if test "$want_krb4" = yes | |
1031 | then | |
f6e2bfd4 DS |
1032 | if test "$ipv6" = "yes"; then |
1033 | echo krb4 is not compatible with IPv6 | |
1034 | exit 1 | |
1035 | fi | |
00505c92 DS |
1036 | AC_MSG_RESULT(yes) |
1037 | ||
1038 | dnl Check for & handle argument to --with-krb4 | |
1039 | ||
1040 | AC_MSG_CHECKING(where to look for Kerberos4) | |
1041 | if test X"$OPT_KRB4" = Xyes | |
1042 | then | |
1043 | AC_MSG_RESULT([defaults]) | |
1044 | else | |
1045 | AC_MSG_RESULT([libs in $KRB4LIB, headers in $KRB4INC]) | |
1046 | fi | |
1047 | ||
1048 | dnl Check for DES library | |
1049 | AC_CHECK_LIB(des, des_pcbc_encrypt, | |
1050 | [ | |
1051 | AC_CHECK_HEADERS(des.h) | |
1052 | ||
1053 | dnl resolv lib? | |
22a32389 | 1054 | AC_CHECK_FUNC(res_search, , [AC_CHECK_LIB(resolv, res_search)]) |
00505c92 DS |
1055 | |
1056 | dnl Check for the Kerberos4 library | |
1057 | AC_CHECK_LIB(krb, krb_net_read, | |
1058 | [ | |
1059 | dnl Check for header files | |
1060 | AC_CHECK_HEADERS(krb.h) | |
1061 | ||
1062 | dnl we found the required libraries, add to LIBS | |
b55507c8 | 1063 | LIBS="-lkrb -lcom_err -ldes $LIBS" |
00505c92 DS |
1064 | |
1065 | dnl Check for function krb_get_our_ip_for_realm | |
1066 | dnl this is needed for NAT networks | |
1067 | AC_CHECK_FUNCS(krb_get_our_ip_for_realm) | |
1068 | ||
1069 | dnl add define KRB4 | |
d4629fd3 | 1070 | AC_DEFINE(HAVE_KRB4, 1, |
22a32389 | 1071 | [if you have the Kerberos4 libraries (including -ldes)]) |
00505c92 | 1072 | |
1ee7f92c DS |
1073 | dnl substitute it too! |
1074 | KRB4_ENABLED=1 | |
1075 | AC_SUBST(KRB4_ENABLED) | |
1076 | ||
cff90cf3 DS |
1077 | curl_krb4_msg="enabled" |
1078 | ||
00505c92 DS |
1079 | dnl the krb4 stuff needs a strlcpy() |
1080 | AC_CHECK_FUNCS(strlcpy) | |
1081 | ||
1082 | ]) | |
1083 | ]) | |
1084 | else | |
1085 | AC_MSG_RESULT(no) | |
1086 | fi | |
1087 | ||
09ccfcdc DS |
1088 | dnl ********************************************************************** |
1089 | dnl Check for FBopenssl(SPNEGO) libraries | |
1090 | dnl ********************************************************************** | |
1091 | ||
1092 | AC_ARG_WITH(spnego, | |
1093 | AC_HELP_STRING([--with-spnego=DIR], | |
5872e8dd DF |
1094 | [Specify location of SPNEGO library fbopenssl]), [ |
1095 | SPNEGO_ROOT="$withval" | |
1096 | if test x"$SPNEGO_ROOT" != xno; then | |
1097 | want_spnego="yes" | |
1098 | fi | |
1099 | ]) | |
1100 | ||
09ccfcdc DS |
1101 | AC_MSG_CHECKING([if SPNEGO support is requested]) |
1102 | if test x"$want_spnego" = xyes; then | |
f6413f2c DS |
1103 | |
1104 | if test X"$SPNEGO_ROOT" = Xyes; then | |
1105 | AC_MSG_ERROR([FBOpenSSL libs and/or directories were not found where specified!]) | |
1106 | AC_MSG_RESULT(no) | |
09ccfcdc | 1107 | else |
f6413f2c | 1108 | if test -z "$SPNEGO_LIB_DIR"; then |
202e54cf | 1109 | LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl" |
f6413f2c DS |
1110 | else |
1111 | LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR" | |
1112 | fi | |
e16c1b8e | 1113 | |
f6413f2c | 1114 | AC_MSG_RESULT(yes) |
cff90cf3 DS |
1115 | AC_DEFINE(HAVE_SPNEGO, 1, |
1116 | [Define this if you have the SPNEGO library fbopenssl]) | |
1117 | curl_spnego_msg="enabled" | |
f6413f2c | 1118 | fi |
09ccfcdc DS |
1119 | else |
1120 | AC_MSG_RESULT(no) | |
1121 | fi | |
1122 | ||
e56ae142 DS |
1123 | dnl ********************************************************************** |
1124 | dnl Check for GSS-API libraries | |
1125 | dnl ********************************************************************** | |
1126 | ||
c1b734a3 DS |
1127 | dnl check for gss stuff in the /usr as default |
1128 | ||
1129 | GSSAPI_ROOT="/usr" | |
e56ae142 DS |
1130 | AC_ARG_WITH(gssapi-includes, |
1131 | AC_HELP_STRING([--with-gssapi-includes=DIR], | |
1132 | [Specify location of GSSAPI header]), | |
e16c1b8e | 1133 | [ GSSAPI_INCS="-I$withval" |
e56ae142 DS |
1134 | want_gss="yes" ] |
1135 | ) | |
1136 | ||
1137 | AC_ARG_WITH(gssapi-libs, | |
1138 | AC_HELP_STRING([--with-gssapi-libs=DIR], | |
77431568 | 1139 | [Specify location of GSSAPI libs]), |
2723eda1 | 1140 | [ GSSAPI_LIB_DIR="-L$withval" |
e56ae142 DS |
1141 | want_gss="yes" ] |
1142 | ) | |
1143 | ||
1144 | AC_ARG_WITH(gssapi, | |
1145 | AC_HELP_STRING([--with-gssapi=DIR], | |
5872e8dd DF |
1146 | [Where to look for GSSAPI]), [ |
1147 | GSSAPI_ROOT="$withval" | |
1148 | if test x"$GSSAPI_ROOT" != xno; then | |
e16c1b8e | 1149 | want_gss="yes" |
c1b734a3 DS |
1150 | if test x"$GSSAPI_ROOT" = xyes; then |
1151 | dnl if yes, then use default root | |
1152 | GSSAPI_ROOT="/usr" | |
1153 | fi | |
5872e8dd DF |
1154 | fi |
1155 | ]) | |
e56ae142 | 1156 | |
982ba214 | 1157 | save_CPPFLAGS="$CPPFLAGS" |
e56ae142 DS |
1158 | AC_MSG_CHECKING([if GSSAPI support is requested]) |
1159 | if test x"$want_gss" = xyes; then | |
5effe8f3 DS |
1160 | AC_MSG_RESULT(yes) |
1161 | ||
e56ae142 DS |
1162 | if test -z "$GSSAPI_INCS"; then |
1163 | if test -f "$GSSAPI_ROOT/bin/krb5-config"; then | |
f4046763 | 1164 | GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi` |
49111a63 | 1165 | elif test "$GSSAPI_ROOT" != "yes"; then |
533519cc | 1166 | GSSAPI_INCS="-I$GSSAPI_ROOT/include" |
e56ae142 | 1167 | fi |
e56ae142 | 1168 | fi |
c1b734a3 | 1169 | |
f4046763 | 1170 | CPPFLAGS="$CPPFLAGS $GSSAPI_INCS" |
5effe8f3 DS |
1171 | |
1172 | AC_CHECK_HEADER(gss.h, | |
1173 | [ | |
1174 | dnl found in the given dirs | |
1175 | AC_DEFINE(HAVE_GSSGNU, 1, [if you have the GNU gssapi libraries]) | |
1176 | gnu_gss=yes | |
1177 | ], | |
1178 | [ | |
d0a4b50e | 1179 | dnl not found, check Heimdal or MIT |
cca192e5 | 1180 | AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1]) |
d0a4b50e | 1181 | AC_CHECK_HEADERS( |
cca192e5 | 1182 | [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h], |
d0a4b50e | 1183 | [], |
cca192e5 PH |
1184 | [not_mit=1], |
1185 | [ | |
1186 | AC_INCLUDES_DEFAULT | |
1187 | #ifdef HAVE_GSSAPI_GSSAPI_H | |
1188 | #include <gssapi/gssapi.h> | |
1189 | #endif | |
1190 | ]) | |
d0a4b50e MM |
1191 | if test "x$not_mit" = "x1"; then |
1192 | dnl MIT not found, check for Heimdal | |
1193 | AC_CHECK_HEADER(gssapi.h, | |
5effe8f3 | 1194 | [ |
e16c1b8e | 1195 | dnl found |
40e1a016 | 1196 | AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries]) |
5effe8f3 DS |
1197 | ], |
1198 | [ | |
1199 | dnl no header found, disabling GSS | |
1200 | want_gss=no | |
1201 | AC_MSG_WARN(disabling GSSAPI since no header files was found) | |
1202 | ] | |
1203 | ) | |
d0a4b50e MM |
1204 | else |
1205 | dnl MIT found | |
1206 | AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries]) | |
1207 | dnl check if we have a really old MIT kerberos (<= 1.2) | |
1208 | AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE]) | |
7ad3abfd YT |
1209 | AC_COMPILE_IFELSE([ |
1210 | AC_LANG_PROGRAM([[ | |
d0a4b50e MM |
1211 | #include <gssapi/gssapi.h> |
1212 | #include <gssapi/gssapi_generic.h> | |
1213 | #include <gssapi/gssapi_krb5.h> | |
7ad3abfd | 1214 | ]],[[ |
d0a4b50e MM |
1215 | gss_import_name( |
1216 | (OM_uint32 *)0, | |
1217 | (gss_buffer_t)0, | |
1218 | GSS_C_NT_HOSTBASED_SERVICE, | |
1219 | (gss_name_t *)0); | |
7ad3abfd YT |
1220 | ]]) |
1221 | ],[ | |
1222 | AC_MSG_RESULT([yes]) | |
1223 | ],[ | |
1224 | AC_MSG_RESULT([no]) | |
1225 | AC_DEFINE(HAVE_OLD_GSSMIT, 1, | |
1226 | [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE]) | |
1227 | ]) | |
d0a4b50e | 1228 | fi |
5effe8f3 DS |
1229 | ] |
1230 | ) | |
1231 | else | |
1232 | AC_MSG_RESULT(no) | |
1233 | fi | |
1234 | if test x"$want_gss" = xyes; then | |
1235 | AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries]) | |
1236 | ||
1237 | curl_gss_msg="enabled (MIT/Heimdal)" | |
1238 | ||
1239 | if test -n "$gnu_gss"; then | |
1240 | curl_gss_msg="enabled (GNU GSS)" | |
9bb51d76 MM |
1241 | LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" |
1242 | LIBS="$LIBS -lgss" | |
5effe8f3 | 1243 | elif test -z "$GSSAPI_LIB_DIR"; then |
013d5a72 DS |
1244 | case $host in |
1245 | *-*-darwin*) | |
1246 | LIBS="$LIBS -lgssapi_krb5 -lresolv" | |
1247 | ;; | |
1248 | *) | |
1249 | if test -f "$GSSAPI_ROOT/bin/krb5-config"; then | |
1250 | dnl krb5-config doesn't have --libs-only-L or similar, put everything | |
1251 | dnl into LIBS | |
1252 | gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi` | |
1253 | LIBS="$LIBS $gss_libs" | |
1254 | elif test "$GSSAPI_ROOT" != "yes"; then | |
1255 | LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff" | |
1256 | LIBS="$LIBS -lgssapi" | |
1257 | else | |
1258 | LIBS="$LIBS -lgssapi" | |
1259 | fi | |
1260 | ;; | |
1261 | esac | |
e56ae142 | 1262 | else |
9bb51d76 MM |
1263 | LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" |
1264 | LIBS="$LIBS -lgssapi" | |
e56ae142 | 1265 | fi |
e56ae142 | 1266 | else |
5effe8f3 | 1267 | CPPFLAGS="$save_CPPFLAGS" |
e56ae142 | 1268 | fi |
e16c1b8e | 1269 | |
ae1912cb DS |
1270 | dnl ********************************************************************** |
1271 | dnl Check for the presence of SSL libraries and headers | |
1272 | dnl ********************************************************************** | |
1273 | ||
1274 | dnl Default to compiler & linker defaults for SSL files & libraries. | |
1275 | OPT_SSL=off | |
2c2baa93 DS |
1276 | dnl Default to no CA bundle |
1277 | ca="no" | |
ae1912cb | 1278 | AC_ARG_WITH(ssl,dnl |
d7a29388 | 1279 | AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) |
0abccc67 | 1280 | AC_HELP_STRING([--without-ssl], [disable OpenSSL]), |
e890113f | 1281 | OPT_SSL=$withval) |
ae1912cb | 1282 | |
bebd5dbc | 1283 | if test X"$OPT_SSL" != Xno; then |
6bd02a3a | 1284 | dnl backup the pre-ssl variables |
4ac7a087 DS |
1285 | CLEANLDFLAGS="$LDFLAGS" |
1286 | CLEANCPPFLAGS="$CPPFLAGS" | |
6bd02a3a DS |
1287 | CLEANLIBS="$LIBS" |
1288 | ||
4836154c DS |
1289 | case "$OPT_SSL" in |
1290 | yes) | |
75e5967a | 1291 | dnl --with-ssl (without path) used |
736a40fe DS |
1292 | if test x$cross_compiling != xyes; then |
1293 | dnl only do pkg-config magic when not cross-compiling | |
1294 | PKGTEST="yes" | |
1295 | fi | |
4370e92d DS |
1296 | PREFIX_OPENSSL=/usr/local/ssl |
1297 | LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" | |
1298 | ;; | |
4398151f | 1299 | off) |
75e5967a | 1300 | dnl no --with-ssl option given, just check default places |
736a40fe DS |
1301 | if test x$cross_compiling != xyes; then |
1302 | dnl only do pkg-config magic when not cross-compiling | |
1303 | PKGTEST="yes" | |
1304 | fi | |
4370e92d DS |
1305 | PREFIX_OPENSSL= |
1306 | ;; | |
4836154c | 1307 | *) |
75e5967a DS |
1308 | dnl check the given --with-ssl spot |
1309 | PKGTEST="no" | |
4370e92d | 1310 | PREFIX_OPENSSL=$OPT_SSL |
530fde3a KD |
1311 | |
1312 | dnl Try pkg-config even when cross-compiling. Since we | |
1313 | dnl specify PKG_CONFIG_LIBDIR we're only looking where | |
1314 | dnl the user told us to look | |
383bf1e4 KD |
1315 | OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig" |
1316 | AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"]) | |
1317 | if test -e "$OPENSSL_PCDIR/openssl.pc"; then | |
530fde3a KD |
1318 | PKGTEST="yes" |
1319 | fi | |
1320 | ||
1321 | dnl in case pkg-config comes up empty, use what we got | |
1322 | dnl via --with-ssl | |
4370e92d | 1323 | LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" |
b98e0aa0 | 1324 | if test "$PREFIX_OPENSSL" != "/usr" ; then |
530fde3a KD |
1325 | SSL_LDFLAGS="-L$LIB_OPENSSL" |
1326 | SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include" | |
4b441eba | 1327 | fi |
530fde3a | 1328 | SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl" |
4ac7a087 | 1329 | ;; |
4836154c DS |
1330 | esac |
1331 | ||
75e5967a DS |
1332 | if test "$PKGTEST" = "yes"; then |
1333 | ||
383bf1e4 | 1334 | CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR]) |
75e5967a | 1335 | |
75e5967a | 1336 | if test "$PKGCONFIG" != "no" ; then |
383bf1e4 KD |
1337 | SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl |
1338 | $PKGCONFIG --libs-only-l openssl 2>/dev/null` | |
1339 | ||
1340 | SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl | |
1341 | $PKGCONFIG --libs-only-L openssl 2>/dev/null` | |
1342 | ||
1343 | SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl | |
1344 | $PKGCONFIG --cflags-only-I openssl 2>/dev/null` | |
75e5967a | 1345 | |
530fde3a KD |
1346 | AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"]) |
1347 | AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"]) | |
1348 | AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"]) | |
1349 | ||
b9fdc0c2 | 1350 | LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'` |
75e5967a | 1351 | |
530fde3a KD |
1352 | dnl use the values pkg-config reported. This is here |
1353 | dnl instead of below with CPPFLAGS and LDFLAGS because we only | |
1354 | dnl learn about this via pkg-config. If we only have | |
1355 | dnl the argument to --with-ssl we don't know what | |
1356 | dnl additional libs may be necessary. Hope that we | |
1357 | dnl don't need any. | |
b9fdc0c2 | 1358 | LIBS="$LIBS $SSL_LIBS" |
75e5967a DS |
1359 | fi |
1360 | fi | |
1361 | ||
530fde3a KD |
1362 | dnl finally, set flags to use SSL |
1363 | CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS" | |
1364 | LDFLAGS="$LDFLAGS $SSL_LDFLAGS" | |
1365 | ||
6abbbaad YT |
1366 | dnl This is for Msys/Mingw |
1367 | case $host in | |
1368 | *-*-msys* | *-*-mingw*) | |
1369 | AC_MSG_CHECKING([for gdi32]) | |
1370 | my_ac_save_LIBS=$LIBS | |
1371 | LIBS="-lgdi32 $LIBS" | |
1372 | AC_TRY_LINK([#include <windef.h> | |
1373 | #include <wingdi.h>], | |
1374 | [GdiFlush();], | |
1375 | [ dnl worked! | |
1376 | AC_MSG_RESULT([yes])], | |
1377 | [ dnl failed, restore LIBS | |
1378 | LIBS=$my_ac_save_LIBS | |
1379 | AC_MSG_RESULT(no)] | |
1380 | ) | |
1381 | ;; | |
1382 | esac | |
1383 | ||
4836154c DS |
1384 | AC_CHECK_LIB(crypto, CRYPTO_lock,[ |
1385 | HAVECRYPTO="yes" | |
c4f7570a | 1386 | LIBS="-lcrypto $LIBS" |
4836154c | 1387 | ],[ |
4370e92d DS |
1388 | LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL" |
1389 | CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include" | |
4836154c | 1390 | AC_CHECK_LIB(crypto, CRYPTO_add_lock,[ |
c4f7570a DF |
1391 | HAVECRYPTO="yes" |
1392 | LIBS="-lcrypto $LIBS"], [ | |
6bd02a3a DS |
1393 | LDFLAGS="$CLEANLDFLAGS" |
1394 | CPPFLAGS="$CLEANCPPFLAGS" | |
1395 | LIBS="$CLEANLIBS" | |
4836154c DS |
1396 | ]) |
1397 | ]) | |
ae1912cb | 1398 | |
ae1912cb | 1399 | |
21337f47 | 1400 | if test X"$HAVECRYPTO" = X"yes"; then |
ae1912cb DS |
1401 | dnl This is only reasonable to do if crypto actually is there: check for |
1402 | dnl SSL libs NOTE: it is important to do this AFTER the crypto lib | |
4836154c | 1403 | |
ae1912cb DS |
1404 | AC_CHECK_LIB(ssl, SSL_connect) |
1405 | ||
b32bf427 DS |
1406 | if test "$ac_cv_lib_ssl_SSL_connect" != yes; then |
1407 | dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff | |
1408 | AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use); | |
1409 | OLIBS=$LIBS | |
1410 | LIBS="$LIBS -lRSAglue -lrsaref" | |
1411 | AC_CHECK_LIB(ssl, SSL_connect) | |
1412 | if test "$ac_cv_lib_ssl_SSL_connect" != yes; then | |
1413 | dnl still no SSL_connect | |
1414 | AC_MSG_RESULT(no) | |
1415 | LIBS=$OLIBS | |
1416 | else | |
1417 | AC_MSG_RESULT(yes) | |
1418 | fi | |
b32bf427 | 1419 | |
df3ca591 | 1420 | else |
b32bf427 | 1421 | |
df3ca591 DS |
1422 | dnl Have the libraries--check for SSLeay/OpenSSL headers |
1423 | AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \ | |
1424 | openssl/pem.h openssl/ssl.h openssl/err.h, | |
bebd5dbc | 1425 | curl_ssl_msg="enabled (OpenSSL)" |
df3ca591 DS |
1426 | OPENSSL_ENABLED=1 |
1427 | AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use])) | |
1428 | ||
1429 | if test $ac_cv_header_openssl_x509_h = no; then | |
d99c20f6 DS |
1430 | dnl we don't use the "action" part of the AC_CHECK_HEADERS macro |
1431 | dnl since 'err.h' might in fact find a krb4 header with the same | |
1432 | dnl name | |
1433 | AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h) | |
1434 | ||
e16c1b8e | 1435 | if test $ac_cv_header_x509_h = yes && |
d99c20f6 DS |
1436 | test $ac_cv_header_crypto_h = yes && |
1437 | test $ac_cv_header_ssl_h = yes; then | |
1438 | dnl three matches | |
bebd5dbc | 1439 | curl_ssl_msg="enabled (OpenSSL)" |
d99c20f6 DS |
1440 | OPENSSL_ENABLED=1 |
1441 | fi | |
df3ca591 DS |
1442 | fi |
1443 | fi | |
1444 | ||
f966dad3 DS |
1445 | if test X"$OPENSSL_ENABLED" = X"1"; then |
1446 | AC_DEFINE(USE_SSLEAY, 1, [if SSL is enabled]) | |
090a7f38 DS |
1447 | |
1448 | dnl is there a pkcs12.h header present? | |
1449 | AC_CHECK_HEADERS(openssl/pkcs12.h) | |
c4f7570a DF |
1450 | else |
1451 | LIBS="$CLEANLIBS" | |
f966dad3 | 1452 | fi |
c4f7570a DF |
1453 | dnl USE_SSLEAY is the historical name for what configure calls |
1454 | dnl OPENSSL_ENABLED; the names should really be unified | |
df3ca591 | 1455 | USE_SSLEAY="$OPENSSL_ENABLED" |
df3ca591 | 1456 | AC_SUBST(USE_SSLEAY) |
df3ca591 DS |
1457 | |
1458 | if test X"$OPT_SSL" != Xoff && | |
1459 | test "$OPENSSL_ENABLED" != "1"; then | |
1460 | AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!]) | |
1ee7f92c | 1461 | fi |
df3ca591 DS |
1462 | fi |
1463 | ||
df3ca591 | 1464 | if test X"$OPENSSL_ENABLED" = X"1"; then |
e157aabd | 1465 | dnl If the ENGINE library seems to be around, check for the OpenSSL engine |
f169b750 DS |
1466 | dnl stuff, it is kind of "separated" from the main SSL check |
1467 | AC_CHECK_FUNC(ENGINE_init, | |
1468 | [ | |
1469 | AC_CHECK_HEADERS(openssl/engine.h) | |
1470 | AC_CHECK_FUNCS( ENGINE_load_builtin_engines ) | |
1471 | ]) | |
af6c3947 | 1472 | |
2c2baa93 | 1473 | dnl these can only exist if openssl exists |
d052e545 | 1474 | dnl yassl doesn't have SSL_get_shutdown |
2c2baa93 DS |
1475 | |
1476 | AC_CHECK_FUNCS( RAND_status \ | |
1477 | RAND_screen \ | |
e16bc916 | 1478 | RAND_egd \ |
10a11e3a | 1479 | ENGINE_cleanup \ |
d052e545 DS |
1480 | CRYPTO_cleanup_all_ex_data \ |
1481 | SSL_get_shutdown ) | |
1482 | ||
1483 | dnl Make an attempt to detect if this is actually yassl's headers and | |
1484 | dnl OpenSSL emulation layer. We still leave everything else believing | |
1485 | dnl and acting like OpenSSL. | |
2c2baa93 | 1486 | |
248f0571 | 1487 | AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode]) |
8ad1928d YT |
1488 | AC_COMPILE_IFELSE([ |
1489 | AC_LANG_PROGRAM([[ | |
d052e545 | 1490 | #include <openssl/ssl.h> |
8ad1928d | 1491 | ]],[[ |
248f0571 YT |
1492 | #if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER) |
1493 | int dummy = SSL_ERROR_NONE; | |
1494 | #else | |
1495 | Not the yaSSL OpenSSL compatibility header. | |
1496 | #endif | |
8ad1928d YT |
1497 | ]]) |
1498 | ],[ | |
1499 | AC_MSG_RESULT([yes]) | |
1500 | AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1, | |
1501 | [Define to 1 if using yaSSL in OpenSSL compatibility mode.]) | |
1502 | curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)" | |
1503 | ],[ | |
1504 | AC_MSG_RESULT([no]) | |
248f0571 | 1505 | ]) |
ae1912cb | 1506 | fi |
00505c92 | 1507 | |
df3ca591 | 1508 | if test "$OPENSSL_ENABLED" = "1"; then |
8882d1fa DS |
1509 | if test -n "$LIB_OPENSSL"; then |
1510 | dnl when the ssl shared libs were found in a path that the run-time | |
1511 | dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH | |
1512 | dnl to prevent further configure tests to fail due to this | |
1513 | ||
1514 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL" | |
1515 | export LD_LIBRARY_PATH | |
1516 | AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH]) | |
1517 | fi | |
1ee7f92c DS |
1518 | fi |
1519 | ||
ae1912cb DS |
1520 | fi |
1521 | ||
c518c52a DS |
1522 | dnl ********************************************************************** |
1523 | dnl Check for the presence of ZLIB libraries and headers | |
1524 | dnl ********************************************************************** | |
1525 | ||
1526 | dnl Check for & handle argument to --with-zlib. | |
1527 | ||
1528 | _cppflags=$CPPFLAGS | |
1529 | _ldflags=$LDFLAGS | |
1530 | AC_ARG_WITH(zlib, | |
1531 | AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH]) | |
1532 | AC_HELP_STRING([--without-zlib],[disable use of zlib]), | |
1533 | [OPT_ZLIB="$withval"]) | |
1534 | ||
1535 | if test "$OPT_ZLIB" = "no" ; then | |
1536 | AC_MSG_WARN([zlib disabled]) | |
1537 | else | |
1538 | if test "$OPT_ZLIB" = "yes" ; then | |
1539 | OPT_ZLIB="" | |
1540 | fi | |
1541 | ||
1542 | if test -z "$OPT_ZLIB" ; then | |
1543 | dnl check for the lib first without setting any new path, since many | |
1544 | dnl people have it in the default path | |
1545 | ||
1546 | AC_CHECK_LIB(z, inflateEnd, | |
1547 | dnl libz found, set the variable | |
1548 | [HAVE_LIBZ="1"], | |
1549 | dnl if no lib found, try /usr/local | |
1550 | [OPT_ZLIB="/usr/local"]) | |
1551 | ||
1552 | fi | |
1553 | ||
1554 | dnl Add a nonempty path to the compiler flags | |
1555 | if test -n "$OPT_ZLIB"; then | |
1556 | CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include" | |
1557 | LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff" | |
1558 | fi | |
1559 | ||
1560 | AC_CHECK_HEADER(zlib.h, | |
1561 | [ | |
1562 | dnl zlib.h was found | |
1563 | HAVE_ZLIB_H="1" | |
1564 | dnl if the lib wasn't found already, try again with the new paths | |
1565 | if test "$HAVE_LIBZ" != "1"; then | |
1566 | AC_CHECK_LIB(z, gzread, | |
1567 | [ | |
1568 | dnl the lib was found! | |
1569 | HAVE_LIBZ="1" | |
1570 | ], | |
1571 | [ CPPFLAGS=$_cppflags | |
1572 | LDFLAGS=$_ldflags]) | |
1573 | fi | |
1574 | ], | |
1575 | [ | |
1576 | dnl zlib.h was not found, restore the flags | |
1577 | CPPFLAGS=$_cppflags | |
1578 | LDFLAGS=$_ldflags] | |
1579 | ) | |
1580 | ||
1581 | if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1" | |
1582 | then | |
1583 | AC_MSG_WARN([configure found only the libz lib, not the header file!]) | |
48dd0c56 | 1584 | HAVE_LIBZ="" |
c518c52a DS |
1585 | elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1" |
1586 | then | |
1587 | AC_MSG_WARN([configure found only the libz header file, not the lib!]) | |
1588 | elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1" | |
1589 | then | |
1590 | dnl both header and lib were found! | |
1591 | AC_SUBST(HAVE_LIBZ) | |
1592 | AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file]) | |
1593 | AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available]) | |
1594 | ||
1595 | CURL_LIBS="$CURL_LIBS -lz" | |
1596 | LIBS="$LIBS -lz" | |
1597 | ||
1598 | dnl replace 'HAVE_LIBZ' in the automake makefile.ams | |
1599 | AMFIXLIB="1" | |
1600 | AC_MSG_NOTICE([found both libz and libz.h header]) | |
1601 | curl_zlib_msg="enabled" | |
1602 | fi | |
1603 | fi | |
1604 | ||
1605 | dnl set variable for use in automakefile(s) | |
1606 | AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1) | |
1607 | ||
df3ca591 | 1608 | dnl ********************************************************************** |
e16c1b8e | 1609 | dnl Check for the random seed preferences |
df3ca591 DS |
1610 | dnl ********************************************************************** |
1611 | ||
1612 | if test X"$OPENSSL_ENABLED" = X"1"; then | |
1613 | AC_ARG_WITH(egd-socket, | |
1614 | AC_HELP_STRING([--with-egd-socket=FILE], | |
1615 | [Entropy Gathering Daemon socket pathname]), | |
1616 | [ EGD_SOCKET="$withval" ] | |
1617 | ) | |
1618 | if test -n "$EGD_SOCKET" ; then | |
1619 | AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET", | |
1620 | [your Entropy Gathering Daemon socket pathname] ) | |
1621 | fi | |
1622 | ||
1623 | dnl Check for user-specified random device | |
1624 | AC_ARG_WITH(random, | |
1625 | AC_HELP_STRING([--with-random=FILE], | |
1626 | [read randomness from FILE (default=/dev/urandom)]), | |
1627 | [ RANDOM_FILE="$withval" ], | |
1628 | [ | |
a87102c7 DS |
1629 | if test x$cross_compiling != xyes; then |
1630 | dnl Check for random device | |
1631 | AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] ) | |
1632 | else | |
1633 | AC_MSG_WARN([skipped the /dev/urandom detection when cross-compiling]) | |
1634 | fi | |
df3ca591 DS |
1635 | ] |
1636 | ) | |
1637 | if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then | |
1638 | AC_SUBST(RANDOM_FILE) | |
1639 | AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE", | |
1640 | [a suitable file to read random data from]) | |
1641 | fi | |
1642 | fi | |
1643 | ||
2531cd94 PS |
1644 | dnl --- |
1645 | dnl We require OpenSSL with SRP support. | |
1646 | dnl --- | |
1647 | if test "$OPENSSL_ENABLED" = "1"; then | |
1648 | AC_CHECK_LIB(crypto, SRP_Calc_client_key, | |
1649 | [ | |
1650 | AC_DEFINE(HAVE_SSLEAY_SRP, 1, [if you have the function SRP_Calc_client_key]) | |
1651 | AC_SUBST(HAVE_SSLEAY_SRP, [1]) | |
1652 | ]) | |
1653 | fi | |
1654 | ||
bebd5dbc | 1655 | dnl ---------------------------------------------------- |
b9fdc0c2 | 1656 | dnl check for GnuTLS |
bebd5dbc DS |
1657 | dnl ---------------------------------------------------- |
1658 | ||
1659 | dnl Default to compiler & linker defaults for GnuTLS files & libraries. | |
e49a7e36 | 1660 | OPT_GNUTLS=no |
bebd5dbc DS |
1661 | |
1662 | AC_ARG_WITH(gnutls,dnl | |
c40ae2cb | 1663 | AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]) |
bebd5dbc DS |
1664 | AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]), |
1665 | OPT_GNUTLS=$withval) | |
1666 | ||
1667 | if test "$OPENSSL_ENABLED" != "1"; then | |
1668 | ||
e49a7e36 | 1669 | if test X"$OPT_GNUTLS" != Xno; then |
b9fdc0c2 | 1670 | |
b9fdc0c2 | 1671 | addld="" |
bebd5dbc | 1672 | if test "x$OPT_GNUTLS" = "xyes"; then |
966cc10f | 1673 | dnl this is with no partiular path given |
b9fdc0c2 DS |
1674 | CURL_CHECK_PKGCONFIG(gnutls) |
1675 | ||
1676 | if test "$PKGCONFIG" != "no" ; then | |
1677 | addlib=`$PKGCONFIG --libs-only-l gnutls` | |
1678 | addld=`$PKGCONFIG --libs-only-L gnutls` | |
1679 | addcflags=`$PKGCONFIG --cflags-only-I gnutls` | |
1680 | version=`$PKGCONFIG --modversion gnutls` | |
1681 | gtlslib=`echo $addld | $SED -e 's/-L//'` | |
966cc10f DS |
1682 | else |
1683 | dnl without pkg-config, we try libgnutls-config as that was how it | |
1684 | dnl used to be done | |
1685 | check=`libgnutls-config --version 2>/dev/null` | |
1686 | if test -n "$check"; then | |
1687 | addlib=`libgnutls-config --libs` | |
1688 | addcflags=`libgnutls-config --cflags` | |
1689 | version=`libgnutls-config --version` | |
1690 | gtlslib=`libgnutls-config --prefix`/lib$libsuff | |
1691 | fi | |
c2fcdf3a | 1692 | fi |
f90551ff | 1693 | else |
966cc10f DS |
1694 | dnl this is with a given path, first check if there's a libgnutls-config |
1695 | dnl there and if not, make an educated guess | |
0cb6f305 DS |
1696 | cfg=$OPT_GNUTLS/bin/libgnutls-config |
1697 | check=`$cfg --version 2>/dev/null` | |
966cc10f | 1698 | if test -n "$check"; then |
0cb6f305 DS |
1699 | addlib=`$cfg --libs` |
1700 | addcflags=`$cfg --cflags` | |
1701 | version=`$cfg --version` | |
1702 | gtlslib=`$cfg --prefix`/lib$libsuff | |
966cc10f DS |
1703 | else |
1704 | dnl without pkg-config and libgnutls-config, we guess a lot! | |
1705 | addlib=-lgnutls | |
1706 | addld=-L$OPT_GNUTLS/lib$libsuff | |
1707 | addcflags=-I$OPT_GNUTLS/include | |
1708 | version="" # we just don't know | |
1709 | gtlslib=$OPT_GNUTLS/lib$libsuff | |
1710 | fi | |
b9fdc0c2 DS |
1711 | fi |
1712 | ||
1713 | if test -z "$version"; then | |
1714 | dnl lots of efforts, still no go | |
1715 | version="unknown" | |
bebd5dbc | 1716 | fi |
b9fdc0c2 | 1717 | |
313f1a1e | 1718 | if test -n "$addlib"; then |
bebd5dbc | 1719 | |
b0bc2f00 | 1720 | CLEANLIBS="$LIBS" |
313f1a1e | 1721 | CLEANCPPFLAGS="$CPPFLAGS" |
b9fdc0c2 | 1722 | CLEADLDFLAGS="$LDFLAGS" |
e16c1b8e | 1723 | |
b0bc2f00 | 1724 | LIBS="$LIBS $addlib" |
b9fdc0c2 | 1725 | LDFLAGS="$LDFLAGS $addld" |
313f1a1e DS |
1726 | if test "$addcflags" != "-I/usr/include"; then |
1727 | CPPFLAGS="$CPPFLAGS $addcflags" | |
1728 | fi | |
e16c1b8e | 1729 | |
313f1a1e | 1730 | AC_CHECK_LIB(gnutls, gnutls_check_version, |
bebd5dbc DS |
1731 | [ |
1732 | AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled]) | |
1733 | AC_SUBST(USE_GNUTLS, [1]) | |
02267eba | 1734 | GNUTLS_ENABLED=1 |
bebd5dbc | 1735 | USE_GNUTLS="yes" |
313f1a1e | 1736 | curl_ssl_msg="enabled (GnuTLS)" |
bebd5dbc DS |
1737 | ], |
1738 | [ | |
b0bc2f00 | 1739 | LIBS="$CLEANLIBS" |
bebd5dbc DS |
1740 | CPPFLAGS="$CLEANCPPFLAGS" |
1741 | ]) | |
e16c1b8e | 1742 | |
313f1a1e DS |
1743 | if test "x$USE_GNUTLS" = "xyes"; then |
1744 | AC_MSG_NOTICE([detected GnuTLS version $version]) | |
241b2b4a | 1745 | |
b9fdc0c2 DS |
1746 | if test -n "$gtlslib"; then |
1747 | dnl when shared libs were found in a path that the run-time | |
1748 | dnl linker doesn't search through, we need to add it to | |
1749 | dnl LD_LIBRARY_PATH to prevent further configure tests to fail | |
1750 | dnl due to this | |
313f1a1e | 1751 | |
b9fdc0c2 DS |
1752 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib" |
1753 | export LD_LIBRARY_PATH | |
1754 | AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH]) | |
1755 | fi | |
313f1a1e | 1756 | fi |
241b2b4a | 1757 | |
bebd5dbc | 1758 | fi |
313f1a1e | 1759 | |
bebd5dbc DS |
1760 | fi dnl GNUTLS not disabled |
1761 | ||
bebd5dbc | 1762 | fi dnl OPENSSL != 1 |
779ca097 | 1763 | |
f3df524b DS |
1764 | dnl --- |
1765 | dnl If GnuTLS is enabled, we MUST verify that it uses libgcrypt since | |
1766 | dnl curl code relies on that but recent GnuTLS versions can in fact build | |
1767 | dnl with different crypto libraries which curl right now cannot handle | |
1768 | dnl --- | |
1769 | ||
1770 | if test "$GNUTLS_ENABLED" = "1"; then | |
1771 | AC_CHECK_LIB(gcrypt, | |
1772 | gcry_control, , | |
1773 | [ | |
1774 | AC_MSG_ERROR([need GnuTLS built with gcrypt to function with GnuTLS]) | |
1775 | ]) | |
1776 | fi | |
1777 | ||
59cf93cc QS |
1778 | dnl --- |
1779 | dnl We require GnuTLS with SRP support. | |
1780 | dnl --- | |
1781 | if test "$GNUTLS_ENABLED" = "1"; then | |
1782 | AC_CHECK_LIB(gnutls, gnutls_srp_verifier, | |
1783 | [ | |
1784 | AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier]) | |
1785 | AC_SUBST(HAVE_GNUTLS_SRP, [1]) | |
1786 | ]) | |
1787 | fi | |
1788 | ||
51427e19 HHC |
1789 | dnl ---------------------------------------------------- |
1790 | dnl check for PolarSSL | |
1791 | dnl ---------------------------------------------------- | |
1792 | ||
1793 | dnl Default to compiler & linker defaults for PolarSSL files & libraries. | |
1794 | OPT_POLARSSL=no | |
1795 | ||
1796 | _cppflags=$CPPFLAGS | |
1797 | _ldflags=$LDFLAGS | |
1798 | AC_ARG_WITH(polarssl,dnl | |
c40ae2cb | 1799 | AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root]) |
51427e19 HHC |
1800 | AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]), |
1801 | OPT_POLARSSL=$withval) | |
1802 | ||
1803 | if test "$OPENSSL_ENABLED" != "1"; then | |
1804 | ||
1805 | if test X"$OPT_POLARSSL" != Xno; then | |
1806 | ||
1807 | if test "$OPT_POLARSSL" = "yes"; then | |
1808 | OPT_POLARSSL="" | |
1809 | fi | |
1810 | ||
1811 | if test -z "$OPT_POLARSSL" ; then | |
1812 | dnl check for lib first without setting any new path | |
1813 | ||
1814 | AC_CHECK_LIB(polarssl, havege_init, | |
1815 | dnl libpolarssl found, set the variable | |
1816 | [ | |
1817 | AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled]) | |
1818 | AC_SUBST(USE_POLARSSL, [1]) | |
1819 | POLARSSL_ENABLED=1 | |
1820 | USE_POLARSSL="yes" | |
1821 | curl_ssl_msg="enabled (PolarSSL)" | |
1822 | ]) | |
1823 | fi | |
1824 | ||
1825 | if test "x$USE_POLARSSL" != "xyes"; then | |
1826 | dnl add the path and test again | |
1827 | addld=-L$OPT_POLARSSL/lib$libsuff | |
1828 | addcflags=-I$OPT_POLARSSL/include | |
1829 | polarssllib=$OPT_POLARSSL/lib$libsuff | |
1830 | ||
1831 | LDFLAGS="$LDFLAGS $addld" | |
1832 | if test "$addcflags" != "-I/usr/include"; then | |
1833 | CPPFLAGS="$CPPFLAGS $addcflags" | |
1834 | fi | |
1835 | ||
1836 | AC_CHECK_LIB(polarssl, ssl_init, | |
1837 | [ | |
1838 | AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled]) | |
1839 | AC_SUBST(USE_POLARSSL, [1]) | |
1840 | POLARSSL_ENABLED=1 | |
1841 | USE_POLARSSL="yes" | |
1842 | curl_ssl_msg="enabled (PolarSSL)" | |
1843 | ], | |
1844 | [ | |
1845 | CPPFLAGS=$_cppflags | |
1846 | LDFLAGS=$_ldflags | |
1847 | ]) | |
1848 | fi | |
1849 | ||
1850 | if test "x$USE_POLARSSL" = "xyes"; then | |
1851 | AC_MSG_NOTICE([detected PolarSSL]) | |
1852 | ||
1853 | CURL_LIBS="$CURL_LIBS -lpolarssl" | |
1854 | LIBS="$LIBS -lpolarssl" | |
1855 | ||
1856 | if test -n "$polarssllib"; then | |
1857 | dnl when shared libs were found in a path that the run-time | |
1858 | dnl linker doesn't search through, we need to add it to | |
1859 | dnl LD_LIBRARY_PATH to prevent further configure tests to fail | |
1860 | dnl due to this | |
1861 | ||
1862 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib" | |
1863 | export LD_LIBRARY_PATH | |
1864 | AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH]) | |
1865 | fi | |
1866 | ||
51427e19 HHC |
1867 | fi |
1868 | ||
1869 | fi dnl PolarSSL not disabled | |
1870 | ||
1871 | fi dnl OPENSSL != 1 | |
1872 | ||
9e60d8fd TO |
1873 | dnl ---------------------------------------------------- |
1874 | dnl check for CyaSSL | |
1875 | dnl ---------------------------------------------------- | |
1876 | ||
1877 | dnl Default to compiler & linker defaults for CyaSSL files & libraries. | |
1878 | OPT_CYASSL=no | |
1879 | ||
1880 | _cppflags=$CPPFLAGS | |
1881 | _ldflags=$LDFLAGS | |
1882 | AC_ARG_WITH(cyassl,dnl | |
1883 | AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: /usr/local/cyassl)]) | |
1884 | AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]), | |
1885 | OPT_CYASSL=$withval) | |
1886 | ||
1887 | if test "$OPENSSL_ENABLED" != "1"; then | |
1888 | ||
1889 | if test X"$OPT_CYASSL" != Xno; then | |
1890 | ||
1891 | if test "$OPT_CYASSL" = "yes"; then | |
1892 | OPT_CYASSL="" | |
1893 | fi | |
1894 | ||
1895 | if test -z "$OPT_CYASSL" ; then | |
1896 | dnl check for lib in default first | |
1897 | ||
1898 | trycyassldir="/usr/local/cyassl" | |
1899 | ||
1900 | LDFLAGS="$LDFLAGS -L$trycyassldir/lib" | |
1901 | CPPFLAGS="$CPPFLAGS -I$trycyassldir/include" | |
1902 | ||
1903 | AC_CHECK_LIB(cyassl, InitCyaSSL, | |
1904 | dnl libcyassl found, set the variable | |
1905 | [ | |
1906 | AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled]) | |
1907 | AC_SUBST(USE_CYASSL, [1]) | |
1908 | CYASSL_ENABLED=1 | |
1909 | USE_CYASSL="yes" | |
1910 | curl_ssl_msg="enabled (CyaSSL)" | |
1911 | ]) | |
1912 | fi | |
1913 | ||
1914 | if test "x$USE_CYASSL" != "xyes"; then | |
1915 | dnl add the path and test again | |
1916 | addld=-L$OPT_CYASSL/lib$libsuff | |
1917 | addcflags=-I$OPT_CYASSL/include | |
1918 | cyassllib=$OPT_CYASSL/lib$libsuff | |
1919 | ||
1920 | LDFLAGS="$LDFLAGS $addld" | |
1921 | if test "$addcflags" != "-I/usr/include"; then | |
1922 | CPPFLAGS="$CPPFLAGS $addcflags" | |
1923 | fi | |
1924 | ||
1925 | AC_CHECK_LIB(cyassl, InitCyaSSL, | |
1926 | [ | |
1927 | AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled]) | |
1928 | AC_SUBST(USE_CYASSL, [1]) | |
1929 | CYASSL_ENABLED=1 | |
1930 | USE_CYASSL="yes" | |
1931 | curl_ssl_msg="enabled (CyaSSL)" | |
1932 | ], | |
1933 | [ | |
1934 | CPPFLAGS=$_cppflags | |
1935 | LDFLAGS=$_ldflags | |
1936 | ]) | |
1937 | fi | |
1938 | ||
1939 | if test "x$USE_CYASSL" = "xyes"; then | |
1940 | AC_MSG_NOTICE([detected CyaSSL]) | |
1941 | ||
1942 | CURL_LIBS="$CURL_LIBS -lcyassl -lm" | |
1943 | LIBS="$LIBS -lcyassl -lm" | |
1944 | ||
1945 | if test -n "$cyassllib"; then | |
1946 | dnl when shared libs were found in a path that the run-time | |
1947 | dnl linker doesn't search through, we need to add it to | |
1948 | dnl LD_LIBRARY_PATH to prevent further configure tests to fail | |
1949 | dnl due to this | |
1950 | ||
1951 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib" | |
1952 | export LD_LIBRARY_PATH | |
1953 | AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH]) | |
1954 | fi | |
1955 | ||
1956 | fi | |
1957 | ||
1958 | fi dnl CyaSSL not disabled | |
1959 | ||
1960 | fi dnl OPENSSL != 1 | |
1961 | ||
7f70dbca DS |
1962 | dnl ---------------------------------------------------- |
1963 | dnl NSS. Only check if GnuTLS and OpenSSL are not enabled | |
1964 | dnl ---------------------------------------------------- | |
1965 | ||
1966 | dnl Default to compiler & linker defaults for NSS files & libraries. | |
1967 | OPT_NSS=no | |
1968 | ||
1969 | AC_ARG_WITH(nss,dnl | |
c40ae2cb | 1970 | AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root]) |
7f70dbca DS |
1971 | AC_HELP_STRING([--without-nss], [disable NSS detection]), |
1972 | OPT_NSS=$withval) | |
1973 | ||
1974 | if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then | |
1975 | ||
1976 | if test X"$OPT_NSS" != Xno; then | |
1977 | if test "x$OPT_NSS" = "xyes"; then | |
b9fdc0c2 DS |
1978 | |
1979 | CURL_CHECK_PKGCONFIG(nss) | |
1980 | ||
1981 | if test "$PKGCONFIG" != "no" ; then | |
1982 | addlib=`$PKGCONFIG --libs nss` | |
1983 | addcflags=`$PKGCONFIG --cflags nss` | |
1984 | version=`$PKGCONFIG --modversion nss` | |
1985 | nssprefix=`$PKGCONFIG --variable=prefix nss` | |
ceda7e98 DS |
1986 | else |
1987 | dnl Without pkg-config, we check for nss-config | |
1988 | ||
1989 | check=`nss-config --version 2>/dev/null` | |
1990 | if test -n "$check"; then | |
1991 | addlib=`nss-config --libs` | |
1992 | addcflags=`nss-config --cflags` | |
1993 | version=`nss-config --version` | |
1994 | nssprefix=`nss-config --prefix` | |
1995 | else | |
1996 | addlib="-lnss3" | |
1997 | addcflags="" | |
1998 | version="unknown" | |
1999 | fi | |
b9fdc0c2 | 2000 | fi |
43442153 KD |
2001 | else |
2002 | # Without pkg-config, we'll kludge in some defaults | |
2003 | addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl" | |
2004 | addcflags="-I$OPT_NSS/include" | |
2005 | version="unknown" | |
eb16c0e1 | 2006 | nssprefix=$OPT_NSS |
7f70dbca | 2007 | fi |
43442153 | 2008 | |
8c3f40ee DS |
2009 | dnl Check for functionPK11_CreateGenericObject |
2010 | dnl this is needed for using the PEM PKCS#11 module | |
20695098 | 2011 | AC_CHECK_LIB(nss3, PK11_CreateGenericObject, |
8c3f40ee DS |
2012 | [ |
2013 | AC_DEFINE(HAVE_PK11_CREATEGENERICOBJECT, 1, [if you have the function PK11_CreateGenericObject]) | |
2014 | AC_SUBST(HAVE_PK11_CREATEGENERICOBJECT, [1]) | |
2015 | ]) | |
7f70dbca DS |
2016 | if test -n "$addlib"; then |
2017 | ||
2018 | CLEANLIBS="$LIBS" | |
2019 | CLEANCPPFLAGS="$CPPFLAGS" | |
e16c1b8e | 2020 | |
7f70dbca DS |
2021 | LIBS="$LIBS $addlib" |
2022 | if test "$addcflags" != "-I/usr/include"; then | |
2023 | CPPFLAGS="$CPPFLAGS $addcflags" | |
2024 | fi | |
e16c1b8e | 2025 | |
7f70dbca DS |
2026 | AC_CHECK_LIB(nss3, NSS_Initialize, |
2027 | [ | |
2028 | AC_DEFINE(USE_NSS, 1, [if NSS is enabled]) | |
2029 | AC_SUBST(USE_NSS, [1]) | |
2030 | USE_NSS="yes" | |
2031 | NSS_ENABLED=1 | |
2032 | curl_ssl_msg="enabled (NSS)" | |
2033 | ], | |
2034 | [ | |
2035 | LIBS="$CLEANLIBS" | |
2036 | CPPFLAGS="$CLEANCPPFLAGS" | |
2037 | ]) | |
e16c1b8e | 2038 | |
7f70dbca DS |
2039 | if test "x$USE_NSS" = "xyes"; then |
2040 | AC_MSG_NOTICE([detected NSS version $version]) | |
2041 | ||
2042 | dnl when shared libs were found in a path that the run-time | |
2043 | dnl linker doesn't search through, we need to add it to | |
2044 | dnl LD_LIBRARY_PATH to prevent further configure tests to fail | |
2045 | dnl due to this | |
2046 | ||
2047 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff" | |
2048 | export LD_LIBRARY_PATH | |
2049 | AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH]) | |
2050 | fi | |
2051 | ||
2052 | fi | |
2053 | ||
2054 | fi dnl NSS not disabled | |
2055 | ||
2056 | fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1 | |
2057 | ||
108d7693 EH |
2058 | OPT_AXTLS=off |
2059 | ||
2060 | AC_ARG_WITH(axtls,dnl | |
68b2a981 | 2061 | AC_HELP_STRING([--with-axtls=PATH],[Where to look for axTLS, PATH points to the axTLS installation prefix (default: /usr/local). Ignored if another SSL engine is selected.]) |
108d7693 EH |
2062 | AC_HELP_STRING([--without-axtls], [disable axTLS]), |
2063 | OPT_AXTLS=$withval) | |
2064 | ||
2065 | if test "$curl_ssl_msg" = "$init_ssl_msg"; then | |
2066 | if test X"$OPT_AXTLS" != Xno; then | |
2067 | dnl backup the pre-axtls variables | |
2068 | CLEANLDFLAGS="$LDFLAGS" | |
2069 | CLEANCPPFLAGS="$CPPFLAGS" | |
2070 | CLEANLIBS="$LIBS" | |
2071 | ||
2072 | case "$OPT_AXTLS" in | |
2073 | yes) | |
2074 | dnl --with-axtls (without path) used | |
68b2a981 DS |
2075 | PREFIX_AXTLS=/usr/local |
2076 | LIB_AXTLS="$PREFIX_AXTLS/lib" | |
2077 | LDFLAGS="$LDFLAGS -L$LIB_AXTLS" | |
2078 | CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include" | |
108d7693 EH |
2079 | ;; |
2080 | off) | |
2081 | dnl no --with-axtls option given, just check default places | |
2082 | PREFIX_AXTLS= | |
2083 | ;; | |
2084 | *) | |
2085 | dnl check the given --with-axtls spot | |
2086 | PREFIX_AXTLS=$OPT_AXTLS | |
68b2a981 | 2087 | LIB_AXTLS="$PREFIX_AXTLS/lib" |
108d7693 | 2088 | LDFLAGS="$LDFLAGS -L$LIB_AXTLS" |
68b2a981 | 2089 | CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include" |
108d7693 EH |
2090 | ;; |
2091 | esac | |
2092 | ||
2093 | AC_CHECK_LIB(axtls, ssl_version,[ | |
2094 | LIBS="-laxtls $LIBS" | |
2095 | AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled]) | |
2096 | AC_SUBST(USE_AXTLS, [1]) | |
2097 | AXTLS_ENABLED=1 | |
2098 | USE_AXTLS="yes" | |
2099 | curl_ssl_msg="enabled (axTLS)" | |
2100 | ||
2101 | ||
2102 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS" | |
2103 | export LD_LIBRARY_PATH | |
2104 | AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH]) | |
2105 | ],[ | |
2106 | LDFLAGS="$CLEANLDFLAGS" | |
2107 | CPPFLAGS="$CLEANCPPFLAGS" | |
2108 | LIBS="$CLEANLIBS" | |
2109 | ]) | |
2110 | fi | |
2111 | fi | |
2112 | ||
9e60d8fd | 2113 | if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED" = "x"; then |
7f70dbca | 2114 | AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.]) |
9e60d8fd | 2115 | AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss or --with-axtls to address this.]) |
57d2fb41 DS |
2116 | else |
2117 | # SSL is enabled, genericly | |
2118 | AC_SUBST(SSL_ENABLED) | |
2119 | SSL_ENABLED="1" | |
7f70dbca DS |
2120 | fi |
2121 | ||
779ca097 DS |
2122 | dnl ********************************************************************** |
2123 | dnl Check for the CA bundle | |
2124 | dnl ********************************************************************** | |
2125 | ||
fb23b857 | 2126 | CURL_CHECK_CA_BUNDLE |
779ca097 | 2127 | |
62ed5530 DF |
2128 | dnl ********************************************************************** |
2129 | dnl Check for the presence of LIBSSH2 libraries and headers | |
2130 | dnl ********************************************************************** | |
2131 | ||
2132 | dnl Default to compiler & linker defaults for LIBSSH2 files & libraries. | |
2133 | OPT_LIBSSH2=off | |
2134 | AC_ARG_WITH(libssh2,dnl | |
c40ae2cb | 2135 | AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) |
62ed5530 DF |
2136 | AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]), |
2137 | OPT_LIBSSH2=$withval) | |
2138 | ||
2139 | if test X"$OPT_LIBSSH2" != Xno; then | |
2140 | dnl backup the pre-libssh2 variables | |
2141 | CLEANLDFLAGS="$LDFLAGS" | |
2142 | CLEANCPPFLAGS="$CPPFLAGS" | |
2143 | CLEANLIBS="$LIBS" | |
2144 | ||
2145 | case "$OPT_LIBSSH2" in | |
2146 | yes) | |
2147 | dnl --with-libssh2 (without path) used | |
1951cd1e DS |
2148 | CURL_CHECK_PKGCONFIG(libssh2) |
2149 | ||
2150 | if test "$PKGCONFIG" != "no" ; then | |
2151 | LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2` | |
2152 | LD_SSH2=`$PKGCONFIG --libs-only-L libssh2` | |
2153 | CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2` | |
2154 | version=`$PKGCONFIG --modversion libssh2` | |
2155 | DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'` | |
2156 | fi | |
43442153 | 2157 | |
62ed5530 DF |
2158 | ;; |
2159 | off) | |
2160 | dnl no --with-libssh2 option given, just check default places | |
62ed5530 DF |
2161 | ;; |
2162 | *) | |
2163 | dnl use the given --with-libssh2 spot | |
1951cd1e | 2164 | PREFIX_SSH2=$OPT_LIBSSH2 |
62ed5530 DF |
2165 | ;; |
2166 | esac | |
2167 | ||
1951cd1e DS |
2168 | dnl if given with a prefix, we set -L and -I based on that |
2169 | if test -n "$PREFIX_SSH2"; then | |
fde79589 | 2170 | LIB_SSH2="-lssh2" |
9fced16e | 2171 | LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff |
1951cd1e | 2172 | CPP_SSH2=-I${PREFIX_SSH2}/include |
9fced16e | 2173 | DIR_SSH2=${PREFIX_SSH2}/lib$libsuff |
1951cd1e DS |
2174 | fi |
2175 | ||
2176 | LDFLAGS="$LDFLAGS $LD_SSH2" | |
2177 | CPPFLAGS="$CPPFLAGS $CPP_SSH2" | |
2178 | LIBS="$LIBS $LIB_SSH2" | |
2179 | ||
62ed5530 DF |
2180 | AC_CHECK_LIB(ssh2, libssh2_channel_open_ex) |
2181 | ||
2182 | AC_CHECK_HEADERS(libssh2.h, | |
2183 | curl_ssh_msg="enabled (libSSH2)" | |
2184 | LIBSSH2_ENABLED=1 | |
2185 | AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use]) | |
2186 | AC_SUBST(USE_LIBSSH2, [1]) | |
2187 | ) | |
2188 | ||
2189 | if test X"$OPT_LIBSSH2" != Xoff && | |
2190 | test "$LIBSSH2_ENABLED" != "1"; then | |
2191 | AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!]) | |
2192 | fi | |
2193 | ||
2194 | if test "$LIBSSH2_ENABLED" = "1"; then | |
9fced16e | 2195 | if test -n "$DIR_SSH2"; then |
62ed5530 DF |
2196 | dnl when the libssh2 shared libs were found in a path that the run-time |
2197 | dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH | |
2198 | dnl to prevent further configure tests to fail due to this | |
2199 | ||
2200 | dnl libssh2_version is a post 1.0 addition | |
6be508dc | 2201 | dnl libssh2_init and libssh2_exit were added in 1.2.5 |
f8cf037e | 2202 | dnl libssh2_scp_send64 was added in 1.2.6 |
e214cd4a | 2203 | dnl libssh2_session_handshake was added in 1.2.8 |
f8cf037e | 2204 | AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \ |
e214cd4a | 2205 | libssh2_scp_send64 libssh2_session_handshake) |
62ed5530 | 2206 | |
1951cd1e | 2207 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2" |
62ed5530 | 2208 | export LD_LIBRARY_PATH |
1951cd1e | 2209 | AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH]) |
62ed5530 DF |
2210 | fi |
2211 | else | |
2212 | dnl no libssh2, revert back to clean variables | |
2213 | LDFLAGS=$CLEANLDFLAGS | |
2214 | CPPFLAGS=$CLEANCPPFLAGS | |
2215 | LIBS=$CLEANLIBS | |
2216 | fi | |
2217 | fi | |
2218 | ||
04cb15ae HC |
2219 | dnl ********************************************************************** |
2220 | dnl Check for the presence of LIBRTMP libraries and headers | |
2221 | dnl ********************************************************************** | |
2222 | ||
2223 | dnl Default to compiler & linker defaults for LIBRTMP files & libraries. | |
2224 | OPT_LIBRTMP=off | |
2225 | AC_ARG_WITH(librtmp,dnl | |
c40ae2cb | 2226 | AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) |
04cb15ae HC |
2227 | AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]), |
2228 | OPT_LIBRTMP=$withval) | |
2229 | ||
2230 | if test X"$OPT_LIBRTMP" != Xno; then | |
2231 | dnl backup the pre-librtmp variables | |
2232 | CLEANLDFLAGS="$LDFLAGS" | |
2233 | CLEANCPPFLAGS="$CPPFLAGS" | |
2234 | CLEANLIBS="$LIBS" | |
2235 | ||
2236 | case "$OPT_LIBRTMP" in | |
2237 | yes) | |
2238 | dnl --with-librtmp (without path) used | |
2239 | CURL_CHECK_PKGCONFIG(librtmp) | |
2240 | ||
2241 | if test "$PKGCONFIG" != "no" ; then | |
2242 | LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp` | |
2243 | LD_RTMP=`$PKGCONFIG --libs-only-L librtmp` | |
2244 | CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp` | |
2245 | version=`$PKGCONFIG --modversion librtmp` | |
2246 | DIR_RTMP=`echo $LD_RTMP | $SED -e 's/-L//'` | |
5046dd02 JC |
2247 | else |
2248 | dnl To avoid link errors, we do not allow --librtmp without | |
2249 | dnl a pkgconfig file | |
2250 | AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.]) | |
04cb15ae HC |
2251 | fi |
2252 | ||
2253 | ;; | |
2254 | off) | |
2255 | dnl no --with-librtmp option given, just check default places | |
5fcc4332 | 2256 | LIB_RTMP="-lrtmp" |
04cb15ae HC |
2257 | ;; |
2258 | *) | |
2259 | dnl use the given --with-librtmp spot | |
2260 | PREFIX_RTMP=$OPT_LIBRTMP | |
2261 | ;; | |
2262 | esac | |
2263 | ||
2264 | dnl if given with a prefix, we set -L and -I based on that | |
2265 | if test -n "$PREFIX_RTMP"; then | |
2266 | LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff | |
2267 | CPP_RTMP=-I${PREFIX_RTMP}/include | |
2268 | DIR_RTMP=${PREFIX_RTMP}/lib$libsuff | |
2269 | fi | |
2270 | ||
2271 | LDFLAGS="$LDFLAGS $LD_RTMP" | |
2272 | CPPFLAGS="$CPPFLAGS $CPP_RTMP" | |
2273 | LIBS="$LIBS $LIB_RTMP" | |
2274 | ||
5fcc4332 DS |
2275 | AC_CHECK_LIB(rtmp, RTMP_Init, |
2276 | [ | |
2277 | AC_CHECK_HEADERS(librtmp/rtmp.h, | |
2278 | curl_rtmp_msg="enabled (librtmp)" | |
2279 | LIBRTMP_ENABLED=1 | |
2280 | AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use]) | |
2281 | AC_SUBST(USE_LIBRTMP, [1]) | |
2282 | ) | |
2283 | ], | |
2284 | dnl not found, revert back to clean variables | |
2285 | LDFLAGS=$CLEANLDFLAGS | |
2286 | CPPFLAGS=$CLEANCPPFLAGS | |
2287 | LIBS=$CLEANLIBS | |
04cb15ae HC |
2288 | ) |
2289 | ||
2290 | if test X"$OPT_LIBRTMP" != Xoff && | |
2291 | test "$LIBRTMP_ENABLED" != "1"; then | |
2292 | AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!]) | |
2293 | fi | |
2294 | ||
04cb15ae HC |
2295 | fi |
2296 | ||
c461254d DF |
2297 | dnl ********************************************************************** |
2298 | dnl Check for the presence of IDN libraries and headers | |
2299 | dnl ********************************************************************** | |
2300 | ||
cff90cf3 | 2301 | AC_MSG_CHECKING([whether to build with libidn]) |
96002646 | 2302 | AC_ARG_WITH(libidn, |
cff90cf3 DS |
2303 | AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage]) |
2304 | AC_HELP_STRING([--without-libidn],[Disable libidn usage]), | |
96002646 | 2305 | [LIBIDN="$withval"]) |
cff90cf3 DS |
2306 | |
2307 | case "$LIBIDN" in | |
2308 | no) | |
2309 | AC_MSG_RESULT(no) | |
2310 | ;; | |
2311 | *) AC_MSG_RESULT(yes) | |
19a568a9 DS |
2312 | |
2313 | idn="" | |
2314 | dnl if there is a given path, check that FIRST | |
7bb6d76d DS |
2315 | if test -n "$LIBIDN"; then |
2316 | if test "x$LIBIDN" != "xyes"; then | |
7bb6d76d DS |
2317 | oldLDFLAGS=$LDFLAGS |
2318 | oldCPPFLAGS=$CPPFLAGS | |
2319 | LDFLAGS="$LDFLAGS -L$LIBIDN/lib" | |
2320 | CPPFLAGS="$CPPFLAGS -I$LIBIDN/include" | |
2321 | idn="yes" | |
2322 | AC_CHECK_LIB(idn, idna_to_ascii_4i, , | |
2323 | idn="" | |
2324 | LDFLAGS=$oldLDFLAGS | |
2325 | CPPFLAGS=$oldCPPFLAGS) | |
2326 | fi | |
19a568a9 DS |
2327 | fi |
2328 | ||
2329 | if test "x$idn" != "xyes"; then | |
2330 | dnl check with default paths | |
8c16696f | 2331 | idn="yes" |
19a568a9 DS |
2332 | AC_CHECK_LIB(idn, idna_to_ascii_lz, , |
2333 | idn="") | |
2334 | fi | |
2335 | ||
2336 | if test "x$idn" = "xyes"; then | |
cff90cf3 | 2337 | curl_idn_msg="enabled" |
d6460aff | 2338 | AC_SUBST(IDN_ENABLED, [1]) |
4e7575fc | 2339 | dnl different versions of libidn have different setups of these: |
1239e483 | 2340 | AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror) |
c6881660 | 2341 | AC_CHECK_HEADERS( idn-free.h tld.h ) |
cff90cf3 | 2342 | fi |
e16c1b8e GK |
2343 | |
2344 | ;; | |
cff90cf3 DS |
2345 | esac |
2346 | ||
0eace2fe DS |
2347 | |
2348 | dnl Let's hope this split URL remains working: | |
2349 | dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \ | |
2350 | dnl genprogc/thread_quick_ref.htm | |
abd65e21 | 2351 | |
abd65e21 | 2352 | |
ae1912cb DS |
2353 | dnl ********************************************************************** |
2354 | dnl Back to "normal" configuring | |
2355 | dnl ********************************************************************** | |
2356 | ||
2357 | dnl Checks for header files. | |
2358 | AC_HEADER_STDC | |
075c5342 | 2359 | |
4d95d23d | 2360 | CURL_CHECK_HEADER_MALLOC |
9770899a | 2361 | CURL_CHECK_HEADER_MEMORY |
a6a5bba0 YT |
2362 | |
2363 | dnl Now check for the very most basic headers. Then we can use these | |
075c5342 DS |
2364 | dnl ones as default-headers when checking for the rest! |
2365 | AC_CHECK_HEADERS( | |
2366 | sys/types.h \ | |
2367 | sys/time.h \ | |
2368 | sys/select.h \ | |
2369 | sys/socket.h \ | |
a4351517 | 2370 | sys/ioctl.h \ |
aa41743e | 2371 | sys/uio.h \ |
24ac5b8a | 2372 | assert.h \ |
ae1912cb | 2373 | unistd.h \ |
8898ff9e | 2374 | stdlib.h \ |
3d66d10f | 2375 | limits.h \ |
ae1912cb DS |
2376 | arpa/inet.h \ |
2377 | net/if.h \ | |
2378 | netinet/in.h \ | |
3d29bda9 | 2379 | sys/un.h \ |
43137cf5 | 2380 | netinet/tcp.h \ |
ae1912cb | 2381 | netdb.h \ |
ae1912cb DS |
2382 | sys/sockio.h \ |
2383 | sys/stat.h \ | |
ae1912cb DS |
2384 | sys/param.h \ |
2385 | termios.h \ | |
2386 | termio.h \ | |
2387 | sgtty.h \ | |
2388 | fcntl.h \ | |
ae1912cb | 2389 | alloca.h \ |
ae1912cb DS |
2390 | time.h \ |
2391 | io.h \ | |
5900c0f7 | 2392 | pwd.h \ |
82d3ded9 | 2393 | utime.h \ |
3c49b405 | 2394 | sys/utime.h \ |
99dfdebc | 2395 | sys/poll.h \ |
bdb2beb8 | 2396 | poll.h \ |
37eba370 | 2397 | socket.h \ |
a4e1ac79 | 2398 | sys/resource.h \ |
8e872231 | 2399 | libgen.h \ |
82d6cfa7 | 2400 | locale.h \ |
65dbee01 | 2401 | errno.h \ |
69565afa | 2402 | stdbool.h \ |
528a149d DS |
2403 | arpa/tftp.h \ |
2404 | sys/filio.h \ | |
075c5342 DS |
2405 | setjmp.h, |
2406 | dnl to do if not found | |
2407 | [], | |
2408 | dnl to do if found | |
2409 | [], | |
2410 | dnl default includes | |
2411 | [ | |
2412 | #ifdef HAVE_SYS_TYPES_H | |
2413 | #include <sys/types.h> | |
2414 | #endif | |
2415 | #ifdef HAVE_SYS_TIME_H | |
2416 | #include <sys/time.h> | |
2417 | #endif | |
2418 | #ifdef HAVE_SYS_SELECT_H | |
2419 | #include <sys/select.h> | |
2420 | #endif | |
2421 | #ifdef HAVE_SYS_SOCKET_H | |
2422 | #include <sys/socket.h> | |
2423 | #endif | |
d85c2199 DS |
2424 | #ifdef HAVE_NETINET_IN_H |
2425 | #include <netinet/in.h> | |
2426 | #endif | |
3d29bda9 DS |
2427 | #ifdef HAVE_SYS_UN_H |
2428 | #include <sys/un.h> | |
2429 | #endif | |
075c5342 | 2430 | ] |
ae1912cb DS |
2431 | ) |
2432 | ||
ae1912cb DS |
2433 | dnl Checks for typedefs, structures, and compiler characteristics. |
2434 | AC_C_CONST | |
273b2b23 | 2435 | CURL_CHECK_VARIADIC_MACROS |
ae1912cb DS |
2436 | AC_TYPE_SIZE_T |
2437 | AC_HEADER_TIME | |
32ac4ede | 2438 | CURL_CHECK_STRUCT_TIMEVAL |
67e8d229 | 2439 | CURL_VERIFY_RUNTIMELIBS |
ae1912cb | 2440 | |
78e6508e | 2441 | AC_CHECK_SIZEOF(size_t) |
af677c4e | 2442 | AC_CHECK_SIZEOF(long) |
80443661 YT |
2443 | AC_CHECK_SIZEOF(int) |
2444 | AC_CHECK_SIZEOF(short) | |
a06e0779 | 2445 | CURL_CONFIGURE_LONG |
cd73a733 | 2446 | AC_CHECK_SIZEOF(time_t) |
e2c81773 | 2447 | AC_CHECK_SIZEOF(off_t) |
ae1912cb | 2448 | |
3f3d6ebe | 2449 | soname_bump=no |
243cf297 YT |
2450 | if test x"$ac_cv_native_windows" != "xyes" && |
2451 | test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then | |
3f3d6ebe DS |
2452 | AC_MSG_WARN([This libcurl built is probably not ABI compatible with previous]) |
2453 | AC_MSG_WARN([builds! You MUST read lib/README.curl_off_t to figure it out.]) | |
2454 | soname_bump=yes | |
2455 | fi | |
2456 | ||
2457 | ||
a147a079 | 2458 | AC_CHECK_TYPE(long long, |
ceb49d37 YT |
2459 | [AC_DEFINE(HAVE_LONGLONG, 1, |
2460 | [Define to 1 if the compiler supports the 'long long' data type.])] | |
e16c1b8e | 2461 | longlong="yes" |
af677c4e DS |
2462 | ) |
2463 | ||
2464 | if test "xyes" = "x$longlong"; then | |
2465 | AC_MSG_CHECKING([if numberLL works]) | |
465865c3 YT |
2466 | AC_COMPILE_IFELSE([ |
2467 | AC_LANG_PROGRAM([[ | |
2468 | ]],[[ | |
2469 | long long val = 1000LL; | |
2470 | ]]) | |
2471 | ],[ | |
2472 | AC_MSG_RESULT([yes]) | |
2473 | AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL]) | |
2474 | ],[ | |
2475 | AC_MSG_RESULT([no]) | |
2476 | ]) | |
af677c4e DS |
2477 | fi |
2478 | ||
ae1912cb | 2479 | |
61e2a810 | 2480 | # check for ssize_t |
a147a079 DS |
2481 | AC_CHECK_TYPE(ssize_t, , |
2482 | AC_DEFINE(ssize_t, int, [the signed version of size_t])) | |
61e2a810 | 2483 | |
69565afa YT |
2484 | # check for bool type |
2485 | AC_CHECK_TYPE([bool],[ | |
2486 | AC_DEFINE(HAVE_BOOL_T, 1, | |
2487 | [Define to 1 if bool is an available type.]) | |
2488 | ], ,[ | |
2a6a22a3 YT |
2489 | #ifdef HAVE_SYS_TYPES_H |
2490 | #include <sys/types.h> | |
2491 | #endif | |
69565afa YT |
2492 | #ifdef HAVE_STDBOOL_H |
2493 | #include <stdbool.h> | |
2494 | #endif | |
2495 | ]) | |
2496 | ||
8611631f YT |
2497 | CURL_CONFIGURE_CURL_SOCKLEN_T |
2498 | ||
d09b4369 | 2499 | TYPE_IN_ADDR_T |
11693c0f | 2500 | |
a31ddd36 DS |
2501 | TYPE_SOCKADDR_STORAGE |
2502 | ||
73226415 YT |
2503 | TYPE_SIG_ATOMIC_T |
2504 | ||
a46f55b9 YT |
2505 | AC_TYPE_SIGNAL |
2506 | ||
9346e55d | 2507 | CURL_CHECK_FUNC_SELECT |
ad05d0a8 | 2508 | |
01fa02d0 | 2509 | CURL_CHECK_FUNC_RECV |
a9dc9005 | 2510 | CURL_CHECK_FUNC_RECVFROM |
01fa02d0 | 2511 | CURL_CHECK_FUNC_SEND |
77b3bc23 YT |
2512 | CURL_CHECK_MSG_NOSIGNAL |
2513 | ||
4e4f6c1e | 2514 | CURL_CHECK_FUNC_ALARM |
6d4e6cc8 | 2515 | CURL_CHECK_FUNC_BASENAME |
40b2f255 | 2516 | CURL_CHECK_FUNC_CLOSESOCKET |
d6d63147 | 2517 | CURL_CHECK_FUNC_CLOSESOCKET_CAMEL |
1ff4e900 | 2518 | CURL_CHECK_FUNC_CONNECT |
17d2a464 | 2519 | CURL_CHECK_FUNC_FCNTL |
b93ad10f | 2520 | CURL_CHECK_FUNC_FDOPEN |
33319f5d | 2521 | CURL_CHECK_FUNC_FREEADDRINFO |
9717ccb7 | 2522 | CURL_CHECK_FUNC_FREEIFADDRS |
2b2ac906 | 2523 | CURL_CHECK_FUNC_FSETXATTR |
fce9c3a9 | 2524 | CURL_CHECK_FUNC_FTRUNCATE |
0989cd35 | 2525 | CURL_CHECK_FUNC_GETADDRINFO |
c33aee16 | 2526 | CURL_CHECK_FUNC_GAI_STRERROR |
9b12f096 | 2527 | CURL_CHECK_FUNC_GETHOSTBYADDR |
d84440d5 | 2528 | CURL_CHECK_FUNC_GETHOSTBYADDR_R |
9b12f096 | 2529 | CURL_CHECK_FUNC_GETHOSTBYNAME |
d84440d5 | 2530 | CURL_CHECK_FUNC_GETHOSTBYNAME_R |
d7e406e0 | 2531 | CURL_CHECK_FUNC_GETHOSTNAME |
9717ccb7 | 2532 | CURL_CHECK_FUNC_GETIFADDRS |
0c1ae21c | 2533 | CURL_CHECK_FUNC_GETSERVBYPORT_R |
ea1362a9 | 2534 | CURL_CHECK_FUNC_GMTIME_R |
006cab3e | 2535 | CURL_CHECK_FUNC_INET_NTOA_R |
267b9423 | 2536 | CURL_CHECK_FUNC_INET_NTOP |
4d437416 | 2537 | CURL_CHECK_FUNC_INET_PTON |
17d2a464 YT |
2538 | CURL_CHECK_FUNC_IOCTL |
2539 | CURL_CHECK_FUNC_IOCTLSOCKET | |
2540 | CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL | |
d7e406e0 | 2541 | CURL_CHECK_FUNC_LOCALTIME_R |
b64dd3c6 | 2542 | CURL_CHECK_FUNC_MEMRCHR |
debe0b56 | 2543 | CURL_CHECK_FUNC_POLL |
17d2a464 | 2544 | CURL_CHECK_FUNC_SETSOCKOPT |
969903eb | 2545 | CURL_CHECK_FUNC_SIGACTION |
83c199bb YT |
2546 | CURL_CHECK_FUNC_SIGINTERRUPT |
2547 | CURL_CHECK_FUNC_SIGNAL | |
2548 | CURL_CHECK_FUNC_SIGSETJMP | |
40b2f255 | 2549 | CURL_CHECK_FUNC_SOCKET |
4c621bc6 YT |
2550 | CURL_CHECK_FUNC_STRCASECMP |
2551 | CURL_CHECK_FUNC_STRCASESTR | |
2552 | CURL_CHECK_FUNC_STRCMPI | |
fce9c3a9 | 2553 | CURL_CHECK_FUNC_STRDUP |
b93ad10f | 2554 | CURL_CHECK_FUNC_STRERROR_R |
4c621bc6 YT |
2555 | CURL_CHECK_FUNC_STRICMP |
2556 | CURL_CHECK_FUNC_STRLCAT | |
2557 | CURL_CHECK_FUNC_STRNCASECMP | |
2558 | CURL_CHECK_FUNC_STRNCMPI | |
2559 | CURL_CHECK_FUNC_STRNICMP | |
d7e406e0 | 2560 | CURL_CHECK_FUNC_STRSTR |
969903eb | 2561 | CURL_CHECK_FUNC_STRTOK_R |
ea1362a9 | 2562 | CURL_CHECK_FUNC_STRTOLL |
aa41743e | 2563 | CURL_CHECK_FUNC_WRITEV |
ea1362a9 | 2564 | |
74e5beab DS |
2565 | case $host in |
2566 | *msdosdjgpp) | |
2567 | ac_cv_func_pipe=no | |
2568 | skipcheck_pipe=yes | |
2569 | AC_MSG_NOTICE([skip check for pipe on msdosdjgpp]) | |
2570 | ;; | |
2571 | esac | |
357389a9 | 2572 | |
6d4e6cc8 | 2573 | AC_CHECK_FUNCS([fork \ |
357389a9 | 2574 | geteuid \ |
357389a9 YT |
2575 | getpass_r \ |
2576 | getppid \ | |
2577 | getprotobyname \ | |
2578 | getpwuid \ | |
2579 | getrlimit \ | |
2580 | gettimeofday \ | |
2581 | inet_addr \ | |
357389a9 YT |
2582 | perror \ |
2583 | pipe \ | |
357389a9 YT |
2584 | setlocale \ |
2585 | setmode \ | |
2586 | setrlimit \ | |
357389a9 YT |
2587 | uname \ |
2588 | utime | |
2589 | ],[ | |
2590 | ],[ | |
2591 | func="$ac_func" | |
2592 | eval skipcheck=\$skipcheck_$func | |
2593 | if test "x$skipcheck" != "xyes"; then | |
2594 | AC_MSG_CHECKING([deeper for $func]) | |
2595 | AC_LINK_IFELSE([ | |
2596 | AC_LANG_PROGRAM([[ | |
2597 | ]],[[ | |
2598 | $func (); | |
2599 | ]]) | |
2600 | ],[ | |
2601 | AC_MSG_RESULT([yes]) | |
2602 | eval "ac_cv_func_$func=yes" | |
f32dc6b8 | 2603 | AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1], |
357389a9 YT |
2604 | [Define to 1 if you have the $func function.]) |
2605 | ],[ | |
2606 | AC_MSG_RESULT([but still no]) | |
2607 | ]) | |
2608 | fi | |
2609 | ]) | |
2610 | ||
e4388643 YT |
2611 | dnl Check if the getnameinfo function is available |
2612 | dnl and get the types of five of its arguments. | |
2613 | CURL_CHECK_FUNC_GETNAMEINFO | |
2e5cccd1 | 2614 | |
bec19771 | 2615 | if test "$ipv6" = "yes"; then |
0989cd35 YT |
2616 | if test "$ac_cv_func_getaddrinfo" = "yes"; then |
2617 | AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support]) | |
2618 | IPV6_ENABLED=1 | |
2619 | AC_SUBST(IPV6_ENABLED) | |
2620 | fi | |
bec19771 YT |
2621 | CURL_CHECK_NI_WITHSCOPEID |
2622 | fi | |
2623 | ||
17d2a464 YT |
2624 | dnl ************************************************************ |
2625 | dnl enable non-blocking communications | |
2626 | dnl | |
2627 | CURL_CHECK_OPTION_NONBLOCKING | |
2628 | CURL_CHECK_NONBLOCKING_SOCKET | |
2629 | ||
2630 | dnl ************************************************************ | |
2631 | dnl nroff tool stuff | |
2632 | dnl | |
a7b99fc4 | 2633 | |
e16c1b8e | 2634 | AC_PATH_PROG( PERL, perl, , |
7dc36344 DS |
2635 | $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) |
2636 | AC_SUBST(PERL) | |
ae1912cb | 2637 | |
e16c1b8e | 2638 | AC_PATH_PROGS( NROFF, gnroff nroff, , |
ae1912cb | 2639 | $PATH:/usr/bin/:/usr/local/bin ) |
96dde76b | 2640 | AC_SUBST(NROFF) |
ae1912cb | 2641 | |
773e7e87 DS |
2642 | if test -n "$NROFF"; then |
2643 | dnl only check for nroff options if an nroff command was found | |
2644 | ||
2645 | AC_MSG_CHECKING([how to use *nroff to get plain text from man pages]) | |
2646 | MANOPT="-man" | |
37685848 DS |
2647 | mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` |
2648 | if test -z "$mancheck"; then | |
773e7e87 DS |
2649 | MANOPT="-mandoc" |
2650 | mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` | |
2651 | if test -z "$mancheck"; then | |
2652 | MANOPT="" | |
2653 | AC_MSG_RESULT([failed]) | |
2654 | AC_MSG_WARN([found no *nroff option to get plaintext from man pages]) | |
2655 | else | |
2656 | AC_MSG_RESULT([$MANOPT]) | |
2657 | fi | |
37685848 DS |
2658 | else |
2659 | AC_MSG_RESULT([$MANOPT]) | |
2660 | fi | |
773e7e87 DS |
2661 | AC_SUBST(MANOPT) |
2662 | fi | |
2663 | ||
2664 | if test -z "$MANOPT" | |
2665 | then | |
2666 | dnl if no nroff tool was found, or no option that could convert man pages | |
2667 | dnl was found, then disable the built-in manual stuff | |
2668 | AC_MSG_WARN([disabling built-in manual]) | |
2669 | USE_MANUAL="no"; | |
37685848 | 2670 | fi |
37685848 | 2671 | |
f3663a9d DS |
2672 | dnl ************************************************************************* |
2673 | dnl If the manual variable still is set, then we go with providing a built-in | |
2674 | dnl manual | |
2675 | ||
2676 | if test "$USE_MANUAL" = "1"; then | |
2677 | AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual]) | |
cff90cf3 | 2678 | curl_manual_msg="enabled" |
f3663a9d DS |
2679 | fi |
2680 | ||
2681 | dnl set variable for use in automakefile(s) | |
2682 | AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1) | |
2683 | ||
22ed0f50 YT |
2684 | CURL_CHECK_LIB_ARES |
2685 | AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes) | |
cd5e6743 | 2686 | |
15aeb94f YT |
2687 | if test "x$ac_cv_native_windows" != "xyes" && |
2688 | test "x$enable_shared" = "xyes"; then | |
b24e8725 YT |
2689 | build_libhostname=yes |
2690 | else | |
2691 | build_libhostname=no | |
2692 | fi | |
cfbdbf97 | 2693 | AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes) |
b24e8725 | 2694 | |
79dc74e8 DS |
2695 | CURL_CHECK_OPTION_THREADED_RESOLVER |
2696 | ||
2697 | if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then | |
2698 | AC_MSG_ERROR( | |
2699 | [Options --enable-threaded-resolver and --enable-ares are mutually exclusive]) | |
2700 | fi | |
2701 | ||
2702 | if test "$want_thres" = "yes"; then | |
2703 | AC_CHECK_HEADER(pthread.h, | |
2704 | [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>]) | |
2705 | save_CFLAGS="$CFLAGS" | |
2706 | CFLAGS="$CFLAGS -pthread" | |
2707 | AC_CHECK_LIB(pthread, pthread_create, | |
2708 | [ AC_MSG_NOTICE([using POSIX threaded DNS lookup]) | |
2709 | AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup]) | |
2710 | USE_THREADS_POSIX=1 | |
2711 | curl_res_msg="threaded" | |
2712 | ], | |
2713 | [ CFLAGS="$save_CFLAGS"]) | |
2714 | ]) | |
2715 | fi | |
2716 | ||
710e370c DS |
2717 | dnl ************************************************************ |
2718 | dnl disable verbose text strings | |
2719 | dnl | |
2720 | AC_MSG_CHECKING([whether to enable verbose strings]) | |
2721 | AC_ARG_ENABLE(verbose, | |
2722 | AC_HELP_STRING([--enable-verbose],[Enable verbose strings]) | |
2723 | AC_HELP_STRING([--disable-verbose],[Disable verbose strings]), | |
2724 | [ case "$enableval" in | |
2725 | no) | |
2726 | AC_MSG_RESULT(no) | |
2727 | AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings]) | |
710e370c DS |
2728 | curl_verbose_msg="no" |
2729 | ;; | |
2730 | *) AC_MSG_RESULT(yes) | |
2731 | ;; | |
2732 | esac ], | |
2733 | AC_MSG_RESULT(yes) | |
2734 | ) | |
2735 | ||
8ed31c48 DS |
2736 | dnl ************************************************************ |
2737 | dnl enable SSPI support | |
2738 | dnl | |
d8d3dc93 | 2739 | AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)]) |
8ed31c48 DS |
2740 | AC_ARG_ENABLE(sspi, |
2741 | AC_HELP_STRING([--enable-sspi],[Enable SSPI]) | |
2742 | AC_HELP_STRING([--disable-sspi],[Disable SSPI]), | |
2743 | [ case "$enableval" in | |
2744 | yes) | |
d8d3dc93 YT |
2745 | if test "$ac_cv_native_windows" = "yes"; then |
2746 | AC_MSG_RESULT(yes) | |
2747 | AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support]) | |
9b23b310 | 2748 | AC_SUBST(USE_WINDOWS_SSPI, [1]) |
4a8a7314 | 2749 | curl_sspi_msg="enabled" |
d8d3dc93 YT |
2750 | else |
2751 | AC_MSG_RESULT(no) | |
2752 | AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.]) | |
2753 | fi | |
8ed31c48 DS |
2754 | ;; |
2755 | *) | |
2756 | AC_MSG_RESULT(no) | |
2757 | ;; | |
2758 | esac ], | |
2759 | AC_MSG_RESULT(no) | |
2760 | ) | |
2761 | ||
94043b11 DS |
2762 | dnl ************************************************************ |
2763 | dnl disable cryptographic authentication | |
2764 | dnl | |
2765 | AC_MSG_CHECKING([whether to enable cryptographic authentication methods]) | |
2766 | AC_ARG_ENABLE(crypto-auth, | |
2767 | AC_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication]) | |
2768 | AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]), | |
2769 | [ case "$enableval" in | |
2770 | no) | |
2771 | AC_MSG_RESULT(no) | |
2772 | AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication]) | |
94043b11 DS |
2773 | ;; |
2774 | *) AC_MSG_RESULT(yes) | |
2775 | ;; | |
2776 | esac ], | |
2777 | AC_MSG_RESULT(yes) | |
2778 | ) | |
2779 | ||
59cf93cc QS |
2780 | dnl ************************************************************ |
2781 | dnl disable TLS-SRP authentication | |
2782 | dnl | |
2783 | AC_MSG_CHECKING([whether to enable TLS-SRP authentication]) | |
2784 | AC_ARG_ENABLE(tls-srp, | |
2785 | AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication]) | |
2786 | AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]), | |
2787 | [ case "$enableval" in | |
2788 | no) | |
2789 | AC_MSG_RESULT(no) | |
2790 | AC_DEFINE(CURL_DISABLE_TLS_SRP, 1, [to disable TLS-SRP authentication]) | |
2791 | want_tls_srp=no | |
2792 | ;; | |
2793 | *) AC_MSG_RESULT(yes) | |
2794 | want_tls_srp=yes | |
2795 | ;; | |
2796 | esac ], | |
2797 | AC_MSG_RESULT(yes) | |
2798 | want_tls_srp=yes | |
2799 | ) | |
2800 | ||
2531cd94 | 2801 | if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_SSLEAY_SRP" = "x1") ; then |
59cf93cc | 2802 | AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication]) |
4ba3d8bd | 2803 | USE_TLS_SRP=1 |
59cf93cc QS |
2804 | curl_tls_srp_msg="enabled" |
2805 | fi | |
2806 | ||
ac269a8f DS |
2807 | dnl ************************************************************ |
2808 | dnl disable cookies support | |
2809 | dnl | |
2810 | AC_MSG_CHECKING([whether to enable support for cookies]) | |
2811 | AC_ARG_ENABLE(cookies, | |
2812 | AC_HELP_STRING([--enable-cookies],[Enable cookies support]) | |
2813 | AC_HELP_STRING([--disable-cookies],[Disable cookies support]), | |
2814 | [ case "$enableval" in | |
2815 | no) | |
2816 | AC_MSG_RESULT(no) | |
2817 | AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support]) | |
ac269a8f DS |
2818 | ;; |
2819 | *) AC_MSG_RESULT(yes) | |
2820 | ;; | |
2821 | esac ], | |
2822 | AC_MSG_RESULT(yes) | |
2823 | ) | |
2824 | ||
59582a9d DF |
2825 | dnl ************************************************************ |
2826 | dnl Enable hiding of internal symbols in library to reduce its size and | |
2827 | dnl speed dynamic linking of applications. This currently is only supported | |
10489879 | 2828 | dnl on gcc >= 4.0 and SunPro C. |
59582a9d DF |
2829 | dnl |
2830 | AC_MSG_CHECKING([whether to enable hidden symbols in the library]) | |
2831 | AC_ARG_ENABLE(hidden-symbols, | |
10489879 | 2832 | AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library]) |
59582a9d DF |
2833 | AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]), |
2834 | [ case "$enableval" in | |
2835 | no) | |
2836 | AC_MSG_RESULT(no) | |
2837 | ;; | |
e16c1b8e | 2838 | *) |
10489879 | 2839 | AC_MSG_CHECKING([whether $CC supports it]) |
f13ac35e | 2840 | if test "$GCC" = yes ; then |
f5d8c0be DS |
2841 | if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null || |
2842 | dnl clang always supports -fvisibility= but it doesn't show up | |
2843 | dnl under --help. | |
2844 | test "$compiler_id" = "CLANG"; then | |
77431568 GK |
2845 | AC_MSG_RESULT(yes) |
2846 | AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols]) | |
77431568 | 2847 | AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible]) |
77431568 | 2848 | CFLAGS="$CFLAGS -fvisibility=hidden" |
f13ac35e DF |
2849 | else |
2850 | AC_MSG_RESULT(no) | |
2851 | fi | |
10489879 | 2852 | |
f13ac35e | 2853 | else |
77431568 GK |
2854 | dnl Test for SunPro cc |
2855 | if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then | |
10489879 | 2856 | AC_MSG_RESULT(yes) |
77431568 | 2857 | AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols]) |
77431568 | 2858 | AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible]) |
77431568 | 2859 | CFLAGS="$CFLAGS -xldscope=hidden" |
10489879 DF |
2860 | else |
2861 | AC_MSG_RESULT(no) | |
2862 | fi | |
f13ac35e | 2863 | fi |
59582a9d DF |
2864 | ;; |
2865 | esac ], | |
2866 | AC_MSG_RESULT(no) | |
2867 | ) | |
2868 | ||
8dabd344 DS |
2869 | dnl ************************************************************ |
2870 | dnl enforce SONAME bump | |
966cc10f | 2871 | dnl |
8dabd344 | 2872 | |
8dabd344 DS |
2873 | AC_MSG_CHECKING([whether to enforce SONAME bump]) |
2874 | AC_ARG_ENABLE(soname-bump, | |
2875 | AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump]) | |
2876 | AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]), | |
2877 | [ case "$enableval" in | |
2878 | yes) AC_MSG_RESULT(yes) | |
2879 | soname_bump=yes | |
2880 | ;; | |
2881 | *) | |
d7d56184 | 2882 | AC_MSG_RESULT(no) |
8dabd344 DS |
2883 | ;; |
2884 | esac ], | |
3f3d6ebe | 2885 | AC_MSG_RESULT($soname_bump) |
8dabd344 DS |
2886 | ) |
2887 | AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes) | |
2888 | ||
2889 | ||
59582a9d | 2890 | dnl ************************************************************ |
560a82ae | 2891 | if test ! -z "$winsock_LIB"; then |
9f3d9da1 DS |
2892 | |
2893 | dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes | |
2894 | dnl things work when built with c-ares). But we can't just move it last | |
2895 | dnl since then other stuff (SSL) won't build. So we simply append it to the | |
2896 | dnl end. | |
2897 | ||
560a82ae YT |
2898 | LIBS="$LIBS $winsock_LIB" |
2899 | TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB" | |
9f3d9da1 DS |
2900 | |
2901 | fi | |
2902 | ||
a0a47f27 DF |
2903 | dnl |
2904 | dnl All the library dependencies put into $LIB apply to libcurl only. | |
2905 | dnl Those in $CURL_LIBS apply to the curl command-line client only. | |
c461254d | 2906 | dnl Those in $TEST_SERVER_LIBS apply to test servers only. |
a0a47f27 DF |
2907 | dnl Those in $ALL_LIBS apply to all targets, including test targets. |
2908 | dnl | |
2909 | LIBCURL_LIBS=$LIBS | |
a0a47f27 DF |
2910 | |
2911 | AC_SUBST(LIBCURL_LIBS) | |
2912 | AC_SUBST(CURL_LIBS) | |
2913 | AC_SUBST(TEST_SERVER_LIBS) | |
50a1d5ee | 2914 | AC_SUBST(CURL_NETWORK_LIBS) |
c461254d | 2915 | LIBS=$ALL_LIBS dnl LIBS is a magic variable that's used for every link |
a0a47f27 | 2916 | |
20705ca3 DS |
2917 | AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes) |
2918 | ||
a1312859 DS |
2919 | dnl yes or no |
2920 | ENABLE_SHARED="$enable_shared" | |
2921 | AC_SUBST(ENABLE_SHARED) | |
2922 | ||
bbc002a5 DS |
2923 | dnl |
2924 | dnl For keeping supported features and protocols also in pkg-config file | |
2925 | dnl since it is more cross-compile frient than curl-config | |
2926 | dnl | |
2927 | ||
2928 | if test "x$USE_SSLEAY" = "x1"; then | |
2929 | SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" | |
2930 | elif test -n "$SSL_ENABLED"; then | |
2931 | SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" | |
2932 | fi | |
2933 | if test "@KRB4_ENABLED@" = "x1"; then | |
2934 | SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4" | |
2935 | fi | |
2936 | if test "x$IPV6_ENABLED" = "x1"; then | |
2937 | SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6" | |
2938 | fi | |
2939 | if test "x$HAVE_LIBZ" = "x1"; then | |
2940 | SUPPORT_FEATURES="$SUPPORT_FEATURES libz" | |
2941 | fi | |
79dc74e8 | 2942 | if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1"; then |
bbc002a5 DS |
2943 | SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS" |
2944 | fi | |
2945 | if test "x$IDN_ENABLED" = "x1"; then | |
2946 | SUPPORT_FEATURES="$SUPPORT_FEATURES IDN" | |
2947 | fi | |
2948 | if test "x$USE_WINDOWS_SSPI" = "x1"; then | |
2949 | SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI" | |
2950 | fi | |
6eb48494 DF |
2951 | if test "x$CURL_DISABLE_HTTP" != "x1"; then |
2952 | if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \ | |
2953 | -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then | |
2954 | SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM" | |
2955 | fi | |
bbc002a5 | 2956 | fi |
59cf93cc QS |
2957 | if test "x$USE_TLS_SRP" = "x1"; then |
2958 | SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP" | |
2959 | fi | |
bbc002a5 DS |
2960 | |
2961 | AC_SUBST(SUPPORT_FEATURES) | |
2962 | ||
2963 | dnl For supported protocols in pkg-config file | |
2964 | if test "x$CURL_DISABLE_HTTP" != "x1"; then | |
2965 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP" | |
2966 | if test "x$SSL_ENABLED" = "x1"; then | |
2967 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS" | |
2968 | fi | |
2969 | fi | |
2970 | if test "x$CURL_DISABLE_FTP" != "x1"; then | |
2971 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP" | |
2972 | if test "x$SSL_ENABLED" = "x1"; then | |
2973 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS" | |
2974 | fi | |
2975 | fi | |
2976 | if test "x$CURL_DISABLE_FILE" != "x1"; then | |
2977 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE" | |
2978 | fi | |
2979 | if test "x$CURL_DISABLE_TELNET" != "x1"; then | |
2980 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET" | |
2981 | fi | |
89da5324 | 2982 | if test "x$CURL_DISABLE_LDAP" != "x1"; then |
bbc002a5 | 2983 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP" |
89da5324 YT |
2984 | if test "x$CURL_DISABLE_LDAPS" != "x1"; then |
2985 | if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") || | |
2986 | (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then | |
2987 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS" | |
2988 | fi | |
b1c1b9bb | 2989 | fi |
bbc002a5 DS |
2990 | fi |
2991 | if test "x$CURL_DISABLE_DICT" != "x1"; then | |
2992 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT" | |
2993 | fi | |
2994 | if test "x$CURL_DISABLE_TFTP" != "x1"; then | |
2995 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP" | |
2996 | fi | |
201637d4 CK |
2997 | if test "x$CURL_DISABLE_GOPHER" != "x1"; then |
2998 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER" | |
2999 | fi | |
92b9b468 DS |
3000 | if test "x$CURL_DISABLE_POP3" != "x1"; then |
3001 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3" | |
30eb452a DS |
3002 | if test "x$SSL_ENABLED" = "x1"; then |
3003 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S" | |
3004 | fi | |
92b9b468 DS |
3005 | fi |
3006 | if test "x$CURL_DISABLE_IMAP" != "x1"; then | |
3007 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP" | |
30eb452a DS |
3008 | if test "x$SSL_ENABLED" = "x1"; then |
3009 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS" | |
3010 | fi | |
92b9b468 DS |
3011 | fi |
3012 | if test "x$CURL_DISABLE_SMTP" != "x1"; then | |
3013 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP" | |
30eb452a DS |
3014 | if test "x$SSL_ENABLED" = "x1"; then |
3015 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS" | |
3016 | fi | |
92b9b468 | 3017 | fi |
bbc002a5 DS |
3018 | if test "x$USE_LIBSSH2" = "x1"; then |
3019 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" | |
3020 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" | |
3021 | fi | |
bc4582b6 DS |
3022 | if test "x$CURL_DISABLE_RTSP" != "x1"; then |
3023 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP" | |
3024 | fi | |
04cb15ae | 3025 | if test "x$USE_LIBRTMP" = "x1"; then |
027ceb37 | 3026 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP" |
04cb15ae | 3027 | fi |
bbc002a5 | 3028 | |
c047fe8e DS |
3029 | dnl replace spaces with newlines |
3030 | dnl sort the lines | |
3031 | dnl replace the newlines back to spaces | |
3032 | SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '` | |
3033 | ||
bbc002a5 DS |
3034 | AC_SUBST(SUPPORT_PROTOCOLS) |
3035 | ||
d930280a YT |
3036 | dnl squeeze whitespace out of some variables |
3037 | ||
be760bed YT |
3038 | squeeze CFLAGS |
3039 | squeeze CPPFLAGS | |
3040 | squeeze DEFS | |
3041 | squeeze LDFLAGS | |
3042 | squeeze LIBS | |
3043 | ||
3044 | squeeze CURL_LIBS | |
3045 | squeeze LIBCURL_LIBS | |
3046 | squeeze TEST_SERVER_LIBS | |
50a1d5ee | 3047 | squeeze CURL_NETWORK_LIBS |
d930280a | 3048 | |
4a8a7314 YT |
3049 | squeeze SUPPORT_FEATURES |
3050 | squeeze SUPPORT_PROTOCOLS | |
3051 | ||
065047dc | 3052 | if test "x$want_curldebug_assumed" = "xyes" && |
22ed0f50 | 3053 | test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then |
675d6ec5 YT |
3054 | ac_configure_args="$ac_configure_args --enable-curldebug" |
3055 | fi | |
3056 | ||
93c53424 | 3057 | AC_CONFIG_FILES([Makefile \ |
77431568 | 3058 | docs/Makefile \ |
d54cdf29 | 3059 | docs/examples/Makefile \ |
e22657ea | 3060 | docs/libcurl/Makefile \ |
77431568 GK |
3061 | include/Makefile \ |
3062 | include/curl/Makefile \ | |
3063 | src/Makefile \ | |
172f0ba1 | 3064 | lib/Makefile \ |
044ca343 | 3065 | tests/Makefile \ |
b915ca68 | 3066 | tests/data/Makefile \ |
fd8bf5f1 | 3067 | tests/server/Makefile \ |
2aa0c6c4 | 3068 | tests/libtest/Makefile \ |
35e1d653 | 3069 | tests/unit/Makefile \ |
77431568 GK |
3070 | packages/Makefile \ |
3071 | packages/Win32/Makefile \ | |
3072 | packages/Win32/cygwin/Makefile \ | |
3073 | packages/Linux/Makefile \ | |
3074 | packages/Linux/RPM/Makefile \ | |
3075 | packages/Linux/RPM/curl.spec \ | |
3076 | packages/Linux/RPM/curl-ssl.spec \ | |
c503930b | 3077 | packages/Solaris/Makefile \ |
34f9ab10 DS |
3078 | packages/EPM/curl.list \ |
3079 | packages/EPM/Makefile \ | |
f19cade5 | 3080 | packages/vms/Makefile \ |
c7e9e60b DS |
3081 | packages/AIX/Makefile \ |
3082 | packages/AIX/RPM/Makefile \ | |
15f2647d | 3083 | packages/AIX/RPM/curl.spec \ |
df3ca591 DS |
3084 | curl-config \ |
3085 | libcurl.pc | |
93c53424 DS |
3086 | ]) |
3087 | AC_OUTPUT | |
cff90cf3 | 3088 | |
ef24ecde YT |
3089 | CURL_GENERATE_CONFIGUREHELP_PM |
3090 | ||
cff90cf3 DS |
3091 | AC_MSG_NOTICE([Configured to build curl/libcurl: |
3092 | ||
0355e33b | 3093 | curl version: ${CURLVERSION} |
cff90cf3 DS |
3094 | Host setup: ${host} |
3095 | Install prefix: ${prefix} | |
3096 | Compiler: ${CC} | |
3097 | SSL support: ${curl_ssl_msg} | |
2147284c | 3098 | SSH support: ${curl_ssh_msg} |
cff90cf3 DS |
3099 | zlib support: ${curl_zlib_msg} |
3100 | krb4 support: ${curl_krb4_msg} | |
3101 | GSSAPI support: ${curl_gss_msg} | |
48975876 | 3102 | SPNEGO support: ${curl_spnego_msg} |
59cf93cc | 3103 | TLS-SRP support: ${curl_tls_srp_msg} |
79dc74e8 | 3104 | resolver: ${curl_res_msg} |
cff90cf3 | 3105 | ipv6 support: ${curl_ipv6_msg} |
96002646 | 3106 | IDN support: ${curl_idn_msg} |
e16c1b8e | 3107 | Build libcurl: Shared=${enable_shared}, Static=${enable_static} |
cff90cf3 | 3108 | Built-in manual: ${curl_manual_msg} |
710e370c | 3109 | Verbose errors: ${curl_verbose_msg} |
8ed31c48 | 3110 | SSPI support: ${curl_sspi_msg} |
86cbb232 MM |
3111 | ca cert bundle: ${ca} |
3112 | ca cert path: ${capath} | |
d0edb478 | 3113 | LDAP support: ${curl_ldap_msg} |
966cc10f | 3114 | LDAPS support: ${curl_ldaps_msg} |
bc4582b6 | 3115 | RTSP support: ${curl_rtsp_msg} |
04cb15ae | 3116 | RTMP support: ${curl_rtmp_msg} |
19b8a80e | 3117 | Protocols: ${SUPPORT_PROTOCOLS} |
cff90cf3 | 3118 | ]) |
3f3d6ebe DS |
3119 | |
3120 | if test "x$soname_bump" = "xyes"; then | |
3121 | ||
3122 | cat <<EOM | |
3123 | SONAME bump: yes - WARNING: this library will be built with the SONAME | |
3124 | number bumped due to (a detected) ABI breakage. | |
3125 | See lib/README.curl_off_t for details on this. | |
3126 | EOM | |
3127 | ||
3128 | fi | |
3129 |