PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@
PYUNBOUND_INSTALL=@PYUNBOUND_INSTALL@
PYUNBOUND_UNINSTALL=@PYUNBOUND_UNINSTALL@
+UNBOUND_VERSION_MAJOR=@UNBOUND_VERSION_MAJOR@
+UNBOUND_VERSION_MINOR=@UNBOUND_VERSION_MINOR@
+UNBOUND_VERSION_MICRO=@UNBOUND_VERSION_MICRO@
ALLTARGET=@ALLTARGET@
# _unbound.la if pyunbound enabled.
longtest: tests
if test -x "`which bash`"; then bash testcode/do-tests.sh; else sh testcode/do-tests.sh; fi
-lib: libunbound.la
+lib: libunbound.la unbound.h
libunbound.la: $(LIBUNBOUND_OBJ_LINK)
$(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath $(libdir) -lssl $(LIBS)
harvest$(EXEEXT): $(HARVEST_OBJ_LINK) libunbound.la
$(LINK) -o $@ $(HARVEST_OBJ_LINK) $(LIBS) -L. -L.libs -lunbound
+unbound.h: $(srcdir)/libunbound/unbound.h
+ sed -e 's/@''UNBOUND_VERSION_MAJOR@/$(UNBOUND_VERSION_MAJOR)/' -e 's/@''UNBOUND_VERSION_MINOR@/$(UNBOUND_VERSION_MINOR)/' -e 's/@''UNBOUND_VERSION_MICRO@/$(UNBOUND_VERSION_MICRO)/' < $(srcdir)/libunbound/unbound.h > $@
+
unbound-control-setup: $(srcdir)/smallapp/unbound-control-setup.sh
sed -e 's:^DESTDIR=.*$$:DESTDIR=$(UNBOUND_RUN_DIR):' < $(srcdir)/smallapp/unbound-control-setup.sh > $@
-chmod +x $@
$(SWIG) $(CPPFLAGS) -o $@ -python $(srcdir)/pythonmod/interface.i
libunbound_wrap.lo libunbound_wrap.o: libunbound/python/libunbound_wrap.c \
- $(srcdir)/libunbound/unbound.h
-libunbound/python/libunbound_wrap.c: $(srcdir)/libunbound/python/libunbound.i $(srcdir)/libunbound/unbound.h
+ unbound.h
+libunbound/python/libunbound_wrap.c: $(srcdir)/libunbound/python/libunbound.i unbound.h
@-if test ! -d libunbound/python; then $(INSTALL) -d libunbound/python; fi
$(SWIG) -python -o $@ $(CPPFLAGS) $(srcdir)/libunbound/python/libunbound.i
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
+ 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)
rm -f _unbound.la libunbound/python/libunbound_wrap.c libunbound/python/unbound.py pythonmod/interface.h pythonmod/unboundmodule.py
rm -rf autom4te.cache .libs build doc/html doc/xml
done
$(INSTALL) -c -m 755 unbound-control-setup $(DESTDIR)$(sbindir)/unbound-control-setup
if test ! -e $(DESTDIR)$(configfile); then $(INSTALL) -d `dirname $(DESTDIR)$(configfile)`; $(INSTALL) -c -m 644 doc/example.conf $(DESTDIR)$(configfile); fi
- $(LIBTOOL) --mode=install cp $(srcdir)/libunbound/unbound.h $(DESTDIR)$(includedir)/unbound.h
+ $(LIBTOOL) --mode=install cp unbound.h $(DESTDIR)$(includedir)/unbound.h
$(LIBTOOL) --mode=install cp libunbound.la $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
# BSD licensed.
#
-# Version 21
+# Version 22
+# 2013-03-22 Fix ACX_RSRC_VERSION for long version numbers.
# 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
# 2012-01-20 Fix COMPILER_FLAGS_UNBOUND for gcc 4.6.2 assigned-not-used-warns.
# 2011-12-05 Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
dnl Picks the first three(,0) or four numbers out of the name.
dnl $1: variable for the result
AC_DEFUN([ACX_RSRC_VERSION],
-[$1=[`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*$/\1,\2,\3,0/' `]
+[$1=[`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `]
])
dnl Routine to help check for compiler flags.
LIBUNBOUND_AGE
LIBUNBOUND_REVISION
LIBUNBOUND_CURRENT
+UNBOUND_VERSION_MICRO
+UNBOUND_VERSION_MINOR
+UNBOUND_VERSION_MAJOR
target_alias
host_alias
build_alias
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+UNBOUND_VERSION_MAJOR=1
+
+UNBOUND_VERSION_MINOR=4
+
+UNBOUND_VERSION_MICRO=21
+
LIBUNBOUND_CURRENT=4
LIBUNBOUND_REVISION=1
$as_echo "#define WINVER 0x0502" >>confdefs.h
-wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*$/\1,\2,\3,0/' `
+wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `
cat >>confdefs.h <<_ACEOF
sinclude(acx_python.m4)
sinclude(ac_pkg_swig.m4)
-AC_INIT(unbound, 1.4.21, unbound-bugs@nlnetlabs.nl, unbound)
+# must be numbers. ac_defun because of later processing
+m4_define([VERSION_MAJOR],[1])
+m4_define([VERSION_MINOR],[4])
+m4_define([VERSION_MICRO],[21])
+AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound)
+AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
+AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
+AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO])
LIBUNBOUND_CURRENT=4
LIBUNBOUND_REVISION=1
22 March 2013: Wouter
- Fix resolve of names that use a mix of public and private addresses.
- iana portlist update.
+ - Fix makedist for new svn for -d option.
+ - unbound.h header file has UNBOUND_VERSION_MAJOR define.
+ - Fix windows RSRC version for long version numbers.
21 March 2013: Wouter
- release 1.4.20
extern "C" {
#endif
+/** the version of this header file */
+#define UNBOUND_VERSION_MAJOR @UNBOUND_VERSION_MAJOR@
+#define UNBOUND_VERSION_MINOR @UNBOUND_VERSION_MINOR@
+#define UNBOUND_VERSION_MICRO @UNBOUND_VERSION_MICRO@
+
/**
* The validation context is created to hold the resolver status,
* validation keys and a small cache (containing messages, rrsets,
info "Updating '$1' with today's date."
replace_text "$1" "@date@" "`date +'%b %e, %Y'`"
}
+
+replace_version () {
+ local v1=`echo $2 | sed -e 's/^.*\..*\.//'`
+ local v2=`echo $3 | sed -e 's/^.*\..*\.//'`
+ replace_text "$1" "VERSION_MICRO\],\[$v1" "VERSION_MICRO\],\[$v2"
+ head -20 "$1"
+}
check_svn_root () {
# Check if SVNROOT is specified.
if [ -z "$SVNROOT" ]; then
- if test -f .svn/entries; then
- eval `svn info | grep 'URL:' | sed -e 's/URL: /url=/' | head -1`
- SVNROOT="$url"
- fi
- if test -z "$SVNROOT"; then
- error "SVNROOT must be specified (using -d)"
+ if svn info 2>&1 | grep "not a working copy" >/dev/null; then
+ if test -z "$SVNROOT"; then
+ error "SVNROOT must be specified (using -d)"
+ fi
+ else
+ eval `svn info | grep 'URL:' | sed -e 's/URL: /url=/' | head -1`
+ SVNROOT="$url"
fi
fi
}
version2=`echo $version | sed -e 's/rc.*$//' -e 's/_20.*$//'`
version2="${version2}_`date +%Y%m%d`"
fi
- replace_text "configure.ac" "AC_INIT(unbound, $version" "AC_INIT(unbound, $version2"
+ replace_version "configure.ac" "$version" "$version2"
version="$version2"
info "Rebuilding configure script (autoconf) snapshot."
autoconf || error_cleanup "Autoconf failed."
version2="${version}rc$RC"
info "Version number: $version2"
- replace_text "configure.ac" "AC_INIT(unbound, $version" "AC_INIT(unbound, $version2"
+ replace_version "configure.ac" "$version" "$version2"
version="$version2"
RECONFIGURE="yes"
fi
version2="${version}_`date +%Y%m%d`"
info "Snapshot version number: $version2"
- replace_text "configure.ac" "AC_INIT(unbound, $version" "AC_INIT(unbound, $version2"
+ replace_version "configure.ac" "$version" "$version2"
version="$version2"
RECONFIGURE="yes"
fi