C includes as they contain substitutions specific to make.
Worked around by creating sysconf/paths.h which is created from
the Makefile instead of by the configure script.
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
AC_CHECK_LIB(efence, malloc)
fi
-else
- AC_DEFINE_UNQUOTED(PATH_CONFIG_DIR, "$sysconfdir")
- AC_DEFINE_UNQUOTED(PATH_CONTROL_SOCKET_DIR, "$localstatedir")
fi
CLIENT=
/* We have <syslog.h> and syslog() */
#undef HAVE_SYSLOG
-/* Path to configuration files */
-#define PATH_CONFIG_DIR ?
-
-/* Path to control socket */
-#define PATH_CONTROL_SOCKET_DIR ?
-
/* Are we using dmalloc? */
#undef HAVE_LIBDMALLOC
#ifndef MACROS_ONLY
+#include "sysdep/paths.h"
+
/* Types */
typedef signed INTEGER_8 s8;
typedef unsigned INTEGER_8 u8;
#endif
/* Path to configuration file */
+#ifdef DEBUGGING
+#define PATH_CONFIG "bird.conf"
+#define PATH_CONTROL_SOCKET "bird.ctl"
+#else
#define PATH_CONFIG PATH_CONFIG_DIR "/bird.conf"
#define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR "/bird.ctl"
+#endif
#endif
distclean: clean
rm -rf $(objdir)
- rm -f config.* configure sysdep/autoconf.h Makefile
+ rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile
.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
-all: .dep-stamp subdir daemon @CLIENT@
+all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
daemon: $(exedir)/bird
userdocs progdocs: .dir-stamp
$(MAKE) -C doc -f $(srcdir_abs)/doc/Makefile $@
+sysdep/paths.h:
+ echo >sysdep/paths.h "/* Generated by Makefile, don't edit manually! */"
+ echo >>sysdep/paths.h "#define PATH_CONFIG_DIR \"$(sysconfdir)\""
+ echo >>sysdep/paths.h "#define PATH_CONTROL_SOCKET_DIR \"$(localstatedir)\""
+
tags:
cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
install: all
- $(INSTALL) -d $(sbindir) $(sysconfdir)
+ $(INSTALL) -d $(sbindir) $(sysconfdir) $(localstatedir)
$(INSTALL_PROGRAM) -s $(exedir)/bird $(sbindir)/
if test -n "@CLIENT@" ; then \
$(INSTALL_PROGRAM) -s $(exedir)/birdc $(sbindir)/ ; \
rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl .dep-stamp
distclean: clean
- rm -f config.* configure sysdep/autoconf.h Makefile Rules
+ rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile Rules
rm -rf .dir-stamp $(clean-dirs)
bindir=@bindir@
sbindir=@sbindir@
sysconfdir=@sysconfdir@
+localstatedir=@localstatedir@
ifdef source