aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLucas Bickel <hairmare@rabe.ch>2016-09-03 17:13:30 +0200
committerLucas Bickel <hairmare@rabe.ch>2016-09-05 18:57:20 +0200
commit5542c8ecff635f9abc05b6b2ff255db02c2c9c46 (patch)
tree2ab760158b6cf57b5f05484099605f301d9278cc /configure.ac
parentaf7b57a08518b9dc8863a8b63b4fb0d6d7be41d2 (diff)
downloadetisnoop-5542c8ecff635f9abc05b6b2ff255db02c2c9c46.tar.gz
etisnoop-5542c8ecff635f9abc05b6b2ff255db02c2c9c46.tar.bz2
etisnoop-5542c8ecff635f9abc05b6b2ff255db02c2c9c46.zip
Add --std=gnu99 arg to gcc calls
On CentOS 7.2 gcc seems to need some gentle encouragment to compile etisnoop with autotools. I was experiencing the following issues and found that adding `--std=gnu99` through autoconf makes it compile. ``` CC src/firecode.o src/firecode.c: In function 'firecode_crc': src/firecode.c:34:5: error: 'for' loop initial declarations are only allowed in C99 mode for (size_t len = 0; len < size; len++) { ^ src/firecode.c:34:5: note: use option -std=c99 or -std=gnu99 to compile your code src/firecode.c:35:9: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0x80; i != 0; i >>= 1) { ^ make[1]: *** [src/firecode.o] Error 1 make[1]: Leaving directory `/root/rpmbuild/BUILD/etisnoop-1.1.0' ```
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c35909b..b9ffe77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,10 @@ AC_PROG_MKDIR_P
AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
+AC_PROG_CC_STDC
+# Added for automake 1.13 on CentOS 7, obsolecent starting with automake 1.14
+AM_PROG_CC_C_O
+
# std::thread requires pthread
AX_PTHREAD( [
AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])