[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
autoconf-lib-link/m4/lib-ld.m4 port to POSIX 1003.1-2001
From: |
Paul Eggert |
Subject: |
autoconf-lib-link/m4/lib-ld.m4 port to POSIX 1003.1-2001 |
Date: |
Tue, 17 Jun 2003 23:41:37 -0700 (PDT) |
autoconf-lib-link/m4/lib-ld.m4 uses egrep, which isn't portable to
POSIX 1003.1-2001 hosts. This code was originally derived from
libtool, which has been fixed to not use egrep. Here's an untested
backport of that fix to gettext.
2003-06-17 Paul Eggert <address@hidden>
* lib-ld.m4 (AC_LIB_PROG_LD_GNU, AC_LIB_PROG_LD): Don't use
egrep, for portability to POSIX 1003.1-2001. This patch
backported from Libtool 1.5.
===================================================================
RCS file: autoconf-lib-link/m4/lib-ld.m4,v
retrieving revision 0.12.1.0
retrieving revision 0.12.1.1
diff -pu -r0.12.1.0 -r0.12.1.1
--- autoconf-lib-link/m4/lib-ld.m4 2003/02/18 13:54:31 0.12.1.0
+++ autoconf-lib-link/m4/lib-ld.m4 2003/06/18 06:37:37 0.12.1.1
@@ -14,11 +14,12 @@ dnl From libtool-1.4. Sets the variable
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"
- autoconf-lib-link/m4/lib-ld.m4 port to POSIX 1003.1-2001,
Paul Eggert <=