diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 94 |
1 files changed, 74 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac index 460383757..7005a503e 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -14,7 +14,7 @@ | |||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | 15 | ||
16 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) | 16 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) |
17 | AC_REVISION($Revision: 1.583 $) | 17 | AC_CONFIG_MACRO_DIR([m4]) |
18 | AC_CONFIG_SRCDIR([ssh.c]) | 18 | AC_CONFIG_SRCDIR([ssh.c]) |
19 | AC_LANG([C]) | 19 | AC_LANG([C]) |
20 | 20 | ||
@@ -34,8 +34,6 @@ AC_CHECK_TOOLS([AR], [ar]) | |||
34 | AC_PATH_PROG([CAT], [cat]) | 34 | AC_PATH_PROG([CAT], [cat]) |
35 | AC_PATH_PROG([KILL], [kill]) | 35 | AC_PATH_PROG([KILL], [kill]) |
36 | AC_PATH_PROG([SED], [sed]) | 36 | AC_PATH_PROG([SED], [sed]) |
37 | AC_PATH_PROG([ENT], [ent]) | ||
38 | AC_SUBST([ENT]) | ||
39 | AC_PATH_PROG([TEST_MINUS_S_SH], [bash]) | 37 | AC_PATH_PROG([TEST_MINUS_S_SH], [bash]) |
40 | AC_PATH_PROG([TEST_MINUS_S_SH], [ksh]) | 38 | AC_PATH_PROG([TEST_MINUS_S_SH], [ksh]) |
41 | AC_PATH_PROG([TEST_MINUS_S_SH], [sh]) | 39 | AC_PATH_PROG([TEST_MINUS_S_SH], [sh]) |
@@ -164,6 +162,7 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then | |||
164 | OSSH_CHECK_CFLAG_COMPILE([-Wformat-security]) | 162 | OSSH_CHECK_CFLAG_COMPILE([-Wformat-security]) |
165 | OSSH_CHECK_CFLAG_COMPILE([-Wsizeof-pointer-memaccess]) | 163 | OSSH_CHECK_CFLAG_COMPILE([-Wsizeof-pointer-memaccess]) |
166 | OSSH_CHECK_CFLAG_COMPILE([-Wpointer-sign], [-Wno-pointer-sign]) | 164 | OSSH_CHECK_CFLAG_COMPILE([-Wpointer-sign], [-Wno-pointer-sign]) |
165 | OSSH_CHECK_CFLAG_COMPILE([-Wunused-parameter], [-Wno-unused-parameter]) | ||
167 | OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result]) | 166 | OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result]) |
168 | OSSH_CHECK_CFLAG_COMPILE([-Wimplicit-fallthrough]) | 167 | OSSH_CHECK_CFLAG_COMPILE([-Wimplicit-fallthrough]) |
169 | OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing]) | 168 | OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing]) |
@@ -522,6 +521,8 @@ SPP_MSG="no" | |||
522 | # the --with-solaris-privs option and --with-sandbox=solaris). | 521 | # the --with-solaris-privs option and --with-sandbox=solaris). |
523 | SOLARIS_PRIVS="no" | 522 | SOLARIS_PRIVS="no" |
524 | 523 | ||
524 | AC_CHECK_SIZEOF([size_t]) | ||
525 | |||
525 | # Check for some target-specific stuff | 526 | # Check for some target-specific stuff |
526 | case "$host" in | 527 | case "$host" in |
527 | *-*-aix*) | 528 | *-*-aix*) |
@@ -652,7 +653,9 @@ case "$host" in | |||
652 | *-*-darwin*) | 653 | *-*-darwin*) |
653 | use_pie=auto | 654 | use_pie=auto |
654 | AC_MSG_CHECKING([if we have working getaddrinfo]) | 655 | AC_MSG_CHECKING([if we have working getaddrinfo]) |
655 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <mach-o/dyld.h> | 656 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
657 | #include <mach-o/dyld.h> | ||
658 | #include <stdlib.h> | ||
656 | main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | 659 | main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) |
657 | exit(0); | 660 | exit(0); |
658 | else | 661 | else |
@@ -864,6 +867,10 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
864 | case "$host" in | 867 | case "$host" in |
865 | x86_64-*) | 868 | x86_64-*) |
866 | seccomp_audit_arch=AUDIT_ARCH_X86_64 | 869 | seccomp_audit_arch=AUDIT_ARCH_X86_64 |
870 | # X32: AMD64 instructions in 32bit address space. | ||
871 | if test "x$ac_cv_sizeof_size_t" = "x4" ; then | ||
872 | seccomp_audit_arch=AUDIT_ARCH_I386 | ||
873 | fi | ||
867 | ;; | 874 | ;; |
868 | i*86-*) | 875 | i*86-*) |
869 | seccomp_audit_arch=AUDIT_ARCH_I386 | 876 | seccomp_audit_arch=AUDIT_ARCH_I386 |
@@ -912,6 +919,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
912 | ;; | 919 | ;; |
913 | esac | 920 | esac |
914 | ;; | 921 | ;; |
922 | riscv64-*) | ||
923 | seccomp_audit_arch=AUDIT_ARCH_RISCV64 | ||
924 | ;; | ||
915 | esac | 925 | esac |
916 | if test "x$seccomp_audit_arch" != "x" ; then | 926 | if test "x$seccomp_audit_arch" != "x" ; then |
917 | AC_MSG_RESULT(["$seccomp_audit_arch"]) | 927 | AC_MSG_RESULT(["$seccomp_audit_arch"]) |
@@ -1233,7 +1243,7 @@ EOD | |||
1233 | esac | 1243 | esac |
1234 | 1244 | ||
1235 | AC_MSG_CHECKING([compiler and flags for sanity]) | 1245 | AC_MSG_CHECKING([compiler and flags for sanity]) |
1236 | AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ exit(0); ]])], | 1246 | AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdlib.h> ]], [[ exit(0); ]])], |
1237 | [ AC_MSG_RESULT([yes]) ], | 1247 | [ AC_MSG_RESULT([yes]) ], |
1238 | [ | 1248 | [ |
1239 | AC_MSG_RESULT([no]) | 1249 | AC_MSG_RESULT([no]) |
@@ -1257,6 +1267,7 @@ AC_CHECK_FUNCS([dirname], [AC_CHECK_HEADERS([libgen.h])] , [ | |||
1257 | [AC_LANG_SOURCE([[ | 1267 | [AC_LANG_SOURCE([[ |
1258 | #include <libgen.h> | 1268 | #include <libgen.h> |
1259 | #include <string.h> | 1269 | #include <string.h> |
1270 | #include <stdlib.h> | ||
1260 | 1271 | ||
1261 | int main(int argc, char **argv) { | 1272 | int main(int argc, char **argv) { |
1262 | char *s, buf[32]; | 1273 | char *s, buf[32]; |
@@ -1508,7 +1519,9 @@ AC_MSG_CHECKING([whether struct dirent allocates space for d_name]) | |||
1508 | AC_RUN_IFELSE( | 1519 | AC_RUN_IFELSE( |
1509 | [AC_LANG_PROGRAM([[ | 1520 | [AC_LANG_PROGRAM([[ |
1510 | #include <sys/types.h> | 1521 | #include <sys/types.h> |
1511 | #include <dirent.h>]], | 1522 | #include <dirent.h> |
1523 | #include <stdlib.h> | ||
1524 | ]], | ||
1512 | [[ | 1525 | [[ |
1513 | struct dirent d; | 1526 | struct dirent d; |
1514 | exit(sizeof(d.d_name)<=sizeof(char)); | 1527 | exit(sizeof(d.d_name)<=sizeof(char)); |
@@ -1622,7 +1635,10 @@ AC_ARG_WITH([libedit], | |||
1622 | ) | 1635 | ) |
1623 | AC_MSG_CHECKING([if libedit version is compatible]) | 1636 | AC_MSG_CHECKING([if libedit version is compatible]) |
1624 | AC_COMPILE_IFELSE( | 1637 | AC_COMPILE_IFELSE( |
1625 | [AC_LANG_PROGRAM([[ #include <histedit.h> ]], | 1638 | [AC_LANG_PROGRAM([[ |
1639 | #include <histedit.h> | ||
1640 | #include <stdlib.h> | ||
1641 | ]], | ||
1626 | [[ | 1642 | [[ |
1627 | int i = H_SETSIZE; | 1643 | int i = H_SETSIZE; |
1628 | el_init("", NULL, NULL, NULL); | 1644 | el_init("", NULL, NULL, NULL); |
@@ -2112,7 +2128,11 @@ AC_CHECK_FUNCS([setresgid], [ | |||
2112 | 2128 | ||
2113 | AC_MSG_CHECKING([for working fflush(NULL)]) | 2129 | AC_MSG_CHECKING([for working fflush(NULL)]) |
2114 | AC_RUN_IFELSE( | 2130 | AC_RUN_IFELSE( |
2115 | [AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(NULL); exit(0);]])], | 2131 | [AC_LANG_PROGRAM([[ |
2132 | #include <stdio.h> | ||
2133 | #include <stdlib.h> | ||
2134 | ]], | ||
2135 | [[fflush(NULL); exit(0);]])], | ||
2116 | AC_MSG_RESULT([yes]), | 2136 | AC_MSG_RESULT([yes]), |
2117 | [AC_MSG_RESULT([no]) | 2137 | [AC_MSG_RESULT([no]) |
2118 | AC_DEFINE([FFLUSH_NULL_BUG], [1], | 2138 | AC_DEFINE([FFLUSH_NULL_BUG], [1], |
@@ -2148,7 +2168,10 @@ AC_CHECK_FUNC([getpagesize], | |||
2148 | if test "x$ac_cv_func_snprintf" = "xyes" ; then | 2168 | if test "x$ac_cv_func_snprintf" = "xyes" ; then |
2149 | AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) | 2169 | AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) |
2150 | AC_RUN_IFELSE( | 2170 | AC_RUN_IFELSE( |
2151 | [AC_LANG_PROGRAM([[ #include <stdio.h> ]], | 2171 | [AC_LANG_PROGRAM([[ |
2172 | #include <stdio.h> | ||
2173 | #include <stdlib.h> | ||
2174 | ]], | ||
2152 | [[ | 2175 | [[ |
2153 | char b[5]; | 2176 | char b[5]; |
2154 | snprintf(b,5,"123456789"); | 2177 | snprintf(b,5,"123456789"); |
@@ -2171,6 +2194,8 @@ if test "x$ac_cv_func_snprintf" = "xyes" ; then | |||
2171 | [AC_LANG_PROGRAM([[ | 2194 | [AC_LANG_PROGRAM([[ |
2172 | #include <sys/types.h> | 2195 | #include <sys/types.h> |
2173 | #include <stdio.h> | 2196 | #include <stdio.h> |
2197 | #include <stdlib.h> | ||
2198 | #include <string.h> | ||
2174 | ]], | 2199 | ]], |
2175 | [[ | 2200 | [[ |
2176 | size_t a = 1, b = 2; | 2201 | size_t a = 1, b = 2; |
@@ -2263,6 +2288,7 @@ AC_MSG_CHECKING([for (overly) strict mkstemp]) | |||
2263 | AC_RUN_IFELSE( | 2288 | AC_RUN_IFELSE( |
2264 | [AC_LANG_PROGRAM([[ | 2289 | [AC_LANG_PROGRAM([[ |
2265 | #include <stdlib.h> | 2290 | #include <stdlib.h> |
2291 | #include <unistd.h> | ||
2266 | ]], [[ | 2292 | ]], [[ |
2267 | char template[]="conftest.mkstemp-test"; | 2293 | char template[]="conftest.mkstemp-test"; |
2268 | if (mkstemp(template) == -1) | 2294 | if (mkstemp(template) == -1) |
@@ -2290,6 +2316,8 @@ if test ! -z "$check_for_openpty_ctty_bug"; then | |||
2290 | AC_RUN_IFELSE( | 2316 | AC_RUN_IFELSE( |
2291 | [AC_LANG_PROGRAM([[ | 2317 | [AC_LANG_PROGRAM([[ |
2292 | #include <stdio.h> | 2318 | #include <stdio.h> |
2319 | #include <stdlib.h> | ||
2320 | #include <unistd.h> | ||
2293 | #include <sys/fcntl.h> | 2321 | #include <sys/fcntl.h> |
2294 | #include <sys/types.h> | 2322 | #include <sys/types.h> |
2295 | #include <sys/wait.h> | 2323 | #include <sys/wait.h> |
@@ -2336,6 +2364,7 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ | |||
2336 | AC_RUN_IFELSE( | 2364 | AC_RUN_IFELSE( |
2337 | [AC_LANG_PROGRAM([[ | 2365 | [AC_LANG_PROGRAM([[ |
2338 | #include <stdio.h> | 2366 | #include <stdio.h> |
2367 | #include <stdlib.h> | ||
2339 | #include <sys/socket.h> | 2368 | #include <sys/socket.h> |
2340 | #include <netdb.h> | 2369 | #include <netdb.h> |
2341 | #include <errno.h> | 2370 | #include <errno.h> |
@@ -2404,6 +2433,7 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ | |||
2404 | AC_RUN_IFELSE( | 2433 | AC_RUN_IFELSE( |
2405 | [AC_LANG_PROGRAM([[ | 2434 | [AC_LANG_PROGRAM([[ |
2406 | #include <stdio.h> | 2435 | #include <stdio.h> |
2436 | #include <stdlib.h> | ||
2407 | #include <sys/socket.h> | 2437 | #include <sys/socket.h> |
2408 | #include <netdb.h> | 2438 | #include <netdb.h> |
2409 | #include <errno.h> | 2439 | #include <errno.h> |
@@ -2466,7 +2496,10 @@ fi | |||
2466 | 2496 | ||
2467 | if test "x$check_for_conflicting_getspnam" = "x1"; then | 2497 | if test "x$check_for_conflicting_getspnam" = "x1"; then |
2468 | AC_MSG_CHECKING([for conflicting getspnam in shadow.h]) | 2498 | AC_MSG_CHECKING([for conflicting getspnam in shadow.h]) |
2469 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <shadow.h> ]], | 2499 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
2500 | #include <shadow.h> | ||
2501 | #include <stdlib.h> | ||
2502 | ]], | ||
2470 | [[ exit(0); ]])], | 2503 | [[ exit(0); ]])], |
2471 | [ | 2504 | [ |
2472 | AC_MSG_RESULT([no]) | 2505 | AC_MSG_RESULT([no]) |
@@ -2496,6 +2529,7 @@ if test "x$ac_cv_func_strnvis" = "xyes"; then | |||
2496 | #include <signal.h> | 2529 | #include <signal.h> |
2497 | #include <stdlib.h> | 2530 | #include <stdlib.h> |
2498 | #include <string.h> | 2531 | #include <string.h> |
2532 | #include <unistd.h> | ||
2499 | #include <vis.h> | 2533 | #include <vis.h> |
2500 | static void sighandler(int sig) { _exit(1); } | 2534 | static void sighandler(int sig) { _exit(1); } |
2501 | ]], [[ | 2535 | ]], [[ |
@@ -2524,6 +2558,7 @@ AC_RUN_IFELSE( | |||
2524 | #include <sys/time.h> | 2558 | #include <sys/time.h> |
2525 | #include <stdlib.h> | 2559 | #include <stdlib.h> |
2526 | #include <signal.h> | 2560 | #include <signal.h> |
2561 | #include <unistd.h> | ||
2527 | static void sighandler(int sig) { } | 2562 | static void sighandler(int sig) { } |
2528 | ]], [[ | 2563 | ]], [[ |
2529 | int r; | 2564 | int r; |
@@ -2680,6 +2715,7 @@ if test "x$openssl" = "xyes" ; then | |||
2680 | AC_RUN_IFELSE( | 2715 | AC_RUN_IFELSE( |
2681 | [AC_LANG_PROGRAM([[ | 2716 | [AC_LANG_PROGRAM([[ |
2682 | #include <stdio.h> | 2717 | #include <stdio.h> |
2718 | #include <stdlib.h> | ||
2683 | #include <string.h> | 2719 | #include <string.h> |
2684 | #include <openssl/opensslv.h> | 2720 | #include <openssl/opensslv.h> |
2685 | #include <openssl/crypto.h> | 2721 | #include <openssl/crypto.h> |
@@ -2741,6 +2777,7 @@ if test "x$openssl" = "xyes" ; then | |||
2741 | AC_MSG_CHECKING([whether OpenSSL's headers match the library]) | 2777 | AC_MSG_CHECKING([whether OpenSSL's headers match the library]) |
2742 | AC_RUN_IFELSE( | 2778 | AC_RUN_IFELSE( |
2743 | [AC_LANG_PROGRAM([[ | 2779 | [AC_LANG_PROGRAM([[ |
2780 | #include <stdlib.h> | ||
2744 | #include <string.h> | 2781 | #include <string.h> |
2745 | #include <openssl/opensslv.h> | 2782 | #include <openssl/opensslv.h> |
2746 | #include <openssl/crypto.h> | 2783 | #include <openssl/crypto.h> |
@@ -2880,6 +2917,7 @@ if test "x$openssl" = "xyes" ; then | |||
2880 | AC_MSG_CHECKING([whether OpenSSL has crippled AES support]) | 2917 | AC_MSG_CHECKING([whether OpenSSL has crippled AES support]) |
2881 | AC_LINK_IFELSE( | 2918 | AC_LINK_IFELSE( |
2882 | [AC_LANG_PROGRAM([[ | 2919 | [AC_LANG_PROGRAM([[ |
2920 | #include <stdlib.h> | ||
2883 | #include <string.h> | 2921 | #include <string.h> |
2884 | #include <openssl/evp.h> | 2922 | #include <openssl/evp.h> |
2885 | ]], [[ | 2923 | ]], [[ |
@@ -2899,6 +2937,7 @@ if test "x$openssl" = "xyes" ; then | |||
2899 | AC_MSG_CHECKING([whether OpenSSL has AES CTR via EVP]) | 2937 | AC_MSG_CHECKING([whether OpenSSL has AES CTR via EVP]) |
2900 | AC_LINK_IFELSE( | 2938 | AC_LINK_IFELSE( |
2901 | [AC_LANG_PROGRAM([[ | 2939 | [AC_LANG_PROGRAM([[ |
2940 | #include <stdlib.h> | ||
2902 | #include <string.h> | 2941 | #include <string.h> |
2903 | #include <openssl/evp.h> | 2942 | #include <openssl/evp.h> |
2904 | ]], [[ | 2943 | ]], [[ |
@@ -2920,6 +2959,7 @@ if test "x$openssl" = "xyes" ; then | |||
2920 | AC_MSG_CHECKING([whether OpenSSL has AES GCM via EVP]) | 2959 | AC_MSG_CHECKING([whether OpenSSL has AES GCM via EVP]) |
2921 | AC_LINK_IFELSE( | 2960 | AC_LINK_IFELSE( |
2922 | [AC_LANG_PROGRAM([[ | 2961 | [AC_LANG_PROGRAM([[ |
2962 | #include <stdlib.h> | ||
2923 | #include <string.h> | 2963 | #include <string.h> |
2924 | #include <openssl/evp.h> | 2964 | #include <openssl/evp.h> |
2925 | ]], [[ | 2965 | ]], [[ |
@@ -2947,6 +2987,7 @@ if test "x$openssl" = "xyes" ; then | |||
2947 | AC_MSG_CHECKING([if EVP_DigestUpdate returns an int]) | 2987 | AC_MSG_CHECKING([if EVP_DigestUpdate returns an int]) |
2948 | AC_LINK_IFELSE( | 2988 | AC_LINK_IFELSE( |
2949 | [AC_LANG_PROGRAM([[ | 2989 | [AC_LANG_PROGRAM([[ |
2990 | #include <stdlib.h> | ||
2950 | #include <string.h> | 2991 | #include <string.h> |
2951 | #include <openssl/evp.h> | 2992 | #include <openssl/evp.h> |
2952 | ]], [[ | 2993 | ]], [[ |
@@ -3033,6 +3074,7 @@ if test "x$openssl" = "xyes" ; then | |||
3033 | AC_MSG_CHECKING([if OpenSSL's NID_secp521r1 is functional]) | 3074 | AC_MSG_CHECKING([if OpenSSL's NID_secp521r1 is functional]) |
3034 | AC_RUN_IFELSE( | 3075 | AC_RUN_IFELSE( |
3035 | [AC_LANG_PROGRAM([[ | 3076 | [AC_LANG_PROGRAM([[ |
3077 | #include <stdlib.h> | ||
3036 | #include <openssl/ec.h> | 3078 | #include <openssl/ec.h> |
3037 | #include <openssl/ecdh.h> | 3079 | #include <openssl/ecdh.h> |
3038 | #include <openssl/ecdsa.h> | 3080 | #include <openssl/ecdsa.h> |
@@ -3173,6 +3215,16 @@ if test "x$enable_sk" = "xyes" -a "x$enable_sk_internal" = "xyes" ; then | |||
3173 | ], [ AC_MSG_ERROR([no usable libfido2 found]) ], | 3215 | ], [ AC_MSG_ERROR([no usable libfido2 found]) ], |
3174 | [ $OTHERLIBS ] | 3216 | [ $OTHERLIBS ] |
3175 | ) | 3217 | ) |
3218 | saved_LIBS="$LIBS" | ||
3219 | LIBS="$LIBS $LIBFIDO2" | ||
3220 | AC_CHECK_FUNCS([ \ | ||
3221 | fido_cred_prot \ | ||
3222 | fido_cred_set_prot \ | ||
3223 | fido_dev_get_touch_begin \ | ||
3224 | fido_dev_get_touch_status \ | ||
3225 | fido_dev_supports_cred_prot \ | ||
3226 | ]) | ||
3227 | LIBS="$saved_LIBS" | ||
3176 | AC_CHECK_HEADER([fido.h], [], | 3228 | AC_CHECK_HEADER([fido.h], [], |
3177 | AC_MSG_ERROR([missing fido.h from libfido2])) | 3229 | AC_MSG_ERROR([missing fido.h from libfido2])) |
3178 | AC_CHECK_HEADER([fido/credman.h], [], | 3230 | AC_CHECK_HEADER([fido/credman.h], [], |
@@ -3205,6 +3257,7 @@ if test "x$openssl" = "xyes" ; then | |||
3205 | AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) | 3257 | AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) |
3206 | AC_RUN_IFELSE( | 3258 | AC_RUN_IFELSE( |
3207 | [AC_LANG_PROGRAM([[ | 3259 | [AC_LANG_PROGRAM([[ |
3260 | #include <stdlib.h> | ||
3208 | #include <string.h> | 3261 | #include <string.h> |
3209 | #include <openssl/rand.h> | 3262 | #include <openssl/rand.h> |
3210 | ]], [[ | 3263 | ]], [[ |
@@ -3636,6 +3689,7 @@ if test -z "$have_llong_max" && test -z "$have_long_long_max"; then | |||
3636 | AC_RUN_IFELSE( | 3689 | AC_RUN_IFELSE( |
3637 | [AC_LANG_PROGRAM([[ | 3690 | [AC_LANG_PROGRAM([[ |
3638 | #include <stdio.h> | 3691 | #include <stdio.h> |
3692 | #include <stdlib.h> | ||
3639 | /* Why is this so damn hard? */ | 3693 | /* Why is this so damn hard? */ |
3640 | #ifdef __GNUC__ | 3694 | #ifdef __GNUC__ |
3641 | # undef __GNUC__ | 3695 | # undef __GNUC__ |
@@ -4151,6 +4205,7 @@ dnl test snprintf (broken on SCO w/gcc) | |||
4151 | AC_RUN_IFELSE( | 4205 | AC_RUN_IFELSE( |
4152 | [AC_LANG_SOURCE([[ | 4206 | [AC_LANG_SOURCE([[ |
4153 | #include <stdio.h> | 4207 | #include <stdio.h> |
4208 | #include <stdlib.h> | ||
4154 | #include <string.h> | 4209 | #include <string.h> |
4155 | #ifdef HAVE_SNPRINTF | 4210 | #ifdef HAVE_SNPRINTF |
4156 | main() | 4211 | main() |
@@ -4195,6 +4250,7 @@ OSSH_CHECK_HEADER_FOR_FIELD([ut_exit], [utmp.h], [HAVE_EXIT_IN_UTMP]) | |||
4195 | OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmp.h], [HAVE_TIME_IN_UTMP]) | 4250 | OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmp.h], [HAVE_TIME_IN_UTMP]) |
4196 | OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmpx.h], [HAVE_TIME_IN_UTMPX]) | 4251 | OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmpx.h], [HAVE_TIME_IN_UTMPX]) |
4197 | OSSH_CHECK_HEADER_FOR_FIELD([ut_tv], [utmpx.h], [HAVE_TV_IN_UTMPX]) | 4252 | OSSH_CHECK_HEADER_FOR_FIELD([ut_tv], [utmpx.h], [HAVE_TV_IN_UTMPX]) |
4253 | OSSH_CHECK_HEADER_FOR_FIELD([ut_ss], [utmpx.h], [HAVE_SS_IN_UTMPX]) | ||
4198 | 4254 | ||
4199 | AC_CHECK_MEMBERS([struct stat.st_blksize]) | 4255 | AC_CHECK_MEMBERS([struct stat.st_blksize]) |
4200 | AC_CHECK_MEMBERS([struct stat.st_mtim]) | 4256 | AC_CHECK_MEMBERS([struct stat.st_mtim]) |
@@ -4253,6 +4309,7 @@ AC_CACHE_CHECK([for msg_accrights field in struct msghdr], | |||
4253 | #include <sys/types.h> | 4309 | #include <sys/types.h> |
4254 | #include <sys/socket.h> | 4310 | #include <sys/socket.h> |
4255 | #include <sys/uio.h> | 4311 | #include <sys/uio.h> |
4312 | #include <stdlib.h> | ||
4256 | ]], [[ | 4313 | ]], [[ |
4257 | #ifdef msg_accrights | 4314 | #ifdef msg_accrights |
4258 | #error "msg_accrights is a macro" | 4315 | #error "msg_accrights is a macro" |
@@ -4314,6 +4371,7 @@ AC_CACHE_CHECK([for msg_control field in struct msghdr], | |||
4314 | #include <sys/types.h> | 4371 | #include <sys/types.h> |
4315 | #include <sys/socket.h> | 4372 | #include <sys/socket.h> |
4316 | #include <sys/uio.h> | 4373 | #include <sys/uio.h> |
4374 | #include <stdlib.h> | ||
4317 | ]], [[ | 4375 | ]], [[ |
4318 | #ifdef msg_control | 4376 | #ifdef msg_control |
4319 | #error "msg_control is a macro" | 4377 | #error "msg_control is a macro" |
@@ -4334,7 +4392,7 @@ if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then | |||
4334 | fi | 4392 | fi |
4335 | 4393 | ||
4336 | AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ | 4394 | AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ |
4337 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], | 4395 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], |
4338 | [[ extern char *__progname; printf("%s", __progname); ]])], | 4396 | [[ extern char *__progname; printf("%s", __progname); ]])], |
4339 | [ ac_cv_libc_defines___progname="yes" ], | 4397 | [ ac_cv_libc_defines___progname="yes" ], |
4340 | [ ac_cv_libc_defines___progname="no" | 4398 | [ ac_cv_libc_defines___progname="no" |
@@ -4406,7 +4464,7 @@ if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then | |||
4406 | fi | 4464 | fi |
4407 | 4465 | ||
4408 | AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ | 4466 | AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ |
4409 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], | 4467 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], |
4410 | [[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);]])], | 4468 | [[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);]])], |
4411 | [ ac_cv_libc_defines_sys_errlist="yes" ], | 4469 | [ ac_cv_libc_defines_sys_errlist="yes" ], |
4412 | [ ac_cv_libc_defines_sys_errlist="no" | 4470 | [ ac_cv_libc_defines_sys_errlist="no" |
@@ -4419,7 +4477,7 @@ fi | |||
4419 | 4477 | ||
4420 | 4478 | ||
4421 | AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [ | 4479 | AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [ |
4422 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], | 4480 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], |
4423 | [[ extern int sys_nerr; printf("%i", sys_nerr);]])], | 4481 | [[ extern int sys_nerr; printf("%i", sys_nerr);]])], |
4424 | [ ac_cv_libc_defines_sys_nerr="yes" ], | 4482 | [ ac_cv_libc_defines_sys_nerr="yes" ], |
4425 | [ ac_cv_libc_defines_sys_nerr="no" | 4483 | [ ac_cv_libc_defines_sys_nerr="no" |
@@ -4513,13 +4571,10 @@ AC_ARG_WITH([selinux], | |||
4513 | LIBS="$LIBS -lselinux" | 4571 | LIBS="$LIBS -lselinux" |
4514 | ], | 4572 | ], |
4515 | AC_MSG_ERROR([SELinux support requires libselinux library])) | 4573 | AC_MSG_ERROR([SELinux support requires libselinux library])) |
4516 | SSHLIBS="$SSHLIBS $LIBSELINUX" | ||
4517 | SSHDLIBS="$SSHDLIBS $LIBSELINUX" | ||
4518 | AC_CHECK_FUNCS([getseuserbyname get_default_context_with_level]) | 4574 | AC_CHECK_FUNCS([getseuserbyname get_default_context_with_level]) |
4519 | LIBS="$save_LIBS" | 4575 | LIBS="$save_LIBS $LIBSELINUX" |
4520 | fi ] | 4576 | fi ] |
4521 | ) | 4577 | ) |
4522 | AC_SUBST([SSHLIBS]) | ||
4523 | AC_SUBST([SSHDLIBS]) | 4578 | AC_SUBST([SSHDLIBS]) |
4524 | 4579 | ||
4525 | # Check whether user wants Kerberos 5 support | 4580 | # Check whether user wants Kerberos 5 support |
@@ -4731,6 +4786,7 @@ AC_ARG_WITH([maildir], | |||
4731 | AC_RUN_IFELSE( | 4786 | AC_RUN_IFELSE( |
4732 | [AC_LANG_PROGRAM([[ | 4787 | [AC_LANG_PROGRAM([[ |
4733 | #include <stdio.h> | 4788 | #include <stdio.h> |
4789 | #include <stdlib.h> | ||
4734 | #include <string.h> | 4790 | #include <string.h> |
4735 | #ifdef HAVE_PATHS_H | 4791 | #ifdef HAVE_PATHS_H |
4736 | #include <paths.h> | 4792 | #include <paths.h> |
@@ -4975,6 +5031,7 @@ otherwise scp will not work.]) | |||
4975 | [AC_LANG_PROGRAM([[ | 5031 | [AC_LANG_PROGRAM([[ |
4976 | /* find out what STDPATH is */ | 5032 | /* find out what STDPATH is */ |
4977 | #include <stdio.h> | 5033 | #include <stdio.h> |
5034 | #include <stdlib.h> | ||
4978 | #ifdef HAVE_PATHS_H | 5035 | #ifdef HAVE_PATHS_H |
4979 | # include <paths.h> | 5036 | # include <paths.h> |
4980 | #endif | 5037 | #endif |
@@ -5480,9 +5537,6 @@ echo " Libraries: ${LIBS}" | |||
5480 | if test ! -z "${SSHDLIBS}"; then | 5537 | if test ! -z "${SSHDLIBS}"; then |
5481 | echo " +for sshd: ${SSHDLIBS}" | 5538 | echo " +for sshd: ${SSHDLIBS}" |
5482 | fi | 5539 | fi |
5483 | if test ! -z "${SSHLIBS}"; then | ||
5484 | echo " +for ssh: ${SSHLIBS}" | ||
5485 | fi | ||
5486 | 5540 | ||
5487 | echo "" | 5541 | echo "" |
5488 | 5542 | ||