Check-in [41203a3f23]
Not logged in

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

Overview
Comment:add ral to [undroidwish] builds
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 41203a3f23a776f89997054373fad23bd5213061
User & Date: chw 2016-11-13 08:25:02.091
Context
2016-11-14
12:19
add tclepeg to [undroidwish] builds check-in: 228b49e783 user: chw tags: trunk
2016-11-13
08:25
add ral to [undroidwish] builds check-in: 41203a3f23 user: chw tags: trunk
07:02
add selected twapi upstream changes check-in: c1852681f3 user: chw tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to jni/tclral/configure.

more than 10,000 changes

Changes to jni/tclral/tclconfig/install-sh.
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
# install - install a program, script, or datafile

scriptversion=2010-02-06.18; # UTC

# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#



|







1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
# install - install a program, script, or datafile

scriptversion=2011-04-20.01; # UTC

# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
116
117
118
119
120
121
122

123
124
125
126
127
128
129
  -c            (ignored)
  -C            install only if different (preserve the last data modification time)
  -d            create directories instead of installing files.
  -g GROUP      $chgrpprog installed files to GROUP.
  -m MODE       $chmodprog installed files to MODE.
  -o USER       $chownprog installed files to USER.
  -s            $stripprog installed files.

  -t DIRECTORY  install into DIRECTORY.
  -T            report an error if DSTFILE is a directory.

Environment variables override the default commands:
  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
  RMPROG STRIPPROG
"







>







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
  -c            (ignored)
  -C            install only if different (preserve the last data modification time)
  -d            create directories instead of installing files.
  -g GROUP      $chgrpprog installed files to GROUP.
  -m MODE       $chmodprog installed files to MODE.
  -o USER       $chownprog installed files to USER.
  -s            $stripprog installed files.
  -S            $stripprog installed files.
  -t DIRECTORY  install into DIRECTORY.
  -T            report an error if DSTFILE is a directory.

Environment variables override the default commands:
  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
  RMPROG STRIPPROG
"
150
151
152
153
154
155
156



157
158
159
160
161
162
163
	esac
	shift;;

    -o) chowncmd="$chownprog $2"
	shift;;

    -s) stripcmd=$stripprog;;




    -t) dst_arg=$2
	shift;;

    -T) no_target_directory=true;;

    --version) echo "$0 $scriptversion"; exit $?;;







>
>
>







151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
	esac
	shift;;

    -o) chowncmd="$chownprog $2"
	shift;;

    -s) stripcmd=$stripprog;;

    -S) stripcmd="$stripprog $2"
	shift;;

    -t) dst_arg=$2
	shift;;

    -T) no_target_directory=true;;

    --version) echo "$0 $scriptversion"; exit $?;;
Changes to jni/tclral/tclconfig/tcl.m4.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# tcl.m4 --
#
#	This file provides a set of autoconf macros to help TEA-enable
#	a Tcl extension.
#
# Copyright (c) 1999-2000 Ajuba Solutions.
# Copyright (c) 2002-2005 ActiveState Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: tcl.m4,v 1.3 2011/06/05 18:01:10 mangoa01 Exp $

AC_PREREQ(2.57)

dnl TEA extensions pass us the version of TEA they think they
dnl are compatible with (must be set in TEA_INIT below)
dnl TEA_VERSION="3.9"











<
<







1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16
17
# tcl.m4 --
#
#	This file provides a set of autoconf macros to help TEA-enable
#	a Tcl extension.
#
# Copyright (c) 1999-2000 Ajuba Solutions.
# Copyright (c) 2002-2005 ActiveState Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



AC_PREREQ(2.57)

dnl TEA extensions pass us the version of TEA they think they
dnl are compatible with (must be set in TEA_INIT below)
dnl TEA_VERSION="3.9"

136
137
138
139
140
141
142


143
144
145
146
147
148
149
		for i in `ls -d ${libdir} 2>/dev/null` \
			`ls -d ${exec_prefix}/lib 2>/dev/null` \
			`ls -d ${prefix}/lib 2>/dev/null` \
			`ls -d /usr/local/lib 2>/dev/null` \
			`ls -d /usr/contrib/lib 2>/dev/null` \
			`ls -d /usr/lib 2>/dev/null` \
			`ls -d /usr/lib64 2>/dev/null` \


			; do
		    if test -f "$i/tclConfig.sh" ; then
			ac_cv_c_tclconfig="`(cd $i; pwd)`"
			break
		    fi
		done
	    fi







>
>







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
		for i in `ls -d ${libdir} 2>/dev/null` \
			`ls -d ${exec_prefix}/lib 2>/dev/null` \
			`ls -d ${prefix}/lib 2>/dev/null` \
			`ls -d /usr/local/lib 2>/dev/null` \
			`ls -d /usr/contrib/lib 2>/dev/null` \
			`ls -d /usr/lib 2>/dev/null` \
			`ls -d /usr/lib64 2>/dev/null` \
			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
			; do
		    if test -f "$i/tclConfig.sh" ; then
			ac_cv_c_tclconfig="`(cd $i; pwd)`"
			break
		    fi
		done
	    fi
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
		    fi
		done
	    fi
	])

	if test x"${ac_cv_c_tclconfig}" = x ; then
	    TCL_BIN_DIR="# no Tcl configs found"
	    AC_MSG_ERROR([Can't find Tcl configuration definitions])
	else
	    no_tcl=
	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
	    AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh])
	fi
    fi
])







|







166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
		    fi
		done
	    fi
	])

	if test x"${ac_cv_c_tclconfig}" = x ; then
	    TCL_BIN_DIR="# no Tcl configs found"
	    AC_MSG_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
	else
	    no_tcl=
	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
	    AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh])
	fi
    fi
])
221
222
223
224
225
226
227


228
229
230
231
232
233
234
			if test -f "${with_tkconfig}"; then
			    AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself])
			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
			fi ;;
		esac
		if test -f "${with_tkconfig}/tkConfig.sh" ; then
		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"


		else
		    AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
		fi
	    fi

	    # then check for a private Tk library
	    if test x"${ac_cv_c_tkconfig}" = x ; then







>
>







221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
			if test -f "${with_tkconfig}"; then
			    AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself])
			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
			fi ;;
		esac
		if test -f "${with_tkconfig}/tkConfig.sh" ; then
		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
		elif test -f "${with_tkconfig}/sdl2tkConfig.sh" ; then
		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
		else
		    AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
		fi
	    fi

	    # then check for a private Tk library
	    if test x"${ac_cv_c_tkconfig}" = x ; then
249
250
251
252
253
254
255




256
257
258
259
260
261
262
			    -a -f "$i/win/tkConfig.sh" ; then
			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
			break
		    fi
		    if test -f "$i/unix/tkConfig.sh" ; then
			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
			break




		    fi
		done
	    fi

	    # on Darwin, check in Framework installation locations
	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \







>
>
>
>







251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
			    -a -f "$i/win/tkConfig.sh" ; then
			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
			break
		    fi
		    if test -f "$i/unix/tkConfig.sh" ; then
			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
			break
		    fi
		    if test -f "$i/sdl/sdl2tkConfig.sh" ; then
			ac_cv_c_tkconfig="`(cd $i/sdl; pwd)`"
			break
		    fi
		done
	    fi

	    # on Darwin, check in Framework installation locations
	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
313
314
315
316
317
318
319




320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
			break
		    fi
		    if test -f "$i/unix/tkConfig.sh" ; then
			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
			break
		    fi




		done
	    fi
	])

	if test x"${ac_cv_c_tkconfig}" = x ; then
	    TK_BIN_DIR="# no Tk configs found"
	    AC_MSG_ERROR([Can't find Tk configuration definitions])
	else
	    no_tk=
	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
	    AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh])
	fi
    fi
])

#------------------------------------------------------------------------
# TEA_LOAD_TCLCONFIG --
#
#	Load the tclConfig.sh file
#
# Arguments:
#
#	Requires the following vars to be set:
#		TCL_BIN_DIR
#
# Results:
#
#	Subst 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])







>
>
>
>






|




















|



<







319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360

361
362
363
364
365
366
367
			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
			break
		    fi
		    if test -f "$i/unix/tkConfig.sh" ; then
			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
			break
		    fi
		    if test -f "$i/sdl/sdl2tkConfig.sh" ; then
			ac_cv_c_tkconfig="`(cd $i/sdl; pwd)`"
			break
		    fi
		done
	    fi
	])

	if test x"${ac_cv_c_tkconfig}" = x ; then
	    TK_BIN_DIR="# no Tk configs found"
	    AC_MSG_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
	else
	    no_tk=
	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
	    AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh])
	fi
    fi
])

#------------------------------------------------------------------------
# TEA_LOAD_TCLCONFIG --
#
#	Load the tclConfig.sh file
#
# Arguments:
#
#	Requires the following vars to be set:
#		TCL_BIN_DIR
#
# 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])
413
414
415
416
417
418
419
420
421
422
423


424

425
426
427
428
429
430


431
432
433
434
435
436
437
438
439
440
441
442
443
444
445

446
447
448
449
450
451
452
    AC_SUBST(TCL_LIB_FLAG)
    AC_SUBST(TCL_LIB_SPEC)

    AC_SUBST(TCL_STUB_LIB_FILE)
    AC_SUBST(TCL_STUB_LIB_FLAG)
    AC_SUBST(TCL_STUB_LIB_SPEC)

    case "`uname -s`" in
	*CYGWIN_*)
	    AC_MSG_CHECKING([for cygwin variant])
	    case ${TCL_EXTRA_CFLAGS} in


		*-mwin32*|*-mno-cygwin*)

		    TEA_PLATFORM="windows"
		    CFLAGS="$CFLAGS -mwin32"
		    AC_MSG_RESULT([win32])
		    ;;
		*)
		    TEA_PLATFORM="unix"


		    AC_MSG_RESULT([unix])
		    ;;
	    esac
	    EXEEXT=".exe"
	    ;;
	*)
	    ;;
    esac

    # The BUILD_$pkg is to define the correct extern storage class
    # handling when making this package
    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
	    [Building extension source?])
    # Do this here as we have fully defined TEA_PLATFORM now
    if test "${TEA_PLATFORM}" = "windows" ; then

	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
    fi

    # TEA specific:
    AC_SUBST(CLEANFILES)
    AC_SUBST(TCL_LIBS)
    AC_SUBST(TCL_DEFS)







<
<
|
|
>
>
|
>
|
<
<
<
<
|
>
>
|
<
<
<
<
<
<
<







>







422
423
424
425
426
427
428


429
430
431
432
433
434
435




436
437
438
439







440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
    AC_SUBST(TCL_LIB_FLAG)
    AC_SUBST(TCL_LIB_SPEC)

    AC_SUBST(TCL_STUB_LIB_FILE)
    AC_SUBST(TCL_STUB_LIB_FLAG)
    AC_SUBST(TCL_STUB_LIB_SPEC)



    AC_MSG_CHECKING([platform])
    hold_cc=$CC; CC="$TCL_CC"
    AC_TRY_COMPILE(,[
	    #ifdef _WIN32
		#error win32
	    #endif
    ], TEA_PLATFORM="unix",




	    TEA_PLATFORM="windows"
    )
    CC=$hold_cc
    AC_MSG_RESULT($TEA_PLATFORM)








    # The BUILD_$pkg is to define the correct extern storage class
    # handling when making this package
    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
	    [Building extension source?])
    # Do this here as we have fully defined TEA_PLATFORM now
    if test "${TEA_PLATFORM}" = "windows" ; then
	EXEEXT=".exe"
	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
    fi

    # TEA specific:
    AC_SUBST(CLEANFILES)
    AC_SUBST(TCL_LIBS)
    AC_SUBST(TCL_DEFS)
473
474
475
476
477
478
479



480
481
482
483
484
485
486

AC_DEFUN([TEA_LOAD_TKCONFIG], [
    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])

    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
        AC_MSG_RESULT([loading])
	. "${TK_BIN_DIR}/tkConfig.sh"



    else
        AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
    fi

    # eval is required to do the TK_DBGX substitution
    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""







>
>
>







475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491

