From 8240dea40051b70976eb3463656befeb2e84fb01 Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Wed, 14 Sep 2011 14:03:34 +0000 Subject: [PATCH] Update configure to only define wxUSE_WEBVIEW_WEBKIT if all the required components are available. Fixes #13474 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 86 +++++++++++++++++++--------------------------------- configure.in | 62 ++++++++++++++++++------------------- 2 files changed, 61 insertions(+), 87 deletions(-) diff --git a/configure b/configure index cf8687b94e..c0fac53be8 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id. +# From configure.in Id: configure.in 69077 2011-09-13 12:06:06Z SJL . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for wxWidgets 2.9.3. # @@ -48415,9 +48415,6 @@ _ACEOF SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview" if test "$wxUSE_WEBVIEW_WEBKIT" = "yes" -a "$wxUSE_GTK" = 1; then - cat >>confdefs.h <<\_ACEOF -#define wxUSE_WEBVIEW_WEBKIT 1 -_ACEOF { echo "$as_me:$LINENO: checking for webkitgtk libraries" >&5 echo $ECHO_N "checking for webkitgtk libraries... $ECHO_C" >&6; } @@ -48453,18 +48450,8 @@ echo $ECHO_N "checking for webkitgtk libraries... $ECHO_C" >&6; } GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwebkitgtk-1.0" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - { echo "$as_me:$LINENO: WARNING: libwebkitgtk-1.0 not found; disabling webkit backend" >&5 -echo "$as_me: WARNING: libwebkitgtk-1.0 not found; disabling webkit backend" >&2;} - cat >>confdefs.h <<\_ACEOF -#define wxUSE_WEBVIEW_WEBKIT 0 -_ACEOF - - fi - { echo "$as_me:$LINENO: checking for webkitgtk includes" >&5 + { echo "$as_me:$LINENO: checking for webkitgtk includes" >&5 echo $ECHO_N "checking for webkitgtk includes... $ECHO_C" >&6; } ac_find_includes= @@ -48476,8 +48463,8 @@ for ac_dir in $SEARCH_INCLUDE /usr/include/webkit-1.0 /usr/include 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 @@ -48492,18 +48479,9 @@ echo "${ECHO_T}found in $ac_find_includes" >&6; } fi fi - CPPFLAGS="$ac_path_to_include $CPPFLAGS" - else - { echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6; } - { echo "$as_me:$LINENO: WARNING: webkit includes not found; disabling webkit backend" >&5 -echo "$as_me: WARNING: webkit includes not found; disabling webkit backend" >&2;} - cat >>confdefs.h <<\_ACEOF -#define wxUSE_WEBVIEW_WEBKIT 0 -_ACEOF + CPPFLAGS="$ac_path_to_include $CPPFLAGS" - fi - { echo "$as_me:$LINENO: checking for libsoup includes" >&5 + { echo "$as_me:$LINENO: checking for libsoup includes" >&5 echo $ECHO_N "checking for libsoup includes... $ECHO_C" >&6; } ac_find_includes= @@ -48515,8 +48493,8 @@ for ac_dir in $SEARCH_INCLUDE /usr/include/libsoup-2.4 /usr/include 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 @@ -48531,16 +48509,30 @@ echo "${ECHO_T}found in $ac_find_includes" >&6; } fi fi - CPPFLAGS="$ac_path_to_include $CPPFLAGS" - else - { echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6; } - { echo "$as_me:$LINENO: WARNING: libsoup includes not found; disabling webkit backend" >&5 -echo "$as_me: WARNING: libsoup includes not found; disabling webkit backend" >&2;} - cat >>confdefs.h <<\_ACEOF -#define wxUSE_WEBVIEW_WEBKIT 0 + 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 + { 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 "${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 @@ -48604,27 +48596,13 @@ _ACEOF else - { echo "$as_me:$LINENO: WARNING: WebKit headers not found; disabling wxWebView WebKit" >&5 -echo "$as_me: WARNING: WebKit headers not found; disabling wxWebView WebKit" >&2;} - cat >>confdefs.h <<\_ACEOF -#define wxUSE_WEBVIEW_WEBKIT 0 -_ACEOF - + { 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 CPPFLAGS="$old_CPPFLAGS" - elif test "$wxUSE_OLD_COCOA" = 1; then - cat >>confdefs.h <<\_ACEOF -#define wxUSE_WEBVIEW_WEBKIT 1 -_ACEOF - - else - cat >>confdefs.h <<\_ACEOF -#define wxUSE_WEBVIEW_WEBKIT 0 -_ACEOF - fi fi diff --git a/configure.in b/configure.in index 6013fb588b..b6ee81b73d 100644 --- a/configure.in +++ b/configure.in @@ -7373,7 +7373,7 @@ if test "$wxUSE_WEBVIEW" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview" if test "$wxUSE_WEBVIEW_WEBKIT" = "yes" -a "$wxUSE_GTK" = 1; then - AC_DEFINE(wxUSE_WEBVIEW_WEBKIT) + AC_MSG_CHECKING([for webkitgtk libraries]) WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],webkitgtk-1.0) if test "$ac_find_libraries" != "" ; then @@ -7383,34 +7383,35 @@ if test "$wxUSE_WEBVIEW" = "yes"; then fi GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwebkitgtk-1.0" AC_MSG_RESULT([yes]) + + AC_MSG_CHECKING(for webkitgtk includes) + WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /usr/include/webkit-1.0], webkit/webkit.h) + if test "$ac_find_includes" != "" ; then + AC_MSG_RESULT(found in $ac_find_includes) + WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS) + CPPFLAGS="$ac_path_to_include $CPPFLAGS" + + dnl we also depend on libsoup + AC_MSG_CHECKING(for libsoup includes) + WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /usr/include/libsoup-2.4], libsoup/soup.h) + if test "$ac_find_includes" != "" ; then + AC_MSG_RESULT(found in $ac_find_includes) + WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS) + CPPFLAGS="$ac_path_to_include $CPPFLAGS" + + #if we have all the requirements then enable this backend + AC_DEFINE(wxUSE_WEBVIEW_WEBKIT) + else + AC_MSG_RESULT([not found]) + AC_MSG_WARN([libsoup headers not found; disabling webkit backend]) + fi + else + AC_MSG_RESULT([not found]) + AC_MSG_WARN([webkit headers not found; disabling webkit backend]) + fi else AC_MSG_RESULT([no]) - AC_MSG_WARN([libwebkitgtk-1.0 not found; disabling webkit backend]) - AC_DEFINE(wxUSE_WEBVIEW_WEBKIT, 0) - fi - - AC_MSG_CHECKING(for webkitgtk includes) - WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /usr/include/webkit-1.0], webkit/webkit.h) - if test "$ac_find_includes" != "" ; then - AC_MSG_RESULT(found in $ac_find_includes) - WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS) - CPPFLAGS="$ac_path_to_include $CPPFLAGS" - else - AC_MSG_RESULT([not found]) - AC_MSG_WARN([webkit includes not found; disabling webkit backend]) - AC_DEFINE(wxUSE_WEBVIEW_WEBKIT, 0) - fi - dnl we also depend on libsoup - AC_MSG_CHECKING(for libsoup includes) - WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /usr/include/libsoup-2.4], libsoup/soup.h) - if test "$ac_find_includes" != "" ; then - AC_MSG_RESULT(found in $ac_find_includes) - WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS) - CPPFLAGS="$ac_path_to_include $CPPFLAGS" - else - AC_MSG_RESULT([not found]) - AC_MSG_WARN([libsoup includes not found; disabling webkit backend]) - AC_DEFINE(wxUSE_WEBVIEW_WEBKIT, 0) + AC_MSG_WARN([webkit libraries not found; disabling webkit backend]) fi fi @@ -7423,18 +7424,13 @@ if test "$wxUSE_WEBVIEW" = "yes"; then WEBKIT_LINK="-framework WebKit" ], [ - AC_MSG_WARN([WebKit headers not found; disabling wxWebView WebKit]) - AC_DEFINE(wxUSE_WEBVIEW_WEBKIT, 0) + AC_MSG_WARN([webkit headers not found; disabling webkit backend]) ], [ #include #include ]) CPPFLAGS="$old_CPPFLAGS" - elif test "$wxUSE_OLD_COCOA" = 1; then - AC_DEFINE(wxUSE_WEBVIEW_WEBKIT) - else - AC_DEFINE(wxUSE_WEBVIEW_WEBKIT, 0) fi fi -- 2.45.2