]> git.saurik.com Git - wxWidgets.git/commitdiff
implement 'auto' mode for both wxMediaCtrl and OpenGL
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Mon, 8 Dec 2008 23:19:37 +0000 (23:19 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Mon, 8 Dec 2008 23:19:37 +0000 (23:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in

index 234598f7b63da8a9aafbc5f12b3c74940f50e7a1..77599b0a7db86a014ee9e17da6c0f6049243d803 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Id: configure.in 57199 2008-12-08 16:51:43Z FM .
+# From configure.in Id: configure.in 57205 2008-12-08 19:33:08Z FM .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
 #
@@ -2966,6 +2966,9 @@ DEFAULT_wxUSE_TAB_DIALOG=no
 DEFAULT_wxUSE_GSTREAMER8=no
 
 DEFAULT_wxUSE_UNICODE_UTF8=auto
+DEFAULT_wxUSE_OPENGL=auto
+DEFAULT_wxUSE_MEDIACTRL=auto
+
 DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no
 
 DEFAULT_wxUSE_UNIVERSAL_BINARY=no
@@ -33125,7 +33128,7 @@ fi
 
 
 USE_OPENGL=0
-if test "$wxUSE_OPENGL" = "yes"; then
+if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then
     if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = 1; then
         { echo "$as_me:$LINENO: WARNING: wxGLCanvas not implemented for this port, library will be compiled without it." >&5
 echo "$as_me: WARNING: wxGLCanvas not implemented for this port, library will be compiled without it." >&2;}
 
 
         if test "x$OPENGL_LIBS" = "x"; then
-            { echo "$as_me:$LINENO: WARNING: OpenGL libraries not available, disabling support for OpenGL" >&5
+            if test "$wxUSE_OPENGL" = "yes"; then
+                { { echo "$as_me:$LINENO: error: OpenGL libraries not available" >&5
+echo "$as_me: error: OpenGL libraries not available" >&2;}
+   { (exit 1); exit 1; }; }
+            else
+                                { echo "$as_me:$LINENO: WARNING: OpenGL libraries not available, disabling support for OpenGL" >&5
 echo "$as_me: WARNING: OpenGL libraries not available, disabling support for OpenGL" >&2;}
-            wxUSE_OPENGL=no
-            USE_OPENGL=0
+                wxUSE_OPENGL=no
+                USE_OPENGL=0
+            fi
+        else
+                        wxUSE_OPENGL=yes
         fi
     fi
 
@@ -46841,7 +46852,7 @@ fi
 
 USE_MEDIA=0
 
-if test "$wxUSE_MEDIACTRL" = "yes"; then
+if test "$wxUSE_MEDIACTRL" = "yes" -o "$wxUSE_MEDIACTRL" = "auto"; then
     USE_MEDIA=1
 
                 if test "$wxUSE_GTK" = 1; then
@@ -47037,6 +47048,15 @@ _ACEOF
 #define wxUSE_MEDIACTRL 1
 _ACEOF
 
+    else
+        if test "$wxUSE_MEDIACTRL" = "yes"; then
+            { { echo "$as_me:$LINENO: error: GStreamer not available" >&5
+echo "$as_me: error: GStreamer not available" >&2;}
+   { (exit 1); exit 1; }; }
+        else
+                        { echo "$as_me:$LINENO: WARNING: GStreamer not available... disabling wxMediaCtrl" >&5
+echo "$as_me: WARNING: GStreamer not available... disabling wxMediaCtrl" >&2;}
+        fi
     fi
 fi
 
index df0e3ee75d4b396cdb00239d762d70d2f0f9e5c6..9531580a93a6447076145af2fd92fda498d1b80b 100644 (file)
@@ -375,7 +375,11 @@ DEFAULT_wxUSE_IPV6=no
 DEFAULT_wxUSE_TAB_DIALOG=no
 DEFAULT_wxUSE_GSTREAMER8=no
 
+dnl automatic features
 DEFAULT_wxUSE_UNICODE_UTF8=auto
+DEFAULT_wxUSE_OPENGL=auto
+DEFAULT_wxUSE_MEDIACTRL=auto
+
 DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no
 
 dnl Mac/Cocoa users need to enable building universal binaries explicitly
@@ -3627,7 +3631,7 @@ dnl OpenGL libraries
 dnl ---------------------------------------------------------------------------
 
 USE_OPENGL=0
-if test "$wxUSE_OPENGL" = "yes"; then
+if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then
     if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = 1; then
         AC_MSG_WARN([wxGLCanvas not implemented for this port, library will be compiled without it.])
         wxUSE_OPENGL="no"
@@ -3702,9 +3706,17 @@ if test "$wxUSE_OPENGL" = "yes"; then
         [ ])
 
         if test "x$OPENGL_LIBS" = "x"; then
-            AC_MSG_WARN([OpenGL libraries not available, disabling support for OpenGL])
-            wxUSE_OPENGL=no
-            USE_OPENGL=0
+            if test "$wxUSE_OPENGL" = "yes"; then
+                AC_MSG_ERROR([OpenGL libraries not available])
+            else
+                dnl case wxUSE_OPENGL=auto
+                AC_MSG_WARN([OpenGL libraries not available, disabling support for OpenGL])
+                wxUSE_OPENGL=no
+                USE_OPENGL=0
+            fi
+        else
+            dnl libraries are available... change 'auto' in 'yes'
+            wxUSE_OPENGL=yes
         fi
     fi
 
@@ -7200,7 +7212,7 @@ dnl ---------------------------------------------------------------------------
 
 USE_MEDIA=0
 
-if test "$wxUSE_MEDIACTRL" = "yes"; then
+if test "$wxUSE_MEDIACTRL" = "yes" -o "$wxUSE_MEDIACTRL" = "auto"; then
     USE_MEDIA=1
 
     dnl -----------------------------------------------------------------------
@@ -7261,6 +7273,13 @@ if test "$wxUSE_MEDIACTRL" = "yes"; then
     if test $USE_MEDIA = 1; then
         SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mediaplayer"
         AC_DEFINE(wxUSE_MEDIACTRL)
+    else
+        if test "$wxUSE_MEDIACTRL" = "yes"; then
+            AC_MSG_ERROR([GStreamer not available])
+        else
+            dnl was set to 'auto'
+            AC_MSG_WARN([GStreamer not available... disabling wxMediaCtrl])
+        fi
     fi
 fi