autoconf-patches
[Top][All Lists]
Advanced

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

Patch to c.m4, relevant for cross-compiling


From: Uwe Seimet
Subject: Patch to c.m4, relevant for cross-compiling
Date: Tue, 4 Sep 2001 12:52:58 +0200
User-agent: Mutt/1.3.12i

Hi,

below you find a patch that solves a problem only relevant when
cross-compiling. Currently if you are cross-compiling and CFLAGS contains
"-Wall -Werror" autoconf runs into an endless loop for AC_CHECK_SIZEOF().
This is what happens:

configure:4700: powerpc-wrs-vxworks-gcc -c -Wall -Werror -Dmain=ob_main
-msoft-float -DHAVE_NO_STD_GETHOSTBYNAME -DCPU=PPCEC603 -DVXWORKS
-DRW_MULTI_THREAD -D_REENTRANT -I/opt/vxworks/target/h  conftest.c >&5
configure: In function `ob_main':
configure:4727: size of array `_array_' is negative
cc1: warnings being treated as errors
configure:4727: warning: unused variable `_array_'
configure:4703: $? = 1
configure: failed program was:


The "warning: unused variable `_array_'" warning becomes an error due to the
"-Werror" option. The result is that configure can never successfully
complete AC_CHECK_SIZEOF(), because it always ends with an error. The patch
below ensures that _array_ is used in an assignment. This prevents the
""warning: unused variable `_array_'" warning/error and configure can
proceed normally.


Please add this patch to the latest sources. Thank you.

Best regards,   Uwe

--

diff -r -c2 autoconf/lib/autoconf/c.m4 autoconf.dist/lib/autoconf/c.m4
*** autoconf/lib/autoconf/c.m4  Tue Sep  4 12:44:26 2001
--- autoconf.dist/lib/autoconf/c.m4     Mon Aug 20 18:25:00 2001
***************
*** 196,202 ****
  # -------------------------------------------------
  m4_define([AC_LANG_BOOL_COMPILE_TRY(C)],
! [AC_LANG_PROGRAM([$1], [int _array_ @<:@1 - 2 * !($2)@:>@;
! _array_ @<:@0@:>@ = 0
! ])])
  
  
--- 196,200 ----
  # -------------------------------------------------
  m4_define([AC_LANG_BOOL_COMPILE_TRY(C)],
! [AC_LANG_PROGRAM([$1], [int _array_ @<:@1 - 2 * !($2)@:>@])])
  
-- 
----------------------------------------------------------------------------
 Dr. Uwe Seimet                                    mailto:address@hidden
 IONA - Total Business Integration(tm)             http://www.orbacus.com



reply via email to

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