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.
This commit is contained in:
gdt 2003-12-03 17:24:27 +00:00
parent 6c110e700c
commit d6b72f7ab1
9 changed files with 33 additions and 8 deletions

View File

@ -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'

View 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

View File

@ -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}

View 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

View 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

View 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

View 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

View 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

View 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