SVN:(VZ)[69108] Only define wxUSE_WEBVIEW if wxWebView is really available.

84 views
Skip to first unread message

nor...@wxsite.net

unread,
Sep 16, 2011, 6:44:17 PM9/16/11
to wx-commi...@googlegroups.com
Revision
69108
Author
VZ
Date
2011-09-16 15:44:17 -0700 (Fri, 16 Sep 2011)

Log Message

Only define wxUSE_WEBVIEW if wxWebView is really available.

Don't define wxUSE_WEBVIEW in configure if WebKit is not available under Unix (we should also check for wxUSE_WEBVIEW_IE under Windows later) and add the check that either wxUSE_WEBVIEW_WEBKIT or wxUSE_WEBVIEW_IE is defined if wxUSE_WEBVIEW is to wx/chkconf.h.

This makes it possible to just check for wxUSE_WEBVIEW instead of checking for wxUSE_WEBVIEW && (wxUSE_WEBVIEW_IE || wxUSE_WEBVIEW_WEBKIT) as the code did previously which was ugly and error-prone.

Also, define wxUSE_WEBVIEW_IE in configure under MSW. Currently this supposes that the required IE headers/libraries are available which is probably wrong, we should add checks for them later.

Modified Paths

Diff

Modified: wxWidgets/trunk/configure (69107 => 69108)


--- wxWidgets/trunk/configure	2011-09-16 22:44:11 UTC (rev 69107)
+++ wxWidgets/trunk/configure	2011-09-16 22:44:17 UTC (rev 69108)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Id: configure.in 69077 2011-09-13 12:06:06Z SJL .
+# From configure.in Id.
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for wxWidgets 2.9.3.
 #
@@ -1799,11 +1799,11 @@
   --enable-mdidoc         use docview architecture with MDI
   --enable-mediactrl      use wxMediaCtrl class
   --enable-gstreamer8     force GStreamer 0.8 instead of 0.10 with the wxMediaCtrl class on unix
-  --enable-webkit         use wxWebKitCtrl (Mac)
   --enable-richtext       use wxRichTextCtrl
   --enable-postscript     use wxPostscriptDC device context (default for gtk+)
   --enable-printarch      use printing architecture
   --enable-svg            use wxSVGFileDC device context
+  --enable-webkit         use wxWebKitCtrl (Mac-only, use wxWebView instead)
   --enable-webview        use wxWebView library
   --enable-graphics_ctx   use graphics context 2D drawing API
   --enable-clipboard      use wxClipboard class
@@ -9422,50 +9422,6 @@
               fi
           fi
 
-          { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-webkit" >&5
-echo $ECHO_N "checking for --${enablestring:-enable}-webkit... $ECHO_C" >&6; }
-          # Check whether --enable-webkit was given.
-if test "${enable_webkit+set}" = set; then
-  enableval=$enable_webkit;
-                          if test "$enableval" = yes; then
-                            wx_cv_use_webkit='wxUSE_WEBKIT=yes'
-                          else
-                            wx_cv_use_webkit='wxUSE_WEBKIT=no'
-                          fi
-
-else
-
-                          wx_cv_use_webkit='wxUSE_WEBKIT=${'DEFAULT_wxUSE_WEBKIT":-$defaultval}"
-
-fi
-
-
-          eval "$wx_cv_use_webkit"
-
-          if test x"$enablestring" = xdisable; then
-            if test $wxUSE_WEBKIT = no; then
-              result=yes
-            else
-              result=no
-            fi
-          else
-            result=$wxUSE_WEBKIT
-          fi
-
-          { echo "$as_me:$LINENO: result: $result" >&5
-echo "${ECHO_T}$result" >&6; }
-
-
-          enablestring=
-          defaultval=$wxUSE_ALL_FEATURES
-          if test -z "$defaultval"; then
-              if test x"$enablestring" = xdisable; then
-                  defaultval=yes
-              else
-                  defaultval=no
-              fi
-          fi
-
           { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-richtext" >&5
 echo $ECHO_N "checking for --${enablestring:-enable}-richtext... $ECHO_C" >&6; }
           # Check whether --enable-richtext was given.
@@ -9642,6 +9598,50 @@
               fi
           fi
 
