dpkg-buildflags has not always supported --export=configure, but commit
6c2d4c8780 (debian: Apply hardening options to build.) used it
unconditionally, causing the build to fail on old Debian distributions.
This fixes the problem.
Signed-off-by: Ben Pfaff <blp@nicira.com>
+# Old versions of dpkg-buildflags do not understand --export=configure.
+# When dpkg-buildflags does not understand an option, it prints its full
+# --help output on stdout, so we have to avoid that here.
+buildflags := $(shell if dpkg-buildflags --export=configure >/dev/null 2>&1; \
+ then dpkg-buildflags --export=configure; fi)
+
configure: configure-stamp
configure-stamp:
dh_testdir
configure: configure-stamp
configure-stamp:
dh_testdir
test -e Makefile || \
../configure --prefix=/usr --localstatedir=/var --enable-ssl \
--sysconfdir=/etc CFLAGS="$(CFLAGS)" \
test -e Makefile || \
../configure --prefix=/usr --localstatedir=/var --enable-ssl \
--sysconfdir=/etc CFLAGS="$(CFLAGS)" \
- $(shell dpkg-buildflags --export=configure) \
- $(DATAPATH_CONFIGURE_OPTS))
+ $(buildflags) $(DATAPATH_CONFIGURE_OPTS))
touch configure-stamp
#Architecture
touch configure-stamp
#Architecture