diff --git a/configure.ac b/configure.ac index 9c35926..027805f 100644 --- a/configure.ac +++ b/configure.ac @@ -91,13 +91,18 @@ fi ]) if test $backend = freebsd; then -AC_SUBST(CPPFLAGS, "$CPPFLAGS -I/usr/local/include/libepoll-shim") -AC_SUBST(LDFLAGS, "$LDFLAGS -L/usr/local/lib") +AC_SUBST(CPPFLAGS, "$CPPFLAGS -I${prefix}/include/libepoll-shim") +AC_SUBST(LDFLAGS, "$LDFLAGS -L${prefix}/lib") AC_CHECK_HEADERS([sys/epoll.h],[],[AC_MSG_ERROR([Missing libepoll-shim])]) AC_CHECK_LIB(epoll-shim, epoll_create1) fi AM_CONDITIONAL([OS_FREEBSD], [test "x$backend" = "xfreebsd"]) +if test "x$prefix" = "xNONE" ; then + prefix="" +fi +AC_SUBST(CPPFLAGS, "$CPPFLAGS -DDEFAULT_RSHIM_CONFIG_FILE='\"${prefix}/etc/rshim.conf\"'") + AC_CHECK_LIB(pthread, pthread_create) AC_OUTPUT diff --git a/src/rshim.c b/src/rshim.c index 1030692..cfd9122 100644 --- a/src/rshim.c +++ b/src/rshim.c @@ -178,7 +178,7 @@ int rshim_static_index = -1; char *rshim_static_dev_name; /* Default configuration file. */ -char *rshim_cfg_file = "/etc/rshim.conf"; +const char *rshim_cfg_file = DEFAULT_RSHIM_CONFIG_FILE; static int rshim_display_level = 0; static int rshim_boot_timeout = 100; int rshim_drop_mode = -1;