diff options
author | Gilles Chehade <gilles@poolp.org> | 2020-01-09 15:41:56 +0100 |
---|---|---|
committer | Gilles Chehade <gilles@poolp.org> | 2020-01-09 15:41:56 +0100 |
commit | 0d740c9d2bef8dd520eceb4fb03e839640fb0955 (patch) | |
tree | e9d161251dc21b4208d50611a53b52b4de260e91 | |
parent | event_asr_run.c is better in openbsd-compat than in libasr actually (diff) | |
parent | fix portable build on OpenBSD (diff) | |
download | OpenSMTPD-0d740c9d2bef8dd520eceb4fb03e839640fb0955.tar.xz OpenSMTPD-0d740c9d2bef8dd520eceb4fb03e839640fb0955.zip |
Merge branch 'portable' of ssh://github.com/OpenSMTPD/OpenSMTPD into portable
-rw-r--r-- | configure.ac | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac index ec0e133c..57a31027 100644 --- a/configure.ac +++ b/configure.ac @@ -173,6 +173,16 @@ AC_CHECK_HEADER([fts.h], #include <sys/stat.h> ]) +need_libasr=no +AC_CHECK_HEADER([asr.h], + [], + [need_libasr=yes], + [ +#include <sys/types.h> +#include <sys/socket.h> +#include <netdb.h> +]) +AM_CONDITIONAL([NEED_LIBASR], [test x"$need_libasr" = x"yes"]) # # CHECKS FOR TYPES @@ -575,6 +585,7 @@ AC_CHECK_FUNCS([ \ reallocarray \ recallocarray \ res_hnok \ + res_randomid \ setenv \ seteuid \ setegid \ @@ -1624,34 +1635,6 @@ AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS]) AC_EXEEXT #l4757 -need_libasr=no -AC_CHECK_HEADER([asr.h], ,[need_libasr=yes]) -[#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h>]) -AC_CHECK_LIB([asr], [asr_run], , - [ - saved_CPPFLAGS="$CPPFLAGS" - saved_LDFLAGS="$LDFLAGS" - save_LIBS="$LIBS" - dnl Check default asr install dir - if test -n "${need_dash_r}"; then - LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}" - else - LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}" - fi - CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}" -# don't add -lasr to LIBS, it's only added when needed -# LIBS="$LIBS -lasr" - AC_TRY_LINK_FUNC([asr_run], , - [ - need_libasr=yes - ] - ) - ] -) -AM_CONDITIONAL([NEED_LIBASR], [test "x$need_libasr" = "xyes"]) - # Search for fts AC_ARG_WITH([libfts], @@ -2007,7 +1990,6 @@ AM_CONDITIONAL([NEED_FMT_SCALED], [test "x$ac_cv_search_fmt_scaled" = "xno"]) AM_CONDITIONAL([NEED_FPARSELN], [test "x$ac_cv_search_fparseln" = "xno"]) AM_CONDITIONAL([NEED_IMSG], [test "x$ac_cv_search_imsg_init" = "xno"]) AM_CONDITIONAL([NEED_INET_NET_PTON], [test "x$ac_cv_search_inet_net_pton" = "xno"]) -AM_CONDITIONAL([NEED_RES_RANDOMID], [test "x$ac_cv_search_res_randomid" = "xno"]) AM_CONDITIONAL([NEED_ERR], [test "x$ac_cv_func_err" != "xyes"]) AM_CONDITIONAL([NEED_ERRC], [test "x$ac_cv_func_errc" != "xyes"]) @@ -2039,6 +2021,8 @@ AM_CONDITIONAL([NEED_WAITPID], [test "x$ac_cv_func_waitpid" != "xyes"]) AM_CONDITIONAL([NEED_VIS], [test "x$ac_cv_func_strnvis" != "xyes" -o "x$BROKEN_STRNVIS" = "x1"]) AM_CONDITIONAL([NEED_USLEEP], [test "x$ac_cv_func_usleep" != "xyes"]) +AM_CONDITIONAL([NEED_RES_RANDOMID], [test "x$ac_cv_search_res_randomid" = "xno" -a x"$ac_cv_func_res_randomid" != "xyes" -a x"$need_libasr" = x"yes"]) + AM_CONDITIONAL([NEED_ARC4RANDOM], [test "x$ac_cv_func_arc4random" != "xyes" -a "x$ac_cv_have_decl_LIBRESSL_VERSION_NUMBER" != "xyes"]) AM_CONDITIONAL([NEED_SSL_CTX_USE_CERTIFICATE_CHAIN_MEM], [test "x$ac_cv_have_decl_LIBRESSL_VERSION_NUMBER" != "xyes"]) |