Commit 54165b13 authored by Martin Mareš's avatar Martin Mareš

Configure PATH_CONTROL_SOCKET.

autoconf.h is now written to obj/sysdep, the source tree is hopefully
completely read-only now.
parent ed608150
...@@ -122,6 +122,7 @@ BIRD_CHECK_STRUCT_IP_MREQN ...@@ -122,6 +122,7 @@ BIRD_CHECK_STRUCT_IP_MREQN
if test "$enable_debug" = yes ; then if test "$enable_debug" = yes ; then
AC_DEFINE(PATH_CONFIG_DIR, ".") AC_DEFINE(PATH_CONFIG_DIR, ".")
AC_DEFINE(PATH_CONTROL_SOCKET_DIR, ".")
AC_DEFINE(DEBUGGING) AC_DEFINE(DEBUGGING)
AC_CHECK_LIB(dmalloc, dmalloc_debug) AC_CHECK_LIB(dmalloc, dmalloc_debug)
if test $ac_cv_lib_dmalloc_dmalloc_debug != yes ; then if test $ac_cv_lib_dmalloc_dmalloc_debug != yes ; then
...@@ -129,9 +130,11 @@ if test "$enable_debug" = yes ; then ...@@ -129,9 +130,11 @@ if test "$enable_debug" = yes ; then
fi fi
else else
AC_DEFINE_UNQUOTED(PATH_CONFIG_DIR, "$sysconfdir") AC_DEFINE_UNQUOTED(PATH_CONFIG_DIR, "$sysconfdir")
AC_DEFINE_UNQUOTED(PATH_CONTROL_SOCKET_DIR, "$localstatedir")
fi 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_COMMANDS(,[CPP="$CPP" $srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs])
AC_OUTPUT($makefiles) AC_OUTPUT($makefiles)
......
...@@ -44,5 +44,8 @@ ...@@ -44,5 +44,8 @@
/* Path to configuration files */ /* Path to configuration files */
#define PATH_CONFIG_DIR ? #define PATH_CONFIG_DIR ?
/* Path to control socket */
#define PATH_CONTROL_SOCKET_DIR ?
/* Are we using dmalloc? */ /* Are we using dmalloc? */
#undef HAVE_LIBDMALLOC #undef HAVE_LIBDMALLOC
...@@ -39,5 +39,6 @@ typedef u16 word; ...@@ -39,5 +39,6 @@ typedef u16 word;
/* Path to configuration file */ /* Path to configuration file */
#define PATH_CONFIG PATH_CONFIG_DIR "/bird.conf" #define PATH_CONFIG PATH_CONFIG_DIR "/bird.conf"
#define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR "/bird.ctl"
#endif #endif
...@@ -21,7 +21,7 @@ shift ...@@ -21,7 +21,7 @@ shift
echo "Merging system-dependent modules ($@)" echo "Merging system-dependent modules ($@)"
MODULES=`for a in $@ ; do MODULES=`for a in $@ ; do
cat $SRCDIR/sysdep/config.h $SRCDIR/$a/Modules | 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@" sed "/^[ ]*\$/d;/^#/d;s@\\(.*\\)@\\1 $a/\\1@"
done | done |
sort +0 -1 -u | sort +0 -1 -u |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment