From cd62ad8ff592041114e00f6f48990bfff48c22fe Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Fri, 22 Dec 2006 20:40:26 +0000 Subject: [PATCH] (-lm): No need to suppress libm on mingw, it's not needed because it's empty, but including it does no harm. (-lm): Look for "cos" instead of "main", since cos and friends are the purpose of looking for libm. (winsock etc): Test $host = *-*-mingw* rather than $MINGW32, autoconf regards the latter as obsolete. (AC_MINGW32): Remove test, $MINGW32 now unused. (uint32_t): Look at HAVE_NETDB_H rather than hard-coding __MINGW32__ in the test program. --- configure.in | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/configure.in b/configure.in index 1cbc025af..51a58c065 100644 --- a/configure.in +++ b/configure.in @@ -55,7 +55,6 @@ AC_CONFIG_SUBDIRS(guile-readline) dnl Some more checks for Win32 AC_CYGWIN -AC_MINGW32 AC_LIBTOOL_WIN32_DLL AC_PROG_INSTALL @@ -561,9 +560,11 @@ AC_TYPE_GETGROUPS AC_TYPE_SIGNAL AC_TYPE_MODE_T -if test $MINGW32 = no; then - AC_CHECK_LIB(m, main) -fi +# On mingw -lm is empty, so this test is unnecessary, but it's +# harmless so we don't hard-code to suppress it. +# +AC_CHECK_LIB(m, cos) + AC_CHECK_FUNCS(gethostbyname) if test $ac_cv_func_gethostbyname = no; then AC_CHECK_LIB(nsl, gethostbyname) @@ -578,7 +579,8 @@ dnl dnl Check for Winsock and other functionality on Win32 (*not* CygWin) dnl EXTRA_DEFS="" -if test "$MINGW32" = "yes" ; then +case $host in + *-*-mingw*) AC_CHECK_HEADER(winsock2.h, [AC_DEFINE([HAVE_WINSOCK2_H], 1, [Define if you have the header file.])]) AC_CHECK_LIB(ws2_32, main) @@ -592,7 +594,8 @@ if test "$MINGW32" = "yes" ; then AC_DEFINE(USE_DLL_IMPORT, 1, [Define if you need additional CPP macros on Win32 platforms.]) fi -fi + ;; +esac AC_SUBST(EXTRA_DEFS) # Reasons for testing: @@ -798,7 +801,7 @@ AC_CACHE_VAL(guile_cv_have_uint32_t, #if HAVE_STDINT_H #include #endif - #ifndef __MINGW32__ + #ifndef HAVE_NETDB_H #include #endif], [uint32_t a;],