From: Peter A. Bigot Date: Sat, 17 May 2014 12:42:26 +0000 (-0500) Subject: autoconf: rework config file locations X-Git-Tag: v1.5.0-rc1~95^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b68117e0fe87c25eb2c6ded94edb8d4c834d2fa0;p=thirdparty%2Frrdtool-1.x.git autoconf: rework config file locations If we assume somebody puts the src directory in the include file path to CC, we don't need relative symlinks to rrd_config.h which will make separated builds much easier to support. Then we don't need to have the config files in the root directory and symlinks back and forth between there and src. Signed-off-by: Peter A. Bigot --- diff --git a/.gitignore b/.gitignore index 6035261c..08238062 100644 --- a/.gitignore +++ b/.gitignore @@ -35,17 +35,16 @@ Makefile.in # autoconf generated files Makefile .deps/ -/config.h /config.log /config.status /etc/rrdcached.service /etc/rrdcached.socket /libtool -/rrd_config.h /src/librrd.pc /src/librrd.sym.in /src/rrd_config.h -/stamp-h1 +/src/rrd_config.h.in +/src/stamp-h1 # po /ABOUT-NLS diff --git a/bindings/perl-shared/RRDs.xs b/bindings/perl-shared/RRDs.xs index 266b5e34..ca7e166f 100644 --- a/bindings/perl-shared/RRDs.xs +++ b/bindings/perl-shared/RRDs.xs @@ -25,9 +25,9 @@ extern "C" { #define VERSION_SAVED VERSION #undef VERSION #ifndef WIN32 -#include "../../rrd_config.h" +#include "rrd_config.h" #endif -#include "../../src/rrd_tool.h" +#include "rrd_tool.h" #undef VERSION #define VERSION VERSION_SAVED #undef VERSION_SAVED diff --git a/bindings/python/rrdtoolmodule.c b/bindings/python/rrdtoolmodule.c index 502b70c6..9ac1bf3b 100644 --- a/bindings/python/rrdtoolmodule.c +++ b/bindings/python/rrdtoolmodule.c @@ -38,11 +38,11 @@ #endif -#include "../../rrd_config.h" +#include "rrd_config.h" static const char *__version__ = PACKAGE_VERSION; #include "Python.h" -#include "../../src/rrd_tool.h" +#include "rrd_tool.h" //#include "rrd.h" //#include "rrd_extra.h" diff --git a/bindings/ruby/main.c b/bindings/ruby/main.c index 6fa2810d..e4cc6443 100644 --- a/bindings/ruby/main.c +++ b/bindings/ruby/main.c @@ -5,7 +5,7 @@ #include #include #include -#include "../../src/rrd_tool.h" +#include "rrd_tool.h" typedef struct string_arr_t { int len; diff --git a/configure.ac b/configure.ac index ce2e6604..8d765f42 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,7 @@ AM_MAINTAINER_MODE # Automake-1.11. Disable by either passing --disable-silent-rules to # configure or passing V=1 to make m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_CONFIG_HEADERS([rrd_config.h]) +AC_CONFIG_HEADERS([src/rrd_config.h]) AC_CONFIG_MACRO_DIR([m4]) dnl all our local stuff like install scripts and include files @@ -944,13 +944,6 @@ AC_CONFIG_FILES([bindings/lua/Makefile]) AC_CONFIG_COMMANDS([default],[[ chmod +x examples/*.pl]],[[]]) -dnl intl requires our config to be called config.h. indulge it. -AC_CONFIG_COMMANDS_POST([ test -f config.h || ln -s rrd_config.h config.h ]) - -dnl bindings use nasty path, just make them happy. -AC_CONFIG_COMMANDS_POST([ test -f src/rrd_config.h || (cd src/ && ln -s ../rrd_config.h) ]) -AC_CONFIG_COMMANDS_POST([ test -f src/rrd_config_bottom.h || (cd src/ && ln -s ../rrd_config_bottom.h) ]) - AC_OUTPUT AC_MSG_CHECKING(in)