Changeset - r22196:ce6ed58f5bdf
[Not reviewed]
master
0 1 0
rubidium - 9 years ago 2015-08-09 12:43:52
rubidium@openttd.org
(svn r27376) -Codechange: let libtimidity detection and configuration make use of pkg-config
1 file changed with 9 insertions and 6 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -1757,19 +1757,21 @@ make_cflags_and_ldflags() {
 
		#  suppress those warnings.
 
		if [ $cc_version -ge 40 ]; then
 
			CFLAGS="$CFLAGS -Wno-non-virtual-dtor"
 
		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
 
		CFLAGS="$CFLAGS -DWITH_ICONV"
 
		if [ "$link_to_iconv" = "yes" ]; then
 
			LIBS="$LIBS -liconv"
 
@@ -2666,13 +2668,13 @@ detect_zlib() {
 

	
 
detect_lzo2() {
 
	detect_library "$with_lzo2" "lzo2" "liblzo2.a" "lzo/" "lzo1x.h"
 
}
 

	
 
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() {
 
	# $1 - config-param ($with_lzma value)
 
	# $2 - package name ('liblzma')
 
	# $3 - config name ('lzma_config', sets $lzma_config)
 
@@ -3530,13 +3532,14 @@ showhelp() {
 
	echo "  --menu-name=name               Name of the menu item when placed [OpenTTD]"
 
	echo "  --with-direct-music            enable direct music support (Win32 ONLY)"
 
	echo "  --with-sort=sort               define a non-default location for sort"
 
	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)"
 
	echo "  --with-sdl[=\"pkg-config sdl\"]  enables SDL video driver support"
 
	echo "  --with-zlib[=\"pkg-config zlib\"]"
 
	echo "                                 enables zlib support"
0 comments (0 inline, 0 general)