bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] update M4 for INET_NTOP and INET_PTON checks.


From: Simon Josefsson
Subject: Re: [patch] update M4 for INET_NTOP and INET_PTON checks.
Date: Thu, 05 Nov 2009 14:42:32 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

Bruno Haible <address@hidden> writes:

>> Perhaps the inet_?to?.m4 code needs to check for both magic strings?
>
> I think it's sufficient to let it check for the correct magic string.

I got this on mingw cross-compile:

/bin/sh ../../libtool --tag=CC   --mode=link i586-mingw32msvc-gcc -std=gnu99   
-g -O2 -no-install  -o ex-client2.exe ex-client2.o libexamples.la 
../../lib/libgnutls.la ../../libextra/libgnutls-extra.la ../../gl/libgnu.la 
-lws2_32 no no 
...
i586-mingw32msvc-gcc: no: No such file or directory
i586-mingw32msvc-gcc: no: No such file or directory

The reason being that the Makefile contains:

INET_NTOP_LIB = no
INET_PTON_LIB = no

I have pushed the patch below.

/Simon

>From 757089b71ada13e18169e2be3509c1b07bd1c63d Mon Sep 17 00:00:00 2001
From: Simon Josefsson <address@hidden>
Date: Thu, 5 Nov 2009 14:42:03 +0100
Subject: [PATCH] inet_ntop, inet_pton: Fix link error.

---
 ChangeLog       |    6 ++++++
 m4/inet_ntop.m4 |    3 ++-
 m4/inet_pton.m4 |    3 ++-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 36c74dd..3c733a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2009-11-05  Simon Josefsson  <address@hidden>
 
+       Fix link error.
+       * m4/inet_ntop.m4 (gl_INET_NTOP): Fix test of AC_SEARCH_LIBS result.
+       * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
+
+2009-11-05  Simon Josefsson  <address@hidden>
+
        * tests/test-func.c: Also test value of __func__.
 
 2009-11-05  Simon Josefsson  <address@hidden>
diff --git a/m4/inet_ntop.m4 b/m4/inet_ntop.m4
index e3c6c8b..2a8ff20 100644
--- a/m4/inet_ntop.m4
+++ b/m4/inet_ntop.m4
@@ -18,7 +18,8 @@ AC_DEFUN([gl_INET_NTOP],
     [AC_REPLACE_FUNCS([inet_ntop])])
   LIBS=$gl_save_LIBS
   INET_NTOP_LIB=
-  if test "$ac_cv_search_inet_ntop" != "none required"; then
+  if test "$ac_cv_search_inet_ntop" != "no" &&
+     test "$ac_cv_search_inet_ntop" != "none required"; then
     INET_NTOP_LIB="$ac_cv_search_inet_ntop"
   fi
   AC_SUBST([INET_NTOP_LIB])
diff --git a/m4/inet_pton.m4 b/m4/inet_pton.m4
index b266257..e890b9b 100644
--- a/m4/inet_pton.m4
+++ b/m4/inet_pton.m4
@@ -18,7 +18,8 @@ AC_DEFUN([gl_INET_PTON],
     [AC_REPLACE_FUNCS([inet_pton])])
   LIBS=$gl_save_LIBS
   INET_PTON_LIB=
-  if test "$ac_cv_search_inet_pton" != "none required"; then
+  if test "$ac_cv_search_inet_pton" != "no" &&
+     test "$ac_cv_search_inet_pton" != "none required"; then
     INET_PTON_LIB="$ac_cv_search_inet_pton"
   fi
   AC_SUBST([INET_PTON_LIB])
-- 
1.6.5.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]