summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac72
1 files changed, 69 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index b689db4b5..460383757 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,7 @@ AC_SUBST([LD])
93AC_C_INLINE 93AC_C_INLINE
94 94
95AC_CHECK_DECL([LLONG_MAX], [have_llong_max=1], , [#include <limits.h>]) 95AC_CHECK_DECL([LLONG_MAX], [have_llong_max=1], , [#include <limits.h>])
96AC_CHECK_DECL([LONG_LONG_MAX], [have_long_long_max=1], , [#include <limits.h>])
96AC_CHECK_DECL([SYSTR_POLICY_KILL], [have_systr_policy_kill=1], , [ 97AC_CHECK_DECL([SYSTR_POLICY_KILL], [have_systr_policy_kill=1], , [
97 #include <sys/types.h> 98 #include <sys/types.h>
98 #include <sys/param.h> 99 #include <sys/param.h>
@@ -413,6 +414,7 @@ AC_CHECK_HEADERS([ \
413 string.h \ 414 string.h \
414 strings.h \ 415 strings.h \
415 sys/bitypes.h \ 416 sys/bitypes.h \
417 sys/byteorder.h \
416 sys/bsdtty.h \ 418 sys/bsdtty.h \
417 sys/cdefs.h \ 419 sys/cdefs.h \
418 sys/dir.h \ 420 sys/dir.h \
@@ -1967,6 +1969,19 @@ AC_SEARCH_LIBS([nanosleep], [rt posix4], [AC_DEFINE([HAVE_NANOSLEEP], [1],
1967AC_SEARCH_LIBS([clock_gettime], [rt], 1969AC_SEARCH_LIBS([clock_gettime], [rt],
1968 [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime])]) 1970 [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime])])
1969 1971
1972dnl check if we need -D_REENTRANT for localtime_r declaration.
1973AC_CHECK_DECL([localtime_r], [],
1974 [ saved_CPPFLAGS="$CFLAGS"
1975 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
1976 unset ac_cv_have_decl_localtime_r
1977 AC_CHECK_DECL([localtime_r], [],
1978 [ CPPFLAGS="$saved_CPPFLAGS" ],
1979 [ #include <time.h> ]
1980 )
1981 ],
1982 [ #include <time.h> ]
1983)
1984
1970dnl Make sure prototypes are defined for these before using them. 1985dnl Make sure prototypes are defined for these before using them.
1971AC_CHECK_DECL([strsep], 1986AC_CHECK_DECL([strsep],
1972 [AC_CHECK_FUNCS([strsep])], 1987 [AC_CHECK_FUNCS([strsep])],
@@ -1986,10 +2001,11 @@ AC_CHECK_DECL([tcsendbreak],
1986 2001
1987AC_CHECK_DECLS([h_errno], , ,[#include <netdb.h>]) 2002AC_CHECK_DECLS([h_errno], , ,[#include <netdb.h>])
1988 2003
1989AC_CHECK_DECLS([SHUT_RD], , , 2004AC_CHECK_DECLS([SHUT_RD, getpeereid], , ,
1990 [ 2005 [
1991#include <sys/types.h> 2006#include <sys/types.h>
1992#include <sys/socket.h> 2007#include <sys/socket.h>
2008#include <unistd.h>
1993 ]) 2009 ])
1994 2010
1995AC_CHECK_DECLS([O_NONBLOCK], , , 2011AC_CHECK_DECLS([O_NONBLOCK], , ,
@@ -2498,6 +2514,45 @@ static void sighandler(int sig) { _exit(1); }
2498 ) 2514 )
2499fi 2515fi
2500 2516
2517AC_MSG_CHECKING([if SA_RESTARTed signals interrupt select()])
2518AC_RUN_IFELSE(
2519 [AC_LANG_PROGRAM([[
2520#ifdef HAVE_SYS_SELECT
2521# include <sys/select.h>
2522#endif
2523#include <sys/types.h>
2524#include <sys/time.h>
2525#include <stdlib.h>
2526#include <signal.h>
2527static void sighandler(int sig) { }
2528 ]], [[
2529 int r;
2530 pid_t pid;
2531 struct sigaction sa;
2532
2533 sa.sa_handler = sighandler;
2534 sa.sa_flags = SA_RESTART;
2535 (void)sigaction(SIGTERM, &sa, NULL);
2536 if ((pid = fork()) == 0) { /* child */
2537 pid = getppid();
2538 sleep(1);
2539 kill(pid, SIGTERM);
2540 sleep(1);
2541 if (getppid() == pid) /* if parent did not exit, shoot it */
2542 kill(pid, SIGKILL);
2543 exit(0);
2544 } else { /* parent */
2545 r = select(0, NULL, NULL, NULL, NULL);
2546 }
2547 exit(r == -1 ? 0 : 1);
2548 ]])],
2549 [AC_MSG_RESULT([yes])],
2550 [AC_MSG_RESULT([no])
2551 AC_DEFINE([NO_SA_RESTART], [1],
2552 [SA_RESTARTed signals do no interrupt select])],
2553 [AC_MSG_WARN([cross compiling: assuming yes])]
2554)
2555
2501AC_CHECK_FUNCS([getpgrp],[ 2556AC_CHECK_FUNCS([getpgrp],[
2502 AC_MSG_CHECKING([if getpgrp accepts zero args]) 2557 AC_MSG_CHECKING([if getpgrp accepts zero args])
2503 AC_COMPILE_IFELSE( 2558 AC_COMPILE_IFELSE(
@@ -2803,6 +2858,7 @@ if test "x$openssl" = "xyes" ; then
2803 EVP_PKEY_get0_RSA \ 2858 EVP_PKEY_get0_RSA \
2804 EVP_MD_CTX_new \ 2859 EVP_MD_CTX_new \
2805 EVP_MD_CTX_free \ 2860 EVP_MD_CTX_free \
2861 EVP_chacha20 \
2806 ]) 2862 ])
2807 2863
2808 if test "x$openssl_engine" = "xyes" ; then 2864 if test "x$openssl_engine" = "xyes" ; then
@@ -3081,6 +3137,10 @@ AC_MSG_RESULT([$enable_pkcs11])
3081AC_MSG_CHECKING([whether to enable U2F]) 3137AC_MSG_CHECKING([whether to enable U2F])
3082if test "x$enable_sk" = "xyes" ; then 3138if test "x$enable_sk" = "xyes" ; then
3083 AC_DEFINE([ENABLE_SK], [], [Enable for U2F/FIDO support]) 3139 AC_DEFINE([ENABLE_SK], [], [Enable for U2F/FIDO support])
3140 AC_SUBST(SK_DUMMY_LIBRARY, [regress/misc/sk-dummy/sk-dummy.so])
3141else
3142 # Do not try to build sk-dummy library.
3143 AC_SUBST(SK_DUMMY_LIBRARY, [""])
3084fi 3144fi
3085AC_MSG_RESULT([$enable_sk]) 3145AC_MSG_RESULT([$enable_sk])
3086 3146
@@ -3110,9 +3170,15 @@ if test "x$enable_sk" = "xyes" -a "x$enable_sk_internal" = "xyes" ; then
3110 AC_DEFINE([ENABLE_SK_INTERNAL], [], 3170 AC_DEFINE([ENABLE_SK_INTERNAL], [],
3111 [Enable for built-in U2F/FIDO support]) 3171 [Enable for built-in U2F/FIDO support])
3112 enable_sk="built-in" 3172 enable_sk="built-in"
3113 ], [ ], 3173 ], [ AC_MSG_ERROR([no usable libfido2 found]) ],
3114 [ $OTHERLIBS ] 3174 [ $OTHERLIBS ]
3115 ) 3175 )
3176 AC_CHECK_HEADER([fido.h], [],
3177 AC_MSG_ERROR([missing fido.h from libfido2]))
3178 AC_CHECK_HEADER([fido/credman.h], [],
3179 AC_MSG_ERROR([missing fido/credman.h from libfido2]),
3180 [#include <fido.h>]
3181 )
3116fi 3182fi
3117 3183
3118AC_CHECK_FUNCS([ \ 3184AC_CHECK_FUNCS([ \
@@ -3565,7 +3631,7 @@ if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
3565fi 3631fi
3566 3632
3567# compute LLONG_MIN and LLONG_MAX if we don't know them. 3633# compute LLONG_MIN and LLONG_MAX if we don't know them.
3568if test -z "$have_llong_max"; then 3634if test -z "$have_llong_max" && test -z "$have_long_long_max"; then
3569 AC_MSG_CHECKING([for max value of long long]) 3635 AC_MSG_CHECKING([for max value of long long])
3570 AC_RUN_IFELSE( 3636 AC_RUN_IFELSE(
3571 [AC_LANG_PROGRAM([[ 3637 [AC_LANG_PROGRAM([[