summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.in5
-rw-r--r--sysdep/autoconf.h.in3
-rw-r--r--sysdep/config.h1
-rwxr-xr-xtools/mergedirs2
4 files changed, 9 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 6419e12..f32324f 100644
--- a/configure.in
+++ b/configure.in
@@ -122,6 +122,7 @@ BIRD_CHECK_STRUCT_IP_MREQN
if test "$enable_debug" = yes ; then
AC_DEFINE(PATH_CONFIG_DIR, ".")
+ AC_DEFINE(PATH_CONTROL_SOCKET_DIR, ".")
AC_DEFINE(DEBUGGING)
AC_CHECK_LIB(dmalloc, dmalloc_debug)
if test $ac_cv_lib_dmalloc_dmalloc_debug != yes ; then
@@ -129,9 +130,11 @@ if test "$enable_debug" = yes ; then
fi
else
AC_DEFINE_UNQUOTED(PATH_CONFIG_DIR, "$sysconfdir")
+ AC_DEFINE_UNQUOTED(PATH_CONTROL_SOCKET_DIR, "$localstatedir")
fi
-AC_CONFIG_HEADER(sysdep/autoconf.h)
+mkdir -p $objdir/sysdep
+AC_CONFIG_HEADER($objdir/sysdep/autoconf.h:sysdep/autoconf.h.in)
AC_OUTPUT_COMMANDS(,[CPP="$CPP" $srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs])
AC_OUTPUT($makefiles)
diff --git a/sysdep/autoconf.h.in b/sysdep/autoconf.h.in
index 6c76f1a..8d2ebf3 100644
--- a/sysdep/autoconf.h.in
+++ b/sysdep/autoconf.h.in
@@ -44,5 +44,8 @@
/* Path to configuration files */
#define PATH_CONFIG_DIR ?
+/* Path to control socket */
+#define PATH_CONTROL_SOCKET_DIR ?
+
/* Are we using dmalloc? */
#undef HAVE_LIBDMALLOC
diff --git a/sysdep/config.h b/sysdep/config.h
index 6b2f94a..4699b4f 100644
--- a/sysdep/config.h
+++ b/sysdep/config.h
@@ -39,5 +39,6 @@ typedef u16 word;
/* Path to configuration file */
#define PATH_CONFIG PATH_CONFIG_DIR "/bird.conf"
+#define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR "/bird.ctl"
#endif
diff --git a/tools/mergedirs b/tools/mergedirs
index 61b092f..33bcbda 100755
--- a/tools/mergedirs
+++ b/tools/mergedirs
@@ -21,7 +21,7 @@ shift
echo "Merging system-dependent modules ($@)"
MODULES=`for a in $@ ; do
cat $SRCDIR/sysdep/config.h $SRCDIR/$a/Modules |
- $cpp -U unix -D MACROS_ONLY - |
+ $cpp -U unix -D MACROS_ONLY -I $OBJDIR - |
sed "/^[ ]*\$/d;/^#/d;s@\\(.*\\)@\\1 $a/\\1@"
done |
sort +0 -1 -u |