summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-10-29 12:08:09 +0200
committerMartin Mares <mj@ucw.cz>1999-10-29 12:08:09 +0200
commit54165b1315dd09b0ea97705367b73086131c1ed8 (patch)
treefbe41c0c4d17a728b7d703f15940511e4f267a02
parented6081502ad814289b9b7b5537658c3b1ad435e5 (diff)
downloadbird-54165b1315dd09b0ea97705367b73086131c1ed8.tar
bird-54165b1315dd09b0ea97705367b73086131c1ed8.zip
Configure PATH_CONTROL_SOCKET.
autoconf.h is now written to obj/sysdep, the source tree is hopefully completely read-only now.
-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 |