summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-12-09 21:55:10 (GMT)
committerhobbs <hobbs>2003-12-09 21:55:10 (GMT)
commit219acd3be327a4f050a7102dbc860217813ed7d1 (patch)
tree0046aba513e850e0bfafed6147e8986889c52e47 /unix
parentd08584b0873067dcc6cadc1ddd950f49cd06ba6e (diff)
downloadtcl-219acd3be327a4f050a7102dbc860217813ed7d1.zip
tcl-219acd3be327a4f050a7102dbc860217813ed7d1.tar.gz
tcl-219acd3be327a4f050a7102dbc860217813ed7d1.tar.bz2
* unix/configure:
* unix/tcl.m4: updated OpenBSD build configuration based on [Patch #775246] (cassoff)
Diffstat (limited to 'unix')
-rwxr-xr-xunix/configure49
-rw-r--r--unix/tcl.m432
2 files changed, 75 insertions, 6 deletions
diff --git a/unix/configure b/unix/configure
index 8009dfb..784f1d9 100755
--- a/unix/configure
+++ b/unix/configure
@@ -10835,7 +10835,7 @@ fi
ECHO_VERSION='`echo ${VERSION}`'
TCL_LIB_VERSIONS_OK=ok
CFLAGS_DEBUG=-g
- CFLAGS_OPTIMIZE=-O2
+ CFLAGS_OPTIMIZE=-O
if test "$GCC" = "yes" ; then
CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
else
@@ -11446,6 +11446,7 @@ echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
SHLIB_LD_LIBS='${LIBS}'
SHLIB_SUFFIX=".so"
+ CFLAGS_OPTIMIZE=-O2
# egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
# when you inline the string and math operations. Turn this off to
# get rid of the warnings.
@@ -11802,7 +11803,7 @@ fi
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
+ NetBSD-*|FreeBSD-[1-2].*)
# Not available on all versions: check for include file.
if test "${ac_cv_header_dlfcn_h+set}" = set; then
echo "$as_me:$LINENO: checking for dlfcn.h" >&5
@@ -11996,6 +11997,48 @@ fi
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
TCL_LIB_VERSIONS_OK=nodots
;;
+ OpenBSD-*)
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ echo "$as_me:$LINENO: checking for ELF" >&5
+echo $ECHO_N "checking for ELF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef __ELF__
+ yes
+#endif
+
+_ACEOF
+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}\$\{DBGX\}.so.1.0'
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
+
+fi
+rm -f conftest*
+
+
+ # OpenBSD doesn't do version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
FreeBSD-*)
# FreeBSD 3.* and greater have ELF.
SHLIB_CFLAGS="-fPIC"
@@ -12616,7 +12659,7 @@ fi;
;;
IRIX*)
;;
- NetBSD-*|FreeBSD-*|OpenBSD-*)
+ NetBSD-*|FreeBSD-*)
;;
Rhapsody-*|Darwin-*)
;;
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 7512f4b..1d9991b 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -806,7 +806,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
ECHO_VERSION='`echo ${VERSION}`'
TCL_LIB_VERSIONS_OK=ok
CFLAGS_DEBUG=-g
- CFLAGS_OPTIMIZE=-O2
+ CFLAGS_OPTIMIZE=-O
if test "$GCC" = "yes" ; then
CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
else
@@ -1134,6 +1134,7 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_LD_LIBS='${LIBS}'
SHLIB_SUFFIX=".so"
+ CFLAGS_OPTIMIZE=-O2
# egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
# when you inline the string and math operations. Turn this off to
# get rid of the warnings.
@@ -1221,7 +1222,7 @@ dnl AC_CHECK_TOOL(AR, ar)
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*)
+ NetBSD-*|FreeBSD-[[1-2]].*)
# Not available on all versions: check for include file.
AC_CHECK_HEADER(dlfcn.h, [
# NetBSD/SPARC needs -fPIC, -fpic will not do.
@@ -1263,6 +1264,31 @@ dnl AC_CHECK_TOOL(AR, ar)
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
TCL_LIB_VERSIONS_OK=nodots
;;
+ OpenBSD-*)
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ AC_MSG_CHECKING(for ELF)
+ AC_EGREP_CPP(yes, [
+#ifdef __ELF__
+ yes
+#endif
+ ],
+ [AC_MSG_RESULT(yes)
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'],
+ [AC_MSG_RESULT(no)
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0']
+ )
+
+ # OpenBSD doesn't do version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
FreeBSD-*)
# FreeBSD 3.* and greater have ELF.
SHLIB_CFLAGS="-fPIC"
@@ -1700,7 +1726,7 @@ dnl AC_CHECK_TOOL(AR, ar)
;;
IRIX*)
;;
- NetBSD-*|FreeBSD-*|OpenBSD-*)
+ NetBSD-*|FreeBSD-*)
;;
Rhapsody-*|Darwin-*)
;;