bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: INSTALL should tell about particular systems, HP-UX cc


From: Bob Proulx
Subject: Re: INSTALL should tell about particular systems, HP-UX cc
Date: Sun, 13 Apr 2008 14:10:19 -0600
User-agent: Mutt/1.5.13 (2006-08-11)

Sorry for arriving late to this discussion.  As a long term user of
HP-UX and the various native C compilers there I am interested in this
discussion but I admit that I don't quite understand where things have
converged to at this point.  Throwing caution to the wind I will jump
into it anyway.  :-)

First:
> + ./configure CC="cc -Ae"

It doesn't seem that this should ever be necessary (except for a case
I will mention in a moment) since I think it should get added anyway
if the compiler detected is the HP ANSI C compiler.

The place where it is needed is when gcc is installed.  If gcc is not
installed then I don't think forcing it is needed.  But if gcc is
found then autoconf prefers it.  In that case it *is* necessary to
force CC="cc -Ae" in order to force the HP ANSI C compiler.  In
particular I do this when wanting to also force +DD64 to compile
64-bit executables.

Bruno Haible wrote:
> 2) AC_PROG_CC / AC_PROG_CC_C89
> Two things still to do:
>   - The AC_PROG_CC should reject this compiler if it does not support ANSI C.

It seems reasonable to me that at this time AC_PROG_CC would require
ANSI support and reject non-ANSI compilers.

> Ralf Wildenhues wrote:
> > Judging from the manual, I'd expect AC_PROG_CC_STDC to achieve this
> > (so if it doesn't, it should be fixed).
> 
> But AC_PROG_CC_STDC is not used by many packages. AC_PROG_CC_STDC tests for
> C99, which many packages don't need. Amanda (from which this report comes
> from) does not use it. Gnulib does not use it (except in module 'stdarg').
> What these programs would need, according to the current autoconf, is:
> 
>   AC_PROG_CC_C89
>   if test "$ac_cv_prog_cc_c89" = no; then
>     echo "C compiler does not support ANSI C" 1>&2
>     exit 1
>   fi
> 
> But no one does this...

I looked and I haven't been doing this either.  :-/

If I read through all of the discussion correctly then as I understand
it the fundamental issue is that AC_PROG_CC will detect, allow and use
classic K&R compilers.  Time has been passing and these are very few
and far between with the exception of the native "bundled" HP-UX C
compiler, which is the classic K&R C compiler, without the add-on ANSI
compiler.  Sites either have GCC installed or have the ANSI C compiler
installed and very few have neither.  This means that configure.ac
creators haven't noticed that they haven't been following the
documented behavior.  (Me included.)

I think enough time has passed that today the least surprising
behavior would be for AC_PROG_CC to require an ANSI compiler and fail
if one is not found.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]