From c5d91aff481c815376776a9878ae3cd4e103ec8f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 21 Jan 2008 17:04:40 +0000 Subject: [PATCH] Address bug #10839. --- configure.ac | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 531e42c7450..f7c55ee7029 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,20 @@ AM_INIT_AUTOMAKE([1.9 tar-ustar foreign]) AM_GNU_GETTEXT([external]) AC_PROG_RANLIB +####################################################################### +# Require GCC 4.x +####################################################################### + +set -- `g++ --version` +GCC_VERSION=$3 +parts=`echo $GCC_VERSION | tr '.' ' '` +set $parts +GCC_MAJOR_VERSION=$1 +if test $GCC_MAJOR_VERSION -lt 4 +then + AC_MSG_ERROR([*** G++ major version $GCC_MAJOR_VERSION is too old.]) +fi + ####################################################################### # Configuration options # ####################################################################### @@ -135,7 +149,7 @@ if test "x$optipng" = "xyes" then AC_PATH_PROGS([OPTIPNG_BIN], [optipng], [none]) if test \( "x$OPTIPNG_BIN" = "xnone" \) -a \( "x$optipng" = xyes \); then - AC_MSG_ERROR([*** You must instsll the optipng utility before building with --optipng.]) + AC_MSG_ERROR([*** You must install the optipng utility before building with --optipng.]) else echo "****************************************" echo "*** optipng support enabled ***"