Description: Do not touch config.h.in and stamp-h.in. Also export dpkg build flags.
Author: Francesco Paolo Lovergine <frankie@debian.org>
Forwarded: not needed

Index: proftpd-dfsg-1.3.7a/Makefile.in
===================================================================
--- proftpd-dfsg-1.3.7a.orig/Makefile.in	2020-07-22 22:46:40.680019154 +0200
+++ proftpd-dfsg-1.3.7a/Makefile.in	2020-07-22 22:46:40.676017154 +0200
@@ -265,10 +265,10 @@
 	chmod a+x configure config.sub install-sh modules/glue.sh
 
 # autoheader might not change config.h.in, so touch a stamp file.
-${srcdir}/config.h.in: stamp-h.in
-${srcdir}/stamp-h.in: configure.in acconfig.h
-	cd ${srcdir} && autoheader
-	echo timestamp > ${srcdir}/stamp-h.in
+#${srcdir}/config.h.in: stamp-h.in
+#${srcdir}/stamp-h.in: configure.in acconfig.h
+#	cd ${srcdir} && autoheader
+#	echo timestamp > ${srcdir}/stamp-h.in
 
 config.h: stamp-h
 stamp-h: config.h.in config.status
Index: proftpd-dfsg-1.3.7a/Make.rules.in
===================================================================
--- proftpd-dfsg-1.3.7a.orig/Make.rules.in	2020-07-22 22:46:40.680019154 +0200
+++ proftpd-dfsg-1.3.7a/Make.rules.in	2020-07-22 22:46:40.676017154 +0200
@@ -16,7 +16,7 @@
 AR=@AR@
 CC=@CC@
 PLATFORM=@OSREL@ @OSTYPE@
-LDFLAGS=@LDFLAGS@ @LIBDIRS@
+LDFLAGS=@LDFLAGS@ @LIBDIRS@ $(shell dpkg-buildflags --get LDFLAGS)
 LIBEXECDIR=@LIBEXECDIR@
 LIBS=@LIBS@ @LIBRARIES@ @LIBADD_DL@
 LIBTOOL=@LIBTOOL@
@@ -50,12 +50,12 @@
 
 # Preprocessor compilation flags.
 #
-CPPFLAGS=@CPPFLAGS@ -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES)
+CPPFLAGS=@CPPFLAGS@ -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES) $(shell dpkg-buildflags --get CPPFLAGS)
 ADDL_CPPFLAGS=@ADDL_CPPFLAGS@
 
 # Our compiler flags.
 #
-CFLAGS=@CFLAGS@
+CFLAGS=@CFLAGS@ $(shell dpkg-buildflags --get CFLAGS)
 DEFINES=$(PLATFORM)
 
 # Module-specific libraries to link against.  These libraries may be
Index: proftpd-dfsg-1.3.7a/contrib/mod_dnsbl/Makefile.in
===================================================================
--- proftpd-dfsg-1.3.7a.orig/contrib/mod_dnsbl/Makefile.in	2020-07-21 19:25:51.000000000 +0200
+++ proftpd-dfsg-1.3.7a/contrib/mod_dnsbl/Makefile.in	2020-07-22 22:50:02.528901242 +0200
@@ -20,8 +20,8 @@
 
 # Necessary redefinitions
 INCLUDES=-I. -I../.. -I../../include -I$(top_srcdir)/../../include @INCLUDES@
-CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES)
-LDFLAGS=-L../../lib @LDFLAGS@
+CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES) $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS=-L../../lib @LDFLAGS@ $(shell dpkg-buildflags --get LDFLAGS)
 
 .c.o:
 	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
Index: proftpd-dfsg-1.3.7a/contrib/mod_load/Makefile.in
===================================================================
--- proftpd-dfsg-1.3.7a.orig/contrib/mod_load/Makefile.in	2020-07-21 19:25:51.000000000 +0200
+++ proftpd-dfsg-1.3.7a/contrib/mod_load/Makefile.in	2020-07-22 22:51:00.185717544 +0200
@@ -21,8 +21,8 @@
 
 # Necessary redefinitions
 INCLUDES=-I. -I../.. -I../../include -I$(top_srcdir)/../../include @INCLUDES@
-CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES)
-LDFLAGS=-L../../lib @LDFLAGS@
+CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES) $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS=-L../../lib @LDFLAGS@ $(shell dpkg-buildflags --get LDFLAGS)
 
 .c.o:
 	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
Index: proftpd-dfsg-1.3.7a/contrib/mod_sftp/Makefile.in
===================================================================
--- proftpd-dfsg-1.3.7a.orig/contrib/mod_sftp/Makefile.in	2020-07-21 19:25:51.000000000 +0200
+++ proftpd-dfsg-1.3.7a/contrib/mod_sftp/Makefile.in	2020-07-22 22:51:46.208719403 +0200
@@ -29,8 +29,8 @@
 
 # Necessary redefinitions
 INCLUDES=-I. -I../.. -I../../include -I$(top_srcdir)/../../include @INCLUDES@
-CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES)
-LDFLAGS=-L../../lib @LDFLAGS@
+CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES) $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS=-L../../lib @LDFLAGS@ $(shell dpkg-buildflags --get LDFLAGS)
 
 # We special-case the building of umac128.o in order to use preprocessor
 # tricks to get the implementation, rather than making it be all in runtime.
Index: proftpd-dfsg-1.3.7a/contrib/mod_snmp/Makefile.in
===================================================================
--- proftpd-dfsg-1.3.7a.orig/contrib/mod_snmp/Makefile.in	2020-07-21 19:25:51.000000000 +0200
+++ proftpd-dfsg-1.3.7a/contrib/mod_snmp/Makefile.in	2020-07-22 22:52:29.454333143 +0200
@@ -20,8 +20,8 @@
 
 # Necessary redefinitions
 INCLUDES=-I. -I../.. -I../../include -I$(top_srcdir)/../../include @INCLUDES@
-CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES)
-LDFLAGS=-L../../lib @LDFLAGS@
+CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES) $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS=-L../../lib @LDFLAGS@ $(shell dpkg-buildflags --get LDFLAGS)
 
 .c.o:
 	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
Index: proftpd-dfsg-1.3.7a/contrib/mod_wrap2/Makefile.in
===================================================================
--- proftpd-dfsg-1.3.7a.orig/contrib/mod_wrap2/Makefile.in	2020-07-21 19:25:51.000000000 +0200
+++ proftpd-dfsg-1.3.7a/contrib/mod_wrap2/Makefile.in	2020-07-22 22:53:06.845020650 +0200
@@ -20,8 +20,8 @@
 
 # Necessary redefinitions
 INCLUDES=-I. -I../.. -I../../include -I$(top_srcdir)/../../include @INCLUDES@
-CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES)
-LDFLAGS=-L../../lib @LDFLAGS@
+CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES) $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS=-L../../lib @LDFLAGS@ $(shell dpkg-buildflags --get LDFLAGS)
 
 .c.o:
 	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
