configure: Detect MinGW-w64 Clang cross toolchain

André Hentschel nerv at dawncrow.de
Tue Dec 29 17:25:47 CST 2015


Signed-off-by: André Hentschel <nerv at dawncrow.de>
---

There're gonna be more and more Clang toolchains not even needing binutils.
Most notably the first arm toolchains will be clang only... Coming soon...

 aclocal.m4   | 8 +++++---
 configure.ac | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 1cd7d1d..4a34b5d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -171,17 +171,19 @@ LIBS="$ac_wine_check_funcs_save_LIBS"])
 
 dnl **** Check for a mingw program, trying the various mingw prefixes ****
 dnl
-dnl Usage: WINE_CHECK_MINGW_PROG(variable,prog,[value-if-not-found],[path])
+dnl Usage: WINE_CHECK_MINGW_PROG(variable,progs,[value-if-not-found],[path])
 dnl
 AC_DEFUN([WINE_CHECK_MINGW_PROG],
 [case "$host_cpu" in
   i[[3456789]]86*)
     ac_prefix_list="m4_foreach([ac_wine_prefix],[w64-mingw32, pc-mingw32, mingw32msvc, mingw32],
-                        m4_foreach([ac_wine_cpu],[i686,i586,i486,i386],[ac_wine_cpu-ac_wine_prefix-$2 ]))
+                        m4_foreach([ac_wine_cpu],[i686,i586,i486,i386],
+                        m4_foreach([ac_wine_prog],[$2],[ac_wine_cpu-ac_wine_prefix-ac_wine_prog ])))
                         mingw32-$2" ;;
   x86_64)
     ac_prefix_list="m4_foreach([ac_wine_prefix],[pc-mingw32, w64-mingw32, mingw32msvc],
-                        m4_foreach([ac_wine_cpu],[x86_64,amd64],[ac_wine_cpu-ac_wine_prefix-$2 ]))" ;;
+                        m4_foreach([ac_wine_cpu],[x86_64,amd64],
+                        m4_foreach([ac_wine_prog],[$2],[ac_wine_cpu-ac_wine_prefix-ac_wine_prog ])))" ;;
   *)
     ac_prefix_list="" ;;
 esac
diff --git a/configure.ac b/configure.ac
index a1d3f97..b0b6dd3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -944,7 +944,7 @@ dnl Check for cross compiler to build test programs
 AC_SUBST(CROSSTARGET,"")
 if test "$cross_compiling" = "no" -a "x$enable_tests" != xno -a "$LIBEXT" != "dll"
 then
-    WINE_CHECK_MINGW_PROG(CROSSCC,gcc,false)
+    WINE_CHECK_MINGW_PROG(CROSSCC,[gcc, clang],false)
     if test "$CROSSCC" != "false"
     then
         ac_save_CC="$CC"
@@ -958,6 +958,7 @@ then
                            do
                                case "$1" in
                                  *-gcc) CROSSTARGET=`expr "$1" : '\(.*\)-gcc'` ;;
+                                 *-clang) CROSSTARGET=`expr "$1" : '\(.*\)-clang'` ;;
                                esac
                                shift
                            done],
-- 
1.9.1





More information about the wine-patches mailing list