Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Oct 1998 15:14:10 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        Alan Green <alan_green@csi.com>, freebsd-questions@FreeBSD.ORG, M.Hessling@qut.edu.au
Subject:   Re: ANSI C Compiler?
Message-ID:  <19981001151410.A11834@emsphone.com>
In-Reply-To: <000201bded65$b26cda80$5e7ae8c3@aardvark>; from "Alan Green" on Thu Oct  1 19:02:47 GMT 1998
References:  <000201bded65$b26cda80$5e7ae8c3@aardvark>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981001151410.A11834>