]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no
authorPaul Eggert <eggert@twinsun.com>
Tue, 19 Nov 2002 09:42:39 +0000 (09:42 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 19 Nov 2002 09:42:39 +0000 (09:42 +0000)
longer requires them; you're supposed to use grep -E and grep -F
instead.  Also, don't assume that "test -a" works, since POSIX
doesn't require it.
* libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG,
_LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE,
AC_LIBTOOL_PROG_LD_SHLIBS):
egrep -> grep, when that makes no difference.
* libtoolize.in: Likewise.
* ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise.
* ltmain.in: Likewise.
* demo/Makefile.am (hc-direct): Likewise.
* pdemo/Makefile.am (hc-direct): Likewise.
* tests/build-relink.test, tests/build-relink2.test,
tests/cdemo-conf.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/demo-conf.test,
tests/demo-nofast.test, tests/demo-shared.test,
tests/demo-static.test, tests/depdemo-conf.test,
tests/depdemo-nofast.test, tests/depdemo-shared.test,
tests/depdemo-static.test, tests/hardcode.test,
tests/mdemo-conf.test, tests/mdemo-shared.test,
tests/mdemo-static.test, tests/pdemo-conf.test,
tests/tagdemo-conf.test, tests/tagdemo-shared.test,
tests/tagdemo-static.test: Likewise.
* libtool.m4 (AC_PROG_EGREP):
New macro, defined if Autoconf doesn't define.
(AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it.
(AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE):
Use shell pattern matching rather than egrep.
(AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP.
* demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep.
* pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise.
* tests/defs (EGREP, FGREP): New vars.
* ltmain.in: egrep -> $EGREP
* tests/assign.test, tests/demo-exec.test, tests/demo-inst.test,
tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test:
Likewise.
* tests/hardcode.test: fgrep -> $FGREP
* tests/f77demo-exec.test: test -a -> test &&

41 files changed:
ChangeLog
THANKS
demo/Makefile.am
doc/libtool.texi
libtool.m4
libtoolize.in
ltdl.m4
ltmain.in
pdemo/Makefile.am
tests/assign.test
tests/build-relink.test
tests/build-relink2.test
tests/cdemo-conf.test
tests/cdemo-shared.test
tests/cdemo-static.test
tests/defs
tests/demo-conf.test
tests/demo-exec.test
tests/demo-inst.test
tests/demo-nofast.test
tests/demo-shared.test
tests/demo-static.test
tests/depdemo-conf.test
tests/depdemo-nofast.test
tests/depdemo-shared.test
tests/depdemo-static.test
tests/f77demo-conf.test
tests/f77demo-exec.test
tests/f77demo-shared.test
tests/f77demo-static.test
tests/hardcode.test
tests/mdemo-conf.test
tests/mdemo-shared.test
tests/mdemo-static.test
tests/pdemo-conf.test
tests/pdemo-exec.test
tests/pdemo-inst.test
tests/sh.test
tests/tagdemo-conf.test
tests/tagdemo-shared.test
tests/tagdemo-static.test

index de7b6524784f64f853b7f7cf843264120cc2a540..7f9746befbe5ad49bc41f2959a1d6fa72a968d71 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,52 @@
+2002-11-19  Paul Eggert  <eggert@twinsun.com>
+
+       Don't assume that egrep and fgrep exist.  POSIX 1003.1-2001 no
+       longer requires them; you're supposed to use grep -E and grep -F
+       instead.  Also, don't assume that "test -a" works, since POSIX
+       doesn't require it.
+
+       * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG,
+       _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE,
+       AC_LIBTOOL_PROG_LD_SHLIBS):
+       egrep -> grep, when that makes no difference.
+       * libtoolize.in: Likewise.
+       * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise.
+       * ltmain.in: Likewise.
+       * demo/Makefile.am (hc-direct): Likewise.
+       * pdemo/Makefile.am (hc-direct): Likewise.
+       * tests/build-relink.test, tests/build-relink2.test,
+       tests/cdemo-conf.test, tests/cdemo-shared.test,
+       tests/cdemo-static.test, tests/demo-conf.test,
+       tests/demo-nofast.test, tests/demo-shared.test,
+       tests/demo-static.test, tests/depdemo-conf.test,
+       tests/depdemo-nofast.test, tests/depdemo-shared.test,
+       tests/depdemo-static.test, tests/hardcode.test,
+       tests/mdemo-conf.test, tests/mdemo-shared.test,
+       tests/mdemo-static.test, tests/pdemo-conf.test,
+       tests/tagdemo-conf.test, tests/tagdemo-shared.test,
+       tests/tagdemo-static.test: Likewise.
+
+       * libtool.m4 (AC_PROG_EGREP):
+       New macro, defined if Autoconf doesn't define.
+       (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it.
+       (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE):
+       Use shell pattern matching rather than egrep.
+       (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP.
+
+       * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep.
+       * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise.
+
+       * tests/defs (EGREP, FGREP): New vars.
+
+       * ltmain.in: egrep -> $EGREP
+       * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test,
+       tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test:
+       Likewise.
+
+       * tests/hardcode.test: fgrep -> $FGREP
+
+       * tests/f77demo-exec.test: test -a -> test &&
+
 2002-11-18  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
 
        * ltmain.in: When using gcc, pass -mfoo to the linker
 
 2002-10-15  Charles Wilson  <cwilson@ece.gatech.edu>
 
-        * libtool.m4 (AC_LIBTOOL_SYS_MAX_CMD_LEN): avoid long delay on 
+        * libtool.m4 (AC_LIBTOOL_SYS_MAX_CMD_LEN): avoid long delay on
          cygwin/Win9x when computing commandline length.
         (AC_LIBTOOL_SYS_DYNAMIC_LINKER): fix postinstall_cmds when
         sources are in a subdirectory
        * Makefile.am: Add support for FFLAGS and FLIBS.
        * tests/Makefile.am: Add new Fortran tests.
        * tests/f77demo-*.test: New files.
-       * f77demo/configure.ac, f77demo/cprogram.c, f77demo/fooc.c 
-       * f77demo/foof.f, f77demo/foo.h, f77demo/fprogram.f 
+       * f77demo/configure.ac, f77demo/cprogram.c, f77demo/fooc.c
+       * f77demo/foof.f, f77demo/foo.h, f77demo/fprogram.f
        * f77demo/Makefile.am, f77demo/README: New files.
 
 2002-07-16  Gary V. Vaughan  <gary@gnu.org>
diff --git a/THANKS b/THANKS
index 6719164dec08d5a0cbb17eba9280ec06e7472ccc..60bbf8d7ebc8c83ed63ebc880d9d2f653a7af0dd 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -10,34 +10,35 @@ The following people made especially gracious contributions of their
 time and energy in helping to track down bugs, port to new systems,
 and generally assist in the libtool maintainership process:
 
-Akim Demaille <demaille@inf.enst.fr>
-Albert Chin-A-Young <china@thewrittenword.com>
-Andrey Slepuhin <pooh@msu.ru>
-Bruno Haible <haible@ilog.fr>
-Carl D. Roth <roth@cse.ucsc.edu>
-Charles S. Wilson <cwilson@ece.gatech.edu>
-Chris P. Ross <cross@eng.us.uu.net>
-DJ Delorie <dj@delorie.com>
-Edouard G. Parmelan <Edouard.Parmelan@France.NCR.COM>
-Eric Estievenart <eric@via.ecp.fr>
-Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-H.J. Lu <hjl@gnu.org>
-Ian Lance Taylor <ian@cygnus.com>
-Joel N. Weber II <devnull@gnu.org>
-Joseph Beckenbach III <jrb3@best.com>
-Kenneth Albanowski <kjahds@kjahds.com>
-Kurt D. Zeilenga <Kurt@OpenLDAP.Org>
-Manfred Weichel <Manfred.Weichel@pdb.siemens.de>
-Marc J. Fraioli <fraioli@dg-rtp.dg.com>
-Mark Kettenis <kettenis@phys.uva.nl>
-Ossama Othman <othman@cs.wustl.edu>
-Olly Betts <olly@muscat.co.uk>
-Pavel Roskin <pavel_roskin@geocities.com>
-Robert Collins <robert.collins@itdomain.com.au>
-Sebastian Wilhelmi <wilhelmi@ira.uka.de>
-Stephan Kulow <coolo@kde.org>
-Steven M. Schultz <sms@wlv.iipo.gtegsc.com>
-Todd Vierling <tv@pobox.com>
-Tom Tmemey <tromey@cygnus.com>
-Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
-Xavier Pianet <xavier@xingo.com>
+Akim Demaille                   akim@epita.fr
+Albert Chin-A-Young             china@thewrittenword.com
+Andrey Slepuhin                 pooh@msu.ru
+Bruno Haible                    haible@ilog.fr
+Carl D. Roth                    roth@cse.ucsc.edu
+Charles S. Wilson               cwilson@ece.gatech.edu
+Chris P. Ross                   cross@eng.us.uu.net
+DJ Delorie                      dj@delorie.com
+Edouard G. Parmelan             Edouard.Parmelan@France.NCR.COM
+Erez Zadok                      ezk@shekel.mcl.cs.columbia.edu
+Eric Estievenart                eric@via.ecp.fr
+H.J. Lu                         hjl@gnu.org
+Ian Lance Taylor                ian@cygnus.com
+Joel N. Weber II                devnull@gnu.org
+Joseph Beckenbach III           jrb3@best.com
+Kenneth Albanowski              kjahds@kjahds.com
+Kurt D. Zeilenga                Kurt@OpenLDAP.Org
+Manfred Weichel                 Manfred.Weichel@pdb.siemens.de
+Marc J. Fraioli                 fraioli@dg-rtp.dg.com
+Mark Kettenis                   kettenis@phys.uva.nl
+Olly Betts                      olly@muscat.co.uk
+Ossama Othman                   othman@cs.wustl.edu
+Paul Eggert                     eggert@twinsun.com
+Pavel Roskin                    pavel_roskin@geocities.com
+Robert Collins                  robert.collins@itdomain.com.au
+Sebastian Wilhelmi              wilhelmi@ira.uka.de
+Stephan Kulow                   coolo@kde.org
+Steven M. Schultz               sms@wlv.iipo.gtegsc.com
+Todd Vierling                   tv@pobox.com
+Tom Tmemey                      tromey@cygnus.com
+Ulrich Drepper                  drepper@ipd.info.uni-karlsruhe.de
+Xavier Pianet                   xavier@xingo.com
index 02340faf66f304d66e2f5b4d6aec3b2294a1eee9..68ae80895c913587db46dbee6cd7a52f0155bb44 100644 (file)
@@ -72,12 +72,13 @@ $(srcdir)/acinclude.m4:
 # Test programs to see what gets hardcoded.
 .PHONY: hardcode
 hardcode: $(hardcode_tests)
-SET_HARDCODE_FLAGS = eval `$(LIBTOOL) --config | egrep -e '^(hardcode_.*|wl)='`
+SET_HARDCODE_FLAGS = \
+  eval `$(LIBTOOL) --config | sed -n -e '/^hardcode_.*=/p; /^wl=/p'`
 hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
        @rm -f hc-direct
        @echo "You may ignore any linking errors from the following command:"
        @shlib=./$(objdir)/libhello.a; \
-         eval "`egrep '^library_names' libhello.la`"; \
+         eval "`grep '^library_names' libhello.la`"; \
          for lib in $$library_names; do \
            shlib="./$(objdir)/$$lib"; \
          done; \
index f9735df9ccaba362b0c7af45cf8b019628e8e207..b12acb9cf0591fbe0c589a27e5e5008be2789bf9 100644 (file)
@@ -4043,7 +4043,7 @@ writes libtool makes sure @samp{$deplibs} is included in
 @vindex file_magic_test_file
 looks in the library link path for libraries that have the right
 libname.  Then it runs @samp{$file_magic_cmd} on the library and checks
-for a match against @var{regex} using @code{egrep}.  When
+for a match against the extended regular expression @var{regex}.  When
 @var{file_magic_test_file} is set by @file{libtool.m4}, it is used as an
 argument to @samp{$file_magic_cmd} in order to verify whether the
 regular expression matches its output, and warn the user otherwise.
index bbd46d678b5ba61308ee20b74ea767969cf3f80c..3e001a5a23705c0eb6d61428947282cb00fdd9d5 100644 (file)
@@ -1048,7 +1048,7 @@ dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
 if test "$GCC" = yes; then
   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | egrep ';' >/dev/null ; then
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
     # if the path contains ";" then we assume it to be the separator
     # otherwise default to the standard path separator (i.e. ":") - it is
     # assumed that no part of a normal pathname contains ";" but that should
@@ -1176,7 +1176,7 @@ cygwin* | mingw* | pw32*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | [egrep ';[c-zC-Z]:/' >/dev/null]; then
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
         # It is most probably a Windows format PATH printed by
         # mingw gcc, but we are running on Cygwin. Gcc prints its search
         # path with ; separators, and with drive letters. We can handle the
@@ -1564,7 +1564,7 @@ if test -f "$ltmain" && test -n "$tagnames"; then
        AC_LIBTOOL_LANG_CXX_CONFIG
        ;;
 
-      F77) 
+      F77)
         AC_LIBTOOL_LANG_F77_CONFIG
         ;;
 
@@ -1742,11 +1742,27 @@ pic_mode=ifelse($#,1,$1,default)
 ])# AC_LIBTOOL_PICMODE
 
 
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
 # AC_PATH_TOOL_PREFIX
 # -------------------
 # find a file program which can recognise shared library
 AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 [case $MAGIC_CMD in
 [[\\/*] |  ?:[\\/]*])
@@ -1770,7 +1786,7 @@ dnl not every word.  This closes a longstanding sh security hole.
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           egrep "$file_magic_regex" > /dev/null; then
+           $EGREP "$file_magic_regex" > /dev/null; then
            :
          else
            cat <<EOF 1>&2
@@ -1878,11 +1894,14 @@ AC_CACHE_VAL(lt_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 "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
        test "$with_gnu_ld" != no && break
-      else
+       ;;
+      *)
        test "$with_gnu_ld" != yes && break
-      fi
+       ;;
+      esac
     fi
   done
   IFS="$lt_save_ifs"
@@ -1903,9 +1922,10 @@ AC_PROG_LD_GNU
 # AC_PROG_LD_GNU
 # --------------
 AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_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
+if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
   lt_cv_prog_gnu_ld=yes
 else
   lt_cv_prog_gnu_ld=no
@@ -1948,7 +1968,7 @@ lt_cv_deplibs_check_method='unknown'
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
+# which responds to the $file_magic_cmd with a given extended regex.
 # If you have `file' or equivalent on your system and you're not sure
 # whether `pass_all' will *always* work, you probably want this one.
 
@@ -2148,16 +2168,23 @@ else
       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
       #   nm: unknown option "B" ignored
       # Tru64's nm complains that /dev/null is an invalid object file
-      if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+      */dev/null* | *'Invalid file or object type'*)
        lt_cv_path_NM="$tmp_nm -B"
        break
-      elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
-       lt_cv_path_NM="$tmp_nm -p"
-       break
-      else
-       lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-       continue # so that we can try to find one that supports BSD flags
-      fi
+        ;;
+      *)
+       case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+       */dev/null*)
+         lt_cv_path_NM="$tmp_nm -p"
+         break
+         ;;
+       *)
+         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+         continue # so that we can try to find one that supports BSD flags
+         ;;
+       esac
+      esac
     fi
   done
   IFS="$lt_save_ifs"
