Tcl Extension Architecture (TEA) Sample Extension

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

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

Overview
Comment:Update to latest TEA.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 13e7233e84633cda043bcaf1071fc0445de10898241a36e58353d4e89c692bf6
User & Date: stu 2018-01-04 04:06:26
Context
2018-01-04
08:53
Use INSTALL_* and new DIST_INSTALL_* macros to make dist. Update with latest TEA. check-in: 3300c7f471 user: stu tags: trunk
04:06
Update to latest TEA. check-in: 13e7233e84 user: stu tags: trunk
2017-12-27
04:24
Updated to nmake rules 1.1 check-in: 15a1576b19 user: apnadkarni tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to configure.

  1360   1360      esac
  1361   1361     cat <<\_ACEOF
  1362   1362   
  1363   1363   Optional Features:
  1364   1364     --disable-option-checking  ignore unrecognized --enable/--with options
  1365   1365     --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  1366   1366     --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  1367         -  --enable-threads        build with threads
         1367  +  --enable-threads        build with threads (default: on)
  1368   1368     --enable-shared         build and link with shared libraries (default: on)
  1369   1369     --enable-stubs          build and link with stub libraries. Always true for
  1370   1370                             shared builds (default: on)
  1371   1371     --enable-64bit          enable 64bit support (default: off)
  1372   1372     --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
  1373   1373     --disable-rpath         disable rpath support (default: on)
  1374   1374     --enable-wince          enable Win/CE support (where applicable)
................................................................................
  2177   2177   # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
  2178   2178   # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
  2179   2179   #--------------------------------------------------------------------
  2180   2180   
  2181   2181   
  2182   2182       # TEA extensions pass this us the version of TEA they think they
  2183   2183       # are compatible with.
  2184         -    TEA_VERSION="3.10"
         2184  +    TEA_VERSION="3.12"
  2185   2185   
  2186         -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5
  2187         -$as_echo_n "checking for correct TEA configuration... " >&6; }
         2186  +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking TEA configuration" >&5
         2187  +$as_echo_n "checking TEA configuration... " >&6; }
  2188   2188       if test x"${PACKAGE_NAME}" = x ; then
  2189   2189   	as_fn_error $? "
  2190   2190   The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
  2191   2191       fi
  2192         -    if test x"3.10" = x ; then
  2193         -	as_fn_error $? "
  2194         -TEA version not specified." "$LINENO" 5
  2195         -    elif test "3.10" != "${TEA_VERSION}" ; then
  2196         -	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&5
  2197         -$as_echo "warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&6; }
  2198         -    else
  2199   2192   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
  2200   2193   $as_echo "ok (TEA ${TEA_VERSION})" >&6; }
  2201         -    fi
  2202   2194   
  2203   2195       # If the user did not set CFLAGS, set it now to keep macros
  2204   2196       # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
  2205   2197       if test "${CFLAGS+set}" != "set" ; then
  2206   2198   	CFLAGS=""
  2207   2199       fi
  2208   2200   
................................................................................
  4160   4152   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  4161   4153   ac_compiler_gnu=$ac_cv_c_compiler_gnu
  4162   4154   
  4163   4155   
  4164   4156       INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
  4165   4157       INSTALL_DATA_DIR='${INSTALL} -d -m 755'
  4166   4158       INSTALL_DATA='${INSTALL} -m 644'
  4167         -    INSTALL_PROGRAM='${INSTALL}'
  4168         -    INSTALL_SCRIPT='${INSTALL}'
  4169         -    INSTALL_LIBRARY='${INSTALL_DATA}'
         4159  +    INSTALL_PROGRAM='${INSTALL} -m 755'
         4160  +    INSTALL_SCRIPT='${INSTALL} -m 755'
         4161  +    INSTALL_LIBRARY='${INSTALL} -m 644'
  4170   4162   
  4171   4163   
  4172   4164   
  4173   4165   
  4174   4166   
  4175   4167   
  4176   4168   
