+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>
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
# 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; \
@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.
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
# 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
AC_LIBTOOL_LANG_CXX_CONFIG
;;
- F77)
+ F77)
AC_LIBTOOL_LANG_F77_CONFIG
;;
])# 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
[[\\/*] | ?:[\\/]*])
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
# 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"
# 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
# '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.
# 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"
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
# 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'
# 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)=
# 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
_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
# 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
# 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'
_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
# 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
# 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
# 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
# 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'
# 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.
# 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'
_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"
# 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 \
# 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)
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
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" {
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'
# 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'.
;;
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
_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
;;
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
*** 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
;;
*)
- 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
_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)=
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'
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/'`
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
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'`
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'`
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
# 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"
# 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=
# 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=
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
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
*" $i "*)
newdeplibs="$newdeplibs $i"
i=""
- ;;
- esac
+ ;;
+ esac
fi
if test -n "$i" ; then
libname=`eval \\$echo \"$libname_spec\"`
*" $i "*)
newdeplibs="$newdeplibs $i"
i=""
- ;;
- esac
+ ;;
+ esac
fi
if test -n "$i" ; then
libname=`eval \\$echo \"$libname_spec\"`
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\"`
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
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\"`
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
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
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
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
*.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
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
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=
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
-*) ;;
*)
# 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 ;;
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.
*.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
*)
# 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
# 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; \
. $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
# 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
# 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
# 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
# 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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
# 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
# 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
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
# 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
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
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
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
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
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
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
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
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
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
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