Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

autotools temporary files

I'm trying to debug an autotools problem for an open-source project, which is failing at the configure step. I'd like to see the code/executable that configure is trying to run.

However, the config.log only shows that something failed (not the code it tried to compile) and I don't know where the temporary executables are being stored (and they're probably promptly deleted anyway).

Is there a way get autotools to keep its temporary files around? It doesn't matter at which level this is specified-- either with args to configure, args to autoconf when it generates configure, or even some m4 invocation.

EDIT When something fails, configure.log looks like this:

configure:3285: checking whether we are cross compiling
configure:3293: gcc -o conftest.exe -DU_STATIC_IMPLEMENTATION -O3   conftest.c  >&5
configure:3297: $? = 0
configure:3304: ./conftest
configure:3308: $? = 1
configure:3315: error: in `/home/bobthebuilder/Development/icu/build':
configure:3317: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
like image 987
paleozogt Avatar asked Aug 26 '11 16:08

paleozogt


People also ask

What is an automake file?

1 Introduction. Automake is a tool for automatically generating Makefile.in s from files called Makefile.am . Each Makefile.am is basically a series of make variable definitions1, with rules being thrown in occasionally. The generated Makefile.in s are compliant with the GNU Makefile standards.

What is Autotools configure?

Autotools configurationThis file is used by autoconf to create the configure shell script that users run before building. The file must contain, at the very least, the AC_INIT and AC_OUTPUT M4 macros.


1 Answers

As of Autoconf 2.71, this is already done automatically. Search the config.log file for the string "configure: failed program was:"; the listing of the failed test program is shown in full following that line, e.g.:

configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU Hello"
| #define PACKAGE_TARNAME "hello"
| #define PACKAGE_VERSION "2.10"
| #define PACKAGE_STRING "GNU Hello 2.10"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL "http://www.gnu.org/software/hello/"
| #define PACKAGE "hello"
| #define VERSION "2.10"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
like image 61
Apteryx Avatar answered Oct 13 '22 01:10

Apteryx