author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 13 Aug 2016 15:36:48 +0000 (17:36 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 13 Aug 2016 15:36:48 +0000 (17:36 +0200) | ||
commit | 03f391011a09b28e3fd8de2bbcf33ec116298e1e | |
tree | 323855d1ce63f96e71651186f4dcff43d29d9f78 | tree | snapshot |
parent | 5fabf398618be4e98da6f5abddb1aead86afbeb0 | commit | diff |
Stop using net-snmp-config to detect libnetsmp
net-snmp-config returns the settings used to compile and link
libnetsnmp, not the settings needed to compile and link code against it.
This resulted in various issues, namely overlinking, failure to compile
without compiler optimisations, and overriding of our compiler flags.
One example is the following, just noticed on RHEL5:
cc1: warnings being treated as errors
snmp.c: In function 'csnmp_config_add_host':
snmp.c:767: warning: ISO C90 forbids mixed declarations and code
make[3]: *** [snmp_la-snmp.lo] Error 1
We do compile in C99 mode, but net-snmp-config adds
-Wdeclaration-after-statement to our build command line. The GCC on
RHEL5 returns a warning, while later GCCs just ignore this.
net-snmp-config returns the settings used to compile and link
libnetsnmp, not the settings needed to compile and link code against it.
This resulted in various issues, namely overlinking, failure to compile
without compiler optimisations, and overriding of our compiler flags.
One example is the following, just noticed on RHEL5:
cc1: warnings being treated as errors
snmp.c: In function 'csnmp_config_add_host':
snmp.c:767: warning: ISO C90 forbids mixed declarations and code
make[3]: *** [snmp_la-snmp.lo] Error 1
We do compile in C99 mode, but net-snmp-config adds
-Wdeclaration-after-statement to our build command line. The GCC on
RHEL5 returns a warning, while later GCCs just ignore this.
configure.ac | diff | blob | history | |
src/Makefile.am | diff | blob | history |