]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
build: allow out-of-tree build 383/head
authorVincent Bernat <vincent.bernat@dailymotion.com>
Fri, 5 Apr 2013 09:28:14 +0000 (11:28 +0200)
committerVincent Bernat <vincent.bernat@dailymotion.com>
Fri, 5 Apr 2013 09:31:44 +0000 (11:31 +0200)
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.

bindings/lua/Makefile.am
bindings/tcl/Makefile.am
m4/acinclude.m4
src/Makefile.am

index f1389d6290cfea85ed959fbf5a309c506d237cd4..d71641f03f09b00da03b57304ab725a1e9ec36f3 100644 (file)
@@ -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
 
index 265191d6531d81f918096f372b99ea9d0894f906..81ca5e0147ebe9346613fbe08aa412fc6c3b61e3 100644 (file)
@@ -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]\"" > $@
index e12477f29738cf30c8c0f18a43808a5cd34ef5d0..fe969be4e5ceffd38d104a855ccc728f90460e32 100644 (file)
@@ -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 <stdio.h>
 int main(void){
     double rrdnan,rrdinf,rrdc,rrdzero;
index f0a544853135b1c207513caff39a309e537f32c4..c62839525a33708965dd17711108b0e355d5dee6 100644 (file)
@@ -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 =          \