Revision f9254d23

View differences:

configure.in
144 144
BIRD_CHECK_STRUCT_IP_MREQN
145 145

  
146 146
if test "$enable_debug" = yes ; then
147
	AC_DEFINE(PATH_CONFIG_DIR, ".")
148
	AC_DEFINE(PATH_CONTROL_SOCKET_DIR, ".")
149 147
	AC_DEFINE(DEBUGGING)
150 148
	AC_CHECK_LIB(dmalloc, dmalloc_debug)
151 149
	if test $ac_cv_lib_dmalloc_dmalloc_debug != yes ; then
152 150
		AC_CHECK_LIB(efence, malloc)
153 151
	fi
154
else
155
	AC_DEFINE_UNQUOTED(PATH_CONFIG_DIR, "$sysconfdir")
156
	AC_DEFINE_UNQUOTED(PATH_CONTROL_SOCKET_DIR, "$localstatedir")
157 152
fi
158 153

  
159 154
CLIENT=
sysdep/autoconf.h.in
41 41
/* We have <syslog.h> and syslog() */
42 42
#undef HAVE_SYSLOG
43 43

  
44
/* Path to configuration files */
45
#define PATH_CONFIG_DIR ?
46

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

  
50 44
/* Are we using dmalloc? */
51 45
#undef HAVE_LIBDMALLOC
sysdep/config.h
17 17

  
18 18
#ifndef MACROS_ONLY
19 19

  
20
#include "sysdep/paths.h"
21

  
20 22
/* Types */
21 23
typedef signed INTEGER_8 s8;
22 24
typedef unsigned INTEGER_8 u8;
......
30 32
#endif
31 33

  
32 34
/* Path to configuration file */
35
#ifdef DEBUGGING
36
#define PATH_CONFIG "bird.conf"
37
#define PATH_CONTROL_SOCKET "bird.ctl"
38
#else
33 39
#define PATH_CONFIG PATH_CONFIG_DIR "/bird.conf"
34 40
#define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR "/bird.ctl"
41
#endif
35 42

  
36 43
#endif
tools/Makefile-top.in
12 12

  
13 13
distclean: clean
14 14
	rm -rf $(objdir)
15
	rm -f config.* configure sysdep/autoconf.h Makefile
15
	rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile
tools/Makefile.in
5 5

  
6 6
.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
7 7

  
8
all: .dep-stamp subdir daemon @CLIENT@
8
all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
9 9

  
10 10
daemon: $(exedir)/bird
11 11

  
......
34 34
userdocs progdocs: .dir-stamp
35 35
	$(MAKE) -C doc -f $(srcdir_abs)/doc/Makefile $@
36 36

  
37
sysdep/paths.h:
38
	echo >sysdep/paths.h "/* Generated by Makefile, don't edit manually! */"
39
	echo >>sysdep/paths.h "#define PATH_CONFIG_DIR \"$(sysconfdir)\""
40
	echo >>sysdep/paths.h "#define PATH_CONTROL_SOCKET_DIR \"$(localstatedir)\""
41

  
37 42
tags:
38 43
	cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
39 44

  
40 45
install: all
41
	$(INSTALL) -d $(sbindir) $(sysconfdir)
46
	$(INSTALL) -d $(sbindir) $(sysconfdir) $(localstatedir)
42 47
	$(INSTALL_PROGRAM) -s $(exedir)/bird $(sbindir)/
43 48
	if test -n "@CLIENT@" ; then								\
44 49
		$(INSTALL_PROGRAM) -s $(exedir)/birdc $(sbindir)/ ;				\
......
54 59
	rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl .dep-stamp
55 60

  
56 61
distclean: clean
57
	rm -f config.* configure sysdep/autoconf.h Makefile Rules
62
	rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile Rules
58 63
	rm -rf .dir-stamp $(clean-dirs)
tools/Rules.in
38 38
bindir=@bindir@
39 39
sbindir=@sbindir@
40 40
sysconfdir=@sysconfdir@
41
localstatedir=@localstatedir@
41 42

  
42 43
ifdef source
43 44

  

Also available in: Unified diff