changeset 31222:ac37421d1abd

Modernize fnmatch detection macro.
author Bruno Haible <bruno@clisp.org>
date Sat, 02 May 2009 12:19:40 +0200
parents 7abce876439f
children a499fe386f64
files ChangeLog m4/fnmatch.m4
diffstat 2 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat May 02 11:34:20 2009 +0200
+++ b/ChangeLog	Sat May 02 12:19:40 2009 +0200
@@ -1,3 +1,10 @@
+2009-05-02  Bruno Haible  <bruno@clisp.org>
+
+	* m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Say "guessing no" instead of
+	"cross".
+	(gl_FUNC_FNMATCH_POSIX, gl_FUNC_FNMATCH_GNU): Update. Don't assume that
+	gnulib-tool was called with option --source-base=lib.
+
 2009-05-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
 	Use automake *-local hooks without commands, for extensibility.
--- a/m4/fnmatch.m4	Sat May 02 11:34:20 2009 +0200
+++ b/m4/fnmatch.m4	Sat May 02 12:19:40 2009 +0200
@@ -1,4 +1,4 @@
-# Check for fnmatch - serial 2.
+# Check for fnmatch - serial 3.
 
 # Copyright (C) 2000-2007, 2009 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -70,8 +70,8 @@
 		   1))[;]])],
       [$2=yes],
       [$2=no],
-      [$2=cross])])
-AS_IF([test $$2 = yes], [$3], [$4])
+      [$2="guessing no"])])
+AS_IF([test "$$2" = yes], [$3], [$4])
 ])# _AC_FUNC_FNMATCH_IF
 
 
@@ -93,9 +93,9 @@
 [
   FNMATCH_H=
   _AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_posix],
-		      [rm -f lib/fnmatch.h],
+		      [rm -f "$gl_source_base/fnmatch.h"],
 		      [_AC_LIBOBJ_FNMATCH])
-  if test $ac_cv_func_fnmatch_posix != yes; then
+  if test "$ac_cv_func_fnmatch_posix" != yes; then
     dnl We must choose a different name for our function, since on ELF systems
     dnl a broken fnmatch() in libc.so would override our fnmatch() if it is
     dnl compiled into a shared library.
@@ -113,9 +113,9 @@
 
   FNMATCH_H=
   _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
-		      [rm -f lib/fnmatch.h],
+		      [rm -f "$gl_source_base/fnmatch.h"],
 		      [_AC_LIBOBJ_FNMATCH])
-  if test $ac_cv_func_fnmatch_gnu != yes; then
+  if test "$ac_cv_func_fnmatch_gnu" != yes; then
     dnl We must choose a different name for our function, since on ELF systems
     dnl a broken fnmatch() in libc.so would override our fnmatch() if it is
     dnl compiled into a shared library.