diff --git a/config.lib b/config.lib --- a/config.lib +++ b/config.lib @@ -786,6 +786,21 @@ make_cflags_and_ldflags() { fi fi + if [ -n "$fontconfig_config" ]; then + CFLAGS="$CFLAGS -DWITH_FONTCONFIG" + CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`" + + if [ "$enable_static" != "0" ]; then + if [ "$os" = "OSX" ]; then + LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a" + else + LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`" + fi + else + LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`" + fi + fi + if [ -n "$freetype_config" ]; then CFLAGS="$CFLAGS -DWITH_FREETYPE" CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" @@ -802,21 +817,6 @@ make_cflags_and_ldflags() { fi fi - if [ -n "$fontconfig_config" ]; then - CFLAGS="$CFLAGS -DWITH_FONTCONFIG" - CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`" - - if [ "$enable_static" != "0" ]; then - if [ "$os" = "OSX" ]; then - LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a" - else - LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`" - fi - else - LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`" - fi - fi - if [ "$with_direct_music" != "0" ]; then CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT" # GCC 4.0+ doesn't like the DirectX includes (gives tons of