From: Remi Gacogne Date: Tue, 12 Feb 2019 15:14:29 +0000 (+0100) Subject: Build ipcrypt as a separate (static) library since it's written in C X-Git-Tag: dnsdist-1.4.0-alpha1~27^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=496151cf9c5ebe57cd265483dcf302ee735a5c86;p=thirdparty%2Fpdns.git Build ipcrypt as a separate (static) library since it's written in C Otherwise we could compile it as C++ code, leading to this warning from the compiler: ``` cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C ``` --- diff --git a/configure.ac b/configure.ac index 8ac60b12c5..1993f3cd9b 100644 --- a/configure.ac +++ b/configure.ac @@ -297,6 +297,8 @@ AC_SUBST([AM_CPPFLAGS], AC_SUBST([YAHTTP_CFLAGS], ['-I$(top_srcdir)/ext/yahttp']) AC_SUBST([YAHTTP_LIBS], ['$(top_builddir)/ext/yahttp/yahttp/libyahttp.la']) +AC_SUBST([IPCRYPT_CFLAGS], ['-I$(top_srcdir)/ext/ipcrypt']) +AC_SUBST([IPCRYPT_LIBS], ['$(top_builddir)/ext/ipcrypt/libipcrypt.la']) CXXFLAGS="$SANITIZER_FLAGS $CXXFLAGS" @@ -315,6 +317,7 @@ AC_CONFIG_FILES([ docs/Makefile pdns/pdns.init ext/Makefile + ext/ipcrypt/Makefile ext/yahttp/Makefile ext/yahttp/yahttp/Makefile ext/json11/Makefile diff --git a/ext/Makefile.am b/ext/Makefile.am index 49dc5a2192..7c0a42d419 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -1,10 +1,12 @@ SUBDIRS = \ - yahttp \ - json11 + ipcrypt \ + json11 \ + yahttp DIST_SUBDIRS = \ - yahttp \ - json11 + ipcrypt \ + json11 \ + yahttp EXTRA_DIST = \ luawrapper/include/LuaContext.hpp diff --git a/ext/ipcrypt/.gitignore b/ext/ipcrypt/.gitignore new file mode 100644 index 0000000000..24ad051c6e --- /dev/null +++ b/ext/ipcrypt/.gitignore @@ -0,0 +1,5 @@ +*.la +*.lo +*.o +Makefile +Makefile.in diff --git a/ext/ipcrypt/Makefile.am b/ext/ipcrypt/Makefile.am new file mode 100644 index 0000000000..a68b2d453c --- /dev/null +++ b/ext/ipcrypt/Makefile.am @@ -0,0 +1,5 @@ +noinst_LTLIBRARIES = libipcrypt.la + +libipcrypt_la_SOURCES = \ + ipcrypt.c \ + ipcrypt.h diff --git a/pdns/Makefile.am b/pdns/Makefile.am index e1b6e1b207..3614fb9250 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -312,7 +312,7 @@ pdnsutil_SOURCES = \ ednsoptions.cc ednsoptions.hh \ ednssubnet.cc \ gss_context.cc gss_context.hh \ - ipcipher.cc ipcipher.hh ../ext/ipcrypt/ipcrypt.c ../ext/ipcrypt/ipcrypt.h \ + ipcipher.cc ipcipher.hh \ iputils.cc iputils.hh \ json.cc \ logger.cc \ @@ -350,7 +350,8 @@ pdnsutil_LDADD = \ $(JSON11_LIBS) \ $(LIBDL) \ $(BOOST_PROGRAM_OPTIONS_LIBS) \ - $(LIBCRYPTO_LIBS) + $(LIBCRYPTO_LIBS) \ + $(IPCRYPT_LIBS) if LIBSODIUM pdnsutil_SOURCES += sodiumsigners.cc @@ -888,7 +889,7 @@ dnswasher_SOURCES = \ dnspcap.cc dnspcap.hh \ dnswasher.cc \ dnswriter.hh \ - ipcipher.cc ipcipher.hh ../ext/ipcrypt/ipcrypt.c ../ext/ipcrypt/ipcrypt.h \ + ipcipher.cc ipcipher.hh \ logger.cc \ misc.cc \ qtype.cc \ @@ -896,7 +897,7 @@ dnswasher_SOURCES = \ unix_utility.cc dnswasher_LDFLAGS = $(AM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(LIBCRYPTO_LDFLAGS) -dnswasher_LDADD = $(BOOST_PROGRAM_OPTIONS_LIBS) $(LIBCRYPTO_LIBS) +dnswasher_LDADD = $(BOOST_PROGRAM_OPTIONS_LIBS) $(LIBCRYPTO_LIBS) $(IPCRYPT_LIBS) dnsbulktest_SOURCES = \ base32.cc \ @@ -1277,7 +1278,7 @@ testrunner_SOURCES = \ ednssubnet.cc \ gettime.cc gettime.hh \ gss_context.cc gss_context.hh \ - ipcipher.cc ipcipher.hh ../ext/ipcrypt/ipcrypt.c ../ext/ipcrypt/ipcrypt.h \ + ipcipher.cc ipcipher.hh \ iputils.cc \ ixfr.cc ixfr.hh \ logger.cc \ @@ -1339,7 +1340,8 @@ testrunner_LDADD = \ $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) \ $(RT_LIBS) \ $(LUA_LIBS) \ - $(LIBDL) + $(LIBDL) \ + $(IPCRYPT_LIBS) if PKCS11 testrunner_SOURCES += pkcs11signers.cc pkcs11signers.hh diff --git a/pdns/dnsdistdist/Makefile.am b/pdns/dnsdistdist/Makefile.am index 8eb3f18eb8..557ef33c62 100644 --- a/pdns/dnsdistdist/Makefile.am +++ b/pdns/dnsdistdist/Makefile.am @@ -2,7 +2,8 @@ AM_CPPFLAGS += $(SYSTEMD_CFLAGS) $(LUA_CFLAGS) $(LIBEDIT_CFLAGS) $(LIBSODIUM_CFL ACLOCAL_AMFLAGS = -I m4 -SUBDIRS=ext/yahttp +SUBDIRS=ext/ipcrypt \ + ext/yahttp CLEANFILES = \ dnsmessage.pb.cc \ @@ -165,7 +166,8 @@ dnsdist_LDADD = \ $(SANITIZER_FLAGS) \ $(SYSTEMD_LIBS) \ $(NET_SNMP_LIBS) \ - $(LIBCAP_LIBS) + $(LIBCAP_LIBS) \ + $(IPCRYPT_LIBS) if HAVE_RE2 dnsdist_LDADD += $(RE2_LIBS) @@ -173,7 +175,7 @@ endif if HAVE_LIBCRYPTO dnsdist_LDADD += $(LIBCRYPTO_LIBS) -dnsdist_SOURCES += ipcipher.cc ipcipher.hh ext/ipcrypt/ipcrypt.c ext/ipcrypt/ipcrypt.h +dnsdist_SOURCES += ipcipher.cc ipcipher.hh endif if HAVE_DNS_OVER_TLS diff --git a/pdns/dnsdistdist/configure.ac b/pdns/dnsdistdist/configure.ac index a65ea40d7a..743784573b 100644 --- a/pdns/dnsdistdist/configure.ac +++ b/pdns/dnsdistdist/configure.ac @@ -51,6 +51,8 @@ AM_CONDITIONAL([HAVE_SYSTEMD], [ test x"$systemd" = "xy" ]) AC_SUBST([YAHTTP_CFLAGS], ['-I$(top_srcdir)/ext/yahttp']) AC_SUBST([YAHTTP_LIBS], ['$(top_builddir)/ext/yahttp/yahttp/libyahttp.la']) +AC_SUBST([IPCRYPT_CFLAGS], ['-I$(top_srcdir)/ext/ipcrypt']) +AC_SUBST([IPCRYPT_LIBS], ['$(top_builddir)/ext/ipcrypt/libipcrypt.la']) PDNS_WITH_LUA([mandatory]) PDNS_CHECK_LUA_HPP @@ -110,8 +112,9 @@ AS_IF([test "x$PACKAGEVERSION" != "x"], ) AC_CONFIG_FILES([Makefile - ext/yahttp/Makefile - ext/yahttp/yahttp/Makefile]) + ext/yahttp/Makefile + ext/yahttp/yahttp/Makefile + ext/ipcrypt/Makefile]) AC_OUTPUT diff --git a/pdns/dnsdistdist/ext/ipcrypt/Makefile.am b/pdns/dnsdistdist/ext/ipcrypt/Makefile.am new file mode 120000 index 0000000000..8111f1d78c --- /dev/null +++ b/pdns/dnsdistdist/ext/ipcrypt/Makefile.am @@ -0,0 +1 @@ +../../../../ext/ipcrypt/Makefile.am \ No newline at end of file