configure: Add --with-mingw option and print a notice when not found.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-04-04 11:13:17 +02:00
parent 5646582e5b
commit a3cf86a184
2 changed files with 33 additions and 5 deletions

27
configure vendored
View File

@ -853,6 +853,7 @@ with_hal
with_jpeg
with_krb5
with_ldap
with_mingw
with_mpg123
with_netapi
with_openal
@ -2522,6 +2523,7 @@ Optional Packages:
--without-jpeg do not use JPEG
--without-krb5 do not use krb5 (Kerberos)
--without-ldap do not use LDAP
--without-mingw do not use the MinGW cross-compiler
--without-mpg123 do not use the mpg123 library
--without-netapi do not use the Samba NetAPI library
--without-openal do not use OpenAL
@ -3945,6 +3947,12 @@ if test "${with_ldap+set}" = set; then :
fi
# Check whether --with-mingw was given.
if test "${with_mingw+set}" = set; then :
withval=$with_mingw;
fi
# Check whether --with-mpg123 was given.
if test "${with_mpg123+set}" = set; then :
withval=$with_mpg123;
@ -5504,6 +5512,7 @@ case $host in
;;
*-mingw32*|*-cygwin*)
enable_win16=${enable_win16:-no}
with_mingw=${with_mingw:-no}
CFLAGS="$CFLAGS -D_WIN32"
;;
esac
@ -9592,9 +9601,10 @@ test "$ac_cv_header_linux_joystick_h" = "yes" -o "$ac_cv_header_IOKit_hid_IOHIDL
CROSSTARGET=""
if test "x$enable_tests" != xno -a "$LIBEXT" != "dll"
if test "x$with_mingw" != xno
then
case "$host_cpu" in
case "x$with_mingw" in
x|xyes) case "$host_cpu" in
aarch64*)
ac_prefix_list="aarch64-w64-mingw32-clang aarch64-w64-mingw32-gcc" ;;
arm*)
@ -9651,7 +9661,9 @@ fi
test -n "$CROSSCC" && break
done
test -n "$CROSSCC" || CROSSCC="false"
;;
*) CROSSCC=$with_mingw ;;
esac
if test "$CROSSCC" != "false"
then
ac_save_CC="$CC"
@ -9692,6 +9704,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
fi
if test "x$CROSSTARGET" = "x"; then :
case "x$with_mingw" in
x) as_fn_append wine_notices "|MinGW compiler not found, cross-compiling PE files won't be supported." ;;
xno) ;;
*) as_fn_error $? "MinGW compiler not found, cross-compiling PE files won't be supported.
This is an error since --with-mingw was requested." "$LINENO" 5 ;;
esac
fi
if test "$ac_cv_header_pthread_h" = "yes"

View File

@ -61,6 +61,7 @@ AC_ARG_WITH(jpeg, AS_HELP_STRING([--without-jpeg],[do not use JPEG]))
AC_ARG_WITH(krb5, AS_HELP_STRING([--without-krb5],[do not use krb5 (Kerberos)]))
AC_ARG_WITH(ldap, AS_HELP_STRING([--without-ldap],[do not use LDAP]),
[if test "x$withval" = "xno"; then ac_cv_header_ldap_h=no; ac_cv_header_lber_h=no; fi])
AC_ARG_WITH(mingw, AS_HELP_STRING([--without-mingw],[do not use the MinGW cross-compiler]))
AC_ARG_WITH(mpg123, AS_HELP_STRING([--without-mpg123],[do not use the mpg123 library]))
AC_ARG_WITH(netapi, AS_HELP_STRING([--without-netapi],[do not use the Samba NetAPI library]))
AC_ARG_WITH(openal, AS_HELP_STRING([--without-openal],[do not use OpenAL]),
@ -140,6 +141,7 @@ case $host in
;;
*-mingw32*|*-cygwin*)
enable_win16=${enable_win16:-no}
with_mingw=${with_mingw:-no}
CFLAGS="$CFLAGS -D_WIN32"
;;
esac
@ -991,9 +993,12 @@ test "$ac_cv_header_linux_joystick_h" = "yes" -o "$ac_cv_header_IOKit_hid_IOHIDL
dnl Check for cross compiler to build test programs
AC_SUBST(CROSSTARGET,"")
if test "x$enable_tests" != xno -a "$LIBEXT" != "dll"
if test "x$with_mingw" != xno
then
WINE_CHECK_MINGW_PROG(CROSSCC,false)
case "x$with_mingw" in
x|xyes) WINE_CHECK_MINGW_PROG(CROSSCC,false) ;;
*) CROSSCC=$with_mingw ;;
esac
if test "$CROSSCC" != "false"
then
ac_save_CC="$CC"
@ -1016,6 +1021,8 @@ then
AC_SUBST(CROSSCFLAGS,${CROSSCFLAGS:-$CFLAGS})
fi
fi
WINE_NOTICE_WITH(mingw,[test "x$CROSSTARGET" = "x"],
[MinGW compiler not found, cross-compiling PE files won't be supported.])
dnl **** Check for pthread ****