+ with_macosx_sdk=""
+ echo " Compiling with default SDK"
+ fi
+ if test ".`uname -p`" = ".i386"; then
+ dnl Due to a ld(64) bug in 10.5 we cannot use our mmx code
+ dnl without hacking it a lot, we disable mmx and sse.
+ dnl (that bug is about ld being unable to handle
+ dnl text relocation)
+ save_cflags="$CFLAGS"
+ CFLAGS="$CFLAGS -dynamiclib -single_module -read_only_relocs suppress"
+ AC_TRY_LINK(
+ [int a;], [asm("movq _a,%mm0\n");],
+ ac_ld_does_not_support_text_reloc=no,
+ ac_ld_does_not_support_text_reloc=yes)
+ CFLAGS="$save_cflags"
+
+ if test "x$ac_ld_does_not_support_text_reloc" = "xyes"; then
+ enable_mmx="no"
+ echo " Assuming --disable-mmx (due to a bug in ld)"
+ enable_sse="no"
+ echo " Assuming --disable-sse (due to a bug in ld)"
+ fi
+ fi
+ dnl
+ dnl Check for Mac OS X SDK settings
+ dnl
+ AC_ARG_WITH(macosx-sdk,
+ [ --with-macosx-sdk=DIR compile using the SDK in DIR])
+ if test "${with_macosx_sdk}" != "" ; then
+ CC="${CC} -isysroot ${with_macosx_sdk}"
+ CXX="${CXX} -isysroot ${with_macosx_sdk}"
+ OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
+ LD="${LD} -syslibroot ${with_macosx_sdk}"
+ fi
+ AC_ARG_WITH(macosx-version-min,
+ [ --with-macosx-version-min=VERSION compile for MacOSX VERSION and above])
+ if test "${with_macosx_version_min}" != "" ; then
+ CC="${CC} -mmacosx-version-min=${with_macosx_version_min}"
+ CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}"
+ OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}"
+ LD="${LD} -macosx_version_min=${with_macosx_version_min}"
+ CFLAGS_save="${CFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"; CFLAGS="${CFLAGS_save}"
+ CXXFLAGS_save="${CXXFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"; CXXFLAGS="${CXXFLAGS_save}"
+ OBJCFLAGS_save="${OBJCFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"; OBJCFLAGS="${OBJCFLAGS_save}"
+ MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
+ export MACOSX_DEPLOYMENT_TARGET