Tcl Extension Architecture (TEA) Sample Extension

Check-in [c934f48821]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Better building on OpenBSD.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c934f48821993c54d4afdf695961501e16e3cc08
User & Date: stwo 2010-12-15 04:22:53
Context
2010-12-15
05:35
Upgrade to newer install-sh and use it. check-in: 1f4d6ba364 user: stwo tags: trunk
04:22
Better building on OpenBSD. check-in: c934f48821 user: stwo tags: trunk
2010-12-14
19:21
Make .SUFFIXES work for more (BSD) make programs. check-in: 8a6e7c3d6c user: stwo tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ChangeLog.

     1      1   2010-12-14  Stuart Cassoff  <stwo@users.sourceforge.net>
     2      2   
     3         -	* Makefile.in: 	Make .SUFFIXES work for more (BSD) make programs.
            3  +	* configure:	Regenerated to use latest TEA tcl.m4.
            4  +			Better building on OpenBSD.
            5  +
            6  +2010-12-14  Stuart Cassoff  <stwo@users.sourceforge.net>
            7  +
            8  +	* Makefile.in: Make .SUFFIXES work for more (BSD) make programs.
     4      9   
     5     10   2010-12-14  Jan Nijtmans <nijtmans@users.sf.net>
     6     11   
     7     12   	* configure: Regenerated to use latest TEA tcl.m4.
     8     13   	This adds cross-compile support to UNIX and Win, and
     9     14   	support for building 64-bit executables with mingw-w64
    10     15   	build tools.

Changes to configure.

  8280   8280   
  8281   8281   		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  8282   8282   		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  8283   8283   fi
  8284   8284   
  8285   8285   	    ;;
  8286   8286   	OpenBSD-*)
  8287         -	    SHLIB_CFLAGS="-fPIC"
  8288         -	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
  8289         -	    SHLIB_SUFFIX=".so"
  8290         -	    if test $doRpath = yes; then
         8287  +	    arch=`arch -s`
         8288  +	    case "$arch" in
         8289  +	    m88k|vax)
         8290  +		SHLIB_SUFFIX=""
         8291  +		SHARED_LIB_SUFFIX=""
         8292  +		;;
         8293  +	    *)
         8294  +		SHLIB_CFLAGS="-fPIC"
         8295  +		SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
         8296  +		SHLIB_SUFFIX=".so"
         8297  +		if test $doRpath = yes; then
  8291   8298   
  8292         -		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
         8299  +		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  8293   8300   fi
  8294   8301   
  8295         -	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  8296         -	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
         8302  +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
         8303  +		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
         8304  +		;;
         8305  +	    esac
         8306  +	    case "$arch" in
         8307  +	    m88k|vax)
         8308  +		CFLAGS_OPTIMIZE="-O1"
         8309  +		;;
         8310  +	    *)
         8311  +		CFLAGS_OPTIMIZE="-O2"
         8312  +		;;
         8313  +	    esac
  8297   8314   	    echo "$as_me:$LINENO: checking for ELF" >&5
  8298   8315   echo $ECHO_N "checking for ELF... $ECHO_C" >&6
  8299   8316   if test "${tcl_cv_ld_elf+set}" = set; then
  8300   8317     echo $ECHO_N "(cached) $ECHO_C" >&6
  8301   8318   else
  8302   8319   
  8303   8320   		cat >conftest.$ac_ext <<_ACEOF
................................................................................
  8329   8346   
  8330   8347   else
  8331   8348     LDFLAGS=""
  8332   8349   fi
  8333   8350   
  8334   8351   	    if test "${TCL_THREADS}" = "1"; then
  8335   8352   
  8336         -		# OpenBSD builds and links with -pthread, never -lpthread.
         8353  +		# On OpenBSD:	Compile with -pthread
         8354  +		#		Don't link with -lpthread
  8337   8355   		LIBS=`echo $LIBS | sed s/-lpthread//`
  8338   8356   		CFLAGS="$CFLAGS -pthread"
  8339         -		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
  8340   8357   
  8341   8358   fi
  8342   8359   
  8343   8360   	    # OpenBSD doesn't do version numbers with dots.
  8344   8361   	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
  8345   8362   	    TCL_LIB_VERSIONS_OK=nodots
  8346   8363   	    ;;