aboutsummaryrefslogtreecommitdiff
path: root/mesalib/m4/ax_prog_cc_for_build.m4
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-12-17 12:16:30 +0100
committermarha <marha@users.sourceforge.net>2012-12-17 12:16:30 +0100
commitb3f7d4f6ce0d42d826f384223144936ba6797a10 (patch)
tree2f329beffff890b402625bff8547e243071c47bd /mesalib/m4/ax_prog_cc_for_build.m4
parentc648afe73ef43a15094508d2dd439e05738735bf (diff)
parent840c8745518b92303d40f6834e9c616587242231 (diff)
downloadvcxsrv-b3f7d4f6ce0d42d826f384223144936ba6797a10.tar.gz
vcxsrv-b3f7d4f6ce0d42d826f384223144936ba6797a10.tar.bz2
vcxsrv-b3f7d4f6ce0d42d826f384223144936ba6797a10.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libXft pixman mesa git update 17 dec 2012 Conflicts: mesalib/src/mesa/drivers/dri/swrast/swrast.c
Diffstat (limited to 'mesalib/m4/ax_prog_cc_for_build.m4')
-rw-r--r--mesalib/m4/ax_prog_cc_for_build.m437
1 files changed, 11 insertions, 26 deletions
diff --git a/mesalib/m4/ax_prog_cc_for_build.m4 b/mesalib/m4/ax_prog_cc_for_build.m4
index 08095a83d..6369809aa 100644
--- a/mesalib/m4/ax_prog_cc_for_build.m4
+++ b/mesalib/m4/ax_prog_cc_for_build.m4
@@ -40,30 +40,9 @@ AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
AC_REQUIRE([AC_EXEEXT])dnl
AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
-dnl
-pushdef([AC_TRY_COMPILER], [
-cat > conftest.$ac_ext << EOF
-#line __oline__ "configure"
-#include "confdefs.h"
-[$1]
-EOF
-# If we can't run a trivial program, we are probably using a cross
-compiler.
-# Fail miserably.
-if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest;
-exit) 2>/dev/null; then
- [$2]=yes
-else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.$ac_ext >&AC_FD_CC
- [$2]=no
-fi
-[$3]=no
-rm -fr conftest*])dnl
dnl Use the standard macros, but make them use other variable names
dnl
-pushdef([cross_compiling], [#])dnl
pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
@@ -91,16 +70,21 @@ pushdef([ac_cv_host_os], ac_cv_build_os)dnl
pushdef([ac_cpp], ac_build_cpp)dnl
pushdef([ac_compile], ac_build_compile)dnl
pushdef([ac_link], ac_build_link)dnl
-pushdef([ac_tool_prefix], [#])dnl
+
+save_cross_compiling=$cross_compiling
+save_ac_tool_prefix=$ac_tool_prefix
+cross_compiling=no
+ac_tool_prefix=
AC_PROG_CC
AC_PROG_CPP
AC_EXEEXT
+ac_tool_prefix=$save_ac_tool_prefix
+cross_compiling=$save_cross_compiling
+
dnl Restore the old definitions
dnl
-popdef([AC_TRY_COMPILER])dnl
-popdef([ac_tool_prefix])dnl
popdef([ac_link])dnl
popdef([ac_compile])dnl
popdef([ac_cpp])dnl
@@ -114,6 +98,7 @@ popdef([host_vendor])dnl
popdef([host_cpu])dnl
popdef([host_alias])dnl
popdef([host])dnl
+popdef([LDFLAGS])dnl
popdef([CPPFLAGS])dnl
popdef([CFLAGS])dnl
popdef([CPP])dnl
@@ -123,10 +108,10 @@ popdef([ac_exeext])dnl
popdef([ac_cv_objext])dnl
popdef([ac_cv_exeext])dnl
popdef([ac_cv_prog_cc_g])dnl
-popdef([ac_cv_prog_cc_works])dnl
popdef([ac_cv_prog_cc_cross])dnl
+popdef([ac_cv_prog_cc_works])dnl
popdef([ac_cv_prog_gcc])dnl
-popdef([cross_compiling])dnl
+popdef([ac_cv_prog_CPP])dnl
dnl Finally, set Makefile variables
dnl