]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid using egrep.
authorBruno Haible <bruno@clisp.org>
Thu, 19 Jun 2003 14:00:21 +0000 (14:00 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:42 +0000 (12:10 +0200)
autoconf-lib-link/m4/ChangeLog
autoconf-lib-link/m4/lib-ld.m4

index 993f9a7559a0cd8db14d320a9fc14b4e9dc4ea09..8e1bc8e48397125146f1790de60e96ff475af4b2 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-17  Paul Eggert  <eggert@twinsun.com>
+
+       * lib-ld.m4 (AC_LIB_PROG_LD_GNU, AC_LIB_PROG_LD): Don't use egrep, for
+       portability to POSIX 1003.1-2001.  Backported from libtool-1.5.
+
 2003-05-22  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.12.1 released.
index 11d0ce773427a291e20709295a87ac98df60f0ce..502fd22c70ccd7b44b6c1c19420095fa71175c2b 100644 (file)
@@ -1,4 +1,4 @@
-# lib-ld.m4 serial 2 (gettext-0.12)
+# lib-ld.m4 serial 3 (gettext-0.12.2)
 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -14,11 +14,12 @@ dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 AC_DEFUN([AC_LIB_PROG_LD_GNU],
 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-  acl_cv_prog_gnu_ld=yes
-else
-  acl_cv_prog_gnu_ld=no
-fi])
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac])
 with_gnu_ld=$acl_cv_prog_gnu_ld
 ])
 
@@ -88,11 +89,12 @@ AC_CACHE_VAL(acl_cv_path_LD,
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some GNU ld's only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-       test "$with_gnu_ld" != no && break
-      else
-       test "$with_gnu_ld" != yes && break
-      fi
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break ;;
+      *)
+       test "$with_gnu_ld" != yes && break ;;
+      esac
     fi
   done
   IFS="$ac_save_ifs"