@@ -2350,7 +2377,7 @@ if test "$GCC" = no; then
 fi
 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
   AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
-  if echo "$old_CC $old_CFLAGS " | egrep -e "[[        ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
+  if echo "$old_CC $old_CFLAGS " | grep "[[    ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
   else
     AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
     _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
@@ -2491,7 +2518,7 @@ if test "$GXX" = yes; then
   # Check if GNU C++ uses GNU ld as the underlying linker, since the
   # archiving commands below assume that GNU ld is being used.
   if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
-      egrep 'GNU ld' > /dev/null; then
+      grep 'GNU ld' > /dev/null; then
     with_gnu_ld=yes
 
     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -2507,7 +2534,7 @@ if test "$GXX" = yes; then
 
     # ancient GNU ld didn't support --whole-archive et. al.
     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-       egrep 'no-whole-archive' > /dev/null; then
+       grep 'no-whole-archive' > /dev/null; then
       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
     else
       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
@@ -2527,7 +2554,7 @@ if test "$GXX" = yes; then
   # Commands to make compiler produce verbose output that lists
   # what "hidden" libraries, object files and flags are used when
   # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
 else
   GXX=no
@@ -2671,7 +2698,7 @@ case $host_os in
     _LT_AC_TAGVAR(always_export_symbols, $1)=no
     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
