summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2015-08-09 12:43:52 +0000
committerrubidium <rubidium@openttd.org>2015-08-09 12:43:52 +0000
commitd45969779d15c81339f89e156c2398760784a51d (patch)
treed3dbded2a528de705445ecfb046947c10bb97285
parentc7c93c68b77b69f82c2bf6168e2edb0ae5b418fb (diff)
downloadopenttd-d45969779d15c81339f89e156c2398760784a51d.tar.xz
(svn r27376) -Codechange: let libtimidity detection and configuration make use of pkg-config
-rw-r--r--config.lib15
1 files changed, 9 insertions, 6 deletions
diff --git a/config.lib b/config.lib
index b0cd4c6df..1387d4563 100644
--- a/config.lib
+++ b/config.lib
@@ -1760,13 +1760,15 @@ make_cflags_and_ldflags() {
fi
fi
- if [ -n "$libtimidity" ]; then
+ if [ -n "$libtimidity_config" ]; then
+ CFLAGS="$CFLAGS -DLIBTIMIDITY"
+ CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`"
+
if [ "$enable_static" != "0" ]; then
- LIBS="$LIBS $libtimidity"
+ LIBS="$LIBS `$libtimidity_config --libs --static | tr '\n\r' ' '`"
else
- LIBS="$LIBS -ltimidity"
+ LIBS="$LIBS `$libtimidity_config --libs | tr '\n\r' ' '`"
fi
- CFLAGS="$CFLAGS -DLIBTIMIDITY"
fi
if [ "$with_iconv" != "0" ]; then
@@ -2669,7 +2671,7 @@ detect_lzo2() {
}
detect_libtimidity() {
- detect_library "$with_libtimidity" "libtimidity" "libtimidity.a" "" "timidity.h"
+ detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity_config" "0.1" "1"
}
detect_pkg_config() {
@@ -3533,7 +3535,8 @@ showhelp() {
echo " --with-midi=midi define which midi-player to use"
echo " --with-midi-arg=arg define which args to use for the"
echo " midi-player"
- echo " --with-libtimidity enables libtimidity support"
+ echo " --with-libtimidity[=\"pkg-config libtimidity\"]"
+ echo " enables libtimidity support"
echo " --with-allegro[=\"pkg-config allegro\"]"
echo " enables Allegro video driver support"
echo " --with-cocoa enables COCOA video driver (OSX ONLY)"