diff options
author | gdt <gdt> | 2003-12-03 17:24:27 +0000 |
---|---|---|
committer | gdt <gdt> | 2003-12-03 17:24:27 +0000 |
commit | d6b72f7ab1d33a43e1b6d5cd3410ac53e3bf74a9 (patch) | |
tree | e2b2a025757c52802bc12a4b6b8eec94d4bcdd79 | |
parent | 6c110e700c21ef3d1d958da1df54261960d7ef07 (diff) |
Add support for --enable-exampledir to specify where to place example
files, defaulting to sysconfdir (matching previous behavior).
This is needed to support (cleanly) NetBSD pkgsrc, which requires that
example config files go in $(prefix)/share/examples/pkgname, rather
than in $(prefix)/etc/pkgname.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | bgpd/Makefile.am | 3 | ||||
-rwxr-xr-x | configure.ac | 10 | ||||
-rw-r--r-- | ospf6d/Makefile.am | 3 | ||||
-rw-r--r-- | ospfd/Makefile.am | 3 | ||||
-rw-r--r-- | ripd/Makefile.am | 3 | ||||
-rw-r--r-- | ripngd/Makefile.am | 3 | ||||
-rw-r--r-- | vtysh/Makefile.am | 5 | ||||
-rw-r--r-- | zebra/Makefile.am | 4 |
9 files changed, 33 insertions, 8 deletions
@@ -1,3 +1,10 @@ +2003-12-03 Greg Troxel <gdt@poblano.ir.bbn.com> + + * configure.ac: Add --enable-exampledir to specify where example + config files should go, defaulting to sysconfdir. + + * */Makefile.am: use exampledir instead of sysconfdif for examples + 2003-11-02 Paul Jakma <paul@dishone.st> * bgpd/bgp_routemap.c: Fix up 'set ip next-hop A.B.C.D|peer-address' diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am index 3559652c..9cb3a90f 100644 --- a/bgpd/Makefile.am +++ b/bgpd/Makefile.am @@ -26,7 +26,8 @@ bgpd_SOURCES = \ bgpd_LDADD = ../lib/libzebra.a @LIBCAP@ -dist_sysconf_DATA = bgpd.conf.sample bgpd.conf.sample2 +examplesdir = $(exampledir) +dist_examples_DATA = bgpd.conf.sample bgpd.conf.sample2 EXTRA_DIST = BGP4-MIB.txt diff --git a/configure.ac b/configure.ac index 18db4939..ef24dc00 100755 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,15 @@ AC_CONFIG_SRCDIR(lib/zebra.h) AM_INIT_AUTOMAKE() AM_CONFIG_HEADER(config.h) +dnl default is to match previous behavior +exampledir='${sysconfdir}' +AC_ARG_ENABLE([exampledir], + AC_HELP_STRING([--enable-exampledir], + [specify alternate directory for examples]), + exampledir="$enableval",) +dnl XXX hook into argument processing +AC_SUBST(exampledir) + dnl ----------------------------------- dnl Get hostname and other information. dnl ----------------------------------- @@ -1056,6 +1065,7 @@ compiler flags : ${CFLAGS} linker flags : ${LDFLAGS} ${LIBS} state file directory : ${quagga_statedir} config file directory : `eval echo \`echo ${sysconfdir}\`` +example directory : `eval echo \`echo ${exampledir}\`` user to run as : ${enable_user} group to run as : ${enable_group} group for vty sockets : ${enable_vty_group} diff --git a/ospf6d/Makefile.am b/ospf6d/Makefile.am index 115b8196..14b87af4 100644 --- a/ospf6d/Makefile.am +++ b/ospf6d/Makefile.am @@ -30,4 +30,5 @@ ospf6d_SOURCES = \ ospf6d_LDADD = -L../lib -lzebra @LIBCAP@ -dist_sysconf_DATA = ospf6d.conf.sample +examplesdir = $(exampledir) +dist_examples_DATA = ospf6d.conf.sample diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am index 93b80aed..f687ea9a 100644 --- a/ospfd/Makefile.am +++ b/ospfd/Makefile.am @@ -32,5 +32,6 @@ ospfd_LDADD = -L../lib -lzebra @LIBCAP@ EXTRA_DIST = OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt -dist_sysconf_DATA = ospfd.conf.sample +examplesdir = $(exampledir) +dist_examples_DATA = ospfd.conf.sample diff --git a/ripd/Makefile.am b/ripd/Makefile.am index ab631345..505f7b7c 100644 --- a/ripd/Makefile.am +++ b/ripd/Makefile.am @@ -19,7 +19,8 @@ ripd_SOURCES = \ ripd_LDADD = -L../lib -lzebra @LIBCAP@ -dist_sysconf_DATA = ripd.conf.sample +examplesdir = $(exampledir) +dist_examples_DATA = ripd.conf.sample EXTRA_DIST = RIPv2-MIB.txt diff --git a/ripngd/Makefile.am b/ripngd/Makefile.am index 2e6c6774..ecd71f8a 100644 --- a/ripngd/Makefile.am +++ b/ripngd/Makefile.am @@ -19,5 +19,6 @@ ripngd_SOURCES = \ ripngd_LDADD = -L../lib -lzebra @LIBCAP@ -dist_sysconf_DATA = ripngd.conf.sample +examplesdir = $(exampledir) +dist_examples_DATA = ripngd.conf.sample diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index b5f964e5..95f8f7f4 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -12,9 +12,10 @@ nodist_vtysh_SOURCES = vtysh_cmd.c noinst_HEADERS = vtysh.h vtysh_user.h vtysh_LDADD = ../lib/libzebra.a @LIBCAP@ -sysconf_DATA = vtysh.conf.sample +examplesdir = $(exampledir) +dist_examples_DATA = vtysh.conf.sample -EXTRA_DIST = extract.pl vtysh.conf.sample +EXTRA_DIST = extract.pl rebuild4: ./extract.pl $(top_srcdir)/zebra/*.c $(top_srcdir)/ripd/*.c $(top_srcdir)/ospfd/*.c $(top_srcdir)/bgpd/*.c $(top_srcdir)/lib/keychain.c $(top_srcdir)/lib/routemap.c $(top_srcdir)/lib/filter.c $(top_srcdir)/lib/plist.c $(top_srcdir)/lib/distribute.c $(top_srcdir)/lib/if_rmap.c > vtysh_cmd.c diff --git a/zebra/Makefile.am b/zebra/Makefile.am index d449fe16..6f8e9542 100644 --- a/zebra/Makefile.am +++ b/zebra/Makefile.am @@ -43,4 +43,6 @@ EXTRA_DIST = if_ioctl.c if_netlink.c if_proc.c if_sysctl.c \ # $(CC) -g -o client client_main.o ../lib/libzebra.a $(LIBS) $(LIB_IPV6) quaggaconfdir = $(sysconfdir) -dist_quaggaconf_DATA = zebra.conf.sample + +examplesdir = $(exampledir) +dist_examples_DATA = zebra.conf.sample |