From: Vincent Bernat Date: Fri, 5 Apr 2013 09:28:14 +0000 (+0200) Subject: build: allow out-of-tree build X-Git-Tag: v1.5.0-rc1~183^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F383%2Fhead;p=thirdparty%2Frrdtool-1.x.git build: allow out-of-tree build Building out of the tree is convenient because we there it does not pollute VCS status and make it convenient to clean everything by just removing the build directory. Currently, the build won't work with Perl, Python and Ruby bindings. --- diff --git a/bindings/lua/Makefile.am b/bindings/lua/Makefile.am index f1389d62..d71641f0 100644 --- a/bindings/lua/Makefile.am +++ b/bindings/lua/Makefile.am @@ -25,7 +25,7 @@ else endif rrd_la_LIBADD = -lrrd -lm rrd_la_LDFLAGS = -module -version-info $(LIB_VERSION_INFO) $(LUA_LFLAGS) -L$(top_builddir)/src/.libs -rrd_la_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir) $(LUA_CFLAGS) $(LUA_DEFINES) -DLIB_VERSION=\"$(LIB_VERSION)\" +rrd_la_CFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir) $(LUA_CFLAGS) $(LUA_DEFINES) -DLIB_VERSION=\"$(LIB_VERSION)\" .PHONY: test.lua diff --git a/bindings/tcl/Makefile.am b/bindings/tcl/Makefile.am index 265191d6..81ca5e01 100644 --- a/bindings/tcl/Makefile.am +++ b/bindings/tcl/Makefile.am @@ -47,7 +47,7 @@ $(TCL_RRD_LIB): tclrrd.o $(TCL_SHLIB_LD) $(TCL_LD_SEARCH_FLAGS) $(LIBDIRS) $< -o $@ -lrrd_th -lm $(TCL_STUB_LIB_SPEC) $(LDFLAGS) $(LIBS) tclrrd.o: tclrrd.c - $(CC) $(AM_CFLAGS) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(AM_CPPFLAGS) -c tclrrd.c -DVERSION=\"$(VERSION)\" + $(CC) $(AM_CFLAGS) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(AM_CPPFLAGS) -c $(srcdir)/tclrrd.c -DVERSION=\"$(VERSION)\" pkgIndex.tcl: echo "package ifneeded Rrd $(VERSION) \"load $(libdir)/tclrrd$(VERSION)[info sharedlibextension]\"" > $@ diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index e12477f2..fe969be4 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -339,7 +339,7 @@ AC_DEFUN([AC_IEEE], [ AC_MSG_CHECKING([if IEEE math works $1]) AC_CACHE_VAL([rd_cv_ieee_$2], [AC_RUN_IFELSE([AC_LANG_SOURCE([[$3 -#include "src/rrd_config_bottom.h" +#include "${srcdir}/src/rrd_config_bottom.h" #include int main(void){ double rrdnan,rrdinf,rrdc,rrdzero; diff --git a/src/Makefile.am b/src/Makefile.am index f0a54485..c6283952 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,7 +12,7 @@ endif INCLUDES = -DLOCALEDIR="\"$(datadir)/locale\"" RRD_DEFAULT_FONT=@RRD_DEFAULT_FONT@ AM_CPPFLAGS = -DRRD_DEFAULT_FONT=\"$(RRD_DEFAULT_FONT)\" -DNUMVERS=@NUMVERS@ -AM_CFLAGS = @CFLAGS@ +AM_CFLAGS = @CFLAGS@ -I$(top_srcdir) ## no including this by default @WERROR@ UPD_C_FILES = \