$NetBSD: patch-unix_configure,v 1.8 2014/01/11 14:41:06 adam Exp $ --- unix/configure.orig 2013-09-17 12:25:13.000000000 +0000 +++ unix/configure @@ -4617,10 +4617,10 @@ fi # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] # is disabled by the user. [Bug 1016796] LDFLAGS_ARCH="" - UNSHARED_LIB_SUFFIX="" + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' ECHO_VERSION='`echo ${VERSION}`' - TCL_LIB_VERSIONS_OK=ok + TCL_LIB_VERSIONS_OK=nodots CFLAGS_DEBUG=-g if test "$GCC" = yes; then @@ -5576,7 +5576,7 @@ fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - OpenBSD-*) + OpenBSD-*|MirBSD-*) arch=`arch -s` case "$arch" in vax) @@ -5598,7 +5598,7 @@ fi fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' LDFLAGS="-Wl,-export-dynamic" ;; esac @@ -5633,7 +5633,7 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - LDFLAGS="$LDFLAGS -export-dynamic" + LDFLAGS="" if test $doRpath = yes; then CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' @@ -5650,7 +5650,7 @@ fi fi ;; - FreeBSD-*) + FreeBSD-*|DragonFly-*) # This configuration from FreeBSD Ports. SHLIB_CFLAGS="-fPIC" SHLIB_LD="${CC} -shared" @@ -5676,7 +5676,7 @@ fi # Version numbers are dot-stripped by system policy. TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' TCL_LIB_VERSIONS_OK=nodots ;; Darwin-*) @@ -6855,7 +6855,7 @@ fi BSD/OS*) ;; CYGWIN_*|MINGW32_*) ;; IRIX*) ;; - NetBSD-*|FreeBSD-*|OpenBSD-*) ;; + NetBSD-*|FreeBSD-*|OpenBSD-*|MirBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; *) SHLIB_CFLAGS="-fPIC" ;; @@ -6876,12 +6876,12 @@ fi if test "$SHARED_LIB_SUFFIX" = ""; then - SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${SHLIB_SUFFIX}' fi if test "$UNSHARED_LIB_SUFFIX" = ""; then - UNSHARED_LIB_SUFFIX='${VERSION}.a' + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' fi DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" @@ -6897,7 +6897,11 @@ fi else - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' + if test "${SHLIB_SUFFIX}" = ".dylib" ; then + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/libtk$(MAJOR_VERSION)$(MINOR_VERSION).$(SHLIB_VERSION)$(SHLIB_SUFFIX)"' + else + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE).$(SHLIB_VERSION)"' + fi fi @@ -6931,7 +6935,7 @@ fi else MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@' - INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))' + INSTALL_STUB_LIB='$(INSTALL_DATA) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))' fi @@ -10066,7 +10070,7 @@ echo $ECHO_N "checking for X11 libraries if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then echo "$as_me:$LINENO: result: $i" >&5 echo "${ECHO_T}$i" >&6 - XLIBSW="-L$i -lX11" + XLIBSW="-L$i ${COMPILER_RPATH_FLAG}$i -lX11" x_libraries="$i" break fi @@ -10075,7 +10079,7 @@ echo "${ECHO_T}$i" >&6 if test "$x_libraries" = ""; then XLIBSW=-lX11 else - XLIBSW="-L$x_libraries -lX11" + XLIBSW="-L$x_libraries ${COMPILER_RPATH_FLAG}$x_libraries -lX11" fi fi if test "$XLIBSW" = nope ; then @@ -10171,11 +10175,6 @@ fi # be replaced by spaces. #-------------------------------------------------------------------- -if test "x${x_libraries}" != "x"; then - if test "x${x_libraries}" != "xNONE"; then - LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${x_libraries}" - fi -fi if test "${TCL_LD_SEARCH_FLAGS}" = '-L${LIB_RUNTIME_DIR}'; then LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -L/g'` fi @@ -11333,14 +11332,10 @@ else TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" TK_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win ${TK_LIB_FLAG}" else - if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TK_LIB_FLAG="-ltk${TK_VERSION}" - else TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" - fi TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}" fi - TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" + TK_LIB_SPEC="-L${libdir} ${COMPILER_RPATH_FLAG}${libdir} ${TK_LIB_FLAG}" fi #-------------------------------------------------------------------- @@ -11352,11 +11347,7 @@ fi eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}" eval "TK_STUB_LIB_DIR=${libdir}" -if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}" -else - TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`" -fi +TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`" TK_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}" TK_STUB_LIB_SPEC="-L${TK_STUB_LIB_DIR} ${TK_STUB_LIB_FLAG}" @@ -12177,6 +12168,7 @@ s,@APP_RSRC_FILE@,$APP_RSRC_FILE,;t t s,@REZ@,$REZ,;t t s,@REZ_FLAGS@,$REZ_FLAGS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t +s,@SHLIB_VERSION@,$SHLIB_VERSION,;t t CEOF _ACEOF