From 757646d28bc6985ce6ce4bb14b76119795177b3a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 19 Nov 2002 09:42:39 +0000 Subject: [PATCH] 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 && --- ChangeLog | 55 +++++++++++++++- THANKS | 63 ++++++++++--------- demo/Makefile.am | 5 +- doc/libtool.texi | 2 +- libtool.m4 | 129 +++++++++++++++++++++++--------------- libtoolize.in | 10 +-- ltdl.m4 | 4 +- ltmain.in | 61 +++++++++--------- pdemo/Makefile.am | 5 +- tests/assign.test | 2 +- tests/build-relink.test | 12 ++-- tests/build-relink2.test | 12 ++-- tests/cdemo-conf.test | 4 +- tests/cdemo-shared.test | 4 +- tests/cdemo-static.test | 4 +- tests/defs | 11 ++++ tests/demo-conf.test | 4 +- tests/demo-exec.test | 2 +- tests/demo-inst.test | 2 +- tests/demo-nofast.test | 2 +- tests/demo-shared.test | 4 +- tests/demo-static.test | 4 +- tests/depdemo-conf.test | 4 +- tests/depdemo-nofast.test | 2 +- tests/depdemo-shared.test | 4 +- tests/depdemo-static.test | 4 +- tests/f77demo-conf.test | 4 +- tests/f77demo-exec.test | 2 +- tests/f77demo-shared.test | 4 +- tests/f77demo-static.test | 4 +- tests/hardcode.test | 12 ++-- tests/mdemo-conf.test | 4 +- tests/mdemo-shared.test | 4 +- tests/mdemo-static.test | 4 +- tests/pdemo-conf.test | 4 +- tests/pdemo-exec.test | 2 +- tests/pdemo-inst.test | 2 +- tests/sh.test | 22 +++---- tests/tagdemo-conf.test | 4 +- tests/tagdemo-shared.test | 4 +- tests/tagdemo-static.test | 4 +- 41 files changed, 295 insertions(+), 200 deletions(-) diff --git a/ChangeLog b/ChangeLog index de7b65247..7f9746bef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,52 @@ +2002-11-19 Paul Eggert + + 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 * ltmain.in: When using gcc, pass -mfoo to the linker @@ -195,7 +244,7 @@ 2002-10-15 Charles Wilson - * 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 @@ -281,8 +330,8 @@ * 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 diff --git a/THANKS b/THANKS index 6719164de..60bbf8d7e 100644 --- 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 -Albert Chin-A-Young -Andrey Slepuhin -Bruno Haible -Carl D. Roth -Charles S. Wilson -Chris P. Ross -DJ Delorie -Edouard G. Parmelan -Eric Estievenart -Erez Zadok -H.J. Lu -Ian Lance Taylor -Joel N. Weber II -Joseph Beckenbach III -Kenneth Albanowski -Kurt D. Zeilenga -Manfred Weichel -Marc J. Fraioli -Mark Kettenis -Ossama Othman -Olly Betts -Pavel Roskin -Robert Collins -Sebastian Wilhelmi -Stephan Kulow -Steven M. Schultz -Todd Vierling -Tom Tmemey -Ulrich Drepper -Xavier Pianet +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 diff --git a/demo/Makefile.am b/demo/Makefile.am index 02340faf6..68ae80895 100644 --- a/demo/Makefile.am +++ b/demo/Makefile.am @@ -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; \ diff --git a/doc/libtool.texi b/doc/libtool.texi index f9735df9c..b12acb9cf 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -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. diff --git a/libtool.m4 b/libtool.m4 index bbd46d678..3e001a5a2 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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 <&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 &1 &5; then +if $LD -v 2>&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 < 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 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 <&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' diff --git a/libtoolize.in b/libtoolize.in index f2beeea74..b4aaf9436 100644 --- a/libtoolize.in +++ b/libtoolize.in @@ -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 53f99e6c3..26fb06680 100644 --- 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 diff --git a/ltmain.in b/ltmain.in index 604ba6087..42126ea69 100644 --- 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 diff --git a/pdemo/Makefile.am b/pdemo/Makefile.am index 204be61c8..43e25303f 100644 --- a/pdemo/Makefile.am +++ b/pdemo/Makefile.am @@ -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; \ diff --git a/tests/assign.test b/tests/assign.test index 9de7f8234..b9704973f 100755 --- a/tests/assign.test +++ b/tests/assign.test @@ -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 diff --git a/tests/build-relink.test b/tests/build-relink.test index ce4872341..015c8862d 100755 --- a/tests/build-relink.test +++ b/tests/build-relink.test @@ -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 diff --git a/tests/build-relink2.test b/tests/build-relink2.test index 52f940832..d0e7c7257 100755 --- a/tests/build-relink2.test +++ b/tests/build-relink2.test @@ -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 diff --git a/tests/cdemo-conf.test b/tests/cdemo-conf.test index 71928306a..27b49fb3a 100755 --- a/tests/cdemo-conf.test +++ b/tests/cdemo-conf.test @@ -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 diff --git a/tests/cdemo-shared.test b/tests/cdemo-shared.test index a70600d36..b3d4a4706 100755 --- a/tests/cdemo-shared.test +++ b/tests/cdemo-shared.test @@ -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 diff --git a/tests/cdemo-static.test b/tests/cdemo-static.test index 1c6c490cd..225796bb6 100755 --- a/tests/cdemo-static.test +++ b/tests/cdemo-static.test @@ -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 diff --git a/tests/defs b/tests/defs index 971091169..d8a29e748 100644 --- a/tests/defs +++ b/tests/defs @@ -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. diff --git a/tests/demo-conf.test b/tests/demo-conf.test index 78e9d2cc5..689732c2a 100755 --- a/tests/demo-conf.test +++ b/tests/demo-conf.test @@ -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 diff --git a/tests/demo-exec.test b/tests/demo-exec.test index 6e43ee502..cd0ff2f4f 100755 --- a/tests/demo-exec.test +++ b/tests/demo-exec.test @@ -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 diff --git a/tests/demo-inst.test b/tests/demo-inst.test index bd416bc9e..678fa6e35 100755 --- a/tests/demo-inst.test +++ b/tests/demo-inst.test @@ -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 diff --git a/tests/demo-nofast.test b/tests/demo-nofast.test index 0606dbe23..79ec2b16a 100755 --- a/tests/demo-nofast.test +++ b/tests/demo-nofast.test @@ -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 diff --git a/tests/demo-shared.test b/tests/demo-shared.test index 198c5ecfd..c2425838a 100755 --- a/tests/demo-shared.test +++ b/tests/demo-shared.test @@ -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 diff --git a/tests/demo-static.test b/tests/demo-static.test index 0d376b448..442cce770 100755 --- a/tests/demo-static.test +++ b/tests/demo-static.test @@ -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 diff --git a/tests/depdemo-conf.test b/tests/depdemo-conf.test index 382508dbf..97e3e50d0 100755 --- a/tests/depdemo-conf.test +++ b/tests/depdemo-conf.test @@ -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 diff --git a/tests/depdemo-nofast.test b/tests/depdemo-nofast.test index 9b27ac9ba..861b9e05f 100755 --- a/tests/depdemo-nofast.test +++ b/tests/depdemo-nofast.test @@ -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 diff --git a/tests/depdemo-shared.test b/tests/depdemo-shared.test index 4e6d58e61..b2228e7f4 100755 --- a/tests/depdemo-shared.test +++ b/tests/depdemo-shared.test @@ -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 diff --git a/tests/depdemo-static.test b/tests/depdemo-static.test index 4d5dc3d06..24a187098 100755 --- a/tests/depdemo-static.test +++ b/tests/depdemo-static.test @@ -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 diff --git a/tests/f77demo-conf.test b/tests/f77demo-conf.test index 95c1a6e1f..891b8df35 100755 --- a/tests/f77demo-conf.test +++ b/tests/f77demo-conf.test @@ -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 diff --git a/tests/f77demo-exec.test b/tests/f77demo-exec.test index 55b70d308..5faa07de9 100755 --- a/tests/f77demo-exec.test +++ b/tests/f77demo-exec.test @@ -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 diff --git a/tests/f77demo-shared.test b/tests/f77demo-shared.test index 7a2ab1773..6363ac929 100755 --- a/tests/f77demo-shared.test +++ b/tests/f77demo-shared.test @@ -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 diff --git a/tests/f77demo-static.test b/tests/f77demo-static.test index 07d153a1a..2f145cdc0 100755 --- a/tests/f77demo-static.test +++ b/tests/f77demo-static.test @@ -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 diff --git a/tests/hardcode.test b/tests/hardcode.test index c01a0b3b6..f264e03bd 100755 --- a/tests/hardcode.test +++ b/tests/hardcode.test @@ -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 diff --git a/tests/mdemo-conf.test b/tests/mdemo-conf.test index 4b46e2034..39ef1c9c5 100755 --- a/tests/mdemo-conf.test +++ b/tests/mdemo-conf.test @@ -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 diff --git a/tests/mdemo-shared.test b/tests/mdemo-shared.test index 16b05a28a..9ece0f9aa 100755 --- a/tests/mdemo-shared.test +++ b/tests/mdemo-shared.test @@ -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 diff --git a/tests/mdemo-static.test b/tests/mdemo-static.test index 981516c09..e17268d7d 100755 --- a/tests/mdemo-static.test +++ b/tests/mdemo-static.test @@ -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 diff --git a/tests/pdemo-conf.test b/tests/pdemo-conf.test index 312dde525..67662b656 100755 --- a/tests/pdemo-conf.test +++ b/tests/pdemo-conf.test @@ -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 diff --git a/tests/pdemo-exec.test b/tests/pdemo-exec.test index 9aff5460f..9b03fe5af 100755 --- a/tests/pdemo-exec.test +++ b/tests/pdemo-exec.test @@ -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 diff --git a/tests/pdemo-inst.test b/tests/pdemo-inst.test index a23d8a578..d7cec5398 100755 --- a/tests/pdemo-inst.test +++ b/tests/pdemo-inst.test @@ -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 diff --git a/tests/sh.test b/tests/sh.test index 8d3997538..95907442b 100755 --- a/tests/sh.test +++ b/tests/sh.test @@ -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 diff --git a/tests/tagdemo-conf.test b/tests/tagdemo-conf.test index 807346f70..fc40052da 100755 --- a/tests/tagdemo-conf.test +++ b/tests/tagdemo-conf.test @@ -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 diff --git a/tests/tagdemo-shared.test b/tests/tagdemo-shared.test index 79d696d81..d464bbc55 100755 --- a/tests/tagdemo-shared.test +++ b/tests/tagdemo-shared.test @@ -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 diff --git a/tests/tagdemo-static.test b/tests/tagdemo-static.test index 075fe3bd9..792cb2917 100755 --- a/tests/tagdemo-static.test +++ b/tests/tagdemo-static.test @@ -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 -- 2.47.2