--- configure.orig Wed Dec 15 04:59:18 1999 +++ configure Sun Jan 27 14:59:38 2002 @@ -4648,7 +4648,7 @@ EXTRA_CFLAGS="" TCL_EXPORT_FILE_SUFFIX="" UNSHARED_LIB_SUFFIX="" - TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' + TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` ECHO_VERSION='`echo ${VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g @@ -4892,7 +4892,7 @@ LDFLAGS="-Wl,-Bexport" LD_SEARCH_FLAGS="" ;; - NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*) + NetBSD-*|FreeBSD-*|OpenBSD-*) # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 @@ -4922,16 +4922,21 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - SHLIB_CFLAGS="-fpic" - SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' + if eval "test \"`echo ${PORTOBJFORMAT}`\" = elf" ; then + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1' + TCL_SHLIB_LD_EXTRAS="-soname \$@" + SHLIB_LD="ld -shared -x" + else + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + SHLIB_LD="ld -Bshareable -x" + fi else echo "$ac_t""no" 1>&6 @@ -4954,17 +4959,6 @@ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; - FreeBSD-*) - # FreeBSD 3.* and greater have ELF. - SHLIB_CFLAGS="-fpic" - SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; NEXTSTEP-*) SHLIB_CFLAGS="" SHLIB_LD="cc -nostdlib -r" @@ -5371,7 +5365,7 @@ SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}' fi if test "$UNSHARED_LIB_SUFFIX" = "" ; then - UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' fi @@ -5594,7 +5588,7 @@ if test "x$DL_OBJS" = "xtclLoadAout.o"; then MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}" else - MAKE_LIB="\${SHLIB_LD} -o \${TCL_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}" + MAKE_LIB="\${SHLIB_LD} \${TCL_SHLIB_LD_EXTRAS} -o \${TCL_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}" RANLIB=":" fi else @@ -5628,11 +5622,7 @@ # up the Tcl library. if test "$SHARED_BUILD" = "0" -o $TCL_NEEDS_EXP_FILE = 0; then - if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}" - else - TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}" - fi + TCL_LIB_FLAG="-ltcl${TCL_TRIM_DOTS}\${TCL_DBGX}" TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}" TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}" else @@ -5678,11 +5668,7 @@ TCL_STUB_LIB_FILE=${STUB_LIB_FILE} -if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}" -else - TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}" -fi +TCL_STUB_LIB_FLAG="-ltclstub${TCL_TRIM_DOTS}\${TCL_DBGX}" TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}" TCL_STUB_LIB_SPEC="-L${exec_prefix}/lib ${TCL_STUB_LIB_FLAG}"