From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Wcr1D-0000h4-4Q for ptxdist@pengutronix.de; Wed, 23 Apr 2014 08:50:55 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1Wcr1E-00022f-BN for ptxdist@pengutronix.de; Wed, 23 Apr 2014 08:50:56 +0200 Date: Wed, 23 Apr 2014 08:50:56 +0200 From: Michael Olbrich Message-ID: <20140423065056.GA3804@pengutronix.de> References: <1398118166-4200-1-git-send-email-andreas@biessmann.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1398118166-4200-1-git-send-email-andreas@biessmann.de> Subject: Re: [ptxdist] [PATCH] configure: consolidate compiler checks Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Tue, Apr 22, 2014 at 12:09:26AM +0200, Andreas Bie=DFmann wrote: > Remove redundant check for GCC and move compiler checks to the beginning. > Before the AC_HEADERS_STDC checked for compilers implicitly and later on = we > checked again explicitly for them. > = > Signed-off-by: Andreas Bie=DFmann > --- > configure.ac | 26 +++++++++++--------------- > 1 file changed, 11 insertions(+), 15 deletions(-) > = > diff --git a/configure.ac b/configure.ac > index 390fcaf..c33cbb4 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -23,6 +23,17 @@ else > AC_MSG_ERROR([install the ptxdist-patches archive into the same directo= ry as ptxdist.]) > fi > = > +dnl > +dnl Check for C and C++ compilers > +dnl > +AC_PROG_CC > +if test -z "$CC"; then > + AC_MSG_ERROR([gcc could not be found, please install]) > +fi > +AC_PROG_CXX > +if test -z "$CXX"; then > + AC_MSG_ERROR([g++ could not be found, please install]) > +fi While you're at this: The extra messages are not necessary. configure fails before that with: configure: error: no acceptable C compiler found in $PATH Michael > = > dnl > dnl Check header files, mostly for lxdialog & kconfig > @@ -160,18 +171,6 @@ GNU_TOOL(xargs, findutils) > dnl Check for egrep > AC_PROG_EGREP > = > -dnl Check for gcc > -AC_PROG_CC > -if test -z "$CC"; then > - AC_MSG_ERROR([gcc could not be found, please install]) > -fi > - > -dnl Check for g++ > -AC_PROG_CXX > -if test -z "$CXX"; then > - AC_MSG_ERROR([g++ could not be found, please install]) > -fi > - > dnl Check for awk > AC_PROG_AWK > AC_PATH_PROGS(AWK, ${AWK},) > @@ -285,9 +284,6 @@ if test -z "$MSGFMT"; then > AC_MSG_ERROR([gettext could not be found, please install]) > fi > = > -dnl Check for gcc > -AC_PATH_PROGS(GCC, gcc,, $PATH) > - > dnl > dnl Checks for Python, needed for ipkg-utils > dnl > -- = > 1.9.2 > = > = > -- = > ptxdist mailing list > ptxdist@pengutronix.de -- = Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- = ptxdist mailing list ptxdist@pengutronix.de