+          { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-webkit" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-webkit... $ECHO_C" >&6; }
+          # Check whether --enable-webkit was given.
+if test "${enable_webkit+set}" = set; then
+  enableval=$enable_webkit;
+                          if test "$enableval" = yes; then
+                            wx_cv_use_webkit='wxUSE_WEBKIT=yes'
+                          else
+                            wx_cv_use_webkit='wxUSE_WEBKIT=no'
+                          fi
+
+else
+
+                          wx_cv_use_webkit='wxUSE_WEBKIT=${'DEFAULT_wxUSE_WEBKIT":-$defaultval}"
+
+fi
+
+
+          eval "$wx_cv_use_webkit"
+
+          if test x"$enablestring" = xdisable; then
+            if test $wxUSE_WEBKIT = no; then
+              result=yes
+            else
+              result=no
+            fi
+          else
+            result=$wxUSE_WEBKIT
+          fi
+
+          { echo "$as_me:$LINENO: result: $result" >&5
+echo "${ECHO_T}$result" >&6; }
+
+
+          enablestring=
+          defaultval=$wxUSE_ALL_FEATURES
+          if test -z "$defaultval"; then
+              if test x"$enablestring" = xdisable; then
+                  defaultval=yes
+              else
+                  defaultval=no
+              fi
+          fi
+
           { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-webview" >&5
 echo $ECHO_N "checking for --${enablestring:-enable}-webview... $ECHO_C" >&6; }
           # Check whether --enable-webview was given.
@@ -48405,18 +48405,11 @@
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS richtext"
 fi
 
-USE_WEBVIEW=0
 if test "$wxUSE_WEBVIEW" = "yes"; then
