build: Drop GCC specific compiler flag -include Instead, explicitly include <config.h> in library and test source files for increased portability. Based-on-patch-by: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
diff --git a/src/Makefile.am b/src/Makefile.am
index 5fdcb8f..77f677f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,9 @@
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = \
+ -I$(top_builddir) \
-I$(top_srcdir)/include \
- -include $(top_builddir)/config.h
+ $(nil)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
diff --git a/src/helper.c b/src/helper.c
index 5b16ec1..b0875bd 100644
--- a/src/helper.c
+++ b/src/helper.c
@@ -9,6 +9,8 @@
* ----------------------------------------------------------------------------
*/
+#include <config.h>
+
#include <sys/param.h>
#include <sys/stat.h>
diff --git a/src/md2.c b/src/md2.c
index 20487f0..c3121c2 100644
--- a/src/md2.c
+++ b/src/md2.c
@@ -29,6 +29,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <config.h>
+
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: md2.c,v 1.7 2012/06/25 22:32:44 abs Exp $");
#endif /* LIBC_SCCS and not lint */
diff --git a/src/md4.c b/src/md4.c
index cf32b29..25d4d95 100644
--- a/src/md4.c
+++ b/src/md4.c
@@ -18,6 +18,8 @@
* will fill a supplied 16-byte array with the digest.
*/
+#include <config.h>
+
#include <sys/types.h>
#include <string.h>
#include <md4.h>
diff --git a/src/md5.c b/src/md5.c
index 0fc118a..b3a0935 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -17,6 +17,8 @@
* will fill a supplied 16-byte array with the digest.
*/
+#include <config.h>
+
#include <sys/types.h>
#include <string.h>
#include <md5.h>
diff --git a/src/rmd160.c b/src/rmd160.c
index d68f2e4..3f13243 100644
--- a/src/rmd160.c
+++ b/src/rmd160.c
@@ -26,6 +26,9 @@
* RSA Laboratories, CryptoBytes, Volume 3, Number 2, Autumn 1997,
* ftp://ftp.rsasecurity.com/pub/cryptobytes/crypto3n2.pdf
*/
+
+#include <config.h>
+
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_SYS_ENDIAN_H
diff --git a/src/sha1.c b/src/sha1.c
index 9f69f15..19b9219 100644
--- a/src/sha1.c
+++ b/src/sha1.c
@@ -14,6 +14,8 @@
* 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
*/
+#include <config.h>
+
#include <sys/param.h>
#include <string.h>
#include <sha1.h>
diff --git a/src/sha2.c b/src/sha2.c
index 029d0d4..24a68e7 100644
--- a/src/sha2.c
+++ b/src/sha2.c
@@ -34,6 +34,8 @@
* $From: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $
*/
+#include <config.h>
+
#include <sys/types.h>
#include <string.h>
diff --git a/test/Makefile.am b/test/Makefile.am
index 8a4512e..136debc 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,7 +1,6 @@
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = \
- -include $(top_builddir)/config.h \
-I$(top_builddir) \
-I$(top_srcdir)/include \
$(nil)
diff --git a/test/md2.c b/test/md2.c
index 01849e0..36ba9e4 100644
--- a/test/md2.c
+++ b/test/md2.c
@@ -24,6 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <config.h>
+
#include <assert.h>
#include <md2.h>
#include <string.h>
diff --git a/test/md4.c b/test/md4.c
index 177ed3d..e78077e 100644
--- a/test/md4.c
+++ b/test/md4.c
@@ -24,6 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <config.h>
+
#include <assert.h>
#include <md4.h>
#include <string.h>
diff --git a/test/md5.c b/test/md5.c
index 7fd3833..5dac6e1 100644
--- a/test/md5.c
+++ b/test/md5.c
@@ -24,6 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <config.h>
+
#include <assert.h>
#include <md5.h>
#include <string.h>
diff --git a/test/rmd160.c b/test/rmd160.c
index b4adbcf..b4dcd54 100644
--- a/test/rmd160.c
+++ b/test/rmd160.c
@@ -24,6 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <config.h>
+
#include <assert.h>
#include <rmd160.h>
#include <string.h>
diff --git a/test/sha1.c b/test/sha1.c
index 426af01..4cda990 100644
--- a/test/sha1.c
+++ b/test/sha1.c
@@ -24,6 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <config.h>
+
#include <assert.h>
#include <sha1.h>
#include <string.h>
diff --git a/test/sha2.c b/test/sha2.c
index 536dcb5..0cd274e 100644
--- a/test/sha2.c
+++ b/test/sha2.c
@@ -24,6 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <config.h>
+
#include <assert.h>
#include <sha2.h>
#include <string.h>