summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-12 17:27:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-12 17:27:11 (GMT)
commit73277b178e29b0e499f342d289ccede764f3e328 (patch)
tree7530b20014aaa8ae640a868399aa6b3c8bc6d8c0 /unix
parent21d34a19569a60fcfb184212d11b6c0174799ca5 (diff)
parent840ba03059b7fa3e6995fdf5b6ba2f4f6c9b1023 (diff)
downloadtcl-73277b178e29b0e499f342d289ccede764f3e328.zip
tcl-73277b178e29b0e499f342d289ccede764f3e328.tar.gz
tcl-73277b178e29b0e499f342d289ccede764f3e328.tar.bz2
Use Marc Culler's "macher" utility for the onefiledist MacOSX builds. Only for non-framework builds.
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in9
-rwxr-xr-xunix/configure40
-rw-r--r--unix/configure.ac8
-rw-r--r--unix/tcl.m425
4 files changed, 73 insertions, 9 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 00e29be..df55f5d 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -727,6 +727,7 @@ HOST_CC = @CC_FOR_BUILD@
HOST_EXEEXT = @EXEEXT_FOR_BUILD@
HOST_OBJEXT = @OBJEXT_FOR_BUILD@
ZIPFS_BUILD = @ZIPFS_BUILD@
+MACHER = @MACHER_PROG@
NATIVE_ZIP = @ZIP_PROG@
ZIP_PROG_OPTIONS = @ZIP_PROG_OPTIONS@
ZIP_PROG_VFSSEARCH = @ZIP_PROG_VFSSEARCH@
@@ -792,7 +793,11 @@ ${LIB_FILE}: ${STUB_LIB_FILE} ${OBJS} ${TCL_ZIP_FILE}
rm -f $@
@MAKE_LIB@
@if test "${ZIPFS_BUILD}" = "1" ; then \
+ if test "x$(MACHER)" = "x" ; then \
cat ${TCL_ZIP_FILE} >> ${LIB_FILE}; \
+ else $(MACHER) append ${LIB_FILE} ${TCL_ZIP_FILE} /tmp/macher_output; \
+ mv /tmp/macher_output ${LIB_FILE}; \
+ fi; \
${NATIVE_ZIP} -A ${LIB_FILE} \
|| echo 'ignore zip-error by adjust sfx process (not executable?)'; \
fi
@@ -819,7 +824,11 @@ ${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${TCL_ZIP_FILE}
@TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \
${CC_SEARCH_FLAGS} -o ${TCL_EXE}
@if test "${ZIPFS_BUILD}" = "2" ; then \
+ if test "x$(MACHER)" = "x" ; then \
cat ${TCL_ZIP_FILE} >> ${TCL_EXE}; \
+ else $(MACHER) append ${TCL_EXE} ${TCL_ZIP_FILE} /tmp/macher_output; \
+ mv /tmp/macher_output ${TCL_EXE}; \
+ fi; \
${NATIVE_ZIP} -A ${TCL_EXE} \
|| echo 'ignore zip-error by adjust sfx process (not executable?)'; \
fi
diff --git a/unix/configure b/unix/configure
index 50a035b..53e41fa 100755
--- a/unix/configure
+++ b/unix/configure
@@ -698,6 +698,7 @@ ZIP_INSTALL_OBJS
ZIP_PROG_VFSSEARCH
ZIP_PROG_OPTIONS
ZIP_PROG
+MACHER_PROG
EXEEXT_FOR_BUILD
CC_FOR_BUILD
DTRACE
@@ -11097,11 +11098,41 @@ printf "%s\n" "$bfd_cv_build_exeext" >&6; }
# Find a native zip implementation
#
+ MACHER_PROG=""
ZIP_PROG=""
ZIP_PROG_OPTIONS=""
ZIP_PROG_VFSSEARCH=""
ZIP_INSTALL_OBJS=""
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for macher" >&5
+printf %s "checking for macher... " >&6; }
+ if test ${ac_cv_path_macher+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/macher 2> /dev/null` \
+ `ls -r $dir/macher 2> /dev/null` ; do
+ if test x"$ac_cv_path_macher" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_macher=$j
+ break
+ fi
+ fi
+ done
+ done
+
+fi
+
+ if test -f "$ac_cv_path_macher" ; then
+ MACHER_PROG="$ac_cv_path_macher"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACHER_PROG" >&5
+printf "%s\n" "$MACHER_PROG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found macher in environment" >&5
+printf "%s\n" "Found macher in environment" >&6; }
+ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip" >&5
printf %s "checking for zip... " >&6; }
if test ${ac_cv_path_zip+y}
@@ -11148,11 +11179,12 @@ printf "%s\n" "No zip found on PATH. Building minizip" >&6; }
- ZIPFS_BUILD=1
- TCL_ZIP_FILE=libtcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_PATCH_LEVEL}.zip
+
+ ZIPFS_BUILD=1
+ TCL_ZIP_FILE=libtcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_PATCH_LEVEL}.zip
else
- ZIPFS_BUILD=0
- TCL_ZIP_FILE=
+ ZIPFS_BUILD=0
+ TCL_ZIP_FILE=
fi
# Do checking message here to not mess up interleaved configure output
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for building with zipfs" >&5
diff --git a/unix/configure.ac b/unix/configure.ac
index edf5f6d..067fc70 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -887,11 +887,11 @@ if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then
# Find a native zip implementation
#
SC_ZIPFS_SUPPORT
- ZIPFS_BUILD=1
- TCL_ZIP_FILE=libtcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_PATCH_LEVEL}.zip
+ ZIPFS_BUILD=1
+ TCL_ZIP_FILE=libtcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_PATCH_LEVEL}.zip
else
- ZIPFS_BUILD=0
- TCL_ZIP_FILE=
+ ZIPFS_BUILD=0
+ TCL_ZIP_FILE=
fi
# Do checking message here to not mess up interleaved configure output
AC_MSG_CHECKING([for building with zipfs])
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index a8911f8..7fc696e 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -3011,18 +3011,40 @@ AC_DEFUN([AX_CC_FOR_BUILD],[# Put a plausible default for CC_FOR_BUILD in Makefi
#
# Results:
# Substitutes the following vars:
-# ZIP_PROG
+# MACHER_PROG
+# ZIP_PROG
# ZIP_PROG_OPTIONS
# ZIP_PROG_VFSSEARCH
# ZIP_INSTALL_OBJS
#------------------------------------------------------------------------
AC_DEFUN([SC_ZIPFS_SUPPORT], [
+ MACHER_PROG=""
ZIP_PROG=""
ZIP_PROG_OPTIONS=""
ZIP_PROG_VFSSEARCH=""
ZIP_INSTALL_OBJS=""
+ AC_MSG_CHECKING([for macher])
+ AC_CACHE_VAL(ac_cv_path_macher, [
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/macher 2> /dev/null` \
+ `ls -r $dir/macher 2> /dev/null` ; do
+ if test x"$ac_cv_path_macher" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_macher=$j
+ break
+ fi
+ fi
+ done
+ done
+ ])
+ if test -f "$ac_cv_path_macher" ; then
+ MACHER_PROG="$ac_cv_path_macher"
+ AC_MSG_RESULT([$MACHER_PROG])
+ AC_MSG_RESULT([Found macher in environment])
+ fi
AC_MSG_CHECKING([for zip])
AC_CACHE_VAL(ac_cv_path_zip, [
search_path=`echo ${PATH} | sed -e 's/:/ /g'`
@@ -3054,6 +3076,7 @@ AC_DEFUN([SC_ZIPFS_SUPPORT], [
ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}"
AC_MSG_RESULT([No zip found on PATH. Building minizip])
fi
+ AC_SUBST(MACHER_PROG)
AC_SUBST(ZIP_PROG)
AC_SUBST(ZIP_PROG_OPTIONS)
AC_SUBST(ZIP_PROG_VFSSEARCH)