[passepartout] support the -Wl,--as-needed linker flag



commit b3861c3395f91bbb939c65adacdea9ce72cd7746
Author: Sven Herzberg <herzi lanedo com>
Date:   Wed Apr 29 10:50:33 2009 +0200

    support the -Wl,--as-needed linker flag
    
    * configure.ac: explicitly add fontconfig to the freetype stuff
    * src/pptout/Makefile.am,
    * src/ps/Makefile.am,
    * src/xml2ps/Makefile.am: properly order the libraries so we even support this
      linker flag
---
 configure.ac           |    2 +-
 src/pptout/Makefile.am |    9 ++++-----
 src/ps/Makefile.am     |    7 +++++--
 src/xml2ps/Makefile.am |    6 ++++--
 4 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 87615d1..215f180 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ AC_APPLY_RPATH([GTHREAD_LIBS])
 
 AC_SUBST([FREETYPE_LIBS])
 AC_SUBST([FREETYPE_CFLAGS])
-PKG_CHECK_MODULES([FREETYPE], [freetype2])
+PKG_CHECK_MODULES([FREETYPE], [freetype2 fontconfig])
 AC_APPLY_RPATH([FREETYPE_LIBS])
 
 # gnome is optional
diff --git a/src/pptout/Makefile.am b/src/pptout/Makefile.am
index e665595..7eb931b 100644
--- a/src/pptout/Makefile.am
+++ b/src/pptout/Makefile.am
@@ -46,14 +46,13 @@ passepartout_CPPFLAGS = -I$(top_srcdir)/src -D'XMLPATH=$(xmldir)'
 passepartout_CPPFLAGS += $(XMLPP_CFLAGS) $(GTKMM_CFLAGS) $(GNOMECANVAS_CFLAGS) \
 	$(GNOME_CFLAGS) $(GNOMEVFS_CFLAGS) $(WARN_CFLAGS)
 
-passepartout_LDADD = $(XMLPP_LIBS) $(GTKMM_LIBS) $(GNOMECANVAS_LIBS) \
-		$(GTHREAD_LIBS) $(GNOME_LIBS) $(GNOMEVFS_LIBS)
-
 pptpartlibs= document/libdocument.a ../xml2ps/libxml2ps.a	\
 	../fonts/libfonts.a ../ps/libps.a			\
 	../util/libpptutil.a widget/libwidget.a
-
-passepartout_LDADD += $(pptpartlibs)
+passepartout_LDADD=\
+	$(pptpartlibs) \
+	$(XMLPP_LIBS) $(GTKMM_LIBS) $(GNOMECANVAS_LIBS) \
+	$(GTHREAD_LIBS) $(GNOME_LIBS) $(GNOMEVFS_LIBS)
 
 # Extra dependencies for builddate, so it is rebuilt every time anything else
 # is rebuilt
diff --git a/src/ps/Makefile.am b/src/ps/Makefile.am
index 6cf5595..0c721b5 100644
--- a/src/ps/Makefile.am
+++ b/src/ps/Makefile.am
@@ -15,8 +15,11 @@ libps_a_CPPFLAGS = -I$(top_srcdir)/src
 libps_a_CPPFLAGS += $(GTKMM_CFLAGS) $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
 
 examinepdf_CPPFLAGS = $(libps_a_CPPFLAGS) $(WARN_CFLAGS)
-examinepdf_LDADD = $(GTKMM_LIBS) \
-	-L. -lps -L../fonts -lfonts -lps -L../util -lpptutil
+examinepdf_LDADD=\
+	libps.a -L../fonts -lfonts libps.a -L../util -lpptutil \
+	$(FREETYPE_LIBS) \
+	$(GTKMM_LIBS) \
+	$(NULL)
 examinepdf_DEPENDENCIES = libps.a
 
 #libps_a_LIBADD = $(GTKMM_LIBS)
diff --git a/src/xml2ps/Makefile.am b/src/xml2ps/Makefile.am
index 2927097..08c8bf8 100644
--- a/src/xml2ps/Makefile.am
+++ b/src/xml2ps/Makefile.am
@@ -20,8 +20,10 @@ libxml2ps_a_CPPFLAGS += $(XMLPP_CFLAGS) $(GTKMM_CFLAGS)	\
 
 xml2ps_CPPFLAGS = $(libxml2ps_a_CPPFLAGS) $(WARN_CFLAGS)
 
-xml2ps_LDADD = $(XMLPP_LIBS) $(GTKMM_LIBS) $(GNOMECANVAS_LIBS)\
-	libxml2ps.a ../fonts/libfonts.a ../ps/libps.a ../util/libpptutil.a 
+xml2ps_LDADD=\
+	libxml2ps.a ../fonts/libfonts.a ../ps/libps.a ../util/libpptutil.a \
+	$(XMLPP_LIBS) $(GTKMM_LIBS) $(GNOMECANVAS_LIBS) \
+	$(NULL)
 
 #install DTDs and XSLTs in $(datadir)/xml/passepartout/ (xmldir is defined in configure.ac)
 dist_xml_DATA=\



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]