AC_DEFUN([TEA_LOAD_TKCONFIG], [
    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])

    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
        AC_MSG_RESULT([loading])
	. "${TK_BIN_DIR}/tkConfig.sh"
    elif test -f "${TK_BIN_DIR}/sdl2tkConfig.sh" ; then
        AC_MSG_RESULT([loading])
	. "${TK_BIN_DIR}/sdl2tkConfig.sh"
    else
        AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
    fi

    # eval is required to do the TK_DBGX substitution
    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
521
522
523
524
525
526
527








528
529
530
531
532
533
534
535
    # eval is required to do the TK_DBGX substitution
    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""

    # TEA specific: Ensure windowingsystem is defined








    if test "${TEA_PLATFORM}" = "unix" ; then
	case ${TK_DEFS} in
	    *MAC_OSX_TK*)
		AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
		TEA_WINDOWINGSYSTEM="aqua"
		;;
	    *)
		TEA_WINDOWINGSYSTEM="x11"







>
>
>
>
>
>
>
>
|







526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
    # eval is required to do the TK_DBGX substitution
    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""

    # TEA specific: Ensure windowingsystem is defined
    case ${TK_DEFS} in
	*PLATFORM_SDL*)
	    TEA_WINDOWINGSYSTEM="x11"
	    TEA_USE_SDL=yes
	    ;;
    esac
    if test "${TEA_USE_SDL}" = "yes" ; then
	true
    elif test "${TEA_PLATFORM}" = "unix" ; then
	case ${TK_DEFS} in
	    *MAC_OSX_TK*)
		AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
		TEA_WINDOWINGSYSTEM="aqua"
		;;
	    *)
		TEA_WINDOWINGSYSTEM="x11"
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
#	directory. This macro will correctly determine the name
#	of the tclsh executable even if tclsh has not yet been
#	built in the build directory. The tclsh found is always
#	associated with a tclConfig.sh file. This tclsh should be used
#	only for running extension test cases. It should never be
#	or generation of files (like pkgIndex.tcl) at build time.
#
# Arguments
#	none
#
# Results
#	Subst's the following values:
#		TCLSH_PROG
#------------------------------------------------------------------------

