05fde70145
framework.
143 lines
4.2 KiB
Text
143 lines
4.2 KiB
Text
$NetBSD: patch-ac,v 1.4 2005/11/05 03:27:56 rillig Exp $
|
|
|
|
--- unix/tcl.m4.orig 2001-10-20 00:24:40.000000000 +0000
|
|
+++ unix/tcl.m4
|
|
@@ -602,6 +602,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
|
|
|
|
do64bit_ok=no
|
|
fullSrcDir=`cd $srcdir; pwd`
|
|
+ RPATH_FLAG=""
|
|
EXTRA_CFLAGS=""
|
|
TCL_EXPORT_FILE_SUFFIX=""
|
|
UNSHARED_LIB_SUFFIX=""
|
|
@@ -791,8 +792,11 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
|
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
|
|
EXTRA_CFLAGS=""
|
|
LDFLAGS=""
|
|
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
|
|
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
|
|
+ TCL_LIB_VERSIONS_OK=nodots
|
|
;;
|
|
- IRIX-6.*|IRIX64-6.5*)
|
|
+ IRIX-6.*)
|
|
SHLIB_CFLAGS=""
|
|
SHLIB_LD="ld -n32 -shared -rdata_shared"
|
|
SHLIB_LD_LIBS='${LIBS}'
|
|
@@ -815,6 +819,9 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
|
esac
|
|
LDFLAGS="-n32"
|
|
fi
|
|
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
|
|
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
|
|
+ TCL_LIB_VERSIONS_OK=nodots
|
|
;;
|
|
IRIX64-6.*)
|
|
SHLIB_CFLAGS=""
|
|
@@ -825,6 +832,15 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
|
DL_LIBS=""
|
|
LDFLAGS=""
|
|
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
|
|
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
|
|
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
|
|
+ TCL_LIB_VERSIONS_OK=nodots
|
|
+
|
|
+ # Check to enable 64-bit flags for compiler/linker
|
|
+ if test "${ABI}" = "64" ; then
|
|
+ SHLIB_LD="ld -64 -shared -rdata_shared"
|
|
+ LDFLAGS="$LDFLAGS -64"
|
|
+ fi
|
|
;;
|
|
Linux*)
|
|
SHLIB_CFLAGS="-fPIC"
|
|
@@ -915,7 +931,6 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
|
AC_CHECK_HEADER(dlfcn.h, [
|
|
# NetBSD/SPARC needs -fPIC, -fpic will not do.
|
|
SHLIB_CFLAGS="-fPIC"
|
|
- SHLIB_LD="ld -Bshareable -x"
|
|
SHLIB_LD_LIBS=""
|
|
SHLIB_SUFFIX=".so"
|
|
DL_OBJS="tclLoadDl.o"
|
|
@@ -927,11 +942,19 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
|
#ifdef __ELF__
|
|
yes
|
|
#endif
|
|
- ],
|
|
+ ], [
|
|
AC_MSG_RESULT(yes)
|
|
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
|
|
+ SHLIB_LD='${TCL_CC} -shared -Wl,-x'
|
|
+ RPATH_FLAG='-Wl,-R'
|
|
+ LD_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR}'
|
|
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
|
|
+ ], [
|
|
AC_MSG_RESULT(no)
|
|
+ SHLIB_LD="ld -Bshareable -x"
|
|
+ RPATH_FLAG='-R'
|
|
+ LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
|
|
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
|
|
+ ]
|
|
)
|
|
], [
|
|
SHLIB_CFLAGS=""
|
|
@@ -950,7 +973,7 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
|
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
|
|
TCL_LIB_VERSIONS_OK=nodots
|
|
;;
|
|
- FreeBSD-*)
|
|
+ FreeBSD-*|DragonFly-*)
|
|
# FreeBSD 3.* and greater have ELF.
|
|
SHLIB_CFLAGS="-fPIC"
|
|
SHLIB_LD="ld -Bshareable -x"
|
|
@@ -1130,6 +1153,9 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
|
DL_LIBS="-ldl"
|
|
LDFLAGS=""
|
|
LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
|
|
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
|
|
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
|
|
+ TCL_LIB_VERSIONS_OK=nodots
|
|
;;
|
|
SunOS-5*)
|
|
|
|
@@ -1174,6 +1200,9 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
|
else
|
|
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
|
|
fi
|
|
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
|
|
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
|
|
+ TCL_LIB_VERSIONS_OK=nodots
|
|
;;
|
|
ULTRIX-4.*)
|
|
SHLIB_CFLAGS="-G 0"
|
|
@@ -1329,7 +1358,7 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
|
;;
|
|
IRIX*)
|
|
;;
|
|
- NetBSD-*|FreeBSD-*|OpenBSD-*)
|
|
+ NetBSD-*|FreeBSD-*|OpenBSD-*|DragonFly-*)
|
|
;;
|
|
Rhapsody-*|Darwin-*)
|
|
;;
|
|
@@ -1652,7 +1681,11 @@ AC_DEFUN(SC_PATH_X, [
|
|
for i in $dirs ; do
|
|
if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
|
|
AC_MSG_RESULT($i)
|
|
+ if test "${RPATH_FLAG}" != ""; then
|
|
+ XLIBSW="-L$i ${RPATH_FLAG}$i -lX11"
|
|
+ else
|
|
XLIBSW="-L$i -lX11"
|
|
+ fi
|
|
x_libraries="$i"
|
|
break
|
|
fi
|
|
@@ -1661,7 +1694,11 @@ AC_DEFUN(SC_PATH_X, [
|
|
if test "$x_libraries" = ""; then
|
|
XLIBSW=-lX11
|
|
else
|
|
+ if test "${RPATH_FLAG}" != ""; then
|
|
+ XLIBSW="-L$x_libraries ${RPATH_FLAG}$x_libraries -lX11"
|
|
+ else
|
|
XLIBSW="-L$x_libraries -lX11"
|
|
+ fi
|
|
fi
|
|
fi
|
|
if test "$XLIBSW" = nope ; then
|