-    if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib'
     else
@@ -2756,7 +2783,7 @@ case $host_os in
        # explicitly linking system object files so we need to strip them
        # from the output so that they don't get included in the library
        # dependencies.
-       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
        ;;
       *)
        if test "$GXX" = yes; then
@@ -2826,7 +2853,7 @@ case $host_os in
        # explicitly linking system object files so we need to strip them
        # from the output so that they don't get included in the library
        # dependencies.
-       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | grep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -2885,7 +2912,7 @@ case $host_os in
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
     fi
     # Workaround some broken pre-1.5 toolchains
-    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep conftest.$objext | sed -e "s:-lgcc -lc -lgcc::"'
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | sed -e "s:-lgcc -lc -lgcc::"'
     ;;
   osf3*)
     case $cc_basename in
@@ -2938,7 +2965,7 @@ case $host_os in
          # Commands to make compiler produce verbose output that lists
          # what "hidden" libraries, object files and flags are used when
          # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
        else
          # FIXME: insert proper C++ library support
@@ -3001,7 +3028,7 @@ case $host_os in
          # Commands to make compiler produce verbose output that lists
          # what "hidden" libraries, object files and flags are used when
          # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
        else
          # FIXME: insert proper C++ library support
@@ -3076,7 +3103,7 @@ case $host_os in
        # explicitly linking system object files so we need to strip them
        # from the output so that they don't get included in the library
        # dependencies.
-       output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
        # Archives containing C++ object files must be created using
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -3095,7 +3122,7 @@ case $host_os in
        # GNU C++ compiler with Solaris linker
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-         if $CC --version | egrep -v '^2\.7' > /dev/null; then
+         if $CC --version | grep -v '^2\.7' > /dev/null; then
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
@@ -3103,7 +3130,7 @@ case $host_os in
            # Commands to make compiler produce verbose output that lists
            # what "hidden" libraries, object files and flags are used when
            # linking a shared library.
-           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
          else
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
            # platform.
@@ -3114,7 +3141,7 @@ case $host_os in
            # Commands to make compiler produce verbose output that lists
            # what "hidden" libraries, object files and flags are used when
            # linking a shared library.
-           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
          fi
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
@@ -3343,7 +3370,7 @@ objext=o
 _LT_AC_TAGVAR(objext, $1)=$objext
 
 # Code to be used in simple compile tests
-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"    
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
 # Code to be used in simple link tests
 lt_simple_link_test_code="      program t\n      end\n"
@@ -3517,7 +3544,7 @@ if test -f "$ltmain"; then
   # Now quote all the things that may contain metacharacters while being
   # careful not to overquote the AC_SUBSTed values.  We take copies of the
   # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
     deplibs_check_method reload_flag reload_cmds need_locks \
@@ -3676,6 +3703,9 @@ CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
 # Is the compiler the GNU C compiler?
 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
+# An ERE matcher.
+EGREP=$lt_EGREP
+
 # The linker used to build libraries.
 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
 
@@ -4037,9 +4067,10 @@ mingw*)
 esac
 
 # If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
-  symcode='[[ABCDGISTW]]'
-fi
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGISTW]]' ;;
+esac
 
 # Try without a prefix undercore, then with it.
 for ac_symprfx in "" "_"; do
