summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-08 14:19:47 +0000
committerMartin Mares <mj@ucw.cz>2000-05-08 14:19:47 +0000
commitf9254d2349c7e2e3c110f7850e402d1c11624940 (patch)
treeaf9ae9a6b2ca0107f4a02929fc9e332558b9e0ad /sysdep
parent0bf7386b33fecac40be43f8db5b0ba0356123fd2 (diff)
Autoconf is *evil*. The sysconfdir and similar variables are unusable in
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.
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/autoconf.h.in6
-rw-r--r--sysdep/config.h7
2 files changed, 7 insertions, 6 deletions
diff --git a/sysdep/autoconf.h.in b/sysdep/autoconf.h.in
index 8d2ebf38..ca86ff43 100644
--- a/sysdep/autoconf.h.in
+++ b/sysdep/autoconf.h.in
@@ -41,11 +41,5 @@
/* 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
diff --git a/sysdep/config.h b/sysdep/config.h
index 2b4a49d7..276929e2 100644
--- a/sysdep/config.h
+++ b/sysdep/config.h
@@ -17,6 +17,8 @@
#ifndef MACROS_ONLY
+#include "sysdep/paths.h"
+
/* Types */
typedef signed INTEGER_8 s8;
typedef unsigned INTEGER_8 u8;
@@ -30,7 +32,12 @@ typedef u16 word;
#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