]> git.sesse.net Git - vlc/blobdiff - configure.ac
OSX: factorize, abort early if SDK not found
[vlc] / configure.ac
index 3984a3dadc04c3cf559c4e233560748b5b7597b6..5ff616b29aeeab2d43b738ce2984bef0eb93bb05 100644 (file)
@@ -2,7 +2,7 @@ dnl Autoconf settings for vlc
 
 AC_COPYRIGHT([Copyright 2002-2011 the VideoLAN team])
 
-AC_INIT(vlc, 1.2.0-pre1)
+AC_INIT(vlc, 1.2.0-pre2)
 VERSION_MAJOR=1
 VERSION_MINOR=2
 VERSION_REVISION=0
@@ -201,22 +201,13 @@ case "${host_os}" in
     AC_ARG_WITH(macosx-sdk,
       [AS_HELP_STRING([--with-macosx-sdk=DIR],
         [compile using the SDK in DIR])])
-    if test "${with_macosx_sdk}" != "" ; then
-        CPP="${CPP} -isysroot ${with_macosx_sdk}"
-        CC="${CC} -isysroot ${with_macosx_sdk}"
-        CXX="${CXX} -isysroot ${with_macosx_sdk}"
-        OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
-        LD="${LD} -syslibroot ${with_macosx_sdk}"
-    else
-        echo "  No desired SDK version given, falling back to 10.5"
-        CPP="${CPP} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
-        CC="${CC} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
-        CXX="${CXX} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
-        OBJC="${OBJC} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
-        LD="${LD} -syslibroot /Developer/SDKs/MacOSX10.5.sdk"
-        with_macosx_version_min="10.5"
-        echo "  Assuming --with-macosx-version-min=10.5"
-    fi
+    test "${with_macosx_sdk}" = "" && with_macosx_sdk=/Developer/SDKs/MacOSX10.5.sdk
+    ! test -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
+    CPP="${CPP} -isysroot ${with_macosx_sdk}"
+    CC="${CC} -isysroot ${with_macosx_sdk}"
+    CXX="${CXX} -isysroot ${with_macosx_sdk}"
+    OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
+    LD="${LD} -syslibroot ${with_macosx_sdk}"
     AC_ARG_WITH(macosx-version-min,
       [AS_HELP_STRING([--with-macosx-version-min=VERSION],
         [compile for MacOS X VERSION and above])])
@@ -651,7 +642,7 @@ AC_CHECK_FUNC(getopt_long,, [
 AC_SUBST(GNUGETOPT_LIBS)
 
 AC_CHECK_LIB(m,cos,[
-  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mod mpc dmo quicktime realvideo qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x264],[-lm])
+  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mod mpc dmo quicktime realvideo qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x264 hqdn3d],[-lm])
   LIBM="-lm"
 ], [
   LIBM=""