summaryrefslogtreecommitdiffstats
path: root/unix/configure
diff options
context:
space:
mode:
authorhypnotoad <yoda@etoyoc.com>2017-11-20 17:09:44 (GMT)
committerhypnotoad <yoda@etoyoc.com>2017-11-20 17:09:44 (GMT)
commit4e97c16367e23bcde62e1b0910c32a7d06614518 (patch)
treeb4a9616165dad657cac99e0362361fe56f9ee951 /unix/configure
parent280b6aa62e68db8d71bc519af2d89d05c745cfcc (diff)
downloadtcl-4e97c16367e23bcde62e1b0910c32a7d06614518.zip
tcl-4e97c16367e23bcde62e1b0910c32a7d06614518.tar.gz
tcl-4e97c16367e23bcde62e1b0910c32a7d06614518.tar.bz2
Modifications to allow the Tcl build system to exploit either a native zip
executable in the path or a tclsh that understands the new "install" keyword from the command line Added a new file to /library which is run when the user executes "tclsh install ..." Embedded in installer.tcl is a facility for building zip archives
Diffstat (limited to 'unix/configure')
-rwxr-xr-xunix/configure194
1 files changed, 77 insertions, 117 deletions
diff --git a/unix/configure b/unix/configure
index dd6bf6b..1c3a206 100755
--- a/unix/configure
+++ b/unix/configure
@@ -658,7 +658,6 @@ TCL_STUB_LIB_FILE
TCL_LIB_SPEC
TCL_LIB_FLAG
TCL_LIB_FILE
-TCL_ZIP_FILE
PKG_CFG_ARGS
TCL_YEAR
TCL_PATCH_LEVEL
@@ -667,10 +666,10 @@ TCL_MAJOR_VERSION
TCL_VERSION
INSTALL_MSGS
INSTALL_LIBRARIES
+TCL_ZIP_FILE
ZIPFS_BUILD
EXEEXT_FOR_BUILD
CC_FOR_BUILD
-ZIP_PROG
DTRACE
LDFLAGS_DEFAULT
CFLAGS_DEFAULT
@@ -2341,7 +2340,6 @@ VERSION=${TCL_VERSION}
EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
EXTRA_BUILD_HTML=${EXTRA_BUILD_HTML:-"@:"}
-TCL_ZIP_FILE=libtcl_${TCL_MAJOR_VERSION}_${TCL_MINOR_VERSION}_${TCL_PATCH_LEVEL}.zip
#------------------------------------------------------------------------
# Setup configure arguments for bundled packages
@@ -10155,153 +10153,115 @@ fi
$as_echo "$tcl_ok" >&6; }
#--------------------------------------------------------------------
-# Zipfs support
+# Zipfs support - Tip 430
#--------------------------------------------------------------------
-
-#
-# Find a native zip implementation
-#
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zip" >&5
-$as_echo_n "checking for zip... " >&6; }
- if ${ac_cv_path_zip+:} false; then :
- $as_echo_n "(cached) " >&6
+# Check whether --enable-zipfs was given.
+if test "${enable_zipfs+set}" = set; then :
+ enableval=$enable_zipfs; tcl_ok=$enableval
else
-
- search_path=`echo ${PATH} | sed -e 's/:/ /g'`
- for dir in $search_path ; do
- for j in `ls -r $dir/zip 2> /dev/null` \
- `ls -r $dir/zip 2> /dev/null` ; do
- if test x"$ac_cv_path_zip" = x ; then
- if test -f "$j" ; then
- ac_cv_path_zip=$j
- break
- fi
- fi
- done
- done
-
+ tcl_ok=yes
fi
-
- if test -f "$ac_cv_path_zip" ; then
- ZIP_PROG="$ac_cv_path_zip"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5
-$as_echo "$ZIP_PROG" >&6; }
- else
- # It is not an error if an installed version of Zip can't be located.
- ZIP_PROG=""
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH" >&5
-$as_echo "No zip found on PATH" >&6; }
- fi
-
-
-
-#
-# Find a native compiler
-#
-# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test -z "$CC_FOR_BUILD"; then
- if test "x$cross_compiling" = "xno"; then
- CC_FOR_BUILD='$(CC)'
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc" >&5
+if test "$tcl_ok" = "yes" ; then
+ #
+ # Find a native compiler
+ #
+ # Put a plausible default for CC_FOR_BUILD in Makefile.
+ if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc" >&5
$as_echo_n "checking for gcc... " >&6; }
- if ${ac_cv_path_cc+:} false; then :
+ if ${ac_cv_path_cc+:} false; then :
$as_echo_n "(cached) " >&6
else
- search_path=`echo ${PATH} | sed -e 's/:/ /g'`
- for dir in $search_path ; do
- for j in `ls -r $dir/gcc 2> /dev/null` \
- `ls -r $dir/gcc 2> /dev/null` ; do
- if test x"$ac_cv_path_cc" = x ; then
- if test -f "$j" ; then
- ac_cv_path_cc=$j
- break
- fi
- fi
- done
- done
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/gcc 2> /dev/null` \
+ `ls -r $dir/gcc 2> /dev/null` ; do
+ if test x"$ac_cv_path_cc" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_cc=$j
+ break
+ fi
+ fi
+ done
+ done
fi
- fi
-fi
+ fi
+ fi
-# Also set EXEEXT_FOR_BUILD.
-if test "x$cross_compiling" = "xno"; then
- EXEEXT_FOR_BUILD='$(EXEEXT)'
- OBJEXT_FOR_BUILD='$(OBJEXT)'
-else
- OBJEXT_FOR_BUILD='.no'
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5
+ # Also set EXEEXT_FOR_BUILD.
+ if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+ OBJEXT_FOR_BUILD='$(OBJEXT)'
+ else
+ OBJEXT_FOR_BUILD='.no'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5
$as_echo_n "checking for build system executable suffix... " >&6; }
if ${bfd_cv_build_exeext+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -f conftest*
- echo 'int main () { return 0; }' > conftest.c
- bfd_cv_build_exeext=
- ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- rm -f conftest*
- test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_build_exeext" >&5
$as_echo "$bfd_cv_build_exeext" >&6; }
- EXEEXT_FOR_BUILD=""
- test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
-fi
-
-
-if test "$ZIP_PROG" = ""; then
- ZIP_PROG='./minizip${EXEEXT_FOR_BUILD}'
-fi
-
-# Check whether --enable-zipfs was given.
-if test "${enable_zipfs+set}" = set; then :
- enableval=$enable_zipfs; tcl_ok=$enableval
-else
- tcl_ok=yes
-fi
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+ fi
- if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
+ #
+ # Find a native zip implementation
+ #
+ SC_PROG_ZIP
ZIPFS_BUILD=1
- else
+ TCL_ZIP_FILE=libtcl_${TCL_MAJOR_VERSION}_${TCL_MINOR_VERSION}_${TCL_PATCH_LEVEL}.zip
+else
ZIPFS_BUILD=0
- fi
- # Do checking message here to not mess up interleaved configure output
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with zipfs" >&5
+ TCL_ZIP_FILE=
+fi
+# Do checking message here to not mess up interleaved configure output
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with zipfs" >&5
$as_echo_n "checking for building with zipfs... " >&6; }
- if test "${ZIPFS_BUILD}" = 1; then
- if test "${SHARED_BUILD}" = 0; then
- ZIPFS_BUILD=2;
+if test "${ZIPFS_BUILD}" = 1; then
+ if test "${SHARED_BUILD}" = 0; then
+ ZIPFS_BUILD=2;
$as_echo "#define ZIPFS_BUILD 2" >>confdefs.h
- INSTALL_LIBRARIES=install-libraries-zipfs-static
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ INSTALL_LIBRARIES=install-libraries-zipfs-static
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- else
+ else
$as_echo "#define ZIPFS_BUILD 1" >>confdefs.h
\
- INSTALL_LIBRARIES=install-libraries-zipfs-shared
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ INSTALL_LIBRARIES=install-libraries-zipfs-shared
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- INSTALL_LIBRARIES=install-libraries
- INSTALL_MSGS=install-msgs
fi
+else
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+INSTALL_LIBRARIES=install-libraries
+INSTALL_MSGS=install-msgs
+fi
+