From: Akim Demaille Date: Tue, 23 Jan 2001 08:44:49 +0000 (+0000) Subject: * aclang.m4 (_AC_COMPILER_EXEEXT_O): Use X-Git-Tag: autoconf-2.50~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=300e5191e0124a4ba44528740095f694b7a18fa7;p=thirdparty%2Fautoconf.git * aclang.m4 (_AC_COMPILER_EXEEXT_O): Use AS_IF([AC_TRY_EVAL(ac_link)]) instead of AC_LINK_IFELSE to avoid depending on ac_exeext before it's found. (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Check for the executable extension BEFORE checking whether the compiler works, as that test depends on a correct ac_exeext. --- diff --git a/ChangeLog b/ChangeLog index c2caad899..57f9aed62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,16 @@ +2001-01-23 Tim Van Holder + + * aclang.m4 (_AC_COMPILER_EXEEXT_O): Use + AS_IF([AC_TRY_EVAL(ac_link)]) instead of AC_LINK_IFELSE to + avoid depending on ac_exeext before it's found. + (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Check for the + executable extension BEFORE checking whether the compiler + works, as that test depends on a correct ac_exeext. + 2001-01-23 Akim Demaille * acgeneral.m4 (_AC_INIT_PREPARE) : Typo. - + 2001-01-22 Pavel Roskin * autoscan.pl: Use "use strict". Declare all global variables diff --git a/aclang.m4 b/aclang.m4 index 6ff59ff49..c8bf566e7 100644 --- a/aclang.m4 +++ b/aclang.m4 @@ -651,7 +651,7 @@ m4_divert_pop()dnl # addition to `conftest.obj' -# We must not AU define them, because autoupdate would them remove +# We must not AU define them, because autoupdate would then remove # them, which is right, but Automake 1.4 would remove the support for # $(EXEEXT) etc. # FIXME: Remove this once Automake fixed. @@ -689,7 +689,7 @@ rm -f a.out a.exe conftest$ac_cv_exeext m4_define([_AC_COMPILER_EXEEXT_O], [# We have not set ac_exeext yet which is needed by `ac_link'. ac_exeext=$ac_cv_exeext -_AC_LINK_IFELSE([], +AS_IF([AC_TRY_EVAL(ac_link)], [# If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -878,11 +878,11 @@ fi test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS _AC_LANG_COMPILER_GNU GCC=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_CC_G # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler @@ -1082,11 +1082,11 @@ AC_CHECK_TOOLS(CXX, [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])], g++) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS _AC_LANG_COMPILER_GNU GXX=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_CXX_G _AC_PROG_CXX_EXIT_DECLARATION AC_LANG_POP(C++)dnl @@ -1204,6 +1204,8 @@ AC_CHECK_TOOLS(F77, [m4_default([$1], [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 pgf90 fc])]) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS # If we don't use `.F' as extension, the preprocessor is not run on the # input file. @@ -1212,8 +1214,6 @@ ac_ext=F _AC_LANG_COMPILER_GNU ac_ext=$ac_save_ext G77=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_F77_G AC_LANG_POP(Fortran 77)dnl ])# AC_PROG_F77 diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 6ff59ff49..c8bf566e7 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -651,7 +651,7 @@ m4_divert_pop()dnl # addition to `conftest.obj' -# We must not AU define them, because autoupdate would them remove +# We must not AU define them, because autoupdate would then remove # them, which is right, but Automake 1.4 would remove the support for # $(EXEEXT) etc. # FIXME: Remove this once Automake fixed. @@ -689,7 +689,7 @@ rm -f a.out a.exe conftest$ac_cv_exeext m4_define([_AC_COMPILER_EXEEXT_O], [# We have not set ac_exeext yet which is needed by `ac_link'. ac_exeext=$ac_cv_exeext -_AC_LINK_IFELSE([], +AS_IF([AC_TRY_EVAL(ac_link)], [# If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -878,11 +878,11 @@ fi test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS _AC_LANG_COMPILER_GNU GCC=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_CC_G # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler @@ -1082,11 +1082,11 @@ AC_CHECK_TOOLS(CXX, [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])], g++) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS _AC_LANG_COMPILER_GNU GXX=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_CXX_G _AC_PROG_CXX_EXIT_DECLARATION AC_LANG_POP(C++)dnl @@ -1204,6 +1204,8 @@ AC_CHECK_TOOLS(F77, [m4_default([$1], [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 pgf90 fc])]) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS # If we don't use `.F' as extension, the preprocessor is not run on the # input file. @@ -1212,8 +1214,6 @@ ac_ext=F _AC_LANG_COMPILER_GNU ac_ext=$ac_save_ext G77=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_F77_G AC_LANG_POP(Fortran 77)dnl ])# AC_PROG_F77 diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index 6ff59ff49..c8bf566e7 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.m4 @@ -651,7 +651,7 @@ m4_divert_pop()dnl # addition to `conftest.obj' -# We must not AU define them, because autoupdate would them remove +# We must not AU define them, because autoupdate would then remove # them, which is right, but Automake 1.4 would remove the support for # $(EXEEXT) etc. # FIXME: Remove this once Automake fixed. @@ -689,7 +689,7 @@ rm -f a.out a.exe conftest$ac_cv_exeext m4_define([_AC_COMPILER_EXEEXT_O], [# We have not set ac_exeext yet which is needed by `ac_link'. ac_exeext=$ac_cv_exeext -_AC_LINK_IFELSE([], +AS_IF([AC_TRY_EVAL(ac_link)], [# If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -878,11 +878,11 @@ fi test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS _AC_LANG_COMPILER_GNU GCC=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_CC_G # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler @@ -1082,11 +1082,11 @@ AC_CHECK_TOOLS(CXX, [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])], g++) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS _AC_LANG_COMPILER_GNU GXX=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_CXX_G _AC_PROG_CXX_EXIT_DECLARATION AC_LANG_POP(C++)dnl @@ -1204,6 +1204,8 @@ AC_CHECK_TOOLS(F77, [m4_default([$1], [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 pgf90 fc])]) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS # If we don't use `.F' as extension, the preprocessor is not run on the # input file. @@ -1212,8 +1214,6 @@ ac_ext=F _AC_LANG_COMPILER_GNU ac_ext=$ac_save_ext G77=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_F77_G AC_LANG_POP(Fortran 77)dnl ])# AC_PROG_F77 diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index 6ff59ff49..c8bf566e7 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -651,7 +651,7 @@ m4_divert_pop()dnl # addition to `conftest.obj' -# We must not AU define them, because autoupdate would them remove +# We must not AU define them, because autoupdate would then remove # them, which is right, but Automake 1.4 would remove the support for # $(EXEEXT) etc. # FIXME: Remove this once Automake fixed. @@ -689,7 +689,7 @@ rm -f a.out a.exe conftest$ac_cv_exeext m4_define([_AC_COMPILER_EXEEXT_O], [# We have not set ac_exeext yet which is needed by `ac_link'. ac_exeext=$ac_cv_exeext -_AC_LINK_IFELSE([], +AS_IF([AC_TRY_EVAL(ac_link)], [# If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -878,11 +878,11 @@ fi test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS _AC_LANG_COMPILER_GNU GCC=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_CC_G # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler @@ -1082,11 +1082,11 @@ AC_CHECK_TOOLS(CXX, [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])], g++) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS _AC_LANG_COMPILER_GNU GXX=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_CXX_G _AC_PROG_CXX_EXIT_DECLARATION AC_LANG_POP(C++)dnl @@ -1204,6 +1204,8 @@ AC_CHECK_TOOLS(F77, [m4_default([$1], [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 pgf90 fc])]) +AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl +AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_LANG_COMPILER_WORKS # If we don't use `.F' as extension, the preprocessor is not run on the # input file. @@ -1212,8 +1214,6 @@ ac_ext=F _AC_LANG_COMPILER_GNU ac_ext=$ac_save_ext G77=`test $ac_compiler_gnu = yes && echo yes` -AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl -AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl _AC_PROG_F77_G AC_LANG_POP(Fortran 77)dnl ])# AC_PROG_F77