[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev Re: autoconfigure and host_os dependent CC
From: |
Webmaster Jim |
Subject: |
lynx-dev Re: autoconfigure and host_os dependent CC |
Date: |
Mon, 12 Apr 1999 06:26:29 -0400 |
On Fri, Apr 09, 1999 at 11:25:36PM -0600, address@hidden wrote:
> I'd like to make the default C compiler dependent on the
> host operating system. There's a case statement that does
> this sort of thing -- I attempted adding:
>
> case $host_os in
> os390*)
> echo "Original CC was (${CC-undefined})"
> CC=${CC-c89}
> CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"
> ;;
> esac
>
> ... but it happens far too late, after much testing is already done.
>
> The original setting apparently happens in macro AC_PROG_CC, called
> out of configure.in. But I don't know where to find the definition
> of this macro.
>
> For the time being, I'm simply supplying CC=c89 in the environment
> of the call to configure.
>
> Any better suggestions?
The environment variable CC is checked early in configure, the script
created from configure.in:
[ approx line 650 ]
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:649: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
[...]
The easy way to force a non-default is to put a different CC in your
environment. However, if the default CC is broken for an OS, then
perhaps configure needs to learn this somehow.
-----
<http://www.cs.indiana.edu/picons/db/users/us/md/lib/bcpl/jspath/face.xbm>
<http://www.altavista.com/cgi-bin/query?q=%22web+home+for+jim+spath%22>
Marvin the Paranoid Android says:
No one can help me, not that anyone has tried of course.