summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2022-02-11 11:00:36 +0100
committerGitHub <noreply@github.com>2022-02-11 11:00:36 +0100
commitfea74e8c8bcc34ec0f97e1290b91b176287f090b (patch)
tree3522bb4ed37525f8f4f3475a1dcca4471147f584 /m4
parent05e555659bdc466d49b5418711a47775a28b3390 (diff)
parent649b5534091f60e93a63f99cf32189fb68e2bafd (diff)
downloadautoconf-archive-fea74e8c8bcc34ec0f97e1290b91b176287f090b.tar.gz
Merge pull request #246 from vapier/master
AX_CC_FOR_BUILD: deprecate in favor of AX_PROG_CC_FOR_BUILD
Diffstat (limited to 'm4')
-rw-r--r--m4/ax_cc_for_build.m440
1 files changed, 9 insertions, 31 deletions
diff --git a/m4/ax_cc_for_build.m4 b/m4/ax_cc_for_build.m4
index c62ffad..9962795 100644
--- a/m4/ax_cc_for_build.m4
+++ b/m4/ax_cc_for_build.m4
@@ -10,6 +10,9 @@
#
# Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD.
#
+# AX_CC_FOR_BUILD is deprecated; it expands into AX_PROG_CC_FOR_BUILD which
+# renames EXEEXT_FOR_BUILD to BUILD_EXEEXT.
+#
# LICENSE
#
# Copyright (c) 2010 Reuben Thomas <rrt@sc3d.org>
@@ -41,37 +44,12 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 3
+#serial 4
-dnl Get a default for CC_FOR_BUILD to put into Makefile.
AC_DEFUN([AX_CC_FOR_BUILD],
-[# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test -z "$CC_FOR_BUILD"; then
- if test "x$cross_compiling" = "xno"; then
- CC_FOR_BUILD='$(CC)'
- else
- CC_FOR_BUILD=gcc
- fi
-fi
-AC_SUBST(CC_FOR_BUILD)
-# Also set EXEEXT_FOR_BUILD.
-if test "x$cross_compiling" = "xno"; then
- EXEEXT_FOR_BUILD='$(EXEEXT)'
-else
- AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
- [rm -f conftest*
- echo 'int main () { return 0; }' > conftest.c
- bfd_cv_build_exeext=
- ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- rm -f conftest*
- test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
- EXEEXT_FOR_BUILD=""
- test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
-fi
+[dnl
+m4_warn([obsolete], [$0 is deprecated, please use AX_PROG_CC_FOR_BUILD instead])
+AC_REQUIRE([AX_PROG_CC_FOR_BUILD])
+dnl Backwards compatibility.
+EXEEXT_FOR_BUILD=$BUILD_EXEEXT
AC_SUBST(EXEEXT_FOR_BUILD)])dnl