Fixups for mingw64

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@39940 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2016-06-28 11:17:49 +00:00
parent 4aea3c5663
commit cc7b9b6224
2 changed files with 85 additions and 6 deletions

52
configure vendored
View file

@ -3835,14 +3835,22 @@ esac
case $host_os in
*cygwin* )
MINGW32=no
MINGW64=no
CYGWIN=yes
MSWIND=yes;;
*mingw32* )
MINGW32=yes
MINGW64=no
CYGWIN=no
MSWIND=yes;;
*mingw64* )
MINGW32=no
MINGW64=yes
CYGWIN=no
MSWIND=yes;;
* )
MINGW32=no
MINGW64=no
CYGWIN=no
MSWIND=no;;
esac
@ -3861,6 +3869,17 @@ if test "$MINGW32" = yes; then
export AR=${AR:-ar}
export RANLIB=${RANLIB:-ranlib}
export DLLTOOL=${DLLTOOL:-dlltool}
elif test "$MINGW64" = yes; then
echo "hosted on mingw64 .."
export SHELL=sh
if test "$OBJC_RUNTIME_LIB" = ng; then
export CC=${CC:-clang}
else
export CC=${CC:-gcc}
fi
export AR=${AR:-ar}
export RANLIB=${RANLIB:-ranlib}
export DLLTOOL=${DLLTOOL:-dlltool}
elif test "$CYGWIN" = yes; then
echo "hosted on cygwin .."
if test "$OBJC_RUNTIME_LIB" = ng; then
@ -4100,7 +4119,7 @@ main ()
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_blocks="yes"
ac64v_blocks="yes"
else
@ -4563,8 +4582,10 @@ fi
if test "$MINGW32" = no; then
if test "$CHOWN" = "none"; then
as_fn_error $? "\"Could not find chown.\"" "$LINENO" 5;
if test "$MINGW64" = no; then
if test "$CHOWN" = "none"; then
as_fn_error $? "\"Could not find chown.\"" "$LINENO" 5;
fi
fi
fi
@ -5730,6 +5751,25 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
elif test "$MINGW64" = yes; then
# Mingw doesn't need anything extra for threads
LIBS="$OBJCRT $LIBS"
if test "$cross_compiling" = yes; then :
objc_threaded="works"
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "config_thread.m"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
objc_threaded="works"
else
objc_threaded=""
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
elif test "$OBJC_RUNTIME_LIB" = "apple"; then
# Apple doesn't need anything extra for threads
LIBS="$OBJCRT $LIBS"
@ -6203,6 +6243,12 @@ else
fi
if test x"$USE_OBJC_EXCEPTIONS" = x"maybe"; then
if test x"$MSWIND" = x"yes"; then
USE_OBJC_EXCEPTIONS=no
fi
fi
# Please note that -fobjc-exceptions should automatically enable
# -fexceptions.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports native ObjC exceptions" >&5

View file

@ -171,14 +171,22 @@ esac
case $host_os in
*cygwin* )
MINGW32=no
MINGW64=no
CYGWIN=yes
MSWIND=yes;;
*mingw32* )
MINGW32=yes
MINGW64=no
CYGWIN=no
MSWIND=yes;;
*mingw64* )
MINGW32=no
MINGW64=yes
CYGWIN=no
MSWIND=yes;;
* )
MINGW32=no
MINGW64=no
CYGWIN=no
MSWIND=no;;
esac
@ -197,6 +205,17 @@ if test "$MINGW32" = yes; then
export AR=${AR:-ar}
export RANLIB=${RANLIB:-ranlib}
export DLLTOOL=${DLLTOOL:-dlltool}
elif test "$MINGW64" = yes; then
echo "hosted on mingw64 .."
export SHELL=sh
if test "$OBJC_RUNTIME_LIB" = ng; then
export CC=${CC:-clang}
else
export CC=${CC:-gcc}
fi
export AR=${AR:-ar}
export RANLIB=${RANLIB:-ranlib}
export DLLTOOL=${DLLTOOL:-dlltool}
elif test "$CYGWIN" = yes; then
echo "hosted on cygwin .."
if test "$OBJC_RUNTIME_LIB" = ng; then
@ -238,7 +257,7 @@ else
CFLAGS="$CFLAGS -fblocks"
AC_LANG_PUSH(C)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[(void)^{int i; i = 0; }();])], [
ac_cv_blocks="yes"
ac64v_blocks="yes"
], [
ac_cv_blocks="no"
])
@ -304,8 +323,10 @@ AC_ARG_WITH(tar,[
AC_CHECK_PROG(CHOWN, chown, chown, none)
if test "$MINGW32" = no; then
if test "$CHOWN" = "none"; then
AC_MSG_ERROR("Could not find chown.");
if test "$MINGW64" = no; then
if test "$CHOWN" = "none"; then
AC_MSG_ERROR("Could not find chown.");
fi
fi
fi
@ -1287,6 +1308,12 @@ elif test "$MINGW32" = yes; then
AC_TRY_RUN([#include "config_thread.m"],
objc_threaded="works",
objc_threaded="", objc_threaded="works")
elif test "$MINGW64" = yes; then
# Mingw doesn't need anything extra for threads
LIBS="$OBJCRT $LIBS"
AC_TRY_RUN([#include "config_thread.m"],
objc_threaded="works",
objc_threaded="", objc_threaded="works")
elif test "$OBJC_RUNTIME_LIB" = "apple"; then
# Apple doesn't need anything extra for threads
LIBS="$OBJCRT $LIBS"
@ -1602,6 +1629,12 @@ AC_ARG_ENABLE(native-objc-exceptions, [
USE_OBJC_EXCEPTIONS=$enableval,
USE_OBJC_EXCEPTIONS=maybe)
if test x"$USE_OBJC_EXCEPTIONS" = x"maybe"; then
if test x"$MSWIND" = x"yes"; then
USE_OBJC_EXCEPTIONS=no
fi
fi
# Please note that -fobjc-exceptions should automatically enable
# -fexceptions.
AC_MSG_CHECKING(whether the compiler supports native ObjC exceptions)