openbsd-ports/x11/tk/8.3/patches/patch-configure

88 lines
2.5 KiB
Plaintext

--- configure.orig Wed Oct 23 19:45:50 2002
+++ configure Tue Jan 14 23:08:34 2003
@@ -2438,9 +2438,14 @@
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
- # NetBSD/SPARC needs -fPIC, -fpic will not do.
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="ld -Bshareable -x"
+ # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
+ case `machine` in
+ sparc|sparc64)
+ SHLIB_CFLAGS="-fPIC";;
+ *)
+ SHLIB_CFLAGS="-fpic";;
+ esac
+ SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
@@ -2462,11 +2467,11 @@
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.3'
else
rm -rf conftest*
echo "$ac_t""no" 1>&6
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.3'
fi
rm -f conftest*
@@ -3074,6 +3079,7 @@
fi
fi
+TCL_SRC_DIR=${prefix}/include/tcl${TCL_VERSION}
LIB_RUNTIME_DIR='${LIB_RUNTIME_DIR}'
@@ -4029,16 +4035,16 @@
for i in $dirs ; do
if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
echo "$ac_t""$i" 1>&6
- XLIBSW="-L$i -lX11"
+ XLIBSW="-L$i -lX11 -lXext"
x_libraries="$i"
break
fi
done
else
if test "$x_libraries" = ""; then
- XLIBSW=-lX11
+ XLIBSW="-lX11 -lXext"
else
- XLIBSW="-L$x_libraries -lX11"
+ XLIBSW="-L$x_libraries -lX11 -lXext"
fi
fi
if test "$XLIBSW" = nope ; then
@@ -4778,13 +4784,12 @@
TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
TK_LIB_FILE=libtk${TK_SHARED_LIB_SUFFIX}
MAKE_LIB="\${SHLIB_LD} -o \$@ \${OBJS} \$(TK_LD_SEARCH_FLAGS) \${TCL_STUB_LIB_SPEC} \${SHLIB_LD_LIBS}"
- RANLIB=":"
- TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
+ TCL_STUB_FLAGS=""
else
TK_SHLIB_CFLAGS=""
TK_LIB_FILE=libtk${TK_UNSHARED_LIB_SUFFIX}
- MAKE_LIB="\${STLIB_LD} \$@ \${OBJS}"
+ MAKE_LIB="\${STLIB_LD} \${TK_LIB_FILE} \${OBJS}; \${RANLIB} \${TK_LIB_FILE}"
TCL_STUB_FLAGS=""
fi
@@ -4833,7 +4838,7 @@
eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}"
# FIXME: Should we add MAKE_STUB_LIB to tclConfig.sh ?
-MAKE_STUB_LIB="\${STLIB_LD} \$@ \${STUB_LIB_OBJS}"
+MAKE_STUB_LIB="\${STLIB_LD} \${TK_STUB_LIB_FILE} \${STUB_LIB_OBJS}; \${RANLIB} \${TK_STUB_LIB_FILE}"
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
eval TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}\${TK_DBGX}"