Permalink
Browse files

honor prefix for conf/sqlite/yamlfile

  • Loading branch information...
1 parent 882e26b commit dcc100b31488603047f3028a6c87b64d27a68228 @nrh nrh committed Nov 19, 2011
@@ -1,4 +1,4 @@
-AM_CFLAGS = -g -pg -Wall -DLIBCRANGE_FUNCDIR=\"$(pkglibdir)\" -I../src @PCRE_CFLAGS@ @APR_CFLAGS@
+AM_CFLAGS = -g -pg -Wall -DLIBCRANGE_FUNCDIR=\"$(pkglibdir)\" -DLIBCRANGE_CONF=\"$(sysconfdir)/range.conf\" -DDEFAULT_SQLITE_DB=\"$(localstatedir)/range.sqlite\" -DLIBCRANGE_YAML_DIR=\"$(sysconfdir)/range/\" -I../src @PCRE_CFLAGS@ @APR_CFLAGS@
AM_LDFLAGS = -module -L../src -lcrange -lyaml -lsqlite3 @PCRE_LIBS@ @APR_LIBS@
pkglib_LTLIBRARIES = yst-ip-list.la ip.la nodescf.la yamlfile.la sqlite.la
@@ -65,7 +65,7 @@ the key will be composed of all elements set-added together.
#include "libcrange.h"
#include "range.h"
-static const char* yaml_path = "/etc/range";
+static const char* yaml_path = LIBCRANGE_YAML_DIR;
/* List of functions that are provided by this module */
const char** functions_provided(libcrange* lr)
@@ -15,7 +15,7 @@ libcrange_la_SOURCES = range_parser.y range_scanner.l \
libcrange.c ast.c range_compress.c \
range.c
-libcrange_la_CFLAGS = -Wall -DLIBCRANGE_FUNCDIR=\"$(pkglibdir)\" @PERL_CFLAGS@ @PCRE_CFLAGS@ @APR_CFLAGS@
+libcrange_la_CFLAGS = -Wall -DLIBCRANGE_FUNCDIR=\"$(pkglibdir)\" -DLIBCRANGE_CONF=\"$(sysconfdir)/range.conf\" -DDEFAULT_SQLITE_DB=\"$(localstatedir)/range.sqlite\" -DLIBCRANGE_YAML_DIR=\"$(sysconfdir)/range/\" @PERL_CFLAGS@ @PCRE_CFLAGS@ @APR_CFLAGS@
libcrange_la_LDFLAGS = @PERL_LIBS@ @PCRE_LIBS@ @APR_LIBS@
range_scanner.h:
@@ -15,8 +15,8 @@ extern "C"
#define LIBCRANGE_VERSION "1.0"
-#define LIBCRANGE_CONF "/etc/libcrange.conf"
-#define DEFAULT_SQLITE_DB "/etc/range.sqlite"
+//#define LIBCRANGE_CONF "/usr/local/etc/libcrange.conf"
+//#define DEFAULT_SQLITE_DB "/usr/local/var/libcrange/range.sqlite"
//#define LIBCRANGE_FUNCDIR "/usr/lib/libcrange"
struct libcrange;

0 comments on commit dcc100b

Please sign in to comment.