Description: fix build with ld --as-needed use autoconf PKG_CHECK_MODULES to get the pango libraries direct usage of "pkg-config --libs pangoft2" is not accepted in LDADD by automake Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/paps/+bug/771131 Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3347031&group_id=153049&atid=786239 Author: Julian Taylor --- a/configure.in +++ b/configure.in @@ -18,4 +18,6 @@ DX_INIT_DOXYGEN(libpaps, doxygen.cfg, doxygen-doc) +PKG_CHECK_MODULES([PANGO], [pangoft2]) + AC_OUTPUT(Makefile src/Makefile) --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,27 +1,26 @@ man_MANS = paps.1 lib_LTLIBRARIES = libpaps.la libpaps_la_SOURCES = libpaps.c +libpaps_la_LIBADD = -lfreetype -lglib-2.0 $(PANGO_LIBS) libpapsinc_HEADERS = libpaps.h libpapsincdir = $(includedir) bin_PROGRAMS = paps paps_CFLAGS = -Wall paps_SOURCES = paps.c -paps_LDADD = $(lib_LTLIBRARIES) $(all_libraries) -paps_LDFLAGS = `pkg-config --libs pangoft2` +paps_LDADD = $(lib_LTLIBRARIES) $(all_libraries) $(PANGO_LIBS) paps_DEPENDENCIES = $(lib_LTLIBRARIES) EXTRA_DIST = test_libpaps.c paps.1 # set the include path found by configure -INCLUDES= $(all_includes) `pkg-config --cflags pangoft2` +INCLUDES= $(all_includes) $(PANGO_CFLAGS) # Test program noinst_PROGRAMS = test_libpaps test_libpaps_SOURCES = test_libpaps.c -test_libpaps_LDADD = $(lib_LTLIBRARIES) $(all_libraries) -test_libpaps_LDFLAGS = `pkg-config --libs pangoft2` +test_libpaps_LDADD = $(lib_LTLIBRARIES) $(all_libraries) $(PANGO_LIBS) test_libpaps_DEPENDENCIES = $(lib_LTLIBRARIES)