* Remove the old change from '08 to add in PIE arguments at automake level.
Versions of libtool since then know how to deal with -fpie and do the right
thing according to whether its building shared or executable objects.
So just pass '-fpie' as CFLAG and let libtool do its thing.
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
INSTALL_SDATA=@INSTALL@ -m 600
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
noinst_LIBRARIES = libbgp.a
sbin_PROGRAMS = bgpd
dnl -------
dnl libtool
dnl -------
-AC_PROG_LIBTOOL
+LT_INIT
dnl ----------------------
dnl Packages configuration
CONFDATE=`date '+%Y%m%d'`
AC_SUBST(CONFDATE)
-dnl Conditionally enable PIE support for GNU toolchains.
-AC_ARG_ENABLE(pie, AS_HELP_STRING([--disable-pie], [Do not build tools as a Position Independent Executables]))
-if test "$enable_pie" != "no"; then
- AC_CACHE_CHECK([whether $CC accepts PIE flags], [ap_cv_cc_pie], [
- save_CFLAGS=$CFLAGS
- save_LDFLAGS=$LDFLAGS
- CFLAGS="$CFLAGS -fPIE"
- LDFLAGS="$LDFLAGS -pie"
- AC_LINK_IFELSE([AC_LANG_SOURCE([[static int foo[30000]; int main () { return 0; }]])],
- [ap_cv_cc_pie=yes], [ap_cv_cc_pie=no]
- )
- CFLAGS=$save_CFLAGS
- LDFLAGS=$save_LDFLAGS
- ])
- if test "$ap_cv_cc_pie" = "yes"; then
- PICFLAGS="-fPIE"
- PILDFLAGS="-pie"
- fi
-fi
-
-AC_SUBST(PICFLAGS)
-AC_SUBST(PILDFLAGS)
-
dnl -------
dnl DejaGNU
dnl -------
INSTALL_SDATA=@INSTALL@ -m 600
LIBS = @LIBS@
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
noinst_LIBRARIES = libisis.a
sbin_PROGRAMS = isisd
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
INSTALL_SDATA=@INSTALL@ -m 600
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
noinst_LIBRARIES = libospf6.a
sbin_PROGRAMS = ospf6d
ospfclient_LDADD = libospfapiclient.la \
../ospfd/libospf.la ../lib/libzebra.la @LIBCAP@
-ospfclient_CFLAGS = $(AM_CFLAGS) $(PICFLAGS)
-ospfclient_LDFLAGS = $(AM_LDFLAGS) $(PILDFLAGS)
-
+ospfclient_CFLAGS = $(AM_CFLAGS)
+ospfclient_LDFLAGS = $(AM_LDFLAGS)
INSTALL_SDATA=@INSTALL@ -m 600
LIBS = @LIBS@
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
noinst_LIBRARIES = libpim.a
sbin_PROGRAMS = pimd
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
INSTALL_SDATA=@INSTALL@ -m 600
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
noinst_LIBRARIES = librip.a
sbin_PROGRAMS = ripd
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
INSTALL_SDATA=@INSTALL@ -m 600
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
noinst_LIBRARIES = libripng.a
sbin_PROGRAMS = ripngd
INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\"
-AM_CFLAGS = $(PICFLAGS)
-AM_LDFLAGS = $(PILDFLAGS)
-
if BGPD
TESTS_BGPD = aspathtest testbgpcap ecommtest testbgpmpattr testbgpmpath
DEJATOOL += bgpd
LIBS = @LIBS@ @CURSES@ @LIBPAM@
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
bin_PROGRAMS = vtysh
INCLUDES = @INCLUDES@ -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
DEFS = @DEFS@ -DSTATEDIR=\"$(localstatedir)/\"
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
sbin_PROGRAMS = watchquagga
othersrc = zebra_fpm_netlink.c
endif
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
sbin_PROGRAMS = zebra