From: Remi Gacogne Date: Sun, 1 Feb 2026 16:02:36 +0000 (+0100) Subject: dnsdist: Add an option to disable ipcrypt2 w/ autotools X-Git-Tag: rec-5.5.0-alpha0~31^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e6050f4bc42a6eb4b36efdec13fad27ea65228d;p=thirdparty%2Fpdns.git dnsdist: Add an option to disable ipcrypt2 w/ autotools Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/Makefile.am b/pdns/dnsdistdist/Makefile.am index 184a86deb1..0d04dd2160 100644 --- a/pdns/dnsdistdist/Makefile.am +++ b/pdns/dnsdistdist/Makefile.am @@ -23,9 +23,12 @@ SUBDIRS=dnsdist-rust-lib \ dnsdist-rust-lib/rust \ ext/arc4random \ ext/ipcrypt \ - ext/ipcrypt2 \ ext/yahttp +if HAVE_IPCRYPT2 +SUBDIRS += ext/ipcrypt2 +endif + CLEANFILES = \ htmlfiles.h.tmp \ htmlfiles.h \ @@ -455,7 +458,6 @@ dnsdist_LDADD = \ $(NET_SNMP_LIBS) \ $(LIBCAP_LIBS) \ $(IPCRYPT_LIBS) \ - $(IPCRYPT2_LIBS) \ $(ARC4RANDOM_LIBS) testrunner_LDFLAGS = \ @@ -472,7 +474,6 @@ testrunner_LDADD = \ $(RT_LIBS) \ $(SYSTEMD_LIBS) \ $(LIBCAP_LIBS) \ - $(IPCRYPT2_LIBS) \ $(ARC4RANDOM_LIBS) if HAVE_CDB @@ -505,6 +506,11 @@ testrunner_LDADD += $(LIBCRYPTO_LDFLAGS) $(LIBCRYPTO_LIBS) dnsdist_SOURCES += ipcipher.cc ipcipher.hh endif +if HAVE_IPCRYPT2 +dnsdist_SOURCES += ext/ipcrypt2/ipcrypt2.c ext/ipcrypt2/include/ipcrypt2.h ext/ipcrypt2/softaes/untrinsics.h +testrunner_SOURCES += ext/ipcrypt2/ipcrypt2.c ext/ipcrypt2/include/ipcrypt2.h ext/ipcrypt2/softaes/untrinsics.h +endif + if HAVE_LMDB dnsdist_LDADD += $(LMDB_LDFLAGS) $(LMDB_LIBS) testrunner_LDADD += $(LMDB_LDFLAGS) $(LMDB_LIBS) diff --git a/pdns/dnsdistdist/configure.ac b/pdns/dnsdistdist/configure.ac index cd4ac5561c..b8f223270f 100644 --- a/pdns/dnsdistdist/configure.ac +++ b/pdns/dnsdistdist/configure.ac @@ -143,6 +143,7 @@ AS_IF([test "x$enable_yaml" != "xno"], [ DNSDIST_WITH_CDB PDNS_CHECK_LMDB PDNS_ENABLE_IPCIPHER +PDNS_ENABLE_IPCRYPT2 PDNS_CHECK_AARCH64_UINT64X2_T AX_CXX_COMPILE_STDCXX_17([noext], [mandatory]) @@ -245,6 +246,10 @@ AS_IF([test "x$HAVE_IPCIPHER" = "x1"], [AC_MSG_NOTICE([ipcipher: yes])], [AC_MSG_NOTICE([ipcipher: no])] ) +AS_IF([test "x$enable_ipcrypt2" != "xno"], + [AC_MSG_NOTICE([ipcrypt2: yes])], + [AC_MSG_NOTICE([ipcrypt2: no])] +) AS_IF([test "x$LIBEDIT_LIBS" != "x"], [AC_MSG_NOTICE([libedit: yes])], [AC_MSG_NOTICE([libedit: no])] diff --git a/pdns/dnsdistdist/m4/pdns_enable_ipcrypt2.m4 b/pdns/dnsdistdist/m4/pdns_enable_ipcrypt2.m4 new file mode 100644 index 0000000000..e4897d9646 --- /dev/null +++ b/pdns/dnsdistdist/m4/pdns_enable_ipcrypt2.m4 @@ -0,0 +1,14 @@ +AC_DEFUN([PDNS_ENABLE_IPCRYPT2], [ + AC_MSG_CHECKING([whether to enable ipcrypt2 support]) + AC_ARG_ENABLE([ipcrypt2], + AS_HELP_STRING([--enable-ipcrypt2], [enable ipcrypt2 support @<:@default=yes@:>@]), + [enable_ipcrypt2=$enableval], + [enable_ipcrypt2=yes] + ) + AC_MSG_RESULT([$enable_ipcrypt2]) + + AM_CONDITIONAL([HAVE_IPCRYPT2], [test "x$enable_ipcrypt2" != "xno"]) + AM_COND_IF([HAVE_IPCRYPT2], [ + AC_DEFINE([HAVE_IPCRYPT2], [1], [Define to 1 if you enable ipcrypt2 support]) + ]) +])