Bruno Haible <[EMAIL PROTECTED]> wrote: >> - grep '^[ ]*A[CM]_PROG_LIBTOOL\>' configure.ac >/dev/null || >> + grep -E '^[ ]*(LT_INIT|A[CM]_PROG_LIBTOOL)\>' configure.ac >> >/dev/null || > > Solaris 9 'grep' does not support the '-E' option. This is documented in the > autoconf manual: > > Traditional `grep' implementations (e.g., Solaris) do not support > the `-E' or `-F' options. To work around these problems, invoke > `AC_PROG_EGREP' and then use `$EGREP', and similarly for > `AC_PROG_FGREP' and `$FGREP'. > > In a script like this, where you cannot rely on AC_PROG_EGREP either, I would > just grep configure.ac twice, with two different basic regular expressions.
Unfortunate, but true. Thanks. How about this? >From 785dc8ba76a688c5746d230dc5b7d4102d42ab4c Mon Sep 17 00:00:00 2001 From: Jim Meyering <[EMAIL PROTECTED]> Date: Sun, 5 Oct 2008 17:49:55 +0200 Subject: [PATCH] bootstrap: check for LT_INIT more portably * build-aux/bootstrap: Avoid using grep -E, since it's not portable enough. Suggestion from Bruno Haible. --- ChangeLog | 6 ++++++ build-aux/bootstrap | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9094a52..bbc3db5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-05 Jim Meyering <[EMAIL PROTECTED]> + + bootstrap: check for LT_INIT more portably + * build-aux/bootstrap: Avoid using grep -E, since it's not + portable enough. Suggestion from Bruno Haible. + 2008-10-05 Bruno Haible <[EMAIL PROTECTED]> * doc/posix-headers/sys_select.texi: Mention 'struct timeval' problem diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 74573ef..1ad154f 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -597,8 +597,16 @@ for command in \ 'automake --add-missing --copy --force-missing'; do if test "$command" = libtool; then - grep -E '^[ ]*(LT_INIT|A[CM]_PROG_LIBTOOL)\>' configure.ac >/dev/null || - continue + use_libtool=0 + # We'd like to use grep -E, to see if any of LT_INIT, + # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, + # but that's not portable enough (e.g., for Solaris). + grep '^[ ]*A[CM]_PROG_LIBTOOL\>' configure.ac >/dev/null \ + && use_libtool=1 + grep '^[ ]*LT_INIT\>' configure.ac >/dev/null \ + && use_libtool=1 + test $use_libtool = 0 \ + && continue command='libtoolize -c -f' fi echo "$0: $command ..." -- 1.6.0.2.307.gc427