autoconf-patches
[Top][All Lists]
Advanced

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

Re: Bug in largefile.m4


From: Joerg Schilling
Subject: Re: Bug in largefile.m4
Date: Sat, 2 Dec 2000 02:02:27 +0100 (MET)

>From address@hidden Sat Dec  2 01:48:05 2000

>> From: address@hidden
>> Date: Sat, 2 Dec 2000 01:26:47 +0100 (MET)
>> 
>> I just started to steal code from your autoconf
>> and found that it contains a minor bug:
>> 
>> If you don't set CC= nothing will work...
>> This patch helps:
>> 
>> 49c925
>> <           [ac_save_CC="$CC"
>> ---
>> >           [ac_save_CC="${CC-cc}"

>Thanks for the bug report.  Your workaround doesn't look quite right,
>though, since AC_SYS_LARGEFILE shouldn't decide what CC should be.
>Here's what I think is a better patch.  I'll CC: this message to
>address@hidden, since this code (in a slightly different
>form) will be in the next autoconf release.

My makefile system des not use the CC autoconf test.
After I added your tests to my autoconf scripts, it did work from 
my makefile system where I always call ... CC=xxx configure ....
but it did not work when I simply call ./configure

>2000-12-01  Paul Eggert  <address@hidden>

>       * m4/largefile.m4 (AC_SYS_LARGEFILE): Require AC_PROG_CC.

>===================================================================
>RCS file: m4/largefile.m4,v
>retrieving revision 1.15
>retrieving revision 1.16
>diff -pu -r1.15 -r1.16
>--- m4/largefile.m4    2000/11/15 20:08:53     1.15
>+++ m4/largefile.m4    2000/12/02 00:41:26     1.16
>@@ -32,7 +32,8 @@ AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
>    fi])
> 
> AC_DEFUN(AC_SYS_LARGEFILE,
>-  [AC_ARG_ENABLE(largefile,
>+  [AC_REQUIRE([AC_PROG_CC])
>+   AC_ARG_ENABLE(largefile,
>      [  --disable-largefile     omit support for large files])
>    if test "$enable_largefile" != no; then
> 

If you do this, the result may not be what I intend:

It will assume that it should use gcc when calling ./configure.

What I assume in this case is that CC=cc so my patch is correct:

If the creator of the autoconf environment added a test for the C-COMPIER
we could assume that he likes to use the resultant CC in his scripts.
If he does not add this test he assumes (like me) that CC=cc unless
otherwise specified.

Jörg

 EMail:address@hidden (home) Jörg Schilling D-13353 Berlin
       address@hidden           (uni)  If you don't have iso-8859-1
       address@hidden           (work) chars I am J"org Schilling
 URL:  http://www.fokus.gmd.de/usr/schilling   ftp://ftp.fokus.gmd.de/pub/unix




reply via email to

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