AC_DEFUN([TEA_PROG_TCLSH], [
    AC_MSG_CHECKING([for tclsh])
    if test -f "${TCL_BIN_DIR}/Makefile" ; then
        # tclConfig.sh is in Tcl build directory







|


|
|







576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
#	directory. This macro will correctly determine the name
#	of the tclsh executable even if tclsh has not yet been
#	built in the build directory. The tclsh found is always
#	associated with a tclConfig.sh file. This tclsh should be used
#	only for running extension test cases. It should never be
#	or generation of files (like pkgIndex.tcl) at build time.
#
# Arguments:
#	none
#
# Results:
#	Substitutes the following vars:
#		TCLSH_PROG
#------------------------------------------------------------------------

AC_DEFUN([TEA_PROG_TCLSH], [
    AC_MSG_CHECKING([for tclsh])
    if test -f "${TCL_BIN_DIR}/Makefile" ; then
        # tclConfig.sh is in Tcl build directory
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
#	directory. This macro will correctly determine the name
#	of the wish executable even if wish has not yet been
#	built in the build directory. The wish found is always
#	associated with a tkConfig.sh file. This wish should be used
#	only for running extension test cases. It should never be
#	or generation of files (like pkgIndex.tcl) at build time.
#
# Arguments
#	none
#
# Results
#	Subst's the following values:
#		WISH_PROG
#------------------------------------------------------------------------

AC_DEFUN([TEA_PROG_WISH], [
    AC_MSG_CHECKING([for wish])
    if test -f "${TK_BIN_DIR}/Makefile" ; then
        # tkConfig.sh is in Tk build directory







|


|
|







626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
#	directory. This macro will correctly determine the name
#	of the wish executable even if wish has not yet been
#	built in the build directory. The wish found is always
#	associated with a tkConfig.sh file. This wish should be used
#	only for running extension test cases. It should never be
#	or generation of files (like pkgIndex.tcl) at build time.
#
# Arguments:
#	none
#
# Results:
#	Substitutes the following vars:
#		WISH_PROG
#------------------------------------------------------------------------

AC_DEFUN([TEA_PROG_WISH], [
    AC_MSG_CHECKING([for wish])
    if test -f "${TK_BIN_DIR}/Makefile" ; then
        # tkConfig.sh is in Tk build directory
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
#	Sets the following vars:
#		THREADS_LIBS	Thread library(s)
#
#	Defines the following vars:
#		TCL_THREADS
#		_REENTRANT
#		_THREAD_SAFE
#
#------------------------------------------------------------------------

AC_DEFUN([TEA_ENABLE_THREADS], [
    AC_ARG_ENABLE(threads,
	AC_HELP_STRING([--enable-threads],
	    [build with threads]),
	[tcl_ok=$enableval], [tcl_ok=yes])







<







741
742
743
744
745
746
747

748
749
750
751
752
753
754
#	Sets the following vars:
#		THREADS_LIBS	Thread library(s)
#
#	Defines the following vars:
#		TCL_THREADS
#		_REENTRANT
#		_THREAD_SAFE

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

AC_DEFUN([TEA_ENABLE_THREADS], [
    AC_ARG_ENABLE(threads,
	AC_HELP_STRING([--enable-threads],
	    [build with threads]),
	[tcl_ok=$enableval], [tcl_ok=yes])
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
# Results:
#
#	Adds the following arguments to configure:
#		--enable-symbols
#
#	Defines the following vars:
#		CFLAGS_DEFAULT	Sets to $(CFLAGS_DEBUG) if true
#				Sets to $(CFLAGS_OPTIMIZE) if false
#		LDFLAGS_DEFAULT	Sets to $(LDFLAGS_DEBUG) if true
#				Sets to $(LDFLAGS_OPTIMIZE) if false
#		DBGX		Formerly used as debug library extension;
#				always blank now.
#
#------------------------------------------------------------------------

AC_DEFUN([TEA_ENABLE_SYMBOLS], [
    dnl TEA specific: Make sure we are initialized
    AC_REQUIRE([TEA_CONFIG_CFLAGS])
    AC_MSG_CHECKING([for build with symbols])
    AC_ARG_ENABLE(symbols,
	AC_HELP_STRING([--enable-symbols],
	    [build with debugging symbols (default: off)]),
	[tcl_ok=$enableval], [tcl_ok=no])
    DBGX=""
    if test "$tcl_ok" = "no"; then
	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
	AC_MSG_RESULT([no])
    else
	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
	if test "$tcl_ok" = "yes"; then
	    AC_MSG_RESULT([yes (standard debugging)])







|




<












|







864
865
866
867
868
869
870
871
872
873
874
875

876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# Results:
#
#	Adds the following arguments to configure:
#		--enable-symbols
#
#	Defines the following vars:
#		CFLAGS_DEFAULT	Sets to $(CFLAGS_DEBUG) if true
#				Sets to "$(CFLAGS_OPTIMIZE) -DNDEBUG" if false
#		LDFLAGS_DEFAULT	Sets to $(LDFLAGS_DEBUG) if true
#				Sets to $(LDFLAGS_OPTIMIZE) if false
#		DBGX		Formerly used as debug library extension;
#				always blank now.

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

AC_DEFUN([TEA_ENABLE_SYMBOLS], [
    dnl TEA specific: Make sure we are initialized
    AC_REQUIRE([TEA_CONFIG_CFLAGS])
    AC_MSG_CHECKING([for build with symbols])
    AC_ARG_ENABLE(symbols,
	AC_HELP_STRING([--enable-symbols],
	    [build with debugging symbols (default: off)]),
	[tcl_ok=$enableval], [tcl_ok=no])
    DBGX=""
    if test "$tcl_ok" = "no"; then
	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
	AC_MSG_RESULT([no])
    else
	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
	if test "$tcl_ok" = "yes"; then
	    AC_MSG_RESULT([yes (standard debugging)])
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
# Results:
#
#	Adds the following arguments to configure:
#		--enable-langinfo=yes|no (default is yes)
#
#	Defines the following vars:
#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
#
#------------------------------------------------------------------------

AC_DEFUN([TEA_ENABLE_LANGINFO], [
    AC_ARG_ENABLE(langinfo,
	AC_HELP_STRING([--enable-langinfo],
	    [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
	[langinfo_ok=$enableval], [langinfo_ok=yes])







<







928
929
930
931
932
933
934

935
936
937
938
939
940
941
# Results:
#
#	Adds the following arguments to configure:
#		--enable-langinfo=yes|no (default is yes)
#
#	Defines the following vars:
#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.

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

AC_DEFUN([TEA_ENABLE_LANGINFO], [
    AC_ARG_ENABLE(langinfo,
	AC_HELP_STRING([--enable-langinfo],
	    [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
	[langinfo_ok=$enableval], [langinfo_ok=yes])
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
# Arguments:
#	none
#
# Results:
#	Defines the following var:
#
#	system -	System/platform/version identification code.
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_CONFIG_SYSTEM], [
    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
	# TEA specific:
	if test "${TEA_PLATFORM}" = "windows" ; then
	    tcl_cv_sys_version=windows







<







968
969
970
971
972
973
974

975
976
977
978
979
980
981
# Arguments:
#	none
#
# Results:
#	Defines the following var:
#
#	system -	System/platform/version identification code.

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

AC_DEFUN([TEA_CONFIG_SYSTEM], [
    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
	# TEA specific:
	if test "${TEA_PLATFORM}" = "windows" ; then
	    tcl_cv_sys_version=windows
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
#                       general if Tcl and Tk aren't themselves shared
#                       libraries), then this symbol has an empty string
#                       as its value.
#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
#                       extensions.  An empty string means we don't know how
#                       to use shared libraries on this platform.
#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
#                       in a static or shared library name, using the $VERSION variable
#                       to put the version in the right place.  This is used
#                       by platforms that need non-standard library names.
#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
#                       to have a version after the .so, and ${VERSION}.a
#                       on AIX, since a shared library needs to have
#                       a .a extension whereas shared objects for loadable
#                       extensions have a .so extension.  Defaults to
#                       ${VERSION}${SHLIB_SUFFIX}.
#	CFLAGS_DEBUG -
#			Flags used when running the compiler in debug mode
#	CFLAGS_OPTIMIZE -
#			Flags used when running the compiler in optimize mode
#	CFLAGS -	Additional CFLAGS added as necessary (usually 64-bit)
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_CONFIG_CFLAGS], [
    dnl TEA specific: Make sure we are initialized
    AC_REQUIRE([TEA_INIT])

    # Step 0.a: Enable 64 bit support?







|


|
|



|





<







1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056

1057
1058
1059
1060
1061
1062
1063
#                       general if Tcl and Tk aren't themselves shared
#                       libraries), then this symbol has an empty string
#                       as its value.
#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
#                       extensions.  An empty string means we don't know how
#                       to use shared libraries on this platform.
#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
#                       in a static or shared library name, using the $PACKAGE_VERSION variable
#                       to put the version in the right place.  This is used
#                       by platforms that need non-standard library names.
#                       Examples:  ${PACKAGE_VERSION}.so.1.1 on NetBSD, since it needs
#                       to have a version after the .so, and ${PACKAGE_VERSION}.a
#                       on AIX, since a shared library needs to have
#                       a .a extension whereas shared objects for loadable
#                       extensions have a .so extension.  Defaults to
#                       ${PACKAGE_VERSION}${SHLIB_SUFFIX}.
#	CFLAGS_DEBUG -
#			Flags used when running the compiler in debug mode
#	CFLAGS_OPTIMIZE -
#			Flags used when running the compiler in optimize mode
#	CFLAGS -	Additional CFLAGS added as necessary (usually 64-bit)

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

AC_DEFUN([TEA_CONFIG_CFLAGS], [
    dnl TEA specific: Make sure we are initialized
    AC_REQUIRE([TEA_INIT])

    # Step 0.a: Enable 64 bit support?
1083
1084
1085
1086
1087
1088
1089

1090
1091
1092
1093
1094
1095
1096
	    void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
	    tcl_cv_cc_visibility_hidden=no)
	CFLAGS=$hold_cflags])
    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
	AC_DEFINE(MODULE_SCOPE,
	    [extern __attribute__((__visibility__("hidden")))],
	    [Compiler support for module scope symbols])

    ])

    # Step 0.d: Disable -rpath support?

    AC_MSG_CHECKING([if rpath support is requested])
    AC_ARG_ENABLE(rpath,
	AC_HELP_STRING([--disable-rpath],







>







1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
	    void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
	    tcl_cv_cc_visibility_hidden=no)
	CFLAGS=$hold_cflags])
    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
	AC_DEFINE(MODULE_SCOPE,
	    [extern __attribute__((__visibility__("hidden")))],
	    [Compiler support for module scope symbols])
	AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
    ])

    # Step 0.d: Disable -rpath support?

    AC_MSG_CHECKING([if rpath support is requested])
    AC_ARG_ENABLE(rpath,
	AC_HELP_STRING([--disable-rpath],
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142


1143


1144
1145
1146
1147
1148
1149
1150
    LDFLAGS_ARCH=""
    UNSHARED_LIB_SUFFIX=""
    # TEA specific: use PACKAGE_VERSION instead of VERSION
    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
    TCL_LIB_VERSIONS_OK=ok
    CFLAGS_DEBUG=-g
    CFLAGS_OPTIMIZE=-O
    AS_IF([test "$GCC" = yes], [
	# TEA specific:
	CFLAGS_OPTIMIZE=-O2
	CFLAGS_WARNING="-Wall"


    ], [CFLAGS_WARNING=""])


    AC_CHECK_TOOL(AR, ar)
    STLIB_LD='${AR} cr'
    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION="1.0"])
    case $system in
	# TEA specific:
	windows)







<

<


>
>
|
>
>







1140
1141
1142
1143
1144
1145
1146

1147

1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
    LDFLAGS_ARCH=""
    UNSHARED_LIB_SUFFIX=""
    # TEA specific: use PACKAGE_VERSION instead of VERSION
    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
    TCL_LIB_VERSIONS_OK=ok
    CFLAGS_DEBUG=-g

    AS_IF([test "$GCC" = yes], [

	CFLAGS_OPTIMIZE=-O2
	CFLAGS_WARNING="-Wall"
    ], [
	CFLAGS_OPTIMIZE=-O
	CFLAGS_WARNING=""
    ])
    CC_OBJNAME="-o \[$]@"
    AC_CHECK_TOOL(AR, ar)
    STLIB_LD='${AR} cr'
    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION="1.0"])
    case $system in
	# TEA specific:
	windows)
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304






























1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317



1318
1319
1320
1321
1322
1323
1324
		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
		    LINKBIN="\"${CEBINROOT}/link.exe\""
		    AC_SUBST(CELIB_DIR)
		else
		    RC="rc"
		    lflags="-nologo"
    		    LINKBIN="link"
		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
		fi
	    fi

	    if test "$GCC" = "yes"; then
		# mingw gcc mode
		AC_CHECK_TOOL(RC, windres)
		CFLAGS_DEBUG="-g"
		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
		SHLIB_LD="$CC -shared"
		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"






























	    else
		SHLIB_LD="${LINKBIN} -dll ${lflags}"
		# link -lib only works when -lib is the first arg
		STLIB_LD="${LINKBIN} -lib ${lflags}"
		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
		PATHTYPE=-w
		# For information on what debugtype is most useful, see:
		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
		# and also
		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
		# This essentially turns it all on.
		LDFLAGS_DEBUG="-debug -debugtype:cv"
		LDFLAGS_OPTIMIZE="-release"



		if test "$doWince" != "no" ; then
		    LDFLAGS_CONSOLE="-link ${lflags}"
		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
		else
		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
		fi







|










|



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













>
>
>







1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
		    LINKBIN="\"${CEBINROOT}/link.exe\""
		    AC_SUBST(CELIB_DIR)
		else
		    RC="rc"
		    lflags="-nologo"
		    LINKBIN="link"
		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
		fi
	    fi

	    if test "$GCC" = "yes"; then
		# mingw gcc mode
		AC_CHECK_TOOL(RC, windres)
		CFLAGS_DEBUG="-g"
		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
		SHLIB_LD='${CC} -shared'
		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"

		AC_CACHE_CHECK(for cross-compile version of gcc,
			ac_cv_cross,
			AC_TRY_COMPILE([
			    #ifdef _WIN32
				#error cross-compiler
			    #endif
			], [],
			ac_cv_cross=yes,
			ac_cv_cross=no)
		      )
		      if test "$ac_cv_cross" = "yes"; then
			case "$do64bit" in
			    amd64|x64|yes)
				CC="x86_64-w64-mingw32-gcc"
				LD="x86_64-w64-mingw32-ld"
				AR="x86_64-w64-mingw32-ar"
				RANLIB="x86_64-w64-mingw32-ranlib"
				RC="x86_64-w64-mingw32-windres"
			    ;;
			    *)
				CC="i686-w64-mingw32-gcc"
				LD="i686-w64-mingw32-ld"
				AR="i686-w64-mingw32-ar"
				RANLIB="i686-w64-mingw32-ranlib"
				RC="i686-w64-mingw32-windres"
			    ;;
			esac
		fi

	    else
		SHLIB_LD="${LINKBIN} -dll ${lflags}"
		# link -lib only works when -lib is the first arg
		STLIB_LD="${LINKBIN} -lib ${lflags}"
		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
		PATHTYPE=-w
		# For information on what debugtype is most useful, see:
		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
		# and also
		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
		# This essentially turns it all on.
		LDFLAGS_DEBUG="-debug -debugtype:cv"
		LDFLAGS_OPTIMIZE="-release"
		CFLAGS_DEBUG="${CFLAGS_DEBUG} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE"
		CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE"
		CC_OBJNAME="-Fo\[$]@"
		if test "$doWince" != "no" ; then
		    LDFLAGS_CONSOLE="-link ${lflags}"
		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
		else
		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
		fi
1404
1405
1406
1407
1408
1409
1410
1411

1412
1413
1414
1415
1416
1417
1418
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    ;;
	CYGWIN_*)
	    SHLIB_CFLAGS=""
	    SHLIB_LD='${CC} -shared'
	    SHLIB_SUFFIX=".dll"
	    EXE_SUFFIX=".exe"

	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    ;;
	Haiku*)
	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"







|
>







1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    ;;
	CYGWIN_*)
	    SHLIB_CFLAGS=""
	    SHLIB_LD='${CC} -shared'
	    SHLIB_SUFFIX=".dll"
	    EXEEXT=".exe"
	    do64bit_ok=yes
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    ;;
	Haiku*)
	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530










1531

1532
1533
1534
1535
1536
1537
1538
	            do64bit_ok=yes
	            SHLIB_LD="ld -64 -shared -rdata_shared"
	            CFLAGS="$CFLAGS -64"
	            LDFLAGS_ARCH="-64"
	        ])
	    ])
	    ;;
	Linux*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"

	    # TEA specific:
	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"

	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'










	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"

	    AS_IF([test $doRpath = yes], [
		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
	    AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
	    AS_IF([test $do64bit = yes], [
		AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
		    hold_cflags=$CFLAGS







|








>
>
>
>
>
>
>
>
>
>
|
>







1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
	            do64bit_ok=yes
	            SHLIB_LD="ld -64 -shared -rdata_shared"
	            CFLAGS="$CFLAGS -64"
	            LDFLAGS_ARCH="-64"
	        ])
	    ])
	    ;;
	Linux*|GNU*|NetBSD-Debian)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"

	    # TEA specific:
	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"

	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
	    # workaround when cross-compiling for Win32: no -fPIC and -Wl,...
	    if test "${TCL_SHLIB_SUFFIX}" = ".dll" ; then
		SHLIB_CFLAGS=""
		SHLIB_SUFFIX=".dll"
		DL_OBJS=""
		DL_LIBS=""
		TCL_LIB_VERSIONS_OK=nodots
		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
	    else	
		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
	    fi
	    AS_IF([test $doRpath = yes], [
		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
	    AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
	    AS_IF([test $do64bit = yes], [
		AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
		    hold_cflags=$CFLAGS
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582

1583
1584
1585
1586
1587
1588
1589
1590
1591

1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650

1651
1652
1653
1654
1655
1656
1657
1658
1659
1660


1661
1662
1663
1664
1665


1666
1667
1668
1669
1670
1671
1672
	    # The combo of gcc + glibc has a bug related to inlining of
	    # functions like strtod(). The -fno-builtin flag should address
	    # this problem but it does not work. The -fno-inline flag is kind
	    # of overkill but it works. Disable inlining only when one of the
	    # files in compat/*.c is being linked in.

	    AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])

	    ;;
	GNU*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"

	    SHLIB_LD='${CC} -shared'
	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
	    ;;
	Lynx*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"
	    CFLAGS_OPTIMIZE=-02
	    SHLIB_LD='${CC} -shared'
	    LD_FLAGS="-Wl,--export-dynamic"
	    AS_IF([test $doRpath = yes], [
		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
	    ;;
	OpenBSD-*)
	    arch=`arch -s`
	    case "$arch" in
	    m88k|vax)
		SHLIB_SUFFIX=""
		SHARED_LIB_SUFFIX=""

		;;
	    *)
		SHLIB_CFLAGS="-fPIC"
		SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
		SHLIB_SUFFIX=".so"
		AS_IF([test $doRpath = yes], [
		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'

		;;
	    esac
	    case "$arch" in
	    m88k|vax)
		CFLAGS_OPTIMIZE="-O1"
		;;
	    *)
		CFLAGS_OPTIMIZE="-O2"
		;;
	    esac
	    AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
		AC_EGREP_CPP(yes, [
#ifdef __ELF__
	yes
#endif
		], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
	    AS_IF([test $tcl_cv_ld_elf = yes], [
		LDFLAGS=-Wl,-export-dynamic
	    ], [LDFLAGS=""])
	    AS_IF([test "${TCL_THREADS}" = "1"], [
		# On OpenBSD:	Compile with -pthread
		#		Don't link with -lpthread
		LIBS=`echo $LIBS | sed s/-lpthread//`
		CFLAGS="$CFLAGS -pthread"
	    ])
	    # OpenBSD doesn't do version numbers with dots.
	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
	    TCL_LIB_VERSIONS_OK=nodots
	    ;;
	NetBSD-*|FreeBSD-[[3-4]].*)
	    # FreeBSD 3.* and greater have ELF.
	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
	    SHLIB_SUFFIX=".so"
	    LDFLAGS="$LDFLAGS -export-dynamic"
	    AS_IF([test $doRpath = yes], [
		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
	    AS_IF([test "${TCL_THREADS}" = "1"], [
		# The -pthread needs to go in the CFLAGS, not LIBS
		LIBS=`echo $LIBS | sed s/-pthread//`
		CFLAGS="$CFLAGS -pthread"
	    	LDFLAGS="$LDFLAGS -pthread"
	    ])
	    case $system in
	    FreeBSD-3.*)
	    	# FreeBSD-3 doesn't handle version numbers with dots.
	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
	    	TCL_LIB_VERSIONS_OK=nodots
		;;
	    esac
	    ;;
	FreeBSD-*)
	    # This configuration from FreeBSD Ports.
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_LD="${CC} -shared"
	    TCL_SHLIB_LD_EXTRAS="-soname \$[@]"

	    SHLIB_SUFFIX=".so"
	    LDFLAGS=""
	    AS_IF([test $doRpath = yes], [
		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
	    AS_IF([test "${TCL_THREADS}" = "1"], [
		# The -pthread needs to go in the LDFLAGS, not LIBS
		LIBS=`echo $LIBS | sed s/-pthread//`
		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])


	    # Version numbers are dot-stripped by system policy.
	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
	    TCL_LIB_VERSIONS_OK=nodots


	    ;;
	Darwin-*)
	    CFLAGS_OPTIMIZE="-Os"
	    SHLIB_CFLAGS="-fno-common"
	    # To avoid discrepancies between what headers configure sees during
	    # preprocessing tests and compiling tests, move any -isysroot and
	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:







<
<
<
<
<
<
<
<
<
<
<














|


>









>



|






<
<
<
<
<
<
<
<
<










|
<
|













<
<
<
<
<
<
<
<





|
>




|





>
>
|
|
|
|
|
>
>







1604
1605
1606
1607
1608
1609
1610











1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648









1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659

1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673








1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
	    # The combo of gcc + glibc has a bug related to inlining of
	    # functions like strtod(). The -fno-builtin flag should address
	    # this problem but it does not work. The -fno-inline flag is kind
	    # of overkill but it works. Disable inlining only when one of the
	    # files in compat/*.c is being linked in.

	    AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])











	    ;;
	Lynx*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"
	    CFLAGS_OPTIMIZE=-02
	    SHLIB_LD='${CC} -shared'
	    LD_FLAGS="-Wl,--export-dynamic"
	    AS_IF([test $doRpath = yes], [
		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
	    ;;
	OpenBSD-*)
	    arch=`arch -s`
	    case "$arch" in
	    vax)
		SHLIB_SUFFIX=""
		SHARED_LIB_SUFFIX=""
		LDFLAGS=""
		;;
	    *)
		SHLIB_CFLAGS="-fPIC"
		SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
		SHLIB_SUFFIX=".so"
		AS_IF([test $doRpath = yes], [
		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
		LDFLAGS="-Wl,-export-dynamic"
		;;
	    esac
	    case "$arch" in
	    vax)
		CFLAGS_OPTIMIZE="-O1"
		;;
	    *)
		CFLAGS_OPTIMIZE="-O2"
		;;
	    esac









	    AS_IF([test "${TCL_THREADS}" = "1"], [
		# On OpenBSD:	Compile with -pthread
		#		Don't link with -lpthread
		LIBS=`echo $LIBS | sed s/-lpthread//`
		CFLAGS="$CFLAGS -pthread"
	    ])
	    # OpenBSD doesn't do version numbers with dots.
	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
	    TCL_LIB_VERSIONS_OK=nodots
	    ;;
	NetBSD-*)

	    # NetBSD has ELF and can use 'cc -shared' to build shared libs
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
	    SHLIB_SUFFIX=".so"
	    LDFLAGS="$LDFLAGS -export-dynamic"
	    AS_IF([test $doRpath = yes], [
		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
	    AS_IF([test "${TCL_THREADS}" = "1"], [
		# The -pthread needs to go in the CFLAGS, not LIBS
		LIBS=`echo $LIBS | sed s/-pthread//`
		CFLAGS="$CFLAGS -pthread"
	    	LDFLAGS="$LDFLAGS -pthread"
	    ])








	    ;;
	FreeBSD-*)
	    # This configuration from FreeBSD Ports.
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_LD="${CC} -shared"
	    TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$[@]"
	    TK_SHLIB_LD_EXTRAS="-Wl,-soname,\$[@]"
	    SHLIB_SUFFIX=".so"
	    LDFLAGS=""
	    AS_IF([test $doRpath = yes], [
		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
	    AS_IF([test "${TCL_THREADS}" = "1"], [
		# The -pthread needs to go in the LDFLAGS, not LIBS
		LIBS=`echo $LIBS | sed s/-pthread//`
		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
	    case $system in
	    FreeBSD-3.*)
		# Version numbers are dot-stripped by system policy.
		TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
		TCL_LIB_VERSIONS_OK=nodots
		;;
	    esac
	    ;;
	Darwin-*)
	    CFLAGS_OPTIMIZE="-Os"
	    SHLIB_CFLAGS="-fno-common"
	    # To avoid discrepancies between what headers configure sees during
	    # preprocessing tests and compiling tests, move any -isysroot and
	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
		hold_ldflags=$LDFLAGS
		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
		AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
		LDFLAGS=$hold_ldflags])
	    AS_IF([test $tcl_cv_ld_single_module = yes], [
		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
	    ])
	    # TEA specific: link shlib with current and compatiblity version flags
	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
	    SHLIB_SUFFIX=".dylib"
	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
	    AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
		LDFLAGS="$LDFLAGS -prebind"])







|







1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
		hold_ldflags=$LDFLAGS
		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
		AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
		LDFLAGS=$hold_ldflags])
	    AS_IF([test $tcl_cv_ld_single_module = yes], [
		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
	    ])
	    # TEA specific: link shlib with current and compatibility version flags
	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
	    SHLIB_SUFFIX=".dylib"
	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
	    AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
		LDFLAGS="$LDFLAGS -prebind"])
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
	    LD_SEARCH_FLAGS=""
	    ;;
	SCO_SV-3.2*)
	    AS_IF([test "$GCC" = yes], [
		SHLIB_CFLAGS="-fPIC -melf"
		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
	    ], [
	       SHLIB_CFLAGS="-Kpic -belf"
	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
	    ])
	    SHLIB_LD="ld -G"
	    SHLIB_LD_LIBS=""
	    SHLIB_SUFFIX=".so"
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    ;;







