TEA (tclconfig) Source Code

Check-in [19783bad7e]
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:Pulling changes from trunk
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | practcl
Files: files | file ages | folders
SHA3-256: 19783bad7e94d0dcc0da28760c09933a9a1d3fddc018840c36ed1913194081d8
User & Date: hypnotoad 2018-07-13 18:51:59
Context
2018-09-24
14:05
Updating Practcl to the latest version from tcllib check-in: 68c6d500d5 user: hypnotoad tags: practcl
2018-07-13
18:51
Pulling changes from trunk check-in: 19783bad7e user: hypnotoad tags: practcl
18:51
Updating practcl check-in: d290270581 user: hypnotoad tags: practcl
2018-06-20
07:17
Undo TEA_PATH_CONFIG changes regarding addtional paths until it's more clear where OpenBSD/FreeBSD stores it's 'official' itclConfig.sh/tdbcConfig.sh. Fix [923f400aa03a5608]: New paths required for Darwin

Stu adds: This has nothing to do with where any one os stores itcl/itkConfig.sh.

It shouldn't matter to *tclconfig* where any anything stores anything, should it?

This is supposed to be a generic routine, used to pick up the *Config.sh of any extension.

There is no "common store" for *Config.sh files on any platform, afaict. Extensions currently keep their *Config.sh files in their own dirs. I believe this to be the case currently for all extensions and platforms. Perhaps changing this convention is a good idea.

The way things are currently, adding dirs for itcl would then mean adding dirs fors tdbc, tdom, etc.? I don't see that as being viable in the long-term. check-in: df3b672e10 user: jan.nijtmans tags: trunk

Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tcl.m4.

   106    106   
   107    107   	    # on Darwin, check in Framework installation locations
   108    108   	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
   109    109   		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
   110    110   			`ls -d /Library/Frameworks 2>/dev/null` \
   111    111   			`ls -d /Network/Library/Frameworks 2>/dev/null` \
   112    112   			`ls -d /System/Library/Frameworks 2>/dev/null` \
          113  +			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks/Tcl.framework 2>/dev/null` \
          114  +			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Network/Library/Frameworks/Tcl.framework 2>/dev/null` \
          115  +			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework 2>/dev/null` \
   113    116   			; do
   114    117   		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
   115    118   			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
   116    119   			break
   117    120   		    fi
   118    121   		done
   119    122   	    fi
................................................................................
   132    135   	    fi
   133    136   
   134    137   	    # check in a few common install locations
   135    138   	    if test x"${ac_cv_c_tclconfig}" = x ; then
   136    139   		for i in `ls -d ${libdir} 2>/dev/null` \
   137    140   			`ls -d ${exec_prefix}/lib 2>/dev/null` \
   138    141   			`ls -d ${prefix}/lib 2>/dev/null` \
   139         -			`ls -d /usr/contrib/lib 2>/dev/null` \
   140    142   			`ls -d /usr/local/lib 2>/dev/null` \
          143  +			`ls -d /usr/contrib/lib 2>/dev/null` \
   141    144   			`ls -d /usr/pkg/lib 2>/dev/null` \
   142    145   			`ls -d /usr/lib 2>/dev/null` \
   143    146   			`ls -d /usr/lib64 2>/dev/null` \
   144    147   			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
   145    148   			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
          149  +			`ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
          150  +			`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
          151  +			`ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
          152  +			`ls -d /usr/local/lib/tcl/tcl8.5 2>/dev/null` \
   146    153   			; do
   147    154   		    if test -f "$i/tclConfig.sh" ; then
   148    155   			ac_cv_c_tclconfig="`(cd $i; pwd)`"
   149    156   			break
   150    157   		    fi
   151    158   		done
   152    159   	    fi
