+ VLC_ADD_LDFLAGS([vlc],[-Wl,-undefined,dynamic_lookup])
+ VLC_ADD_LDFLAGS([libvlc_control],[-Wl,dynamic_lookup])
+ VLC_ADD_LDFLAGS([ffmpeg i420_rgb_mmx],[-Wl,-read_only_relocs,suppress])
+ VLC_ADD_CFLAGS([motion],[-fconstant-cfstrings])
+ VLC_ADD_LDFLAGS([libvlc],[-Wl,-framework,Cocoa,-framework,CoreFoundation])
+ VLC_ADD_LDFLAGS([motion],[-Wl,-framework,IOKit,-framework,CoreFoundation])
+ AC_ARG_ENABLE(macosx-defaults,
+ [ --enable-macosx-defaults Build the default configuration on Mac OS X (default enabled)])
+ if test "x${enable_macosx_defaults}" != "xno"
+ then
+ echo ""
+ echo "Building with Mac OS X defaults:"
+ with_macosx_version_min="10.4"
+ echo " Assuming --with-macosx-version-min=10.4"
+ enable_macosx="yes"
+ echo " Assuming --enable-macosx"
+ enable_faad="yes"
+ echo " Assuming --enable-faad"
+ enable_flac="yes"
+ echo " Assuming --enable-flac"
+ enable_theora="yes"
+ echo " Assuming --enable-theora"
+ enable_shout="yes"
+ echo " Assuming --enable-shout"
+ enable_cddax="yes"
+ echo " Assuming --enable-cddax"
+ enable_vcdx="yes"
+ echo " Assuming --enable-vcdx"
+ enable_caca="yes"
+ echo " Assuming --enable-caca"
+ enable_goom="yes"
+ echo " Assuming --enable-goom"
+ enable_ncurses="yes"
+ echo " Assuming --enable-ncurses"
+ enable_twolame="yes"
+ echo " Assuming --enable-twolame"
+ enable_realrtsp="yes"
+ echo " Assuming --enable-realrtsp"
+
+ enable_skins2="no"
+ echo " Assuming --disable-skins2"
+ enable_x11="no"
+ echo " Assuming --disable-x11"
+ enable_glx="no"
+ echo " Assuming --disable-glx"
+ enable_xvideo="no"
+ echo " Assuming --disable-xvideo"
+
+ 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
+ fi