Wine uses the wrong pkg-config for 32 bit builds

Francois Gouget fgouget at codeweavers.com
Tue Jun 6 03:02:46 CDT 2017


On Mon, 5 Jun 2017, Michael Müller wrote:

> You patch breaks the cross compilation for OSX. See:
> https://builds.wine-staging.com/2017-06-05-15-57-04-job-11586/build.log
> 
> As you can see in the log, we provide a wrapper script
> i686-apple-darwin12-pkg-config which sets the pkg-config variables
> correctly. So far this worked without issues when compiling Wine using
> --host i686-apple-darwin12.

Thanks for testing!

There were two typos in the --host branch of WINE_CHECK_HOST_TOOL(). 
First ${ac_tool_prefix} already contains the trailing dash so I should 
not have added one, but that hardly mattered since I had an extra 
"_tool" in the variable I was setting (a copy/paste error). The result 
of all that is that the macro was just returning the plain pkg-config 
tool in the end.

As far as I can tell the --host case now works as expected in the patch 
below.



commit 745c7c5293c9163232a104cabc57dc73912b0efd
Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Jun 5 16:59:05 2017 +0200

    configure: Take the target host into account in WINE_CHECK_HOST_TOOL().
    
    In particular this gets us the right pkg-config tool when building the
    32 bit Wine.
    
    Signed-off-by: Francois Gouget <fgouget at codeweavers.com>

diff --git a/aclocal.m4 b/aclocal.m4
index 9364188e334..5892a19d146 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -27,13 +27,17 @@ dnl
 dnl Like AC_CHECK_TOOL but without the broken fallback to non-prefixed name
 dnl
 AC_DEFUN([WINE_CHECK_HOST_TOOL],
-[AS_VAR_SET_IF([ac_tool_prefix],
-  AC_CHECK_PROG([$1],[${ac_tool_prefix}$2],[${ac_tool_prefix}$2],,[$4]))
-AS_VAR_IF([ac_cv_prog_$1],[],
-  [AS_VAR_IF([cross_compiling],[yes],[],
-    [AS_UNSET([ac_cv_prog_$1])
-     AC_CHECK_PROG([$1],[$2],[$2],[$3],[$4])])],
-[AS_VAR_COPY([$1],[ac_cv_prog_$1])])])
+[AS_VAR_IF([ac_tool_prefix],[],
+  [case "$host_cpu" in
+   i[[3456789]]86*)
+     ac_host_tool_list="m4_foreach([ac_wine_cpu],[i686,i586,i486,i386],[ac_wine_cpu-${host_os}-$2 ]) $2" ;;
+   x86_64)
+     ac_host_tool_list="x86_64-${host_os}-$2 $2" ;;
+   *)
+     ac_host_tool_list="" ;;
+   esac],
+   [ac_host_tool_list="${ac_tool_prefix}$2"])
+ AC_CHECK_PROGS($1,$ac_host_tool_list,[$3],[$4])])
 
 dnl **** Initialize the programs used by other checks ****
 dnl


-- 
Francois Gouget <fgouget at codeweavers.com>


More information about the wine-devel mailing list