From: Akim Demaille Date: Thu, 6 Jul 2000 13:05:47 +0000 (+0000) Subject: * acgeneral.m4 (_AC_INIT_PARSE_ARGS, AC_CHECK_TOOLS): Change X-Git-Tag: autoconf-2.50~779 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9800adfd9184be07cb15ab57dedd689a4d11207f;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 93acc5ba1..c4915a07f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-07-06 Mo DeJong + + * 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 * acgeneral.m4 (_AC_SHELL_TMPDIR): Typo. diff --git a/acgeneral.m4 b/acgeneral.m4 index 9fd3ea502..0a05cd9c0 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1592,8 +1592,8 @@ target=$target_alias 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 @@ -2951,11 +2951,11 @@ 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 diff --git a/aclang.m4 b/aclang.m4 index c5402b21d..a1d0e7521 100644 --- a/aclang.m4 +++ b/aclang.m4 @@ -471,12 +471,12 @@ AC_DEFUN([AC_REQUIRE_CPP], 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 @@ -488,6 +488,8 @@ fi 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 @@ -834,7 +836,7 @@ AC_DEFUN([AC_PROG_F77], 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], diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index c5402b21d..a1d0e7521 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -471,12 +471,12 @@ AC_DEFUN([AC_REQUIRE_CPP], 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 @@ -488,6 +488,8 @@ fi 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 @@ -834,7 +836,7 @@ AC_DEFUN([AC_PROG_F77], 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], diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index c5402b21d..a1d0e7521 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.m4 @@ -471,12 +471,12 @@ AC_DEFUN([AC_REQUIRE_CPP], 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 @@ -488,6 +488,8 @@ fi 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 @@ -834,7 +836,7 @@ AC_DEFUN([AC_PROG_F77], 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], diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 9fd3ea502..0a05cd9c0 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1592,8 +1592,8 @@ target=$target_alias 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 @@ -2951,11 +2951,11 @@ 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 diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index c5402b21d..a1d0e7521 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -471,12 +471,12 @@ AC_DEFUN([AC_REQUIRE_CPP], 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 @@ -488,6 +488,8 @@ fi 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 @@ -834,7 +836,7 @@ AC_DEFUN([AC_PROG_F77], 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],