mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] configure: fix regex for determining host tool versions
Date: Fri, 24 Jan 2020 17:30:27 +0100	[thread overview]
Message-ID: <20200124163027.GA15722@pengutronix.de> (raw)
In-Reply-To: <20200107184021.4649-1-christian.hermann@hytera.de>

On Tue, Jan 07, 2020 at 07:40:21PM +0100, Christian Hermann wrote:
> Previously, all of those _VERSION were empty on my system
> 
> Signed-off-by: Christian Hermann <christian.hermann@hytera.de>
> ---
>  configure.ac | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 0549c38da..db2d85f77 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -160,7 +160,7 @@ if test -z "$SED"; then
>  fi
>  
>  AC_MSG_CHECKING([sed version])
> -SED_VERSION=`$SED --version 2>/dev/null | $SED -ne "1 s/.*GNU.*\s\([[0-9\+\.]]\+\).*/\1/p"`
> +SED_VERSION=`$SED --version 2>/dev/null | $SED -ne "1 s/.*GNU.*\s\([0-9\+\.]\+\).*/\1/p"`

This makes no sense. The '[' must be escaped for m4. How does this line
look like in the generated configure script for you? (with and without this
change).

Michael

>  case "$SED_VERSION" in
>  3.*) AC_MSG_ERROR([we need at least GNU sed 4.x but found $SED_VERSION]) ;;
>  4.*) ;;
> @@ -209,7 +209,7 @@ dnl Check for awk
>  AC_PROG_AWK
>  AC_PATH_PROGS(AWK, ${AWK},)
>  AC_MSG_CHECKING([awk version])
> -AWK_VERSION=`$AWK --version 2>/dev/null | $SED -ne "s/GNU [[Aa]]wk \([[0-9\.]]*\)/\1/p"`
> +AWK_VERSION=`$AWK --version 2>/dev/null | $SED -ne "s/GNU [Aa]wk \([0-9\.]*\)/\1/p"`
>  case "$AWK_VERSION" in
>  "") AC_MSG_ERROR([we need GNU awk]) ;;
>  *)  ;;
> @@ -242,7 +242,7 @@ else
>  fi
>  
>  AC_MSG_CHECKING([yacc/bison version])
> -YACC_VERSION=`$YACC --version 2>/dev/null | $SED -ne "s/.*GNU Bison.* \([[0-9.]]*\).*/\1/p"`
> +YACC_VERSION=`$YACC --version 2>/dev/null | $SED -ne "s/.*GNU Bison.* \([0-9.]*\).*/\1/p"`
>  case "${YACC_VERSION}" in
>       1.*)
>       AC_MSG_ERROR([$YACC_VERSION, your bison version is too old, install 2.3 or sth. like that]) ;;
> @@ -283,7 +283,7 @@ if test -z "$WGET"; then
>  fi
>  
>  AC_MSG_CHECKING([find version])
> -FIND_VERSION=`$GNU_find --version 2>/dev/null | $SED -ne "s/.*\s\+\([[0-9]]\+\.[[0-9]]\+\.[[0-9]]\+\).*$/\1/p"`
> +FIND_VERSION=`$GNU_find --version 2>/dev/null | $SED -ne "s/.*\s\+\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/p"`
>  case "$FIND_VERSION" in
>  4.*) ;;
>  *)   AC_MSG_ERROR([we need at least GNU find 4.x]) ;;
> @@ -295,7 +295,7 @@ AC_PATH_PROGS(MAKE, gmake gnumake make,, $PATH)
>  if test -z "$MAKE"; then
>  	AC_MSG_ERROR([make could not be found, please install])
>  fi
> -MAKE_VERSION=`$MAKE --version 2>/dev/null | $SED -ne "s/^GNU Make \([[0-9]]\+\.[[0-9.]]\+\).*$/\1/p"`
> +MAKE_VERSION=`$MAKE --version 2>/dev/null | $SED -ne "s/^GNU Make \([0-9]\+\.[0-9.]\+\).*$/\1/p"`
>  MINOR_MAKE_VERSION="${MAKE_VERSION#*.}"
>  MAJOR_MAKE_VERSION="${MAKE_VERSION%.*}"
>  if test -z "${MAJOR_MAKE_VERSION}"  -o -z "${MINOR_MAKE_VERSION}" ; then
> @@ -347,7 +347,7 @@ dnl
>  dnl Check for Python 2.x
>  dnl
>  AC_MSG_CHECKING([Python version])
> -PYTHON_VERSION=`$PYTHON --version 2>&1 | $SED -ne "1 s/Python \([[0-9\+\.]]\+\).*/\1/p"`
> +PYTHON_VERSION=`$PYTHON --version 2>&1 | $SED -ne "1 s/Python \([0-9\+\.]\+\).*/\1/p"`
>  case "$PYTHON_VERSION" in
>  2.*) ;;
>  *)   AC_MSG_ERROR([we need Python version 2.x but found $PYTHON_VERSION]) ;;
> -- 
> 2.24.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2020-01-24 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 18:40 Christian Hermann
2020-01-24 16:30 ` Michael Olbrich [this message]
2020-01-29 15:59   ` Christian Hermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200124163027.GA15722@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox