summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-06 15:47:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-06 15:47:17 (GMT)
commit774a6e14bbec230d6a4e08e529a4f72c0405ad5e (patch)
tree5dba26443e8ad285bda9fb438eb5c90963b00715 /unix
parentdd327eebecfff30c0d601f700f98ee3a3f0edd73 (diff)
downloadtk-774a6e14bbec230d6a4e08e529a4f72c0405ad5e.zip
tk-774a6e14bbec230d6a4e08e529a4f72c0405ad5e.tar.gz
tk-774a6e14bbec230d6a4e08e529a4f72c0405ad5e.tar.bz2
Make pkgIndex.tcl files work on all platforms
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in20
-rwxr-xr-xunix/configure14
-rw-r--r--unix/configure.ac12
3 files changed, 41 insertions, 5 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index bc6a485..14aa6a4 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -247,6 +247,8 @@ TK_STUB_LIB_FLAG = @TK_STUB_LIB_FLAG@
#TK_STUB_LIB_FLAG = -ltkstub
TK_LIB_FILE = @TK_LIB_FILE@
+TK_LIB_FILE_TCL8 = @TK_LIB_FILE_TCL8@
+TK_LIB_FILE_TCL9 = @TK_LIB_FILE_TCL9@
#TK_LIB_FILE = libtk.a
# Generic lib name used in rules that apply to tcl and tk
@@ -797,13 +799,25 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE}
echo "if {![package vsatisfies [package provide Tcl] 8.6-]} return";\
relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\
if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \
- echo "package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE)]]]";\
+ echo "if {[package vsatisfies [package provide Tcl] 9.0]} {";\
+ echo " package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE_TCL9)]]]";\
+ echo "} else {";\
+ echo " package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE_TCL8)]]]";\
+ echo "}";\
else \
echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\
echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\
- echo " package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)]]]";\
+ echo " if {[package vsatisfies [package provide Tcl] 9.0]} {";\
+ echo " package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin $(TK_LIB_FILE_TCL9)]]]";\
+ echo " } else {";\
+ echo " package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin $(TK_LIB_FILE_TCL8)]]]";\
+ echo " }";\
echo "} else {";\
- echo " package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tcl9tk${MAJOR_VERSION}${MINOR_VERSION}.dll]]]";\
+ echo " if {[package vsatisfies [package provide Tcl] 9.0]} {";\
+ echo " package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tcl9tk${MAJOR_VERSION}${MINOR_VERSION}.dll]]]";\
+ echo " } else {";\
+ echo " package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll]]]";\
+ echo " }";\
echo "}";\
fi; \
echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list package require -exact tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL)]"\
diff --git a/unix/configure b/unix/configure
index 208483b..579bd0d 100755
--- a/unix/configure
+++ b/unix/configure
@@ -681,6 +681,8 @@ TK_STUB_LIB_FLAG
TK_STUB_LIB_FILE
TK_LIB_SPEC
TK_LIB_FLAG
+TK_LIB_FILE_TCL9
+TK_LIB_FILE_TCL8
TK_LIB_FILE
TK_YEAR
TK_PATCH_LEVEL
@@ -8559,11 +8561,13 @@ fi
eval eval "TK_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}"
eval eval "TK_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}"
+eval "TK_LIB_FILE_TCL8=libtk${LIB_SUFFIX}"
if test ${TCL_MAJOR_VERSION} = 8 ; then
eval "TK_LIB_FILE=libtk${LIB_SUFFIX}"
else
eval "TK_LIB_FILE=libtcl9tk${LIB_SUFFIX}"
fi
+eval "TK_LIB_FILE_TCL9=libtcl9tk${LIB_SUFFIX}"
# tkConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
# since on some platforms TK_LIB_FILE contains shell escapes.
@@ -8657,7 +8661,13 @@ printf "%s\n" "#define TK_FRAMEWORK 1" >>confdefs.h
# override libdir default
libdir="/Library/Frameworks"
fi
- TK_LIB_FILE="Tk"
+ if test ${TCL_MAJOR_VERSION} = 8 ; then
+ TK_LIB_FILE="Tk"
+ else
+ TK_LIB_FILE="Tk"
+ fi
+ TK_LIB_FILE_TCL8="Tk"
+ TK_LIB_FILE_TCL9="Tk"
TK_LIB_FLAG="-framework Tk"
TK_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk"
TK_LIB_SPEC="-F${libdir} -framework Tk"
@@ -9007,6 +9017,8 @@ TK_SHARED_BUILD=${SHARED_BUILD}
+
+
ac_config_files="$ac_config_files Makefile:../unix/Makefile.in tkConfig.sh:../unix/tkConfig.sh.in tk.pc:../unix/tk.pc.in"
cat >confcache <<\_ACEOF
diff --git a/unix/configure.ac b/unix/configure.ac
index b728ce1..b6f602b 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -551,11 +551,13 @@ AC_C_CHAR_UNSIGNED
eval eval "TK_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}"
eval eval "TK_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}"
+eval "TK_LIB_FILE_TCL8=libtk${LIB_SUFFIX}"
if test ${TCL_MAJOR_VERSION} = 8 ; then
eval "TK_LIB_FILE=libtk${LIB_SUFFIX}"
else
eval "TK_LIB_FILE=libtcl9tk${LIB_SUFFIX}"
fi
+eval "TK_LIB_FILE_TCL9=libtcl9tk${LIB_SUFFIX}"
# tkConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
# since on some platforms TK_LIB_FILE contains shell escapes.
@@ -613,7 +615,13 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
# override libdir default
libdir="/Library/Frameworks"
fi
- TK_LIB_FILE="Tk"
+ if test ${TCL_MAJOR_VERSION} = 8 ; then
+ TK_LIB_FILE="Tk"
+ else
+ TK_LIB_FILE="Tk"
+ fi
+ TK_LIB_FILE_TCL8="Tk"
+ TK_LIB_FILE_TCL9="Tk"
TK_LIB_FLAG="-framework Tk"
TK_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk"
TK_LIB_SPEC="-F${libdir} -framework Tk"
@@ -761,6 +769,8 @@ AC_SUBST(TK_PATCH_LEVEL)
AC_SUBST(TK_YEAR)
AC_SUBST(TK_LIB_FILE)
+AC_SUBST(TK_LIB_FILE_TCL8)
+AC_SUBST(TK_LIB_FILE_TCL9)
AC_SUBST(TK_LIB_FLAG)
AC_SUBST(TK_LIB_SPEC)
AC_SUBST(TK_STUB_LIB_FILE)