From 119de663a2fc33ea2f9303e0cbe59ab32460520b Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 19 Jun 2010 09:17:14 +0200 Subject: [PATCH] Build system: Install the config file. --- Makefile.am | 2 +- configure.ac | 2 +- share/Makefile.am | 2 ++ collection.conf => share/collection.conf | 0 src/Makefile.am | 4 ++++ 5 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 share/Makefile.am rename collection.conf => share/collection.conf (100%) diff --git a/Makefile.am b/Makefile.am index af437a6..1f529a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1 @@ -SUBDIRS = src +SUBDIRS = share src diff --git a/configure.ac b/configure.ac index 9c8b628..125f37b 100644 --- a/configure.ac +++ b/configure.ac @@ -30,4 +30,4 @@ AC_CHECK_LIB(fcgi, FCGI_Accept, [], AC_CHECK_LIB(rrd_th, rrd_graph_v, [], [AC_MSG_ERROR(cannot find librrd_th.)], [-lm]) -AC_OUTPUT(Makefile src/Makefile) +AC_OUTPUT(Makefile share/Makefile src/Makefile) diff --git a/share/Makefile.am b/share/Makefile.am new file mode 100644 index 0000000..98d31c5 --- /dev/null +++ b/share/Makefile.am @@ -0,0 +1,2 @@ +dist_sysconf_DATA = collection.conf + diff --git a/collection.conf b/share/collection.conf similarity index 100% rename from collection.conf rename to share/collection.conf diff --git a/src/Makefile.am b/src/Makefile.am index 9b235ba..9b91a91 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,12 @@ AUTOMAKE_OPTIONS = foreign no-dependencies +AM_CPPFLAGS = -DPREFIX='"${prefix}"' +AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/collection.conf"' + if COMPILER_IS_GCC AM_CFLAGS = -Wall -Wextra endif + AM_YFLAGS = -d BUILT_SOURCES = parser.h -- 2.11.0