diff options
author | stwo <stwo> | 2010-02-19 13:26:36 (GMT) |
---|---|---|
committer | stwo <stwo> | 2010-02-19 13:26:36 (GMT) |
commit | 02f1403c00f04aab73f988a2ebdc0195d6feaed5 (patch) | |
tree | c0df4f8ca7664254569ebabf256b9d27487c380f /unix/tcl.m4 | |
parent | 8453d3cccbea40ae4ddb7145ba3fdaae9f034906 (diff) | |
download | tk-02f1403c00f04aab73f988a2ebdc0195d6feaed5.zip tk-02f1403c00f04aab73f988a2ebdc0195d6feaed5.tar.gz tk-02f1403c00f04aab73f988a2ebdc0195d6feaed5.tar.bz2 |
Correct compiler/linker flags for threaded builds on OpenBSD.
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index d7ca5a2..2013aa1 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1574,7 +1574,12 @@ dnl AC_CHECK_TOOL(AR, ar) AS_IF([test $tcl_cv_ld_elf = yes], [ LDFLAGS=-Wl,-export-dynamic ], [LDFLAGS=""]) - + AS_IF([test "${TCL_THREADS}" = "1"], [ + # OpenBSD builds and links with -pthread, never -lpthread. + LIBS=`echo $LIBS | sed s/-lpthread//` + CFLAGS="$CFLAGS -pthread" + SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread" + ]) # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots @@ -2111,7 +2116,7 @@ dnl # preprocessing tests use only CPPFLAGS. BSD/OS*) ;; CYGWIN_*) ;; IRIX*) ;; - NetBSD-*|FreeBSD-*) ;; + NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; *) SHLIB_CFLAGS="-fPIC" ;; |