unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* MinGW/autoconf
@ 2006-12-14 21:41 Nils Durner
  2006-12-15  0:29 ` MinGW/autoconf Kevin Ryde
  0 siblings, 1 reply; 4+ messages in thread
From: Nils Durner @ 2006-12-14 21:41 UTC (permalink / raw)


Hi,

regenerating "configure" using

    autoconf -f -i

fails on MinGW with

    configure.in:57: warning: AC_CANONICAL_HOST invoked multiple times
    autoconf/specific.m4:393: AC_MINGW32 is expanded from...
    configure.in:57: the top level

specific.m4 contains the note:

    AC_DIAGNOSE([obsolete],
            [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl

If you replace "AC_MINGW32" by

    case $host_os in
      *mingw32* ) MINGW32=yes;;
          * ) MINGW32=no;;
    esac

in configure.in, autoconf succeeds.


Best,

Nils Durner


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MinGW/autoconf
  2006-12-14 21:41 MinGW/autoconf Nils Durner
@ 2006-12-15  0:29 ` Kevin Ryde
  2006-12-19 19:43   ` MinGW/autoconf Nils Durner
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Ryde @ 2006-12-15  0:29 UTC (permalink / raw)
  Cc: bug-guile

Nils Durner <ndurner@web.de> writes:
>
>     configure.in:57: warning: AC_CANONICAL_HOST invoked multiple times
>     autoconf/specific.m4:393: AC_MINGW32 is expanded from...
>     configure.in:57: the top level

What version of autoconf is that?
I think it's only a warning, and it seems gone with autoconf 2.61.

(I remember looking into it a long time ago, I forget exactly but it
might have been an artifact of the AC_REQUIRE system.)


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MinGW/autoconf
  2006-12-15  0:29 ` MinGW/autoconf Kevin Ryde
@ 2006-12-19 19:43   ` Nils Durner
  2006-12-22 20:39     ` MinGW/autoconf Kevin Ryde
  0 siblings, 1 reply; 4+ messages in thread
From: Nils Durner @ 2006-12-19 19:43 UTC (permalink / raw)



> What version of autoconf is that?
2.59

> I think it's only a warning, and it seems gone with autoconf 2.61.
It aborts after the warning and mingw.org doesn't provide a newer autoconf.


    Nils Durner


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MinGW/autoconf
  2006-12-19 19:43   ` MinGW/autoconf Nils Durner
@ 2006-12-22 20:39     ` Kevin Ryde
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Ryde @ 2006-12-22 20:39 UTC (permalink / raw)
  Cc: bug-guile

[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]

Nils Durner <ndurner@web.de> writes:
>
> It aborts after the warning and mingw.org doesn't provide a newer autoconf.

I was sure I'd wrestled it before and it was merely annoying but
harmless.

In any event normally I don't think there's any virtue in working with
old developer tools, but in this case we can modernize configure.in to
get around it.  I checked in the changes below.

        * configure.in (-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.

The only bit to maybe wonder about is the -lm detection.  I'm pretty
sure AC_CHECK_LIB gets the right answer on its own, but I also know
libtool has had an AC_CHECK_LIBM doing some hard-coded suppressing of
-lm for beos, mingw, cygwin and darwin.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: configure.in.mingw32.diff --]
[-- Type: text/x-diff, Size: 1359 bytes --]

--- configure.in.~1.268.2.25.~	2006-12-15 10:15:59.000000000 +1100
+++ configure.in	2006-12-22 20:21:14.000000000 +1100
@@ -55,7 +55,6 @@
 
 dnl Some more checks for Win32
 AC_CYGWIN
-AC_MINGW32
 AC_LIBTOOL_WIN32_DLL
 
 AC_PROG_INSTALL
@@ -561,9 +560,11 @@
 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 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 <winsock2.h> header file.])])
     AC_CHECK_LIB(ws2_32, main)
@@ -592,7 +594,8 @@
       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 @@
 		   #if HAVE_STDINT_H
 		   #include <stdint.h>
                    #endif
-		   #ifndef __MINGW32__
+		   #ifndef HAVE_NETDB_H
 	           #include <netdb.h>
 		   #endif],
 		  [uint32_t a;],

[-- Attachment #3: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-22 20:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-14 21:41 MinGW/autoconf Nils Durner
2006-12-15  0:29 ` MinGW/autoconf Kevin Ryde
2006-12-19 19:43   ` MinGW/autoconf Nils Durner
2006-12-22 20:39     ` MinGW/autoconf Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).