[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool support for hosts with strict "grep", "test"
From: |
Alexandre Duret-Lutz |
Subject: |
Re: libtool support for hosts with strict "grep", "test" |
Date: |
Thu, 10 Jul 2003 23:35:03 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
[Following up to an old thread.]
>>> "Akim" == Akim Demaille <address@hidden> writes:
Akim> 2002-10-23 Paul Eggert <address@hidden>
[...]
Akim> * libtool.m4 (AC_PROG_EGREP):
Akim> New macro, defined if Autoconf doesn't define.
[...]
Akim> Installed.
+# 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])
+])])
When the installed libtool.m4 contains this code, aclocal will
detect the AC_DEFUNition of AC_PROG_EGREP and include a copy of
libtool.m4 in any project using AC_PROG_EGREP.
I don't really see how aclocal could be fixed, so I suggest
disguising the call to AC_DEFUN (maybe using indir? aclocal
expects an opening parenthesis right after a macro name) or its
argument.
BTW, when will Libtool stop supporting Autoconf < 2.54 ?
--
Alexandre Duret-Lutz
- Re: libtool support for hosts with strict "grep", "test",
Alexandre Duret-Lutz <=