]>
Commit | Line | Data |
---|---|---|
ae1912cb DS |
1 | dnl $Id$ |
2 | dnl Process this file with autoconf to produce a configure script. | |
7349940b | 3 | |
a147a079 | 4 | AC_PREREQ(2.57) |
7349940b | 5 | |
d5ba0309 | 6 | dnl We don't know the version number "staticly" so we use a dash here |
e3fc0d5e | 7 | AC_INIT(curl, [-], [a suitable curl mailing list => http://curl.haxx.se/mail/]) |
d5ba0309 DS |
8 | |
9 | dnl configure script copyright | |
c2fcdf3a | 10 | AC_COPYRIGHT([Copyright (c) 1998 - 2005 Daniel Stenberg, <daniel@haxx.se> |
d5ba0309 DS |
11 | This configure script may be copied, distributed and modified under the |
12 | terms of the curl license; see COPYING for more details]) | |
13 | ||
93c53424 | 14 | AC_CONFIG_SRCDIR([lib/urldata.h]) |
1a4fddb9 | 15 | AM_CONFIG_HEADER(lib/config.h src/config.h) |
ed29552b | 16 | AM_MAINTAINER_MODE |
8f5ffd94 | 17 | |
9f7c6341 | 18 | dnl SED is needed by some of the tools |
3fc39a6e DS |
19 | AC_PATH_PROG( SED, sed, sed-was-not-found-by-configure, |
20 | $PATH:/usr/bin:/usr/local/bin) | |
075c5342 DS |
21 | AC_SUBST(SED) |
22 | ||
3fc39a6e DS |
23 | if test "x$SED" = "xsed-was-not-found-by-configure"; then |
24 | AC_MSG_WARN([sed was not found, this may ruin your chances to build fine]) | |
25 | fi | |
26 | ||
9f7c6341 | 27 | dnl AR is used by libtool, and try the odd Solaris path too |
91018f4f DS |
28 | dnl we use AC_CHECK_TOOL since this should make a library for the target |
29 | dnl platform | |
30 | AC_CHECK_TOOL(AR, ar, | |
3fc39a6e DS |
31 | ar-was-not-found-by-configure, |
32 | $PATH:/usr/bin:/usr/local/bin:/usr/ccs/bin) | |
9f7c6341 | 33 | AC_SUBST(AR) |
3fc39a6e DS |
34 | if test "x$AR" = "xar-was-not-found-by-configure"; then |
35 | AC_MSG_WARN([ar was not found, this may ruin your chances to build fine]) | |
36 | fi | |
9f7c6341 | 37 | |
7349940b | 38 | dnl figure out the libcurl version |
593170d1 | 39 | VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h` |
8f5ffd94 | 40 | AM_INIT_AUTOMAKE(curl,$VERSION) |
075c5342 DS |
41 | AC_MSG_CHECKING([curl version]) |
42 | AC_MSG_RESULT($VERSION) | |
caf8c01e | 43 | |
1e5e0f9a DS |
44 | dnl |
45 | dnl we extract the numerical version for curl-config only | |
593170d1 | 46 | VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h` |
1e5e0f9a DS |
47 | AC_SUBST(VERSIONNUM) |
48 | ||
c503930b CB |
49 | dnl Solaris pkgadd support definitions |
50 | PKGADD_PKG="HAXXcurl" | |
51 | PKGADD_NAME="cURL - a client that groks URLs" | |
52 | PKGADD_VENDOR="curl.haxx.se" | |
53 | AC_SUBST(PKGADD_PKG) | |
54 | AC_SUBST(PKGADD_NAME) | |
55 | AC_SUBST(PKGADD_VENDOR) | |
56 | ||
cff90cf3 | 57 | dnl |
710e370c | 58 | dnl initialize all the info variables |
bebd5dbc | 59 | curl_ssl_msg="no (--with-ssl / --with-gnutls)" |
710e370c DS |
60 | curl_zlib_msg="no (--with-zlib)" |
61 | curl_krb4_msg="no (--with-krb4*)" | |
62 | curl_gss_msg="no (--with-gssapi)" | |
63 | curl_spnego_msg="no (--with-spnego)" | |
64 | curl_ares_msg="no (--enable-ares)" | |
65 | curl_ipv6_msg="no (--enable-ipv6)" | |
66 | curl_idn_msg="no (--with-libidn)" | |
67 | curl_manual_msg="no (--enable-manual)" | |
68 | curl_verbose_msg="enabled (--disable-verbose)" | |
8ed31c48 | 69 | curl_sspi_msg="no (--enable-sspi)" |
c503930b | 70 | |
caf8c01e DS |
71 | dnl |
72 | dnl Detect the canonical host and target build environment | |
73 | dnl | |
ae1912cb | 74 | |
c77f77a1 | 75 | AC_CANONICAL_HOST |
93c53424 | 76 | dnl Get system canonical name |
22a32389 | 77 | AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) |
1b1f143c DS |
78 | |
79 | dnl Check for AIX weirdos | |
80 | AC_AIX | |
81 | ||
93c53424 DS |
82 | dnl Checks for programs. |
83 | AC_PROG_CC | |
84 | ||
d4ffc5ef | 85 | dnl check for how to do large files |
1b1f143c | 86 | AC_SYS_LARGEFILE |
d4ffc5ef | 87 | |
1e8f0c57 DS |
88 | dnl check for cygwin stuff |
89 | AC_LIBTOOL_WIN32_DLL | |
90 | ||
91 | dnl libtool setup | |
d20a0516 | 92 | AC_PROG_LIBTOOL |
93c53424 | 93 | |
fcfc6de9 | 94 | AC_MSG_CHECKING([if we need -no-undefined]) |
ecf3aee4 | 95 | case $host in |
c2e2c98d | 96 | *-*-cygwin | *-*-mingw* | *-*-pw32*) |
ecf3aee4 DS |
97 | need_no_undefined=yes |
98 | ;; | |
99 | *) | |
100 | need_no_undefined=no | |
101 | ;; | |
102 | esac | |
fcfc6de9 | 103 | AC_MSG_RESULT($need_no_undefined) |
ecf3aee4 DS |
104 | AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes) |
105 | ||
fcfc6de9 | 106 | AC_MSG_CHECKING([if we need -mimpure-text]) |
5ab9d72e | 107 | mimpure=no |
fcfc6de9 DS |
108 | case $host in |
109 | *-*-solaris2*) | |
110 | if test "$GCC" = "yes"; then | |
111 | mimpure="yes" | |
112 | fi | |
113 | ;; | |
114 | *) | |
fcfc6de9 DS |
115 | ;; |
116 | esac | |
117 | AC_MSG_RESULT($mimpure) | |
118 | AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes) | |
119 | ||
4d815c99 DS |
120 | AC_MSG_CHECKING([if we need BUILDING_LIBCURL]) |
121 | case $host in | |
122 | *-*-mingw*) | |
123 | AC_DEFINE(BUILDING_LIBCURL, 1, [when building libcurl itself]) | |
124 | AC_MSG_RESULT(yes) | |
0bb04082 DS |
125 |