summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac85
1 files changed, 23 insertions, 62 deletions
diff --git a/configure.ac b/configure.ac
index 663062bef..83e530750 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,9 +83,11 @@ if test ! -z "$PATH_PASSWD_PROG" ; then
83 [Full path of your "passwd" program]) 83 [Full path of your "passwd" program])
84fi 84fi
85 85
86if test -z "$LD" ; then 86dnl Since autoconf doesn't support it very well, we no longer allow users to
87 LD=$CC 87dnl override LD, however keeping the hook here for now in case there's a use
88fi 88dnl use case we overlooked and someone needs to re-enable it. Unless a good
89dnl reason is found we'll be removing this in future.
90LD="$CC"
89AC_SUBST([LD]) 91AC_SUBST([LD])
90 92
91AC_C_INLINE 93AC_C_INLINE
@@ -162,8 +164,15 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
162 OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result]) 164 OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result])
163 OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing]) 165 OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing])
164 if test "x$use_toolchain_hardening" = "x1"; then 166 if test "x$use_toolchain_hardening" = "x1"; then
165 OSSH_CHECK_CFLAG_COMPILE([-mfunction-return=thunk]) # gcc 167 # Cygwin GCC 7.x allows thunking on the CLI, but produces non-working
166 OSSH_CHECK_CFLAG_COMPILE([-mindirect-branch=thunk]) # gcc 168 # code. Unfortunately you only notice this at link time.
169 case "$host" in
170 *-*-cygwin*) ;;
171 *)
172 OSSH_CHECK_CFLAG_COMPILE([-mfunction-return=thunk]) # gcc
173 OSSH_CHECK_CFLAG_COMPILE([-mindirect-branch=thunk]) # gcc
174 ;;
175 esac
167 OSSH_CHECK_CFLAG_COMPILE([-mretpoline]) # clang 176 OSSH_CHECK_CFLAG_COMPILE([-mretpoline]) # clang
168 OSSH_CHECK_LDFLAG_LINK([-Wl,-z,retpolineplt]) 177 OSSH_CHECK_LDFLAG_LINK([-Wl,-z,retpolineplt])
169 OSSH_CHECK_CFLAG_COMPILE([-D_FORTIFY_SOURCE=2]) 178 OSSH_CHECK_CFLAG_COMPILE([-D_FORTIFY_SOURCE=2])
@@ -274,7 +283,7 @@ typedef void foo(const char *, ...) __attribute__((format(printf, 1, 2)));]],
274 [ AC_MSG_RESULT([yes]) ], 283 [ AC_MSG_RESULT([yes]) ],
275 [ AC_MSG_RESULT([no]) 284 [ AC_MSG_RESULT([no])
276 AC_DEFINE(NO_ATTRIBUTE_ON_PROTOTYPE_ARGS, 1, 285 AC_DEFINE(NO_ATTRIBUTE_ON_PROTOTYPE_ARGS, 1,
277 [compiler does not accept __attribute__ on protoype args]) ] 286 [compiler does not accept __attribute__ on prototype args]) ]
278) 287)
279 288
280if test "x$no_attrib_nonnull" != "x1" ; then 289if test "x$no_attrib_nonnull" != "x1" ; then
@@ -413,6 +422,7 @@ AC_CHECK_HEADERS([ \
413 sys/prctl.h \ 422 sys/prctl.h \
414 sys/pstat.h \ 423 sys/pstat.h \
415 sys/ptrace.h \ 424 sys/ptrace.h \
425 sys/random.h \
416 sys/select.h \ 426 sys/select.h \
417 sys/stat.h \ 427 sys/stat.h \
418 sys/stream.h \ 428 sys/stream.h \
@@ -514,7 +524,7 @@ case "$host" in
514 # Some versions of VAC won't allow macro redefinitions at 524 # Some versions of VAC won't allow macro redefinitions at
515 # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that 525 # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
516 # particularly with older versions of vac or xlc. 526 # particularly with older versions of vac or xlc.
517 # It also throws errors about null macro argments, but these are 527 # It also throws errors about null macro arguments, but these are
518 # not fatal. 528 # not fatal.
519 AC_MSG_CHECKING([if compiler allows macro redefinitions]) 529 AC_MSG_CHECKING([if compiler allows macro redefinitions])
520 AC_COMPILE_IFELSE( 530 AC_COMPILE_IFELSE(
@@ -525,7 +535,6 @@ case "$host" in
525 [ AC_MSG_RESULT([yes]) ], 535 [ AC_MSG_RESULT([yes]) ],
526 [ AC_MSG_RESULT([no]) 536 [ AC_MSG_RESULT([no])
527 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`" 537 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
528 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
529 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`" 538 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
530 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`" 539 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
531 ] 540 ]
@@ -753,7 +762,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
753 PATH="$PATH:/usr/etc" 762 PATH="$PATH:/usr/etc"
754 AC_DEFINE([WITH_IRIX_ARRAY], [1], 763 AC_DEFINE([WITH_IRIX_ARRAY], [1],
755 [Define if you have/want arrays 764 [Define if you have/want arrays
756 (cluster-wide session managment, not C arrays)]) 765 (cluster-wide session management, not C arrays)])
757 AC_DEFINE([WITH_IRIX_PROJECT], [1], 766 AC_DEFINE([WITH_IRIX_PROJECT], [1],
758 [Define if you want IRIX project management]) 767 [Define if you want IRIX project management])
759 AC_DEFINE([WITH_IRIX_AUDIT], [1], 768 AC_DEFINE([WITH_IRIX_AUDIT], [1],
@@ -1398,7 +1407,7 @@ AC_RUN_IFELSE(
1398) 1407)
1399AC_MSG_RESULT([$func_calloc_0_nonnull]) 1408AC_MSG_RESULT([$func_calloc_0_nonnull])
1400 1409
1401if test "x$func_calloc_0_nonnull" == "xyes"; then 1410if test "x$func_calloc_0_nonnull" = "xyes"; then
1402 AC_DEFINE(HAVE_CALLOC, 1, [calloc(0, x) returns non-null]) 1411 AC_DEFINE(HAVE_CALLOC, 1, [calloc(0, x) returns non-null])
1403else 1412else
1404 AC_DEFINE(HAVE_CALLOC, 0, [calloc(0, x) returns NULL]) 1413 AC_DEFINE(HAVE_CALLOC, 0, [calloc(0, x) returns NULL])
@@ -1493,55 +1502,6 @@ else
1493 AC_MSG_RESULT([no]) 1502 AC_MSG_RESULT([no])
1494fi 1503fi
1495 1504
1496# Check whether user wants S/Key support
1497SKEY_MSG="no"
1498AC_ARG_WITH([skey],
1499 [ --with-skey[[=PATH]] Enable S/Key support (optionally in PATH)],
1500 [
1501 if test "x$withval" != "xno" ; then
1502
1503 if test "x$withval" != "xyes" ; then
1504 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1505 LDFLAGS="$LDFLAGS -L${withval}/lib"
1506 fi
1507
1508 AC_DEFINE([SKEY], [1], [Define if you want S/Key support])
1509 LIBS="-lskey $LIBS"
1510 SKEY_MSG="yes"
1511
1512 AC_MSG_CHECKING([for s/key support])
1513 AC_LINK_IFELSE(
1514 [AC_LANG_PROGRAM([[
1515#include <stdio.h>
1516#include <skey.h>
1517 ]], [[
1518 char *ff = skey_keyinfo(""); ff="";
1519 exit(0);
1520 ]])],
1521 [AC_MSG_RESULT([yes])],
1522 [
1523 AC_MSG_RESULT([no])
1524 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1525 ])
1526 AC_MSG_CHECKING([if skeychallenge takes 4 arguments])
1527 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1528#include <stdio.h>
1529#include <skey.h>
1530 ]], [[
1531 (void)skeychallenge(NULL,"name","",0);
1532 ]])],
1533 [
1534 AC_MSG_RESULT([yes])
1535 AC_DEFINE([SKEYCHALLENGE_4ARG], [1],
1536 [Define if your skeychallenge()
1537 function takes 4 arguments (NetBSD)])],
1538 [
1539 AC_MSG_RESULT([no])
1540 ])
1541 fi
1542 ]
1543)
1544
1545# Check whether user wants to use ldns 1505# Check whether user wants to use ldns
1546LDNS_MSG="no" 1506LDNS_MSG="no"
1547AC_ARG_WITH(ldns, 1507AC_ARG_WITH(ldns,
@@ -1778,6 +1738,7 @@ AC_CHECK_FUNCS([ \
1778 getaddrinfo \ 1738 getaddrinfo \
1779 getcwd \ 1739 getcwd \
1780 getgrouplist \ 1740 getgrouplist \
1741 getline \
1781 getnameinfo \ 1742 getnameinfo \
1782 getopt \ 1743 getopt \
1783 getpagesize \ 1744 getpagesize \
@@ -1786,6 +1747,7 @@ AC_CHECK_FUNCS([ \
1786 getpgid \ 1747 getpgid \
1787 _getpty \ 1748 _getpty \
1788 getrlimit \ 1749 getrlimit \
1750 getrandom \
1789 getsid \ 1751 getsid \
1790 getttyent \ 1752 getttyent \
1791 glob \ 1753 glob \
@@ -3005,7 +2967,7 @@ LIBS="$saved_LIBS"
3005 2967
3006### Configure cryptographic random number support 2968### Configure cryptographic random number support
3007 2969
3008# Check wheter OpenSSL seeds itself 2970# Check whether OpenSSL seeds itself
3009if test "x$openssl" = "xyes" ; then 2971if test "x$openssl" = "xyes" ; then
3010 AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) 2972 AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
3011 AC_RUN_IFELSE( 2973 AC_RUN_IFELSE(
@@ -3904,7 +3866,7 @@ fi
3904 3866
3905AC_CHECK_TYPES([struct timespec]) 3867AC_CHECK_TYPES([struct timespec])
3906 3868
3907# We need int64_t or else certian parts of the compile will fail. 3869# We need int64_t or else certain parts of the compile will fail.
3908if test "x$ac_cv_have_int64_t" = "xno" && \ 3870if test "x$ac_cv_have_int64_t" = "xno" && \
3909 test "x$ac_cv_sizeof_long_int" != "x8" && \ 3871 test "x$ac_cv_sizeof_long_int" != "x8" && \
3910 test "x$ac_cv_sizeof_long_long_int" = "x0" ; then 3872 test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
@@ -5215,7 +5177,6 @@ echo " PAM support: $PAM_MSG"
5215echo " OSF SIA support: $SIA_MSG" 5177echo " OSF SIA support: $SIA_MSG"
5216echo " KerberosV support: $KRB5_MSG" 5178echo " KerberosV support: $KRB5_MSG"
5217echo " SELinux support: $SELINUX_MSG" 5179echo " SELinux support: $SELINUX_MSG"
5218echo " S/KEY support: $SKEY_MSG"
5219echo " MD5 password support: $MD5_MSG" 5180echo " MD5 password support: $MD5_MSG"
5220echo " libedit support: $LIBEDIT_MSG" 5181echo " libedit support: $LIBEDIT_MSG"
5221echo " libldns support: $LDNS_MSG" 5182echo " libldns support: $LDNS_MSG"