summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xunix/configure54
-rw-r--r--unix/tcl.m454
3 files changed, 83 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index 117245b..a2848bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-15 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * unix/tcl.m4: Updated the OpenBSD configuration and regenerated
+ * unix/configure: the configure script.
+
2005-03-14 Miguel Sofer <msofer@users.sf.net>
* generic/tclExecute.c: fixed INST_PUSH1's debugging code (wrong
diff --git a/unix/configure b/unix/configure
index 822ea47..038f513 100755
--- a/unix/configure
+++ b/unix/configure
@@ -7684,16 +7684,38 @@ fi
TCL_LIB_VERSIONS_OK=nodots
;;
OpenBSD-*)
- SHLIB_LD="${CC} -shared"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- echo "$as_me:$LINENO: checking for ELF" >&5
+ case `arch -s` in
+ m88k|vax)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".a"
+ DL_OBJS="tclLoadAout.o"
+ DL_LIBS=""
+ LDFLAGS=""
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ ;;
+ *)
+ # 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"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+ echo "$as_me:$LINENO: checking for ELF" >&5
echo $ECHO_N "checking for ELF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -7709,15 +7731,17 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes" >/dev/null 2>&1; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+ LDFLAGS=-Wl,-export-dynamic
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+ LDFLAGS=""
fi
rm -f conftest*
+ ;;
+ esac
# OpenBSD doesn't do version numbers with dots.
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
@@ -12165,7 +12189,7 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-( exit $ac_status )
+(exit $ac_status )
tcl_cv_strstr_unbroken=broken
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -12333,7 +12357,7 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-( exit $ac_status )
+(exit $ac_status )
tcl_cv_strtoul_unbroken=broken
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -12500,7 +12524,7 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-( exit $ac_status )
+(exit $ac_status )
tcl_cv_strtod_unbroken=broken
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -13875,7 +13899,7 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-( exit $ac_status )
+(exit $ac_status )
tcl_cv_putenv_copy=yes
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index d56745f..cbe5fd3 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1304,24 +1304,48 @@ dnl AC_CHECK_TOOL(AR, ar)
TCL_LIB_VERSIONS_OK=nodots
;;
OpenBSD-*)
- SHLIB_LD="${CC} -shared"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- AC_MSG_CHECKING(for ELF)
- AC_EGREP_CPP(yes, [
+ case `arch -s` in
+ m88k|vax)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".a"
+ DL_OBJS="tclLoadAout.o"
+ DL_LIBS=""
+ LDFLAGS=""
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ ;;
+ *)
+ # 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"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+ AC_MSG_CHECKING(for ELF)
+ AC_EGREP_CPP(yes, [
#ifdef __ELF__
yes
#endif
- ],
- [AC_MSG_RESULT(yes)
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'],
- [AC_MSG_RESULT(no)
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0']
- )
+ ],
+ AC_MSG_RESULT(yes)
+ [ LDFLAGS=-Wl,-export-dynamic ],
+ AC_MSG_RESULT(no)
+ LDFLAGS=""
+ )
+ ;;
+ esac
# OpenBSD doesn't do version numbers with dots.
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'