Mercurial > dropbear
comparison configure.ac @ 1411:798854f62430 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 14 Jun 2017 23:31:42 +0800 |
parents | 3677a510f545 8d9bad0a1c86 |
children | 4f17d75d027b |
comparison
equal
deleted
inserted
replaced
1408:27e65d3aed5f | 1411:798854f62430 |
---|---|
43 conf_lastlog_location="/var/adm/lastlog" | 43 conf_lastlog_location="/var/adm/lastlog" |
44 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) | 44 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) |
45 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'` | 45 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'` |
46 if test "$sol2ver" -ge 8; then | 46 if test "$sol2ver" -ge 8; then |
47 AC_MSG_RESULT(yes) | 47 AC_MSG_RESULT(yes) |
48 AC_DEFINE(DISABLE_UTMP,,Disable utmp) | 48 AC_DEFINE(DISABLE_UTMP,1,Disable utmp) |
49 AC_DEFINE(DISABLE_WTMP,,Disable wtmp) | 49 AC_DEFINE(DISABLE_WTMP,1,Disable wtmp) |
50 else | 50 else |
51 AC_MSG_RESULT(no) | 51 AC_MSG_RESULT(no) |
52 fi | 52 fi |
53 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") | 53 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") |
54 AC_CHECK_LIB(nsl, yp_match, LIBS="$LIBS -lnsl") | 54 AC_CHECK_LIB(nsl, yp_match, LIBS="$LIBS -lnsl") |
55 ;; | 55 ;; |
56 | 56 |
57 *-*-aix*) | 57 *-*-aix*) |
58 AC_DEFINE(AIX,,Using AIX) | 58 AC_DEFINE(AIX,1,Using AIX) |
59 # OpenSSH thinks it's broken. If it isn't, let me know. | 59 # OpenSSH thinks it's broken. If it isn't, let me know. |
60 AC_DEFINE(BROKEN_GETADDRINFO,,Broken getaddrinfo) | 60 AC_DEFINE(BROKEN_GETADDRINFO,1,Broken getaddrinfo) |
61 ;; | 61 ;; |
62 | 62 |
63 *-*-hpux*) | 63 *-*-hpux*) |
64 LIBS="$LIBS -lsec" | 64 LIBS="$LIBS -lsec" |
65 # It's probably broken. | 65 # It's probably broken. |
66 AC_DEFINE(BROKEN_GETADDRINFO,,Broken getaddrinfo) | 66 AC_DEFINE(BROKEN_GETADDRINFO,1,Broken getaddrinfo) |
67 ;; | 67 ;; |
68 *-dec-osf*) | 68 *-dec-osf*) |
69 AC_DEFINE(BROKEN_GETADDRINFO,,Broken getaddrinfo) | 69 AC_DEFINE(BROKEN_GETADDRINFO,1,Broken getaddrinfo) |
70 ;; | 70 ;; |
71 esac | 71 esac |
72 | 72 |
73 AC_CHECK_TOOL(AR, ar, :) | 73 AC_CHECK_TOOL(AR, ar, :) |
74 AC_CHECK_TOOL(RANLIB, ranlib, :) | 74 AC_CHECK_TOOL(RANLIB, ranlib, :) |
78 dnl Can't use login() or logout() with uclibc | 78 dnl Can't use login() or logout() with uclibc |
79 AC_CHECK_DECL(__UCLIBC__, | 79 AC_CHECK_DECL(__UCLIBC__, |
80 [ | 80 [ |
81 no_loginfunc_check=1 | 81 no_loginfunc_check=1 |
82 AC_MSG_NOTICE([Using uClibc - login() and logout() probably don't work, so we won't use them.]) | 82 AC_MSG_NOTICE([Using uClibc - login() and logout() probably don't work, so we won't use them.]) |
83 ],,,) | 83 ],,) |
84 | 84 |
85 dnl We test for crypt() specially. On Linux (and others?) it resides in libcrypt | 85 dnl We test for crypt() specially. On Linux (and others?) it resides in libcrypt |
86 dnl but we don't want link all binaries to -lcrypt, just dropbear server. | 86 dnl but we don't want link all binaries to -lcrypt, just dropbear server. |
87 dnl OS X doesn't need -lcrypt | 87 dnl OS X doesn't need -lcrypt |
88 AC_CHECK_FUNC(crypt, found_crypt_func=here) | 88 AC_CHECK_FUNC(crypt, found_crypt_func=here) |
116 | 116 |
117 AC_ARG_ENABLE(zlib, | 117 AC_ARG_ENABLE(zlib, |
118 [ --disable-zlib Don't include zlib support], | 118 [ --disable-zlib Don't include zlib support], |
119 [ | 119 [ |
120 if test "x$enableval" = "xno"; then | 120 if test "x$enableval" = "xno"; then |
121 AC_DEFINE(DISABLE_ZLIB,, Use zlib) | 121 AC_DEFINE(DISABLE_ZLIB,1,Use zlib) |
122 AC_MSG_NOTICE(Disabling zlib) | 122 AC_MSG_NOTICE(Disabling zlib) |
123 else | 123 else |
124 AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([*** zlib missing - install first or check config.log ***])) | 124 AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([*** zlib missing - install first or check config.log ***])) |
125 AC_MSG_NOTICE(Enabling zlib) | 125 AC_MSG_NOTICE(Enabling zlib) |
126 fi | 126 fi |
157 if test "x$enableval" = "xyes"; then | 157 if test "x$enableval" = "xyes"; then |
158 AC_CHECK_LIB(pam, pam_authenticate, , AC_MSG_ERROR([*** PAM missing - install first or check config.log ***])) | 158 AC_CHECK_LIB(pam, pam_authenticate, , AC_MSG_ERROR([*** PAM missing - install first or check config.log ***])) |
159 AC_MSG_NOTICE(Enabling PAM) | 159 AC_MSG_NOTICE(Enabling PAM) |
160 AC_CHECK_FUNCS(pam_fail_delay) | 160 AC_CHECK_FUNCS(pam_fail_delay) |
161 else | 161 else |
162 AC_DEFINE(DISABLE_PAM,, Use PAM) | 162 AC_DEFINE(DISABLE_PAM,1,Use PAM) |
163 AC_MSG_NOTICE(Disabling PAM) | 163 AC_MSG_NOTICE(Disabling PAM) |
164 fi | 164 fi |
165 ], | 165 ], |
166 [ | 166 [ |
167 # disable it by default | 167 # disable it by default |
168 AC_DEFINE(DISABLE_PAM,, Use PAM) | 168 AC_DEFINE(DISABLE_PAM,1,Use PAM) |
169 AC_MSG_NOTICE(Disabling PAM) | 169 AC_MSG_NOTICE(Disabling PAM) |
170 ] | 170 ] |
171 ) | 171 ) |
172 | 172 |
173 AC_ARG_ENABLE(openpty, | 173 AC_ARG_ENABLE(openpty, |
175 [ | 175 [ |
176 if test "x$enableval" = "xno"; then | 176 if test "x$enableval" = "xno"; then |
177 AC_MSG_NOTICE(Not using openpty) | 177 AC_MSG_NOTICE(Not using openpty) |
178 else | 178 else |
179 AC_MSG_NOTICE(Using openpty if available) | 179 AC_MSG_NOTICE(Using openpty if available) |
180 AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY,,Have openpty() function)]) | 180 AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY,1,[Have openpty() function])]) |
181 fi | 181 fi |
182 ], | 182 ], |
183 [ | 183 [ |
184 AC_MSG_NOTICE(Using openpty if available) | 184 AC_MSG_NOTICE(Using openpty if available) |
185 AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY)]) | 185 AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY)]) |
189 | 189 |
190 AC_ARG_ENABLE(syslog, | 190 AC_ARG_ENABLE(syslog, |
191 [ --disable-syslog Don't include syslog support], | 191 [ --disable-syslog Don't include syslog support], |
192 [ | 192 [ |
193 if test "x$enableval" = "xno"; then | 193 if test "x$enableval" = "xno"; then |
194 AC_DEFINE(DISABLE_SYSLOG,, Using syslog) | 194 AC_DEFINE(DISABLE_SYSLOG,1,Using syslog) |
195 AC_MSG_NOTICE(Disabling syslog) | 195 AC_MSG_NOTICE(Disabling syslog) |
196 else | 196 else |
197 AC_MSG_NOTICE(Enabling syslog) | 197 AC_MSG_NOTICE(Enabling syslog) |
198 fi | 198 fi |
199 ], | 199 ], |
306 [ ac_cv_have_struct_sockaddr_in6="yes" ], | 306 [ ac_cv_have_struct_sockaddr_in6="yes" ], |
307 [ ac_cv_have_struct_sockaddr_in6="no" ] | 307 [ ac_cv_have_struct_sockaddr_in6="no" ] |
308 ) | 308 ) |
309 ]) | 309 ]) |
310 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then | 310 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then |
311 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6,,Have struct sockaddr_in6) | 311 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6,1,Have struct sockaddr_in6) |
312 fi | 312 fi |
313 | 313 |
314 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ | 314 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ |
315 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | 315 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
316 #include <sys/types.h> | 316 #include <sys/types.h> |
320 [ ac_cv_have_struct_in6_addr="yes" ], | 320 [ ac_cv_have_struct_in6_addr="yes" ], |
321 [ ac_cv_have_struct_in6_addr="no" ] | 321 [ ac_cv_have_struct_in6_addr="no" ] |
322 ) | 322 ) |
323 ]) | 323 ]) |
324 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then | 324 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then |
325 AC_DEFINE(HAVE_STRUCT_IN6_ADDR,,Have struct in6_addr) | 325 AC_DEFINE(HAVE_STRUCT_IN6_ADDR,1,Have struct in6_addr) |
326 fi | 326 fi |
327 | 327 |
328 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ | 328 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ |
329 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | 329 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
330 #include <sys/types.h> | 330 #include <sys/types.h> |
335 [ ac_cv_have_struct_addrinfo="yes" ], | 335 [ ac_cv_have_struct_addrinfo="yes" ], |
336 [ ac_cv_have_struct_addrinfo="no" ] | 336 [ ac_cv_have_struct_addrinfo="no" ] |
337 ) | 337 ) |
338 ]) | 338 ]) |
339 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then | 339 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then |
340 AC_DEFINE(HAVE_STRUCT_ADDRINFO,,Have struct addrinfo) | 340 AC_DEFINE(HAVE_STRUCT_ADDRINFO,1,Have struct addrinfo) |
341 fi | 341 fi |
342 | 342 |
343 | 343 |
344 # IRIX has a const char return value for gai_strerror() | 344 # IRIX has a const char return value for gai_strerror() |
345 AC_CHECK_FUNCS(gai_strerror,[ | 345 AC_CHECK_FUNCS(gai_strerror,[ |
399 if test "x$enableval" = "xyes"; then | 399 if test "x$enableval" = "xyes"; then |
400 BUNDLED_LIBTOM=1 | 400 BUNDLED_LIBTOM=1 |
401 AC_MSG_NOTICE(Forcing bundled libtom*) | 401 AC_MSG_NOTICE(Forcing bundled libtom*) |
402 else | 402 else |
403 BUNDLED_LIBTOM=0 | 403 BUNDLED_LIBTOM=0 |
404 AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath", | 404 AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS", |
405 [AC_MSG_ERROR([Missing system libtommath and --disable-bundled-libtom was specified])] ) | 405 [AC_MSG_ERROR([Missing system libtommath and --disable-bundled-libtom was specified])] ) |
406 AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt", | 406 AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS", |
407 [AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] ) | 407 [AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] ) |
408 fi | 408 fi |
409 ], | 409 ], |
410 [ | 410 [ |
411 BUNDLED_LIBTOM=0 | 411 BUNDLED_LIBTOM=0 |
412 AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath", BUNDLED_LIBTOM=1) | 412 AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS", BUNDLED_LIBTOM=1) |
413 AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt", BUNDLED_LIBTOM=1) | 413 AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS", BUNDLED_LIBTOM=1) |
414 ] | 414 ] |
415 ) | 415 ) |
416 | 416 |
417 if test $BUNDLED_LIBTOM = 1 ; then | 417 if test $BUNDLED_LIBTOM = 1 ; then |
418 AC_DEFINE(BUNDLED_LIBTOM,,Use bundled libtom) | 418 AC_DEFINE(BUNDLED_LIBTOM,1,Use bundled libtom) |
419 fi | 419 fi |
420 | 420 |
421 AC_SUBST(LIBTOM_LIBS) | 421 AC_SUBST(LIBTOM_LIBS) |
422 AC_SUBST(BUNDLED_LIBTOM) | 422 AC_SUBST(BUNDLED_LIBTOM) |
423 | 423 |
424 dnl Added from OpenSSH 3.6.1p2's configure.ac | 424 dnl Added from OpenSSH 3.6.1p2's configure.ac |
425 | 425 |
426 dnl allow user to disable some login recording features | 426 dnl allow user to disable some login recording features |
427 AC_ARG_ENABLE(lastlog, | 427 AC_ARG_ENABLE(lastlog, |
428 [ --disable-lastlog Disable use of lastlog even if detected [no]], | 428 [ --disable-lastlog Disable use of lastlog even if detected [no]], |
429 [ AC_DEFINE(DISABLE_LASTLOG,,Disable use of lastlog()) ] | 429 [ |
430 if test "x$enableval" = "xno" ; then | |
431 AC_DEFINE(DISABLE_LASTLOG,1,Disable use of lastlog()) | |
432 fi | |
433 ] | |
430 ) | 434 ) |
431 AC_ARG_ENABLE(utmp, | 435 AC_ARG_ENABLE(utmp, |
432 [ --disable-utmp Disable use of utmp even if detected [no]], | 436 [ --disable-utmp Disable use of utmp even if detected [no]], |
433 [ AC_DEFINE(DISABLE_UTMP,,Disable use of utmp) ] | 437 [ |
438 if test "x$enableval" = "xno" ; then | |
439 AC_DEFINE(DISABLE_UTMP,1,Disable use of utmp) | |
440 fi | |
441 ] | |
434 ) | 442 ) |
435 AC_ARG_ENABLE(utmpx, | 443 AC_ARG_ENABLE(utmpx, |
436 [ --disable-utmpx Disable use of utmpx even if detected [no]], | 444 [ --disable-utmpx Disable use of utmpx even if detected [no]], |
437 [ AC_DEFINE(DISABLE_UTMPX,,Disable use of utmpx) ] | 445 [ |
446 if test "x$enableval" = "xno" ; then | |
447 AC_DEFINE(DISABLE_UTMPX,1,Disable use of utmpx) | |
448 fi | |
449 ] | |
438 ) | 450 ) |
439 AC_ARG_ENABLE(wtmp, | 451 AC_ARG_ENABLE(wtmp, |
440 [ --disable-wtmp Disable use of wtmp even if detected [no]], | 452 [ --disable-wtmp Disable use of wtmp even if detected [no]], |
441 [ AC_DEFINE(DISABLE_WTMP,,Disable use of wtmp) ] | 453 [ |
454 if test "x$enableval" = "xno" ; then | |
455 AC_DEFINE(DISABLE_WTMP,1,Disable use of wtmp) | |
456 fi | |
457 ] | |
442 ) | 458 ) |
443 AC_ARG_ENABLE(wtmpx, | 459 AC_ARG_ENABLE(wtmpx, |
444 [ --disable-wtmpx Disable use of wtmpx even if detected [no]], | 460 [ --disable-wtmpx Disable use of wtmpx even if detected [no]], |
445 [ AC_DEFINE(DISABLE_WTMPX,,Disable use of wtmpx) ] | 461 [ |
462 if test "x$enableval" = "xno" ; then | |
463 AC_DEFINE(DISABLE_WTMPX,1,Disable use of wtmpx) | |
464 fi | |
465 ] | |
446 ) | 466 ) |
447 AC_ARG_ENABLE(loginfunc, | 467 AC_ARG_ENABLE(loginfunc, |
448 [ --disable-loginfunc Disable use of login() etc. [no]], | 468 [ --disable-loginfunc Disable use of login() etc. [no]], |
449 [ no_loginfunc_check=1 | 469 [ no_loginfunc_check=1 |
450 AC_MSG_NOTICE(Not using login() etc) ] | 470 AC_MSG_NOTICE([Not using login() etc]) ] |
451 ) | 471 ) |
452 AC_ARG_ENABLE(pututline, | 472 AC_ARG_ENABLE(pututline, |
453 [ --disable-pututline Disable use of pututline() etc. ([uw]tmp) [no]], | 473 [ --disable-pututline Disable use of pututline() etc. ([uw]tmp) [no]], |
454 [ AC_DEFINE(DISABLE_PUTUTLINE,,Disable use of pututline()) ] | 474 [ |
475 if test "x$enableval" = "xno" ; then | |
476 AC_DEFINE(DISABLE_PUTUTLINE,1,Disable use of pututline()) | |
477 fi | |
478 ] | |
455 ) | 479 ) |
456 AC_ARG_ENABLE(pututxline, | 480 AC_ARG_ENABLE(pututxline, |
457 [ --disable-pututxline Disable use of pututxline() etc. ([uw]tmpx) [no]], | 481 [ --disable-pututxline Disable use of pututxline() etc. ([uw]tmpx) [no]], |
458 [ AC_DEFINE(DISABLE_PUTUTXLINE,,Disable use of pututxline()) ] | 482 [ |
483 if test "x$enableval" = "xno" ; then | |
484 AC_DEFINE(DISABLE_PUTUTXLINE,1,Disable use of pututxline()) | |
485 fi | |
486 ] | |
459 ) | 487 ) |
460 AC_ARG_WITH(lastlog, | 488 AC_ARG_WITH(lastlog, |
461 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], | 489 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], |
462 [ | 490 [ |
463 if test "x$withval" = "xno" ; then | 491 if test "x$withval" = "xno" ; then |
468 ] | 496 ] |
469 ) | 497 ) |
470 | 498 |
471 if test -z "$no_loginfunc_check"; then | 499 if test -z "$no_loginfunc_check"; then |
472 dnl Checks for libutil functions (login(), logout() etc, not openpty() ) | 500 dnl Checks for libutil functions (login(), logout() etc, not openpty() ) |
473 AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN,,Have login() function)]) | 501 AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN,1,[Have login() function])]) |
474 AC_CHECK_FUNCS(logout updwtmp logwtmp) | 502 AC_CHECK_FUNCS(logout updwtmp logwtmp) |
475 fi | 503 fi |
476 | 504 |
477 dnl lastlog, [uw]tmpx? detection | 505 dnl lastlog, [uw]tmpx? detection |
478 dnl NOTE: set the paths in the platform section to avoid the | 506 dnl NOTE: set the paths in the platform section to avoid the |
664 | 692 |
665 # Solaris needs ptmx | 693 # Solaris needs ptmx |
666 if test -z "$no_ptmx_check" ; then | 694 if test -z "$no_ptmx_check" ; then |
667 if test x"$cross_compiling" = x"no" ; then | 695 if test x"$cross_compiling" = x"no" ; then |
668 if test -e /dev/ptmx ; then | 696 if test -e /dev/ptmx ; then |
669 AC_DEFINE(USE_DEV_PTMX,,Use /dev/ptmx) | 697 AC_DEFINE(USE_DEV_PTMX,1,Use /dev/ptmx) |
670 fi | 698 fi |
671 else | 699 else |
672 AC_MSG_NOTICE([Not checking for /dev/ptmx, we're cross-compiling]) | 700 AC_MSG_NOTICE([Not checking for /dev/ptmx, we're cross-compiling]) |
673 fi | 701 fi |
674 fi | 702 fi |
675 | 703 |
676 if test -z "$no_ptc_check" ; then | 704 if test -z "$no_ptc_check" ; then |
677 if test x"$cross_compiling" = x"no" ; then | 705 if test x"$cross_compiling" = x"no" ; then |
678 if test -e /dev/ptc ; then | 706 if test -e /dev/ptc ; then |
679 AC_DEFINE(HAVE_DEV_PTS_AND_PTC,,Use /dev/ptc & /dev/pts) | 707 AC_DEFINE(HAVE_DEV_PTS_AND_PTC,1,Use /dev/ptc & /dev/pts) |
680 fi | 708 fi |
681 else | 709 else |
682 AC_MSG_NOTICE([Not checking for /dev/ptc & /dev/pts since we're cross-compiling]) | 710 AC_MSG_NOTICE([Not checking for /dev/ptc & /dev/pts since we're cross-compiling]) |
683 fi | 711 fi |
684 fi | 712 fi |