]> git.sesse.net Git - vlc/blobdiff - configure.ac
osx/framework: added a bit more exception handling
[vlc] / configure.ac
index 566a0e0a424fd9343b03abbe35addbca4f144f58..794f65abbc88e5f20e8a876c620876fc8b8f5aa4 100644 (file)
@@ -125,20 +125,17 @@ AC_ARG_WITH(contrib,
       if test "`echo \"$topdir\" | cut -c 1`" != "/"; then
          topdir="`pwd`/$topdir"
       fi
-      CONTRIB_DIR=${topdir}/extras/contrib
+      CONTRIB_DIR=${topdir}/extras/contrib/hosts/${host}
+      if ! test -d "$CONTRIB_DIR"
+      then
+        gccmachine=`$CC -dumpmachine`
+        CONTRIB_DIR=${topdir}/extras/contrib/hosts/${gccmachine}
+      fi
     fi
     AC_MSG_CHECKING([for libs in ${CONTRIB_DIR}])
   AS_IF([test -d ${CONTRIB_DIR}/lib],[
-   AS_IF([test "`grep HOST ${CONTRIB_DIR}/config.mak 2>/dev/null|awk '{print $3}'`" != "`$CC -dumpmachine`"],[
-      if test "${with_contrib}" = "yes"; then
-        AC_MSG_RESULT([no])
-        AC_MSG_ERROR([ not using the libs in extras/contrib as it is not the same host])
-      else
-        AC_MSG_RESULT([no])
-        AC_MSG_WARN([ not using the libs in extras/contrib as it is not the same host])
-      fi
-     ],[
     AC_MSG_RESULT([yes])
+    AC_SUBST(CONTRIB_DIR)
     export PATH=${CONTRIB_DIR}/bin:$PATH
     CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
     CPPFLAGS_save="${CPPFLAGS_save} -I${CONTRIB_DIR}/include"
@@ -170,10 +167,9 @@ AC_ARG_WITH(contrib,
       export LIBRARY_PATH=${CONTRIB_DIR}/lib:$LIBRARY_PATH
       export BELIBRARIES=${CONTRIB_DIR}/lib:$BELIBRARIES
     fi
+    ],[
+       AC_MSG_RESULT([no])
     ])
-  ],[
-    AC_MSG_RESULT([no])
-  ])
 ])
 dnl
 dnl  Set default values
@@ -1861,6 +1857,7 @@ AS_IF([test "${enable_growl}" != "no"], [
     AC_CHECK_HEADERS(Growl/GrowlDefines.h, [
       VLC_ADD_PLUGIN([growl])
       VLC_ADD_LDFLAGS([growl], [-Wl,-framework,Growl,-framework,AppKit])
+      VLC_ADD_OBJCFLAGS([growl], [-fobjc-exceptions] )
     ])
   ]
 )
@@ -4393,26 +4390,6 @@ AS_IF([test "${enable_qt4}" != "no"], [
 ])
 AM_CONDITIONAL(ENABLE_QT4, [test "x$enable_qt4" != "xno"])
 
-dnl
-dnl  WinCE GUI module
-dnl
-AC_ARG_ENABLE(wince,
-  [  --enable-wince          Windows CE interface (default enabled with MinGW)])
-if test "${enable_wince}" != "no"; then
-  if test "${SYS}" = "mingwce"; then
-    VLC_ADD_PLUGIN([wince])
-    VLC_ADD_CXXFLAGS([wince],[])
-    VLC_ADD_LIBS([wince],[-lcommctrl -lcommdlg -laygshell])
-    dnl Gross hack
-    VLC_ADD_LIBS([wince],[\\\${top_builddir}modules/gui/wince/wince_rc.o])
-  elif test "${SYS}" = "mingw32"; then
-    VLC_ADD_CXXFLAGS([wince],[])
-    VLC_ADD_LIBS([wince],[-lcomctl32 -lcomdlg32 -lgdi32 -lole32])
-    dnl Gross hack
-    VLC_ADD_LIBS([wince],[\\\${top_builddir}modules/gui/wince/wince_rc.o])
-  fi
-fi
-
 dnl
 dnl Simple test for skins2 dependency
 dnl
