TEA (tclconfig) Source Code

Check-in [eebc05f037]
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: eebc05f037827001e791715a0ecdbc32dd166b441d032c99ad217007fe5fdd9b
User & Date: hypnotoad 2017-11-21 22:47:22
Context
2017-11-27
17:45
Updating to the latest practcl check-in: dd0d9fad47 user: hypnotoad tags: practcl
2017-11-21
22:47
Pulling changes from trunk check-in: eebc05f037 user: hypnotoad tags: practcl
22:45
Adding zipfs support for TEA extensions check-in: b87ca83339 user: hypnotoad tags: trunk
2017-11-04
09:50
Tweak to practcl check-in: 47bbe99bd5 user: hypnotoad tags: practcl
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tcl.m4.

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
352
353
354
355
356
357
358


359
360
361
362
363
364
365
...
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
...
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
....
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
....
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
....
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
....
4432
4433
4434
4435
4436
4437
4438
4439




























































































4440
4441
4442
#
# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
# PRACTCL_WINDOWINGSYSTEM - windows cocoa hitheme x11 sdl
# TEA_PLATFORM        - windows unix
# TEA_TK_EXTENSION    - True if this is a Tk extension
# TEACUP_OS           - windows macosx linux generic
# TEACUP_TOOLSET      - Toolset in use (gcc,mingw,msvc,llvm)
# TEACUP_PROFILE      - win32  
#

#------------------------------------------------------------------------
# TEA_PATH_TCLCONFIG --
#
#	Locate the tclConfig.sh file and perform a sanity check on
#	the Tcl compile flags
................................................................................
#
# Results:
#
#	Substitutes the following vars:
#		TCL_BIN_DIR
#		TCL_SRC_DIR
#		TCL_LIB_FILE


#------------------------------------------------------------------------

AC_DEFUN([TEA_LOAD_TCLCONFIG], [
    AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh])

    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
        AC_MSG_RESULT([loading])
................................................................................
                  fi
                elif test "${TK_VERSION}" = "8.6" ; then
                  if test "${TK_PATCH_LEVEL}" > ".3" ; then
                    TEA_USE_HITHEME=yes;
                  fi
                elif test "${TK_VERSION}" > "8.6" ; then
                    TEA_USE_HITHEME=yes;
                fi 
		;;
	    *)
		TEA_WINDOWINGSYSTEM="x11"
                PRACTCL_WINDOWINGSYSTEM="x11"
		;;
	esac
    elif test "${TEA_PLATFORM}" = "windows" ; then
................................................................................
# Results:
#	Substitutes the following vars:
#		TCLSH_PROG
#------------------------------------------------------------------------

AC_DEFUN([TEA_PROG_TCLSH], [
    AC_MSG_CHECKING([for tclsh])
		
    AC_ARG_WITH(tclsh, [  --with-tclsh      Specify a local tcl shell to use for dynamic code], with_tclsh=${withval})
 	  # Use the value from --with-tclsh, if it was given
		TCLSH_PROG=0
		if test x"${with_tclsh}" != x ; then
	    if test -f "${with_tclsh}" ; then
		TCLSH_PROG=${with_tclsh}
	    else
................................................................................
# PRACTCL_TOOLSET     What toolset is in use (gcc or msvc)
#	PRACTCL_SHARED_LIB	Template rule for building a shared library
#	PRACTCL_STATIC_LIB	Template rule for building a static library
#	PRACTCL_STUB_LIB	  Template rule for building a stub library
# PRACTCL_VC_MANIFEST_EMBED_DLL Template rule for embedded VC manifest in DLL
# PRACTCL_VC_MANIFEST_EMBED_EXE Template rule for embedded VC manifest in EXE
# PRACTCL_NAME_LIBRARY Template rule for naming libraries
# 
#------------------------------------------------------------------------

AC_DEFUN([TEA_MAKE_LIB], [
  PRACTCL_TOOLSET="gcc"
	PRACTCL_VC_MANIFEST_EMBED_DLL=:
	PRACTCL_VC_MANIFEST_EMBED_EXE=:
  if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
................................................................................
	  ])
		PRACTCL_STUB_LIB="%STLIB_LD% -nodefaultlib -out:%OUTFILE% %LIBRARY_OBJECTS%"
	  MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\[$]@ \$(PKG_STUB_OBJECTS)"
  else
	  MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
	  MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
	  MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
	
	  PRACTCL_STATIC_LIB="%STLIB_LD% %OUTFILE% %LIBRARY_OBJECTS%"
	  PRACTCL_SHARED_LIB="%SHLIB_LD% -o %OUTFILE% %LIBRARY_OBJECTS% %SHLIB_LD_LIBS%"
    PRACTCL_STUB_LIB="%STLIB_LD% %OUTFILE% %LIBRARY_OBJECTS%"
  fi

  if test "${SHARED_BUILD}" = "1" ; then
	  MAKE_LIB="${MAKE_SHARED_LIB} "
................................................................................
      RANLIB=:
    else
      eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
    fi
    # Some packages build their own stubs libraries
    eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
  fi
  
  # Store the raw CFLAGS before we add the trimmings
  PRACTCL_CFLAGS=${CFLAGS}    
  # These are escaped so that only CFLAGS is picked up at configure time.
  # The other values will be substituted at make time.
  CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
  if test "${SHARED_BUILD}" = "1" ; then
    CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
  fi

................................................................................
  AC_SUBST(TEA_PLATFORM)
  AC_SUBST(TEA_WINDOWINGSYSTEM)
  AC_SUBST(TEACUP_OS)
  AC_SUBST(TEACUP_ARCH)
  AC_SUBST(TEACUP_TOOLSET)
  AC_SUBST(TEACUP_PROFILE)
])





























































































