[Top][All Lists]

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

AC_TRY_RUN doesn't set $? as documented

From: Ben Pfaff
Subject: AC_TRY_RUN doesn't set $? as documented
Date: 25 Sep 2001 14:08:16 -0700

The following bug was reported against the Debian package for
autoconf 2.13.  I was able to reproduce it with autoconf 2.52,
using this fragment:
        AC_TRY_RUN([int main(void){return 5;}], [echo success],
                   [echo fail: "$?"], [echo cross-compile])
which reports `fail: "0"' in my test run, whereas I expected to
see `fail: "5"' if everything were correct.



Subject: Bug#113484: AC_TRY_RUN doesn't set $? as documented
From: Richard Kettlewell <address@hidden>

Package: autoconf
Version: 2.13

The manual says:

       PROGRAM is the text of a C program, on which shell variable and
       backquote substitutions are performed.  If it compiles and links
       successfully and returns an exit status of 0 when executed, run
       shell commands ACTION-IF-TRUE.  Otherwise run shell commands
       ACTION-IF-FALSE; the exit status of the program is available in
       the shell variable `$?'.  This macro uses `CFLAGS' or `CXXFLAGS',
       `CPPFLAGS', `LDFLAGS', and `LIBS' when compiling.

However this is not actually true, as trying to take advantage of this
feature, or just looking at acgeneral.m4, reveals.

Sorry if this bug has already been reported, my net connection is
currently down.


reply via email to

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