summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-03-28 12:01:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-03-28 12:01:37 (GMT)
commit5e6a22713afacc4d0c67e3530137d9be104fd12d (patch)
tree06a5dc9220c3320b89616c738c4cb6efb4616520 /win
parentf44caa9971f1cb7930e73e6710d87dfd3559e5cd (diff)
downloadtcl-5e6a22713afacc4d0c67e3530137d9be104fd12d.zip
tcl-5e6a22713afacc4d0c67e3530137d9be104fd12d.tar.gz
tcl-5e6a22713afacc4d0c67e3530137d9be104fd12d.tar.bz2
extra checks whether we are really dealing with cygwin or not
Diffstat (limited to 'win')
-rwxr-xr-xwin/configure122
-rw-r--r--win/tcl.m4112
2 files changed, 114 insertions, 120 deletions
diff --git a/win/configure b/win/configure
index 66ae532..bc5f6bb 100755
--- a/win/configure
+++ b/win/configure
@@ -1655,7 +1655,7 @@ EOF
fi
fi
- if test "${GCC}" = "yes" ; then
+ if test "${GCC}" = "yes" ; then
echo $ac_n "checking for SEH support in compiler""... $ac_c" 1>&6
echo "configure:1661: checking for SEH support in compiler" >&5
if eval "test \"`echo '$''{'tcl_cv_seh'+set}'`\" = set"; then
@@ -1668,20 +1668,20 @@ else
#line 1669 "configure"
#include "confdefs.h"
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #undef WIN32_LEAN_AND_MEAN
-
- int main(int argc, char** argv) {
- int a, b = 0;
- __try {
- a = 666 / b;
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# undef WIN32_LEAN_AND_MEAN
+
+ int main(int argc, char** argv) {
+ int a, b = 0;
+ __try {
+ a = 666 / b;
+ }
+ __except (EXCEPTION_EXECUTE_HANDLER) {
+ return 0;
+ }
+ return 1;
}
- __except (EXCEPTION_EXECUTE_HANDLER) {
- return 0;
- }
- return 1;
- }
EOF
if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1722,14 +1722,14 @@ else
#line 1723 "configure"
#include "confdefs.h"
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #undef WIN32_LEAN_AND_MEAN
-
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# undef WIN32_LEAN_AND_MEAN
+
int main() {
- EXCEPTION_DISPOSITION x;
-
+ EXCEPTION_DISPOSITION x;
+
; return 0; }
EOF
if { (eval echo configure:1736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
@@ -1747,40 +1747,39 @@ fi
echo "$ac_t""$tcl_cv_eh_disposition" 1>&6
if test "$tcl_cv_eh_disposition" = "no" ; then
- cat >> confdefs.h <<\EOF
+ cat >> confdefs.h <<\EOF
#define EXCEPTION_DISPOSITION int
EOF
fi
-
-
+
# Check to see if winnt.h defines CHAR, SHORT, and LONG
# even if VOID has already been #defined. The win32api
# used by mingw and cygwin is known to do this.
-
+
echo $ac_n "checking for winnt.h that ignores VOID define""... $ac_c" 1>&6
-echo "configure:1763: checking for winnt.h that ignores VOID define" >&5
+echo "configure:1762: checking for winnt.h that ignores VOID define" >&5
if eval "test \"`echo '$''{'tcl_cv_winnt_ignore_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1768 "configure"
+#line 1767 "configure"
#include "confdefs.h"
- #define VOID void
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #undef WIN32_LEAN_AND_MEAN
-
+# define VOID void
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# undef WIN32_LEAN_AND_MEAN
+
int main() {
- CHAR c;
- SHORT s;
- LONG l;
-
+ CHAR c;
+ SHORT s;
+ LONG l;
+
; return 0; }
EOF
-if { (eval echo configure:1784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_winnt_ignore_void=yes
else
@@ -1804,24 +1803,24 @@ EOF
# See if the compiler supports casting to a union type.
# This is used to stop gcc from printing a compiler
# warning when initializing a union member.
-
+
echo $ac_n "checking for cast to union support""... $ac_c" 1>&6
-echo "configure:1810: checking for cast to union support" >&5
+echo "configure:1809: checking for cast to union support" >&5
if eval "test \"`echo '$''{'tcl_cv_cast_to_union'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1815 "configure"
+#line 1814 "configure"
#include "confdefs.h"
int main() {
- union foo { int i; double d; };
- union foo f = (union foo) (int) 0;
-
+ union foo { int i; double d; };
+ union foo f = (union foo) (int) 0;
+
; return 0; }
EOF
-if { (eval echo configure:1825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_cast_to_union=yes
else
@@ -1841,8 +1840,7 @@ echo "$ac_t""$tcl_cv_cast_to_union" 1>&6
EOF
fi
- fi
-
+ fi
# DL_LIBS is empty, but then we match the Unix version
@@ -1860,12 +1858,12 @@ if test "${GCC}" = "yes" ; then
# typedefs like LPFN_ACCEPT and friends.
#
echo $ac_n "checking for LPFN_ACCEPT support in winsock2.h""... $ac_c" 1>&6
-echo "configure:1864: checking for LPFN_ACCEPT support in winsock2.h" >&5
+echo "configure:1862: checking for LPFN_ACCEPT support in winsock2.h" >&5
if eval "test \"`echo '$''{'tcl_cv_lpfn_decls'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1869 "configure"
+#line 1867 "configure"
#include "confdefs.h"
#define WIN32_LEAN_AND_MEAN
@@ -1879,7 +1877,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_lpfn_decls=yes
else
@@ -1911,12 +1909,12 @@ fi
# call it from inline asm code.
echo $ac_n "checking for alloca declaration in malloc.h""... $ac_c" 1>&6
-echo "configure:1915: checking for alloca declaration in malloc.h" >&5
+echo "configure:1913: checking for alloca declaration in malloc.h" >&5
if eval "test \"`echo '$''{'tcl_cv_malloc_decl_alloca'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
+#line 1918 "configure"
#include "confdefs.h"
#include <malloc.h>
@@ -1930,7 +1928,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_malloc_decl_alloca=yes
else
@@ -1961,7 +1959,7 @@ fi
echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:1965: checking for build with symbols" >&5
+echo "configure:1963: checking for build with symbols" >&5
# Check whether --enable-symbols or --disable-symbols was given.
if test "${enable_symbols+set}" = set; then
enableval="$enable_symbols"
@@ -2021,7 +2019,7 @@ TCL_DBGX=${DBGX}
#--------------------------------------------------------------------
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2025: checking how to run the C preprocessor" >&5
+echo "configure:2023: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2036,13 +2034,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2040 "configure"
+#line 2038 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2053,13 +2051,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2057 "configure"
+#line 2055 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2070,13 +2068,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2074 "configure"
+#line 2072 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2102,17 +2100,17 @@ echo "$ac_t""$CPP" 1>&6
ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2106: checking for errno.h" >&5
+echo "configure:2104: checking for errno.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2111 "configure"
+#line 2109 "configure"
#include "confdefs.h"
#include <errno.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
diff --git a/win/tcl.m4 b/win/tcl.m4
index 3c9b2c2..b909a35 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -795,32 +795,32 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
fi
fi
- if test "${GCC}" = "yes" ; then
+ if test "${GCC}" = "yes" ; then
AC_CACHE_CHECK(for SEH support in compiler,
tcl_cv_seh,
AC_TRY_RUN([
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #undef WIN32_LEAN_AND_MEAN
-
- int main(int argc, char** argv) {
- int a, b = 0;
- __try {
- a = 666 / b;
- }
- __except (EXCEPTION_EXECUTE_HANDLER) {
- return 0;
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# undef WIN32_LEAN_AND_MEAN
+
+ int main(int argc, char** argv) {
+ int a, b = 0;
+ __try {
+ a = 666 / b;
+ }
+ __except (EXCEPTION_EXECUTE_HANDLER) {
+ return 0;
+ }
+ return 1;
}
- return 1;
- }
],
- tcl_cv_seh=yes,
- tcl_cv_seh=no,
- tcl_cv_seh=no)
+ tcl_cv_seh=yes,
+ tcl_cv_seh=no,
+ tcl_cv_seh=no)
)
if test "$tcl_cv_seh" = "no" ; then
AC_DEFINE(HAVE_NO_SEH, 1,
- [Defined when mingw does not support SEH])
+ [Defined when mingw does not support SEH])
fi
#
@@ -831,68 +831,64 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
#
AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
tcl_cv_eh_disposition,
- AC_TRY_COMPILE([
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #undef WIN32_LEAN_AND_MEAN
- ],
- [
- EXCEPTION_DISPOSITION x;
- ],
- tcl_cv_eh_disposition=yes,
- tcl_cv_eh_disposition=no)
+ AC_TRY_COMPILE([
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# undef WIN32_LEAN_AND_MEAN
+ ],[
+ EXCEPTION_DISPOSITION x;
+ ],
+ tcl_cv_eh_disposition=yes,
+ tcl_cv_eh_disposition=no)
)
if test "$tcl_cv_eh_disposition" = "no" ; then
- AC_DEFINE(EXCEPTION_DISPOSITION, int,
- [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
+ AC_DEFINE(EXCEPTION_DISPOSITION, int,
+ [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
fi
-
-
+
# Check to see if winnt.h defines CHAR, SHORT, and LONG
# even if VOID has already been #defined. The win32api
# used by mingw and cygwin is known to do this.
-
+
AC_CACHE_CHECK(for winnt.h that ignores VOID define,
tcl_cv_winnt_ignore_void,
- AC_TRY_COMPILE([
- #define VOID void
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #undef WIN32_LEAN_AND_MEAN
- ],
- [
- CHAR c;
- SHORT s;
- LONG l;
- ],
- tcl_cv_winnt_ignore_void=yes,
- tcl_cv_winnt_ignore_void=no)
+ AC_TRY_COMPILE([
+# define VOID void
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# undef WIN32_LEAN_AND_MEAN
+ ], [
+ CHAR c;
+ SHORT s;
+ LONG l;
+ ],
+ 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,
- [Defined when cygwin/mingw ignores VOID define in winnt.h])
+ [Defined when cygwin/mingw ignores VOID define in winnt.h])
fi
# See if the compiler supports casting to a union type.
# This is used to stop gcc from printing a compiler
# warning when initializing a union member.
-
+
AC_CACHE_CHECK(for cast to union support,
tcl_cv_cast_to_union,
- AC_TRY_COMPILE([],
- [
- union foo { int i; double d; };
- union foo f = (union foo) (int) 0;
- ],
- tcl_cv_cast_to_union=yes,
- tcl_cv_cast_to_union=no)
+ AC_TRY_COMPILE([],
+ [
+ union foo { int i; double d; };
+ union foo f = (union foo) (int) 0;
+ ],
+ tcl_cv_cast_to_union=yes,
+ tcl_cv_cast_to_union=no)
)
if test "$tcl_cv_cast_to_union" = "yes"; then
AC_DEFINE(HAVE_CAST_TO_UNION, 1,
- [Defined when compiler supports casting to union type.])
- fi
+ [Defined when compiler supports casting to union type.])
fi
-
+ fi
# DL_LIBS is empty, but then we match the Unix version
AC_SUBST(DL_LIBS)