# Local Variables:
# mode: autoconf
# End:






|







 







>
>







 







|







 







|







 







|







 







|







 







|

|







 








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
...
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
...
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
....
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
....
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
....
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
....
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
#
# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
# PRACTCL_WINDOWINGSYSTEM - windows cocoa hitheme x11 sdl
# TEA_PLATFORM        - windows unix
# TEA_TK_EXTENSION    - True if this is a Tk extension
# TEACUP_OS           - windows macosx linux generic
# TEACUP_TOOLSET      - Toolset in use (gcc,mingw,msvc,llvm)
# TEACUP_PROFILE      - win32
#

#------------------------------------------------------------------------
# TEA_PATH_TCLCONFIG --
#
#	Locate the tclConfig.sh file and perform a sanity check on
#	the Tcl compile flags
................................................................................
#
# Results:
#
#	Substitutes the following vars:
#		TCL_BIN_DIR
#		TCL_SRC_DIR
#		TCL_LIB_FILE
#               TCL_ZIP_FILE
#               TCL_ZIPFS_SUPPORT
#------------------------------------------------------------------------

AC_DEFUN([TEA_LOAD_TCLCONFIG], [
    AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh])

    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
        AC_MSG_RESULT([loading])
................................................................................
                  fi
                elif test "${TK_VERSION}" = "8.6" ; then
                  if test "${TK_PATCH_LEVEL}" > ".3" ; then
                    TEA_USE_HITHEME=yes;
                  fi
                elif test "${TK_VERSION}" > "8.6" ; then
                    TEA_USE_HITHEME=yes;
                fi
		;;
	    *)
		TEA_WINDOWINGSYSTEM="x11"
                PRACTCL_WINDOWINGSYSTEM="x11"
		;;
	esac
    elif test "${TEA_PLATFORM}" = "windows" ; then
................................................................................
# Results:
#	Substitutes the following vars:
#		TCLSH_PROG
#------------------------------------------------------------------------

AC_DEFUN([TEA_PROG_TCLSH], [
    AC_MSG_CHECKING([for tclsh])

    AC_ARG_WITH(tclsh, [  --with-tclsh      Specify a local tcl shell to use for dynamic code], with_tclsh=${withval})
 	  # Use the value from --with-tclsh, if it was given
		TCLSH_PROG=0
		if test x"${with_tclsh}" != x ; then
	    if test -f "${with_tclsh}" ; then
		TCLSH_PROG=${with_tclsh}
	    else
................................................................................
# PRACTCL_TOOLSET     What toolset is in use (gcc or msvc)
#	PRACTCL_SHARED_LIB	Template rule for building a shared library
#	PRACTCL_STATIC_LIB	Template rule for building a static library
#	PRACTCL_STUB_LIB	  Template rule for building a stub library
# PRACTCL_VC_MANIFEST_EMBED_DLL Template rule for embedded VC manifest in DLL
# PRACTCL_VC_MANIFEST_EMBED_EXE Template rule for embedded VC manifest in EXE
# PRACTCL_NAME_LIBRARY Template rule for naming libraries
#
#------------------------------------------------------------------------

AC_DEFUN([TEA_MAKE_LIB], [
  PRACTCL_TOOLSET="gcc"
	PRACTCL_VC_MANIFEST_EMBED_DLL=:
	PRACTCL_VC_MANIFEST_EMBED_EXE=:
  if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
................................................................................
	  ])
		PRACTCL_STUB_LIB="%STLIB_LD% -nodefaultlib -out:%OUTFILE% %LIBRARY_OBJECTS%"
	  MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\[$]@ \$(PKG_STUB_OBJECTS)"
  else
	  MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
	  MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
	  MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"

	  PRACTCL_STATIC_LIB="%STLIB_LD% %OUTFILE% %LIBRARY_OBJECTS%"
	  PRACTCL_SHARED_LIB="%SHLIB_LD% -o %OUTFILE% %LIBRARY_OBJECTS% %SHLIB_LD_LIBS%"
    PRACTCL_STUB_LIB="%STLIB_LD% %OUTFILE% %LIBRARY_OBJECTS%"
  fi

  if test "${SHARED_BUILD}" = "1" ; then
	  MAKE_LIB="${MAKE_SHARED_LIB} "
................................................................................
      RANLIB=:
    else
      eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
    fi
    # Some packages build their own stubs libraries
    eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
  fi

  # Store the raw CFLAGS before we add the trimmings
  PRACTCL_CFLAGS=${CFLAGS}
  # These are escaped so that only CFLAGS is picked up at configure time.
  # The other values will be substituted at make time.
  CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
  if test "${SHARED_BUILD}" = "1" ; then
    CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
  fi

................................................................................
  AC_SUBST(TEA_PLATFORM)
  AC_SUBST(TEA_WINDOWINGSYSTEM)
  AC_SUBST(TEACUP_OS)
  AC_SUBST(TEACUP_ARCH)
  AC_SUBST(TEACUP_TOOLSET)
  AC_SUBST(TEACUP_PROFILE)
])

