+2000-07-06 Mo DeJong <mdejong@cygnus.com>
+
+ * acgeneral.m4 (_AC_INIT_PARSE_ARGS, AC_CHECK_TOOLS): Change
+ warning message printed when only --host is given. Fix printing
+ of multiple compiler cache values, use PATH argument.
+ * aclang.m4 (AC_LANG_COMPILER_WORKS): Print the cross compile
+ status, fix problem where two results were printed at once.
+
2000-07-06 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (_AC_SHELL_TMPDIR): Typo.
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- AC_MSG_WARN([Did you mean --build instead of --host? Assuming you did.])
- AC_MSG_WARN([If not, please specify both --build and --host.])
+ AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used.])
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
AC_DEFUN([AC_CHECK_TOOLS],
[for ac_prog in $2
do
- AC_CHECK_PROG([$1], $ac_tool_prefix$ac_prog, $ac_tool_prefix$ac_prog, [$3])
- test "$$1" != "$3" && break
+ AC_CHECK_PROG([$1], $ac_tool_prefix$ac_prog, $ac_tool_prefix$ac_prog,, [$4])
+ test "$$1" != "" && break
done
-if test "$$1" = "$3"; then
- AC_CHECK_PROGS([$1], [$2], [$3])
+if test "$$1" = ""; then
+ AC_CHECK_PROGS([$1], [$2], [$3], [$4])
fi
])# AC_CHECK_TOOLS
define([_AC_LANG_COMPILER_WORKS],
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
-[# If not cross compiling, check that we can run a simple program.
+[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if AC_TRY_COMMAND(./conftest); then
cross_compiling=no
else
- AC_MSG_RESULT(no)
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([_AC_LANG compiler cannot create executables], 77)])[]dnl
+AC_MSG_CHECKING([whether we are cross compiling])
+AC_MSG_RESULT($cross_compiling)
])# AC_LANG_COMPILER_WORKS
dnl Fortran 95 isn't strictly backwards-compatiable with Fortran 77, but
dnl `f95' is worth trying.
dnl pgf77 is the Portland Group f77 compiler
-dnl lf95 is the Lahey-Fujitsu compiler
+dnl lf95 is the Lahey-Fujitsu compiler
AC_LANG_PUSH(Fortran 77)
AC_CHECK_TOOLS(F77,
m4_default([$1],
define([_AC_LANG_COMPILER_WORKS],
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
-[# If not cross compiling, check that we can run a simple program.
+[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if AC_TRY_COMMAND(./conftest); then
cross_compiling=no
else
- AC_MSG_RESULT(no)
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([_AC_LANG compiler cannot create executables], 77)])[]dnl
+AC_MSG_CHECKING([whether we are cross compiling])
+AC_MSG_RESULT($cross_compiling)
])# AC_LANG_COMPILER_WORKS
dnl Fortran 95 isn't strictly backwards-compatiable with Fortran 77, but
dnl `f95' is worth trying.
dnl pgf77 is the Portland Group f77 compiler
-dnl lf95 is the Lahey-Fujitsu compiler
+dnl lf95 is the Lahey-Fujitsu compiler
AC_LANG_PUSH(Fortran 77)
AC_CHECK_TOOLS(F77,
m4_default([$1],
define([_AC_LANG_COMPILER_WORKS],
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
-[# If not cross compiling, check that we can run a simple program.
+[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if AC_TRY_COMMAND(./conftest); then
cross_compiling=no
else
- AC_MSG_RESULT(no)
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([_AC_LANG compiler cannot create executables], 77)])[]dnl
+AC_MSG_CHECKING([whether we are cross compiling])
+AC_MSG_RESULT($cross_compiling)
])# AC_LANG_COMPILER_WORKS
dnl Fortran 95 isn't strictly backwards-compatiable with Fortran 77, but
dnl `f95' is worth trying.
dnl pgf77 is the Portland Group f77 compiler
-dnl lf95 is the Lahey-Fujitsu compiler
+dnl lf95 is the Lahey-Fujitsu compiler
AC_LANG_PUSH(Fortran 77)
AC_CHECK_TOOLS(F77,
m4_default([$1],
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- AC_MSG_WARN([Did you mean --build instead of --host? Assuming you did.])
- AC_MSG_WARN([If not, please specify both --build and --host.])
+ AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used.])
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
AC_DEFUN([AC_CHECK_TOOLS],
[for ac_prog in $2
do
- AC_CHECK_PROG([$1], $ac_tool_prefix$ac_prog, $ac_tool_prefix$ac_prog, [$3])
- test "$$1" != "$3" && break
+ AC_CHECK_PROG([$1], $ac_tool_prefix$ac_prog, $ac_tool_prefix$ac_prog,, [$4])
+ test "$$1" != "" && break
done
-if test "$$1" = "$3"; then
- AC_CHECK_PROGS([$1], [$2], [$3])
+if test "$$1" = ""; then
+ AC_CHECK_PROGS([$1], [$2], [$3], [$4])
fi
])# AC_CHECK_TOOLS
define([_AC_LANG_COMPILER_WORKS],
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
-[# If not cross compiling, check that we can run a simple program.
+[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if AC_TRY_COMMAND(./conftest); then
cross_compiling=no
else
- AC_MSG_RESULT(no)
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([_AC_LANG compiler cannot create executables], 77)])[]dnl
+AC_MSG_CHECKING([whether we are cross compiling])
+AC_MSG_RESULT($cross_compiling)
])# AC_LANG_COMPILER_WORKS
dnl Fortran 95 isn't strictly backwards-compatiable with Fortran 77, but
dnl `f95' is worth trying.
dnl pgf77 is the Portland Group f77 compiler
-dnl lf95 is the Lahey-Fujitsu compiler
+dnl lf95 is the Lahey-Fujitsu compiler
AC_LANG_PUSH(Fortran 77)
AC_CHECK_TOOLS(F77,
m4_default([$1],