via AC_DEFINE are also present in the applicable configure-generated
header file, and error out otherwise. Currently doesn't apply in appl
and test trees.
* util/check-ac-syms: New script.
* config/post.in (.acsyms_okay): New target; runs check-ac-syms, unless we're
in the appl or tests trees.
(configure): Depend on .acsyms_okay.
* config/pre.in (AUTOCONF_HEADER): New variable.
* plugins/kdb/db2/libdb2/Makefile.in (AUTOCONF_HEADER): New variable.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17955
dc483132-0cff-0310-8789-
dd5450dbe970
# mixing. So nuke it.
$(srcdir)/$(thisconfigdir)/configure: @MAINT@ \
$(srcdir)/$(thisconfigdir)/configure.in \
+ $(thisconfigdir)/.acsyms_okay \
$(SRCTOP)/patchlevel.h \
$(SRCTOP)/aclocal.m4
-$(RM) -r $(srcdir)/$(thisconfigdir)/autom4te.cache
$(AUTOCONF) --include=$(CONFIG_RELTOPDIR) $(AUTOCONFFLAGS)
-$(RM) -r $(srcdir)/$(thisconfigdir)/autom4te.cache
+$(thisconfigdir)/.acsyms_okay: @MAINT@ \
+ $(srcdir)/$(thisconfigdir)/configure.in \
+ $(SRCTOP)/patchlevel.h \
+ $(SRCTOP)/aclocal.m4
+ case "$(myfulldir)" in \
+ "" ) echo myfulldir not set in makefile ; exit 1 ;; \
+ appl* | tests* ) echo skipping ac syms check here ;; \
+ *) $(SRCTOP)/util/check-ac-syms $(srcdir) $(BUILDTOP) $(AUTOCONF_HEADER) ;; \
+ esac
+ touch .acsyms_okay
+
RECURSE_TARGETS=all-recurse clean-recurse distclean-recurse install-recurse \
generate-files-mac-recurse \
check-recurse depend-recurse Makefiles-recurse install-headers-recurse
# variable settings with "@RUN_ENV@ KRB5_CONFIG=foo ..."
MAYBE_VALGRIND= # valgrind --tool=memcheck --log-file=$(BUILDTOP)/valgrind.out --trace-children=yes -v --leak-check=yes env
+#
+AUTOCONF_HEADER=$(SRCTOP)/include/autoconf.h.in
+
##
## end of pre.in
############################################################
HDRDIR=$(BUILDTOP)/include
HDRS = $(HDRDIR)/db.h $(HDRDIR)/db-config.h $(HDRDIR)/db-ndbm.h
+AUTOCONF_HEADER=$(SRCTOP)/plugins/kdb/db2/libdb2/include/config.h.in
+
all-unix:: includes all-libs
all-prerecurse: include/config.h include/db-config.h
clean-unix:: clean-libs clean-includes
--- /dev/null
+#!/bin/sh
+
+# args: srcdir srctop-from-srcdir header-path
+
+d=`pwd`
+head -1 $1/configure.in > config-in.tmp
+echo "AC_CONFIG_HEADER(fooconfig.h:$d/fooconfig-h.tmp)" >> config-in.tmp
+tail +2 $1/configure.in | grep -v AC_CONFIG_HEADER >> config-in.tmp
+mv -f config-in.tmp config-in.ac~
+
+if (cd $1 && autoheader --include=$2 $d/config-in.ac~) > /dev/null; then
+ rm -rf $1/autom4te.cache config-in.ac~
+else
+ rm -rf $1/autom4te.cache
+# config-in.ac~ fooconfig-h.tmp
+ echo autoheader failed, eek
+ exit 1
+fi
+
+awk '/^#undef/ { print $2; }' < fooconfig-h.tmp | sort > acsyms.here
+rm -f fooconfig-h.tmp
+awk '/^#undef/ { print $2; }' < $3 | sort > acsyms.there
+
+comm -23 acsyms.here acsyms.there > acsyms.extra
+rm -f acsyms.here acsyms.there
+
+if test -s acsyms.extra; then
+ echo ERROR: Symbol or symbols defined here but not in `basename $3`: `cat acsyms.extra`
+ rm -f acsyms.extra
+ exit 1
+fi
+rm -f acsyms.extra
+exit 0