@@ -4075,8 +4106,8 @@ EOF
       fi
 
       # Make sure that we snagged all the symbols we need.
-      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
-       if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+       if grep ' nm_test_func$' "$nlist" >/dev/null; then
          cat <<EOF > conftest.$ac_ext
 #ifdef __cplusplus
 extern "C" {
@@ -4584,7 +4615,7 @@ ifelse([$1],[CXX],[
   aix4* | aix5*)
     # If we're using GNU nm, then we don't want the "-C" option.
     # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
     else
       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
@@ -4620,7 +4651,7 @@ ifelse([$1],[CXX],[
   # include_expsyms should be a list of space-separated symbols to be *always*
   # included in the symbol list
   _LT_AC_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an egrep regular expression of symbols to exclude
+  # exclude_expsyms can be an extended regexp of symbols to exclude
   # it will be wrapped by ` (' and `)$', so one must not match beginning or
   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
   # as well as any symbol that contains `d'.
@@ -4684,7 +4715,7 @@ EOF
       ;;
 
     beos*)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
        # support --undefined.  This deserves some investigation.  FIXME
@@ -4702,7 +4733,7 @@ EOF
       _LT_AC_TAGVAR(always_export_symbols, $1)=no
       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
-      if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib'
       else
@@ -4721,7 +4752,7 @@ EOF
       ;;
 
     solaris* | sysv5*)
-      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        cat <<EOF 1>&2
 
@@ -4733,7 +4764,7 @@ EOF
 *** used, and then restart.
 
 EOF
-      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
@@ -4749,7 +4780,7 @@ EOF
       ;;
 
     *)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
@@ -4763,7 +4794,7 @@ EOF
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
       # ancient GNU ld didn't support --whole-archive et. al.
-      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
+      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
       else
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
@@ -4796,7 +4827,7 @@ EOF
       else
        # If we're using GNU nm, then we don't want the "-C" option.
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
+       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
        else
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
index f2beeea74b5e0f1d4e9ba112d0827d8fe68d4361..b4aaf94365895c7bc0f0653c0222b1ec144efd43 100644 (file)
@@ -158,7 +158,7 @@ fi
 files='config.guess config.sub ltmain.sh'
 
 auxdir=.
-auxdirline=`egrep '^AC_CONFIG_AUX_DIR' $configure_ac 2>/dev/null`
+auxdirline=`grep '^AC_CONFIG_AUX_DIR' $configure_ac 2>/dev/null`
 if test -n "$auxdirline"; then
   # Handle explicit AC_CONFIG_AUX_DIR settings.
   auxdir=`echo "$auxdirline" | sed 's/^AC_CONFIG_AUX_DIR(\([^)]*\)).*$/\1/'`
@@ -193,12 +193,12 @@ else
 fi
 
 if test -z "$automake"; then
-  if egrep '^A[MC]_PROG_LIBTOOL' $configure_ac >/dev/null 2>&1; then :
+  if grep '^A[MC]_PROG_LIBTOOL' $configure_ac >/dev/null 2>&1; then :
   else
     echo "Remember to add \`AC_PROG_LIBTOOL' to \`$configure_ac'."
   fi
 
-  if egrep '^AC_PROG_RANLIB' $configure_ac >/dev/null 2>&1; then
+  if grep '^AC_PROG_RANLIB' $configure_ac >/dev/null 2>&1; then
     echo "Using \`AC_PROG_RANLIB' is rendered obsolete by \`AC_PROG_LIBTOOL'"
   fi
 
@@ -208,7 +208,7 @@ if test -z "$automake"; then
     updatemsg="add the contents of \`$libtool_m4' to \`aclocal.m4'"
   fi
 
-  if egrep '^AC_DEFUN\(\[A[MC]_PROG_LIBTOOL' aclocal.m4 >/dev/null 2>&1; then
+  if grep '^AC_DEFUN(\[A[MC]_PROG_LIBTOOL' aclocal.m4 >/dev/null 2>&1; then
     # Check the version number on libtool.m4 and the one used in aclocal.m4.
     instserial=`grep '^# serial ' $libtool_m4 | grep 'A[MC]_PROG_LIBTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`
 
@@ -242,7 +242,7 @@ if test -z "$automake"; then
       updatemsg="add the contents of \`$ltdl_m4' to \`aclocal.m4'"
     fi
 
-    if egrep '^AC_DEFUN\(AC_LIB_LTDL' aclocal.m4 >/dev/null 2>&1; then
+    if grep '^AC_DEFUN(AC_LIB_LTDL' aclocal.m4 >/dev/null 2>&1; then
       # Check the version number on ltdl.m4 and the one used in aclocal.m4.
       instserial=`grep '^# serial ' $ltdl_m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`
 
diff --git a/ltdl.m4 b/ltdl.m4
index 53f99e6c3fb012f4e3aa49b8f780963ea9a12f98..26fb06680bd462168f60e2ea922be6bdbee684b0 100644 (file)
--- a/ltdl.m4
+++ b/ltdl.m4
@@ -364,10 +364,10 @@ EOF
     ac_nlist=conftest.nm
     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
       # See whether the symbols have a leading underscore.
-      if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
+      if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
         ac_cv_sys_symbol_underscore=yes
       else
-        if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
+        if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
          :
         else
          echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
index 604ba608716e4555e70882b0d59968877a8f0a5e..42126ea69c6d00fac201cfc6397212e0e7787953 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -119,7 +119,7 @@ o2lo="s/\\.${objext}\$/.lo/"
 # This seems to be the best place for them
 
 # Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument 
+# Has to be a shell function in order to 'eat' the argument
 # that is supplied when $file_magic_command is called.
 win32_libid () {
   win32_libid_type="unknown"
@@ -997,7 +997,7 @@ EOF
              # A libtool-controlled object.
 
              # Check to see that this really is a libtool object.
-             if (${SED} -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+             if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
                pic_object=
                non_pic_object=
 
@@ -1461,7 +1461,7 @@ EOF
        # A libtool-controlled object.
 
        # Check to see that this really is a libtool object.
-       if (${SED} -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+       if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
          pic_object=
          non_pic_object=
 
@@ -1817,7 +1817,8 @@ EOF
            if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
              case " $predeps $postdeps " in
              *" $deplib "*)
-               if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+               if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
                  library_names=
                  old_library=
                  case $lib in
@@ -1950,7 +1951,7 @@ EOF
        fi
 
        # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
        else
          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
          exit 1
@@ -3036,8 +3037,8 @@ EOF
                  *" $i "*)
                    newdeplibs="$newdeplibs $i"
                    i=""
-                   ;;             
-                 esac 
+                   ;;
+                 esac
                fi
                if test -n "$i" ; then
                  libname=`eval \\$echo \"$libname_spec\"`
@@ -3078,8 +3079,8 @@ EOF
                    *" $i "*)
                      newdeplibs="$newdeplibs $i"
                      i=""
-                     ;;             
-                   esac 
+                     ;;
+                   esac
                  fi
                  if test -n "$i" ; then
                    libname=`eval \\$echo \"$libname_spec\"`
@@ -3124,9 +3125,9 @@ EOF
                case " $predeps $postdeps " in
                *" $a_deplib "*)
                  newdeplibs="$newdeplibs $a_deplib"
