Revision 54165b13

View differences:

configure.in
122 122

  
123 123
if test "$enable_debug" = yes ; then
124 124
	AC_DEFINE(PATH_CONFIG_DIR, ".")
125
	AC_DEFINE(PATH_CONTROL_SOCKET_DIR, ".")
125 126
	AC_DEFINE(DEBUGGING)
126 127
	AC_CHECK_LIB(dmalloc, dmalloc_debug)
127 128
	if test $ac_cv_lib_dmalloc_dmalloc_debug != yes ; then
......
129 130
	fi
130 131
else
131 132
	AC_DEFINE_UNQUOTED(PATH_CONFIG_DIR, "$sysconfdir")
133
	AC_DEFINE_UNQUOTED(PATH_CONTROL_SOCKET_DIR, "$localstatedir")
132 134
fi
133 135

  
134
AC_CONFIG_HEADER(sysdep/autoconf.h)
136
mkdir -p $objdir/sysdep
137
AC_CONFIG_HEADER($objdir/sysdep/autoconf.h:sysdep/autoconf.h.in)
135 138
AC_OUTPUT_COMMANDS(,[CPP="$CPP" $srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs])
136 139
AC_OUTPUT($makefiles)
137 140

  
sysdep/autoconf.h.in
44 44
/* Path to configuration files */
45 45
#define PATH_CONFIG_DIR ?
46 46

  
47
/* Path to control socket */
48
#define PATH_CONTROL_SOCKET_DIR ?
49

  
47 50
/* Are we using dmalloc? */
48 51
#undef HAVE_LIBDMALLOC
sysdep/config.h
39 39

  
40 40
/* Path to configuration file */
41 41
#define PATH_CONFIG PATH_CONFIG_DIR "/bird.conf"
42
#define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR "/bird.ctl"
42 43

  
43 44
#endif
tools/mergedirs
21 21
echo "Merging system-dependent modules ($@)"
22 22
MODULES=`for a in $@ ; do
23 23
		cat $SRCDIR/sysdep/config.h $SRCDIR/$a/Modules |
24
		$cpp -U unix -D MACROS_ONLY - |
24
		$cpp -U unix -D MACROS_ONLY -I $OBJDIR - |
25 25
		sed "/^[ ]*\$/d;/^#/d;s@\\(.*\\)@\\1 $a/\\1@"
26 26
		done |
27 27
	sort +0 -1 -u |

Also available in: Unified diff