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