summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac94
1 files changed, 74 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index 7e0584d2c..5944299fa 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
16AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) 16AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
17AC_REVISION($Revision: 1.583 $) 17AC_CONFIG_MACRO_DIR([m4])
18AC_CONFIG_SRCDIR([ssh.c]) 18AC_CONFIG_SRCDIR([ssh.c])
19AC_LANG([C]) 19AC_LANG([C])
20 20
@@ -34,8 +34,6 @@ AC_CHECK_TOOLS([AR], [ar])
34AC_PATH_PROG([CAT], [cat]) 34AC_PATH_PROG([CAT], [cat])
35AC_PATH_PROG([KILL], [kill]) 35AC_PATH_PROG([KILL], [kill])
36AC_PATH_PROG([SED], [sed]) 36AC_PATH_PROG([SED], [sed])
37AC_PATH_PROG([ENT], [ent])
38AC_SUBST([ENT])
39AC_PATH_PROG([TEST_MINUS_S_SH], [bash]) 37AC_PATH_PROG([TEST_MINUS_S_SH], [bash])
40AC_PATH_PROG([TEST_MINUS_S_SH], [ksh]) 38AC_PATH_PROG([TEST_MINUS_S_SH], [ksh])
41AC_PATH_PROG([TEST_MINUS_S_SH], [sh]) 39AC_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).
523SOLARIS_PRIVS="no" 522SOLARIS_PRIVS="no"
524 523
524AC_CHECK_SIZEOF([size_t])
525
525# Check for some target-specific stuff 526# Check for some target-specific stuff
526case "$host" in 527case "$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>
656main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) 659main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
657 exit(0); 660 exit(0);
658 else 661 else
@@ -888,6 +891,10 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
888 case "$host" in 891 case "$host" in
889 x86_64-*) 892 x86_64-*)
890 seccomp_audit_arch=AUDIT_ARCH_X86_64 893 seccomp_audit_arch=AUDIT_ARCH_X86_64
894 # X32: AMD64 instructions in 32bit address space.
895 if test "x$ac_cv_sizeof_size_t" = "x4" ; then
896 seccomp_audit_arch=AUDIT_ARCH_I386
897 fi
891 ;; 898 ;;
892 i*86-*) 899 i*86-*)
893 seccomp_audit_arch=AUDIT_ARCH_I386 900 seccomp_audit_arch=AUDIT_ARCH_I386
@@ -936,6 +943,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
936 ;; 943 ;;
937 esac 944 esac
938 ;; 945 ;;
946 riscv64-*)
947 seccomp_audit_arch=AUDIT_ARCH_RISCV64
948 ;;
939 esac 949 esac
940 if test "x$seccomp_audit_arch" != "x" ; then 950 if test "x$seccomp_audit_arch" != "x" ; then
941 AC_MSG_RESULT(["$seccomp_audit_arch"]) 951 AC_MSG_RESULT(["$seccomp_audit_arch"])
@@ -1257,7 +1267,7 @@ EOD
1257esac 1267esac
1258 1268
1259AC_MSG_CHECKING([compiler and flags for sanity]) 1269AC_MSG_CHECKING([compiler and flags for sanity])
1260AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ exit(0); ]])], 1270AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdlib.h> ]], [[ exit(0); ]])],
1261 [ AC_MSG_RESULT([yes]) ], 1271 [ AC_MSG_RESULT([yes]) ],
1262 [ 1272 [
1263 AC_MSG_RESULT([no]) 1273 AC_MSG_RESULT([no])
@@ -1281,6 +1291,7 @@ AC_CHECK_FUNCS([dirname], [AC_CHECK_HEADERS([libgen.h])] , [
1281 [AC_LANG_SOURCE([[ 1291 [AC_LANG_SOURCE([[
1282#include <libgen.h> 1292#include <libgen.h>
1283#include <string.h> 1293#include <string.h>
1294#include <stdlib.h>
1284 1295
1285int main(int argc, char **argv) { 1296int main(int argc, char **argv) {
1286 char *s, buf[32]; 1297 char *s, buf[32];
@@ -1532,7 +1543,9 @@ AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
1532AC_RUN_IFELSE( 1543AC_RUN_IFELSE(
1533 [AC_LANG_PROGRAM([[ 1544 [AC_LANG_PROGRAM([[
1534#include <sys/types.h> 1545#include <sys/types.h>
1535#include <dirent.h>]], 1546#include <dirent.h>
1547#include <stdlib.h>
1548 ]],
1536 [[ 1549 [[
1537 struct dirent d; 1550 struct dirent d;
1538 exit(sizeof(d.d_name)<=sizeof(char)); 1551 exit(sizeof(d.d_name)<=sizeof(char));
@@ -1702,7 +1715,10 @@ AC_ARG_WITH([libedit],
1702 ) 1715 )
1703 AC_MSG_CHECKING([if libedit version is compatible]) 1716 AC_MSG_CHECKING([if libedit version is compatible])
1704 AC_COMPILE_IFELSE( 1717 AC_COMPILE_IFELSE(
1705 [AC_LANG_PROGRAM([[ #include <histedit.h> ]], 1718 [AC_LANG_PROGRAM([[
1719#include <histedit.h>
1720#include <stdlib.h>
1721 ]],
1706 [[ 1722 [[
1707 int i = H_SETSIZE; 1723 int i = H_SETSIZE;
1708 el_init("", NULL, NULL, NULL); 1724 el_init("", NULL, NULL, NULL);
@@ -2192,7 +2208,11 @@ AC_CHECK_FUNCS([setresgid], [
2192 2208
2193AC_MSG_CHECKING([for working fflush(NULL)]) 2209AC_MSG_CHECKING([for working fflush(NULL)])
2194AC_RUN_IFELSE( 2210AC_RUN_IFELSE(
2195 [AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(NULL); exit(0);]])], 2211 [AC_LANG_PROGRAM([[
2212#include <stdio.h>
2213#include <stdlib.h>
2214 ]],
2215 [[fflush(NULL); exit(0);]])],
2196 AC_MSG_RESULT([yes]), 2216 AC_MSG_RESULT([yes]),
2197 [AC_MSG_RESULT([no]) 2217 [AC_MSG_RESULT([no])
2198 AC_DEFINE([FFLUSH_NULL_BUG], [1], 2218 AC_DEFINE([FFLUSH_NULL_BUG], [1],
@@ -2228,7 +2248,10 @@ AC_CHECK_FUNC([getpagesize],
2228if test "x$ac_cv_func_snprintf" = "xyes" ; then 2248if test "x$ac_cv_func_snprintf" = "xyes" ; then
2229 AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) 2249 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
2230 AC_RUN_IFELSE( 2250 AC_RUN_IFELSE(
2231 [AC_LANG_PROGRAM([[ #include <stdio.h> ]], 2251 [AC_LANG_PROGRAM([[
2252#include <stdio.h>
2253#include <stdlib.h>
2254 ]],
2232 [[ 2255 [[
2233 char b[5]; 2256 char b[5];
2234 snprintf(b,5,"123456789"); 2257 snprintf(b,5,"123456789");
@@ -2251,6 +2274,8 @@ if test "x$ac_cv_func_snprintf" = "xyes" ; then
2251 [AC_LANG_PROGRAM([[ 2274 [AC_LANG_PROGRAM([[
2252#include <sys/types.h> 2275#include <sys/types.h>
2253#include <stdio.h> 2276#include <stdio.h>
2277#include <stdlib.h>
2278#include <string.h>
2254 ]], 2279 ]],
2255 [[ 2280 [[
2256 size_t a = 1, b = 2; 2281 size_t a = 1, b = 2;
@@ -2343,6 +2368,7 @@ AC_MSG_CHECKING([for (overly) strict mkstemp])
2343AC_RUN_IFELSE( 2368AC_RUN_IFELSE(
2344 [AC_LANG_PROGRAM([[ 2369 [AC_LANG_PROGRAM([[
2345#include <stdlib.h> 2370#include <stdlib.h>
2371#include <unistd.h>
2346 ]], [[ 2372 ]], [[
2347 char template[]="conftest.mkstemp-test"; 2373 char template[]="conftest.mkstemp-test";
2348 if (mkstemp(template) == -1) 2374 if (mkstemp(template) == -1)
@@ -2370,6 +2396,8 @@ if test ! -z "$check_for_openpty_ctty_bug"; then
2370 AC_RUN_IFELSE( 2396 AC_RUN_IFELSE(
2371 [AC_LANG_PROGRAM([[ 2397 [AC_LANG_PROGRAM([[
2372#include <stdio.h> 2398#include <stdio.h>
2399#include <stdlib.h>
2400#include <unistd.h>
2373#include <sys/fcntl.h> 2401#include <sys/fcntl.h>
2374#include <sys/types.h> 2402#include <sys/types.h>
2375#include <sys/wait.h> 2403#include <sys/wait.h>
@@ -2416,6 +2444,7 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
2416 AC_RUN_IFELSE( 2444 AC_RUN_IFELSE(
2417 [AC_LANG_PROGRAM([[ 2445 [AC_LANG_PROGRAM([[
2418#include <stdio.h> 2446#include <stdio.h>
2447#include <stdlib.h>
2419#include <sys/socket.h> 2448#include <sys/socket.h>
2420#include <netdb.h> 2449#include <netdb.h>
2421#include <errno.h> 2450#include <errno.h>
@@ -2484,6 +2513,7 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
2484 AC_RUN_IFELSE( 2513 AC_RUN_IFELSE(
2485 [AC_LANG_PROGRAM([[ 2514 [AC_LANG_PROGRAM([[
2486#include <stdio.h> 2515#include <stdio.h>
2516#include <stdlib.h>
2487#include <sys/socket.h> 2517#include <sys/socket.h>
2488#include <netdb.h> 2518#include <netdb.h>
2489#include <errno.h> 2519#include <errno.h>
@@ -2546,7 +2576,10 @@ fi
2546 2576
2547if test "x$check_for_conflicting_getspnam" = "x1"; then 2577if test "x$check_for_conflicting_getspnam" = "x1"; then
2548 AC_MSG_CHECKING([for conflicting getspnam in shadow.h]) 2578 AC_MSG_CHECKING([for conflicting getspnam in shadow.h])
2549 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <shadow.h> ]], 2579 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2580#include <shadow.h>
2581#include <stdlib.h>
2582 ]],
2550 [[ exit(0); ]])], 2583 [[ exit(0); ]])],
2551 [ 2584 [
2552 AC_MSG_RESULT([no]) 2585 AC_MSG_RESULT([no])
@@ -2576,6 +2609,7 @@ if test "x$ac_cv_func_strnvis" = "xyes"; then
2576#include <signal.h> 2609#include <signal.h>
2577#include <stdlib.h> 2610#include <stdlib.h>
2578#include <string.h> 2611#include <string.h>
2612#include <unistd.h>
2579#include <vis.h> 2613#include <vis.h>
2580static void sighandler(int sig) { _exit(1); } 2614static void sighandler(int sig) { _exit(1); }
2581 ]], [[ 2615 ]], [[
@@ -2604,6 +2638,7 @@ AC_RUN_IFELSE(
2604#include <sys/time.h> 2638#include <sys/time.h>
2605#include <stdlib.h> 2639#include <stdlib.h>
2606#include <signal.h> 2640#include <signal.h>
2641#include <unistd.h>
2607static void sighandler(int sig) { } 2642static void sighandler(int sig) { }
2608 ]], [[ 2643 ]], [[
2609 int r; 2644 int r;
@@ -2760,6 +2795,7 @@ if test "x$openssl" = "xyes" ; then
2760 AC_RUN_IFELSE( 2795 AC_RUN_IFELSE(
2761 [AC_LANG_PROGRAM([[ 2796 [AC_LANG_PROGRAM([[
2762 #include <stdio.h> 2797 #include <stdio.h>
2798 #include <stdlib.h>
2763 #include <string.h> 2799 #include <string.h>
2764 #include <openssl/opensslv.h> 2800 #include <openssl/opensslv.h>
2765 #include <openssl/crypto.h> 2801 #include <openssl/crypto.h>
@@ -2821,6 +2857,7 @@ if test "x$openssl" = "xyes" ; then
2821 AC_MSG_CHECKING([whether OpenSSL's headers match the library]) 2857 AC_MSG_CHECKING([whether OpenSSL's headers match the library])
2822 AC_RUN_IFELSE( 2858 AC_RUN_IFELSE(
2823 [AC_LANG_PROGRAM([[ 2859 [AC_LANG_PROGRAM([[
2860 #include <stdlib.h>
2824 #include <string.h> 2861 #include <string.h>
2825 #include <openssl/opensslv.h> 2862 #include <openssl/opensslv.h>
2826 #include <openssl/crypto.h> 2863 #include <openssl/crypto.h>
@@ -2960,6 +2997,7 @@ if test "x$openssl" = "xyes" ; then
2960 AC_MSG_CHECKING([whether OpenSSL has crippled AES support]) 2997 AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
2961 AC_LINK_IFELSE( 2998 AC_LINK_IFELSE(
2962 [AC_LANG_PROGRAM([[ 2999 [AC_LANG_PROGRAM([[
3000 #include <stdlib.h>
2963 #include <string.h> 3001 #include <string.h>
2964 #include <openssl/evp.h> 3002 #include <openssl/evp.h>
2965 ]], [[ 3003 ]], [[
@@ -2979,6 +3017,7 @@ if test "x$openssl" = "xyes" ; then
2979 AC_MSG_CHECKING([whether OpenSSL has AES CTR via EVP]) 3017 AC_MSG_CHECKING([whether OpenSSL has AES CTR via EVP])
2980 AC_LINK_IFELSE( 3018 AC_LINK_IFELSE(
2981 [AC_LANG_PROGRAM([[ 3019 [AC_LANG_PROGRAM([[
3020 #include <stdlib.h>
2982 #include <string.h> 3021 #include <string.h>
2983 #include <openssl/evp.h> 3022 #include <openssl/evp.h>
2984 ]], [[ 3023 ]], [[
@@ -3000,6 +3039,7 @@ if test "x$openssl" = "xyes" ; then
3000 AC_MSG_CHECKING([whether OpenSSL has AES GCM via EVP]) 3039 AC_MSG_CHECKING([whether OpenSSL has AES GCM via EVP])
3001 AC_LINK_IFELSE( 3040 AC_LINK_IFELSE(
3002 [AC_LANG_PROGRAM([[ 3041 [AC_LANG_PROGRAM([[
3042 #include <stdlib.h>
3003 #include <string.h> 3043 #include <string.h>
3004 #include <openssl/evp.h> 3044 #include <openssl/evp.h>
3005 ]], [[ 3045 ]], [[
@@ -3027,6 +3067,7 @@ if test "x$openssl" = "xyes" ; then
3027 AC_MSG_CHECKING([if EVP_DigestUpdate returns an int]) 3067 AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
3028 AC_LINK_IFELSE( 3068 AC_LINK_IFELSE(
3029 [AC_LANG_PROGRAM([[ 3069 [AC_LANG_PROGRAM([[
3070 #include <stdlib.h>
3030 #include <string.h> 3071 #include <string.h>
3031 #include <openssl/evp.h> 3072 #include <openssl/evp.h>
3032 ]], [[ 3073 ]], [[
@@ -3113,6 +3154,7 @@ if test "x$openssl" = "xyes" ; then
3113 AC_MSG_CHECKING([if OpenSSL's NID_secp521r1 is functional]) 3154 AC_MSG_CHECKING([if OpenSSL's NID_secp521r1 is functional])
3114 AC_RUN_IFELSE( 3155 AC_RUN_IFELSE(
3115 [AC_LANG_PROGRAM([[ 3156 [AC_LANG_PROGRAM([[
3157 #include <stdlib.h>
3116 #include <openssl/ec.h> 3158 #include <openssl/ec.h>
3117 #include <openssl/ecdh.h> 3159 #include <openssl/ecdh.h>
3118 #include <openssl/ecdsa.h> 3160 #include <openssl/ecdsa.h>
@@ -3253,6 +3295,16 @@ if test "x$enable_sk" = "xyes" -a "x$enable_sk_internal" = "xyes" ; then
3253 ], [ AC_MSG_ERROR([no usable libfido2 found]) ], 3295 ], [ AC_MSG_ERROR([no usable libfido2 found]) ],
3254 [ $OTHERLIBS ] 3296 [ $OTHERLIBS ]
3255 ) 3297 )
3298 saved_LIBS="$LIBS"
3299 LIBS="$LIBS $LIBFIDO2"
3300 AC_CHECK_FUNCS([ \
3301 fido_cred_prot \
3302 fido_cred_set_prot \
3303 fido_dev_get_touch_begin \
3304 fido_dev_get_touch_status \
3305 fido_dev_supports_cred_prot \
3306 ])
3307 LIBS="$saved_LIBS"
3256 AC_CHECK_HEADER([fido.h], [], 3308 AC_CHECK_HEADER([fido.h], [],
3257 AC_MSG_ERROR([missing fido.h from libfido2])) 3309 AC_MSG_ERROR([missing fido.h from libfido2]))
3258 AC_CHECK_HEADER([fido/credman.h], [], 3310 AC_CHECK_HEADER([fido/credman.h], [],
@@ -3285,6 +3337,7 @@ if test "x$openssl" = "xyes" ; then
3285 AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) 3337 AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
3286 AC_RUN_IFELSE( 3338 AC_RUN_IFELSE(
3287 [AC_LANG_PROGRAM([[ 3339 [AC_LANG_PROGRAM([[
3340 #include <stdlib.h>
3288 #include <string.h> 3341 #include <string.h>
3289 #include <openssl/rand.h> 3342 #include <openssl/rand.h>
3290 ]], [[ 3343 ]], [[
@@ -3716,6 +3769,7 @@ if test -z "$have_llong_max" && test -z "$have_long_long_max"; then
3716 AC_RUN_IFELSE( 3769 AC_RUN_IFELSE(
3717 [AC_LANG_PROGRAM([[ 3770 [AC_LANG_PROGRAM([[
3718#include <stdio.h> 3771#include <stdio.h>
3772#include <stdlib.h>
3719/* Why is this so damn hard? */ 3773/* Why is this so damn hard? */
3720#ifdef __GNUC__ 3774#ifdef __GNUC__
3721# undef __GNUC__ 3775# undef __GNUC__
@@ -4231,6 +4285,7 @@ dnl test snprintf (broken on SCO w/gcc)
4231 AC_RUN_IFELSE( 4285 AC_RUN_IFELSE(
4232 [AC_LANG_SOURCE([[ 4286 [AC_LANG_SOURCE([[
4233#include <stdio.h> 4287#include <stdio.h>
4288#include <stdlib.h>
4234#include <string.h> 4289#include <string.h>
4235#ifdef HAVE_SNPRINTF 4290#ifdef HAVE_SNPRINTF
4236main() 4291main()
@@ -4275,6 +4330,7 @@ OSSH_CHECK_HEADER_FOR_FIELD([ut_exit], [utmp.h], [HAVE_EXIT_IN_UTMP])
4275OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmp.h], [HAVE_TIME_IN_UTMP]) 4330OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmp.h], [HAVE_TIME_IN_UTMP])
4276OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmpx.h], [HAVE_TIME_IN_UTMPX]) 4331OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmpx.h], [HAVE_TIME_IN_UTMPX])
4277OSSH_CHECK_HEADER_FOR_FIELD([ut_tv], [utmpx.h], [HAVE_TV_IN_UTMPX]) 4332OSSH_CHECK_HEADER_FOR_FIELD([ut_tv], [utmpx.h], [HAVE_TV_IN_UTMPX])
4333OSSH_CHECK_HEADER_FOR_FIELD([ut_ss], [utmpx.h], [HAVE_SS_IN_UTMPX])
4278 4334
4279AC_CHECK_MEMBERS([struct stat.st_blksize]) 4335AC_CHECK_MEMBERS([struct stat.st_blksize])
4280AC_CHECK_MEMBERS([struct stat.st_mtim]) 4336AC_CHECK_MEMBERS([struct stat.st_mtim])
@@ -4333,6 +4389,7 @@ AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
4333#include <sys/types.h> 4389#include <sys/types.h>
4334#include <sys/socket.h> 4390#include <sys/socket.h>
4335#include <sys/uio.h> 4391#include <sys/uio.h>
4392#include <stdlib.h>
4336 ]], [[ 4393 ]], [[
4337#ifdef msg_accrights 4394#ifdef msg_accrights
4338#error "msg_accrights is a macro" 4395#error "msg_accrights is a macro"
@@ -4394,6 +4451,7 @@ AC_CACHE_CHECK([for msg_control field in struct msghdr],
4394#include <sys/types.h> 4451#include <sys/types.h>
4395#include <sys/socket.h> 4452#include <sys/socket.h>
4396#include <sys/uio.h> 4453#include <sys/uio.h>
4454#include <stdlib.h>
4397 ]], [[ 4455 ]], [[
4398#ifdef msg_control 4456#ifdef msg_control
4399#error "msg_control is a macro" 4457#error "msg_control is a macro"
@@ -4414,7 +4472,7 @@ if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
4414fi 4472fi
4415 4473
4416AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ 4474AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
4417 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], 4475 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]],
4418 [[ extern char *__progname; printf("%s", __progname); ]])], 4476 [[ extern char *__progname; printf("%s", __progname); ]])],
4419 [ ac_cv_libc_defines___progname="yes" ], 4477 [ ac_cv_libc_defines___progname="yes" ],
4420 [ ac_cv_libc_defines___progname="no" 4478 [ ac_cv_libc_defines___progname="no"
@@ -4486,7 +4544,7 @@ if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
4486fi 4544fi
4487 4545
4488AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ 4546AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
4489 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], 4547 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]],
4490[[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);]])], 4548[[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);]])],
4491 [ ac_cv_libc_defines_sys_errlist="yes" ], 4549 [ ac_cv_libc_defines_sys_errlist="yes" ],
4492 [ ac_cv_libc_defines_sys_errlist="no" 4550 [ ac_cv_libc_defines_sys_errlist="no"
@@ -4499,7 +4557,7 @@ fi
4499 4557
4500 4558
4501AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [ 4559AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
4502 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], 4560 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]],
4503[[ extern int sys_nerr; printf("%i", sys_nerr);]])], 4561[[ extern int sys_nerr; printf("%i", sys_nerr);]])],
4504 [ ac_cv_libc_defines_sys_nerr="yes" ], 4562 [ ac_cv_libc_defines_sys_nerr="yes" ],
4505 [ ac_cv_libc_defines_sys_nerr="no" 4563 [ ac_cv_libc_defines_sys_nerr="no"
@@ -4593,13 +4651,10 @@ AC_ARG_WITH([selinux],
4593 LIBS="$LIBS -lselinux" 4651 LIBS="$LIBS -lselinux"
4594 ], 4652 ],
4595 AC_MSG_ERROR([SELinux support requires libselinux library])) 4653 AC_MSG_ERROR([SELinux support requires libselinux library]))
4596 SSHLIBS="$SSHLIBS $LIBSELINUX"
4597 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
4598 AC_CHECK_FUNCS([getseuserbyname get_default_context_with_level]) 4654 AC_CHECK_FUNCS([getseuserbyname get_default_context_with_level])
4599 LIBS="$save_LIBS" 4655 LIBS="$save_LIBS $LIBSELINUX"
4600 fi ] 4656 fi ]
4601) 4657)
4602AC_SUBST([SSHLIBS])
4603AC_SUBST([SSHDLIBS]) 4658AC_SUBST([SSHDLIBS])
4604 4659
4605# Check whether user wants Kerberos 5 support 4660# Check whether user wants Kerberos 5 support
@@ -4834,6 +4889,7 @@ AC_ARG_WITH([maildir],
4834 AC_RUN_IFELSE( 4889 AC_RUN_IFELSE(
4835 [AC_LANG_PROGRAM([[ 4890 [AC_LANG_PROGRAM([[
4836#include <stdio.h> 4891#include <stdio.h>
4892#include <stdlib.h>
4837#include <string.h> 4893#include <string.h>
4838#ifdef HAVE_PATHS_H 4894#ifdef HAVE_PATHS_H
4839#include <paths.h> 4895#include <paths.h>
@@ -5078,6 +5134,7 @@ otherwise scp will not work.])
5078 [AC_LANG_PROGRAM([[ 5134 [AC_LANG_PROGRAM([[
5079/* find out what STDPATH is */ 5135/* find out what STDPATH is */
5080#include <stdio.h> 5136#include <stdio.h>
5137#include <stdlib.h>
5081#ifdef HAVE_PATHS_H 5138#ifdef HAVE_PATHS_H
5082# include <paths.h> 5139# include <paths.h>
5083#endif 5140#endif
@@ -5585,9 +5642,6 @@ echo " Libraries: ${LIBS}"
5585if test ! -z "${SSHDLIBS}"; then 5642if test ! -z "${SSHDLIBS}"; then
5586echo " +for sshd: ${SSHDLIBS}" 5643echo " +for sshd: ${SSHDLIBS}"
5587fi 5644fi
5588if test ! -z "${SSHLIBS}"; then
5589echo " +for ssh: ${SSHLIBS}"
5590fi
5591 5645
5592echo "" 5646echo ""
5593 5647