Mercurial > dropbear
comparison configure.in @ 67:86725004a0ea
fake-rfc stuff
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 12 Aug 2004 14:39:17 +0000 |
parents | 45ee5ffd6ea0 |
children | b0316ce64e4b |
comparison
equal
deleted
inserted
replaced
66:38c3146aa23d | 67:86725004a0ea |
---|---|
1 # -*- Autoconf -*- | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf and autoheader to produce a configure script. | 2 # Process this file with autoconf and autoheader to produce a configure script. |
3 | 3 |
4 # This Autoconf file was cobbled from various locations. | 4 # This Autoconf file was cobbled from various locations. In particular, a bunch |
5 # of the platform checks have been taken straight from OpenSSH's configure.ac | |
6 # Huge thanks to them for dealing with the horrible platform-specifics :) | |
5 | 7 |
6 AC_PREREQ(2.50) | 8 AC_PREREQ(2.50) |
7 AC_INIT(buffer.c) | 9 AC_INIT(buffer.c) |
8 | 10 |
9 OLDCFLAGS=$CFLAGS | 11 OLDCFLAGS=$CFLAGS |
48 AC_CHECK_LIB(nsl, yp_match, LIBS="$LIBS -lnsl") | 50 AC_CHECK_LIB(nsl, yp_match, LIBS="$LIBS -lnsl") |
49 ;; | 51 ;; |
50 | 52 |
51 *-*-aix*) | 53 *-*-aix*) |
52 AC_DEFINE(AIX,,Using AIX) | 54 AC_DEFINE(AIX,,Using AIX) |
55 # OpenSSH thinks it's broken. If it isn't, let me know. | |
56 AC_DEFINE(BROKEN_GETADDRINFO,,Broken getaddrinfo) | |
53 ;; | 57 ;; |
54 | 58 |
55 *-*-hpux*) | 59 *-*-hpux*) |
56 LIBS="$LIBS -lsec" | 60 LIBS="$LIBS -lsec" |
61 # It's probably broken. | |
62 AC_DEFINE(BROKEN_GETADDRINFO,,Broken getaddrinfo) | |
63 ;; | |
64 *-dec-osf*) | |
65 AC_DEFINE(BROKEN_GETADDRINFO,,Broken getaddrinfo) | |
57 ;; | 66 ;; |
58 esac | 67 esac |
59 | 68 |
60 AC_CHECK_TOOL(AR, ar, :) | 69 AC_CHECK_TOOL(AR, ar, :) |
61 AC_CHECK_TOOL(RANLIB, ranlib, :) | 70 AC_CHECK_TOOL(RANLIB, ranlib, :) |
203 AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, | 212 AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, |
204 [type to use in place of socklen_t if not defined])], | 213 [type to use in place of socklen_t if not defined])], |
205 [#include <sys/types.h> | 214 [#include <sys/types.h> |
206 #include <sys/socket.h>]) | 215 #include <sys/socket.h>]) |
207 | 216 |
217 # for the fake-rfc2553 stuff - straight from OpenSSH | |
218 | |
219 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [ | |
220 AC_TRY_COMPILE( | |
221 [ | |
222 #include <sys/types.h> | |
223 #include <sys/socket.h> | |
224 ], | |
225 [ struct sockaddr_storage s; ], | |
226 [ ac_cv_have_struct_sockaddr_storage="yes" ], | |
227 [ ac_cv_have_struct_sockaddr_storage="no" ] | |
228 ) | |
229 ]) | |
230 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then | |
231 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) | |
232 fi | |
233 | |
234 AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ | |
235 AC_TRY_COMPILE( | |
236 [ | |
237 #include <sys/types.h> | |
238 #include <netinet/in.h> | |
239 ], | |
240 [ struct sockaddr_in6 s; s.sin6_family = 0; ], | |
241 [ ac_cv_have_struct_sockaddr_in6="yes" ], | |
242 [ ac_cv_have_struct_sockaddr_in6="no" ] | |
243 ) | |
244 ]) | |
245 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then | |
246 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6,,Have struct sockaddr_in6) | |
247 fi | |
248 | |
249 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ | |
250 AC_TRY_COMPILE( | |
251 [ | |
252 #include <sys/types.h> | |
253 #include <netinet/in.h> | |
254 ], | |
255 [ struct in6_addr s; s.s6_addr[0] = 0; ], | |
256 [ ac_cv_have_struct_in6_addr="yes" ], | |
257 [ ac_cv_have_struct_in6_addr="no" ] | |
258 ) | |
259 ]) | |
260 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then | |
261 AC_DEFINE(HAVE_STRUCT_IN6_ADDR,,Have struct in6_addr) | |
262 fi | |
263 | |
264 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ | |
265 AC_TRY_COMPILE( | |
266 [ | |
267 #include <sys/types.h> | |
268 #include <sys/socket.h> | |
269 #include <netdb.h> | |
270 ], | |
271 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ], | |
272 [ ac_cv_have_struct_addrinfo="yes" ], | |
273 [ ac_cv_have_struct_addrinfo="no" ] | |
274 ) | |
275 ]) | |
276 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then | |
277 AC_DEFINE(HAVE_STRUCT_ADDRINFO,,Have struct addrinfo) | |
278 fi | |
279 | |
280 | |
281 # IRIX has a const char return value for gai_strerror() | |
282 AC_CHECK_FUNCS(gai_strerror,[ | |
283 AC_DEFINE(HAVE_GAI_STRERROR) | |
284 AC_TRY_COMPILE([ | |
285 #include <sys/types.h> | |
286 #include <sys/socket.h> | |
287 #include <netdb.h> | |
288 | |
289 const char *gai_strerror(int);],[ | |
290 char *str; | |
291 | |
292 str = gai_strerror(0);],[ | |
293 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1, | |
294 [Define if gai_strerror() returns const char *])])]) | |
208 | 295 |
209 # for loginrec.c | 296 # for loginrec.c |
210 | 297 |
211 AC_CHECK_MEMBERS([struct utmp.ut_host, struct utmp.ut_pid, struct utmp.ut_type, struct utmp.ut_tv, struct utmp.ut_id, struct utmp.ut_addr, struct utmp.ut_addr_v6, struct utmp.ut_exit, struct utmp.ut_time],,,[ | 298 AC_CHECK_MEMBERS([struct utmp.ut_host, struct utmp.ut_pid, struct utmp.ut_type, struct utmp.ut_tv, struct utmp.ut_id, struct utmp.ut_addr, struct utmp.ut_addr_v6, struct utmp.ut_exit, struct utmp.ut_time],,,[ |
212 #include <sys/types.h> | 299 #include <sys/types.h> |
460 # Checks for library functions. | 547 # Checks for library functions. |
461 AC_PROG_GCC_TRADITIONAL | 548 AC_PROG_GCC_TRADITIONAL |
462 AC_FUNC_MEMCMP | 549 AC_FUNC_MEMCMP |
463 AC_FUNC_SELECT_ARGTYPES | 550 AC_FUNC_SELECT_ARGTYPES |
464 AC_TYPE_SIGNAL | 551 AC_TYPE_SIGNAL |
465 AC_CHECK_FUNCS([dup2 getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty ]) | 552 AC_CHECK_FUNCS([dup2 getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo]) |
466 | 553 |
467 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) | 554 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) |
468 | 555 |
469 # Solaris needs ptmx | 556 # Solaris needs ptmx |
470 if test -z "$no_ptmx_check" ; then | 557 if test -z "$no_ptmx_check" ; then |
481 else | 568 else |
482 AC_MSG_RESULT(Not checking for /dev/ptc & /dev/pts\, we're cross-compiling) | 569 AC_MSG_RESULT(Not checking for /dev/ptc & /dev/pts\, we're cross-compiling) |
483 fi | 570 fi |
484 fi | 571 fi |
485 | 572 |
573 AC_EXEEXT | |
486 AC_CONFIG_HEADER(config.h) | 574 AC_CONFIG_HEADER(config.h) |
487 AC_OUTPUT(Makefile) | 575 AC_OUTPUT(Makefile) |
488 AC_MSG_RESULT() | 576 AC_MSG_RESULT() |
489 AC_MSG_RESULT(Now edit options.h to choose features.) | 577 AC_MSG_RESULT(Now edit options.h to choose features.) |