diff options
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 31 | 
1 files changed, 27 insertions, 4 deletions
| @@ -22,6 +22,7 @@ pidfile='/var/run/bitlbee.pid'  ipcsocket=''  pcdir='$prefix/lib/pkgconfig'  systemlibdirs="/lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib" +sysroot=''  # Set these to default-on to let it be overriden by either the user or purple  # @@ -148,6 +149,7 @@ Option		Description				Default  --target=...	Cross compilation target 		same as host +--sysroot=...	Cross compilation sysroot 		$sysroot  EOF  		exit;  	fi @@ -239,12 +241,33 @@ EOF  if [ -n "$target" ]; then -	PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig -	export PKG_CONFIG_LIBDIR -	PATH=/usr/$target/bin:$PATH +	# prepend sysroot to system lib dirs + +	systemlibdirs_cross='' +	for i in $systemlibdirs; do +		systemlibdirs_cross="$systemlibdirs_cross $sysroot$i" +	done +	systemlibdirs=$systemlibdirs_cross +	unset systemlibdirs_cross + +	# backward compatibility + +	if [ -z "$PKG_CONFIG_LIBDIR" ]; then +		PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig +		export PKG_CONFIG_LIBDIR +	fi + +	if [ -d /usr/$target/bin ]; then +		PATH=/usr/$target/bin:$PATH +	fi + +	if [ -d /usr/$target/lib ]; then +		systemlibdirs="$systemlibdirs /usr/$target/lib" +	fi +  	CC=$target-cc  	LD=$target-ld -	systemlibdirs="/usr/$target/lib" +	STRIP=$target-strip  fi  if [ "$asan" = "1" ]; then | 
