]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- simdzone-zone-load, modify configure and Makefile to link with simdzone.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 2 Oct 2025 12:33:31 +0000 (14:33 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 2 Oct 2025 12:33:31 +0000 (14:33 +0200)
Makefile.in
configure
configure.ac
simdzone

index b28ed34ae77eb8877851ec4659f0d1df9ab4cd62..5bfa937dd18bcf46c455dd1b04f48fef8ecdbcca 100644 (file)
@@ -56,7 +56,7 @@ YACC=@YACC@
 LEX=@LEX@
 STRIP=@STRIP@
 CC=@CC@
-CPPFLAGS=-I. @CPPFLAGS@
+CPPFLAGS=-I. @CPPFLAGS@ -Isimdzone/include -I@srcdir@/simdzone/include
 PYTHON_CPPFLAGS=-I. -I$(srcdir) @PYTHON_CPPFLAGS@
 CFLAGS=-DSRCDIR=$(srcdir) @CFLAGS@
 LDFLAGS=@LDFLAGS@
@@ -267,6 +267,7 @@ LIBUNBOUND_SRC=libunbound/context.c libunbound/libunbound.c \
 libunbound/libworker.c
 LIBUNBOUND_OBJ=context.lo libunbound.lo libworker.lo ub_event_pluggable.lo
 LIBUNBOUND_OBJ_LINK=$(LIBUNBOUND_OBJ) $(COMMON_OBJ_WITHOUT_UB_EVENT) $(SLDNS_OBJ) $(COMPAT_OBJ)
+SIMDZONE_OBJ=@SIMDZONE_OBJ@
 
 # win apps or "" if not on windows
 WINAPPS=@WINAPPS@
@@ -364,19 +365,24 @@ longtest: tests
        if test ! $(srcdir)/testdata -ef ./testdata; then rm -rf testcode testdata; mkdir testcode testdata; cp -R $(srcdir)/testdata/*.sh $(srcdir)/testdata/*.tdir $(srcdir)/testdata/*.rpl $(srcdir)/testdata/*.crpl testdata; cp $(srcdir)/testcode/*.sh testcode; if test ! -d util; then mkdir util; fi; cp $(srcdir)/util/iana_ports.inc util; fi
        if test -x "`which bash`"; then bash testcode/do-tests.sh; else sh testcode/do-tests.sh; fi
 
+simdzone/libzone.a:
+       $(MAKE) -C simdzone
+
+simdzone/include/zone/export.h: simdzone/libzone.a
+
 lib:   libunbound.la unbound.h
 
-libunbound.la: $(LIBUNBOUND_OBJ_LINK)
-       $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath $(libdir) $(SSLLIB) $(LIBS)
+libunbound.la: simdzone/libzone.a $(LIBUNBOUND_OBJ_LINK)
+       $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) $(SIMDZONE_OBJ) -rpath $(libdir) $(SSLLIB) $(LIBS)
 
 unbound$(EXEEXT):      $(DAEMON_OBJ_LINK) libunbound.la
-       $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS)
+       $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) simdzone/libzone.a $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS)
 
 unbound-checkconf$(EXEEXT):    $(CHECKCONF_OBJ_LINK) libunbound.la
-       $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 unbound-control$(EXEEXT):      $(CONTROL_OBJ_LINK) libunbound.la
-       $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 unbound-host$(EXEEXT): $(HOST_OBJ_LINK) libunbound.la
        $(LINK) -o $@ $(HOST_OBJ_LINK) libunbound.la $(SSLLIB) $(LIBS)
@@ -394,43 +400,43 @@ anchor-update$(EXEEXT):  $(ANCHORUPD_OBJ_LINK) libunbound.la
        $(LINK) -o $@ $(ANCHORUPD_OBJ_LINK) libunbound.la $(LIBS)
 
 unittest$(EXEEXT):     $(UNITTEST_OBJ_LINK)
-       $(LINK) -o $@ $(UNITTEST_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(UNITTEST_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 testbound$(EXEEXT):    $(TESTBOUND_OBJ_LINK)
-       $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 lock-verify$(EXEEXT):  $(LOCKVERIFY_OBJ_LINK)
-       $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 petal$(EXEEXT):        $(PETAL_OBJ_LINK)
        $(LINK) -o $@ $(PETAL_OBJ_LINK) $(SSLLIB) $(LIBS)
 
 pktview$(EXEEXT):      $(PKTVIEW_OBJ_LINK)
-       $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 memstats$(EXEEXT):     $(MEMSTATS_OBJ_LINK)
-       $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 asynclook$(EXEEXT):    $(ASYNCLOOK_OBJ_LINK) libunbound.la
        $(LINK) -o $@ $(ASYNCLOOK_OBJ_LINK) libunbound.la $(SSLLIB) $(LIBS)
 
 streamtcp$(EXEEXT):    $(STREAMTCP_OBJ_LINK)
-       $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 dohclient$(EXEEXT):    $(DOHCLIENT_OBJ_LINK)
-       $(LINK) -o $@ $(DOHCLIENT_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(DOHCLIENT_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 doqclient$(EXEEXT):    $(DOQCLIENT_OBJ_LINK)
-       $(LINK) -o $@ $(DOQCLIENT_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(DOQCLIENT_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 perf$(EXEEXT): $(PERF_OBJ_LINK)
-       $(LINK) -o $@ $(PERF_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(PERF_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 delayer$(EXEEXT):      $(DELAYER_OBJ_LINK)
-       $(LINK) -o $@ $(DELAYER_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(DELAYER_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 readzone$(EXEEXT):     $(READZONE_OBJ_LINK)
-       $(LINK) -o $@ $(READZONE_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(READZONE_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 signit$(EXEEXT):       testcode/signit.c
        $(CC) $(CPPFLAGS) $(CFLAGS) @PTHREAD_CFLAGS_ONLY@ -o $@ testcode/signit.c $(LDFLAGS) -lldns $(SSLLIB) $(LIBS)
@@ -458,7 +464,7 @@ dnstap/dnstap.pb-c.h: dnstap/dnstap.pb-c.c
        touch $@
 
 unbound-dnstap-socket$(EXEEXT):        $(DNSTAP_SOCKET_OBJ_LINK)
-       $(LINK) -o $@ $(DNSTAP_SOCKET_OBJ_LINK) $(SSLLIB) $(LIBS)
+       $(LINK) -o $@ $(DNSTAP_SOCKET_OBJ_LINK) simdzone/libzone.a $(SSLLIB) $(LIBS)
 
 dnstap.pb-c.lo dnstap.pb-c.o: dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h
 dtstream.lo dtstream.o: $(srcdir)/dnstap/dtstream.c config.h $(srcdir)/dnstap/dtstream.h
@@ -522,7 +528,9 @@ util/configparser.c:  $(srcdir)/util/configparser.y
 util/configparser.h: util/configparser.c
        touch $@
 
-clean:
+.PHONY: .clean .distclean .maintainer-clean .realclean .devclean
+
+.clean:
        rm -f *.o *.d *.lo *~ tags
        rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la unbound.h
        rm -f $(ALL_SRC:.c=.lint)
@@ -530,19 +538,37 @@ clean:
        rm -f libunbound.a
        rm -rf autom4te.cache .libs build doc/html doc/xml
 
-distclean: clean
+.distclean: .clean
        rm -f config.status config.log config.h
        rm -f doc/example.conf doc/libunbound.3 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound-control.8 doc/unbound.8 doc/unbound.conf.5 doc/unbound-host.1
        rm -f smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service
        rm -f $(TEST_BIN)
        rm -f Makefile
 
-maintainer-clean: distclean
+.maintainer-clean: .distclean
        rm -f util/configlexer.c util/configparser.c util/configparser.h
 
-realclean: maintainer-clean
+.realclean: .maintainer-clean
        rm -f configure config.h.in config.sub config.guess ltmain.sh aclocal.m4 libtool
 
+.devclean: .realclean
+       rm -f config.h.in configure
+
+clean: .clean
+       $(MAKE) -C simdzone clean
+
+distclean: .distclean
+       $(MAKE) -C simdzone distclean
+
+realclean: .realclean
+       $(MAKE) -C simdzone realclean
+
+maintainer-clean: .maintainer-clean
+       $(MAKE) -C simdzone maintainer-clean
+
+devclean: .devclean
+       $(MAKE) -C simdzone devclean
+
 .SUFFIXES: .lint
 .c.lint:
        $(LINT) $(LINTFLAGS) -I. -I$(srcdir) $<
@@ -703,6 +729,7 @@ depend:
                        -e 's?$$(srcdir)/edns-subnet/subnetmod.h $$(srcdir)/edns-subnet/subnet-whitelist.h $$(srcdir)/edns-subnet/edns-subnet.h $$(srcdir)/edns-subnet/addrtree.h?$$(SUBNET_HEADER)?g' \
                        -e 's?$$(srcdir)/ipsecmod/ipsecmod.h $$(srcdir)/ipsecmod/ipsecmod-whitelist.h?$$(IPSECMOD_HEADER)?g' \
                        -e 's?$$(srcdir)/dynlibmod/dynlibmod.h?$$(DYNLIBMOD_HEADER)?g' \
+                       -e 's?$$(srcdir)/simdzone/include/zone/export.h?simdzone/include/zone/export.h?g' \
                        -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' \
                        > $(DEPEND_TMP)
        cp $(DEPEND_TARGET) $(DEPEND_TMP2)
index 7f74e4b4a839f803b54f2b08cc1e48c1b4d712a6..448f1a4ce933040140fb4db34736465be089bd9d 100755 (executable)
--- a/configure
+++ b/configure
@@ -660,7 +660,10 @@ ac_includes_default="\
 
 ac_header_c_list=
 ac_func_c_list=
+enable_option_checking=no
 ac_subst_vars='LTLIBOBJS
+SIMDZONE_OBJ
+subdirs
 date
 version
 INSTALLTARGET
@@ -941,6 +944,8 @@ with_libmnl
 enable_explicit_port_randomisation
 enable_linux_ip_local_port_range
 with_libunbound_only
+enable_westmere
+enable_haswell
 '
       ac_precious_vars='build_alias
 host_alias
@@ -965,7 +970,7 @@ PYTHON_VERSION
 SOURCE_DATE_EPOCH
 PROTOBUFC_CFLAGS
 PROTOBUFC_LIBS'
-
+ac_subdirs_all='simdzone'
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -1655,6 +1660,8 @@ Optional Features:
                           randomness. Define this only when the target system
                           restricts (e.g. some of SELinux enabled
                           distributions) the use of non-ephemeral ports.
+  --disable-westmere      Disable Westmere (SSE4.2) parser kernel
+  --disable-haswell       Disable Haswell (AVX2) parser kernel
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -24730,6 +24737,9 @@ printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdef
 
         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
 
+       dnstap_config="dnstap/dnstap_config.h.tmp:dnstap/dnstap_config.h.in"
+       dnstap_config_tmp="dnstap/dnstap_config.h.tmp"
+       dnstap_config_out="dnstap/dnstap_config.h"
 
     else
 
@@ -25315,10 +25325,32 @@ printf "%s\n" "$date" >&6; }
 
 
 
-ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service contrib/unbound_portable.service"
+ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh $dnstap_config dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service contrib/unbound_portable.service"
 
 ac_config_headers="$ac_config_headers config.h"
 
+
+# Arguments introduced specifically for simdzone.
+# Check whether --enable-westmere was given.
+if test ${enable_westmere+y}
+then :
+  enableval=$enable_westmere;
+fi
+
+# Check whether --enable-haswell was given.
+if test ${enable_haswell+y}
+then :
+  enableval=$enable_haswell;
+fi
+
+
+
+subdirs="$subdirs simdzone"
+
+# Pick up the objects for simdzone.
+SIMDZONE_OBJ=`(cd simdzone; make list_objs) | sed -e 's?src?simdzone/src?g'`
+
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -26311,7 +26343,7 @@ do
     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
-    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
+    "$dnstap_config") CONFIG_FILES="$CONFIG_FILES $dnstap_config" ;;
     "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
     "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
     "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
@@ -27452,9 +27484,166 @@ if test "$no_create" != yes; then
   # would make configure fail if this is the last instruction.
   $ac_cs_success || as_fn_exit 1
 fi
+
+#
+# CONFIG_SUBDIRS section.
+#
+if test "$no_recursion" != yes; then
+
+  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+  # so they do not pile up.
+  ac_sub_configure_args=
+  ac_prev=
+  eval "set x $ac_configure_args"
+  shift
+  for ac_arg
+  do
+    if test -n "$ac_prev"; then
+      ac_prev=
+      continue
+    fi
+    case $ac_arg in
+    -cache-file | --cache-file | --cache-fil | --cache-fi \
+    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+      ac_prev=cache_file ;;
+    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+    | --c=*)
+      ;;
+    --config-cache | -C)
+      ;;
+    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+      ac_prev=srcdir ;;
+    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+      ;;
+    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+      ac_prev=prefix ;;
+    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+      ;;
+    --disable-option-checking)
+      ;;
+    *)
+      case $ac_arg in
+      *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      esac
+      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
+    esac
+  done
+
+  # Always prepend --prefix to ensure using the same prefix
+  # in subdir configurations.
+  ac_arg="--prefix=$prefix"
+  case $ac_arg in
+  *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+  esac
+  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+  # Pass --silent
+  if test "$silent" = yes; then
+    ac_sub_configure_args="--silent $ac_sub_configure_args"
+  fi
+
+  # Always prepend --disable-option-checking to silence warnings, since
+  # different subdirs can have different --enable and --with options.
+  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+
+  ac_popdir=`pwd`
+  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+
+    # Do not complain, so a configure script can configure whichever
+    # parts of a large source tree are present.
+    test -d "$srcdir/$ac_dir" || continue
+
+    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+    printf "%s\n" "$ac_msg" >&6
+    as_dir="$ac_dir"; as_fn_mkdir_p
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+    cd "$ac_dir"
+
+    # Check for configure.gnu first; this name is used for a wrapper for
+    # Metaconfig's "Configure" on case-insensitive file systems.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      ac_sub_configure=$ac_srcdir/configure.gnu
+    elif test -f "$ac_srcdir/configure"; then
+      ac_sub_configure=$ac_srcdir/configure
+    else
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+      ac_sub_configure=
+    fi
+
+    # The recursion is here.
+    if test -n "$ac_sub_configure"; then
+      # Make the cache file name correct relative to the subdirectory.
+      case $cache_file in
+      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+      *) # Relative name.
+       ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+      esac
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+      # The eval makes quoting arguments work.
+      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+          --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+       as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+    fi
+
+    cd "$ac_popdir"
+  done
+fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
+# If dnstap config has changed, overwrite it.
+if test -n "$dnstap_config"; then
+       if test ! -f "$dnstap_config_out"; then
+               mv "$dnstap_config_tmp" "$dnstap_config_out" || as_fn_error $? "Could not create $dnstap_config_out" "$LINENO" 5
+       else if diff "$dnstap_config_out" "$dnstap_config_tmp" >/dev/null 2>&1; then
+               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: In $srcdir: $dnstap_config_out is unchanged" >&5
+printf "%s\n" "$as_me: In $srcdir: $dnstap_config_out is unchanged" >&6;}
+               rm -f "$dnstap_config_tmp"
+       else
+               rm -f "$dnstap_config_out"
+               mv "$dnstap_config_tmp" "$dnstap_config_out" || as_fn_error $? "Could not create $dnstap_config_out" "$LINENO" 5
+         fi
+       fi
+fi
 
index 4ff4c0ef5cc4dbf12b5ac0124da5a479a263d35b..fddcf7c269de8bcfe1b7abea866a953a8fbc7963 100644 (file)
@@ -2017,6 +2017,9 @@ dt_DNSTAP([$UNBOUND_RUN_DIR/dnstap.sock],
        AC_SUBST(DNSTAP_SOCKET_TESTBIN,['unbound-dnstap-socket$(EXEEXT)'])
         AC_SUBST([DNSTAP_SRC], ["dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"])
         AC_SUBST([DNSTAP_OBJ], ["dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"])
+       dnstap_config="dnstap/dnstap_config.h.tmp:dnstap/dnstap_config.h.in"
+       dnstap_config_tmp="dnstap/dnstap_config.h.tmp"
+       dnstap_config_out="dnstap/dnstap_config.h"
     ],
     [
         AC_SUBST([ENABLE_DNSTAP], [0])
@@ -2475,6 +2478,28 @@ AC_SUBST(version, [VERSION_MAJOR.VERSION_MINOR.VERSION_MICRO])
 AX_BUILD_DATE_EPOCH(date, [[%b %e, %Y]])
 AC_SUBST(date)
 
-AC_CONFIG_FILES([Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service contrib/unbound_portable.service])
+AC_CONFIG_FILES([Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh $dnstap_config dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service contrib/unbound_portable.service])
 AC_CONFIG_HEADERS([config.h])
+
+# Arguments introduced specifically for simdzone.
+AC_ARG_ENABLE(westmere, AS_HELP_STRING([--disable-westmere], [Disable Westmere (SSE4.2) parser kernel]))
+AC_ARG_ENABLE(haswell, AS_HELP_STRING([--disable-haswell], [Disable Haswell (AVX2) parser kernel]))
+AC_CONFIG_SUBDIRS([simdzone])
+# Pick up the objects for simdzone.
+SIMDZONE_OBJ=`(cd simdzone; make list_objs) | sed -e 's?src?simdzone/src?g'`
+AC_SUBST(SIMDZONE_OBJ)
+
 AC_OUTPUT
+# If dnstap config has changed, overwrite it.
+if test -n "$dnstap_config"; then
+       if test ! -f "$dnstap_config_out"; then
+               mv "$dnstap_config_tmp" "$dnstap_config_out" || AC_MSG_ERROR([Could not create $dnstap_config_out])
+       else if diff "$dnstap_config_out" "$dnstap_config_tmp" >/dev/null 2>&1; then
+               AC_MSG_NOTICE([In $srcdir: $dnstap_config_out is unchanged])
+               rm -f "$dnstap_config_tmp"
+       else
+               rm -f "$dnstap_config_out"
+               mv "$dnstap_config_tmp" "$dnstap_config_out" || AC_MSG_ERROR([Could not create $dnstap_config_out])
+         fi
+       fi
+fi
index 68a63488f4a49fe1c4862665b18797f2a620126f..7234150700b75e9cf848ac12df3f6a05e5e4a267 160000 (submodule)
--- a/simdzone
+++ b/simdzone
@@ -1 +1 @@
-Subproject commit 68a63488f4a49fe1c4862665b18797f2a620126f
+Subproject commit 7234150700b75e9cf848ac12df3f6a05e5e4a267