mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-09 13:41:59 -04:00
Add nmake.vc build system, add tcl 9 compatibility, half-fix unload, half-add version-info
This commit is contained in:
parent
041c74fe4d
commit
1456af0e8b
15 changed files with 4540 additions and 1351 deletions
|
@ -314,6 +314,18 @@ VPATH = $(srcdir):$(srcdir)/../backend
|
|||
.c.@OBJEXT@:
|
||||
$(COMPILE) -c `@CYGPATH@ $<` -o $@
|
||||
|
||||
$(srcdir)/manifest.uuid:
|
||||
printf "git-" >$(srcdir)/manifest.uuid
|
||||
(cd $(srcdir); git rev-parse HEAD >>$(srcdir)/manifest.uuid || \
|
||||
(printf "svn-r" >$(srcdir)/manifest.uuid ; \
|
||||
svn info --show-item last-changed-revision >>$(srcdir)/manifest.uuid) || \
|
||||
printf "unknown" >$(srcdir)/manifest.uuid)
|
||||
|
||||
sampleUuid.h: $(srcdir)/manifest.uuid
|
||||
echo "#define SAMPLE_VERSION_UUID \\" >$@
|
||||
cat $(srcdir)/manifest.uuid >>$@
|
||||
echo "" >>$@
|
||||
|
||||
#========================================================================
|
||||
# Distribution creation
|
||||
# You may need to tweak this target to make it work correctly.
|
||||
|
@ -462,4 +474,3 @@ uninstall-binaries:
|
|||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
|
|
1939
backend_tcl/configure
vendored
1939
backend_tcl/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,21 +1,25 @@
|
|||
zint tcl binding readme
|
||||
-----------------------
|
||||
2014-06-30
|
||||
2024-12-09
|
||||
(C) Harald Oehlmann
|
||||
(C) Git Lost
|
||||
harald.oehlmann@users.sourceforge.net
|
||||
|
||||
What: tcl binding for zint bar code generator library
|
||||
|
||||
Build:
|
||||
The header files of a TCL and Tk build are required for the build.
|
||||
They are included in a TCL/Tk source tree or in an installed TCL/Tk.
|
||||
|
||||
- MS-VC6 project file "zint_tcl.dsp" may be opened by the GUI.
|
||||
- Linux/Unix build is provided by the configure script.
|
||||
Thanks to Christian Werner for that.
|
||||
There are 3 build environments available:
|
||||
- configure based build system for Linux/MacOS/MSYS/CYGWIN (Windows)
|
||||
Contributed by Christian Werner.
|
||||
- win/Makefile.vc for TCL/Tk MS-Visual Studio build environment
|
||||
- zint_tcl.vxproj for interactive VisualStudio build.
|
||||
|
||||
Usage:
|
||||
|
||||
load zint.dll
|
||||
package require zint
|
||||
zint help
|
||||
|
||||
Most options are identical to the command line tool.
|
||||
|
|
|
@ -3,10 +3,10 @@ Architecture (TEA) extension. For more information on TEA see:
|
|||
|
||||
http://www.tcl.tk/doc/tea/
|
||||
|
||||
This package is part of the Tcl project at SourceForge, and latest
|
||||
sources should be available there:
|
||||
This package is part of the Tcl project at SourceForge, but sources
|
||||
and bug/patch database are hosted on fossil here:
|
||||
|
||||
http://tcl.sourceforge.net/
|
||||
https://core.tcl-lang.org/tclconfig
|
||||
|
||||
This package is a freely available open source package. You can do
|
||||
virtually anything you like with it, such as modifying it, redistributing
|
||||
|
@ -23,4 +23,4 @@ install-sh Program used for copying binaries and script files
|
|||
to their install locations.
|
||||
|
||||
tcl.m4 Collection of Tcl autoconf macros. Included by a package's
|
||||
aclocal.m4 to define SC_* macros.
|
||||
aclocal.m4 to define TEA_* macros.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2020-07-26.22; # UTC
|
||||
scriptversion=2020-11-14.01; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
|
@ -73,6 +73,7 @@ mode=0755
|
|||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
|
@ -103,19 +104,28 @@ Options:
|
|||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-C install only if different (preserve 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.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S OPTION $stripprog installed files using OPTION.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-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
|
||||
|
||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
||||
it's up to you to specify -f if you want it.
|
||||
|
||||
If -S is not specified, no backups are attempted.
|
||||
|
||||
Email bug reports to bug-automake@gnu.org.
|
||||
Automake home page: https://www.gnu.org/software/automake/
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
|
@ -142,9 +152,11 @@ while test $# -ne 0; do
|
|||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-S) stripcmd="$stripprog $2"
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-t)
|
||||
|
@ -263,6 +275,10 @@ do
|
|||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
|
@ -477,6 +493,13 @@ do
|
|||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# If $backupsuffix is set, and the file being installed
|
||||
# already exists, attempt a backup. Don't worry if it fails,
|
||||
# e.g., if mv doesn't support -f.
|
||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
|
@ -491,9 +514,9 @@ do
|
|||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
|
|
|
@ -142,10 +142,16 @@ AC_DEFUN([TEA_PATH_TCLCONFIG], [
|
|||
`ls -d /usr/pkg/lib 2>/dev/null` \
|
||||
`ls -d /usr/lib 2>/dev/null` \
|
||||
`ls -d /usr/lib64 2>/dev/null` \
|
||||
`ls -d /usr/lib/tcl9.0 2>/dev/null` \
|
||||
`ls -d /usr/lib/tcl8.7 2>/dev/null` \
|
||||
`ls -d /usr/lib/tcl8.6 2>/dev/null` \
|
||||
`ls -d /usr/lib/tcl8.5 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl9.0 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl8.7 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl/tcl8.5 2>/dev/null` \
|
||||
; do
|
||||
|
@ -219,6 +225,10 @@ AC_DEFUN([TEA_PATH_TKCONFIG], [
|
|||
AS_HELP_STRING([--with-tk],
|
||||
[directory containing tk configuration (tkConfig.sh)]),
|
||||
[with_tkconfig="${withval}"])
|
||||
AC_ARG_WITH(tk8,
|
||||
AS_HELP_STRING([--with-tk8],
|
||||
[Compile for Tk8 in Tk9 environment]),
|
||||
[with_tk8="${withval}"])
|
||||
AC_MSG_CHECKING([for Tk configuration])
|
||||
AC_CACHE_VAL(ac_cv_c_tkconfig,[
|
||||
|
||||
|
@ -286,12 +296,18 @@ AC_DEFUN([TEA_PATH_TKCONFIG], [
|
|||
`ls -d /usr/local/lib 2>/dev/null` \
|
||||
`ls -d /usr/contrib/lib 2>/dev/null` \
|
||||
`ls -d /usr/pkg/lib 2>/dev/null` \
|
||||
`ls -d /usr/lib/tk9.0 2>/dev/null` \
|
||||
`ls -d /usr/lib/tk8.7 2>/dev/null` \
|
||||
`ls -d /usr/lib/tk8.6 2>/dev/null` \
|
||||
`ls -d /usr/lib/tk8.5 2>/dev/null` \
|
||||
`ls -d /usr/lib 2>/dev/null` \
|
||||
`ls -d /usr/lib64 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tk9.0 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tk8.7 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tk8.6 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tk8.5 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl/tk9.0 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl/tk8.7 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl/tk8.6 2>/dev/null` \
|
||||
`ls -d /usr/local/lib/tcl/tk8.5 2>/dev/null` \
|
||||
; do
|
||||
|
@ -370,10 +386,10 @@ 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])
|
||||
AC_MSG_RESULT([loading])
|
||||
. "${TCL_BIN_DIR}/tclConfig.sh"
|
||||
else
|
||||
AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh])
|
||||
AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh])
|
||||
fi
|
||||
|
||||
# If the TCL_BIN_DIR is the build directory (not the install directory),
|
||||
|
@ -383,9 +399,9 @@ AC_DEFUN([TEA_LOAD_TCLCONFIG], [
|
|||
# instead of TCL_BUILD_LIB_SPEC since it will work with both an
|
||||
# installed and uninstalled version of Tcl.
|
||||
if test -f "${TCL_BIN_DIR}/Makefile" ; then
|
||||
TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
|
||||
TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
|
||||
TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
|
||||
TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
|
||||
TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
|
||||
TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
|
||||
elif test "`uname -s`" = "Darwin"; then
|
||||
# If Tcl was built as a framework, attempt to use the libraries
|
||||
# from the framework at the given location so that linking works
|
||||
|
@ -478,10 +494,10 @@ 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])
|
||||
AC_MSG_RESULT([loading])
|
||||
. "${TK_BIN_DIR}/tkConfig.sh"
|
||||
else
|
||||
AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
|
||||
AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
|
||||
fi
|
||||
|
||||
# If the TK_BIN_DIR is the build directory (not the install directory),
|
||||
|
@ -491,9 +507,9 @@ AC_DEFUN([TEA_LOAD_TKCONFIG], [
|
|||
# instead of TK_BUILD_LIB_SPEC since it will work with both an
|
||||
# installed and uninstalled version of Tcl.
|
||||
if test -f "${TK_BIN_DIR}/Makefile" ; then
|
||||
TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
|
||||
TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
|
||||
TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
|
||||
TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
|
||||
TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
|
||||
TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
|
||||
elif test "`uname -s`" = "Darwin"; then
|
||||
# If Tk was built as a framework, attempt to use the libraries
|
||||
# from the framework at the given location so that linking works
|
||||
|
@ -571,37 +587,37 @@ AC_DEFUN([TEA_LOAD_TKCONFIG], [
|
|||
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
|
||||
if test "${TEA_PLATFORM}" = "windows"; then
|
||||
if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}" ; then
|
||||
TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
|
||||
elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}" ; then
|
||||
TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}"
|
||||
elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}" ; then
|
||||
TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}"
|
||||
elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}" ; then
|
||||
TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}"
|
||||
fi
|
||||
else
|
||||
TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
|
||||
fi
|
||||
# tclConfig.sh is in Tcl build directory
|
||||
if test "${TEA_PLATFORM}" = "windows"; then
|
||||
if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}" ; then
|
||||
TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
|
||||
elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}" ; then
|
||||
TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}"
|
||||
elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}" ; then
|
||||
TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}"
|
||||
elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}" ; then
|
||||
TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}"
|
||||
fi
|
||||
else
|
||||
TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
|
||||
fi
|
||||
else
|
||||
# tclConfig.sh is in install location
|
||||
if test "${TEA_PLATFORM}" = "windows"; then
|
||||
TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
|
||||
else
|
||||
TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
|
||||
fi
|
||||
list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
|
||||
`ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \
|
||||
`ls -d ${TCL_PREFIX}/bin 2>/dev/null`"
|
||||
for i in $list ; do
|
||||
if test -f "$i/${TCLSH_PROG}" ; then
|
||||
REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
|
||||
break
|
||||
fi
|
||||
done
|
||||
TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
|
||||
# tclConfig.sh is in install location
|
||||
if test "${TEA_PLATFORM}" = "windows"; then
|
||||
TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
|
||||
else
|
||||
TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
|
||||
fi
|
||||
list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
|
||||
`ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \
|
||||
`ls -d ${TCL_PREFIX}/bin 2>/dev/null`"
|
||||
for i in $list ; do
|
||||
if test -f "$i/${TCLSH_PROG}" ; then
|
||||
REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
|
||||
break
|
||||
fi
|
||||
done
|
||||
TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
|
||||
fi
|
||||
AC_MSG_RESULT([${TCLSH_PROG}])
|
||||
AC_SUBST(TCLSH_PROG)
|
||||
|
@ -629,37 +645,37 @@ AC_DEFUN([TEA_PROG_TCLSH], [
|
|||
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
|
||||
if test "${TEA_PLATFORM}" = "windows"; then
|
||||
if test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}" ; then
|
||||
WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
|
||||
elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}s${EXEEXT}" ; then
|
||||
WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}$s{EXEEXT}"
|
||||
elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}" ; then
|
||||
WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}"
|
||||
elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}" ; then
|
||||
WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}"
|
||||
fi
|
||||
else
|
||||
WISH_PROG="${TK_BIN_DIR}/wish"
|
||||
fi
|
||||
# tkConfig.sh is in Tk build directory
|
||||
if test "${TEA_PLATFORM}" = "windows"; then
|
||||
if test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}" ; then
|
||||
WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
|
||||
elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}s${EXEEXT}" ; then
|
||||
WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}$s{EXEEXT}"
|
||||
elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}" ; then
|
||||
WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}"
|
||||
elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}" ; then
|
||||
WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}"
|
||||
fi
|
||||
else
|
||||
WISH_PROG="${TK_BIN_DIR}/wish"
|
||||
fi
|
||||
else
|
||||
# tkConfig.sh is in install location
|
||||
if test "${TEA_PLATFORM}" = "windows"; then
|
||||
WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
|
||||
else
|
||||
WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}"
|
||||
fi
|
||||
list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
|
||||
`ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \
|
||||
`ls -d ${TK_PREFIX}/bin 2>/dev/null`"
|
||||
for i in $list ; do
|
||||
if test -f "$i/${WISH_PROG}" ; then
|
||||
REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
|
||||
break
|
||||
fi
|
||||
done
|
||||
WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
|
||||
# tkConfig.sh is in install location
|
||||
if test "${TEA_PLATFORM}" = "windows"; then
|
||||
WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
|
||||
else
|
||||
WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}"
|
||||
fi
|
||||
list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
|
||||
`ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \
|
||||
`ls -d ${TK_PREFIX}/bin 2>/dev/null`"
|
||||
for i in $list ; do
|
||||
if test -f "$i/${WISH_PROG}" ; then
|
||||
REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
|
||||
break
|
||||
fi
|
||||
done
|
||||
WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
|
||||
fi
|
||||
AC_MSG_RESULT([${WISH_PROG}])
|
||||
AC_SUBST(WISH_PROG)
|
||||
|
@ -721,22 +737,22 @@ AC_DEFUN([TEA_ENABLE_SHARED], [
|
|||
if test "$shared_ok" = "yes" ; then
|
||||
AC_MSG_RESULT([shared])
|
||||
SHARED_BUILD=1
|
||||
STUBS_BUILD=1
|
||||
STUBS_BUILD=1
|
||||
else
|
||||
AC_MSG_RESULT([static])
|
||||
SHARED_BUILD=0
|
||||
AC_DEFINE(STATIC_BUILD, 1, [This a static build])
|
||||
if test "$stubs_ok" = "yes" ; then
|
||||
STUBS_BUILD=1
|
||||
else
|
||||
STUBS_BUILD=0
|
||||
fi
|
||||
if test "$stubs_ok" = "yes" ; then
|
||||
STUBS_BUILD=1
|
||||
else
|
||||
STUBS_BUILD=0
|
||||
fi
|
||||
fi
|
||||
if test "${STUBS_BUILD}" = "1" ; then
|
||||
AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
|
||||
AC_DEFINE(USE_TCLOO_STUBS, 1, [Use TclOO stubs])
|
||||
if test "${TEA_WINDOWINGSYSTEM}" != ""; then
|
||||
AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
|
||||
AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1181,21 +1197,21 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
|
|||
fi
|
||||
|
||||
if test "$GCC" != "yes" ; then
|
||||
if test "${SHARED_BUILD}" = "0" ; then
|
||||
if test "${SHARED_BUILD}" = "0" ; then
|
||||
runtime=-MT
|
||||
else
|
||||
else
|
||||
runtime=-MD
|
||||
fi
|
||||
case "x`echo \${VisualStudioVersion}`" in
|
||||
x1[[4-9]]*)
|
||||
lflags="${lflags} -nodefaultlib:libucrt.lib"
|
||||
TEA_ADD_LIBS([ucrt.lib])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case "x`echo \${VisualStudioVersion}`" in
|
||||
x1[[4-9]]*)
|
||||
lflags="${lflags} -nodefaultlib:libucrt.lib"
|
||||
TEA_ADD_LIBS([ucrt.lib])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$do64bit" != "no" ; then
|
||||
if test "$do64bit" != "no" ; then
|
||||
CC="cl.exe"
|
||||
RC="rc.exe"
|
||||
lflags="${lflags} -nologo -MACHINE:${MACHINE} "
|
||||
|
@ -1281,7 +1297,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
|
|||
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
|
||||
|
||||
TCL_LIB_VERSIONS_OK=nodots
|
||||
;;
|
||||
;;
|
||||
AIX-*)
|
||||
AS_IF([test "$GCC" != "yes"], [
|
||||
# AIX requires the _r compiler when gcc isn't being used
|
||||
|
@ -1291,7 +1307,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
|
|||
;;
|
||||
*)
|
||||
# Make sure only first arg gets _r
|
||||
CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
|
||||
CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([Using $CC for compiling with threads])
|
||||
|
@ -1494,14 +1510,14 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
|
|||
# Check to enable 64-bit flags for compiler/linker
|
||||
|
||||
AS_IF([test "$do64bit" = yes], [
|
||||
AS_IF([test "$GCC" = yes], [
|
||||
AC_MSG_WARN([64bit mode not supported by gcc])
|
||||
], [
|
||||
do64bit_ok=yes
|
||||
SHLIB_LD="ld -64 -shared -rdata_shared"
|
||||
CFLAGS="$CFLAGS -64"
|
||||
LDFLAGS_ARCH="-64"
|
||||
])
|
||||
AS_IF([test "$GCC" = yes], [
|
||||
AC_MSG_WARN([64bit mode not supported by gcc])
|
||||
], [
|
||||
do64bit_ok=yes
|
||||
SHLIB_LD="ld -64 -shared -rdata_shared"
|
||||
CFLAGS="$CFLAGS -64"
|
||||
LDFLAGS_ARCH="-64"
|
||||
])
|
||||
])
|
||||
;;
|
||||
Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*)
|
||||
|
@ -1523,7 +1539,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
|
|||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
AS_IF([test $doRpath = yes], [
|
||||
CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
|
||||
|
@ -1649,15 +1665,6 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
|
|||
])
|
||||
# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
|
||||
SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
|
||||
AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
|
||||
hold_ldflags=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[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}"
|
||||
|
@ -1728,9 +1735,9 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
|
|||
# Digital OSF/1
|
||||
SHLIB_CFLAGS=""
|
||||
AS_IF([test "$SHARED_BUILD" = 1], [
|
||||
SHLIB_LD='ld -shared -expect_unresolved "*"'
|
||||
SHLIB_LD='ld -shared -expect_unresolved "*"'
|
||||
], [
|
||||
SHLIB_LD='ld -non_shared -expect_unresolved "*"'
|
||||
SHLIB_LD='ld -non_shared -expect_unresolved "*"'
|
||||
])
|
||||
SHLIB_SUFFIX=".so"
|
||||
AS_IF([test $doRpath = yes], [
|
||||
|
@ -1900,7 +1907,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
|
|||
LDFLAGS="$LDFLAGS -Wl,-Bexport"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])],
|
||||
[tcl_cv_ld_Bexport=yes],[tcl_cv_ld_Bexport=no])
|
||||
LDFLAGS=$hold_ldflags])
|
||||
LDFLAGS=$hold_ldflags])
|
||||
AS_IF([test $tcl_cv_ld_Bexport = yes], [
|
||||
LDFLAGS="$LDFLAGS -Wl,-Bexport"
|
||||
])
|
||||
|
@ -2019,8 +2026,8 @@ dnl # preprocessing tests use only CPPFLAGS.
|
|||
SHORT s;
|
||||
LONG l;
|
||||
]])],
|
||||
[tcl_cv_winnt_ignore_void=yes],
|
||||
[tcl_cv_winnt_ignore_void=no])
|
||||
[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,
|
||||
|
@ -2533,20 +2540,19 @@ AC_DEFUN([TEA_TCL_LINK_LIBS], [
|
|||
#
|
||||
# Might define the following vars:
|
||||
# _ISOC99_SOURCE
|
||||
# _LARGEFILE64_SOURCE
|
||||
# _LARGEFILE_SOURCE64
|
||||
# _FILE_OFFSET_BITS
|
||||
#
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([TEA_TCL_EARLY_FLAG],[
|
||||
AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])],
|
||||
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#define ]$1[ 1
|
||||
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#define ]$1[ ]m4_default([$4],[1])[
|
||||
]$2]], [[$3]])],
|
||||
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
|
||||
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)]))
|
||||
if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
|
||||
AC_DEFINE($1, 1, [Add the ]$1[ flag when building])
|
||||
AC_DEFINE($1, m4_default([$4],[1]), [Add the ]$1[ flag when building])
|
||||
tcl_flags="$tcl_flags $1"
|
||||
fi
|
||||
])
|
||||
|
@ -2556,10 +2562,10 @@ AC_DEFUN([TEA_TCL_EARLY_FLAGS],[
|
|||
tcl_flags=""
|
||||
TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
|
||||
[char *p = (char *)strtoll; char *q = (char *)strtoull;])
|
||||
TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
|
||||
[struct stat64 buf; int i = stat64("/", &buf);])
|
||||
TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
|
||||
[char *p = (char *)open64;])
|
||||
if test "${TCL_MAJOR_VERSION}" -ne 8 ; then
|
||||
TEA_TCL_EARLY_FLAG(_FILE_OFFSET_BITS,[#include <sys/stat.h>],
|
||||
[switch (0) { case 0: case (sizeof(off_t)==sizeof(long long)): ; }],64)
|
||||
fi
|
||||
if test "x${tcl_flags}" = "x" ; then
|
||||
AC_MSG_RESULT([none])
|
||||
else
|
||||
|
@ -2583,6 +2589,7 @@ AC_DEFUN([TEA_TCL_EARLY_FLAGS],[
|
|||
# HAVE_STRUCT_DIRENT64, HAVE_DIR64
|
||||
# HAVE_STRUCT_STAT64
|
||||
# HAVE_TYPE_OFF64_T
|
||||
# _TIME_BITS
|
||||
#
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
|
@ -2596,9 +2603,9 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
|
|||
# See if we could use long anyway Note that we substitute in the
|
||||
# type that is our current guess for a 64-bit type inside this check
|
||||
# program, so it should be modified only carefully...
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) {
|
||||
case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
|
||||
}]])],[tcl_cv_type_64bit=${tcl_type_64bit}],[])])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) {
|
||||
case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
|
||||
}]])],[tcl_cv_type_64bit=${tcl_type_64bit}],[])])
|
||||
if test "${tcl_cv_type_64bit}" = none ; then
|
||||
AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Do 'long' and 'long long' have the same size (64-bit)?])
|
||||
AC_MSG_RESULT([yes])
|
||||
|
@ -2613,6 +2620,25 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
|
|||
AC_MSG_RESULT([${tcl_cv_type_64bit}])
|
||||
|
||||
# Now check for auxiliary declarations
|
||||
if test "${TCL_MAJOR_VERSION}" -ne 8 ; then
|
||||
AC_CACHE_CHECK([for 64-bit time_t], tcl_cv_time_t_64,[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]],
|
||||
[[switch (0) {case 0: case (sizeof(time_t)==sizeof(long long)): ;}]])],
|
||||
[tcl_cv_time_t_64=yes],[tcl_cv_time_t_64=no])])
|
||||
if test "x${tcl_cv_time_t_64}" = "xno" ; then
|
||||
# Note that _TIME_BITS=64 requires _FILE_OFFSET_BITS=64
|
||||
# which SC_TCL_EARLY_FLAGS has defined if necessary.
|
||||
AC_CACHE_CHECK([if _TIME_BITS=64 enables 64-bit time_t], tcl_cv__time_bits,[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _TIME_BITS 64
|
||||
#include <sys/types.h>]],
|
||||
[[switch (0) {case 0: case (sizeof(time_t)==sizeof(long long)): ;}]])],
|
||||
[tcl_cv__time_bits=yes],[tcl_cv__time_bits=no])])
|
||||
if test "x${tcl_cv__time_bits}" = "xyes" ; then
|
||||
AC_DEFINE(_TIME_BITS, 64, [_TIME_BITS=64 enables 64-bit time_t.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
#include <dirent.h>]], [[struct dirent64 p;]])],
|
||||
|
@ -2624,7 +2650,7 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
|
|||
AC_CACHE_CHECK([for DIR64], tcl_cv_DIR64,[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
#include <dirent.h>]], [[struct dirent64 *p; DIR64 d = opendir64(".");
|
||||
p = readdir64(d); rewinddir64(d); closedir64(d);]])],
|
||||
p = readdir64(d); rewinddir64(d); closedir64(d);]])],
|
||||
[tcl_cv_DIR64=yes], [tcl_cv_DIR64=no])])
|
||||
if test "x${tcl_cv_DIR64}" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_DIR64, 1, [Is 'DIR64' in <sys/types.h>?])
|
||||
|
@ -2647,8 +2673,8 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
|
|||
dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
|
||||
dnl functions lseek64 and open64 are defined.
|
||||
if test "x${tcl_cv_type_off64_t}" = "xyes" && \
|
||||
test "x${ac_cv_func_lseek64}" = "xyes" && \
|
||||
test "x${ac_cv_func_open64}" = "xyes" ; then
|
||||
test "x${ac_cv_func_lseek64}" = "xyes" && \
|
||||
test "x${ac_cv_func_open64}" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
|
@ -2751,8 +2777,6 @@ The PACKAGE_NAME variable must be defined by your TEA configure.ac])
|
|||
AC_SUBST(PKG_LIB_FILE)
|
||||
AC_SUBST(PKG_LIB_FILE8)
|
||||
AC_SUBST(PKG_LIB_FILE9)
|
||||
# Substitute STUB_LIB_FILE in case package creates a stub library too.
|
||||
AC_SUBST(PKG_STUB_LIB_FILE)
|
||||
|
||||
# We AC_SUBST these here to ensure they are subst'ed,
|
||||
# in case the user doesn't call TEA_ADD_...
|
||||
|
@ -3110,13 +3134,15 @@ AC_DEFUN([TEA_SETUP_COMPILER], [
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "${TCL_MAJOR_VERSION}" -lt 9 -a "${TCL_MINOR_VERSION}" -lt 7; then
|
||||
AC_DEFINE(Tcl_Size, int, [Is 'Tcl_Size' in <tcl.h>?])
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Common compiler flag setup
|
||||
# ####GL Suppress "warning: AC_C_BIGENDIAN should be used with AC_CONFIG_HEADERS", taken from
|
||||
# ####GL https://git.ruby-lang.org/ruby.git/commit/?id=ca3cc677b31897e7306ac3b4565a0dd928168b08
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
AC_C_BIGENDIAN([], [], [], [AC_DEFINE(AC_APPLE_UNIVERSAL_BUILD, 1)])
|
||||
AC_C_BIGENDIAN(,,,[#])
|
||||
])
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
@ -3180,12 +3206,15 @@ print("manifest needed")
|
|||
|
||||
PACKAGE_LIB_PREFIX8="${PACKAGE_LIB_PREFIX}"
|
||||
PACKAGE_LIB_PREFIX9="${PACKAGE_LIB_PREFIX}tcl9"
|
||||
if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" == x; then
|
||||
if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" = x; then
|
||||
PACKAGE_LIB_PREFIX="${PACKAGE_LIB_PREFIX9}"
|
||||
else
|
||||
PACKAGE_LIB_PREFIX="${PACKAGE_LIB_PREFIX8}"
|
||||
AC_DEFINE(TCL_MAJOR_VERSION, 8, [Compile for Tcl8?])
|
||||
fi
|
||||
if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tk8}" != x; then
|
||||
AC_DEFINE(TK_MAJOR_VERSION, 8, [Compile for Tk8?])
|
||||
fi
|
||||
if test "${TEA_PLATFORM}" = "windows" ; then
|
||||
if test "${SHARED_BUILD}" = "1" ; then
|
||||
# We force the unresolved linking of symbols that are really in
|
||||
|
@ -3209,7 +3238,11 @@ print("manifest needed")
|
|||
eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
|
||||
fi
|
||||
# Some packages build their own stubs libraries
|
||||
eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
|
||||
if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" = x; then
|
||||
eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub.a"
|
||||
else
|
||||
eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
|
||||
fi
|
||||
if test "$GCC" = "yes"; then
|
||||
PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
|
||||
fi
|
||||
|
@ -3228,12 +3261,16 @@ print("manifest needed")
|
|||
eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
|
||||
RANLIB=:
|
||||
else
|
||||
eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
|
||||
eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
|
||||
eval eval "PKG_LIB_FILE8=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
|
||||
eval eval "PKG_LIB_FILE9=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
|
||||
eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
|
||||
fi
|
||||
# Some packages build their own stubs libraries
|
||||
eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
|
||||
if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" = x; then
|
||||
eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub.a"
|
||||
else
|
||||
eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# These are escaped so that only CFLAGS is picked up at configure time.
|
||||
|
@ -3247,6 +3284,8 @@ print("manifest needed")
|
|||
AC_SUBST(MAKE_SHARED_LIB)
|
||||
AC_SUBST(MAKE_STATIC_LIB)
|
||||
AC_SUBST(MAKE_STUB_LIB)
|
||||
# Substitute STUB_LIB_FILE in case package creates a stub library too.
|
||||
AC_SUBST(PKG_STUB_LIB_FILE)
|
||||
AC_SUBST(RANLIB_STUB)
|
||||
AC_SUBST(VC_MANIFEST_EMBED_DLL)
|
||||
AC_SUBST(VC_MANIFEST_EMBED_EXE)
|
||||
|
@ -3373,17 +3412,17 @@ AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
|
|||
# any *_NATIVE vars be defined in the Makefile
|
||||
TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
|
||||
if test "`uname -s`" = "Darwin"; then
|
||||
# If Tcl was built as a framework, attempt to use
|
||||
# the framework's Headers and PrivateHeaders directories
|
||||
case ${TCL_DEFS} in
|
||||
*TCL_FRAMEWORK*)
|
||||
# If Tcl was built as a framework, attempt to use
|
||||
# the framework's Headers and PrivateHeaders directories
|
||||
case ${TCL_DEFS} in
|
||||
*TCL_FRAMEWORK*)
|
||||
if test -d "${TCL_BIN_DIR}/Headers" -a \
|
||||
-d "${TCL_BIN_DIR}/PrivateHeaders"; then
|
||||
TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
|
||||
else
|
||||
TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
|
||||
fi
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
result="Using ${TCL_INCLUDES}"
|
||||
else
|
||||
|
@ -3824,10 +3863,10 @@ 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])
|
||||
AC_MSG_RESULT([loading])
|
||||
. "${$1_BIN_DIR}/$1Config.sh"
|
||||
else
|
||||
AC_MSG_RESULT([file not found])
|
||||
AC_MSG_RESULT([file not found])
|
||||
fi
|
||||
|
||||
#
|
||||
|
@ -3841,11 +3880,11 @@ AC_DEFUN([TEA_LOAD_CONFIG], [
|
|||
|
||||
if test -f "${$1_BIN_DIR}/Makefile" ; then
|
||||
AC_MSG_WARN([Found Makefile - using build library specs for $1])
|
||||
$1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
|
||||
$1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
|
||||
$1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
|
||||
$1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
|
||||
$1_LIBRARY_PATH=${$1_LIBRARY_PATH}
|
||||
$1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
|
||||
$1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
|
||||
$1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
|
||||
$1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
|
||||
$1_LIBRARY_PATH=${$1_LIBRARY_PATH}
|
||||
fi
|
||||
|
||||
AC_SUBST($1_VERSION)
|
||||
|
@ -3926,6 +3965,10 @@ AC_DEFUN([TEA_EXPORT_CONFIG], [
|
|||
eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`"
|
||||
eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`"
|
||||
fi
|
||||
if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" = x; then
|
||||
eval $1_STUB_LIB_FLAG="-l$1stub"
|
||||
fi
|
||||
|
||||
$1_BUILD_LIB_SPEC="-L`$CYGPATH $(pwd)` ${$1_LIB_FLAG}"
|
||||
$1_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` ${$1_LIB_FLAG}"
|
||||
$1_BUILD_STUB_LIB_SPEC="-L`$CYGPATH $(pwd)` [$]{$1_STUB_LIB_FLAG}"
|
||||
|
@ -4015,52 +4058,52 @@ AC_DEFUN([TEA_ZIPFS_SUPPORT], [
|
|||
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
|
||||
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])
|
||||
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'`
|
||||
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
|
||||
for j in `ls -r $dir/zip 2> /dev/null` \
|
||||
`ls -r $dir/zip 2> /dev/null` ; do
|
||||
if test x"$ac_cv_path_zip" = x ; then
|
||||
if test -f "$j" ; then
|
||||
ac_cv_path_zip=$j
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
])
|
||||
if test -f "$ac_cv_path_zip" ; then
|
||||
ZIP_PROG="$ac_cv_path_zip"
|
||||
AC_MSG_RESULT([$ZIP_PROG])
|
||||
ZIP_PROG_OPTIONS="-rq"
|
||||
ZIP_PROG_VFSSEARCH="*"
|
||||
AC_MSG_RESULT([Found INFO Zip in environment])
|
||||
# Use standard arguments for zip
|
||||
ZIP_PROG="$ac_cv_path_zip"
|
||||
AC_MSG_RESULT([$ZIP_PROG])
|
||||
ZIP_PROG_OPTIONS="-rq"
|
||||
ZIP_PROG_VFSSEARCH="*"
|
||||
AC_MSG_RESULT([Found INFO Zip in environment])
|
||||
# Use standard arguments for zip
|
||||
else
|
||||
# It is not an error if an installed version of Zip can't be located.
|
||||
# We can use the locally distributed minizip instead
|
||||
ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}"
|
||||
ZIP_PROG_OPTIONS="-o -r"
|
||||
ZIP_PROG_VFSSEARCH="*"
|
||||
ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}"
|
||||
AC_MSG_RESULT([No zip found on PATH. Building minizip])
|
||||
# It is not an error if an installed version of Zip can't be located.
|
||||
# We can use the locally distributed minizip instead
|
||||
ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}"
|
||||
ZIP_PROG_OPTIONS="-o -r"
|
||||
ZIP_PROG_VFSSEARCH="*"
|
||||
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)
|
||||
|
|
1
backend_tcl/win/gitmanifest.in
Normal file
1
backend_tcl/win/gitmanifest.in
Normal file
|
@ -0,0 +1 @@
|
|||
git-
|
124
backend_tcl/win/makefile.vc
Normal file
124
backend_tcl/win/makefile.vc
Normal file
|
@ -0,0 +1,124 @@
|
|||
#------------------------------------------------------------- -*- makefile -*-
|
||||
#
|
||||
# makefile to build zint tcl extension
|
||||
#
|
||||
# Basic build and install
|
||||
# nmake /f makefile.vc INSTALLDIR=c:\path\to\tcl
|
||||
# nmake /f makefile.vc INSTALLDIR=c:\path\to\tcl install
|
||||
#
|
||||
# The options TCLDIR= and TKDIR= may be added, if the TCL/Tk installation
|
||||
# (or source) is not automatically located.
|
||||
#
|
||||
# For other build options (debug, static etc.),
|
||||
# See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for
|
||||
# detailed documentation.
|
||||
#
|
||||
# See the file "license.terms" for information on usage and redistribution
|
||||
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# The name of the package
|
||||
PROJECT = zint
|
||||
PROJECT_REQUIRES_TK = 1
|
||||
|
||||
# Generic source is in root build folder (1 up)
|
||||
GENERICDIR = ..
|
||||
# Access the generic backend files
|
||||
BACKEND_DIR = $(ROOT)\..\backend
|
||||
|
||||
!include "rules-ext.vc"
|
||||
|
||||
# Define the object files and resource file that make up the extension.
|
||||
# Note the resource file does not makes sense if doing a static library build
|
||||
# hence it is under that condition. TMP_DIR is the output directory
|
||||
# defined by rules for object files.
|
||||
PRJ_OBJS = \
|
||||
$(TMP_DIR)\zint.obj \
|
||||
$(TMP_DIR)\2of5.obj \
|
||||
$(TMP_DIR)\auspost.obj \
|
||||
$(TMP_DIR)\aztec.obj \
|
||||
$(TMP_DIR)\bc412.obj \
|
||||
$(TMP_DIR)\bmp.obj \
|
||||
$(TMP_DIR)\codablock.obj \
|
||||
$(TMP_DIR)\code128.obj \
|
||||
$(TMP_DIR)\code16k.obj \
|
||||
$(TMP_DIR)\code1.obj \
|
||||
$(TMP_DIR)\code49.obj \
|
||||
$(TMP_DIR)\code.obj \
|
||||
$(TMP_DIR)\common.obj \
|
||||
$(TMP_DIR)\composite.obj \
|
||||
$(TMP_DIR)\dllversion.obj \
|
||||
$(TMP_DIR)\dmatrix.obj \
|
||||
$(TMP_DIR)\dotcode.obj \
|
||||
$(TMP_DIR)\eci.obj \
|
||||
$(TMP_DIR)\emf.obj \
|
||||
$(TMP_DIR)\filemem.obj \
|
||||
$(TMP_DIR)\general_field.obj \
|
||||
$(TMP_DIR)\gif.obj \
|
||||
$(TMP_DIR)\gridmtx.obj \
|
||||
$(TMP_DIR)\gs1.obj \
|
||||
$(TMP_DIR)\hanxin.obj \
|
||||
$(TMP_DIR)\imail.obj \
|
||||
$(TMP_DIR)\large.obj \
|
||||
$(TMP_DIR)\library.obj \
|
||||
$(TMP_DIR)\mailmark.obj \
|
||||
$(TMP_DIR)\maxicode.obj \
|
||||
$(TMP_DIR)\medical.obj \
|
||||
$(TMP_DIR)\output.obj \
|
||||
$(TMP_DIR)\pcx.obj \
|
||||
$(TMP_DIR)\pdf417.obj \
|
||||
$(TMP_DIR)\plessey.obj \
|
||||
$(TMP_DIR)\png.obj \
|
||||
$(TMP_DIR)\postal.obj \
|
||||
$(TMP_DIR)\ps.obj \
|
||||
$(TMP_DIR)\qr.obj \
|
||||
$(TMP_DIR)\raster.obj \
|
||||
$(TMP_DIR)\reedsol.obj \
|
||||
$(TMP_DIR)\rss.obj \
|
||||
$(TMP_DIR)\svg.obj \
|
||||
$(TMP_DIR)\telepen.obj \
|
||||
$(TMP_DIR)\tif.obj \
|
||||
$(TMP_DIR)\ultra.obj \
|
||||
$(TMP_DIR)\upcean.obj \
|
||||
$(TMP_DIR)\vector.obj
|
||||
|
||||
# Define any additional compiler flags that might be required for the project
|
||||
PRJ_DEFINES = -D_CRT_SECURE_NO_DEPRECATE
|
||||
PRJ_DEFINES = $(PRJ_DEFINES) -DZINT_NO_PNG=1
|
||||
# PRJ_DEFINES = $(PRJ_DEFINES) -DZINT_VERSION=PACKAGE_VERSION
|
||||
PRJ_DEFINES = $(PRJ_DEFINES) -I$(TMP_DIR)
|
||||
PRJ_DEFINES = $(PRJ_DEFINES) -I$(BACKEND_DIR)
|
||||
|
||||
|
||||
|
||||
|
||||
# Define the standard targets
|
||||
!include "$(_RULESDIR)\targets.vc"
|
||||
|
||||
# We must define a pkgindex target that will create a pkgIndex.tcl
|
||||
# file in the $(OUT_DIR) directory. We can just redirect to the
|
||||
# default-pkgindex target for our sample extension.
|
||||
pkgindex: default-pkgindex
|
||||
|
||||
$(ROOT)\manifest.uuid:
|
||||
copy $(WIN_DIR)\gitmanifest.in $(ROOT)\manifest.uuid
|
||||
git rev-parse HEAD >>$(ROOT)\manifest.uuid
|
||||
|
||||
$(TMP_DIR)\zintUuid.h: $(ROOT)\manifest.uuid
|
||||
copy $(WIN_DIR)\zintUuid.h.in+$(ROOT)\manifest.uuid $(TMP_DIR)\zintUuid.h
|
||||
|
||||
|
||||
# The default install target only installs binaries and scripts so add
|
||||
# an additional target for our documentation. Note this *adds* a target
|
||||
# since no commands are listed after it. The original targets for
|
||||
# install (from targets.vc) will remain.
|
||||
# install: default-install-docs-n
|
||||
|
||||
# Explicit dependency rules
|
||||
$(GENERICDIR)\zint.c : $(TMP_DIR)\zintUuid.h
|
||||
|
||||
{$(BACKEND_DIR)}.c{$(TMP_DIR)}.obj::
|
||||
$(cc32) $(pkgcflags) -Fo$(TMP_DIR)\ @<<
|
||||
$<
|
||||
<<
|
820
backend_tcl/win/nmakehlp.c
Normal file
820
backend_tcl/win/nmakehlp.c
Normal file
|
@ -0,0 +1,820 @@
|
|||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* nmakehlp.c --
|
||||
*
|
||||
* This is used to fix limitations within nmake and the environment.
|
||||
*
|
||||
* Copyright (c) 2002 David Gravereaux.
|
||||
* Copyright (c) 2006 Pat Thoyts
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#include <windows.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment (lib, "user32.lib")
|
||||
#pragma comment (lib, "kernel32.lib")
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* This library is required for x64 builds with _some_ versions of MSVC
|
||||
*/
|
||||
#if defined(_M_IA64) || defined(_M_AMD64)
|
||||
#if _MSC_VER >= 1400 && _MSC_VER < 1500
|
||||
#pragma comment(lib, "bufferoverflowU")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ISO hack for dumb VC++ */
|
||||
#if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
|
||||
/* protos */
|
||||
|
||||
static int CheckForCompilerFeature(const char *option);
|
||||
static int CheckForLinkerFeature(char **options, int count);
|
||||
static int IsIn(const char *string, const char *substring);
|
||||
static int SubstituteFile(const char *substs, const char *filename);
|
||||
static int QualifyPath(const char *path);
|
||||
static int LocateDependency(const char *keyfile);
|
||||
static const char *GetVersionFromFile(const char *filename, const char *match, int numdots);
|
||||
static DWORD WINAPI ReadFromPipe(LPVOID args);
|
||||
|
||||
/* globals */
|
||||
|
||||
#define CHUNK 25
|
||||
#define STATICBUFFERSIZE 1000
|
||||
typedef struct {
|
||||
HANDLE pipe;
|
||||
char buffer[STATICBUFFERSIZE];
|
||||
} pipeinfo;
|
||||
|
||||
pipeinfo Out = {INVALID_HANDLE_VALUE, ""};
|
||||
pipeinfo Err = {INVALID_HANDLE_VALUE, ""};
|
||||
|
||||
/*
|
||||
* exitcodes: 0 == no, 1 == yes, 2 == error
|
||||
*/
|
||||
|
||||
int
|
||||
main(
|
||||
int argc,
|
||||
char *argv[])
|
||||
{
|
||||
char msg[300];
|
||||
DWORD dwWritten;
|
||||
int chars;
|
||||
const char *s;
|
||||
|
||||
/*
|
||||
* Make sure children (cl.exe and link.exe) are kept quiet.
|
||||
*/
|
||||
|
||||
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
|
||||
|
||||
/*
|
||||
* Make sure the compiler and linker aren't effected by the outside world.
|
||||
*/
|
||||
|
||||
SetEnvironmentVariable("CL", "");
|
||||
SetEnvironmentVariable("LINK", "");
|
||||
|
||||
if (argc > 1 && *argv[1] == '-') {
|
||||
switch (*(argv[1]+1)) {
|
||||
case 'c':
|
||||
if (argc != 3) {
|
||||
chars = snprintf(msg, sizeof(msg) - 1,
|
||||
"usage: %s -c <compiler option>\n"
|
||||
"Tests for whether cl.exe supports an option\n"
|
||||
"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
|
||||
&dwWritten, NULL);
|
||||
return 2;
|
||||
}
|
||||
return CheckForCompilerFeature(argv[2]);
|
||||
case 'l':
|
||||
if (argc < 3) {
|
||||
chars = snprintf(msg, sizeof(msg) - 1,
|
||||
"usage: %s -l <linker option> ?<mandatory option> ...?\n"
|
||||
"Tests for whether link.exe supports an option\n"
|
||||
"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
|
||||
&dwWritten, NULL);
|
||||
return 2;
|
||||
}
|
||||
return CheckForLinkerFeature(&argv[2], argc-2);
|
||||
case 'f':
|
||||
if (argc == 2) {
|
||||
chars = snprintf(msg, sizeof(msg) - 1,
|
||||
"usage: %s -f <string> <substring>\n"
|
||||
"Find a substring within another\n"
|
||||
"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
|
||||
&dwWritten, NULL);
|
||||
return 2;
|
||||
} else if (argc == 3) {
|
||||
/*
|
||||
* If the string is blank, there is no match.
|
||||
*/
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
return IsIn(argv[2], argv[3]);
|
||||
}
|
||||
case 's':
|
||||
if (argc == 2) {
|
||||
chars = snprintf(msg, sizeof(msg) - 1,
|
||||
"usage: %s -s <substitutions file> <file>\n"
|
||||
"Perform a set of string map type substutitions on a file\n"
|
||||
"exitcodes: 0\n",
|
||||
argv[0]);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
|
||||
&dwWritten, NULL);
|
||||
return 2;
|
||||
}
|
||||
return SubstituteFile(argv[2], argv[3]);
|
||||
case 'V':
|
||||
if (argc != 4) {
|
||||
chars = snprintf(msg, sizeof(msg) - 1,
|
||||
"usage: %s -V filename matchstring\n"
|
||||
"Extract a version from a file:\n"
|
||||
"eg: pkgIndex.tcl \"package ifneeded http\"",
|
||||
argv[0]);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
|
||||
&dwWritten, NULL);
|
||||
return 0;
|
||||
}
|
||||
s = GetVersionFromFile(argv[2], argv[3], *(argv[1]+2) - '0');
|
||||
if (s && *s) {
|
||||
printf("%s\n", s);
|
||||
return 0;
|
||||
} else
|
||||
return 1; /* Version not found. Return non-0 exit code */
|
||||
|
||||
case 'Q':
|
||||
if (argc != 3) {
|
||||
chars = snprintf(msg, sizeof(msg) - 1,
|
||||
"usage: %s -Q path\n"
|
||||
"Emit the fully qualified path\n"
|
||||
"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
|
||||
&dwWritten, NULL);
|
||||
return 2;
|
||||
}
|
||||
return QualifyPath(argv[2]);
|
||||
|
||||
case 'L':
|
||||
if (argc != 3) {
|
||||
chars = snprintf(msg, sizeof(msg) - 1,
|
||||
"usage: %s -L keypath\n"
|
||||
"Emit the fully qualified path of directory containing keypath\n"
|
||||
"exitcodes: 0 == success, 1 == not found, 2 == error\n", argv[0]);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
|
||||
&dwWritten, NULL);
|
||||
return 2;
|
||||
}
|
||||
return LocateDependency(argv[2]);
|
||||
}
|
||||
}
|
||||
chars = snprintf(msg, sizeof(msg) - 1,
|
||||
"usage: %s -c|-f|-l|-Q|-s|-V ...\n"
|
||||
"This is a little helper app to equalize shell differences between WinNT and\n"
|
||||
"Win9x and get nmake.exe to accomplish its job.\n",
|
||||
argv[0]);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int
|
||||
CheckForCompilerFeature(
|
||||
const char *option)
|
||||
{
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
SECURITY_ATTRIBUTES sa;
|
||||
DWORD threadID;
|
||||
char msg[300];
|
||||
BOOL ok;
|
||||
HANDLE hProcess, h, pipeThreads[2];
|
||||
char cmdline[100];
|
||||
|
||||
hProcess = GetCurrentProcess();
|
||||
|
||||
memset(&pi, 0, sizeof(PROCESS_INFORMATION));
|
||||
memset(&si, 0, sizeof(STARTUPINFO));
|
||||
si.cb = sizeof(STARTUPINFO);
|
||||
si.dwFlags = STARTF_USESTDHANDLES;
|
||||
si.hStdInput = INVALID_HANDLE_VALUE;
|
||||
|
||||
memset(&sa, 0, sizeof(SECURITY_ATTRIBUTES));
|
||||
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
|
||||
sa.lpSecurityDescriptor = NULL;
|
||||
sa.bInheritHandle = FALSE;
|
||||
|
||||
/*
|
||||
* Create a non-inheritable pipe.
|
||||
*/
|
||||
|
||||
CreatePipe(&Out.pipe, &h, &sa, 0);
|
||||
|
||||
/*
|
||||
* Dupe the write side, make it inheritable, and close the original.
|
||||
*/
|
||||
|
||||
DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput, 0, TRUE,
|
||||
DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
|
||||
|
||||
/*
|
||||
* Same as above, but for the error side.
|
||||
*/
|
||||
|
||||
CreatePipe(&Err.pipe, &h, &sa, 0);
|
||||
DuplicateHandle(hProcess, h, hProcess, &si.hStdError, 0, TRUE,
|
||||
DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
|
||||
|
||||
/*
|
||||
* Base command line.
|
||||
*/
|
||||
|
||||
lstrcpy(cmdline, "cl.exe -nologo -c -TC -Zs -X -Fp.\\_junk.pch ");
|
||||
|
||||
/*
|
||||
* Append our option for testing
|
||||
*/
|
||||
|
||||
lstrcat(cmdline, option);
|
||||
|
||||
/*
|
||||
* Filename to compile, which exists, but is nothing and empty.
|
||||
*/
|
||||
|
||||
lstrcat(cmdline, " .\\nul");
|
||||
|
||||
ok = CreateProcess(
|
||||
NULL, /* Module name. */
|
||||
cmdline, /* Command line. */
|
||||
NULL, /* Process handle not inheritable. */
|
||||
NULL, /* Thread handle not inheritable. */
|
||||
TRUE, /* yes, inherit handles. */
|
||||
DETACHED_PROCESS, /* No console for you. */
|
||||
NULL, /* Use parent's environment block. */
|
||||
NULL, /* Use parent's starting directory. */
|
||||
&si, /* Pointer to STARTUPINFO structure. */
|
||||
&pi); /* Pointer to PROCESS_INFORMATION structure. */
|
||||
|
||||
if (!ok) {
|
||||
DWORD err = GetLastError();
|
||||
int chars = snprintf(msg, sizeof(msg) - 1,
|
||||
"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
|
||||
|
||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
|
||||
FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPSTR)&msg[chars],
|
||||
(300-chars), 0);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
|
||||
return 2;
|
||||
}
|
||||
|
||||
/*
|
||||
* Close our references to the write handles that have now been inherited.
|
||||
*/
|
||||
|
||||
CloseHandle(si.hStdOutput);
|
||||
CloseHandle(si.hStdError);
|
||||
|
||||
WaitForInputIdle(pi.hProcess, 5000);
|
||||
CloseHandle(pi.hThread);
|
||||
|
||||
/*
|
||||
* Start the pipe reader threads.
|
||||
*/
|
||||
|
||||
pipeThreads[0] = CreateThread(NULL, 0, ReadFromPipe, &Out, 0, &threadID);
|
||||
pipeThreads[1] = CreateThread(NULL, 0, ReadFromPipe, &Err, 0, &threadID);
|
||||
|
||||
/*
|
||||
* Block waiting for the process to end.
|
||||
*/
|
||||
|
||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
||||
CloseHandle(pi.hProcess);
|
||||
|
||||
/*
|
||||
* Wait for our pipe to get done reading, should it be a little slow.
|
||||
*/
|
||||
|
||||
WaitForMultipleObjects(2, pipeThreads, TRUE, 500);
|
||||
CloseHandle(pipeThreads[0]);
|
||||
CloseHandle(pipeThreads[1]);
|
||||
|
||||
/*
|
||||
* Look for the commandline warning code in both streams.
|
||||
* - in MSVC 6 & 7 we get D4002, in MSVC 8 we get D9002.
|
||||
*/
|
||||
|
||||
return !(strstr(Out.buffer, "D4002") != NULL
|
||||
|| strstr(Err.buffer, "D4002") != NULL
|
||||
|| strstr(Out.buffer, "D9002") != NULL
|
||||
|| strstr(Err.buffer, "D9002") != NULL
|
||||
|| strstr(Out.buffer, "D2021") != NULL
|
||||
|| strstr(Err.buffer, "D2021") != NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
CheckForLinkerFeature(
|
||||
char **options,
|
||||
int count)
|
||||
{
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
SECURITY_ATTRIBUTES sa;
|
||||
DWORD threadID;
|
||||
char msg[300];
|
||||
BOOL ok;
|
||||
HANDLE hProcess, h, pipeThreads[2];
|
||||
int i;
|
||||
char cmdline[255];
|
||||
|
||||
hProcess = GetCurrentProcess();
|
||||
|
||||
memset(&pi, 0, sizeof(PROCESS_INFORMATION));
|
||||
memset(&si, 0, sizeof(STARTUPINFO));
|
||||
si.cb = sizeof(STARTUPINFO);
|
||||
si.dwFlags = STARTF_USESTDHANDLES;
|
||||
si.hStdInput = INVALID_HANDLE_VALUE;
|
||||
|
||||
memset(&sa, 0, sizeof(SECURITY_ATTRIBUTES));
|
||||
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
|
||||
sa.lpSecurityDescriptor = NULL;
|
||||
sa.bInheritHandle = TRUE;
|
||||
|
||||
/*
|
||||
* Create a non-inheritible pipe.
|
||||
*/
|
||||
|
||||
CreatePipe(&Out.pipe, &h, &sa, 0);
|
||||
|
||||
/*
|
||||
* Dupe the write side, make it inheritable, and close the original.
|
||||
*/
|
||||
|
||||
DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput, 0, TRUE,
|
||||
DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
|
||||
|
||||
/*
|
||||
* Same as above, but for the error side.
|
||||
*/
|
||||
|
||||
CreatePipe(&Err.pipe, &h, &sa, 0);
|
||||
DuplicateHandle(hProcess, h, hProcess, &si.hStdError, 0, TRUE,
|
||||
DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
|
||||
|
||||
/*
|
||||
* Base command line.
|
||||
*/
|
||||
|
||||
lstrcpy(cmdline, "link.exe -nologo ");
|
||||
|
||||
/*
|
||||
* Append our option for testing.
|
||||
*/
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
lstrcat(cmdline, " \"");
|
||||
lstrcat(cmdline, options[i]);
|
||||
lstrcat(cmdline, "\"");
|
||||
}
|
||||
|
||||
ok = CreateProcess(
|
||||
NULL, /* Module name. */
|
||||
cmdline, /* Command line. */
|
||||
NULL, /* Process handle not inheritable. */
|
||||
NULL, /* Thread handle not inheritable. */
|
||||
TRUE, /* yes, inherit handles. */
|
||||
DETACHED_PROCESS, /* No console for you. */
|
||||
NULL, /* Use parent's environment block. */
|
||||
NULL, /* Use parent's starting directory. */
|
||||
&si, /* Pointer to STARTUPINFO structure. */
|
||||
&pi); /* Pointer to PROCESS_INFORMATION structure. */
|
||||
|
||||
if (!ok) {
|
||||
DWORD err = GetLastError();
|
||||
int chars = snprintf(msg, sizeof(msg) - 1,
|
||||
"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
|
||||
|
||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
|
||||
FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPSTR)&msg[chars],
|
||||
(300-chars), 0);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
|
||||
return 2;
|
||||
}
|
||||
|
||||
/*
|
||||
* Close our references to the write handles that have now been inherited.
|
||||
*/
|
||||
|
||||
CloseHandle(si.hStdOutput);
|
||||
CloseHandle(si.hStdError);
|
||||
|
||||
WaitForInputIdle(pi.hProcess, 5000);
|
||||
CloseHandle(pi.hThread);
|
||||
|
||||
/*
|
||||
* Start the pipe reader threads.
|
||||
*/
|
||||
|
||||
pipeThreads[0] = CreateThread(NULL, 0, ReadFromPipe, &Out, 0, &threadID);
|
||||
pipeThreads[1] = CreateThread(NULL, 0, ReadFromPipe, &Err, 0, &threadID);
|
||||
|
||||
/*
|
||||
* Block waiting for the process to end.
|
||||
*/
|
||||
|
||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
||||
CloseHandle(pi.hProcess);
|
||||
|
||||
/*
|
||||
* Wait for our pipe to get done reading, should it be a little slow.
|
||||
*/
|
||||
|
||||
WaitForMultipleObjects(2, pipeThreads, TRUE, 500);
|
||||
CloseHandle(pipeThreads[0]);
|
||||
CloseHandle(pipeThreads[1]);
|
||||
|
||||
/*
|
||||
* Look for the commandline warning code in the stderr stream.
|
||||
*/
|
||||
|
||||
return !(strstr(Out.buffer, "LNK1117") != NULL ||
|
||||
strstr(Err.buffer, "LNK1117") != NULL ||
|
||||
strstr(Out.buffer, "LNK4044") != NULL ||
|
||||
strstr(Err.buffer, "LNK4044") != NULL ||
|
||||
strstr(Out.buffer, "LNK4224") != NULL ||
|
||||
strstr(Err.buffer, "LNK4224") != NULL);
|
||||
}
|
||||
|
||||
static DWORD WINAPI
|
||||
ReadFromPipe(
|
||||
LPVOID args)
|
||||
{
|
||||
pipeinfo *pi = (pipeinfo *) args;
|
||||
char *lastBuf = pi->buffer;
|
||||
DWORD dwRead;
|
||||
BOOL ok;
|
||||
|
||||
again:
|
||||
if (lastBuf - pi->buffer + CHUNK > STATICBUFFERSIZE) {
|
||||
CloseHandle(pi->pipe);
|
||||
return (DWORD)-1;
|
||||
}
|
||||
ok = ReadFile(pi->pipe, lastBuf, CHUNK, &dwRead, 0L);
|
||||
if (!ok || dwRead == 0) {
|
||||
CloseHandle(pi->pipe);
|
||||
return 0;
|
||||
}
|
||||
lastBuf += dwRead;
|
||||
goto again;
|
||||
|
||||
return 0; /* makes the compiler happy */
|
||||
}
|
||||
|
||||
static int
|
||||
IsIn(
|
||||
const char *string,
|
||||
const char *substring)
|
||||
{
|
||||
return (strstr(string, substring) != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* GetVersionFromFile --
|
||||
* Looks for a match string in a file and then returns the version
|
||||
* following the match where a version is anything acceptable to
|
||||
* package provide or package ifneeded.
|
||||
*/
|
||||
|
||||
static const char *
|
||||
GetVersionFromFile(
|
||||
const char *filename,
|
||||
const char *match,
|
||||
int numdots)
|
||||
{
|
||||
static char szBuffer[100];
|
||||
char *szResult = NULL;
|
||||
FILE *fp = fopen(filename, "rt");
|
||||
|
||||
if (fp != NULL) {
|
||||
/*
|
||||
* Read data until we see our match string.
|
||||
*/
|
||||
|
||||
while (fgets(szBuffer, sizeof(szBuffer), fp) != NULL) {
|
||||
LPSTR p, q;
|
||||
|
||||
p = strstr(szBuffer, match);
|
||||
if (p != NULL) {
|
||||
/*
|
||||
* Skip to first digit after the match.
|
||||
*/
|
||||
|
||||
p += strlen(match);
|
||||
while (*p && !isdigit((unsigned char)*p)) {
|
||||
++p;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find ending whitespace.
|
||||
*/
|
||||
|
||||
q = p;
|
||||
while (*q && (strchr("0123456789.ab", *q)) && (((!strchr(".ab", *q)
|
||||
&& !strchr("ab", q[-1])) || --numdots))) {
|
||||
++q;
|
||||
}
|
||||
|
||||
*q = 0;
|
||||
szResult = p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
return szResult;
|
||||
}
|
||||
|
||||
/*
|
||||
* List helpers for the SubstituteFile function
|
||||
*/
|
||||
|
||||
typedef struct list_item_t {
|
||||
struct list_item_t *nextPtr;
|
||||
char * key;
|
||||
char * value;
|
||||
} list_item_t;
|
||||
|
||||
/* insert a list item into the list (list may be null) */
|
||||
static list_item_t *
|
||||
list_insert(list_item_t **listPtrPtr, const char *key, const char *value)
|
||||
{
|
||||
list_item_t *itemPtr = (list_item_t *)malloc(sizeof(list_item_t));
|
||||
if (itemPtr) {
|
||||
itemPtr->key = strdup(key);
|
||||
itemPtr->value = strdup(value);
|
||||
itemPtr->nextPtr = NULL;
|
||||
|
||||
while(*listPtrPtr) {
|
||||
listPtrPtr = &(*listPtrPtr)->nextPtr;
|
||||
}
|
||||
*listPtrPtr = itemPtr;
|
||||
}
|
||||
return itemPtr;
|
||||
}
|
||||
|
||||
static void
|
||||
list_free(list_item_t **listPtrPtr)
|
||||
{
|
||||
list_item_t *tmpPtr, *listPtr = *listPtrPtr;
|
||||
while (listPtr) {
|
||||
tmpPtr = listPtr;
|
||||
listPtr = listPtr->nextPtr;
|
||||
free(tmpPtr->key);
|
||||
free(tmpPtr->value);
|
||||
free(tmpPtr);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* SubstituteFile --
|
||||
* As windows doesn't provide anything useful like sed and it's unreliable
|
||||
* to use the tclsh you are building against (consider x-platform builds -
|
||||
* e.g. compiling AMD64 target from IX86) we provide a simple substitution
|
||||
* option here to handle autoconf style substitutions.
|
||||
* The substitution file is whitespace and line delimited. The file should
|
||||
* consist of lines matching the regular expression:
|
||||
* \s*\S+\s+\S*$
|
||||
*
|
||||
* Usage is something like:
|
||||
* nmakehlp -S << $** > $@
|
||||
* @PACKAGE_NAME@ $(PACKAGE_NAME)
|
||||
* @PACKAGE_VERSION@ $(PACKAGE_VERSION)
|
||||
* <<
|
||||
*/
|
||||
|
||||
static int
|
||||
SubstituteFile(
|
||||
const char *substitutions,
|
||||
const char *filename)
|
||||
{
|
||||
static char szBuffer[1024], szCopy[1024];
|
||||
list_item_t *substPtr = NULL;
|
||||
FILE *fp, *sp;
|
||||
|
||||
fp = fopen(filename, "rt");
|
||||
if (fp != NULL) {
|
||||
|
||||
/*
|
||||
* Build a list of substitutions from the first filename
|
||||
*/
|
||||
|
||||
sp = fopen(substitutions, "rt");
|
||||
if (sp != NULL) {
|
||||
while (fgets(szBuffer, sizeof(szBuffer), sp) != NULL) {
|
||||
unsigned char *ks, *ke, *vs, *ve;
|
||||
ks = (unsigned char*)szBuffer;
|
||||
while (ks && *ks && isspace(*ks)) ++ks;
|
||||
ke = ks;
|
||||
while (ke && *ke && !isspace(*ke)) ++ke;
|
||||
vs = ke;
|
||||
while (vs && *vs && isspace(*vs)) ++vs;
|
||||
ve = vs;
|
||||
while (ve && *ve && !(*ve == '\r' || *ve == '\n')) ++ve;
|
||||
*ke = 0, *ve = 0;
|
||||
list_insert(&substPtr, (char*)ks, (char*)vs);
|
||||
}
|
||||
fclose(sp);
|
||||
}
|
||||
|
||||
/* debug: dump the list */
|
||||
#ifndef NDEBUG
|
||||
{
|
||||
int n = 0;
|
||||
list_item_t *p = NULL;
|
||||
for (p = substPtr; p != NULL; p = p->nextPtr, ++n) {
|
||||
fprintf(stderr, "% 3d '%s' => '%s'\n", n, p->key, p->value);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Run the substitutions over each line of the input
|
||||
*/
|
||||
|
||||
while (fgets(szBuffer, sizeof(szBuffer), fp) != NULL) {
|
||||
list_item_t *p = NULL;
|
||||
for (p = substPtr; p != NULL; p = p->nextPtr) {
|
||||
char *m = strstr(szBuffer, p->key);
|
||||
if (m) {
|
||||
char *cp, *op, *sp;
|
||||
cp = szCopy;
|
||||
op = szBuffer;
|
||||
while (op != m) *cp++ = *op++;
|
||||
sp = p->value;
|
||||
while (sp && *sp) *cp++ = *sp++;
|
||||
op += strlen(p->key);
|
||||
while (*op) *cp++ = *op++;
|
||||
*cp = 0;
|
||||
memcpy(szBuffer, szCopy, sizeof(szCopy));
|
||||
}
|
||||
}
|
||||
printf("%s", szBuffer);
|
||||
}
|
||||
|
||||
list_free(&substPtr);
|
||||
}
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL FileExists(LPCTSTR szPath)
|
||||
{
|
||||
#ifndef INVALID_FILE_ATTRIBUTES
|
||||
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
|
||||
#endif
|
||||
DWORD pathAttr = GetFileAttributes(szPath);
|
||||
return (pathAttr != INVALID_FILE_ATTRIBUTES &&
|
||||
!(pathAttr & FILE_ATTRIBUTE_DIRECTORY));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* QualifyPath --
|
||||
*
|
||||
* This composes the current working directory with a provided path
|
||||
* and returns the fully qualified and normalized path.
|
||||
* Mostly needed to setup paths for testing.
|
||||
*/
|
||||
|
||||
static int
|
||||
QualifyPath(
|
||||
const char *szPath)
|
||||
{
|
||||
char szCwd[MAX_PATH + 1];
|
||||
|
||||
GetFullPathName(szPath, sizeof(szCwd)-1, szCwd, NULL);
|
||||
printf("%s\n", szCwd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Implements LocateDependency for a single directory. See that command
|
||||
* for an explanation.
|
||||
* Returns 0 if found after printing the directory.
|
||||
* Returns 1 if not found but no errors.
|
||||
* Returns 2 on any kind of error
|
||||
* Basically, these are used as exit codes for the process.
|
||||
*/
|
||||
static int LocateDependencyHelper(const char *dir, const char *keypath)
|
||||
{
|
||||
HANDLE hSearch;
|
||||
char path[MAX_PATH+1];
|
||||
size_t dirlen;
|
||||
int keylen, ret;
|
||||
WIN32_FIND_DATA finfo;
|
||||
|
||||
if (dir == NULL || keypath == NULL) {
|
||||
return 2; /* Have no real error reporting mechanism into nmake */
|
||||
}
|
||||
dirlen = strlen(dir);
|
||||
if (dirlen > sizeof(path) - 3) {
|
||||
return 2;
|
||||
}
|
||||
strncpy(path, dir, dirlen);
|
||||
strncpy(path+dirlen, "\\*", 3); /* Including terminating \0 */
|
||||
keylen = strlen(keypath);
|
||||
|
||||
#if 0 /* This function is not available in Visual C++ 6 */
|
||||
/*
|
||||
* Use numerics 0 -> FindExInfoStandard,
|
||||
* 1 -> FindExSearchLimitToDirectories,
|
||||
* as these are not defined in Visual C++ 6
|
||||
*/
|
||||
hSearch = FindFirstFileEx(path, 0, &finfo, 1, NULL, 0);
|
||||
#else
|
||||
hSearch = FindFirstFile(path, &finfo);
|
||||
#endif
|
||||
if (hSearch == INVALID_HANDLE_VALUE) {
|
||||
return 1; /* Not found */
|
||||
}
|
||||
|
||||
/* Loop through all subdirs checking if the keypath is under there */
|
||||
ret = 1; /* Assume not found */
|
||||
do {
|
||||
int sublen;
|
||||
/*
|
||||
* We need to check it is a directory despite the
|
||||
* FindExSearchLimitToDirectories in the above call. See SDK docs
|
||||
*/
|
||||
if ((finfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
|
||||
continue;
|
||||
}
|
||||
sublen = strlen(finfo.cFileName);
|
||||
if ((dirlen+1+sublen+1+keylen+1) > sizeof(path)) {
|
||||
continue; /* Path does not fit, assume not matched */
|
||||
}
|
||||
strncpy(path+dirlen+1, finfo.cFileName, sublen);
|
||||
path[dirlen+1+sublen] = '\\';
|
||||
strncpy(path+dirlen+1+sublen+1, keypath, keylen+1);
|
||||
if (FileExists(path)) {
|
||||
/* Found a match, print to stdout */
|
||||
path[dirlen+1+sublen] = '\0';
|
||||
QualifyPath(path);
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
} while (FindNextFile(hSearch, &finfo));
|
||||
FindClose(hSearch);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* LocateDependency --
|
||||
*
|
||||
* Locates a dependency for a package.
|
||||
* keypath - a relative path within the package directory
|
||||
* that is used to confirm it is the correct directory.
|
||||
* The search path for the package directory is currently only
|
||||
* the parent and grandparent of the current working directory.
|
||||
* If found, the command prints
|
||||
* name_DIRPATH=<full path of located directory>
|
||||
* and returns 0. If not found, does not print anything and returns 1.
|
||||
*/
|
||||
static int LocateDependency(const char *keypath)
|
||||
{
|
||||
size_t i;
|
||||
int ret;
|
||||
static const char *paths[] = {"..", "..\\..", "..\\..\\.."};
|
||||
|
||||
for (i = 0; i < (sizeof(paths)/sizeof(paths[0])); ++i) {
|
||||
ret = LocateDependencyHelper(paths[i], keypath);
|
||||
if (ret == 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* mode: c
|
||||
* c-basic-offset: 4
|
||||
* fill-column: 78
|
||||
* indent-tabs-mode: t
|
||||
* tab-width: 8
|
||||
* End:
|
||||
*/
|
123
backend_tcl/win/rules-ext.vc
Normal file
123
backend_tcl/win/rules-ext.vc
Normal file
|
@ -0,0 +1,123 @@
|
|||
# This file should only be included in makefiles for Tcl extensions,
|
||||
# NOT in the makefile for Tcl itself.
|
||||
|
||||
!ifndef _RULES_EXT_VC
|
||||
|
||||
# We need to run from the directory the parent makefile is located in.
|
||||
# nmake does not tell us what makefile was used to invoke it so parent
|
||||
# makefile has to set the MAKEFILEVC macro or we just make a guess and
|
||||
# warn if we think that is not the case.
|
||||
!if "$(MAKEFILEVC)" == ""
|
||||
|
||||
!if exist("$(PROJECT).vc")
|
||||
MAKEFILEVC = $(PROJECT).vc
|
||||
!elseif exist("makefile.vc")
|
||||
MAKEFILEVC = makefile.vc
|
||||
!endif
|
||||
!endif # "$(MAKEFILEVC)" == ""
|
||||
|
||||
!if !exist("$(MAKEFILEVC)")
|
||||
MSG = ^
|
||||
You must run nmake from the directory containing the project makefile.^
|
||||
If you are doing that and getting this message, set the MAKEFILEVC^
|
||||
macro to the name of the project makefile.
|
||||
!message WARNING: $(MSG)
|
||||
!endif
|
||||
|
||||
!if "$(PROJECT)" == "tcl"
|
||||
!error The rules-ext.vc file is not intended for Tcl itself.
|
||||
!endif
|
||||
|
||||
# We extract version numbers using the nmakehlp program. For now use
|
||||
# the local copy of nmakehlp. Once we locate Tcl, we will use that
|
||||
# one if it is newer.
|
||||
!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
|
||||
!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
|
||||
!endif
|
||||
!else
|
||||
!if [copy x86_64-w64-mingw32-nmakehlp.exe nmakehlp.exe >NUL]
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# First locate the Tcl directory that we are working with.
|
||||
!if "$(TCLDIR)" != ""
|
||||
|
||||
_RULESDIR = $(TCLDIR:/=\)
|
||||
|
||||
!else
|
||||
|
||||
# If an installation path is specified, that is also the Tcl directory.
|
||||
# Also Tk never builds against an installed Tcl, it needs Tcl sources
|
||||
!if defined(INSTALLDIR) && "$(PROJECT)" != "tk"
|
||||
_RULESDIR=$(INSTALLDIR:/=\)
|
||||
!else
|
||||
# Locate Tcl sources
|
||||
!if [echo _RULESDIR = \> nmakehlp.out] \
|
||||
|| [nmakehlp -L generic\tcl.h >> nmakehlp.out]
|
||||
_RULESDIR = ..\..\tcl
|
||||
!else
|
||||
!include nmakehlp.out
|
||||
!endif
|
||||
|
||||
!endif # defined(INSTALLDIR)....
|
||||
|
||||
!endif # ifndef TCLDIR
|
||||
|
||||
# Now look for the targets.vc file under the Tcl root. Note we check this
|
||||
# file and not rules.vc because the latter also exists on older systems.
|
||||
!if exist("$(_RULESDIR)\lib\nmake\targets.vc") # Building against installed Tcl
|
||||
_RULESDIR = $(_RULESDIR)\lib\nmake
|
||||
!elseif exist("$(_RULESDIR)\win\targets.vc") # Building against Tcl sources
|
||||
_RULESDIR = $(_RULESDIR)\win
|
||||
!else
|
||||
# If we have not located Tcl's targets file, most likely we are compiling
|
||||
# against an older version of Tcl and so must use our own support files.
|
||||
_RULESDIR = .
|
||||
!endif
|
||||
|
||||
!if "$(_RULESDIR)" != "."
|
||||
# Potentially using Tcl's support files. If this extension has its own
|
||||
# nmake support files, need to compare the versions and pick newer.
|
||||
|
||||
!if exist("rules.vc") # The extension has its own copy
|
||||
|
||||
!if [echo TCL_RULES_MAJOR = \> versions.vc] \
|
||||
&& [nmakehlp -V "$(_RULESDIR)\rules.vc" RULES_VERSION_MAJOR >> versions.vc]
|
||||
!endif
|
||||
!if [echo TCL_RULES_MINOR = \>> versions.vc] \
|
||||
&& [nmakehlp -V "$(_RULESDIR)\rules.vc" RULES_VERSION_MINOR >> versions.vc]
|
||||
!endif
|
||||
|
||||
!if [echo OUR_RULES_MAJOR = \>> versions.vc] \
|
||||
&& [nmakehlp -V "rules.vc" RULES_VERSION_MAJOR >> versions.vc]
|
||||
!endif
|
||||
!if [echo OUR_RULES_MINOR = \>> versions.vc] \
|
||||
&& [nmakehlp -V "rules.vc" RULES_VERSION_MINOR >> versions.vc]
|
||||
!endif
|
||||
!include versions.vc
|
||||
# We have a newer version of the support files, use them
|
||||
!if ($(TCL_RULES_MAJOR) != $(OUR_RULES_MAJOR)) || ($(TCL_RULES_MINOR) < $(OUR_RULES_MINOR))
|
||||
_RULESDIR = .
|
||||
!endif
|
||||
|
||||
!endif # if exist("rules.vc")
|
||||
|
||||
!endif # if $(_RULESDIR) != "."
|
||||
|
||||
# Let rules.vc know what copy of nmakehlp.c to use.
|
||||
NMAKEHLPC = $(_RULESDIR)\nmakehlp.c
|
||||
|
||||
# Get rid of our internal defines before calling rules.vc
|
||||
!undef TCL_RULES_MAJOR
|
||||
!undef TCL_RULES_MINOR
|
||||
!undef OUR_RULES_MAJOR
|
||||
!undef OUR_RULES_MINOR
|
||||
|
||||
!if exist("$(_RULESDIR)\rules.vc")
|
||||
!message *** Using $(_RULESDIR)\rules.vc
|
||||
!include "$(_RULESDIR)\rules.vc"
|
||||
!else
|
||||
!error *** Could not locate rules.vc in $(_RULESDIR)
|
||||
!endif
|
||||
|
||||
!endif # _RULES_EXT_VC
|
1920
backend_tcl/win/rules.vc
Normal file
1920
backend_tcl/win/rules.vc
Normal file
File diff suppressed because it is too large
Load diff
98
backend_tcl/win/targets.vc
Normal file
98
backend_tcl/win/targets.vc
Normal file
|
@ -0,0 +1,98 @@
|
|||
#------------------------------------------------------------- -*- makefile -*-
|
||||
# targets.vc --
|
||||
#
|
||||
# Part of the nmake based build system for Tcl and its extensions.
|
||||
# This file defines some standard targets for the convenience of extensions
|
||||
# and can be optionally included by the extension makefile.
|
||||
# See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for docs.
|
||||
|
||||
$(PROJECT): setup pkgindex $(PRJLIB)
|
||||
|
||||
!ifdef PRJ_STUBOBJS
|
||||
$(PROJECT): $(PRJSTUBLIB)
|
||||
$(PRJSTUBLIB): $(PRJ_STUBOBJS)
|
||||
$(LIBCMD) $**
|
||||
|
||||
$(PRJ_STUBOBJS):
|
||||
$(CCSTUBSCMD) %s
|
||||
!endif # PRJ_STUBOBJS
|
||||
|
||||
!ifdef PRJ_MANIFEST
|
||||
$(PROJECT): $(PRJLIB).manifest
|
||||
$(PRJLIB).manifest: $(PRJ_MANIFEST)
|
||||
@nmakehlp -s << $** >$@
|
||||
@MACHINE@ $(MACHINE:IX86=X86)
|
||||
<<
|
||||
!endif
|
||||
|
||||
!if "$(PROJECT)" != "tcl" && "$(PROJECT)" != "tk"
|
||||
$(PRJLIB): $(PRJ_OBJS) $(RESFILE)
|
||||
!if $(STATIC_BUILD)
|
||||
$(LIBCMD) $**
|
||||
!else
|
||||
$(DLLCMD) $**
|
||||
$(_VC_MANIFEST_EMBED_DLL)
|
||||
!endif
|
||||
-@del $*.exp
|
||||
!endif
|
||||
|
||||
!if "$(PRJ_HEADERS)" != "" && "$(PRJ_OBJS)" != ""
|
||||
$(PRJ_OBJS): $(PRJ_HEADERS)
|
||||
!endif
|
||||
|
||||
# If parent makefile has defined stub objects, add their installation
|
||||
# to the default install
|
||||
!if "$(PRJ_STUBOBJS)" != ""
|
||||
default-install: default-install-stubs
|
||||
!endif
|
||||
|
||||
# Unlike the other default targets, these cannot be in rules.vc because
|
||||
# the executed command depends on existence of macro PRJ_HEADERS_PUBLIC
|
||||
# that the parent makefile will not define until after including rules-ext.vc
|
||||
!if "$(PRJ_HEADERS_PUBLIC)" != ""
|
||||
default-install: default-install-headers
|
||||
default-install-headers:
|
||||
@echo Installing headers to '$(INCLUDE_INSTALL_DIR)'
|
||||
@for %f in ($(PRJ_HEADERS_PUBLIC)) do @$(COPY) %f "$(INCLUDE_INSTALL_DIR)"
|
||||
!endif
|
||||
|
||||
!if "$(DISABLE_STANDARD_TARGETS)" == ""
|
||||
DISABLE_STANDARD_TARGETS = 0
|
||||
!endif
|
||||
|
||||
!if "$(DISABLE_TARGET_setup)" == ""
|
||||
DISABLE_TARGET_setup = 0
|
||||
!endif
|
||||
!if "$(DISABLE_TARGET_install)" == ""
|
||||
DISABLE_TARGET_install = 0
|
||||
!endif
|
||||
!if "$(DISABLE_TARGET_clean)" == ""
|
||||
DISABLE_TARGET_clean = 0
|
||||
!endif
|
||||
!if "$(DISABLE_TARGET_test)" == ""
|
||||
DISABLE_TARGET_test = 0
|
||||
!endif
|
||||
!if "$(DISABLE_TARGET_shell)" == ""
|
||||
DISABLE_TARGET_shell = 0
|
||||
!endif
|
||||
|
||||
!if !$(DISABLE_STANDARD_TARGETS)
|
||||
!if !$(DISABLE_TARGET_setup)
|
||||
setup: default-setup
|
||||
!endif
|
||||
!if !$(DISABLE_TARGET_install)
|
||||
install: default-install
|
||||
!endif
|
||||
!if !$(DISABLE_TARGET_clean)
|
||||
clean: default-clean
|
||||
realclean: hose
|
||||
hose: default-hose
|
||||
distclean: realclean default-distclean
|
||||
!endif
|
||||
!if !$(DISABLE_TARGET_test)
|
||||
test: default-test
|
||||
!endif
|
||||
!if !$(DISABLE_TARGET_shell)
|
||||
shell: default-shell
|
||||
!endif
|
||||
!endif # DISABLE_STANDARD_TARGETS
|
1
backend_tcl/win/zintUuid.h.in
Normal file
1
backend_tcl/win/zintUuid.h.in
Normal file
|
@ -0,0 +1 @@
|
|||
#define SAMPLE_VERSION_UUID \
|
|
@ -172,6 +172,10 @@
|
|||
- Added -guardwhitespace option
|
||||
2023-10-30 GL
|
||||
- Added -dmiso144 option
|
||||
2024-12-09 HaO
|
||||
- TCL 9 compatibility
|
||||
- support TCL buildinfo
|
||||
- remove the zint command on dll unload
|
||||
*/
|
||||
|
||||
#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
|
||||
|
@ -230,13 +234,13 @@ typedef int Tcl_Size;
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* >>>> External Prototypes (exports) */
|
||||
EXPORT int Zint_Init (Tcl_Interp *interp);
|
||||
EXPORT int Zint_Unload (Tcl_Interp *Interp, int Flags);
|
||||
DLLEXPORT int Zint_Init (Tcl_Interp *interp);
|
||||
DLLEXPORT int Zint_Unload (Tcl_Interp *Interp, int Flags);
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* >>>> local prototypes */
|
||||
static void InterpCleanupProc(ClientData clientData, Tcl_Interp *interp);
|
||||
static int CheckForTk(Tcl_Interp *interp, int *tkFlagPtr);
|
||||
static int Zint(ClientData unused, Tcl_Interp *interp, int objc,
|
||||
static int ZintCmd(ClientData unused, Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *CONST objv[]);
|
||||
static int Encode(Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *CONST objv[]);
|
||||
|
@ -593,19 +597,74 @@ EXPORT BOOL WINAPI DllEntryPoint (HINSTANCE hInstance,
|
|||
#endif
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Initialisation Procedures */
|
||||
EXPORT int Zint_Init (Tcl_Interp *interp)
|
||||
DLLEXPORT int Zint_Init (Tcl_Interp *interp)
|
||||
{
|
||||
int * tkFlagPtr;
|
||||
Tcl_CmdInfo info;
|
||||
/*------------------------------------------------------------------------*/
|
||||
#ifdef USE_TCL_STUBS
|
||||
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL)
|
||||
#else
|
||||
if (Tcl_PkgRequire(interp, "Tcl", "8.5-", 0) == NULL)
|
||||
#endif
|
||||
{
|
||||
/* If TCL_STUB is not defined, the following only does a version check */
|
||||
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* Add build info */
|
||||
if (Tcl_GetCommandInfo(interp, "::tcl::build-info", &info)) {
|
||||
Tcl_CreateObjCommand(interp, "::zint::build-info",
|
||||
info.objProc, (void *)(
|
||||
PACKAGE_VERSION "+" STRINGIFY(SAMPLE_VERSION_UUID)
|
||||
#if defined(__clang__) && defined(__clang_major__)
|
||||
".clang-" STRINGIFY(__clang_major__)
|
||||
#if __clang_minor__ < 10
|
||||
"0"
|
||||
#endif
|
||||
STRINGIFY(__clang_minor__)
|
||||
#endif
|
||||
#if defined(__cplusplus) && !defined(__OBJC__)
|
||||
".cplusplus"
|
||||
#endif
|
||||
#ifndef NDEBUG
|
||||
".debug"
|
||||
#endif
|
||||
#if !defined(__clang__) && !defined(__INTEL_COMPILER) && defined(__GNUC__)
|
||||
".gcc-" STRINGIFY(__GNUC__)
|
||||
#if __GNUC_MINOR__ < 10
|
||||
"0"
|
||||
#endif
|
||||
STRINGIFY(__GNUC_MINOR__)
|
||||
#endif
|
||||
#ifdef __INTEL_COMPILER
|
||||
".icc-" STRINGIFY(__INTEL_COMPILER)
|
||||
#endif
|
||||
#ifdef TCL_MEM_DEBUG
|
||||
".memdebug"
|
||||
#endif
|
||||
#if defined(_MSC_VER)
|
||||
".msvc-" STRINGIFY(_MSC_VER)
|
||||
#endif
|
||||
#ifdef USE_NMAKE
|
||||
".nmake"
|
||||
#endif
|
||||
#ifndef TCL_CFG_OPTIMIZED
|
||||
".no-optimize"
|
||||
#endif
|
||||
#ifdef __OBJC__
|
||||
".objective-c"
|
||||
#if defined(__cplusplus)
|
||||
"plusplus"
|
||||
#endif
|
||||
#endif
|
||||
#ifdef TCL_CFG_PROFILED
|
||||
".profile"
|
||||
#endif
|
||||
#ifdef PURIFY
|
||||
".purify"
|
||||
#endif
|
||||
#ifdef STATIC_BUILD
|
||||
".static"
|
||||
#endif
|
||||
), NULL);
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* This procedure is called once per thread and any thread local data */
|
||||
/* should be allocated and initialized here (and not in static variables) */
|
||||
|
||||
|
@ -614,7 +673,7 @@ EXPORT int Zint_Init (Tcl_Interp *interp)
|
|||
*tkFlagPtr = 0;
|
||||
Tcl_CallWhenDeleted(interp, InterpCleanupProc, (ClientData)tkFlagPtr);
|
||||
/*------------------------------------------------------------------------*/
|
||||
Tcl_CreateObjCommand(interp, "zint", Zint, (ClientData)tkFlagPtr,
|
||||
Tcl_CreateObjCommand(interp, "zint", ZintCmd, (ClientData)tkFlagPtr,
|
||||
(Tcl_CmdDeleteProc *)NULL);
|
||||
Tcl_PkgProvide (interp, "zint", version_string);
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
@ -631,8 +690,11 @@ static void InterpCleanupProc(ClientData clientData, Tcl_Interp *interp)
|
|||
/*----------------------------------------------------------------------------*/
|
||||
/* >>>> Unload Procedures */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
EXPORT int Zint_Unload (Tcl_Interp *Interp, int Flags)
|
||||
DLLEXPORT int Zint_Unload (Tcl_Interp *Interp, int Flags)
|
||||
{
|
||||
/* Remove created commands */
|
||||
Tcl_DeleteCommand(Interp, "::zint::build-info");
|
||||
Tcl_DeleteCommand(Interp, "zint");
|
||||
// Allow unload
|
||||
return TCL_OK;
|
||||
}
|
||||
|
@ -640,7 +702,7 @@ EXPORT int Zint_Unload (Tcl_Interp *Interp, int Flags)
|
|||
/* >>>>> Called routine */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Decode tcl commands */
|
||||
static int Zint(ClientData tkFlagPtr, Tcl_Interp *interp, int objc,
|
||||
static int ZintCmd(ClientData tkFlagPtr, Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *CONST objv[])
|
||||
{
|
||||
/* Option list and indexes */
|
||||
|
@ -725,13 +787,13 @@ static int CheckForTk(Tcl_Interp *interp, int *tkFlagPtr)
|
|||
return TCL_OK;
|
||||
}
|
||||
if (*tkFlagPtr == 0) {
|
||||
if ( ! Tcl_PkgPresent(interp, "Tk", "8.5", 0) ) {
|
||||
if ( ! Tcl_PkgPresent(interp, "Tk", "8.5-", 0) ) {
|
||||
Tcl_SetResult(interp, "package Tk not loaded", TCL_STATIC);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
#ifdef USE_TK_STUBS
|
||||
if (*tkFlagPtr < 0 || Tk_InitStubs(interp, "8.5", 0) == NULL) {
|
||||
if (*tkFlagPtr < 0 || Tk_InitStubs(interp, "8.5-", 0) == NULL) {
|
||||
*tkFlagPtr = -1;
|
||||
Tcl_SetResult(interp, "error initializing Tk", TCL_STATIC);
|
||||
return TCL_ERROR;
|
||||
|
|
|
@ -1,292 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="zint_tcl" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=zint_tcl - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "zint_tcl.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "zint_tcl.mak" CFG="zint_tcl - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "zint_tcl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "zint_tcl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "zint_tcl - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\backend" /I "C:\Tcl\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /D "USE_TCL_STUBS" /D "USE_TK_STUBS" /D "ZINT_NO_PNG" /FR /YX /FD /D ZINT_VERSION="\"2.13.0.9\"" /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
||||
# ADD RSC /l 0x407 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tclstub85.lib tkstub85.lib /nologo /dll /machine:I386 /out:"zint.dll" /libpath:"C:\Tcl\lib"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "zint_tcl - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\backend" /I "C:\Tcl\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /D "USE_TCL_STUBS" /D "USE_TK_STUBS" /D "ZINT_NO_PNG" /FR /YX /FD /GZ /D ZINT_VERSION="\"2.13.0.9\"" /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x407 /d "_DEBUG"
|
||||
# ADD RSC /l 0x407 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tclstub85.lib tkstub85.lib /nologo /dll /debug /machine:I386 /out:"Debug/zint.dll" /pdbtype:sept /libpath:"C:\Tcl\lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "zint_tcl - Win32 Release"
|
||||
# Name "zint_tcl - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\2of5.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\auspost.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\aztec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\bc412.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\bmp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\codablock.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\code.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\code1.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\code128.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\code16k.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\code49.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\common.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\composite.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\dmatrix.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\dotcode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\eci.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\emf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\filemem.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\general_field.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\gif.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\gridmtx.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\gs1.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\hanxin.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\imail.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\large.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\library.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\mailmark.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\maxicode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\medical.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\output.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\pcx.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\pdf417.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\plessey.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\png.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\postal.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\ps.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\qr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\raster.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\reedsol.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\rss.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\svg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\telepen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\tif.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\ultra.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\upcean.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\vector.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zint.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
Loading…
Add table
Add a link
Reference in a new issue