[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev autoconfigure and host_os dependent CC
From: |
pg |
Subject: |
Re: lynx-dev autoconfigure and host_os dependent CC |
Date: |
Tue, 13 Apr 1999 14:52:57 -0600 (MDT) |
Hello, Lyncei,
I've researched this further.
In a recent note, address@hidden said:
> Date: Fri, 9 Apr 1999 23:25:36 -0600 (MDT)
>
> I'd like to make the default C compiler dependent on the
> host operating system.
>
> 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.
>
In the TODO file with GNU autoconf 2.12, I find:
------------------------------------------------------------------------------
Question: at least one common UNIX variant has a "cc" that is old K&R
and "c89" for ANSI C. Is there any reason why AC_PROG_CC couldn't
check for c89 before cc if it can't find gcc?
address@hidden (H. Peter Anvin)
------------------------------------------------------------------------------
(I wouldn't call this merely a "common UNIX variant"; it's straight POSIX.)
And in:
Linkname: Mortice Kern Systems (MKS) Inc. - OS/390 OpenEdition --
GNU Utilities Download Registration
URL: http://www.mks.com/s390/gnu/register.htm
I find the author has done much work adapting autoconf 2.12 to
OS/390. (Lynx works without most of this, but it's probably all
necessary somewhere.) But what I was wishing for was:
(Thanks to MKS; cite them if you integrate this :-)
==================================================================
diff -rc autoconf-2.12/acspecific.m4 mks/autoconf-2.12/acspecific.m4
*** autoconf-2.12/acspecific.m4 Tue Nov 19 22:10:49 1996
--- mks/autoconf-2.12/acspecific.m4 Wed Jan 7 07:43:27 1998
***************
*** 74,81 ****
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_CHECK_PROG(CC, gcc, gcc)
if test -z "$CC"; then
! AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
! test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
fi
AC_PROG_CC_WORKS
--- 74,84 ----
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_CHECK_PROG(CC, gcc, gcc)
if test -z "$CC"; then
! AC_CHECK_PROG(CC, c89, c89)
! if test -z "$CC"; then
! AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
! test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
! fi
fi
AC_PROG_CC_WORKS