###
# Tip 430 - ZipFS Modifications
###
#------------------------------------------------------------------------
# TEA_ZIPFS_SUPPORT
#	Locate a zip encoder installed on the system path, or none.
#
# Arguments:
#	none
#
# Results:
#	Substitutes the following vars:
#		TCL_ZIP_FILE
#		TCL_ZIPFS_SUPPORT
#		TCL_ZIPFS_FLAG
#		ZIP_PROG
#------------------------------------------------------------------------
AC_DEFUN([TEA_ZIPFS_SUPPORT], [
    AC_MSG_CHECKING([for zipfs support])
    ZIP_PROG=""
    ZIP_PROG_OPTIONS=""
    ZIP_PROG_VFSSEARCH=""
    INSTALL_MSGS=""
    # If our native tclsh processes the "install" command line option
    # we can use it to mint zip files
    AS_IF([$TCLSH_PROG install],[
      ZIP_PROG=${TCLSH_PROG}
      ZIP_PROG_OPTIONS="install mkzip"
      ZIP_PROG_VFSSEARCH="."
      AC_MSG_RESULT([Can use Native Tclsh for Zip encoding])
    ])
    if test "x$ZIP_PROG" = "x" ; then
        AC_CACHE_VAL(ac_cv_path_zip, [
        search_path=`echo ${PATH} | sed -e 's/:/ /g'`
        for dir in $search_path ; do
            for j in `ls -r $dir/zip 2> /dev/null` \
                `ls -r $dir/zip 2> /dev/null` ; do
            if test x"$ac_cv_path_zip" = x ; then
                if test -f "$j" ; then
                ac_cv_path_zip=$j
                break
                fi
            fi
            done
        done
        ])
        if test -f "$ac_cv_path_zip" ; then
            ZIP_PROG="$ac_cv_path_zip "
            AC_MSG_RESULT([$ZIP_PROG])
            ZIP_PROG_OPTIONS="-rq"
            ZIP_PROG_VFSSEARCH="."
            AC_MSG_RESULT([Found INFO Zip in environment])
            # Use standard arguments for zip
        fi
    fi
    if test "x$ZIP_PROG" = "x" ; then
	    # It is not an error if an installed version of Zip can't be located.
        ZIP_PROG=""
        ZIP_PROG_OPTIONS=""
        ZIP_PROG_VFSSEARCH=""
        TCL_ZIPFS_SUPPORT=0
        TCL_ZIPFS_FLAG=
    else
        # ZIPFS Support
       eval "TCL_ZIP_FILE=\"${TCL_ZIP_FILE}\""
       if test ${TCL_ZIP_FILE} = "" ; then
          TCL_ZIPFS_SUPPORT=0
          TCL_ZIPFS_FLAG=
          INSTALL_LIBRARIES=install-libraries
          INSTALL_MSGS=install-msgs
       else
           if test ${SHARED_BUILD} = 1 ; then
              TCL_ZIPFS_SUPPORT=1
              INSTALL_LIBRARIES=install-libraries-zipfs-shared
           else
              TCL_ZIPFS_SUPPORT=2
              INSTALL_LIBRARIES=install-libraries-zipfs-static
           fi
          TCL_ZIPFS_FLAG=-DTCL_ZIPFS_SUPPORT
       fi
    fi

    AC_SUBST(TCL_ZIP_FILE)
    AC_SUBST(TCL_ZIPFS_SUPPORT)
    AC_SUBST(TCL_ZIPFS_FLAG)
    AC_SUBST(ZIP_PROG)
    AC_SUBST(ZIP_PROG_OPTIONS)
    AC_SUBST(ZIP_PROG_VFSSEARCH)
    AC_SUBST(INSTALL_LIBRARIES)
    AC_SUBST(INSTALL_MSGS)
])

# Local Variables:
# mode: autoconf
# End: