Fix rpath handling - on OSF1 (at least) we need to pass the rpath in one

colon-separated list.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@220 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Matt Chapman 2002-10-10 07:47:29 +00:00
parent 05de38d226
commit a3b3b25c5c

39
configure vendored
View File

@ -15,6 +15,7 @@ echo "# Generated by $0 $*" >Makeconf
cflags=
ldflags=
rpath=
for arg in $*; do
optarg=`echo $arg | sed 's/[-a-z]*=//'`
@ -75,18 +76,6 @@ esac
done
# Platform-specific options
need_runpath=no
case `uname -s` in
SunOS)
ldflags="$ldflags -lsocket -lnsl"
need_runpath=yes
;;
esac
# Find X installation
xdirs="$extraxdir /usr/X11R6 /usr/X11 /usr/openwin /usr /usr/local/X11R6 /usr/local/X11 /usr/local"
@ -119,9 +108,7 @@ echo
if [ $xdir != "/usr" ]; then
cflags="$cflags -I$xdir/include"
ldflags="$ldflags -L$xdir/lib"
if [ $need_runpath = "yes" ]; then
ldflags="$ldflags -R$xdir/lib"
fi
rpath="$rpath:$xdir/lib"
fi
ldflags="$ldflags -lX11"
@ -154,9 +141,7 @@ else
if [ $ssldir != "/usr" ]; then
cflags="$cflags -I$ssldir/include"
ldflags="$ldflags -L$ssldir/lib"
if [ $need_runpath = "yes" ]; then
ldflags="$ldflags -R$ssldir/lib"
fi
rpath="$rpath:$ssldir/lib"
fi
cflags="$cflags -DWITH_OPENSSL"
@ -165,6 +150,7 @@ fi
# Find EGD socket if we don't have /dev/urandom or /dev/random
if [ ! -c /dev/random -a ! -c /dev/urandom ]; then
egdpaths="$extraegdpath /var/run/egd-pool /dev/egd-pool /etc/egd-pool /etc/entropy"
@ -189,7 +175,24 @@ if [ ! -c /dev/random -a ! -c /dev/urandom ]; then
fi
fi
# Platform-specific options
# strip leading colon from rpath
rpath=`echo $rpath |sed 's/^://'`
case `uname -s` in
SunOS)
ldflags="$ldflags -lsocket -lnsl -R$rpath"
;;
OSF1)
ldflags="$ldflags -Wl,-rpath,$rpath"
;;
esac
echo "CFLAGS += $cflags" >>Makeconf
echo "LDFLAGS += $ldflags" >>Makeconf
echo "configure complete - now run make"