From: Remi Collet Date: Fri, 10 Jan 2014 15:13:08 +0000 (+0100) Subject: Fix with old autotools (RHEL-5) X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c8042b1f4a6678d02111985f1e429b5e163b3694;p=m6w6%2Fext-ircclient Fix with old autotools (RHEL-5) --- diff --git a/config.m4 b/config.m4 index 8b5953b..9b8d3f6 100644 --- a/config.m4 +++ b/config.m4 @@ -2,8 +2,8 @@ PHP_ARG_WITH(ircclient, for ircclient support, [ --with-ircclient[=LIBIRCCLIENTDIR] Include ircclient support]) if test "$PHP_IRCCLIENT" != "no"; then - AC_PROG_EGREP - AC_PROG_SED + AC_PATH_PROG(GREP, grep, no) + AC_PATH_PROG(SED, sed, no) AC_MSG_CHECKING([for libircclient.h]) for d in $PHP_IRCCLIENT /usr /usr/local /opt; do @@ -24,9 +24,9 @@ if test "$PHP_IRCCLIENT" != "no"; then AC_MSG_ERROR([not found]) fi AC_MSG_CHECKING([libircclient version]) - if test -f "$IRCCLIENT_INCDIR/libirc_params.h"; then - PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH=`$EGREP "define LIBIRC_VERSION_HIGH" $IRCCLIENT_INCDIR/libirc_params.h | $SED -e 's/[[^0-9\x]]//g'` - PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_LOW=`$EGREP "define LIBIRC_VERSION_LOW" $IRCCLIENT_INCDIR/libirc_params.h | $SED -e 's/[[^0-9\x]]//g'` + if test -x $GREP && test -x $SED && test -f "$IRCCLIENT_INCDIR/libirc_params.h"; then + PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH=`$GREP "define LIBIRC_VERSION_HIGH" $IRCCLIENT_INCDIR/libirc_params.h | $SED -e 's/[[^0-9\x]]//g'` + PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_LOW=`$GREP "define LIBIRC_VERSION_LOW" $IRCCLIENT_INCDIR/libirc_params.h | $SED -e 's/[[^0-9\x]]//g'` AC_MSG_RESULT([$PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH $PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_LOW]) else PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH=0