|
|







1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
	    LD_SEARCH_FLAGS=""
	    ;;
	SCO_SV-3.2*)
	    AS_IF([test "$GCC" = yes], [
		SHLIB_CFLAGS="-fPIC -melf"
		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
	    ], [
		SHLIB_CFLAGS="-Kpic -belf"
		LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
	    ])
	    SHLIB_LD="ld -G"
	    SHLIB_LD_LIBS=""
	    SHLIB_SUFFIX=".so"
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    ;;
1953
1954
1955
1956
1957
1958
1959


















1960
1961
1962
1963
1964
1965
1966
		    *)
			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
		esac
		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
	    ])
	    ;;


















    esac

    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
	AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
    ])

dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so







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







1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
		    *)
			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
		esac
		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
	    ])
	    ;;
	UNIX_SV* | UnixWare-5*)
	    SHLIB_CFLAGS="-KPIC"
	    SHLIB_LD='${CC} -G'
	    SHLIB_LD_LIBS=""
	    SHLIB_SUFFIX=".so"
	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
	    # that don't grok the -Bexport option.  Test that it does.
	    AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
		hold_ldflags=$LDFLAGS
		LDFLAGS="$LDFLAGS -Wl,-Bexport"
		AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
	        LDFLAGS=$hold_ldflags])
	    AS_IF([test $tcl_cv_ld_Bexport = yes], [
		LDFLAGS="$LDFLAGS -Wl,-Bexport"
	    ])
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    ;;
    esac

    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
	AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
    ])

dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005































































































2006
2007
2008

2009
2010
2011
2012
2013
2014
2015
    # libraries to the right flags for gcc, instead of those for the
    # standard manufacturer compiler.

    AS_IF([test "$GCC" = yes], [
	case $system in
	    AIX-*) ;;
	    BSD/OS*) ;;
	    CYGWIN_*) ;;
	    IRIX*) ;;
	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
	    Darwin-*) ;;
	    SCO_SV-3.2*) ;;
	    windows) ;;
	    *) SHLIB_CFLAGS="-fPIC" ;;
	esac])

    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
	AC_DEFINE(MODULE_SCOPE, [extern],
	    [No Compiler support for module scope symbols])
	AC_DEFINE(NO_VIZ, [], [No visibility hidden passed to zlib?])
    ])

    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
	# TEA specific: use PACKAGE_VERSION instead of VERSION
	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
	# TEA specific: use PACKAGE_VERSION instead of VERSION
	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
































































































    AC_SUBST(CFLAGS_DEBUG)
    AC_SUBST(CFLAGS_OPTIMIZE)
    AC_SUBST(CFLAGS_WARNING)


    AC_SUBST(STLIB_LD)
    AC_SUBST(SHLIB_LD)

    AC_SUBST(SHLIB_LD_LIBS)
    AC_SUBST(SHLIB_CFLAGS)








|











<



|
|

|
|

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



>







2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047

