Cleanup configure detection of win32.

This commit is contained in:
steve 2004-02-15 03:17:36 +00:00
parent c971448760
commit 081a6a4088
9 changed files with 39 additions and 67 deletions

19
aclocal.m4 vendored
View File

@ -14,7 +14,7 @@
AC_DEFUN([AX_CPP_IDENT],
[AC_CACHE_CHECK([for ident support in C compiler], ax_cv_cpp_ident,
[AC_TRY_COMPILE([
#ident "$Id: aclocal.m4,v 1.2 2004/01/15 06:05:20 steve Exp $"
#ident "$Id: aclocal.m4,v 1.3 2004/02/15 03:17:36 steve Exp $"
],[while (0) {}],
[AS_VAR_SET(ax_cv_cpp_ident, yes)],
[AS_VAR_SET(ax_cv_cpp_ident, no)])])
@ -67,3 +67,20 @@ if test $ax_cv_c_underscores_trailing = yes; then
fi
])# AX_C_UNDERSCORES_TRAILING
# AX_WIN32
# --------
# Combined check for several flavors of Microsoft Windows so
# their "issues" can be dealt with
AC_DEFUN([AX_WIN32],
[AC_CYGWIN
AC_MINGW32
WIN32=no
AC_MSG_CHECKING([for Microsoft Windows])
if test "$CYGWIN" = "yes" -o "$MINGW32" = "yes"
then
WIN32=yes
fi
AC_SUBST(MINGW32)
AC_SUBST(WIN32)
AC_MSG_RESULT($WIN32)
])# AX_WIN32

View File

@ -4,11 +4,12 @@ AC_PROG_CC
AC_PROG_CXX
AC_CHECK_TOOL(STRIP, strip, true)
AC_CYGWIN
AC_EXEEXT
AC_MINGW32
AC_SUBST(EXEEXT)
# Combined check for Microsoft-related bogosities; sets WIN32 if found
AX_WIN32
AC_PROG_INSTALL
# vvp32 is by default disabled

View File

@ -35,22 +35,12 @@ then
exit 1
fi
AC_CYGWIN
AC_EXEEXT
AC_MINGW32
WIN32=no
AC_MSG_CHECKING("Checking for windows")
if test "$CYGWIN" = "yes" -o "$MINGW32" = "yes"
then
WIN32=yes
fi
AC_SUBST(MINGW32)
AC_SUBST(WIN32)
AC_MSG_RESULT($WIN32)
AC_SUBST(EXEEXT)
# Combined check for Microsoft-related bogosities; sets WIN32 if found
AX_WIN32
# vvp32 is by default disabled
#enable_vvp32=no
AC_SUBST(enable_vvp32)

View File

@ -5,7 +5,6 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_CYGWIN
AC_EXEEXT
AX_CPP_IDENT

View File

@ -9,8 +9,9 @@ AC_PROG_INSTALL
AC_CANONICAL_HOST
# $host
AC_CYGWIN
AC_SUBST(CYGWIN)
# Combined check for Microsoft-related bogosities; sets WIN32 if found
AX_WIN32
AC_CHECK_HEADERS(malloc.h)
# Darwin requires -no-cpp-precomp
@ -64,17 +65,6 @@ esac
AC_SUBST(shared)
AC_MSG_RESULT($shared)
AC_MSG_CHECKING("for Win32")
WIN32=no
case "${host}" in
*-*-cygwin*)
WIN32=yes
;;
esac
AC_SUBST(WIN32)
AC_MSG_RESULT($WIN32)
AX_CPP_IDENT
AC_OUTPUT(Makefile)

View File

@ -10,8 +10,9 @@ AC_PROG_INSTALL
AC_CANONICAL_HOST
# $host
AC_CYGWIN
AC_SUBST(CYGWIN)
# Combined check for Microsoft-related bogosities; sets WIN32 if found
AX_WIN32
AC_CHECK_HEADERS(malloc.h)
# Do some operating system specific setup.
@ -72,17 +73,6 @@ esac
AC_SUBST(shared)
AC_MSG_RESULT($shared)
AC_MSG_CHECKING("for Win32")
WIN32=no
case "${host}" in
*-*-cygwin*)
WIN32=yes
;;
esac
AC_SUBST(WIN32)
AC_MSG_RESULT($WIN32)
AX_CPP_IDENT
AC_OUTPUT(Makefile)

View File

@ -14,22 +14,12 @@ then
exit 1
fi
AC_CYGWIN
AC_EXEEXT
AC_MINGW32
WIN32=no
AC_MSG_CHECKING("Checking for windows")
if test "$CYGWIN" = "yes" -o "$MINGW32" = "yes"
then
WIN32=yes
fi
AC_SUBST(MINGW32)
AC_SUBST(WIN32)
AC_MSG_RESULT($WIN32)
AC_SUBST(EXEEXT)
# Combined check for Microsoft-related bogosities; sets WIN32 if found
AX_WIN32
AX_CPP_IDENT
# vvp32 is by default disabled

View File

@ -4,10 +4,11 @@ AC_PROG_CC
AC_CHECK_TOOL(STRIP, strip, true)
AC_PROG_INSTALL
AC_CYGWIN
AC_EXEEXT
AC_SUBST(EXEEXT)
# Combined check for Microsoft-related bogosities; sets WIN32 if found
AX_WIN32
# Darwin requires -no-cpp-precomp
case "${host}" in
@ -17,14 +18,12 @@ case "${host}" in
;;
esac
WIN32=no
AC_MSG_CHECKING("for shared library link flag")
shared=-shared
EXTRALIBS=
case "${host}" in
*-*-cygwin*)
shared="-shared -Wl,--enable-auto-image-base"
WIN32=yes
;;
*-*-hpux*)
shared="-b"
@ -38,12 +37,7 @@ case "${host}" in
esac
AC_SUBST(shared)
AC_MSG_RESULT($shared)
AC_MSG_CHECKING("for win 32")
AC_SUBST(WIN32)
AC_MSG_RESULT($WIN32)
AC_SUBST(WIN32)
AC_SUBST(EXEEXT)
AC_SUBST(shared)
AC_SUBST(EXTRALIBS)

View File

@ -6,11 +6,12 @@ AC_PROG_CXX
AC_PROG_RANLIB
AC_CHECK_TOOL(STRIP, strip, true)
AC_CYGWIN
AC_EXEEXT
AC_MINGW32
AC_SUBST(EXEEXT)
# Combined check for Microsoft-related bogosities; sets WIN32 if found
AX_WIN32
# vvp32 is by default disabled
#enable_vvp32=no
AC_SUBST(enable_vvp32)