]> git.puffer.fish Git - mirror/frr.git/commitdiff
Add support for --enable-exampledir to specify where to place example
authorgdt <gdt>
Wed, 3 Dec 2003 17:24:27 +0000 (17:24 +0000)
committergdt <gdt>
Wed, 3 Dec 2003 17:24:27 +0000 (17:24 +0000)
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.

ChangeLog
bgpd/Makefile.am
configure.ac
ospf6d/Makefile.am
ospfd/Makefile.am
ripd/Makefile.am
ripngd/Makefile.am
vtysh/Makefile.am
zebra/Makefile.am

index 1d837633d57a927b685d1d34126f82d8319c286e..e31d0c6caf46a77f094db7c6ba0d7343d1d7f8c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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'
index 3559652c1c1b7ddc8b1ce99a81546c6238c3e6db..9cb3a90fd04d2d1e9ce5f5949031f608c656dd2b 100644 (file)
@@ -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
 
index 18db49398cc799b00cc411857c373f7bdcc749ed..ef24dc00f21f932f2e1161b61463579c2a3022d4 100755 (executable)
@@ -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}
index 115b8196705b5d0a369ed2f054d6ee2fe2f151f6..14b87af46d30a6cba7e3698553b08a3ffbae5531 100644 (file)
@@ -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
index 93b80aedb62b9b37356344c870e3dbc00f652e7e..f687ea9af5ef312e9a8b744fcb6e831394aac0ee 100644 (file)
@@ -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
 
index ab6313453b2b70f99c140d09ac03cf016f1b5fa1..505f7b7c38ddb10b6c66bdcee28233bc5e4d4552 100644 (file)
@@ -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
 
index 2e6c677413a8d8982311e918f7f98f08a9d50355..ecd71f8ab7e4b84fcce49739ff83f260141f7782 100644 (file)
@@ -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
 
index b5f964e5f1d0d87d73f6a286e3c02b9351cba91f..95f8f7f42caf0c815152a599fb15899166718400 100644 (file)
@@ -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
index d449fe16b7402e6ac8669cecd3e2c9e4e6b9bc4d..6f8e95429c3b966183352101c45c16b1dc28b491 100644 (file)
@@ -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