2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
    # libraries to the right flags for gcc, instead of those for the
    # standard manufacturer compiler.

    AS_IF([test "$GCC" = yes], [
	case $system in
	    AIX-*) ;;
	    BSD/OS*) ;;
	    CYGWIN_*|MINGW32_*) ;;
	    IRIX*) ;;
	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
	    Darwin-*) ;;
	    SCO_SV-3.2*) ;;
	    windows) ;;
	    *) SHLIB_CFLAGS="-fPIC" ;;
	esac])

    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
	AC_DEFINE(MODULE_SCOPE, [extern],
	    [No Compiler support for module scope symbols])

    ])

    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
    # TEA specific: use PACKAGE_VERSION instead of VERSION
    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
    # TEA specific: use PACKAGE_VERSION instead of VERSION
    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])

    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
	AC_CACHE_CHECK(for SEH support in compiler,
	    tcl_cv_seh,
	AC_TRY_RUN([
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN

	    int main(int argc, char** argv) {
		int a, b = 0;
		__try {
		    a = 666 / b;
		}
		__except (EXCEPTION_EXECUTE_HANDLER) {
		    return 0;
		}
		return 1;
	    }
	],
	    tcl_cv_seh=yes,
	    tcl_cv_seh=no,
	    tcl_cv_seh=no)
	)
	if test "$tcl_cv_seh" = "no" ; then
	    AC_DEFINE(HAVE_NO_SEH, 1,
		    [Defined when mingw does not support SEH])
	fi

	#
	# Check to see if the excpt.h include file provided contains the
	# definition for EXCEPTION_DISPOSITION; if not, which is the case
	# with Cygwin's version as of 2002-04-10, define it to be int,
	# sufficient for getting the current code to work.
	#
	AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
	    tcl_cv_eh_disposition,
	    AC_TRY_COMPILE([
#	    define WIN32_LEAN_AND_MEAN
#	    include <windows.h>
#	    undef WIN32_LEAN_AND_MEAN
	    ],[
		EXCEPTION_DISPOSITION x;
	    ],
		tcl_cv_eh_disposition=yes,
		tcl_cv_eh_disposition=no)
	)
	if test "$tcl_cv_eh_disposition" = "no" ; then
	AC_DEFINE(EXCEPTION_DISPOSITION, int,
		[Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
	fi

	# Check to see if winnt.h defines CHAR, SHORT, and LONG
	# even if VOID has already been #defined. The win32api
	# used by mingw and cygwin is known to do this.

	AC_CACHE_CHECK(for winnt.h that ignores VOID define,
	    tcl_cv_winnt_ignore_void,
	    AC_TRY_COMPILE([
#define VOID void
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
	    ], [
		CHAR c;
		SHORT s;
		LONG l;
	    ],
        tcl_cv_winnt_ignore_void=yes,
        tcl_cv_winnt_ignore_void=no)
	)
	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
	    AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
		    [Defined when cygwin/mingw ignores VOID define in winnt.h])
	fi
    fi

	# See if the compiler supports casting to a union type.
	# This is used to stop gcc from printing a compiler
	# warning when initializing a union member.

	AC_CACHE_CHECK(for cast to union support,
	    tcl_cv_cast_to_union,
	    AC_TRY_COMPILE([],
	    [
		  union foo { int i; double d; };
		  union foo f = (union foo) (int) 0;
	    ],
	    tcl_cv_cast_to_union=yes,
	    tcl_cv_cast_to_union=no)
	)
	if test "$tcl_cv_cast_to_union" = "yes"; then
	    AC_DEFINE(HAVE_CAST_TO_UNION, 1,
		    [Defined when compiler supports casting to union type.])
	fi

    AC_SUBST(CFLAGS_DEBUG)
    AC_SUBST(CFLAGS_OPTIMIZE)
    AC_SUBST(CFLAGS_WARNING)
    AC_SUBST(CC_OBJNAME)

    AC_SUBST(STLIB_LD)
    AC_SUBST(SHLIB_LD)

    AC_SUBST(SHLIB_LD_LIBS)
    AC_SUBST(SHLIB_CFLAGS)

2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
# Results:
#
#	Defines only one of the following vars:
#		HAVE_SYS_MODEM_H
#		USE_TERMIOS
#		USE_TERMIO
#		USE_SGTTY
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_SERIAL_PORT], [
    AC_CHECK_HEADERS(sys/modem.h)
    AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [
    AC_TRY_RUN([
#include <termios.h>







<







2183
2184
2185
2186
2187
2188
2189

2190
2191
2192
2193
2194
2195
2196
# Results:
#
#	Defines only one of the following vars:
#		HAVE_SYS_MODEM_H
#		USE_TERMIOS
#		USE_TERMIO
#		USE_SGTTY

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

AC_DEFUN([TEA_SERIAL_PORT], [
    AC_CHECK_HEADERS(sys/modem.h)
    AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [
    AC_TRY_RUN([
#include <termios.h>
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
#
# Results:
#
#	Sets the following vars:
#		XINCLUDES
#		XLIBSW
#		PKG_LIBS (appends to)
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_PATH_X], [
    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
	TEA_PATH_UNIX_X
    fi
])

AC_DEFUN([TEA_PATH_UNIX_X], [
    AC_PATH_X
    not_really_there=""
    if test "$no_x" = ""; then
	if test "$x_includes" = ""; then
	    AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
	else
	    if test ! -r $x_includes/X11/Intrinsic.h; then
		not_really_there="yes"
	    fi
	fi
    fi
    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
	AC_MSG_CHECKING([for X11 header files])
	found_xincludes="no"
	AC_TRY_CPP([#include <X11/Intrinsic.h>], found_xincludes="yes", found_xincludes="no")
	if test "$found_xincludes" = "no"; then
	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
	    for i in $dirs ; do
		if test -r $i/X11/Intrinsic.h; then
		    AC_MSG_RESULT([$i])
		    XINCLUDES=" -I$i"
		    found_xincludes="yes"
		    break
		fi
	    done
	fi







<



|









|

|







|



|







2394
2395
2396
2397
2398
2399
2400

2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
#
# Results:
#
#	Sets the following vars:
#		XINCLUDES
#		XLIBSW
#		PKG_LIBS (appends to)

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

AC_DEFUN([TEA_PATH_X], [
    if test "${TEA_WINDOWINGSYSTEM}" = "x11" -a "${TEA_USE_SDL}" != "yes" ; then
	TEA_PATH_UNIX_X
    fi
])

AC_DEFUN([TEA_PATH_UNIX_X], [
    AC_PATH_X
    not_really_there=""
    if test "$no_x" = ""; then
	if test "$x_includes" = ""; then
	    AC_TRY_CPP([#include <X11/Xlib.h>], , not_really_there="yes")
	else
	    if test ! -r $x_includes/X11/Xlib.h; then
		not_really_there="yes"
	    fi
	fi
    fi
    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
	AC_MSG_CHECKING([for X11 header files])
	found_xincludes="no"
	AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
	if test "$found_xincludes" = "no"; then
	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
	    for i in $dirs ; do
		if test -r $i/X11/Xlib.h; then
		    AC_MSG_RESULT([$i])
		    XINCLUDES=" -I$i"
		    found_xincludes="yes"
		    break
		fi
	    done
	fi
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
# Results:
#
#	Defines some of the following vars:
#		HAVE_SYS_IOCTL_H
#		HAVE_SYS_FILIO_H
#		USE_FIONBIO
#		O_NONBLOCK
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_BLOCKING_STYLE], [
    AC_CHECK_HEADERS(sys/ioctl.h)
    AC_CHECK_HEADERS(sys/filio.h)
    TEA_CONFIG_SYSTEM
    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])







<







2489
2490
2491
2492
2493
2494
2495

2496
2497
2498
2499
2500
2501
2502
# Results:
#
#	Defines some of the following vars:
#		HAVE_SYS_IOCTL_H
#		HAVE_SYS_FILIO_H
#		USE_FIONBIO
#		O_NONBLOCK

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

AC_DEFUN([TEA_BLOCKING_STYLE], [
    AC_CHECK_HEADERS(sys/ioctl.h)
    AC_CHECK_HEADERS(sys/filio.h)
    TEA_CONFIG_SYSTEM
    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
# Results:
#
#	Defines some of the following vars:
#		USE_DELTA_FOR_TZ
#		HAVE_TM_GMTOFF
#		HAVE_TM_TZADJ
#		HAVE_TIMEZONE_VAR
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_TIME_HANDLER], [
    AC_CHECK_HEADERS(sys/time.h)
    AC_HEADER_TIME
    AC_STRUCT_TIMEZONE








<







2523
2524
2525
2526
2527
2528
2529

2530
2531
2532
2533
2534
2535
2536
# Results:
#
#	Defines some of the following vars:
#		USE_DELTA_FOR_TZ
#		HAVE_TM_GMTOFF
#		HAVE_TM_TZADJ
#		HAVE_TIMEZONE_VAR

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

AC_DEFUN([TEA_TIME_HANDLER], [
    AC_CHECK_HEADERS(sys/time.h)
    AC_HEADER_TIME
    AC_STRUCT_TIMEZONE

2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
# Arguments:
#	none
#
# Results:
#
#	Might defines some of the following vars:
#		strtod (=fixstrtod)
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_BUGGY_STRTOD], [
    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
    if test "$tcl_strtod" = 1; then
	AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
	    AC_TRY_RUN([







<







2591
2592
2593
2594
2595
2596
2597

2598
2599
2600
2601
2602
2603
2604
# Arguments:
#	none
#
# Results:
#
#	Might defines some of the following vars:
#		strtod (=fixstrtod)

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

AC_DEFUN([TEA_BUGGY_STRTOD], [
    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
    if test "$tcl_strtod" = 1; then
	AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
	    AC_TRY_RUN([
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
#	Requires the following vars to be set in the Makefile:
#		DL_LIBS (not in TEA, only needed in core)
#		LIBS
#		MATH_LIBS
#
# Results:
#
#	Subst's the following var:
#		TCL_LIBS
#		MATH_LIBS
#
#	Might append to the following vars:
#		LIBS
#
#	Might define the following vars:
#		HAVE_NET_ERRNO_H
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_TCL_LINK_LIBS], [
    #--------------------------------------------------------------------
    # On a few very rare systems, all of the libm.a stuff is
    # already in libc.a.  Set compiler flags accordingly.
    # Also, Linux requires the "ieee" library for math to work







|








<







2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656

2657
2658
2659
2660
2661
2662
2663
#	Requires the following vars to be set in the Makefile:
#		DL_LIBS (not in TEA, only needed in core)
#		LIBS
#		MATH_LIBS
#
# Results:
#
#	Substitutes the following vars:
#		TCL_LIBS
#		MATH_LIBS
#
#	Might append to the following vars:
#		LIBS
#
#	Might define the following vars:
#		HAVE_NET_ERRNO_H

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

AC_DEFUN([TEA_TCL_LINK_LIBS], [
    #--------------------------------------------------------------------
    # On a few very rare systems, all of the libm.a stuff is
    # already in libc.a.  Set compiler flags accordingly.
    # Also, Linux requires the "ieee" library for math to work
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
#
# Results:
#
#	Might define the following vars:
#		_ISOC99_SOURCE
#		_LARGEFILE64_SOURCE
#		_LARGEFILE_SOURCE64
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_TCL_EARLY_FLAG],[
    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
	    AC_TRY_COMPILE([[#define ]$1[ 1
]$2], $3,







<







2727
2728
2729
2730
2731
2732
2733

2734
2735
2736
2737
2738
2739
2740
#
# Results:
#
#	Might define the following vars:
#		_ISOC99_SOURCE
#		_LARGEFILE64_SOURCE
#		_LARGEFILE_SOURCE64

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

AC_DEFUN([TEA_TCL_EARLY_FLAG],[
    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
	    AC_TRY_COMPILE([[#define ]$1[ 1
]$2], $3,
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
#
#	Might define the following vars:
#		TCL_WIDE_INT_IS_LONG
#		TCL_WIDE_INT_TYPE
#		HAVE_STRUCT_DIRENT64
#		HAVE_STRUCT_STAT64
#		HAVE_TYPE_OFF64_T
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
    AC_MSG_CHECKING([for 64-bit integer type])
    AC_CACHE_VAL(tcl_cv_type_64bit,[
	tcl_cv_type_64bit=none
	# See if the compiler knows natively about __int64







<







2774
2775
2776
2777
2778
2779
2780

2781
2782
2783
2784
2785
2786
2787
#
#	Might define the following vars:
#		TCL_WIDE_INT_IS_LONG
#		TCL_WIDE_INT_TYPE
#		HAVE_STRUCT_DIRENT64
#		HAVE_STRUCT_STAT64
#		HAVE_TYPE_OFF64_T

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

AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
    AC_MSG_CHECKING([for 64-bit integer type])
    AC_CACHE_VAL(tcl_cv_type_64bit,[
	tcl_cv_type_64bit=none
	# See if the compiler knows natively about __int64
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit},
	    [What type should be used to define wide integers?])
	AC_MSG_RESULT([${tcl_cv_type_64bit}])

	# Now check for auxiliary declarations
	AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
	    AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/dirent.h>],[struct dirent64 p;],
		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
	    AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
	fi

	AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[
	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;







|







2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit},
	    [What type should be used to define wide integers?])
	AC_MSG_RESULT([${tcl_cv_type_64bit}])

	# Now check for auxiliary declarations
	AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
	    AC_TRY_COMPILE([#include <sys/types.h>
#include <dirent.h>],[struct dirent64 p;],
		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
	    AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
	fi

	AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[
	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
2751
2752
2753
2754
2755
2756
2757







2758
2759
2760
2761
2762
2763
2764
	AC_MSG_ERROR([
TEA version not specified.])
    elif test "$1" != "${TEA_VERSION}" ; then
	AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"])
    else
	AC_MSG_RESULT([ok (TEA ${TEA_VERSION})])
    fi







    case "`uname -s`" in
	*win32*|*WIN32*|*MINGW32_*)
	    AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
	    EXEEXT=".exe"
	    TEA_PLATFORM="windows"
	    ;;
	*CYGWIN_*)







>
>
>
>
>
>
>







2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
	AC_MSG_ERROR([
TEA version not specified.])
    elif test "$1" != "${TEA_VERSION}" ; then
	AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"])
    else
	AC_MSG_RESULT([ok (TEA ${TEA_VERSION})])
    fi

    # If the user did not set CFLAGS, set it now to keep macros
    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
    if test "${CFLAGS+set}" != "set" ; then
	CFLAGS=""
    fi

    case "`uname -s`" in
	*win32*|*WIN32*|*MINGW32_*)
	    AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
	    EXEEXT=".exe"
	    TEA_PLATFORM="windows"
	    ;;
	*CYGWIN_*)
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
		;;
	    *)
		# check for existence - allows for generic/win/unix VPATH
		# To add more dirs here (like 'src'), you have to update VPATH
		# in Makefile.in as well
		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
		    -a ! -f "${srcdir}/macosx/$i" \
		    ; then
		    AC_MSG_ERROR([could not find source file '$i'])
		fi
		PKG_SOURCES="$PKG_SOURCES $i"
		# this assumes it is in a VPATH dir
		i=`basename $i`
		# handle user calling this before or after TEA_SETUP_COMPILER







|







2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
		;;
	    *)
		# check for existence - allows for generic/win/unix VPATH
		# To add more dirs here (like 'src'), you have to update VPATH
		# in Makefile.in as well
		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
		    -a ! -f "${srcdir}/macosx/$i" -a ! -f "${srcdir}/sdl/$i" \
		    ; then
		    AC_MSG_ERROR([could not find source file '$i'])
		fi
		PKG_SOURCES="$PKG_SOURCES $i"
		# this assumes it is in a VPATH dir
		i=`basename $i`
		# handle user calling this before or after TEA_SETUP_COMPILER
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
#------------------------------------------------------------------------
AC_DEFUN([TEA_ADD_STUB_SOURCES], [
    vars="$@"
    for i in $vars; do
	# check for existence - allows for generic/win/unix VPATH
	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
	    -a ! -f "${srcdir}/macosx/$i" \
	    ; then
	    AC_MSG_ERROR([could not find stub source file '$i'])
	fi
	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
	# this assumes it is in a VPATH dir
	i=`basename $i`
	# handle user calling this before or after TEA_SETUP_COMPILER







|







3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
#------------------------------------------------------------------------
AC_DEFUN([TEA_ADD_STUB_SOURCES], [
    vars="$@"
    for i in $vars; do
	# check for existence - allows for generic/win/unix VPATH
	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
	    -a ! -f "${srcdir}/macosx/$i" -a ! -f "${srcdir}/sdl/$i" \
	    ; then
	    AC_MSG_ERROR([could not find stub source file '$i'])
	fi
	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
	# this assumes it is in a VPATH dir
	i=`basename $i`
	# handle user calling this before or after TEA_SETUP_COMPILER
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108









3109
3110
3111
3112
3113
3114
3115
#
#	Sets up CC var and other standard bits we need to make executables.
#------------------------------------------------------------------------
AC_DEFUN([TEA_SETUP_COMPILER_CC], [
    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
    # in this macro, they need to go into TEA_SETUP_COMPILER instead.

    # If the user did not set CFLAGS, set it now to keep
    # the AC_PROG_CC macro from adding "-g -O2".
    if test "${CFLAGS+set}" != "set" ; then
	CFLAGS=""
    fi

    AC_PROG_CC
    AC_PROG_CPP










    #--------------------------------------------------------------------
    # Checks to see if the make program sets the $MAKE variable.
    #--------------------------------------------------------------------

    AC_PROG_MAKE_SET








<
<
<
<
<
<


>
>
>
>
>
>
>
>
>







3240
3241
3242
3243
3244
3245
3246






3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
#
#	Sets up CC var and other standard bits we need to make executables.
#------------------------------------------------------------------------
AC_DEFUN([TEA_SETUP_COMPILER_CC], [
    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
    # in this macro, they need to go into TEA_SETUP_COMPILER instead.







    AC_PROG_CC
    AC_PROG_CPP

    INSTALL="\$(SHELL) \$(srcdir)/tclconfig/install-sh -c"
    AC_SUBST(INSTALL)
    INSTALL_DATA="\${INSTALL} -m 644"
    AC_SUBST(INSTALL_DATA)
    INSTALL_PROGRAM="\${INSTALL}"
    AC_SUBST(INSTALL_PROGRAM)
    INSTALL_SCRIPT="\${INSTALL}"
    AC_SUBST(INSTALL_SCRIPT)

    #--------------------------------------------------------------------
    # Checks to see if the make program sets the $MAKE variable.
    #--------------------------------------------------------------------

    AC_PROG_MAKE_SET

3209
3210
3211
3212
3213
3214
3215





3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
print("manifest needed")
#endif
	], [
	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
	VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
	VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"





	TEA_ADD_CLEANFILES([*.manifest])
	])
	MAKE_STUB_LIB="\${STLIB_LD} -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)"
    fi

    if test "${SHARED_BUILD}" = "1" ; then







>
>
>
>
>
|

|







3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
print("manifest needed")
#endif
	], [
	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
	VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
	VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"

	# Don't clean .manifest provided by the package (see TEA_ADD_MANIFEST)
	# or one created by Makefile or configure.  Could use the /manifest:filename
	# linker option to explicitly set the linker-generated filename.
	eval eval "manifest=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}.manifest"
	TEA_ADD_CLEANFILES([$manifest])
	])
	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)"
    fi

    if test "${SHARED_BUILD}" = "1" ; then
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243




3244
3245
3246
3247



3248
3249
3250
3251
3252
3253
3254
    # substituted. (@@@ Might not be necessary anymore)
    #--------------------------------------------------------------------

    if test "${TEA_PLATFORM}" = "windows" ; then
	if test "${SHARED_BUILD}" = "1" ; then
	    # We force the unresolved linking of symbols that are really in
	    # the private libraries of Tcl and Tk.
	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
	    if test x"${TK_BIN_DIR}" != x ; then
		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""




	    fi
	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
	else
	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"



	fi
	# Some packages build their own stubs libraries
	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
	if test "$GCC" = "yes"; then
	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
	fi
	# These aren't needed on Windows (either MSVC or gcc)







<


>
>
>
>




>
>
>







3388
3389
3390
3391
3392
3393
3394

3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
    # substituted. (@@@ Might not be necessary anymore)
    #--------------------------------------------------------------------

    if test "${TEA_PLATFORM}" = "windows" ; then
	if test "${SHARED_BUILD}" = "1" ; then
	    # We force the unresolved linking of symbols that are really in
	    # the private libraries of Tcl and Tk.

	    if test x"${TK_BIN_DIR}" != x ; then
		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
	    fi
	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
	    if test "$GCC" = "yes"; then
		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
	    fi
	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
	else
	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
	    if test "$GCC" = "yes"; then
		PKG_LIB_FILE=lib${PKG_LIB_FILE}
	    fi
	fi
	# Some packages build their own stubs libraries
	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
	if test "$GCC" = "yes"; then
	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
	fi
	# These aren't needed on Windows (either MSVC or gcc)
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
#
#	Requires:
#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
#				already been called.
#
# Results:
#
#	Substs the following vars:
#		TCL_TOP_DIR_NATIVE
#		TCL_INCLUDES
#------------------------------------------------------------------------

AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])







|







3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
#
#	Requires:
#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
#				already been called.
#
# Results:
#
#	Substitutes the following vars:
#		TCL_TOP_DIR_NATIVE
#		TCL_INCLUDES
#------------------------------------------------------------------------

AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
#	CYGPATH must be set
#
# Results:
#
#	Adds a --with-tclinclude switch to configure.
#	Result is cached.
#
#	Substs the following vars:
#		TCL_INCLUDES
#------------------------------------------------------------------------

AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [
    AC_MSG_CHECKING([for Tcl public headers])

    AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory containing the public Tcl header files], with_tclinclude=${withval})







|







3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
#	CYGPATH must be set
#
# Results:
#
#	Adds a --with-tclinclude switch to configure.
#	Result is cached.
#
#	Substitutes the following vars:
#		TCL_INCLUDES
#------------------------------------------------------------------------

AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [
    AC_MSG_CHECKING([for Tcl public headers])

    AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory containing the public Tcl header files], with_tclinclude=${withval})
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557


3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571





3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
#
#	Requires:
#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
#				 already been called.
#
# Results:
#
#	Substs the following vars:
#		TK_INCLUDES
#------------------------------------------------------------------------

AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
    AC_MSG_CHECKING([for Tk private include files])

    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"

    # Check to see if tk<Plat>Port.h isn't already with the public headers
    # Don't look for tkInt.h because that resides with tk.h in the core
    # sources, but the <plat>Port headers are in a different directory


    if test "${TEA_PLATFORM}" = "windows" -a \
	-f "${ac_cv_c_tkh}/tkWinPort.h"; then
	result="private headers found with public headers"
    elif test "${TEA_PLATFORM}" = "unix" -a \
	-f "${ac_cv_c_tkh}/tkUnixPort.h"; then
	result="private headers found with public headers"
    else
	TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
	TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
	if test "${TEA_PLATFORM}" = "windows"; then
	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
	else
	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
	fi





	# Overwrite the previous TK_INCLUDES as this should capture both
	# public and private headers in the same set.
	# We want to ensure these are substituted so as not to require
	# any *_NATIVE vars be defined in the Makefile
	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
	# Detect and add ttk subdir
	if test -d "${TK_SRC_DIR}/generic/ttk"; then
	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
	fi
	if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
	fi
	if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
	fi
	if test "`uname -s`" = "Darwin"; then
	    # If Tk was built as a framework, attempt to use
	    # the framework's Headers and PrivateHeaders directories







|














>
>
|













>
>
>
>
>









|
|







3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
#
#	Requires:
#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
#				 already been called.
#
# Results:
#
#	Substitutes the following vars:
#		TK_INCLUDES
#------------------------------------------------------------------------

AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
    AC_MSG_CHECKING([for Tk private include files])

    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"

    # Check to see if tk<Plat>Port.h isn't already with the public headers
    # Don't look for tkInt.h because that resides with tk.h in the core
    # sources, but the <plat>Port headers are in a different directory
    if test -f "${ac_cv_c_tkh}/tkSDLPort.h"; then
	result="private headers found with public headers"
    elif test "${TEA_PLATFORM}" = "windows" -a \
	-f "${ac_cv_c_tkh}/tkWinPort.h"; then
	result="private headers found with public headers"
    elif test "${TEA_PLATFORM}" = "unix" -a \
	-f "${ac_cv_c_tkh}/tkUnixPort.h"; then
	result="private headers found with public headers"
    else
	TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
	TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
	if test "${TEA_PLATFORM}" = "windows"; then
	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
	else
	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
	fi
	case ${TK_DEFS} in
	    *PLATFORM_SDL*)
		TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/sdl\"
		;;
	esac
	# Overwrite the previous TK_INCLUDES as this should capture both
	# public and private headers in the same set.
	# We want to ensure these are substituted so as not to require
	# any *_NATIVE vars be defined in the Makefile
	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
	# Detect and add ttk subdir
	if test -d "${TK_SRC_DIR}/generic/ttk"; then
	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
	fi
	if test "${TEA_WINDOWINGSYSTEM}" != "x11" -o "${TEA_USE_SDL}" = "yes" ; then
	   TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}"
	fi
	if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
	fi
	if test "`uname -s`" = "Darwin"; then
	    # If Tk was built as a framework, attempt to use
	    # the framework's Headers and PrivateHeaders directories
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
#	CYGPATH must be set
#
# Results:
#
#	Adds a --with-tkinclude switch to configure.
#	Result is cached.
#
#	Substs the following vars:
#		TK_INCLUDES
#------------------------------------------------------------------------

AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [
    AC_MSG_CHECKING([for Tk public headers])

    AC_ARG_WITH(tkinclude, [  --with-tkinclude        directory containing the public Tk header files], with_tkinclude=${withval})







|







3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
#	CYGPATH must be set
#
# Results:
#
#	Adds a --with-tkinclude switch to configure.
#	Result is cached.
#
#	Substitutes the following vars:
#		TK_INCLUDES
#------------------------------------------------------------------------

AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [
    AC_MSG_CHECKING([for Tk public headers])

    AC_ARG_WITH(tkinclude, [  --with-tkinclude        directory containing the public Tk header files], with_tkinclude=${withval})
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718

    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`

    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"

    AC_SUBST(TK_INCLUDES)

    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
	# On Windows and Aqua, we need the X compat headers
	AC_MSG_CHECKING([for X11 header files])
	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
	    AC_SUBST(TK_XINCLUDES)
	fi







|







3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885

    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`

    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"

    AC_SUBST(TK_INCLUDES)

    if test "${TEA_WINDOWINGSYSTEM}" != "x11" -o "${TEA_USE_SDL}" = "yes" ; then
	# On Windows and Aqua, we need the X compat headers
	AC_MSG_CHECKING([for X11 header files])
	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
	    AC_SUBST(TK_XINCLUDES)
	fi
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
# Arguments:
#
#	Requires the following vars to be set:
#		$1_BIN_DIR
#
# Results:
#
#	Subst the following vars:
#		$1_SRC_DIR
#		$1_LIB_FILE
#		$1_LIB_SPEC
#
#------------------------------------------------------------------------

AC_DEFUN([TEA_LOAD_CONFIG], [
    AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])

    if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
        AC_MSG_RESULT([loading])







|



<







4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020

4021
4022
4023
4024
4025
4026
4027
# Arguments:
#
#	Requires the following vars to be set:
#		$1_BIN_DIR
#
# Results:
#
#	Substitutes the following vars:
#		$1_SRC_DIR
#		$1_LIB_FILE
#		$1_LIB_SPEC

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

AC_DEFUN([TEA_LOAD_CONFIG], [
    AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])

    if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
        AC_MSG_RESULT([loading])
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
# TEA_LOAD_CONFIG_LIB --
#
#	Helper function to load correct library from another extension's
#	${PACKAGE}Config.sh.
#
# Results:
#	Adds to LIBS the appropriate extension library
#
#------------------------------------------------------------------------
AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
    AC_MSG_CHECKING([For $1 library for LIBS])
    # This simplifies the use of stub libraries by automatically adding
    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.







<







4074
4075
4076
4077
4078
4079
4080

4081
4082
4083
4084
4085
4086
4087
# TEA_LOAD_CONFIG_LIB --
#
#	Helper function to load correct library from another extension's
#	${PACKAGE}Config.sh.
#
# Results:
#	Adds to LIBS the appropriate extension library

#------------------------------------------------------------------------
AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
    AC_MSG_CHECKING([For $1 library for LIBS])
    # This simplifies the use of stub libraries by automatically adding
    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
#
# Arguments:
#
#	Requires the following vars to be set:
#		$1
#
# Results:
#	Subst the following vars:
#
#------------------------------------------------------------------------

AC_DEFUN([TEA_EXPORT_CONFIG], [
    #--------------------------------------------------------------------
    # These are for $1Config.sh
    #--------------------------------------------------------------------








|
<







4105
4106
4107
4108
4109
4110
4111
4112

4113
4114
4115
4116
4117
4118
4119
#
# Arguments:
#
#	Requires the following vars to be set:
#		$1
#
# Results:
#	Substitutes the following vars:

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

AC_DEFUN([TEA_EXPORT_CONFIG], [
    #--------------------------------------------------------------------
    # These are for $1Config.sh
    #--------------------------------------------------------------------

4045
4046
4047
4048
4049
4050
4051


4052















































4053
4054
4055
	    CELIB_DIR=${ac_cv_c_celibconfig}
	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
	    AC_MSG_RESULT([found $CELIB_DIR])
	fi
    fi
])



















































# Local Variables:
# mode: autoconf
# End:







>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
	    CELIB_DIR=${ac_cv_c_celibconfig}
	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
	    AC_MSG_RESULT([found $CELIB_DIR])
	fi
    fi
])

#--------------------------------------------------------------------
# TEA_EMBED_MANIFEST
#
#	Figure out if we can embed the manifest where necessary
#
# Arguments:
#	An optional manifest to merge into DLL/EXE.
#
# Results:
#	Will define the following vars:
#		VC_MANIFEST_EMBED_DLL
#		VC_MANIFEST_EMBED_EXE
#
#--------------------------------------------------------------------

AC_DEFUN([TEA_EMBED_MANIFEST], [
    AC_MSG_CHECKING(whether to embed manifest)
    AC_ARG_ENABLE(embedded-manifest,
	AC_HELP_STRING([--enable-embedded-manifest],
		[embed manifest if possible (default: yes)]),
	[embed_ok=$enableval], [embed_ok=yes])

    VC_MANIFEST_EMBED_DLL=
    VC_MANIFEST_EMBED_EXE=
    result=no
    if test "$embed_ok" = "yes" -a "${SHARED_BUILD}" = "1" \
       -a "$GCC" != "yes" ; then
	# Add the magic to embed the manifest into the dll/exe
	AC_EGREP_CPP([manifest needed], [
#if defined(_MSC_VER) && _MSC_VER >= 1400
print("manifest needed")
#endif
	], [
	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
	# Could add 'if test -f' check, but manifest should be created
	# in this compiler case
	# Add in a manifest argument that may be specified
	VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest $1 -outputresource:\[$]@\;2 ; fi"
	VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest $1 -outputresource:\[$]@\;1 ; fi"
	result=yes
	if test "x$1" != x ; then
	    result="yes ($1)"
	fi
	])
    fi
    AC_MSG_RESULT([$result])
    AC_SUBST(VC_MANIFEST_EMBED_DLL)
    AC_SUBST(VC_MANIFEST_EMBED_EXE)
])

# Local Variables:
# mode: autoconf
# End:
Changes to undroid/build-undroidwish-generic.sh.
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl freetype SDL2 sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint tcl-augeas"
SUBDIRS="${SUBDIRS} snack tkvnc tksvg VecTcl"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {







|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl freetype SDL2 sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint tcl-augeas"
SUBDIRS="${SUBDIRS} snack tkvnc tksvg VecTcl tclral"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
964
965
966
967
968
969
970














971
972
973
974
975
976
977
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail















echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* ${PFX_HERE}/lib/*/*.so







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







964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclral ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclral
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* ${PFX_HERE}/lib/*/*.so
1061
1062
1063
1064
1065
1066
1067


1068
1069
1070
1071
1072
1073
1074
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets


  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







>
>







1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets
  cp -rp ${PFX_HERE}/lib/ral* assets
  cp -rp ${AWDIR}/assets/ralutil* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
Changes to undroid/build-undroidwish-linux32.sh.
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl freetype SDL2 sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint tcl-augeas"
SUBDIRS="${SUBDIRS} snack tkvnc tksvg VecTcl"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {







|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl freetype SDL2 sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint tcl-augeas"
SUBDIRS="${SUBDIRS} snack tkvnc tksvg VecTcl tclral"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
846
847
848
849
850
851
852
853
854

855
856
857
858
859
860
861
) || fail

echo -n "build zint ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd zint/backend_tcl
  chmod +x ./configure
  test -e build-stamp && echo >&3 "already done" && exit 0

  DESTDIR=${HERE} ./configure --build=i586-linux-gnu --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/sdl \
    --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"







<

>







846
847
848
849
850
851
852

853
854
855
856
857
858
859
860
861
) || fail

echo -n "build zint ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd zint/backend_tcl

  test -e build-stamp && echo >&3 "already done" && exit 0
  chmod +x ./configure
  DESTDIR=${HERE} ./configure --build=i586-linux-gnu --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/sdl \
    --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
967
968
969
970
971
972
973














974
975
976
977
978
979
980
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail















echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* ${PFX_HERE}/lib/*/*.so







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







967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclral ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclral
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --build=i586-linux-gnu --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* ${PFX_HERE}/lib/*/*.so
1064
1065
1066
1067
1068
1069
1070


1071
1072
1073
1074
1075
1076
1077
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets


  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







>
>







1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets
  cp -rp ${PFX_HERE}/lib/ral* assets
  cp -rp ${AWDIR}/assets/ralutil* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
Changes to undroid/build-undroidwish-linux64.sh.
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl freetype SDL2 sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint tcl-augeas"
SUBDIRS="${SUBDIRS} snack tkvnc tksvg VecTcl"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {







|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl freetype SDL2 sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint tcl-augeas"
SUBDIRS="${SUBDIRS} snack tkvnc tksvg VecTcl tclral"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
967
968
969
970
971
972
973














974
975
976
977
978
979
980
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail















echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* ${PFX_HERE}/lib/*/*.so







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







967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclral ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclral
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --build=x86_64-linux-gnu --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* ${PFX_HERE}/lib/*/*.so
1064
1065
1066
1067
1068
1069
1070


1071
1072
1073
1074
1075
1076
1077
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets


  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







>
>







1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets
  cp -rp ${PFX_HERE}/lib/ral* assets
  cp -rp ${AWDIR}/assets/ralutil* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
Changes to undroid/build-undroidwish-win32.sh.
103
104
105
106
107
108
109
110

111
112
113
114
115
116
117
  TWAPI_LDFLAGS="-L${AWDIR}/undroid/compat/win32/lib32"
  export STRIP AR RANLIB CC CXX RC NM TWAPI_LDFLAGS
fi

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl freetype SDL2 sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclwmf libdmtx ZBar zint snack tkvnc tksvg VecTcl"


ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {







|
>







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
  TWAPI_LDFLAGS="-L${AWDIR}/undroid/compat/win32/lib32"
  export STRIP AR RANLIB CC CXX RC NM TWAPI_LDFLAGS
fi

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl freetype SDL2 sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclwmf libdmtx ZBar zint snack tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
920
921
922
923
924
925
926














927
928
929
930
931
932
933
    --with-tcl=${HERE}/tcl/win --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make LIBS="-L${HERE}/VecTcl -lvectclstub03" || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail















echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll







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







921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
    --with-tcl=${HERE}/tcl/win --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make LIBS="-L${HERE}/VecTcl -lvectclstub03" || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclral ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclral
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --build=i386-windows-mingw32 --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/win --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
1010
1011
1012
1013
1014
1015
1016


1017
1018
1019
1020
1021
1022
1023
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets


  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







>
>







1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets
  cp -rp ${PFX_HERE}/lib/ral* assets
  cp -rp ${AWDIR}/assets/ralutil* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
Changes to undroid/build-undroidwish-win64.sh.
97
98
99
100
101
102
103
104

105
106
107
108
109
110
111
  NM="x86_64-w64-mingw32-nm"
  export STRIP AR RANLIB CC CXX RC NM
fi

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl freetype SDL2 sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclwmf libdmtx ZBar zint snack tkvnc tksvg VecTcl"


ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {







|
>







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
  NM="x86_64-w64-mingw32-nm"
  export STRIP AR RANLIB CC CXX RC NM
fi

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl freetype SDL2 sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclwmf libdmtx ZBar zint snack tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
910
911
912
913
914
915
916














917
918
919
920
921
922
923
    --with-tcl=${HERE}/tcl/win --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make LIBS="-L${HERE}/VecTcl -lvectclstub03" || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail















echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll







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







911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
    --with-tcl=${HERE}/tcl/win --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make LIBS="-L${HERE}/VecTcl -lvectclstub03" || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclral ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclral
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --build=x86_64-windows-mingw32 --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/win --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
1000
1001
1002
1003
1004
1005
1006


1007
1008
1009
1010
1011
1012
1013
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets


  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







>
>







1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets
  cp -rp ${PFX_HERE}/lib/ral* assets
  cp -rp ${AWDIR}/assets/ralutil* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
Changes to undroid/build-vanilla-generic.sh.
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint"
SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {







|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint"
SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
915
916
917
918
919
920
921














922
923
924
925
926
927
928
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail















echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*/*.so







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







915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclral ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclral
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*/*.so
1013
1014
1015
1016
1017
1018
1019


1020
1021
1022
1023
1024
1025
1026
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets


  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







>
>







1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets
  cp -rp ${PFX_HERE}/lib/ral* assets
  cp -rp ${AWDIR}/assets/ralutil* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
1090
1091
1092
1093
1094
1095
1096


1097
1098
1099
1100
1101
1102
1103
  cp -rp ${PFX_HERE}/lib/dbus* tassets
  cp -rp ${PFX_HERE}/lib/tclx* tassets
  cp -rp ${PFX_HERE}/lib/augeas* tassets
  cp -rp ${PFX_HERE}/lib/snack* tassets
  rm -f tassets/snack*/libsnack* tassets/snack*/snack.tcl
  cp -rp ${PFX_HERE}/lib/vectcl0* tassets
  cp -rp ${PFX_HERE}/lib/WavReader* tassets


  # zlibtcl from tkimg needed for trf
  mkdir -p tassets/zlibtcl1.2.8.1
  cp -p ${PFX_HERE}/lib/Img*/*zlibtcl* tassets/zlibtcl*
  (
    cd tassets/zlibtcl*
    head -2 ${PFX_HERE}/lib/Img*/pkgIndex.tcl > pkgIndex.tcl
  )







>
>







1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
  cp -rp ${PFX_HERE}/lib/dbus* tassets
  cp -rp ${PFX_HERE}/lib/tclx* tassets
  cp -rp ${PFX_HERE}/lib/augeas* tassets
  cp -rp ${PFX_HERE}/lib/snack* tassets
  rm -f tassets/snack*/libsnack* tassets/snack*/snack.tcl
  cp -rp ${PFX_HERE}/lib/vectcl0* tassets
  cp -rp ${PFX_HERE}/lib/WavReader* tassets
  cp -rp ${PFX_HERE}/lib/ral* tassets
  cp -rp ${AWDIR}/assets/ralutil* tassets
  # zlibtcl from tkimg needed for trf
  mkdir -p tassets/zlibtcl1.2.8.1
  cp -p ${PFX_HERE}/lib/Img*/*zlibtcl* tassets/zlibtcl*
  (
    cd tassets/zlibtcl*
    head -2 ${PFX_HERE}/lib/Img*/pkgIndex.tcl > pkgIndex.tcl
  )
Changes to undroid/build-vanilla-linux32.sh.
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint"
SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {







|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint"
SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
915
916
917
918
919
920
921














922
923
924
925
926
927
928
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail















echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*/*.so







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







915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclral ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclral
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --build=i586-linux-gnu --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*/*.so
1013
1014
1015
1016
1017
1018
1019


1020
1021
1022
1023
1024
1025
1026
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets


  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







>
>







1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets
  cp -rp ${PFX_HERE}/lib/ral* assets
  cp -rp ${AWDIR}/assets/ralutil* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
1090
1091
1092
1093
1094
1095
1096


1097
1098
1099
1100
1101
1102
1103
  cp -rp ${PFX_HERE}/lib/dbus* tassets
  cp -rp ${PFX_HERE}/lib/tclx* tassets
  cp -rp ${PFX_HERE}/lib/augeas* tassets
  cp -rp ${PFX_HERE}/lib/snack* tassets
  rm -f tassets/snack*/libsnack* tassets/snack*/snack.tcl
  cp -rp ${PFX_HERE}/lib/vectcl0* tassets
  cp -rp ${PFX_HERE}/lib/WavReader* tassets


  # zlibtcl from tkimg needed for trf
  mkdir -p tassets/zlibtcl1.2.8.1
  cp -p ${PFX_HERE}/lib/Img*/*zlibtcl* tassets/zlibtcl*
  (
    cd tassets/zlibtcl*
    head -2 ${PFX_HERE}/lib/Img*/pkgIndex.tcl > pkgIndex.tcl
  )







>
>







1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
  cp -rp ${PFX_HERE}/lib/dbus* tassets
  cp -rp ${PFX_HERE}/lib/tclx* tassets
  cp -rp ${PFX_HERE}/lib/augeas* tassets
  cp -rp ${PFX_HERE}/lib/snack* tassets
  rm -f tassets/snack*/libsnack* tassets/snack*/snack.tcl
  cp -rp ${PFX_HERE}/lib/vectcl0* tassets
  cp -rp ${PFX_HERE}/lib/WavReader* tassets
  cp -rp ${PFX_HERE}/lib/ral* tassets
  cp -rp ${AWDIR}/assets/ralutil* tassets
  # zlibtcl from tkimg needed for trf
  mkdir -p tassets/zlibtcl1.2.8.1
  cp -p ${PFX_HERE}/lib/Img*/*zlibtcl* tassets/zlibtcl*
  (
    cd tassets/zlibtcl*
    head -2 ${PFX_HERE}/lib/Img*/pkgIndex.tcl > pkgIndex.tcl
  )
Changes to undroid/build-vanilla-linux64.sh.
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint"
SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {







|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NM=nm
export STRIP AR RANLIB CC CXX RC NM

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} tcluvc dbus-tcl dbus-intf tclx libdmtx ZBar zint"
SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
915
916
917
918
919
920
921














922
923
924
925
926
927
928
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail















echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*/*.so







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







915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
    --with-tcl=${HERE}/tcl/unix --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclral ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclral
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --build=x86_64-linux-gnu --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*/*.so
1013
1014
1015
1016
1017
1018
1019


1020
1021
1022
1023
1024
1025
1026
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets


  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







>
>







1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
  if test -d assets/tcluvc* ; then
    cp -rp ${HERE}/tcluvc*/demos assets/tcluvc*
  fi
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets
  cp -rp ${PFX_HERE}/lib/ral* assets
  cp -rp ${AWDIR}/assets/ralutil* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
1090
1091
1092
1093
1094
1095
1096


1097
1098
1099
1100
1101
1102
1103
  cp -rp ${PFX_HERE}/lib/dbus* tassets
  cp -rp ${PFX_HERE}/lib/tclx* tassets
  cp -rp ${PFX_HERE}/lib/augeas* tassets
  cp -rp ${PFX_HERE}/lib/snack* tassets
  rm -f tassets/snack*/libsnack* tassets/snack*/snack.tcl
  cp -rp ${PFX_HERE}/lib/vectcl0* tassets
  cp -rp ${PFX_HERE}/lib/WavReader* tassets


  # zlibtcl from tkimg needed for trf
  mkdir -p tassets/zlibtcl1.2.8.1
  cp -p ${PFX_HERE}/lib/Img*/*zlibtcl* tassets/zlibtcl*
  (
    cd tassets/zlibtcl*
    head -2 ${PFX_HERE}/lib/Img*/pkgIndex.tcl > pkgIndex.tcl
  )







>
>







1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
  cp -rp ${PFX_HERE}/lib/dbus* tassets
  cp -rp ${PFX_HERE}/lib/tclx* tassets
  cp -rp ${PFX_HERE}/lib/augeas* tassets
  cp -rp ${PFX_HERE}/lib/snack* tassets
  rm -f tassets/snack*/libsnack* tassets/snack*/snack.tcl
  cp -rp ${PFX_HERE}/lib/vectcl0* tassets
  cp -rp ${PFX_HERE}/lib/WavReader* tassets
  cp -rp ${PFX_HERE}/lib/ral* tassets
  cp -rp ${AWDIR}/assets/ralutil* tassets
  # zlibtcl from tkimg needed for trf
  mkdir -p tassets/zlibtcl1.2.8.1
  cp -p ${PFX_HERE}/lib/Img*/*zlibtcl* tassets/zlibtcl*
  (
    cd tassets/zlibtcl*
    head -2 ${PFX_HERE}/lib/Img*/pkgIndex.tcl > pkgIndex.tcl
  )
Changes to undroid/build-vanilla-win32.sh.
104
105
106
107
108
109
110
111

112
113
114
115
116
117
118
  TWAPI_LDFLAGS="-L${AWDIR}/undroid/compat/win32/lib32"
  export STRIP AR RANLIB CC CXX RC NM TWAPI_LDFLAGS
fi

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclwmf libdmtx ZBar zint snack winico tkvnc tksvg VecTcl"


ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {







|
>







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
  TWAPI_LDFLAGS="-L${AWDIR}/undroid/compat/win32/lib32"
  export STRIP AR RANLIB CC CXX RC NM TWAPI_LDFLAGS
fi

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclwmf libdmtx ZBar zint snack winico tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
880
881
882
883
884
885
886














887
888
889
890
891
892
893
    --with-tcl=${HERE}/tcl/win --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make LIBS="-L${HERE}/VecTcl -lvectclstub03" || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail















echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll







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







881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
    --with-tcl=${HERE}/tcl/win --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make LIBS="-L${HERE}/VecTcl -lvectclstub03" || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclral ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclral
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --build=i386-windows-mingw32 --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/win --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
972
973
974
975
976
977
978


979
980
981
982
983
984
985
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets


  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







>
>







987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets
  cp -rp ${PFX_HERE}/lib/ral* assets
  cp -rp ${AWDIR}/assets/ralutil* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
1051
1052
1053
1054
1055
1056
1057


1058
1059
1060
1061
1062
1063
1064
  cp -rp ${PFX_HERE}/lib/Trf* tassets
  cp -rp ${PFX_HERE}/lib/TclCurl* tassets
  cp -rp ${PFX_HERE}/lib/twapi* tassets
  cp -rp ${PFX_HERE}/lib/snack* tassets
  rm -f tassets/snack*/libsnack* tassets/snack*/snack.tcl
  cp -rp ${PFX_HERE}/lib/vectcl0* tassets
  cp -rp ${PFX_HERE}/lib/WavReader* tassets


  # zlibtcl from tkimg needed for trf
  mkdir -p tassets/zlibtcl1.2.8.1
  cp -p ${PFX_HERE}/lib/Img*/zlibtcl*.dll tassets/zlibtcl*
  (
    cd tassets/zlibtcl*
    echo  > pkgIndex.tcl 'package ifneeded zlibtcl 1.2.8.1 \'
    echo >> pkgIndex.tcl '  [list load [file join $dir zlibtcl1281.dll]]'







>
>







1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
  cp -rp ${PFX_HERE}/lib/Trf* tassets
  cp -rp ${PFX_HERE}/lib/TclCurl* tassets
  cp -rp ${PFX_HERE}/lib/twapi* tassets
  cp -rp ${PFX_HERE}/lib/snack* tassets
  rm -f tassets/snack*/libsnack* tassets/snack*/snack.tcl
  cp -rp ${PFX_HERE}/lib/vectcl0* tassets
  cp -rp ${PFX_HERE}/lib/WavReader* tassets
  cp -rp ${PFX_HERE}/lib/ral* tassets
  cp -rp ${AWDIR}/assets/ralutil* tassets
  # zlibtcl from tkimg needed for trf
  mkdir -p tassets/zlibtcl1.2.8.1
  cp -p ${PFX_HERE}/lib/Img*/zlibtcl*.dll tassets/zlibtcl*
  (
    cd tassets/zlibtcl*
    echo  > pkgIndex.tcl 'package ifneeded zlibtcl 1.2.8.1 \'
    echo >> pkgIndex.tcl '  [list load [file join $dir zlibtcl1281.dll]]'
Changes to undroid/build-vanilla-win64.sh.
98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
  NM="x86_64-w64-mingw32-nm"
  export STRIP AR RANLIB CC CXX RC NM
fi

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclwmf libdmtx ZBar zint snack winico tkvnc tksvg VecTcl"


ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {







|
>







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
  NM="x86_64-w64-mingw32-nm"
  export STRIP AR RANLIB CC CXX RC NM
fi

SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan trf TclCurl sdl2tk blt"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclwmf libdmtx ZBar zint snack winico tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
870
871
872
873
874
875
876














877
878
879
880
881
882
883
    --with-tcl=${HERE}/tcl/win --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make LIBS="-L${HERE}/VecTcl -lvectclstub03" || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail















echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll







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







871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
    --with-tcl=${HERE}/tcl/win --with-vectcl=${PFX_HERE}/lib/vectcl0.3 \
    --enable-threads || exit 1
  make LIBS="-L${HERE}/VecTcl -lvectclstub03" || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclral ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclral
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --build=x86_64-windows-mingw32 --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/win --enable-threads || exit 1
  make binaries || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
962
963
964
965
966
967
968


969
970
971
972
973
974
975
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets


  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







>
>







977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  cp -rp ${PFX_HERE}/lib/vectcl0* assets
  cp -rp ${PFX_HERE}/lib/vectcltk0* assets
  cp -rp ${AWDIR}/assets/vectcl*/demo assets/vectcltk*
  cp -rp ${PFX_HERE}/lib/WavReader* assets
  cp -rp ${PFX_HERE}/lib/ral* assets
  cp -rp ${AWDIR}/assets/ralutil* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
1041
1042
1043
1044
1045
1046
1047


1048
1049
1050
1051
1052
1053
1054
  cp -rp ${PFX_HERE}/lib/Trf* tassets
  cp -rp ${PFX_HERE}/lib/TclCurl* tassets
  cp -rp ${PFX_HERE}/lib/twapi* tassets
  cp -rp ${PFX_HERE}/lib/snack* tassets
  rm -f tassets/snack*/libsnack* tassets/snack*/snack.tcl
  cp -rp ${PFX_HERE}/lib/vectcl0* tassets
  cp -rp ${PFX_HERE}/lib/WavReader* tassets


  # zlibtcl from tkimg needed for trf
  mkdir -p tassets/zlibtcl1.2.8.1
  cp -p ${PFX_HERE}/lib/Img*/zlibtcl*.dll tassets/zlibtcl*
  (
    cd tassets/zlibtcl*
    echo  > pkgIndex.tcl 'package ifneeded zlibtcl 1.2.8.1 \'
    echo >> pkgIndex.tcl '  [list load [file join $dir zlibtcl1281.dll]]'







>
>







1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
  cp -rp ${PFX_HERE}/lib/Trf* tassets
  cp -rp ${PFX_HERE}/lib/TclCurl* tassets
  cp -rp ${PFX_HERE}/lib/twapi* tassets
  cp -rp ${PFX_HERE}/lib/snack* tassets
  rm -f tassets/snack*/libsnack* tassets/snack*/snack.tcl
  cp -rp ${PFX_HERE}/lib/vectcl0* tassets
  cp -rp ${PFX_HERE}/lib/WavReader* tassets
  cp -rp ${PFX_HERE}/lib/ral* tassets
  cp -rp ${AWDIR}/assets/ralutil* tassets
  # zlibtcl from tkimg needed for trf
  mkdir -p tassets/zlibtcl1.2.8.1
  cp -p ${PFX_HERE}/lib/Img*/zlibtcl*.dll tassets/zlibtcl*
  (
    cd tassets/zlibtcl*
    echo  > pkgIndex.tcl 'package ifneeded zlibtcl 1.2.8.1 \'
    echo >> pkgIndex.tcl '  [list load [file join $dir zlibtcl1281.dll]]'