Re: [PATCH/RFC] autoconf: Add test for OLD_ICONV
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 5, 2007, 22:22 UTC
- Message-ID
- <7vd4tkn5mk.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <200712052226.53543.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 24 quoted lines
> Junio C Hamano wrote: >> Jakub Narebski <jnareb@gmail.com> writes: >> >>> +AC_MSG_CHECKING([for old iconv()]) >>> +AC_COMPILE_IFELSE(OLDICONVTEST_SRC, >>> + [AC_MSG_RESULT([no])], >>> + [AC_MSG_RESULT([yes]) >>> + OLD_ICONV=YesPlease]) >>> +AC_SUBST(OLD_ICONV) >>> >> >> Which result does COMPILE_IFELSE give for non error warnings? Ok, or >> Bad? > > - Macro: AC_COMPILE_IFELSE (INPUT, [ACTION-IF-FOUND], > [ACTION-IF-NOT-FOUND]) > Run the compiler and compilation flags of the current language > (*note Language Choice::) on the INPUT, run the shell commands > ACTION-IF-TRUE on success, ACTION-IF-FALSE otherwise. The INPUT > can be made by `AC_LANG_PROGRAM' and friends. > > And if I have checked correctly code which causes only warnings > returns Ok (in this case print 'no' after 'checking for old iconv()... ' > and do not set OLD_ICONV, which means it will be unset).
Which means the real-life compilation will get the warning on type mismatch. Wasn't OLD_ICONV about squelching that?