# HG changeset patch # User diego # Date 1093482362 0 # Node ID 29a48ea224e85d57dbf65493d919ff4d6adcdbc3 # Parent 27e97efeab4d2be8433db66afe7e4348e4096505 properly set linking flags for NetBSD, patch by jb13@gomerbud.com diff -r 27e97efeab4d -r 29a48ea224e8 configure --- a/configure Wed Aug 25 19:41:01 2004 +0000 +++ b/configure Thu Aug 26 01:06:02 2004 +0000 @@ -384,7 +384,6 @@ ;; --with-extralibdir=*) _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'` -# _ld_extra="${_ld_extra} -Wl,-R"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -Wl\,-R,g'`" -L"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'` ;; --enable-runtime-cpudetection) _runtime_cpudetection=yes @@ -508,6 +507,13 @@ _inc_extra="$_inc_extra -I/usr/local/include" fi +if netbsd ; then + for I in `echo $_ld_extra | sed 's/-L//g'` ; do + tmp="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`" + done + _ld_extra=$tmp +fi + _ldd=ldd if darwin; then _ldd="otool -L" @@ -3202,7 +3208,11 @@ if test -z "$_ld_x11" ; then for I in /usr/X11R6/lib /usr/lib/X11R6 /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 /usr/lib ; do if test -d "$I" && ( test -f "$I/libX11.so" || test -f "$I/libX11.a" || test -f "$I/libX11.dll.a" ) ; then - _ld_x11="-L$I" + if netbsd; then + _ld_x11="-L$I -Wl,-R$I" + else + _ld_x11="-L$I" + fi echores "yes (using $I)" break; fi