Hello, Norbert!

> On Fri, 2 Mar 2001, Gnome CVS User wrote:
> > Log message:
> > * aclocal.m4 (MC_HPUX_PROG_CC_STDC): Remove, it's obsolete.
> > * configure.in: Use AC_PROG_CC_STDC instead.

It's great that somebody is reading this! :-)

> This change breaks the build process started with autogen.sh when
> automake 1.4 and autoconf 2.13 are used:
>      autoconf: Undefined macros:
>      configure.in:39:AC_PROG_CC_STDC

Sorry for that. I'll make a fallback to AM_PROG_CC_STDC if AC_PROG_CC_STDC
is not defined.

> And if AC_PROG_CC_STDC is defined like AM_PROG_CC_STDC in automake 1.4
> it might break compilation on AIX. I have been told back in 1997 that
> -qlanglvl=ansi breaks compilation on AIX with the native AIX compiler.
> Search src/OChangeLog and ChangeLog for PROG_CC_STDC to find kind of
> history about this issue.

I searched them both. My understanding is that MC was using the standard
macro which then became AC_PROG_CC_STDC, but then somebody reported
problems with AIX. Then you decided to add specific flags only for the
compilers if there are reports that those flags are required.

I couldn't find any description of _how_ the compilation breaks if
-qlanglvl=ansi is used. My suspicion is that that option enabled
additional definitions in the system headers, some of which conflicted
with the MC internal symbols.

Let me explain the arguments behing my patch.

1) It's better to use standard macros, so that if there are any problems
with them, they are fixed in Autoconf.

2) It's highly unlikely that the recent versions of that macro are broken.
Autoconf and Automake teams work hard on testing their projects. Besides,
the test actually makes sure that at least some code can be compiled.

3) The samba library included in the MC sources already uses the standard
macro called through AC_INLINE (actually only with the development
versions on Autoconf).

I'll fix AC_PROG_CC_STDC in Autoconf if you show me how it breaks on AIX.
I'll also provide a workaround for the older versions of Autoconf by
scanning $CC and replacing wrong flags. It's much safer than rewriting
macros.

The latest snapshot of MC can be found at
http://www.red-bean.com/~proski/mc/

I'll make a new one tonight.

Regards,
Pavel Roskin

Reply via email to