Detect correctly Gentoo/*BSD CHOSTS: - *-*-freebsd* means tcl/tk libs will be like libtcl85.so, instead of libtcl8.5.so - *-gentoo-*bsd means this is a Gentoo/*BSD system which uses the same toolchain as linux, so we link in the same way. --- blt2.4z-8.5.2/configure.old 2012-05-06 18:11:45.000000000 -0400 +++ blt2.4z-8.5.2/configure 2012-05-06 18:15:25.000000000 -0400 @@ -3376,7 +3376,7 @@ fi case $target in - *-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|OpenBSD-*|*-*-cygwin*|*-*-mingw*) + *-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|*-*-freebsd*|OpenBSD-*|*-*-cygwin*|*-*-mingw*) TCL_LIB_NAME="tcl${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}" TK_LIB_NAME="tk${TK_MAJOR_VERSION}${TK_MINOR_VERSION}" ;; @@ -4079,6 +4079,12 @@ EXTRA_LIB_SPECS="-ldl" ;; + *-gentoo-netbsd*|*-gentoo-freebsd*|*-gentoo-openbsd*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC}" + SHLIB_LD_FLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@' + ;; + *-netbsd*|*-freebsd*|*-openbsd*) # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` --- blt2.4z-8.5.2/configure.in.old 2012-05-06 18:11:47.000000000 -0400 +++ blt2.4z-8.5.2/configure.in 2012-05-06 18:15:08.000000000 -0400 @@ -708,7 +708,7 @@ fi case $target in - *-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|OpenBSD-*|*-*-cygwin*|*-*-mingw*) + *-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|*-*-freebsd*|OpenBSD-*|*-*-cygwin*|*-*-mingw*) TCL_LIB_NAME="tcl${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}" TK_LIB_NAME="tk${TK_MAJOR_VERSION}${TK_MINOR_VERSION}" ;; @@ -1241,6 +1241,12 @@ EXTRA_LIB_SPECS="-ldl" ;; + *-gentoo-netbsd*|*-gentoo-freebsd*|*-gentoo-openbsd*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC}" + SHLIB_LD_FLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@' + ;; + *-netbsd*|*-freebsd*|*-openbsd*) # Not available on all versions: check for include file. AC_CHECK_HEADER(dlfcn.h, test_ok=yes, test_ok=no)