$NetBSD: patch-ac,v 1.5 2015/12/29 23:34:43 dholland Exp $ Fix NetBSD configuration. Support Dragonfly. Set library rpaths. XXX: should honor COMPILER_RPATH_FLAG. --- configure.orig 1999-09-26 15:02:14.000000000 +0000 +++ configure @@ -565,7 +565,11 @@ echo "#define STK_VERSION \"$VERSION\"" # determine the kind of the machine which is running this script os=`uname -s` version=`uname -r` -machine=`uname -m` +# +# NetBSD: +# allow sharing between different arch's which use the same processor +# Ie, use 'm68k' instead of 'amiga', 'mac68k', 'hp300', etc. +machine=`uname -p` case $os in Linux*) @@ -580,6 +584,9 @@ case $os in case $machine in i*86) machine=ix86;; esac;; + DragonFly*) + version=${OS_VERSION} + ;; SunOS*) case $version in 4.1.*) version=4.1.X;; @@ -691,8 +698,9 @@ case $MACHINE in ULTRIX*) OS=ULTRIX;; HP*) OS=HPUX; DFLGS="$DFLGS -Dhpux";; Linux*) OS=LINUX;; - NetBSD-1*) OS=NETBSD1;; + NetBSD*) OS=NETBSD;; FreeBSD*) OS=FREEBSD;; + DragonFly*) OS=DRAGONFLY;; IRIX-5*) OS=IRIX5;; IRIX*-6*) OS=IRIX5;; CYGWIN32*) OS=WIN32; FLAVOR=win; DFLGS="$DFLGS -DCYGWIN32";; @@ -1878,7 +1886,7 @@ fi if test "$x_libraries" != "" then - XLIBSW="-L$x_libraries" + XLIBSW="-L$x_libraries -Wl,-R$x_libraries" fi XLIBSW="$XLIBSW $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" @@ -2273,11 +2281,12 @@ case $OS in SH_LDFLAGS="-shared -o" SH_LOADER="ld" SH_SUFFIX='so' ;; - NETBSD1) - SH_CCFLAGS="-fpic" - SH_LDFLAGS="-Bshareable -o" - SH_LOADER="ld" - SH_SUFFIX='so';; + NETBSD | DRAGONFLY) + SH_CCFLAGS="-fPIC" + SH_LDFLAGS="-shared -o" + SH_LOADER="cc" + SH_SUFFIX="so" + STKLDFLAGS="-Wl,-E";; HPUX) SH_CCFLAGS="+Z" SH_LDFLAGS="-b -o"