-   cat >>confdefs.h <<\_ACEOF
-#define wxUSE_WEBVIEW 1
-_ACEOF
-
-   USE_WEBVIEW=1
-   SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview"
-
-   if test "$wxUSE_WEBVIEW_WEBKIT" = "yes" -a "$wxUSE_GTK" = 1; then
-
-       { echo "$as_me:$LINENO: checking for webkitgtk libraries" >&5
+    USE_WEBVIEW_WEBKIT=0
+    if test "$wxUSE_WEBVIEW_WEBKIT" = "yes"; then
+        if test "$wxUSE_GTK" = 1; then
+            { echo "$as_me:$LINENO: checking for webkitgtk libraries" >&5
 echo $ECHO_N "checking for webkitgtk libraries... $ECHO_C" >&6; }
 
   ac_find_libraries=
@@ -48430,7 +48423,7 @@
     done
   done
 
-       if test "$ac_find_libraries" != "" ; then
+            if test "$ac_find_libraries" != "" ; then
 
     if test "$ac_find_libraries" = "default location"; then
     ac_path_to_link=""
@@ -48444,15 +48437,15 @@
     fi
   fi
 
-           if test "$ac_path_to_link" != " -L/usr/lib" ; then
-               LDFLAGS="$LDFLAGS $ac_path_to_link"
-           fi
-           GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwebkitgtk-1.0"
-           { echo "$as_me:$LINENO: result: yes" >&5
+                if test "$ac_path_to_link" != " -L/usr/lib" ; then
+                    LDFLAGS="$LDFLAGS $ac_path_to_link"
+                fi
+                GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwebkitgtk-1.0"
+                { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
-           { echo "$as_me:$LINENO: checking for webkitgtk includes" >&5
-echo $ECHO_N "checking for webkitgtk includes... $ECHO_C" >&6; }
+                { echo "$as_me:$LINENO: checking for webkitgtk headers" >&5
+echo $ECHO_N "checking for webkitgtk headers... $ECHO_C" >&6; }
 
 ac_find_includes=
 for ac_dir in $SEARCH_INCLUDE /usr/include/webkit-1.0 /usr/include
@@ -48463,8 +48456,8 @@
     fi
   done
 
-           if test "$ac_find_includes" != "" ; then
-               { echo "$as_me:$LINENO: result: found in $ac_find_includes" >&5
+                if test "$ac_find_includes" != "" ; then
+                   { echo "$as_me:$LINENO: result: found in $ac_find_includes" >&5
 echo "${ECHO_T}found in $ac_find_includes" >&6; }
 
     if test "x$ac_find_includes" = "x/usr/include"; then
@@ -48479,10 +48472,10 @@
     fi
   fi
 
-               CPPFLAGS="$ac_path_to_include $CPPFLAGS"
+                   CPPFLAGS="$ac_path_to_include $CPPFLAGS"
 
-                              { echo "$as_me:$LINENO: checking for libsoup includes" >&5
-echo $ECHO_N "checking for libsoup includes... $ECHO_C" >&6; }
+                                      { echo "$as_me:$LINENO: checking for libsoup headers" >&5
+echo $ECHO_N "checking for libsoup headers... $ECHO_C" >&6; }
 
 ac_find_includes=
 for ac_dir in $SEARCH_INCLUDE /usr/include/libsoup-2.4 /usr/include
@@ -48493,8 +48486,8 @@
     fi
   done
 
-               if test "$ac_find_includes" != "" ; then
-                   { echo "$as_me:$LINENO: result: found in $ac_find_includes" >&5
+                   if test "$ac_find_includes" != "" ; then
+                       { echo "$as_me:$LINENO: result: found in $ac_find_includes" >&5
 echo "${ECHO_T}found in $ac_find_includes" >&6; }
 
     if test "x$ac_find_includes" = "x/usr/include"; then
@@ -48509,37 +48502,31 @@
     fi
   fi
 
-                   CPPFLAGS="$ac_path_to_include $CPPFLAGS"
+                       CPPFLAGS="$ac_path_to_include $CPPFLAGS"
 
-                   #if we have all the requirements then enable this backend
-                   cat >>confdefs.h <<\_ACEOF
-#define wxUSE_WEBVIEW_WEBKIT 1
-_ACEOF
-
-               else
+                       USE_WEBVIEW_WEBKIT=1
+                   else
+                       { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+                       { echo "$as_me:$LINENO: WARNING: libsoup headers not found; disabling WebKit backend" >&5
+echo "$as_me: WARNING: libsoup headers not found; disabling WebKit backend" >&2;}
+                   fi
+                else
                    { echo "$as_me:$LINENO: result: not found" >&5
 echo "${ECHO_T}not found" >&6; }
-                   { echo "$as_me:$LINENO: WARNING: libsoup headers not found; disabling webkit backend" >&5
-echo "$as_me: WARNING: libsoup headers not found; disabling webkit backend" >&2;}
-               fi
-           else
-               { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
-               { echo "$as_me:$LINENO: WARNING: webkit headers not found; disabling webkit backend" >&5
-echo "$as_me: WARNING: webkit headers not found; disabling webkit backend" >&2;}
-           fi
-       else
-           { echo "$as_me:$LINENO: result: no" >&5
+                   { echo "$as_me:$LINENO: WARNING: WebKit headers not found; disabling WebKit backend" >&5
+echo "$as_me: WARNING: WebKit headers not found; disabling WebKit backend" >&2;}
+                fi
+            else
+                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-           { echo "$as_me:$LINENO: WARNING: webkit libraries not found; disabling webkit backend" >&5
-echo "$as_me: WARNING: webkit libraries not found; disabling webkit backend" >&2;}
-       fi
-   fi
-
-    if test "$wxUSE_WEBVIEW_WEBKIT" = "yes" -a "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then
-        old_CPPFLAGS="$CPPFLAGS"
-        CPPFLAGS="-x objective-c++ $CPPFLAGS"
-        { echo "$as_me:$LINENO: checking for WebKit/HIWebView.h" >&5
+                { echo "$as_me:$LINENO: WARNING: WebKit libraries not found; disabling WebKit backend" >&5
+echo "$as_me: WARNING: WebKit libraries not found; disabling WebKit backend" >&2;}
+            fi
+        elif test "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then
+                                    old_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="-x objective-c++ $CPPFLAGS"
+            { echo "$as_me:$LINENO: checking for WebKit/HIWebView.h" >&5
 echo $ECHO_N "checking for WebKit/HIWebView.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_WebKit_HIWebView_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -48551,8 +48538,8 @@
 cat >>conftest.$ac_ext <<_ACEOF
@@ Diff output truncated at 10240 characters. @@
Reply all
Reply to author
Forward
0 new messages