diff --git a/configure.in b/configure.in index 001146d..365abff 100644 --- a/configure.in +++ b/configure.in @@ -389,6 +389,19 @@ if test "$enable_libxml2" = "yes" -o "$expat" = "no"; then fi # +# Setup variables for fontconfig.pc +# +if test "$enable_shared" = "no" -a "$enable_static" = "yes"; then + FONTCONFIG_LIBS_EXTRA="$LIBXML2_LIBS $EXPAT_LIBS $FREETYPE_LIBS $ICONV_LIBS" + FONTCONFIG_LIBS_PRIVATE= +else + FONTCONFIG_LIBS_EXTRA= + FONTCONFIG_LIBS_PRIVATE="$LIBXML2_LIBS $EXPAT_LIBS $FREETYPE_LIBS $ICONV_LIBS" +fi +AC_SUBST(FONTCONFIG_LIBS_EXTRA) +AC_SUBST(FONTCONFIG_LIBS_PRIVATE) + +# # Set default font directory # diff --git a/fontconfig.pc.in b/fontconfig.pc.in index db55f6e..7578954 100644 --- a/fontconfig.pc.in +++ b/fontconfig.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: Fontconfig Description: Font configuration and customization library Version: @VERSION@ -Libs: -L${libdir} -lfontconfig -Libs.private: @LIBXML2_LIBS@ @EXPAT_LIBS@ @FREETYPE_LIBS@ @ICONV_LIBS@ +Libs: -L${libdir} -lfontconfig @FONTCONFIG_LIBS_EXTRA@ +Libs.private: @FONTCONFIG_LIBS_PRIVATE@ Cflags: -I${includedir}