autoconf
[Top][All Lists]
Advanced

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

Causing configure script to abort when tools are missing.


From: Brad Larsen
Subject: Causing configure script to abort when tools are missing.
Date: Sun, 21 Oct 2007 14:10:03 -0400
User-agent: Opera Mail/9.22 (Linux)

Hello list,

I'm working on switching a legacy build system (the messiest, most ad-hoc one I've ever seen) to autotools, and have been consulting the autobook and various example pages for information.

I have a configure.ac script and Makefile.am that mostly work. However, I just tried doing ./configure on a system that has no Fortran compilers installed, one of which is needed to compile this code. The configure script does not bail out when no suitable compiler is found, and instead spits out some warnings but happily generates broken Makefiles.

My configure.ac looks like this:

AC_INIT([project-name], [trunk], address@hidden)
AC_PREREQ(2.59)

AM_INIT_AUTOMAKE([-Wall -Werror foreign])

AC_PROG_CC
AC_PROG_F77

AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h strings.h])

AC_FUNC_FORK
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([alarm])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT


Here's a snippet of the output when I run ./configure on the system with no Fortran compiler:

checking for g77... no
checking for xlf... no
checking for f77... no
[snip many more fortran compilers]
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no

Notice the last line---no compiler was found, and the empty string was filled in for the compiler name.


How can I make the configure script bail out with an error message if no suitable compiler is found?

Thanks!
Brad Larsen




reply via email to

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