................................................................................
   263    270   
   264    271   	    # on Darwin, check in Framework installation locations
   265    272   	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
   266    273   		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
   267    274   			`ls -d /Library/Frameworks 2>/dev/null` \
   268    275   			`ls -d /Network/Library/Frameworks 2>/dev/null` \
   269    276   			`ls -d /System/Library/Frameworks 2>/dev/null` \
          277  +			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks/Tcl.framework 2>/dev/null` \
          278  +			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Network/Library/Frameworks/Tcl.framework 2>/dev/null` \
          279  +			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework 2>/dev/null` \
   270    280   			; do
   271    281   		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
   272    282   			ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
   273    283   			break
   274    284   		    fi
   275    285   		done
   276    286   	    fi
................................................................................
   278    288   	    # check in a few common install locations
   279    289   	    if test x"${ac_cv_c_tkconfig}" = x ; then
   280    290   		for i in `ls -d ${libdir} 2>/dev/null` \
   281    291   			`ls -d ${exec_prefix}/lib 2>/dev/null` \
   282    292   			`ls -d ${prefix}/lib 2>/dev/null` \
   283    293   			`ls -d /usr/local/lib 2>/dev/null` \
   284    294   			`ls -d /usr/contrib/lib 2>/dev/null` \
          295  +			`ls -d /usr/pkg/lib 2>/dev/null` \
   285    296   			`ls -d /usr/lib 2>/dev/null` \
   286    297   			`ls -d /usr/lib64 2>/dev/null` \
          298  +			`ls -d /usr/lib/tk8.6 2>/dev/null` \
          299  +			`ls -d /usr/lib/tk8.5 2>/dev/null` \
          300  +			`ls -d /usr/local/lib/tk8.6 2>/dev/null` \
          301  +			`ls -d /usr/local/lib/tk8.5 2>/dev/null` \
          302  +			`ls -d /usr/local/lib/tcl/tk8.6 2>/dev/null` \
          303  +			`ls -d /usr/local/lib/tcl/tk8.5 2>/dev/null` \
   287    304   			; do
   288    305   		    if test -f "$i/tkConfig.sh" ; then
   289    306   			ac_cv_c_tkconfig="`(cd $i; pwd)`"
   290    307   			break
   291    308   		    fi
   292    309   		done
   293    310   	    fi
................................................................................
  2102   2119       # libraries to the right flags for gcc, instead of those for the
  2103   2120       # standard manufacturer compiler.
  2104   2121   
  2105   2122       AS_IF([test "$GCC" = yes], [
  2106   2123   	case $system in
  2107   2124   	    AIX-*) ;;
  2108   2125   	    BSD/OS*) ;;
  2109         -	    CYGWIN_*|MINGW32_*) ;;
         2126  +	    CYGWIN_*|MINGW32_*|MINGW64_*) ;;
  2110   2127   	    IRIX*) ;;
  2111   2128   	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
  2112   2129   	    Darwin-*) ;;
  2113   2130   	    SCO_SV-3.2*) ;;
  2114   2131   	    windows) ;;
  2115   2132   	    *) SHLIB_CFLAGS="-fPIC" ;;
  2116   2133   	esac])
................................................................................
  2356   2373       case $tcl_cv_api_serial in
  2357   2374   	termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);;
  2358   2375   	termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
  2359   2376   	sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
  2360   2377       esac
  2361   2378   ])
  2362   2379   
  2363         -#--------------------------------------------------------------------
  2364         -# TEA_MISSING_POSIX_HEADERS
  2365         -#
  2366         -#	Supply substitutes for missing POSIX header files.  Special
  2367         -#	notes:
  2368         -#	    - stdlib.h doesn't define strtol, strtoul, or
  2369         -#	      strtod in some versions of SunOS
  2370         -#	    - some versions of string.h don't declare procedures such
  2371         -#	      as strstr
  2372         -#
  2373         -# Arguments:
  2374         -#	none
  2375         -#
  2376         -# Results:
  2377         -#
  2378         -#	Defines some of the following vars:
  2379         -#		NO_DIRENT_H
  2380         -#		NO_ERRNO_H
  2381         -#		NO_VALUES_H
  2382         -#		HAVE_LIMITS_H or NO_LIMITS_H
  2383         -#		NO_STDLIB_H
  2384         -#		NO_STRING_H
  2385         -#		NO_SYS_WAIT_H
  2386         -#		NO_DLFCN_H
  2387         -#		HAVE_SYS_PARAM_H
  2388         -#
  2389         -#		HAVE_STRING_H ?
  2390         -#
  2391         -# tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and
  2392         -# CHECK on limits.h
  2393         -#--------------------------------------------------------------------
  2394         -
  2395         -AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [
  2396         -    AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [
  2397         -    AC_TRY_LINK([#include <sys/types.h>
  2398         -#include <dirent.h>], [
  2399         -#ifndef _POSIX_SOURCE
  2400         -#   ifdef __Lynx__
  2401         -	/*
  2402         -	 * Generate compilation error to make the test fail:  Lynx headers
  2403         -	 * are only valid if really in the POSIX environment.
  2404         -	 */
  2405         -
  2406         -	missing_procedure();
  2407         -#   endif
  2408         -#endif
  2409         -DIR *d;
  2410         -struct dirent *entryPtr;
  2411         -char *p;
  2412         -d = opendir("foobar");
  2413         -entryPtr = readdir(d);
  2414         -p = entryPtr->d_name;
  2415         -closedir(d);
  2416         -], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
  2417         -
  2418         -    if test $tcl_cv_dirent_h = no; then
  2419         -	AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
  2420         -    fi
  2421         -
  2422         -    # TEA specific:
  2423         -    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
  2424         -    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
  2425         -    AC_CHECK_HEADER(limits.h,
  2426         -	[AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
  2427         -	[AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])])
  2428         -    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
  2429         -    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
  2430         -    AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
  2431         -    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
  2432         -    if test $tcl_ok = 0; then
  2433         -	AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
  2434         -    fi
  2435         -    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
  2436         -    AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
  2437         -    AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
  2438         -
  2439         -    # See also memmove check below for a place where NO_STRING_H can be
  2440         -    # set and why.
  2441         -
  2442         -    if test $tcl_ok = 0; then
  2443         -	AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?])
  2444         -    fi
  2445         -
  2446         -    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
  2447         -    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])])
  2448         -
  2449         -    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
  2450         -    AC_HAVE_HEADERS(sys/param.h)
  2451         -])
  2452         -
  2453   2380   #--------------------------------------------------------------------
  2454   2381   # TEA_PATH_X
  2455   2382   #
  2456   2383   #	Locate the X11 header files and the X11 library archive.  Try
  2457   2384   #	the ac_path_x macro first, but if it doesn't find the X stuff
  2458   2385   #	(e.g. because there's no xmkmf program) then check through
  2459   2386   #	a list of possible directories.  Under some conditions the
................................................................................
  2877   2804       # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
  2878   2805       if test "${CFLAGS+set}" != "set" ; then
  2879   2806   	CFLAGS=""
  2880   2807       fi
  2881   2808   		TEA_TK_EXTENSION=0
  2882   2809   		AC_SUBST(TEA_TK_EXTENSION)
  2883   2810       case "`uname -s`" in
  2884         -	*win32*|*WIN32*|*MINGW32_*)
         2811  +	*win32*|*WIN32*|*MINGW32_*|*MINGW64_*)
  2885   2812   	    AC_CHECK_PROG(CYGPATH, cygpath, cygpath -m, echo)
  2886   2813   	    EXEEXT=".exe"
  2887   2814   	    TEA_PLATFORM="windows"
  2888   2815   	    ;;
  2889   2816   	*CYGWIN_*)
  2890   2817   	    EXEEXT=".exe"
  2891   2818   	    # CYGPATH and TEA_PLATFORM are determined later in LOAD_TCLCONFIG
................................................................................
  3286   3213       fi
  3287   3214   
  3288   3215       #--------------------------------------------------------------------
  3289   3216       # Common compiler flag setup
  3290   3217       #--------------------------------------------------------------------
  3291   3218   
  3292   3219       AC_C_BIGENDIAN
  3293         -    if test "${TEA_PLATFORM}" = "unix" ; then
  3294         -	TEA_TCL_LINK_LIBS
  3295         -	TEA_MISSING_POSIX_HEADERS
  3296         -	# Let the user call this, because if it triggers, they will
  3297         -	# need a compat/strtod.c that is correct.  Users can also
  3298         -	# use Tcl_GetDouble(FromObj) instead.
  3299         -	#TEA_BUGGY_STRTOD
  3300         -    fi
  3301   3220   ])
  3302   3221   
  3303   3222   #------------------------------------------------------------------------
  3304   3223   # TEA_MAKE_LIB --
  3305   3224   #
  3306   3225   #	Generate a line that can be used to build a shared/unshared library
  3307   3226   #	in a platform independent manner.
................................................................................
  3984   3903   	    # check in a few common install locations
  3985   3904   	    if test x"${ac_cv_c_$1config}" = x ; then
  3986   3905   		for i in `ls -d ${libdir} 2>/dev/null` \
  3987   3906   			`ls -d ${exec_prefix}/lib 2>/dev/null` \
  3988   3907   			`ls -d ${prefix}/lib 2>/dev/null` \
  3989   3908   			`ls -d /usr/local/lib 2>/dev/null` \
  3990   3909   			`ls -d /usr/contrib/lib 2>/dev/null` \
         3910  +			`ls -d /usr/pkg/lib 2>/dev/null` \
  3991   3911   			`ls -d /usr/lib 2>/dev/null` \
  3992   3912   			`ls -d /usr/lib64 2>/dev/null` \
  3993   3913   			; do
  3994   3914   		    if test -f "$i/$1Config.sh" ; then
  3995   3915   			ac_cv_c_$1config=`(cd $i; pwd)`
  3996   3916   			break
  3997   3917   		    fi