1339
1339
The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1340
1340
{ (exit 1); exit 1; }; }
1342
if test x"3.5" = x ; then
1342
if test x"3.6" = x ; then
1343
1343
{ { echo "$as_me:$LINENO: error:
1344
1344
TEA version not specified." >&5
1345
1345
echo "$as_me: error:
1346
1346
TEA version not specified." >&2;}
1347
1347
{ (exit 1); exit 1; }; }
1348
elif test "3.5" != "${TEA_VERSION}" ; then
1349
echo "$as_me:$LINENO: result: warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&5
1350
echo "${ECHO_T}warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&6
1348
elif test "3.6" != "${TEA_VERSION}" ; then
1349
echo "$as_me:$LINENO: result: warning: requested TEA version \"3.6\", have \"${TEA_VERSION}\"" >&5
1350
echo "${ECHO_T}warning: requested TEA version \"3.6\", have \"${TEA_VERSION}\"" >&6
1352
1352
echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1353
1353
echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
6441
6484
echo "$as_me:$LINENO: checking if libcurl version is recent enough" >&5
6442
6485
echo $ECHO_N "checking if libcurl version is recent enough... $ECHO_C" >&6
6443
CURL_VERSION=`$curlpath/curl -V | tr -d \\\n | cut -f 2 -d " " | sed "s/\\.//g"`
6444
CURL_VERSION=`echo $CURL_VERSION | sed "s/-.*//g"`
6445
if test ${CURL_VERSION} -lt 7153 ; then
6486
CURL_VERSION=`$curlpath/curl-config --checkfor 7.17.1`
6487
if test "${CURL_VERSION}" != "" ; then
6488
echo ${CURL_VERSION}
6446
6489
{ { echo "$as_me:$LINENO: error: libcurl version too old, please upgrade" >&5
6447
6490
echo "$as_me: error: libcurl version too old, please upgrade" >&2;}
6448
6491
{ (exit 1); exit 1; }; }
6450
echo "$as_me:$LINENO: result: $CURL_VERSION" >&5
6451
echo "${ECHO_T}$CURL_VERSION" >&6
6453
# We need to modify this original line to strip a few things
6454
# See: http://lists.debian.org/debian-devel-announce/2006/09/msg00018.html
6455
#TEA_ADD_LIBS([`$curlpath/curl-config --libs`])
6457
vars="`$curlpath/curl-config --libs|sed \
6458
-e 's/\-lgnutls//g' \
6459
-e 's/\-lkrb5\>//g' \
6460
-e 's/\-lcom_err//g' \
6463
-e 's/\-lresolv//g' \
6465
-e 's/\-lgssapi_krb5//g' \
6466
-e 's/\-lk5crypto//g' \
6467
-e 's/\-lkrb5support//g' \
6493
echo "$as_me:$LINENO: result: yes" >&5
6494
echo "${ECHO_T}yes" >&6
6497
vars="`$curlpath/curl-config --libs`"
6469
6498
for i in $vars; do
6470
6499
if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6471
6500
# Convert foo.lib to -lfoo for GCC. No-op if not *.lib
6489
6518
# TEA_ADD_* any platform specific compiler/build info here.
6490
6519
#--------------------------------------------------------------------
6521
# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
6522
# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
6523
#CLEANFILES="pkgIndex.tcl"
6492
6524
if test "${TEA_PLATFORM}" = "windows" ; then
6494
6526
cat >>confdefs.h <<\_ACEOF
6495
#define BUILD_TclCurl 1
6527
#define BUILD_sample 1
6498
CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
6499
#TEA_ADD_SOURCES([win/winFile.c])
6500
#TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
6530
CLEANFILES="$CLEANFILES *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
6502
CLEANFILES="pkgIndex.tcl"
6503
#TEA_ADD_SOURCES([unix/unixFile.c])
6504
#TEA_ADD_LIBS([-lsuperfly])
6532
# Ensure no empty else clauses
6508
6537
#--------------------------------------------------------------------
6509
6539
# Choose which headers you need. Extension authors should try very
6510
6540
# hard to only rely on the Tcl public header files. Internal headers
6511
6541
# contain private data structures and are subject to change without
8196
8238
if test "`uname -m`" = "alpha" ; then
8197
8239
CFLAGS="$CFLAGS -mieee"
8241
if test $do64bit = yes; then
8242
echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
8243
echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
8244
if test "${tcl_cv_cc_m64+set}" = set; then
8245
echo $ECHO_N "(cached) $ECHO_C" >&6
8249
CFLAGS="$CFLAGS -m64"
8250
cat >conftest.$ac_ext <<_ACEOF
8253
cat confdefs.h >>conftest.$ac_ext
8254
cat >>conftest.$ac_ext <<_ACEOF
8255
/* end confdefs.h. */
8265
rm -f conftest.$ac_objext conftest$ac_exeext
8266
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8267
(eval $ac_link) 2>conftest.er1
8269
grep -v '^ *+' conftest.er1 >conftest.err
8271
cat conftest.err >&5
8272
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8273
(exit $ac_status); } &&
8274
{ ac_try='test -z "$ac_c_werror_flag"
8275
|| test ! -s conftest.err'
8276
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8279
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8280
(exit $ac_status); }; } &&
8281
{ ac_try='test -s conftest$ac_exeext'
8282
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8285
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8286
(exit $ac_status); }; }; then
8289
echo "$as_me: failed program was:" >&5
8290
sed 's/^/| /' conftest.$ac_ext >&5
8294
rm -f conftest.err conftest.$ac_objext \
8295
conftest$ac_exeext conftest.$ac_ext
8298
echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
8299
echo "${ECHO_T}$tcl_cv_cc_m64" >&6
8300
if test $tcl_cv_cc_m64 = yes; then
8301
CFLAGS="$CFLAGS -m64"
8200
8306
# The combo of gcc + glibc has a bug related
8201
8307
# to inlining of functions like strtod(). The
8392
8498
CFLAGS_OPTIMIZE="-Os"
8393
8499
SHLIB_CFLAGS="-fno-common"
8500
# To avoid discrepancies between what headers configure sees during
8501
# preprocessing tests and compiling tests, move any -isysroot and
8502
# -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
8503
CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
8504
awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8505
if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
8506
CFLAGS="`echo " ${CFLAGS}" | \
8507
awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8508
if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
8394
8509
if test $do64bit = yes; then
8396
CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8512
echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
8513
echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6
8514
if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
8515
echo $ECHO_N "(cached) $ECHO_C" >&6
8519
CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8520
cat >conftest.$ac_ext <<_ACEOF
8523
cat confdefs.h >>conftest.$ac_ext
8524
cat >>conftest.$ac_ext <<_ACEOF
8525
/* end confdefs.h. */
8535
rm -f conftest.$ac_objext conftest$ac_exeext
8536
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8537
(eval $ac_link) 2>conftest.er1
8539
grep -v '^ *+' conftest.er1 >conftest.err
8541
cat conftest.err >&5
8542
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8543
(exit $ac_status); } &&
8544
{ ac_try='test -z "$ac_c_werror_flag"
8545
|| test ! -s conftest.err'
8546
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8549
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8550
(exit $ac_status); }; } &&
8551
{ ac_try='test -s conftest$ac_exeext'
8552
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8555
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8556
(exit $ac_status); }; }; then
8557
tcl_cv_cc_arch_ppc64=yes
8559
echo "$as_me: failed program was:" >&5
8560
sed 's/^/| /' conftest.$ac_ext >&5
8562
tcl_cv_cc_arch_ppc64=no
8564
rm -f conftest.err conftest.$ac_objext \
8565
conftest$ac_exeext conftest.$ac_ext
8568
echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
8569
echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6
8570
if test $tcl_cv_cc_arch_ppc64 = yes; then
8571
CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8575
echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
8576
echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6
8577
if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
8578
echo $ECHO_N "(cached) $ECHO_C" >&6
8582
CFLAGS="$CFLAGS -arch x86_64"
8583
cat >conftest.$ac_ext <<_ACEOF
8586
cat confdefs.h >>conftest.$ac_ext
8587
cat >>conftest.$ac_ext <<_ACEOF
8588
/* end confdefs.h. */
8598
rm -f conftest.$ac_objext conftest$ac_exeext
8599
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8600
(eval $ac_link) 2>conftest.er1
8602
grep -v '^ *+' conftest.er1 >conftest.err
8604
cat conftest.err >&5
8605
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8606
(exit $ac_status); } &&
8607
{ ac_try='test -z "$ac_c_werror_flag"
8608
|| test ! -s conftest.err'
8609
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8612
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8613
(exit $ac_status); }; } &&
8614
{ ac_try='test -s conftest$ac_exeext'
8615
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8618
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619
(exit $ac_status); }; }; then
8620
tcl_cv_cc_arch_x86_64=yes
8622
echo "$as_me: failed program was:" >&5
8623
sed 's/^/| /' conftest.$ac_ext >&5
8625
tcl_cv_cc_arch_x86_64=no
8627
rm -f conftest.err conftest.$ac_objext \
8628
conftest$ac_exeext conftest.$ac_ext
8631
echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
8632
echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6
8633
if test $tcl_cv_cc_arch_x86_64 = yes; then
8634
CFLAGS="$CFLAGS -arch x86_64"
8638
{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
8639
echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
8642
# Check for combined 32-bit and 64-bit fat build
8643
echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
8644
echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
8398
8647
# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here:
8399
8648
SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
8451
8701
rm -f conftest.err conftest.$ac_objext \
8452
8702
conftest$ac_exeext conftest.$ac_ext
8453
LDFLAGS=$hold_ldflags
8703
LDFLAGS=$hold_ldflags
8455
8705
echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
8456
8706
echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
8457
8707
if test $tcl_cv_ld_single_module = yes; then
8458
SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
8708
SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
8460
8710
SHLIB_LD_LIBS='${LIBS}'
8461
8711
SHLIB_SUFFIX=".dylib"
8462
8712
DL_OBJS="tclLoadDyld.o"
8464
8714
# Don't use -prebind when building for Mac OS X 10.4 or later only:
8465
test -z "${MACOSX_DEPLOYMENT_TARGET}" || \
8466
test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print $2}'`" -lt 4 && \
8715
test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
8716
"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
8467
8717
LDFLAGS="$LDFLAGS -prebind"
8468
8718
LDFLAGS="$LDFLAGS -headerpad_max_install_names"
8469
8719
echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
8520
8771
rm -f conftest.err conftest.$ac_objext \
8521
8772
conftest$ac_exeext conftest.$ac_ext
8522
LDFLAGS=$hold_ldflags
8773
LDFLAGS=$hold_ldflags
8524
8775
echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
8525
8776
echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
8526
8777
if test $tcl_cv_ld_search_paths_first = yes; then
8527
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8778
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8529
8780
CC_SEARCH_FLAGS=""
8530
8781
LD_SEARCH_FLAGS=""
8531
8782
LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
8533
# TEA specific: for Tk extensions, remove -arch ppc64 from CFLAGS
8534
# for fat builds, as neither TkAqua nor TkX11 can be built for 64bit
8535
# at present (no 64bit GUI libraries).
8536
test $do64bit_ok = no && test -n "${TK_BIN_DIR}" && \
8537
CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`"
8784
# TEA specific: for Tk extensions, remove 64-bit arch flags from
8785
# CFLAGS for combined 32-bit and 64-bit fat builds as neither TkAqua
8786
# nor TkX11 can be built for 64-bit at present.
8787
test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}" && \
8788
CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`"
8540
8791
SHLIB_CFLAGS=""
10587
10843
s,@MATH_LIBS@,$MATH_LIBS,;t t
10588
10844
s,@PKG_SOURCES@,$PKG_SOURCES,;t t
10589
10845
s,@PKG_OBJECTS@,$PKG_OBJECTS,;t t
10846
s,@TCLCURL_SCRIPTS@,$TCLCURL_SCRIPTS,;t t
10590
10847
s,@curl@,$curl,;t t
10591
10848
s,@CLEANFILES@,$CLEANFILES,;t t
10592
10849
s,@TCL_INCLUDES@,$TCL_INCLUDES,;t t