-                 a_deplib=""    
-                 ;;             
-               esac 
+                 a_deplib=""
+                 ;;
+               esac
              fi
              if test -n "$a_deplib" ; then
                libname=`eval \\$echo \"$libname_spec\"`
@@ -3153,7 +3154,7 @@ EOF
                      done
                      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
                         | ${SED} 10q \
-                        | egrep "$file_magic_regex" > /dev/null; then
+                        | $EGREP "$file_magic_regex" > /dev/null; then
                        newdeplibs="$newdeplibs $a_deplib"
                        a_deplib=""
                        break 2
@@ -3193,9 +3194,9 @@ EOF
                case " $predeps $postdeps " in
                *" $a_deplib "*)
                  newdeplibs="$newdeplibs $a_deplib"
-                 a_deplib=""    
-                 ;;             
-               esac 
+                 a_deplib=""
+                 ;;
+               esac
              fi
              if test -n "$a_deplib" ; then
                libname=`eval \\$echo \"$libname_spec\"`
@@ -3205,7 +3206,7 @@ EOF
                    potlib="$potent_lib" # see symlink-check above in file_magic test
                    if eval echo \"$potent_lib\" 2>/dev/null \
                        | ${SED} 10q \
-                       | egrep "$match_pattern_regex" > /dev/null; then
+                       | $EGREP "$match_pattern_regex" > /dev/null; then
                      newdeplibs="$newdeplibs $a_deplib"
                      a_deplib=""
                      break 2
@@ -3425,8 +3426,8 @@ EOF
            done
            IFS="$save_ifs"
            if test -n "$export_symbols_regex"; then
-             $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-             $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+             $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
              $show "$mv \"${export_symbols}T\" \"$export_symbols\""
              $run eval '$mv "${export_symbols}T" "$export_symbols"'
            fi
@@ -3975,12 +3976,12 @@ extern \"C\" {
            done
 
            if test -n "$exclude_expsyms"; then
-             $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+             $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
              $run eval '$mv "$nlist"T "$nlist"'
            fi
 
            if test -n "$export_symbols_regex"; then
-             $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+             $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
              $run eval '$mv "$nlist"T "$nlist"'
            fi
 
@@ -4008,7 +4009,7 @@ extern \"C\" {
            test -f "$nlist" || : > "$nlist"
 
            if test -n "$exclude_expsyms"; then
-             egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+             $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
              $mv "$nlist"T "$nlist"
            fi
 
@@ -4855,7 +4856,7 @@ relink_command=\"$relink_command\""
 
       *.la)
        # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
        else
          $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
          $echo "$help" 1>&2
@@ -4916,7 +4917,7 @@ relink_command=\"$relink_command\""
          if $run eval "$relink_command"; then :
          else
            $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-           exit 1 
+           exit 1
          fi
        fi
 
@@ -5046,7 +5047,7 @@ relink_command=\"$relink_command\""
            wrapper=$file
            ;;
        esac
-       if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+       if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
          notinst_deplibs=
          relink_command=
 
@@ -5280,7 +5281,7 @@ relink_command=\"$relink_command\""
       case $file in
       *.la)
        # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
        else
          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
          $echo "$help" 1>&2
@@ -5351,7 +5352,7 @@ relink_command=\"$relink_command\""
       -*) ;;
       *)
        # Do a test to see if this is really a libtool program.