................................................................................
  5145   5137       ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
  5146   5138   if test "x$ac_cv_header_errno_h" = xyes; then :
  5147   5139   
  5148   5140   else
  5149   5141   
  5150   5142   $as_echo "#define NO_ERRNO_H 1" >>confdefs.h
  5151   5143   
  5152         -fi
  5153         -
  5154         -
  5155         -    ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
  5156         -if test "x$ac_cv_header_float_h" = xyes; then :
  5157         -
  5158         -else
  5159         -
  5160         -$as_echo "#define NO_FLOAT_H 1" >>confdefs.h
  5161         -
  5162   5144   fi
  5163   5145   
  5164   5146   
  5165   5147       ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default"
  5166   5148   if test "x$ac_cv_header_values_h" = xyes; then :
  5167   5149   
  5168   5150   else
................................................................................
  6908   6890   	    CC_SEARCH_FLAGS=""
  6909   6891   	    LD_SEARCH_FLAGS=""
  6910   6892   	    ;;
  6911   6893   	Haiku*)
  6912   6894   	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  6913   6895   	    SHLIB_CFLAGS="-fPIC"
  6914   6896   	    SHLIB_SUFFIX=".so"
  6915         -	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
         6897  +	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
  6916   6898   	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
  6917   6899   $as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
  6918   6900   if ${ac_cv_lib_network_inet_ntoa+:} false; then :
  6919   6901     $as_echo_n "(cached) " >&6
  6920   6902   else
  6921   6903     ac_check_lib_save_LIBS=$LIBS
  6922   6904   LIBS="-lnetwork  $LIBS"
................................................................................
  7135   7117   	    SHLIB_CFLAGS="-fPIC"
  7136   7118   	    SHLIB_SUFFIX=".so"
  7137   7119   
  7138   7120   	    # TEA specific:
  7139   7121   	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
  7140   7122   
  7141   7123   	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
  7142         -	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
         7124  +	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
  7143   7125   	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  7144   7126   	    if test $doRpath = yes; then :
  7145   7127   
  7146   7128   		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  7147   7129   fi
  7148   7130   	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  7149   7131   	    if test "`uname -m`" = "alpha"; then :
................................................................................
  7218   7200   	    alpha|sparc64)
  7219   7201   		SHLIB_CFLAGS="-fPIC"
  7220   7202   		;;
  7221   7203   	    *)
  7222   7204   		SHLIB_CFLAGS="-fpic"
  7223   7205   		;;
  7224   7206   	    esac
  7225         -	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
         7207  +	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
  7226   7208   	    SHLIB_SUFFIX=".so"
  7227   7209   	    if test $doRpath = yes; then :
  7228   7210   
  7229   7211   		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  7230   7212   fi
  7231   7213   	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  7232   7214   	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
................................................................................
  7243   7225   	    # OpenBSD doesn't do version numbers with dots.
  7244   7226   	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
  7245   7227   	    TCL_LIB_VERSIONS_OK=nodots
  7246   7228   	    ;;
  7247   7229   	NetBSD-*)
  7248   7230   	    # NetBSD has ELF and can use 'cc -shared' to build shared libs
  7249   7231   	    SHLIB_CFLAGS="-fPIC"
  7250         -	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
         7232  +	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
  7251   7233   	    SHLIB_SUFFIX=".so"
  7252   7234   	    LDFLAGS="$LDFLAGS -export-dynamic"
  7253   7235   	    if test $doRpath = yes; then :
  7254   7236   
  7255   7237   		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  7256   7238   fi
  7257   7239   	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}

Changes to configure.ac.

    23     23   
    24     24   #--------------------------------------------------------------------
    25     25   # Call TEA_INIT as the first TEA_ macro to set up initial vars.
    26     26   # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
    27     27   # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
    28     28   #--------------------------------------------------------------------
    29     29   
    30         -TEA_INIT([3.10])
           30  +TEA_INIT()
    31     31   
    32     32   AC_CONFIG_AUX_DIR(tclconfig)
    33     33   
    34     34   #--------------------------------------------------------------------
    35     35   # Load the tclConfig.sh file
    36     36   #--------------------------------------------------------------------
    37     37