diff options
author | rubidium <rubidium@openttd.org> | 2015-08-09 12:41:12 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2015-08-09 12:41:12 +0000 |
commit | 2f267b9207d9a3aa70c48eb5b5dd0a8332cecfa7 (patch) | |
tree | a2fcaa604fb7c44b508038744420f6178de042a9 | |
parent | a00d2b8b3c7f5f9f6ea09c9957c30036bbde288a (diff) | |
download | openttd-2f267b9207d9a3aa70c48eb5b5dd0a8332cecfa7.tar.xz |
(svn r27371) -Codechange: make freetype detection and configuration use pkg-config
-rw-r--r-- | config.lib | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/config.lib b/config.lib index e50839e77..bcc1d3064 100644 --- a/config.lib +++ b/config.lib @@ -2796,47 +2796,7 @@ detect_png() { } detect_freetype() { - # 0 means no, 1 is auto-detect, 2 is force - if [ "$with_freetype" = "0" ]; then - log 1 "checking libfreetype... disabled" - - freetype_config="" - return 0 - fi - if [ "$with_freetype" = "1" ] && [ "$enable_dedicated" != "0" ]; then - log 1 "checking libfreetype... dedicated server, skipping" - - freetype_config="" - return 0 - fi - - if [ "$with_freetype" = "1" ] || [ "$with_freetype" = "" ] || [ "$with_freetype" = "2" ]; then - freetype_config="freetype-config" - else - freetype_config="$with_freetype" - fi - - version=`$freetype_config --version 2>/dev/null` - ret=$? - log 2 "executing freetype_config --version" - log 2 " returned $version" - log 2 " exit code $ret" - - if [ -z "$version" ] || [ "$ret" != "0" ]; then - log 1 "checking libfreetype... not found" - - # It was forced, so it should be found. - if [ "$with_freetype" != "1" ]; then - log 1 "configure: error: freetype-config couldn't be found" - log 1 "configure: error: you supplied '$with_freetype', but it seems invalid" - exit 1 - fi - - freetype_config="" - return 0 - fi - - log 1 "checking libfreetype... found" + detect_pkg_config "$with_freetype" "freetype2" "freetype_config" "2.2" "1" } detect_fontconfig() { @@ -3634,7 +3594,7 @@ showhelp() { echo " enables liblzma support" echo " --with-liblzo2[=liblzo2.a] enables liblzo2 support" echo " --with-png[=libpng-config] enables libpng support" - echo " --with-freetype[=freetype-config]" + echo " --with-freetype[=\"pkg-config freetype2\"]" echo " enables libfreetype support" echo " --with-fontconfig[=\"pkg-config fontconfig\"]" echo " enables fontconfig support" |