From owner-freebsd-questions Thu Oct 1 13:14:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA24407 for freebsd-questions-outgoing; Thu, 1 Oct 1998 13:14:35 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA24402 for ; Thu, 1 Oct 1998 13:14:29 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.1/8.9.1) id PAA24092; Thu, 1 Oct 1998 15:14:10 -0500 (CDT) Date: Thu, 1 Oct 1998 15:14:10 -0500 From: Dan Nelson To: Alan Green , freebsd-questions@FreeBSD.ORG, M.Hessling@qut.edu.au Subject: Re: ANSI C Compiler? Message-ID: <19981001151410.A11834@emsphone.com> References: <000201bded65$b26cda80$5e7ae8c3@aardvark> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.94.3i In-Reply-To: <000201bded65$b26cda80$5e7ae8c3@aardvark>; from "Alan Green" on Thu Oct 1 19:02:47 GMT 1998 X-OS: FreeBSD 2.2.7-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Oct 01), Alan Green said: > Is there a freeware ANSI C compiler available for FreeBSD. > > I'm trying to compile Regina REXX for my FreeBSD system and it tells > me that the C compiler that's installed doesn't support > ANSI.?!?!?!?!? (The easy solution is to simply run "CC=cc ./configure". more detailed info for Mr Hessling follows) Whoa weird :) loading cache ./config.cache checking for one of the following C compilers: c89 acc gcc cc... using /usr/bin/c89 checking for gcc... (cached) c89 checking whether the C compiler (c89 ) works... yes checking whether the C compiler (c89 ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether c89 accepts -g... yes checking if compiler supports ANSI prototypes... no configure: error: Regina requires an ANSI compiler; cannot continue I don't think ./configure should be looking for c89 at all. The reason the configure tests fail is that c89 does NOT take -O2 as an argument; see http://www.opengroup.org/onlinepubs/7908799/xcu/c89.html. Also, the config line on like 889 is wrong (see http://www.opengroup.org/onlinepubs/7908799/xbd/utilconv.html#usg , guideline 9): ac_compile='$ac_cv_prog_CC conftest.$ac_ext $CFLAGS $CPPFLAGS -c1>&5 2>&5' should be: ac_compile='$ac_cv_prog_CC $CFLAGS $CPPFLAGS conftest.$ac_ext -c1>&5 2>&5' There are a bunch of other c89-related errors; c89 is a strict POSIX compiler with no extensions, and probably shouldn't even be tested for. -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message