Changeset - r22180:1b682e487cfd
[Not reviewed]
master
0 1 0
rubidium - 9 years ago 2015-08-08 08:52:21
rubidium@openttd.org
(svn r27360) -Feature: allow configuring pkg-config in one go for all libraries
1 file changed with 7 insertions and 2 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -26,12 +26,13 @@ set_default() {
 
	cxx_build=""
 
	cxx_host=""
 
	windres=""
 
	strip=""
 
	lipo=""
 
	awk="awk"
 
	pkg_config="pkg-config"
 
	os="DETECT"
 
	endian="AUTO"
 
	cpu_type="DETECT"
 
	config_log="config.log"
 
	prefix_dir="/usr/local"
 
	binary_dir="games"
 
@@ -102,12 +103,13 @@ set_default() {
 
		cxx_build
 
		cxx_host
 
		windres
 
		strip
 
		lipo
 
		awk
 
		pkg_config
 
		os
 
		endian
 
		cpu_type
 
		config_log
 
		prefix_dir
 
		binary_dir
 
@@ -210,12 +212,14 @@ detect_params() {
 
			--cxx-host)                   prev_p="cxx_host";;
 
			--cxx-host=*)                 cxx_host="$optarg";;
 
			--windres)                    prev_p="windres";;
 
			--windres=*)                  windres="$optarg";;
 
			--awk)                        prev_p="awk";;
 
			--awk=*)                      awk="$optarg";;
 
			--pkg-config)                 prev_p="pkg_config";;
 
			--pkg-config=*)               pkg_config="$optarg";;
 
			--strip)                      prev_p="strip";;
 
			--strip=*)                    strip="$optarg";;
 
			--lipo)                       prev_p="lipo";;
 
			--lipo=*)                     lipo="$optarg";;
 

	
 
			--endian)                     prev_p="endian";;
 
@@ -2733,13 +2737,13 @@ detect_pkg_config() {
 
		return 0
 
	fi
 

	
 
	log 2 "detecting $2"
 

	
 
	if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then
 
		pkg_config_call="pkg-config $2"
 
		pkg_config_call="$pkg_config $2"
 
	else
 
		pkg_config_call="$1"
 
	fi
 

	
 
	version=`$pkg_config_call --modversion 2>/dev/null`
 
	ret=$?
 
@@ -2755,13 +2759,13 @@ detect_pkg_config() {
 
		else
 
			log 1 "checking $2... not found"
 
		fi
 

	
 
		# It was forced, so it should be found.
 
		if [ "$1" != "1" ]; then
 
			log 1 "configure: error: pkg-config $2 couldn't be found"
 
			log 1 "configure: error: $pkg_config $2 couldn't be found"
 
			log 1 "configure: error: you supplied '$1', but it seems invalid"
 
			exit 1
 
		fi
 

	
 
		eval "$3=\"\""
 
		return 0
 
@@ -3585,12 +3589,13 @@ showhelp() {
 
	echo "  --build=BUILD                  configure for building on BUILD [guessed]"
 
	echo "  --host=HOST                    cross-compile to build programs to run"
 
	echo "                                 on HOST [BUILD]"
 
	echo "  --windres=WINDRES              the windres to use [HOST-windres]"
 
	echo "  --strip=STRIP                  the strip to use [HOST-strip]"
 
	echo "  --awk=AWK                      the awk to use in configure [awk]"
 
	echo "  --pkg-config=PKG-CONFIG        the pkg-config to use in configure [pkg-config]"
 
	echo "  --lipo=LIPO                    the lipo to use (OSX ONLY) [HOST-lipo]"
 
	echo "  --os=OS                        the OS we are compiling for [DETECT]"
 
	echo "                                 DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/"
 
	echo "                                 NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/"
 
	echo "                                 MINGW/OS2/DOS/WINCE/PSP/HAIKU"
 
	echo "  --endian=ENDIAN                set the endian of the HOST (AUTO/LE/BE)"
0 comments (0 inline, 0 general)