diff options
author | nijtmans <nijtmans> | 2010-01-06 23:16:20 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-01-06 23:16:20 (GMT) |
commit | 202013b4ffd4f5ab925eeed4d3fdcaa4a40c552e (patch) | |
tree | 5c6a94fabc0b60a5ba23015151521bba53f96560 /unix/tcl.m4 | |
parent | df9501bba1307cd8d762718fdb94dcf66309c717 (diff) | |
download | tk-202013b4ffd4f5ab925eeed4d3fdcaa4a40c552e.zip tk-202013b4ffd4f5ab925eeed4d3fdcaa4a40c552e.tar.gz tk-202013b4ffd4f5ab925eeed4d3fdcaa4a40c552e.tar.bz2 |
Trivial CYGWIN fixes (backported from trunk)
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 123 |
1 files changed, 84 insertions, 39 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 5d64a76..d7ca5a2 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: @@ -742,13 +742,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: @@ -816,7 +816,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -846,14 +846,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 @@ -1027,7 +1027,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. @@ -1280,6 +1280,16 @@ 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" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' @@ -1290,6 +1300,16 @@ dnl AC_CHECK_TOOL(AR, ar) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; + Haiku*) + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-lroot" + AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"]) + ;; HP-UX-*.11.*) # Use updated header definitions where possible AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?]) @@ -1426,7 +1446,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" @@ -1559,7 +1579,7 @@ dnl AC_CHECK_TOOL(AR, ar) UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; - NetBSD-*|FreeBSD-*) + NetBSD-*|FreeBSD-[[3-4]].*) # FreeBSD 3.* and greater have ELF. # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs SHLIB_CFLAGS="-fPIC" @@ -1587,6 +1607,30 @@ dnl AC_CHECK_TOOL(AR, ar) ;; esac ;; + FreeBSD-*) + # This configuration from FreeBSD Ports. + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC} -shared" + TCL_SHLIB_LD_EXTRAS="-soname \$[@]" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) + AS_IF([test "${TCL_THREADS}" = "1"], [ + # The -pthread needs to go in the LDFLAGS, not LIBS + LIBS=`echo $LIBS | sed s/-pthread//` + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LDFLAGS="$LDFLAGS $PTHREAD_LIBS"]) + # Version numbers are dot-stripped by system policy. + TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' + TCL_LIB_VERSIONS_OK=nodots + ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" @@ -1691,8 +1735,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], [ @@ -1702,7 +1746,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],[ @@ -1711,8 +1755,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 @@ -1740,7 +1784,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="" @@ -2065,6 +2109,7 @@ dnl # preprocessing tests use only CPPFLAGS. case $system in AIX-*) ;; BSD/OS*) ;; + CYGWIN_*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*) ;; Darwin-*) ;; @@ -2157,7 +2202,7 @@ dnl # preprocessing tests use only CPPFLAGS. # # Arguments: # none -# +# # Results: # # Defines only one of the following vars: @@ -2276,7 +2321,7 @@ int main() { # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2362,7 +2407,7 @@ closedir(d); # # Arguments: # none -# +# # Results: # # Sets the the following vars: @@ -2440,13 +2485,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: @@ -2490,7 +2535,7 @@ AC_DEFUN([SC_BLOCKING_STYLE], [ # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2561,7 +2606,7 @@ AC_DEFUN([SC_TIME_HANDLER], [ # # Arguments: # none -# +# # Results: # # Might defines some of the following vars: @@ -2611,7 +2656,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [ # # Arguments: # None. -# +# # Results: # # Might append to the following vars: @@ -2684,7 +2729,7 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2730,7 +2775,7 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2752,8 +2797,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?]) @@ -2872,7 +2917,7 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2939,7 +2984,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3011,11 +3056,11 @@ AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [ #-------------------------------------------------------------------- # SC_TCL_GETADDRINFO # -# Check if we have 'getaddrinfo' for hostname lookup and inet6/ipv6 +# Check if we have 'getaddrinfo' # # Arguments: # None -# +# # Results: # Might define the following vars: # HAVE_GETADDRINFO @@ -3047,7 +3092,7 @@ AC_DEFUN([SC_TCL_GETADDRINFO], [AC_CHECK_FUNC(getaddrinfo, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3107,7 +3152,7 @@ AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3167,7 +3212,7 @@ AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3227,7 +3272,7 @@ AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: |