diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2018-09-12 00:06:31 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2018-11-01 18:06:38 +0100 |
commit | 0c619b7c4b9af55d5191a2410e0fb6091c72ccc8 (patch) | |
tree | 2eceeeee3ebbd46ed7ed2e437454387662649b24 /config.lib | |
parent | 1e68b9b3e6487c8c95c5d8dac89c04ea06d1d9b5 (diff) | |
download | openttd-0c619b7c4b9af55d5191a2410e0fb6091c72ccc8.tar.xz |
Add: Fluidsynth music driver support (jmak)
Diffstat (limited to 'config.lib')
-rw-r--r-- | config.lib | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/config.lib b/config.lib index 07bb45299..0fe2ccd9f 100644 --- a/config.lib +++ b/config.lib @@ -83,6 +83,7 @@ set_default() { with_midi="" with_midi_arg="" with_libtimidity="1" + with_fluidsynth="1" with_freetype="1" with_fontconfig="1" with_icu_layout="1" @@ -160,6 +161,7 @@ set_default() { with_midi with_midi_arg with_libtimidity + with_fluidsynth with_freetype with_fontconfig with_icu_layout @@ -372,6 +374,9 @@ detect_params() { --without-libtimidity) with_libtimidity="0";; --with-libtimidity=*) with_libtimidity="$optarg";; + --with-fluidsynth) with_fluidsynth="2";; + --without-fluidsynth) with_fluidsynth="0";; + --with-freetype) with_freetype="2";; --without-freetype) with_freetype="0";; --with-freetype=*) with_freetype="$optarg";; @@ -890,6 +895,7 @@ check_params() { detect_icu_layout detect_icu_sort detect_libtimidity + detect_fluidsynth if [ "$with_direct_music" != "0" ]; then if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then @@ -1839,6 +1845,11 @@ make_cflags_and_ldflags() { fi fi + if [ -n "$fluidsynth" ]; then + LIBS="$LIBS -lfluidsynth" + CFLAGS="$CFLAGS -DFLUIDSYNTH" + fi + if [ "$with_iconv" != "0" ]; then CFLAGS="$CFLAGS -DWITH_ICONV" if [ "$link_to_iconv" = "yes" ]; then @@ -2775,6 +2786,10 @@ detect_libtimidity() { detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity_config" "0.1" "1" } +detect_fluidsynth() { + detect_library "$with_fluidsynth" "fluidsynth" "" "" "fluidsynth.h" +} + detect_pkg_config() { # $1 - config-param ($with_lzma value) # $2 - package name ('liblzma') @@ -3543,6 +3558,7 @@ showhelp() { echo " midi-player" echo " --with-libtimidity[=\"pkg-config libtimidity\"]" echo " enables libtimidity support" + echo " --with-fluidsynth enables fluidsynth support" echo " --with-allegro[=\"pkg-config allegro\"]" echo " enables Allegro video driver support" echo " --with-cocoa enables COCOA video driver (OSX ONLY)" |