-       if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+       if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
          # If there is no directory component, then add one.
          case $file in
          */* | *\\*) . $file ;;
@@ -5460,7 +5461,7 @@ relink_command=\"$relink_command\""
       case $name in
       *.la)
        # Possibly a libtool archive, so verify it.
-       if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
          . $dir/$name
 
          # Delete the libtool libraries and symlinks.
@@ -5507,7 +5508,7 @@ relink_command=\"$relink_command\""
 
       *.lo)
        # Possibly a libtool object, so verify it.
-       if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 
          # Read the .lo file
          . $dir/$name
@@ -5529,7 +5530,7 @@ relink_command=\"$relink_command\""
       *)
        # Do a test to see if this is a libtool program.
        if test "$mode" = clean &&
-          (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+          (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
          relink_command=
          . $dir/$file
 
index 204be61c8595a4a4cc219794d525e27dcadd2afb..43e25303fe3b907a06fb45a3593eff3977ba78cf 100644 (file)
@@ -72,12 +72,13 @@ $(srcdir)/acinclude.m4:
 # Test programs to see what gets hardcoded.
 .PHONY: hardcode
 hardcode: $(hardcode_tests)
-SET_HARDCODE_FLAGS = eval `$(LIBTOOL) --config | egrep -e '^(hardcode_.*|wl)='`
+SET_HARDCODE_FLAGS = \
+  eval `$(LIBTOOL) --config | sed -n -e '/^hardcode_.*=/p; /^wl=/p'`
 hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
        @rm -f hc-direct
        @echo "You may ignore any linking errors from the following command:"
        @shlib=./$(objdir)/libhello.a; \
-         eval "`egrep '^library_names' libhello.la`"; \
+         eval "`grep '^library_names' libhello.la`"; \
          for lib in $$library_names; do \
            shlib="./$(objdir)/$$lib"; \
          done; \
index 9de7f8234e4b583eec7ce69f4eee53ea5fae1b59..b9704973fa0ae895d11f3550efd16ad542cd3313 100755 (executable)
@@ -12,7 +12,7 @@ fi
 . $srcdir/defs || exit 1
 
 # Check that test -e isn't used in our portable shell scripts.
-if egrep -n '[^         ]=[^    ].*(break|continue)' $srcdir/../ltmain.sh; then
+if $EGREP -n '[^        ]=[^    ].*(break|continue)' $srcdir/../ltmain.sh; then
   echo "cannot use \`break' or \`continue' on the same line as an assignment"
   exit 1
 fi
index ce4872341283198ac241ef08747d2b6bf5a3d4f7..015c8862d49ae5ff5ba434779cb8980e4686938a 100755 (executable)
@@ -19,7 +19,7 @@ fi
 
 # Check to make sure we have a dynamic library.
 library_names=NONE
-eval `egrep -e '^library_names=' ./libhello.la 2>/dev/null`
+eval `grep '^library_names=' ./libhello.la 2>/dev/null`
 
 if test "$library_names" = NONE; then
   echo "library_names not set in ../demo/libhello.la" 1>&2
@@ -31,35 +31,35 @@ fi
 
 # Unfortunately, we need access to libtool internals for this test.
 objdir=NONE
-eval `egrep -e '^objdir=' ./libtool 2>/dev/null`
+eval `grep '^objdir=' ./libtool 2>/dev/null`
 if test "$objdir" = NONE; then
   echo "objdir not set in ../demo/libtool" 1>&2
   exit 1
 fi
 
 shlibpath_overrides_runpath=NONE
-eval `egrep -e '^shlibpath_overrides_runpath=' ./libtool 2>/dev/null`
+eval `grep '^shlibpath_overrides_runpath=' ./libtool 2>/dev/null`
 if test "$shlibpath_overrides_runpath" = NONE; then
   echo "shlibpath_overrides_runpath not set in ../demo/libtool" 1>&2
   exit 1
 fi
 
 hardcode_action=NONE
-eval `egrep -e '^hardcode_action=' ./libtool 2>/dev/null`
+eval `grep '^hardcode_action=' ./libtool 2>/dev/null`
 if test "$hardcode_action" = NONE; then
   echo "hardcode_action not set in ../demo/libtool" 1>&2
   exit 1
 fi
 
 hardcode_direct=NONE
-eval `egrep -e '^hardcode_direct=' ./libtool 2>/dev/null`
+eval `grep '^hardcode_direct=' ./libtool 2>/dev/null`
 if test "$hardcode_direct" = NONE; then
   echo "hardcode_direct not set in ../demo/libtool" 1>&2
   exit 1
 fi
 
 hardcode_into_libs=NONE
-eval `egrep -e '^hardcode_into_libs=' ./libtool 2>/dev/null`
+eval `grep '^hardcode_into_libs=' ./libtool 2>/dev/null`
 if test "$hardcode_into_libs" = NONE; then
   echo "hardcode_into_libs not set in ../demo/libtool" 1>&2
   exit 1
index 52f940832dcb644c66f9ec0461672a86045c870e..d0e7c7257d03582b0f650d6c3d26a8d10f20ec70 100755 (executable)
@@ -20,7 +20,7 @@ fi
 
 # Check to make sure we have a dynamic library.
 library_names=NONE
-eval `egrep -e '^library_names=' ./l3/libl3.la 2>/dev/null`
+eval `grep '^library_names=' ./l3/libl3.la 2>/dev/null`
 
 if test "$library_names" = NONE; then
   echo "library_names not set in ../depdemo/l3/libl3.la" 1>&2
@@ -32,35 +32,35 @@ fi
 
 # Unfortunately, we need access to libtool internals for this test.
 objdir=NONE
-eval `egrep -e '^objdir=' ./libtool 2>/dev/null`
+eval `grep '^objdir=' ./libtool 2>/dev/null`
 if test "$objdir" = NONE; then
   echo "objdir not set in ../depdemo/libtool" 1>&2
   exit 1
 fi
 
 shlibpath_overrides_runpath=NONE
-eval `egrep -e '^shlibpath_overrides_runpath=' ./libtool 2>/dev/null`
+eval `grep '^shlibpath_overrides_runpath=' ./libtool 2>/dev/null`
 if test "$shlibpath_overrides_runpath" = NONE; then
   echo "shlibpath_overrides_runpath not set in ../depdemo/libtool" 1>&2
   exit 1
 fi
 
 hardcode_action=NONE
-eval `egrep -e '^hardcode_action=' ./libtool 2>/dev/null`
+eval `grep '^hardcode_action=' ./libtool 2>/dev/null`
 if test "$hardcode_action" = NONE; then
   echo "hardcode_action not set in ../depdemo/libtool" 1>&2
   exit 1
 fi
 
 hardcode_direct=NONE
-eval `egrep -e '^hardcode_direct=' ./libtool 2>/dev/null`
+eval `grep '^hardcode_direct=' ./libtool 2>/dev/null`
 if test "$hardcode_direct" = NONE; then
   echo "hardcode_direct not set in ../depdemo/libtool" 1>&2
   exit 1
 fi
 
 hardcode_into_libs=NONE
-eval `egrep -e '^hardcode_into_libs=' ./libtool 2>/dev/null`
+eval `grep '^hardcode_into_libs=' ./libtool 2>/dev/null`
 if test "$hardcode_into_libs" = NONE; then
   echo "hardcode_into_libs not set in ../depdemo/libtool" 1>&2
   exit 1
index 71928306a9c148b57557976857bcf693aff34f3e..27b49fb3a15fa4c50816772c71ebcbd2006784c0 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../cdemo (prefix=$prefix)"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index a70600d365dfa5fac4f637706a84c3a91fc8b8e4..b3d4a4706166ffff10a1e2889bdfa4aac692f39e 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-static"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-static || exit 1
 
-if egrep '^build_old_libs=no' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=no' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 1c6c490cd84852d1f958921d71e21eeab9c5b61c..225796bb604c7ac86bc37048e5db881501a66cd6 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-shared"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-shared || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=no' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=no' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 971091169f85b6bb61c57e2f5fd41cdfe700357e..d8a29e748789714deb2054629a9d7f55744204c8 100644 (file)
@@ -14,6 +14,17 @@ libtool="../libtool"
 make="${MAKE-make}"
 SHELL="${CONFIG_SHELL-/bin/sh}"
 
+if echo a | (grep -E '(a|b)') >/dev/null 2>&1; then
+  EGREP='grep -E'
+else
+  EGREP='egrep'
+fi
+if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1; then
+  FGREP='grep -F'
+else
+  FGREP='fgrep'
+fi
+
 prefix="./_inst"
 if test "$need_prefix" = yes; then
   # An absolute path to a test installation directory.
index 78e9d2cc5f514fe4baadd6061fc548fbdd585b3a..689732c2afe2d44dd705450ab038844a8c8cf646 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../demo (prefix=$prefix)"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 6e43ee502eb4ead8809ae3a86fd60a6158a1cb55..cd0ff2f4f2f7f3de86cad1fdec01deda09889417 100755 (executable)
@@ -32,7 +32,7 @@ else
   status=1
 fi
 
-if ../demo/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then :
+if ../demo/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then :
 else
   echo "$0: cannot execute ../demo/helldl" 1>&2
   status=1
index bd416bc9e653f8b7af5e954612120e0df44c4cd7..678fa6e35a15b1647b2674b550280291ccfb8a60 100755 (executable)
@@ -43,7 +43,7 @@ else
   status=1
 fi
 
-if $prefix/bin/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then :
+if $prefix/bin/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then :
 else
   echo "$0: cannot execute $prefix/bin/helldl" 1>&2
 
index 0606dbe23f4b6c247d2abd8706f5fb5637bc8e14..79ec2b16a65db2f63766671c3050ff5ed7e21ff1 100755 (executable)
@@ -27,7 +27,7 @@ rm -f config.cache
 echo "= Configuring in ../demo (prefix=$prefix)"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --enable-fast-install=no || exit 1
 
-if egrep '^hardcode_action=relink' libtool > /dev/null; then
+if grep '^hardcode_action=relink' libtool > /dev/null; then
   rm -f Makefile && exit 77
 fi
 
index 198c5ecfd48806aeda94a057c540c9cf92c221eb..c2425838a8b55d378226877da3721e1fc0e0cb84 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../demo (prefix=$prefix) with --disable-static"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-static || exit 1
 
-if egrep '^build_old_libs=no' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=no' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 0d376b448a7e568eb0ed36948dc1120dde8573af..442cce77082347ffedf8e3374c4804d514e7d408 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../demo (prefix=$prefix) with --disable-shared"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-shared || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=no' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=no' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 382508dbf7fddfc3ff82a6537ff9e1f7e852c78c..97e3e50d0b9d8e94c8a47d7515928f9d0c2e1ed1 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../depdemo (prefix=$prefix)"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --prefix=$prefix || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 9b27ac9ba2f82c5bc56dd24550d56c92a928f656..861b9e05f4f6d1d7e653f6988611f1aac5563589 100755 (executable)
@@ -27,7 +27,7 @@ rm -f config.cache
 echo "= Configuring in ../depdemo (prefix=$prefix)"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --prefix=$prefix --enable-fast-install=no || exit 1
 
-if egrep '^hardcode_action=relink' libtool > /dev/null; then
+if grep '^hardcode_action=relink' libtool > /dev/null; then
   rm -f Makefile && exit 77
 fi
 
index 4e6d58e61d0f6647eacc97297ee81a53897543e9..b2228e7f4e81edbbd6a51fd5f7e76b1537455c58 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../depdemo (prefix=$prefix) with --disable-static"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --prefix=$prefix --disable-static || exit 1
 
-if egrep '^build_old_libs=no' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=no' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 4d5dc3d06234e41b0ae4037af0fbb8f785ced469..24a187098f4a4e7585e3345a3d8132ee97d4cae2 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../depdemo (prefix=$prefix) with --disable-shared"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --prefix=$prefix --disable-shared || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=no' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=no' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 95c1a6e1fb9099dbcb89b9a0bae527d12ada5a5a..891b8df35f2b5532da42bad6499937ce351fa949 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../f77demo (prefix=$prefix)"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../f77demo/configure --srcdir=$srcdir/../f77demo --prefix=$prefix || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if $EGREP '^build_old_libs=yes' libtool > /dev/null &&
+   $EGREP '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 55b70d308a822501ae638b704e1c3aa7fec67ffb..5faa07de9ea842132dacb53a434e543af87845d5 100755 (executable)
@@ -10,7 +10,7 @@ if test -z "$srcdir"; then
 fi
 . $srcdir/defs || exit 1
 
-if test -f ../f77demo/fprogram -a -f ../f77demo/cprogram; then :
+if test -f ../f77demo/fprogram && test -f ../f77demo/cprogram; then :
 else
   echo "You must run f77demo-make.test before running $0" 1>&2
   exit 77
index 7a2ab1773aa602c5c5701df16801105020098e00..6363ac929cef7c5215984f7129e63fc8521bf4bc 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../f77demo (prefix=$prefix) with --disable-static"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../f77demo/configure --srcdir=$srcdir/../f77demo --prefix=$prefix --disable-static || exit 1
 
-if egrep '^build_old_libs=no' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if $EGREP '^build_old_libs=no' libtool > /dev/null &&
+   $EGREP '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 07d153a1ae7d5a7ee1ebb9510acaf47b12899f4b..2f145cdc00174277867125439be68f550dd5006f 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../f77demo (prefix=$prefix) with --disable-shared"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../f77demo/configure --srcdir=$srcdir/../f77demo --prefix=$prefix --disable-shared || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=no' libtool > /dev/null; then :
+if $EGREP '^build_old_libs=yes' libtool > /dev/null &&
+   $EGREP '^build_libtool_libs=no' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index c01a0b3b64866f0474c011e865834b7443b25271..f264e03bda2f22f3e0082aadbd8207269064242f 100755 (executable)
@@ -19,7 +19,7 @@ fi
 
 # Unfortunately, we need access to libtool internals for this test.
 objdir=NONE
-eval `egrep -e '^objdir=' ./libtool 2>/dev/null`
+eval `grep '^objdir=' ./libtool 2>/dev/null`
 if test "$objdir" = NONE; then
   echo "objdir not set in ../demo/libtool" 1>&2
   exit 1
@@ -27,7 +27,7 @@ fi
 
 # Check to make sure we have a dynamic library.
 library_names=NONE
-eval `egrep -e '^library_names=' ./libhello.la 2>/dev/null`
+eval `grep '^library_names=' ./libhello.la 2>/dev/null`
 
 if test "$library_names" = NONE; then
   echo "library_names not set in ../demo/libhello.la" 1>&2
@@ -48,7 +48,7 @@ hardcode_shlibpath_var=NONE
 hardcode_libdir_flag_spec=NONE
 
 # Suck in all the hardcode_* variable settings.
-eval `./libtool --config | egrep -e '^hardcode_' 2>/dev/null`
+eval `./libtool --config | grep '^hardcode_' 2>/dev/null`
 
 if test "$hardcode_direct" = NONE; then
   echo "hardcode_direct not set in ../demo/libtool" 1>&2
@@ -101,12 +101,12 @@ for file in hc-*; do
   # AIX fgrep also has a limited line length, so we turn unprintable
   # characters into newlines.
   if cat $file | (tr '\000-\037\200-\377' '\n' || cat) 2>/dev/null \
-              | fgrep "$objdir" > /dev/null 2>&1; then
+              | $FGREP "$objdir" > /dev/null 2>&1; then
     hardcoded=yes
-  elif fgrep "$objdir" $file > /dev/null 2>&1; then
+  elif $FGREP "$objdir" $file > /dev/null 2>&1; then
     # We retry fgrep without tr, in case the above lead to a false negative.
     hardcoded=yes
-  elif (sed -e '1!d' $file | egrep 'unsupported') >/dev/null 2>&1; then
+  elif (sed -e '1!d' $file | grep 'unsupported') >/dev/null 2>&1; then
     hardcoded=unsupported
   fi
 
index 4b46e203499169e3b0c7b5fc761b9801122beab8..39ef1c9c5e9c91d2e9022c49b12bff9cf62778b4 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../mdemo (prefix=$prefix)"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 16b05a28a88312a69dbcc591ec46eb4ea5c93d60..9ece0f9aa056b5e29f36ae2c020403c6799be2c8 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-static"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-static || exit 1
 
-if egrep '^build_old_libs=no' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=no' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 981516c09a76b3baee2f13a229b364905088b0e6..e17268d7d4b8329fd281423c1b0b18175704147e 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-shared"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-shared || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=no' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=no' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 312dde5251552c1f1d615e7faee2bd014450f601..67662b6566a658e7150ea34945b7134e12805d73 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../pdemo (prefix=$prefix)"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../pdemo/configure --srcdir=$srcdir/../pdemo --prefix=$prefix || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 9aff5460fd691ae3f5945a73be672e30f21b8a68..9b03fe5af32e59945b6d94dfad180a228a867e00 100755 (executable)
@@ -32,7 +32,7 @@ else
   status=1
 fi
 
-if ../pdemo/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then :
+if ../pdemo/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then :
 else
   echo "$0: cannot execute ../pdemo/helldl" 1>&2
   status=1
index a23d8a57867bf2837d2752ac2a62e921fac438e5..d7cec539873838042d157a873a3444a902e56fad 100755 (executable)
@@ -43,7 +43,7 @@ else
   status=1
 fi
 
-if $prefix/bin/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then :
+if $prefix/bin/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then :
 else
   echo "$0: cannot execute $prefix/bin/helldl" 1>&2
 
index 8d3997538f1b6ff3a9f04444b74f34fb90108671..95907442b238953708cbee8a5fe1e5bb32207166 100755 (executable)
@@ -15,61 +15,61 @@ status=0
 scripts="$srcdir/../ltmain.sh"
 
 # Check for bad binary operators.
-if egrep -n -e "if[    ]+[\"']?\\$.*(=|-[lg][te]|-eq|-ne)" $scripts; then
+if $EGREP -n -e "if[   ]+[\"']?\\$.*(=|-[lg][te]|-eq|-ne)" $scripts; then
   echo "use \`if test \$something =' instead of \`if \$something ='"
   status=1
 fi
 
 # Check for bad unary operators.
-if egrep -n -e 'if[    ]+-' $scripts; then
+if $EGREP -n -e 'if[   ]+-' $scripts; then
   echo "use \`if test -X' instead of \`if -X'"
   status=1
 fi
 
 # Check for using `[' instead of `test'.
-if egrep -n -e 'if[    ]+\[' $scripts; then
+if $EGREP -n -e 'if[   ]+\[' $scripts; then
   echo "use \`if test' instead of \`if ['"
   status=1
 fi
 
-if egrep -n -e 'test[  ]+(![   ])?(-.[         ]+)?"?[.,_x]' $scripts; then
+if $EGREP -n -e 'test[         ]+(![   ])?(-.[         ]+)?"?[.,_x]' $scripts; then
   echo "use \`test \"X...\"' instead of \`test \"x...\"'"
   status=1
 fi
 
 # Check for using test X... instead of test "X...
-if egrep -n -e 'test[  ]+(![   ])?(-.[         ]+)?X' $scripts; then
+if $EGREP -n -e 'test[         ]+(![   ])?(-.[         ]+)?X' $scripts; then
   echo "use \`test \"X...\"' instead of \`test X'"
   status=1
 fi
 
 # Check for using test $... instead of test "$...
-if egrep -n -e 'test[  ]+(![   ])?(-.[         ]+)?X?\$' $scripts; then
+if $EGREP -n -e 'test[         ]+(![   ])?(-.[         ]+)?X?\$' $scripts; then
   echo "use \`test \"\$...\"' instead of \`test \$'"
   status=1
 fi
 
 # Never use test -e.
-if egrep -n -e 'test[  ]+(![   ])?-e' $scripts; then
+if $EGREP -n -e 'test[         ]+(![   ])?-e' $scripts; then
   echo "use \`test -f' instead of \`test -e'"
   status=1
 fi
 
 # Check for problems with variable assignments.
-if egrep -n -e '[^      ]=[^    ].*(break|continue)' $scripts; then
+if $EGREP -n -e '[^     ]=[^    ].*(break|continue)' $scripts; then
   echo "assignments on the same line as a \`break' or \`continue' may have no effect"
   status=1
 fi
 
 # Check for uses of Xsed without corresponding echo "X
-if egrep -n -e '\$Xsed' $scripts | egrep -v -n -e '\$echo \\*"X'; then
+if $EGREP -n -e '\$Xsed' $scripts | $EGREP -v -n -e '\$echo \\*"X'; then
   echo "occurrences of \`\$Xsed\' without \`echo \"X\' on the same line"
   status=1
 fi
 
 # Check for quotes within backquotes within quotes "`"bar"`"
-if egrep -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | \
-   egrep -v "### testsuite: skip nested quoting test$"; then
+if $EGREP -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | \
+   $EGREP -v "### testsuite: skip nested quoting test$"; then
   echo "nested quotes are dangerous"
   status=1
 fi
index 807346f70338a68908df62c60ec227d268414989..fc40052da5f6a9e73feaca40b2df292f9b322df0 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../tagdemo (prefix=$prefix)"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../tagdemo/configure --srcdir=$srcdir/../tagdemo --prefix=$prefix || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 79d696d817d6ebcc819d2eaf81657e5e8dd6929b..d464bbc55bc44e948aa5d2fa03e355cfb58797a4 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../tagdemo (prefix=$prefix) with --disable-static"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../tagdemo/configure --srcdir=$srcdir/../tagdemo --prefix=$prefix --disable-static || exit 1
 
-if egrep '^build_old_libs=no' libtool > /dev/null &&
-   egrep '^build_libtool_libs=yes' libtool > /dev/null; then :
+if grep '^build_old_libs=no' libtool > /dev/null &&
+   grep '^build_libtool_libs=yes' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi
 
index 075fe3bd9213b756b42ba4bb91098986f4b86ae7..792cb2917ab47f30a336520b99b448092d452a78 100755 (executable)
@@ -27,8 +27,8 @@ rm -f config.cache
 echo "= Configuring in ../tagdemo (prefix=$prefix) with --disable-shared"
 CONFIG_SITE=/nonexistent ${CONFIG_SHELL-/bin/sh} $srcdir/../tagdemo/configure --srcdir=$srcdir/../tagdemo --prefix=$prefix --disable-shared || exit 1
 
-if egrep '^build_old_libs=yes' libtool > /dev/null &&
-   egrep '^build_libtool_libs=no' libtool > /dev/null; then :
+if grep '^build_old_libs=yes' libtool > /dev/null &&
+   grep '^build_libtool_libs=no' libtool > /dev/null; then :
 else rm -f Makefile && exit 77
 fi