? DEADJOE ? compile ? solaris-old ? doc/bgpd.8.html ? lib/DEADJOE ? lib/aaa-notes.txt ? vtysh/vtyd_main.c Index: configure.ac =================================================================== RCS file: /var/cvsroot/quagga/configure.ac,v retrieving revision 1.116 diff -u -p -r1.116 configure.ac --- configure.ac 26 Nov 2005 08:28:00 -0000 1.116 +++ configure.ac 1 Dec 2005 08:17:18 -0000 @@ -45,6 +45,31 @@ dnl XXX add --pkgsrcrcdir to autoconf st AC_SUBST(pkgsrcdir) AC_SUBST(pkgsrcrcdir) +dnl ------------------------------------- +dnl C and LD FLAGS which should only be used when +dnl compiling and linking objects for +dnl executables. E.g. -fpie and -pie +dnl ------------------------------------ +AC_ARG_WITH(prog_cflags, +[ --with-prog-cflags Set CFLAGS for compiling/linking executables.]) +if test "x${with_prog_cflags}" != "x"; then + PROG_CFLAGS="${with_prog_cflags}"; + prog_cflags_specified=yes ; +elif test -n "${PROG_CFLAGS}" ; then + prog_cflags_specified=yes; +fi +AC_ARG_VAR([PROG_CFLAGS],[Executable compile/linkage specific CFLAGS]) + +AC_ARG_WITH(prog_ldflags, +[ --with-prog-ldflags Set LDFLAGS for compiling/linking executables.]) +if test "x${with_prog_ldflags}" != "x"; then + PROG_LDFLAGS="${with_prog_ldflags}"; + prog_ldflags_specified=yes ; +elif test -n "${PROG_LDFLAGS}" ; then + prog_ldflags_specified=yes; +fi +AC_ARG_VAR([PROG_LDFLAGS],[Executable compile/linkage specific LDFLAGS]) + dnl ------------ dnl Check CFLAGS dnl ------------ @@ -1410,6 +1435,8 @@ host operationg system : ${host_os} source code location : ${srcdir} compiler : ${CC} compiler flags : ${CFLAGS} +exe compiler flags : ${PROG_CFLAGS} +exe linker flags : ${PROG_LDFLAGS} includes : ${INCLUDES} ${SNMP_INCLUDES} linker flags : ${LDFLAGS} ${LIBS} ${LIBCAP} ${LIBREADLINE} state file directory : ${quagga_statedir} Index: bgpd/Makefile.am =================================================================== RCS file: /var/cvsroot/quagga/bgpd/Makefile.am,v retrieving revision 1.8 diff -u -p -r1.8 Makefile.am --- bgpd/Makefile.am 10 Sep 2005 16:55:02 -0000 1.8 +++ bgpd/Makefile.am 1 Dec 2005 08:17:18 -0000 @@ -14,6 +14,9 @@ libbgp_a_SOURCES = \ bgp_dump.c bgp_snmp.c bgp_ecommunity.c bgp_mplsvpn.c bgp_nexthop.c \ bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c +libbgp_a_CFLAGS = $(PROG_CFLAGS) +libbgp_a_LDFLAGS = $(PROG_LDFLAGS) + noinst_HEADERS = \ bgp_aspath.h bgp_attr.h bgp_community.h bgp_debug.h bgp_fsm.h \ bgp_network.h bgp_open.h bgp_packet.h bgp_regex.h bgp_route.h \ @@ -23,6 +26,8 @@ noinst_HEADERS = \ bgpd_SOURCES = bgp_main.c bgpd_LDADD = libbgp.a ../lib/libzebra.la @LIBCAP@ +bgpd_CFLAGS = $(PROG_CFLAGS) +bgpd_LDFLAGS = $(PROG_LDFLAGS) examplesdir = $(exampledir) dist_examples_DATA = bgpd.conf.sample bgpd.conf.sample2 Index: isisd/Makefile.am =================================================================== RCS file: /var/cvsroot/quagga/isisd/Makefile.am,v retrieving revision 1.8 diff -u -p -r1.8 Makefile.am --- isisd/Makefile.am 10 Apr 2005 15:58:10 -0000 1.8 +++ isisd/Makefile.am 1 Dec 2005 08:17:18 -0000 @@ -15,6 +15,8 @@ libisis_a_SOURCES = \ isis_flags.c isis_dynhn.c iso_checksum.c isis_csm.c isis_events.c \ isis_spf.c isis_route.c isis_routemap.c +libisis_a_CFLAGS = $(PROG_CFLAGS) +libisis_a_LDFLAGS = $(PROG_LDFLAGS) noinst_HEADERS = \ isisd.h isis_pdu.h isis_tlv.h isis_adjacency.h isis_constants.h \ @@ -23,10 +25,11 @@ noinst_HEADERS = \ iso_checksum.h isis_csm.h isis_events.h isis_spf.h isis_route.h \ include-netbsd/clnp.h include-netbsd/esis.h include-netbsd/iso.h -isisd_SOURCES = \ - isis_main.c $(libisis_a_SOURCES) +isisd_SOURCES = isis_main.c -isisd_LDADD = @ISIS_TOPOLOGY_LIB@ ../lib/libzebra.la @LIBCAP@ +isisd_LDADD = libisis.a @ISIS_TOPOLOGY_LIB@ ../lib/libzebra.la @LIBCAP@ +isisd_LDFLAGS = $(PROG_LDFLAGS) +isisd_CFLAGS = $(PROG_CFLAGS) examplesdir = $(exampledir) dist_examples_DATA = isisd.conf.sample Index: lib/Makefile.am =================================================================== RCS file: /var/cvsroot/quagga/lib/Makefile.am,v retrieving revision 1.25 diff -u -p -r1.25 Makefile.am --- lib/Makefile.am 3 Nov 2005 09:00:23 -0000 1.25 +++ lib/Makefile.am 1 Dec 2005 08:17:18 -0000 @@ -4,7 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdi DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" lib_LTLIBRARIES = libzebra.la -libzebra_la_LDFLAGS = -version 0:0:0 +libzebra_la_LDFLAGS = -version 0:1:0 libzebra_la_SOURCES = \ network.c pid_output.c getopt.c getopt1.c daemon.c \ Index: lib/command.h =================================================================== RCS file: /var/cvsroot/quagga/lib/command.h,v retrieving revision 1.21 diff -u -p -r1.21 command.h --- lib/command.h 3 Nov 2005 09:00:23 -0000 1.21 +++ lib/command.h 1 Dec 2005 08:17:19 -0000 @@ -169,20 +169,21 @@ struct desc /* helper defines for end-user DEFUN* macros */ #define DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, attrs, dnum) \ - struct cmd_element cmdname = \ + struct cmd_element (cmdname) = \ { \ - .string = cmdstr, \ - .func = funcname, \ - .doc = helpstr, \ - .attr = attrs, \ - .daemon = dnum, \ + .string = (cmdstr), \ + .func = (funcname), \ + .doc = (helpstr), \ + .attr = (attrs), \ + .daemon = (dnum), \ }; #define DEFUN_CMD_FUNC_DECL(funcname) \ - static int funcname (struct cmd_element *, struct vty *, int, const char *[]); + static int (funcname) \ + (struct cmd_element *, struct vty *, int, const char *[]); #define DEFUN_CMD_FUNC_TEXT(funcname) \ - static int funcname \ + static int (funcname) \ (struct cmd_element *self, struct vty *vty, int argc, const char *argv[]) /* DEFUN for vty command interafce. Little bit hacky ;-). */ Index: ospf6d/Makefile.am =================================================================== RCS file: /var/cvsroot/quagga/ospf6d/Makefile.am,v retrieving revision 1.11 diff -u -p -r1.11 Makefile.am --- ospf6d/Makefile.am 28 Mar 2005 15:29:07 -0000 1.11 +++ ospf6d/Makefile.am 1 Dec 2005 08:17:19 -0000 @@ -14,6 +14,9 @@ libospf6_a_SOURCES = \ ospf6_spf.c ospf6_proto.c ospf6_asbr.c ospf6_abr.c ospf6_snmp.c \ ospf6d.c +libospf6_a_CFLAGS = $(PROG_CFLAGS) +libospf6_a_LDFLAGS = $(PROG_LDFLAGS) + noinst_HEADERS = \ ospf6_network.h ospf6_message.h ospf6_lsa.h ospf6_lsdb.h \ ospf6_top.h ospf6_area.h ospf6_interface.h ospf6_neighbor.h \ @@ -21,10 +24,12 @@ noinst_HEADERS = \ ospf6_spf.h ospf6_proto.h ospf6_asbr.h ospf6_abr.h ospf6_snmp.h \ ospf6d.h -ospf6d_SOURCES = \ - ospf6_main.c $(libospf6_a_SOURCES) -ospf6d_LDADD = ../lib/libzebra.la @LIBCAP@ +ospf6d_SOURCES = ospf6_main.c + +ospf6d_LDADD = libospf6.a ../lib/libzebra.la @LIBCAP@ +ospf6d_LDFLAGS = $(PROG_LDFLAGS) +ospf6d_CFLAGS = $(PROG_CFLAGS) examplesdir = $(exampledir) dist_examples_DATA = ospf6d.conf.sample Index: ospfd/Makefile.am =================================================================== RCS file: /var/cvsroot/quagga/ospfd/Makefile.am,v retrieving revision 1.13 diff -u -p -r1.13 Makefile.am --- ospfd/Makefile.am 28 Mar 2005 15:29:07 -0000 1.13 +++ ospfd/Makefile.am 1 Dec 2005 08:17:19 -0000 @@ -5,7 +5,7 @@ DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR INSTALL_SDATA=@INSTALL@ -m 600 lib_LTLIBRARIES = libospf.la -libospf_la_LDFLAGS = -version 0:0:0 +libospf_la_LDFLAGS = -release @PACKAGE_VERSION@ sbin_PROGRAMS = ospfd @@ -28,7 +28,8 @@ noinst_HEADERS = \ ospf_flood.h ospf_snmp.h ospf_te.h ospf_vty.h ospf_apiserver.h ospfd_SOURCES = ospf_main.c - +ospfd_CFLAGS = $(PROG_CFLAGS) +ospfd_LDFLAGS = $(PROG_LDFLAGS) ospfd_LDADD = libospf.la ../lib/libzebra.la @LIBCAP@ EXTRA_DIST = OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt Index: ospfd/ospf_ism.c =================================================================== RCS file: /var/cvsroot/quagga/ospfd/ospf_ism.c,v retrieving revision 1.12 diff -u -p -r1.12 ospf_ism.c --- ospfd/ospf_ism.c 21 Oct 2005 00:45:17 -0000 1.12 +++ ospfd/ospf_ism.c 1 Dec 2005 08:17:19 -0000 @@ -520,7 +520,7 @@ struct { }, }; -const static char *ospf_ism_event_str[] = +static const char *ospf_ism_event_str[] = { "NoEvent", "InterfaceUp", @@ -639,4 +639,3 @@ ospf_ism_event (struct thread *thread) return 0; } - Index: ospfd/ospf_nsm.c =================================================================== RCS file: /var/cvsroot/quagga/ospfd/ospf_nsm.c,v retrieving revision 1.13 diff -u -p -r1.13 ospf_nsm.c --- ospfd/ospf_nsm.c 21 Oct 2005 00:45:17 -0000 1.13 +++ ospfd/ospf_nsm.c 1 Dec 2005 08:17:19 -0000 @@ -647,7 +647,7 @@ struct { }, }; -const static char *ospf_nsm_event_str[] = +static const char *ospf_nsm_event_str[] = { "NoEvent", "HelloReceived", Index: ripd/Makefile.am =================================================================== RCS file: /var/cvsroot/quagga/ripd/Makefile.am,v retrieving revision 1.8 diff -u -p -r1.8 Makefile.am --- ripd/Makefile.am 28 Oct 2005 10:23:09 -0000 1.8 +++ ripd/Makefile.am 1 Dec 2005 08:17:19 -0000 @@ -11,13 +11,17 @@ librip_a_SOURCES = \ ripd.c rip_zebra.c rip_interface.c rip_debug.c rip_snmp.c \ rip_routemap.c rip_peer.c rip_offset.c +librip_a_CFLAGS = $(PROG_CFLAGS) +librip_a_LDFLAGS = $(PROG_LDFLAGS) + noinst_HEADERS = \ ripd.h rip_debug.h rip_interface.h -ripd_SOURCES = \ - rip_main.c $(librip_a_SOURCES) +ripd_SOURCES = rip_main.c -ripd_LDADD = ../lib/libzebra.la @LIBCAP@ +ripd_LDADD = librip.a ../lib/libzebra.la @LIBCAP@ +ripd_LDFLAGS = $(PROG_LDFLAGS) +ripd_CFLAGS = $(PROG_CFLAGS) examplesdir = $(exampledir) dist_examples_DATA = ripd.conf.sample Index: ripngd/Makefile.am =================================================================== RCS file: /var/cvsroot/quagga/ripngd/Makefile.am,v retrieving revision 1.10 diff -u -p -r1.10 Makefile.am --- ripngd/Makefile.am 28 Mar 2005 15:29:07 -0000 1.10 +++ ripngd/Makefile.am 1 Dec 2005 08:17:19 -0000 @@ -11,13 +11,18 @@ libripng_a_SOURCES = \ ripng_interface.c ripngd.c ripng_zebra.c ripng_route.c ripng_debug.c \ ripng_routemap.c ripng_offset.c ripng_peer.c ripng_nexthop.c +libripng_a_CFLAGS = $(PROG_CFLAGS) +libripng_a_LDFLAGS = $(PROG_LDFLAGS) + noinst_HEADERS = \ ripng_debug.h ripng_route.h ripngd.h ripng_nexthop.h -ripngd_SOURCES = \ - ripng_main.c $(libripng_a_SOURCES) +ripngd_SOURCES = ripng_main.c + +ripngd_LDADD = libripng.a ../lib/libzebra.la @LIBCAP@ -ripngd_LDADD = ../lib/libzebra.la @LIBCAP@ +ripngd_CFLAGS = $(PROG_CFLAGS) +ripngd_LDFLAGS = $(PROG_LDFLAGS) examplesdir = $(exampledir) dist_examples_DATA = ripngd.conf.sample Index: zebra/Makefile.am =================================================================== RCS file: /var/cvsroot/quagga/zebra/Makefile.am,v retrieving revision 1.12 diff -u -p -r1.12 Makefile.am --- zebra/Makefile.am 24 Nov 2005 15:15:17 -0000 1.12 +++ zebra/Makefile.am 1 Dec 2005 08:17:19 -0000 @@ -7,6 +7,12 @@ INSTALL_SDATA=@INSTALL@ -m 600 LIB_IPV6 = @LIB_IPV6@ LIBCAP = @LIBCAP@ +# this is wrong I think, it only works because we have no shared libs +# here are at all. But it seems to be only way to get +# $(PROG_CFLAGS) to apply to the conditional sources of zebra. +AM_CFLAGS = $(PROG_CFLAGS) +AM_LDFLAGS = $(PROG_LDFLAGS) + ipforward = @IPFORWARD@ if_method = @IF_METHOD@ if_proc = @IF_PROC@ @@ -19,6 +25,15 @@ ioctl_method = @IOCTL_METHOD@ otherobj = $(ioctl_method) $(ipforward) $(if_method) $(if_proc) \ $(rt_method) $(rtread_method) $(kernel_method) $(other_method) +#noinst_LIBRARIES = libkernel.a + +#libkernel_a_SOURCES = $(otherobj) +#libkernel_a_SOURCES = @IPFORWARD@ @IF_METHOD@ @IF_PROC@ @RT_METHOD@ \ +# @RTREAD_METHOD@ @KERNEL_METHOD@ @OTHER_METHOD@ @IOCTL_METHOD@ + +#libkernel_a_CFLAGS = $(PROG_CFLAGS) +#libkernel_a_LDFLAGS = $(PROG_LDFLAGS) + sbin_PROGRAMS = zebra zebra_SOURCES = \ @@ -30,20 +45,28 @@ noinst_HEADERS = \ connected.h ioctl.h rib.h rt.h zserv.h redistribute.h debug.h rtadv.h \ interface.h ipforward.h irdp.h router-id.h kernel_socket.h -zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la - zebra_DEPENDENCIES = $(otherobj) -EXTRA_DIST = if_ioctl.c if_ioctl_solaris.c if_netlink.c if_proc.c \ +EXTRA_zebra_SOURCES = if_ioctl.c if_ioctl_solaris.c if_netlink.c if_proc.c \ if_sysctl.c ipforward_aix.c ipforward_ews.c ipforward_proc.c \ ipforward_solaris.c ipforward_sysctl.c rt_ioctl.c rt_netlink.c \ rt_socket.c rtread_netlink.c rtread_proc.c rtread_sysctl.c \ rtread_getmsg.c kernel_socket.c kernel_netlink.c mtu_kvm.c \ - ioctl.c ioctl_solaris.c \ - GNOME-SMI GNOME-PRODUCT-ZEBRA-MIB + ioctl.c ioctl_solaris.c + +zebra_LDADD = $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la \ + @IPFORWARD@ @IF_METHOD@ @IF_PROC@ @RT_METHOD@ \ + @RTREAD_METHOD@ @KERNEL_METHOD@ @OTHER_METHOD@ @IOCTL_METHOD@ + +zebra_CFLAGS = $(PROG_CFLAGS) +zebra_LDFLAGS = $(PROG_LDFLAGS) + +EXTRA_DIST = GNOME-SMI GNOME-PRODUCT-ZEBRA-MIB -#client : client_main.o ../lib/libzebra.la -# $(CC) -g -o client client_main.o ../liblzebra.la $(LIBS) $(LIB_IPV6) +#zebraclient_SOURCES = client_main.c +#zebraclient_LDADD = ../lib/libzebra.la $(LIBCAP) $(LIBS) $(LIB_IPV6) +#zebraclient_CFLAGS = $(PROG_CFLAGS) +#zebraclient_LDFLAGS = $(PROG_LDFLAGS) quaggaconfdir = $(sysconfdir) Index: zebra/client_main.c =================================================================== RCS file: /var/cvsroot/quagga/zebra/client_main.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 client_main.c --- zebra/client_main.c 13 Dec 2002 20:15:30 -0000 1.1.1.1 +++ zebra/client_main.c 1 Dec 2005 08:17:19 -0000 @@ -41,7 +41,7 @@ struct zclient *zclient = NULL; int sock; /* IPv4 route add and delete test. */ -void +static void zebra_test_ipv4 (int command, int type, char *prefix, char *gateway, u_char distance) { @@ -68,21 +68,12 @@ zebra_test_ipv4 (int command, int type, api.distance = distance; } - - switch (command) - { - case ZEBRA_IPV4_ROUTE_ADD: - zapi_ipv4_add (zclient, &p, &api); - break; - case ZEBRA_IPV4_ROUTE_DELETE: - zapi_ipv4_delete (zclient, &p, &api); - break; - } + zapi_ipv4_route (command, zclient, &p, &api); } #ifdef HAVE_IPV6 /* IPv6 route add and delete test. */ -void +static void zebra_test_v6 (int sock) { struct prefix_ipv6 p; @@ -99,7 +90,7 @@ zebra_test_v6 (int sock) #endif /* HAVE_IPV6 */ /* Print out usage and exit. */ -void +static void usage_exit () { fprintf (stderr, "Usage: client filename\n"); @@ -122,7 +113,7 @@ struct zebra_info }; /* Zebra route simulator. */ -void +static void zebra_sim (FILE *fp) { char buf[BUFSIZ];