diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 98 |
1 files changed, 80 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index e342c974e..1f537868e 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.20 2002/02/13 21:44:06 djm Exp $ | 1 | # $Id: configure.ac,v 1.21 2002/02/26 16:40:49 tim Exp $ |
2 | 2 | ||
3 | AC_INIT | 3 | AC_INIT |
4 | AC_CONFIG_SRCDIR([ssh.c]) | 4 | AC_CONFIG_SRCDIR([ssh.c]) |
@@ -320,6 +320,18 @@ AC_ARG_WITH(libs, | |||
320 | ] | 320 | ] |
321 | ) | 321 | ) |
322 | 322 | ||
323 | # Checks for header files. | ||
324 | AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \ | ||
325 | getopt.h glob.h lastlog.h limits.h login.h \ | ||
326 | login_cap.h maillock.h netdb.h netgroup.h \ | ||
327 | netinet/in_systm.h paths.h poll.h pty.h \ | ||
328 | security/pam_appl.h shadow.h stddef.h stdint.h \ | ||
329 | strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \ | ||
330 | sys/poll.h sys/queue.h sys/select.h sys/stat.h \ | ||
331 | sys/stropts.h sys/sysmacros.h sys/time.h \ | ||
332 | sys/ttcompat.h sys/un.h time.h ttyent.h usersec.h \ | ||
333 | util.h utime.h utmp.h utmpx.h) | ||
334 | |||
323 | # Checks for libraries. | 335 | # Checks for libraries. |
324 | AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) | 336 | AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) |
325 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) | 337 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
@@ -391,19 +403,6 @@ AC_CHECK_FUNCS(logout updwtmp logwtmp) | |||
391 | 403 | ||
392 | AC_FUNC_STRFTIME | 404 | AC_FUNC_STRFTIME |
393 | 405 | ||
394 | # Checks for header files. | ||
395 | AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \ | ||
396 | getopt.h glob.h lastlog.h limits.h login.h \ | ||
397 | login_cap.h maillock.h netdb.h netgroup.h \ | ||
398 | netinet/in_systm.h paths.h poll.h pty.h \ | ||
399 | rpc/rpc.h \ | ||
400 | security/pam_appl.h shadow.h stddef.h stdint.h \ | ||
401 | strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \ | ||
402 | sys/poll.h sys/queue.h sys/select.h sys/stat.h \ | ||
403 | sys/stropts.h sys/sysmacros.h sys/time.h \ | ||
404 | sys/ttcompat.h sys/un.h time.h ttyent.h usersec.h \ | ||
405 | util.h utime.h utmp.h utmpx.h) | ||
406 | |||
407 | # Check for ALTDIRFUNC glob() extension | 406 | # Check for ALTDIRFUNC glob() extension |
408 | AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support) | 407 | AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support) |
409 | AC_EGREP_CPP(FOUNDIT, | 408 | AC_EGREP_CPP(FOUNDIT, |
@@ -469,9 +468,16 @@ AC_ARG_WITH(skey, | |||
469 | LIBS="-lskey $LIBS" | 468 | LIBS="-lskey $LIBS" |
470 | SKEY_MSG="yes" | 469 | SKEY_MSG="yes" |
471 | 470 | ||
472 | AC_CHECK_FUNC(skey_keyinfo, | 471 | AC_MSG_CHECKING([for s/key support]) |
473 | [], | 472 | AC_TRY_RUN( |
473 | [ | ||
474 | #include <stdio.h> | ||
475 | #include <skey.h> | ||
476 | int main() { char *ff = skey_keyinfo(""); ff=""; return 0; } | ||
477 | ], | ||
478 | [AC_MSG_RESULT(yes)], | ||
474 | [ | 479 | [ |
480 | AC_MSG_RESULT(no) | ||
475 | AC_MSG_ERROR([** Incomplete or missing s/key libraries.]) | 481 | AC_MSG_ERROR([** Incomplete or missing s/key libraries.]) |
476 | ]) | 482 | ]) |
477 | fi | 483 | fi |
@@ -508,7 +514,8 @@ AC_ARG_WITH(tcp-wrappers, | |||
508 | CPPFLAGS="-I${withval} ${CPPFLAGS}" | 514 | CPPFLAGS="-I${withval} ${CPPFLAGS}" |
509 | fi | 515 | fi |
510 | fi | 516 | fi |
511 | LIBS="-lwrap $LIBS" | 517 | LIBWRAP="-lwrap" |
518 | LIBS="$LIBWRAP $LIBS" | ||
512 | AC_MSG_CHECKING(for libwrap) | 519 | AC_MSG_CHECKING(for libwrap) |
513 | AC_TRY_LINK( | 520 | AC_TRY_LINK( |
514 | [ | 521 | [ |
@@ -519,12 +526,14 @@ AC_ARG_WITH(tcp-wrappers, | |||
519 | [ | 526 | [ |
520 | AC_MSG_RESULT(yes) | 527 | AC_MSG_RESULT(yes) |
521 | AC_DEFINE(LIBWRAP) | 528 | AC_DEFINE(LIBWRAP) |
529 | AC_SUBST(LIBWRAP) | ||
522 | TCPW_MSG="yes" | 530 | TCPW_MSG="yes" |
523 | ], | 531 | ], |
524 | [ | 532 | [ |
525 | AC_MSG_ERROR([*** libwrap missing]) | 533 | AC_MSG_ERROR([*** libwrap missing]) |
526 | ] | 534 | ] |
527 | ) | 535 | ) |
536 | LIBS="$saved_LIBS" | ||
528 | fi | 537 | fi |
529 | ] | 538 | ] |
530 | ) | 539 | ) |
@@ -640,6 +649,7 @@ AC_ARG_WITH(pam, | |||
640 | PAM_MSG="yes" | 649 | PAM_MSG="yes" |
641 | 650 | ||
642 | AC_DEFINE(USE_PAM) | 651 | AC_DEFINE(USE_PAM) |
652 | AC_SUBST(LIBPAM, ["-lpam -ldl"]) | ||
643 | fi | 653 | fi |
644 | ] | 654 | ] |
645 | ) | 655 | ) |
@@ -956,6 +966,25 @@ AC_ARG_WITH(prngd-socket, | |||
956 | PRNGD_SOCKET="$withval" | 966 | PRNGD_SOCKET="$withval" |
957 | AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") | 967 | AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") |
958 | fi | 968 | fi |
969 | ], | ||
970 | [ | ||
971 | # Check for existing socket only if we don't have a random device already | ||
972 | if test "$USE_RAND_HELPER" = yes ; then | ||
973 | AC_MSG_CHECKING(for PRNGD/EGD socket) | ||
974 | # Insert other locations here | ||
975 | for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do | ||
976 | if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then | ||
977 | PRNGD_SOCKET="$sock" | ||
978 | AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") | ||
979 | break; | ||
980 | fi | ||
981 | done | ||
982 | if test ! -z "$PRNGD_SOCKET" ; then | ||
983 | AC_MSG_RESULT($PRNGD_SOCKET) | ||
984 | else | ||
985 | AC_MSG_RESULT(not found) | ||
986 | fi | ||
987 | fi | ||
959 | ] | 988 | ] |
960 | ) | 989 | ) |
961 | 990 | ||
@@ -1086,6 +1115,19 @@ if test -z "$have_int64_t" ; then | |||
1086 | ) | 1115 | ) |
1087 | fi | 1116 | fi |
1088 | 1117 | ||
1118 | if test -z "$have_int64_t" ; then | ||
1119 | AC_MSG_CHECKING([for int64_t type in sys/bitypes.h]) | ||
1120 | AC_TRY_COMPILE( | ||
1121 | [ #include <sys/bitypes.h> ], | ||
1122 | [ int64_t a; a = 1], | ||
1123 | [ | ||
1124 | AC_DEFINE(HAVE_INT64_T) | ||
1125 | AC_MSG_RESULT(yes) | ||
1126 | ], | ||
1127 | [ AC_MSG_RESULT(no) ] | ||
1128 | ) | ||
1129 | fi | ||
1130 | |||
1089 | AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ | 1131 | AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ |
1090 | AC_TRY_COMPILE( | 1132 | AC_TRY_COMPILE( |
1091 | [ #include <sys/types.h> ], | 1133 | [ #include <sys/types.h> ], |
@@ -1125,6 +1167,19 @@ if test "x$ac_cv_have_u_int64_t" = "xyes" ; then | |||
1125 | have_u_int64_t=1 | 1167 | have_u_int64_t=1 |
1126 | fi | 1168 | fi |
1127 | 1169 | ||
1170 | if test -z "$have_u_int64_t" ; then | ||
1171 | AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h]) | ||
1172 | AC_TRY_COMPILE( | ||
1173 | [ #include <sys/bitypes.h> ], | ||
1174 | [ u_int64_t a; a = 1], | ||
1175 | [ | ||
1176 | AC_DEFINE(HAVE_U_INT64_T) | ||
1177 | AC_MSG_RESULT(yes) | ||
1178 | ], | ||
1179 | [ AC_MSG_RESULT(no) ] | ||
1180 | ) | ||
1181 | fi | ||
1182 | |||
1128 | if test -z "$have_u_intxx_t" ; then | 1183 | if test -z "$have_u_intxx_t" ; then |
1129 | AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [ | 1184 | AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [ |
1130 | AC_TRY_COMPILE( | 1185 | AC_TRY_COMPILE( |
@@ -1193,6 +1248,8 @@ fi | |||
1193 | 1248 | ||
1194 | TYPE_SOCKLEN_T | 1249 | TYPE_SOCKLEN_T |
1195 | 1250 | ||
1251 | AC_CHECK_TYPES(sig_atomic_t) | ||
1252 | |||
1196 | AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [ | 1253 | AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [ |
1197 | AC_TRY_COMPILE( | 1254 | AC_TRY_COMPILE( |
1198 | [ | 1255 | [ |
@@ -2191,6 +2248,11 @@ if test ! -z "$blibpath" ; then | |||
2191 | AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile]) | 2248 | AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile]) |
2192 | fi | 2249 | fi |
2193 | 2250 | ||
2251 | dnl remove pam and dl because they are in $LIBPAM | ||
2252 | if test "$PAM_MSG" = yes ; then | ||
2253 | LIBS=`echo $LIBS | sed 's/-lpam -ldl //'` | ||
2254 | fi | ||
2255 | |||
2194 | AC_EXEEXT | 2256 | AC_EXEEXT |
2195 | AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds]) | 2257 | AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds]) |
2196 | AC_OUTPUT | 2258 | AC_OUTPUT |
@@ -2240,7 +2302,7 @@ echo " Compiler: ${CC}" | |||
2240 | echo " Compiler flags: ${CFLAGS}" | 2302 | echo " Compiler flags: ${CFLAGS}" |
2241 | echo "Preprocessor flags: ${CPPFLAGS}" | 2303 | echo "Preprocessor flags: ${CPPFLAGS}" |
2242 | echo " Linker flags: ${LDFLAGS}" | 2304 | echo " Linker flags: ${LDFLAGS}" |
2243 | echo " Libraries: ${LIBS}" | 2305 | echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}" |
2244 | 2306 | ||
2245 | echo "" | 2307 | echo "" |
2246 | 2308 | ||