summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew D. Langston <langston@SLAC.Stanford.EDU>1999-08-23 03:04:05 +0000
committerMatthew D. Langston <langston@SLAC.Stanford.EDU>1999-08-23 03:04:05 +0000
commit17a01fac787c4c0b383cf997950108ecfbead3a9 (patch)
tree925c5aa733713e3359058d70e2ea9b608bc53386
parent213ef3e8cbd9b185540e596b99080de29c85de54 (diff)
downloadautoconf-17a01fac787c4c0b383cf997950108ecfbead3a9.tar.gz
(AC_PROG_CC): Remove uname test for win32/Cygwin, and just test for `cl'
as a last resort. (AC_PROG_F77): Add more Fortran 77 compilers to the search list. Contributed by Steven G. Johnson <stevenj@alum.mit.edu>. (AC_PROG_CC): Likewise. (AC_PROG_CXX): Likewise. (AC_PROG_F77): Add an optional first argument which gives the user an opportunity to specify an alternative search list for the compiler.
-rw-r--r--acspecific.m448
-rw-r--r--lib/autoconf/specific.m448
2 files changed, 48 insertions, 48 deletions
diff --git a/acspecific.m4 b/acspecific.m4
index ece72d93..503bf87f 100644
--- a/acspecific.m4
+++ b/acspecific.m4
@@ -70,19 +70,24 @@ else
fi
])
+dnl AC_PROG_CC takes an optional first argument which, if specified,
+dnl must be a space separated list of C compilers to search for. This
+dnl just gives the user an opportunity to specify an alternative search
+dnl list for the C compiler.
AC_DEFUN(AC_PROG_CC,
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+ifelse([$1], ,
+[
+ AC_CHECK_PROG(CC, gcc, gcc)
if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN*)
- AC_CHECK_PROG(CC, cl, cl) ;;
- esac
+ AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+ if test -z "$CC"; then
+ AC_CHECK_PROGS(CC, cl)
+ fi
fi
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
+], [AC_CHECK_PROGS(CC, [$1])])
+
+test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
AC_PROG_CC_WORKS
AC_PROG_CC_GNU
@@ -117,9 +122,13 @@ else
fi
])
+dnl AC_PROG_CXX takes an optional first argument which, if specified,
+dnl must be a space separated list of C++ compilers to search for. This
+dnl just gives the user an opportunity to specify an alternative search
+dnl list for the C++ compiler.
AC_DEFUN(AC_PROG_CXX,
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
-AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc)
+AC_CHECK_PROGS(CXX, $CCC ifelse([$1], , [c++ g++ gcc CC cxx cc++ cl], [$1]), gcc)
AC_PROG_CXX_WORKS
AC_PROG_CXX_GNU
@@ -154,24 +163,15 @@ else
fi
])
-dnl Determine a Fortran 77 compiler to use. If `F77' is not already set
-dnl in the environment, check for `g77', `f77' and `f2c', in that order.
-dnl Set the output variable `F77' to the name of the compiler found.
-dnl
-dnl If using `g77' (the GNU Fortran 77 compiler), then `AC_PROG_F77'
-dnl will set the shell variable `G77' to `yes', and empty otherwise. If
-dnl the output variable `FFLAGS' was not already set in the environment,
-dnl then set it to `-g -02' for `g77' (or `-O2' where `g77' does not
-dnl accept `-g'). Otherwise, set `FFLAGS' to `-g' for all other Fortran
-dnl 77 compilers.
+dnl AC_PROG_F77 takes an optional first argument which, if specified,
+dnl must be a space separated list of Fortran 77 compilers to search
+dnl for. This just gives the user an opportunity to specify an
+dnl alternative search list for the Fortran 77 compiler.
dnl
dnl AC_PROG_F77()
AC_DEFUN(AC_PROG_F77,
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-if test -z "$F77"; then
- AC_CHECK_PROGS(F77, g77 f77 f2c)
- test -z "$F77" && AC_MSG_ERROR([no acceptable Fortran 77 compiler found in \$PATH])
-fi
+AC_CHECK_PROGS(F77, ifelse([$1], , [g77 f77 xlf cf77 fl32 fort77 f90 xlf90 f2c], [$1]))
AC_PROG_F77_WORKS
AC_PROG_F77_GNU
diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4
index ece72d93..503bf87f 100644
--- a/lib/autoconf/specific.m4
+++ b/lib/autoconf/specific.m4
@@ -70,19 +70,24 @@ else
fi
])
+dnl AC_PROG_CC takes an optional first argument which, if specified,
+dnl must be a space separated list of C compilers to search for. This
+dnl just gives the user an opportunity to specify an alternative search
+dnl list for the C compiler.
AC_DEFUN(AC_PROG_CC,
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+ifelse([$1], ,
+[
+ AC_CHECK_PROG(CC, gcc, gcc)
if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN*)
- AC_CHECK_PROG(CC, cl, cl) ;;
- esac
+ AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+ if test -z "$CC"; then
+ AC_CHECK_PROGS(CC, cl)
+ fi
fi
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
+], [AC_CHECK_PROGS(CC, [$1])])
+
+test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
AC_PROG_CC_WORKS
AC_PROG_CC_GNU
@@ -117,9 +122,13 @@ else
fi
])
+dnl AC_PROG_CXX takes an optional first argument which, if specified,
+dnl must be a space separated list of C++ compilers to search for. This
+dnl just gives the user an opportunity to specify an alternative search
+dnl list for the C++ compiler.
AC_DEFUN(AC_PROG_CXX,
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
-AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc)
+AC_CHECK_PROGS(CXX, $CCC ifelse([$1], , [c++ g++ gcc CC cxx cc++ cl], [$1]), gcc)
AC_PROG_CXX_WORKS
AC_PROG_CXX_GNU
@@ -154,24 +163,15 @@ else
fi
])
-dnl Determine a Fortran 77 compiler to use. If `F77' is not already set
-dnl in the environment, check for `g77', `f77' and `f2c', in that order.
-dnl Set the output variable `F77' to the name of the compiler found.
-dnl
-dnl If using `g77' (the GNU Fortran 77 compiler), then `AC_PROG_F77'
-dnl will set the shell variable `G77' to `yes', and empty otherwise. If
-dnl the output variable `FFLAGS' was not already set in the environment,
-dnl then set it to `-g -02' for `g77' (or `-O2' where `g77' does not
-dnl accept `-g'). Otherwise, set `FFLAGS' to `-g' for all other Fortran
-dnl 77 compilers.
+dnl AC_PROG_F77 takes an optional first argument which, if specified,
+dnl must be a space separated list of Fortran 77 compilers to search
+dnl for. This just gives the user an opportunity to specify an
+dnl alternative search list for the Fortran 77 compiler.
dnl
dnl AC_PROG_F77()
AC_DEFUN(AC_PROG_F77,
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-if test -z "$F77"; then
- AC_CHECK_PROGS(F77, g77 f77 f2c)
- test -z "$F77" && AC_MSG_ERROR([no acceptable Fortran 77 compiler found in \$PATH])
-fi
+AC_CHECK_PROGS(F77, ifelse([$1], , [g77 f77 xlf cf77 fl32 fort77 f90 xlf90 f2c], [$1]))
AC_PROG_F77_WORKS
AC_PROG_F77_GNU