diff options
author | Jan Holesovsky <kendy@suse.cz> | 2012-07-27 10:51:08 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-07-27 10:51:35 +0200 |
commit | 06b9b2148e6f261e34637ae5797a5f274635a628 (patch) | |
tree | 9993373d90390eabbe946a5821d3437ffc88208b /configure.in | |
parent | 18d54a542c3b0fb32ee35bf1a80cb9c117088cca (diff) |
Improved check for winegcc.
Change-Id: I307459f35d960ca901cd8dd609195734ab6db98b
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 1a0a72a4073f..8cc14bca6539 100644 --- a/configure.in +++ b/configure.in @@ -1011,6 +1011,12 @@ AC_ARG_ENABLE(coretext, [Use CoreText framework on Mac (instead of ATSU).]), ) +AC_ARG_ENABLE(winegcc, + AS_HELP_STRING([--enable-winegcc], + [Enable use of winegcc during the build, in order to create msi* tools + needed for MinGW cross-compilation.]), +) + dnl =================================================================== dnl Optional Packages (--with/without-) dnl =================================================================== @@ -3557,6 +3563,7 @@ if test "$cross_compiling" = "yes"; then test -n "$with_system_expat_for_build" && sub_conf_opts="$sub_conf_opts --with-system-expat" test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu" test -n "$with_system_libxml_for_build" && sub_conf_opts="$sub_conf_opts --with-system-libxml" + test "$WITH_MINGW" = "yes" && sub_conf_opts="$sub_conf_opts --enable-winegcc" sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options" ./configure \ --disable-mozilla \ @@ -6106,13 +6113,16 @@ AC_SUBST(BUILD_EPM) dnl =================================================================== dnl We need winegcc when building MinGW build to be able to cross-build msi tools dnl =================================================================== -AC_PATH_PROG(WINEGCC, winegcc) -if test "$WITH_MINGW" = "yes" -a "$PKGFORMAT" = "msi" ; then +WINEGCC= +if test "$enable_winegcc" = "yes" ; then + AC_PATH_PROG(WINEGCC, winegcc) if test "$WINEGCC" = ""; then AC_MSG_ERROR([winegcc was not found, please install wine-devel, or wine-devel-32bit]) fi CC_save="$CC" + ac_exeext_save="$ac_exeext" CC="$WINEGCC -m32" + ac_exeext=".exe" AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include <stdio.h> ],[ @@ -6121,7 +6131,9 @@ printf ("hello world\n"); [AC_MSG_ERROR([winegcc cannot build 32bit binaries, please install glibc-devel-32bit and gcc-32bit])] ) CC="$CC_save" + ac_exeext="$ac_exeext_save" fi +AC_SUBST(WINEGCC) dnl =================================================================== dnl Check for gperf |