From a3b3b25c5cdd2447652fb7c11f675fc363493f37 Mon Sep 17 00:00:00 2001 From: Matt Chapman Date: Thu, 10 Oct 2002 07:47:29 +0000 Subject: [PATCH] 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 --- configure | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 824d7de..c5f98cd 100755 --- a/configure +++ b/configure @@ -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" +