@@ -4458,7 +4435,7 @@ dnl
 dnl  MacOS X video output/gui modules
 dnl
 AC_ARG_ENABLE(macosx,
-  [  --enable-macosx         MacOS X support (default enabled on MacOS X)])
+  [  --enable-macosx         full Mac OS X support (default enabled on Mac OS X)])
 if test "x${enable_macosx}" = "xyes"
 then
   VLC_ADD_LDFLAGS([access_eyetv],                     [-Wl,-framework,Foundation])
@@ -4468,8 +4445,8 @@ then
   VLC_ADD_LDFLAGS([macosx minimal_macosx],            [-Wl,-framework,CoreServices])
   VLC_ADD_LDFLAGS([macosx minimal_macosx],            [-Wl,-framework,AGL])
   VLC_ADD_LDFLAGS([macosx],                           [-Wl,-framework,IOKit])
-  VLC_ADD_LDFLAGS([macosx],                           [-F\\\${top_srcdir}/extras/contrib/Sparkle -Wl,-framework,Sparkle])
-  VLC_ADD_OBJCFLAGS([macosx],                         [-F\\\${top_srcdir}/extras/contrib/Sparkle])
+  VLC_ADD_LDFLAGS([macosx],                           [-F${CONTRIB_DIR}/Sparkle -Wl,-framework,Sparkle])
+  VLC_ADD_OBJCFLAGS([macosx],                         [-F${CONTRIB_DIR}/Sparkle])
   dnl For bug report
   VLC_ADD_LDFLAGS([macosx],                           [-Wl,-framework,AddressBook])
   VLC_ADD_LDFLAGS([qtcapture],                        [-Wl,-framework,QTKit])
@@ -4477,7 +4454,7 @@ then
   VLC_ADD_LDFLAGS([macosx],                           [-Wl,-framework,WebKit])
   VLC_ADD_LDFLAGS([opengllayer qtcapture],            [-Wl,-framework,QuartzCore])
   VLC_ADD_LDFLAGS([qtcapture],                        [-Wl,-framework,CoreVideo])
-  VLC_ADD_OBJCFLAGS([macosx minimal_macosx opengllayer growl opengllayer], [-fobjc-exceptions] )
+  VLC_ADD_OBJCFLAGS([macosx minimal_macosx opengllayer growl], [-fobjc-exceptions] )
 
   VLC_ADD_PLUGIN([access_eyetv])
   VLC_ADD_PLUGIN([qtcapture])
@@ -4486,6 +4463,30 @@ then
   VLC_ADD_PLUGIN([opengllayer])
 fi
 
+dnl
+dnl  MacOS X video output/gui modules
+dnl
+AC_ARG_ENABLE(macosx-minimal,
+  [  --enable-macosx-minimal minimal Mac OS X support (default disabled)])
+if test "x${enable_macosx_minimal}" = "xyes"
+then
+  VLC_ADD_LDFLAGS([minimal_macosx opengllayer qtcapture],[-Wl,-framework,Cocoa])
+  VLC_ADD_LDFLAGS([minimal_macosx opengllayer],[-Wl,-framework,OpenGL])
+  VLC_ADD_LDFLAGS([minimal_macosx],            [-Wl,-framework,Carbon])
+  VLC_ADD_LDFLAGS([minimal_macosx],            [-Wl,-framework,CoreServices])
+  VLC_ADD_LDFLAGS([minimal_macosx],            [-Wl,-framework,AGL])
+
+  VLC_ADD_LDFLAGS([qtcapture],                        [-Wl,-framework,QTKit])
+  VLC_ADD_LDFLAGS([qtcapture],                        [-Wl,-framework,CoreAudio])
+  VLC_ADD_LDFLAGS([opengllayer qtcapture],            [-Wl,-framework,QuartzCore])
+  VLC_ADD_LDFLAGS([qtcapture],                        [-Wl,-framework,CoreVideo])
+  VLC_ADD_OBJCFLAGS([minimal_macosx opengllayer], [-fobjc-exceptions] )
+
+  VLC_ADD_PLUGIN([qtcapture])
+  VLC_ADD_PLUGIN([minimal_macosx])
+  VLC_ADD_PLUGIN([opengllayer])
+fi
+
 dnl
 dnl  QNX RTOS module
 dnl
@@ -5266,7 +5267,6 @@ AC_CONFIG_FILES([
   modules/gui/qnx/Makefile
   modules/gui/qt4/Makefile
   modules/gui/skins2/Makefile
-  modules/gui/wince/Makefile
   modules/meta_engine/Makefile
   modules/misc/Makefile
   modules/misc/dummy/Makefile