X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=Ada95%2Faclocal.m4;fp=Ada95%2Faclocal.m4;h=5f7c5a6e9613b1deaaba96c4710a8a530315f2c4;hb=b5d80765d2da2bcc9d9f71cafd081ad4453cd365;hp=dcaada8bc3ef341f50eb540a247f07f63a09aa6d;hpb=3ffedbf1016b2d7026e7543fe73e87b046fbd862;p=ncurses.git diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index dcaada8b..5f7c5a6e 100644 --- a/Ada95/aclocal.m4 +++ b/Ada95/aclocal.m4 @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey dnl -dnl $Id: aclocal.m4,v 1.194 2022/09/10 19:25:56 tom Exp $ +dnl $Id: aclocal.m4,v 1.195 2022/09/24 20:42:30 tom Exp $ dnl Macros used in NCURSES Ada95 auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -477,7 +477,7 @@ fi AC_SUBST(ARFLAGS) ]) dnl --------------------------------------------------------------------------- -dnl CF_BUILD_CC version: 9 updated: 2021/01/02 09:31:20 +dnl CF_BUILD_CC version: 10 updated: 2022/09/24 16:36:41 dnl ----------- dnl If we're cross-compiling, allow the user to override the tools and their dnl options. The configure script is oriented toward identifying the host @@ -543,7 +543,30 @@ if test "$cross_compiling" = yes ; then : ${BUILD_CC:='${CC}'} - if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then + AC_MSG_CHECKING(if the build-compiler "$BUILD_CC" works) + + cf_save_crossed=$cross_compiling + cf_save_ac_link=$ac_link + cross_compiling=no + ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $BUILD_CPPFLAGS $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&AS_MESSAGE_LOG_FD' + + AC_TRY_RUN([#include + int main(int argc, char *argv[]) + { + ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0); + } + ], + cf_ok_build_cc=yes, + cf_ok_build_cc=no, + cf_ok_build_cc=unknown) + + cross_compiling=$cf_save_crossed + ac_link=$cf_save_ac_link + + AC_MSG_RESULT($cf_ok_build_cc) + + if test "$cf_ok_build_cc" != yes + then AC_MSG_ERROR([Cross-build requires two compilers. Use --with-build-cc to specify the native compiler.]) fi