summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-12-23 07:16:52 (GMT)
committernijtmans <nijtmans>2009-12-23 07:16:52 (GMT)
commit314290d6d2319c69ce0df1a8fb69b6380931e48a (patch)
treef23bc86462820c59c19446d4e30ba7dca4a5e02a /unix/tcl.m4
parent51725279aebd048e6ddfefb467cd28529b5b4be4 (diff)
downloadtk-314290d6d2319c69ce0df1a8fb69b6380931e48a.zip
tk-314290d6d2319c69ce0df1a8fb69b6380931e48a.tar.gz
tk-314290d6d2319c69ce0df1a8fb69b6380931e48a.tar.bz2
Use EXE_SUFFIX for Cygwin, and
install libtk8.6.dll in bin directory
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m497
1 files changed, 59 insertions, 38 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 6c23ace..8bb395e 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -265,7 +265,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
# Load the tclConfig.sh file
#
# Arguments:
-#
+#
# Requires the following vars to be set:
# TCL_BIN_DIR
#
@@ -351,7 +351,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
# Load the tkConfig.sh file
#
# Arguments:
-#
+#
# Requires the following vars to be set:
# TK_BIN_DIR
#
@@ -506,7 +506,7 @@ AC_DEFUN([SC_BUILD_TCLSH], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
@@ -551,7 +551,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
@@ -599,7 +599,7 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
@@ -705,13 +705,13 @@ AC_DEFUN([SC_ENABLE_THREADS], [
#
# Arguments:
# none
-#
+#
# Requires the following vars to be set in the Makefile:
# CFLAGS_DEBUG
# CFLAGS_OPTIMIZE
# LDFLAGS_DEBUG
# LDFLAGS_OPTIMIZE
-#
+#
# Results:
#
# Adds the following arguments to configure:
@@ -779,7 +779,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
@@ -809,14 +809,14 @@ AC_DEFUN([SC_ENABLE_LANGINFO], [
if test $tcl_cv_langinfo_h = yes; then
AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
fi
- else
+ else
AC_MSG_RESULT([$langinfo_ok])
fi
])
#--------------------------------------------------------------------
# SC_CONFIG_MANPAGES
-#
+#
# Decide whether to use symlinks for linking the manpages,
# whether to compress the manpages after installation, and
# whether to add a package name suffix to the installed
@@ -990,7 +990,7 @@ AC_DEFUN([SC_CONFIG_SYSTEM], [
# TCL_SHLIB_LD_EXTRAS - Additional element which are added to SHLIB_LD_LIBS
# TK_SHLIB_LD_EXTRAS for the build of Tcl and Tk, but not recorded in the
# tclConfig.sh, since they are only used for the build
-# of Tcl and Tk.
+# of Tcl and Tk.
# Examples: MacOS X records the library version and
# compatibility version in the shared library. But
# of course the Tcl version of this is only used for Tcl.
@@ -1090,6 +1090,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
# Step 3: set configuration options based on system name and version.
do64bit_ok=no
+ EXE_SUFFIX=""
LDFLAGS_ORIG="$LDFLAGS"
# When ld needs options to work in 64-bit mode, put them in
# LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
@@ -1246,6 +1247,17 @@ dnl AC_CHECK_TOOL(AR, ar)
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
+ CYGWIN_*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD='${CC} -shared'
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dll"
+ EXE_SUFFIX=".exe"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
dgux*)
SHLIB_CFLAGS="-K PIC"
SHLIB_LD='${CC} -G'
@@ -1407,7 +1419,7 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_SUFFIX=".so"
CFLAGS_OPTIMIZE="-O2"
- # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
+ # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
# when you inline the string and math operations. Turn this off to
# get rid of the warnings.
#CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
@@ -1672,8 +1684,8 @@ dnl AC_CHECK_TOOL(AR, ar)
eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
done])
LIBS="$LIBS -framework CoreFoundation"
- AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
- [CFBundleRef b = CFBundleGetMainBundle();],
+ AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
+ [CFBundleRef b = CFBundleGetMainBundle();],
tcl_cv_lib_corefoundation=yes,
tcl_cv_lib_corefoundation=no)
AS_IF([test "$fat_32_64" = yes], [
@@ -1683,7 +1695,7 @@ dnl AC_CHECK_TOOL(AR, ar)
LIBS=$hold_libs])
AS_IF([test $tcl_cv_lib_corefoundation = yes], [
LIBS="$LIBS -framework CoreFoundation"
- AC_DEFINE(HAVE_COREFOUNDATION, 1,
+ AC_DEFINE(HAVE_COREFOUNDATION, 1,
[Do we have access to Darwin CoreFoundation.framework?])
], [tcl_corefoundation=no])
AS_IF([test "$fat_32_64" = yes -a $tcl_corefoundation = yes],[
@@ -1692,8 +1704,8 @@ dnl AC_CHECK_TOOL(AR, ar)
for v in CFLAGS CPPFLAGS LDFLAGS; do
eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
done
- AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
- [CFBundleRef b = CFBundleGetMainBundle();],
+ AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
+ [CFBundleRef b = CFBundleGetMainBundle();],
tcl_cv_lib_corefoundation_64=yes,
tcl_cv_lib_corefoundation_64=no)
for v in CFLAGS CPPFLAGS LDFLAGS; do
@@ -1721,7 +1733,7 @@ dnl AC_CHECK_TOOL(AR, ar)
CFLAGS_OPTIMIZE="" # Optimizer is buggy
AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h
[Should OS/390 do the right thing with sockets?])
- ;;
+ ;;
OSF1-1.0|OSF1-1.1|OSF1-1.2)
# OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
SHLIB_CFLAGS=""
@@ -2046,6 +2058,7 @@ dnl # preprocessing tests use only CPPFLAGS.
case $system in
AIX-*) ;;
BSD/OS*) ;;
+ CYGWIN_*) ;;
IRIX*) ;;
NetBSD-*|FreeBSD-*) ;;
Darwin-*) ;;
@@ -2057,11 +2070,17 @@ dnl # preprocessing tests use only CPPFLAGS.
SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}'])
AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
UNSHARED_LIB_SUFFIX='${VERSION}.a'])
+ DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)"
AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [
LIB_SUFFIX=${SHARED_LIB_SUFFIX}
MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
+ AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)"/$(LIB_FILE)'
+ DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)"
+ ], [
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
+ ])
], [
LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
@@ -2117,12 +2136,14 @@ dnl # preprocessing tests use only CPPFLAGS.
AC_SUBST(SHLIB_LD_LIBS)
AC_SUBST(SHLIB_CFLAGS)
AC_SUBST(SHLIB_SUFFIX)
+ AC_SUBST(EXE_SUFFIX)
AC_DEFINE_UNQUOTED(TCL_SHLIB_EXT,"${SHLIB_SUFFIX}",
[What is the default extension for shared libraries?])
AC_SUBST(MAKE_LIB)
AC_SUBST(MAKE_STUB_LIB)
AC_SUBST(INSTALL_LIB)
+ AC_SUBST(DLL_INSTALL_DIR)
AC_SUBST(INSTALL_STUB_LIB)
AC_SUBST(RANLIB)
])
@@ -2138,7 +2159,7 @@ dnl # preprocessing tests use only CPPFLAGS.
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines only one of the following vars:
@@ -2257,7 +2278,7 @@ int main() {
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines some of the following vars:
@@ -2343,7 +2364,7 @@ closedir(d);
#
# Arguments:
# none
-#
+#
# Results:
#
# Sets the the following vars:
@@ -2421,13 +2442,13 @@ AC_DEFUN([SC_PATH_X], [
# SC_BLOCKING_STYLE
#
# The statements below check for systems where POSIX-style
-# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
+# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
# On these systems (mostly older ones), use the old BSD-style
# FIONBIO approach instead.
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines some of the following vars:
@@ -2471,7 +2492,7 @@ AC_DEFUN([SC_BLOCKING_STYLE], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines some of the following vars:
@@ -2542,7 +2563,7 @@ AC_DEFUN([SC_TIME_HANDLER], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Might defines some of the following vars:
@@ -2592,7 +2613,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [
#
# Arguments:
# None.
-#
+#
# Results:
#
# Might append to the following vars:
@@ -2665,7 +2686,7 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -2711,7 +2732,7 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -2733,8 +2754,8 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
# See if we should 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_TRY_COMPILE(,[switch (0) {
- case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ;
+ AC_TRY_COMPILE(,[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, [Are wide integers to be implemented with C 'long's?])
@@ -2853,7 +2874,7 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -2920,7 +2941,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -2996,7 +3017,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [
#
# Arguments:
# None
-#
+#
# Results:
# Might define the following vars:
# HAVE_GETADDRINFO
@@ -3028,7 +3049,7 @@ AC_DEFUN([SC_TCL_GETADDRINFO], [AC_CHECK_FUNC(getaddrinfo, [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -3088,7 +3109,7 @@ AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -3148,7 +3169,7 @@ AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -3208,7 +3229,7 @@ AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars: