# libgc should inherit the original CFLAGS/CPPFLAGS passed to configure, i.e. -O0
CPPFLAGS_FOR_LIBGC=$CPPFLAGS
CFLAGS_FOR_LIBGC=$CFLAGS
+CPPFLAGS_FOR_EGLIB=$CPPFLAGS
+CFLAGS_FOR_EGLIB=$CFLAGS
#
# These are the flags that need to be stored in the mono.pc file for
if test "x$cross_compiling" = "xyes"; then
has_broken_apple_cpp=yes
fi
+ dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin10.0.0, but
+ dnl its gcc defaults to 64-bit mode. They have also deprecated the usage of ucontext
+ dnl we need to set some flags to build our 32-bit binaries on 10.6 properly
+ case "$host" in
+ i*86-*-darwin10*)
+ BROKEN_DARWIN_FLAGS="-arch i386 -D_XOPEN_SOURCE -mmacosx-version-min=10.5"
+ CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_FLAGS"
+ CFLAGS="$CFLAGS $BROKEN_DARWIN_FLAGS"
+ CXXFLAGS="$CXXFLAGS $BROKEN_DARWIN_FLAGS"
+ CCASFLAGS="$CCASFLAGS $BROKEN_DARWIN_FLAGS"
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS"
+ CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS"
+ CPPFLAGS_FOR_EGLIB="$CPPFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS"
+ CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS"
+ ;;
+ esac
;;
*)
AC_MSG_WARN([*** Please add $host to configure.in checks!])
GMODULE_CFLAGS="$GLIB_CFLAGS"
GMODULE_LIBS="$GLIB_LIBS"
eglib_dir=eglib
+ ac_configure_args="$ac_configure_args \"CPPFLAGS_FOR_EGLIB=$EGLIB_CPPFLAGS\" \"CFLAGS_FOR_EGLIB=$CFLAGS_FOR_EGLIB\""
AC_CONFIG_SUBDIRS(eglib)
;;
system)
AC_SUBST(GNUC_NORETURN)
AC_SUBST(BREAKPOINT)
+# We use a separate variable to pass down CPPFLAGS and CFLAGS from the main mono
+# configure, because of autoconf brokeness
+if test "x$CPPFLAGS_FOR_EGLIB" != "x"; then
+ CPPFLAGS=$CPPFLAGS_FOR_EGLIB
+fi
+if test "x$CFLAGS_FOR_EGLIB" != "x"; then
+ CFLAGS=$CFLAGS_FOR_EGLIB
+fi
+
AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN])
-AC_SUBST(ORDER)
case $host in
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
arm*-darwin*)
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE"
;;
+i*86-*-darwin*)
+ ORDER=G_LITTLE_ENDIAN
+ ;;
esac
+AC_SUBST(ORDER)
AC_SUBST(CFLAGS)
AC_SUBST(PATHSEP)
AC_SUBST(SEARCHSEP)