autoconf-patches
[Top][All Lists]
Advanced

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

Re: Bug in largefile.m4


From: Pavel Roskin
Subject: Re: Bug in largefile.m4
Date: Fri, 1 Dec 2000 21:46:30 -0500 (EST)

Hello, Paul!

> > <           [ac_save_CC="$CC"
> > ---
> > >           [ac_save_CC="${CC-cc}"

This is certainly not needed with the current CVS Autoconf - it's already
there.

> Thanks for the bug report.  Your workaround doesn't look quite right,
> though, since AC_SYS_LARGEFILE shouldn't decide what CC should be.

That's a good point, but the current Autoconf already does it for you if
the current language is C. We only have a problem if it's not C.

> -  [AC_ARG_ENABLE(largefile,
> +  [AC_REQUIRE([AC_PROG_CC])

You are missing an important point here - should we always switch to C to
run AC_SYS_LARGEFILE or not?

If yes, we should use AC_LANG_PUSH and AC_LANG_POP. If no, the macro
should be rewritten to work at least with C++.

I just checked. This works:

AC_INIT
AC_SYS_LARGEFILE
AC_OUTPUT

checking for gcc... gcc
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking whether we are using the GNU C compiler... yes
checking for object suffix... o
checking for executable suffix...
checking whether gcc accepts -g... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
creating ./config.status

But this doesn't:

AC_INIT
AC_LANG(C++)
AC_SYS_LARGEFILE
AC_OUTPUT

checking for g++... g++
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking whether we are using the GNU C++ compiler... yes
checking for object suffix... o
checking for executable suffix...
checking whether g++ accepts -g... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGE_FILES value needed for large files... no
creating ./config.status

Regards,
Pavel Roskin




reply via email to

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