From f03637a24d22df88de2fc5abcd2a04fb970d5372 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Mon, 8 Dec 2008 23:19:37 +0000 Subject: [PATCH] implement 'auto' mode for both wxMediaCtrl and OpenGL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 32 ++++++++++++++++++++++++++------ configure.in | 29 ++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 234598f7b6..77599b0a7d 100755 --- 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;} @@ -33392,10 +33395,18 @@ fi 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 diff --git a/configure.in b/configure.in index df0e3ee75d..9531580a93 100644 --- a/configure.in +++ b/configure.in @@ -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 -- 2.45.2