summaryrefslogtreecommitdiffstats
path: root/unix/configure
diff options
context:
space:
mode:
authorstwo <stwo>2010-12-12 12:04:19 (GMT)
committerstwo <stwo>2010-12-12 12:04:19 (GMT)
commit28b289525dc0521894d68c247e18e96d3ab5f6c5 (patch)
treed4325f6617911eb985aaef33ad40365b2f9a945f /unix/configure
parente10a7bd72ca6e7e93c3428ebfb032bb8d1f248ac (diff)
downloadtcl-28b289525dc0521894d68c247e18e96d3ab5f6c5.zip
tcl-28b289525dc0521894d68c247e18e96d3ab5f6c5.tar.gz
tcl-28b289525dc0521894d68c247e18e96d3ab5f6c5.tar.bz2
Better building on OpenBSD.
Diffstat (limited to 'unix/configure')
-rwxr-xr-xunix/configure46
1 files changed, 33 insertions, 13 deletions
diff --git a/unix/configure b/unix/configure
index 7eaf6ed..525dcc8 100755
--- a/unix/configure
+++ b/unix/configure
@@ -7536,20 +7536,40 @@ fi
TCL_LIB_VERSIONS_OK=nodots
;;
OpenBSD-*)
- CFLAGS_OPTIMIZE='-O2'
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- if test $doRpath = yes; then
+ arch=`arch -s`
+ case "$arch" in
+ m88k|vax)
+ # Equivalent using configure option --disable-load
+ # Step 4 will set the necessary variables
+ DL_OBJS=""
+ ;;
+ *)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ if test $doRpath = yes; then
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
fi
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
+ ;;
+ esac
+ case "$arch" in
+ m88k|vax)
+ CFLAGS_OPTIMIZE="-O1"
+ ;;
+ sh)
+ CFLAGS_OPTIMIZE="-O0"
+ ;;
+ *)
+ CFLAGS_OPTIMIZE="-O2"
+ ;;
+ esac
echo "$as_me:$LINENO: checking for ELF" >&5
echo $ECHO_N "checking for ELF... $ECHO_C" >&6
if test "${tcl_cv_ld_elf+set}" = set; then
@@ -7589,10 +7609,10 @@ fi
if test "${TCL_THREADS}" = "1"; then
- # OpenBSD builds and links with -pthread, never -lpthread.
+ # On OpenBSD: Compile with -pthread
+ # Don't link with -lpthread
LIBS=`echo $LIBS | sed s/-lpthread//`
CFLAGS="$CFLAGS -pthread"
- SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
fi