Re: Causing configure script to abort when tools are missing.

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

 



On Sun, 21 Oct 2007 14:56:28 -0400, Ralf Wildenhues <Ralf.Wildenhues@xxxxxx> wrote:

Ralf,

* Brad Larsen wrote on Sun, Oct 21, 2007 at 08:10:03PM CEST:

AC_PROG_CC
AC_PROG_F77
[...]
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?

After AC_PROG_F77, add
  if test -z "$F77" || test "X$F77" = "Xno"; then
    AC_MSG_ERROR([No suitable Fortran 77 compiler found])
  fi

Thanks Ralf, that did the trick. Can you explain the second part of the conditional (test "X$F77" = "Xno")? autoconf sets the value of $F77 to "no" if it's not found?

I assume for safety's sake, I should do similar checks for $CC and whatever other programs are required?

Thanks!
Brad Larsen


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux