]> git.saurik.com Git - wxWidgets.git/commitdiff
Update configure.in to use pkg_config to find the webkit hearers and libraries. Regen...
authorSteve Lamerton <steve.lamerton@gmail.com>
Sun, 26 Feb 2012 18:36:07 +0000 (18:36 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Sun, 26 Feb 2012 18:36:07 +0000 (18:36 +0000)
Fixes #14015

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in

index 0b304e68e4b791913ffae6fd38e2c92463436229..8a64cb055eb9a17cc04255e6408c263b3697aef6 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Id.
+# From configure.in Id: configure.in 70353 2012-01-15 14:46:41Z VZ .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for wxWidgets 2.9.4.
 #
@@ -727,6 +727,8 @@ HILDON2_CFLAGS
 HILDON2_LIBS
 PYTHON
 COND_PYTHON
+WEBKIT_CFLAGS
+WEBKIT_LIBS
 CAIRO_CFLAGS
 CAIRO_LIBS
 GST_CFLAGS
@@ -1112,6 +1114,8 @@ HILDON_CFLAGS
 HILDON_LIBS
 HILDON2_CFLAGS
 HILDON2_LIBS
+WEBKIT_CFLAGS
+WEBKIT_LIBS
 CAIRO_CFLAGS
 CAIRO_LIBS
 GST_CFLAGS
@@ -2071,6 +2075,9 @@ Some influential environment variables:
               C compiler flags for HILDON2, overriding pkg-config
   HILDON2_LIBS
               linker flags for HILDON2, overriding pkg-config
+  WEBKIT_CFLAGS
+              C compiler flags for WEBKIT, overriding pkg-config
+  WEBKIT_LIBS linker flags for WEBKIT, overriding pkg-config
   CAIRO_CFLAGS
               C compiler flags for CAIRO, overriding pkg-config
   CAIRO_LIBS  linker flags for CAIRO, overriding pkg-config
@@ -30085,7 +30092,7 @@ main ()
              gtk_major_version, gtk_minor_version, gtk_micro_version);
       printf ("*** was found! If pkg-config was correct, then it is best\n");
       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
-      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+      printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
       printf("*** required on your system.\n");
       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
@@ -30121,7 +30128,7 @@ main ()
         printf("*** being found. The easiest way to fix this is to remove the old version\n");
         printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
-        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+        printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
         printf("*** so that the correct libraries are found at run-time))\n");
       }
     }
@@ -30235,7 +30242,7 @@ else
 sed 's/^/| /' conftest.$ac_ext >&5
 
         echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."
+          echo "*** exact error that occurred. This usually means GTK+ is incorrectly installed."
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -30402,7 +30409,7 @@ main ()
              gtk_major_version, gtk_minor_version, gtk_micro_version);
       printf ("*** was found! If gtk-config was correct, then it is best\n");
       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
-      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+      printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
       printf("*** required on your system.\n");
       printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
@@ -30441,7 +30448,7 @@ main ()
         printf("*** being found. The easiest way to fix this is to remove the old version\n");
         printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
         printf("*** correct copy of gtk-config. (In this case, you will have to\n");
-        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+        printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
         printf("*** so that the correct libraries are found at run-time))\n");
       }
     }
@@ -30560,7 +30567,7 @@ else
 sed 's/^/| /' conftest.$ac_ext >&5
 
         echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
+          echo "*** exact error that occurred. This usually means GTK was incorrectly installed"
           echo "*** or that you have moved GTK since it was installed. In the latter case, you"
           echo "*** may want to edit the gtk-config script: $GTK_CONFIG"
 fi
@@ -30727,7 +30734,7 @@ main ()
              gtk_major_version, gtk_minor_version, gtk_micro_version);
       printf ("*** was found! If gtk-config was correct, then it is best\n");
       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
-      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+      printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
       printf("*** required on your system.\n");
       printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
@@ -30766,7 +30773,7 @@ main ()
         printf("*** being found. The easiest way to fix this is to remove the old version\n");
         printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
         printf("*** correct copy of gtk-config. (In this case, you will have to\n");
-        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+        printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
         printf("*** so that the correct libraries are found at run-time))\n");
       }
     }
@@ -30885,7 +30892,7 @@ else
 sed 's/^/| /' conftest.$ac_ext >&5
 
         echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
+          echo "*** exact error that occurred. This usually means GTK was incorrectly installed"
           echo "*** or that you have moved GTK since it was installed. In the latter case, you"
           echo "*** may want to edit the gtk-config script: $GTK_CONFIG"
 fi
@@ -46674,7 +46681,7 @@ else
 sed 's/^/| /' conftest.$ac_ext >&5
 
         echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means SDL was incorrectly installed"
+          echo "*** exact error that occurred. This usually means SDL was incorrectly installed"
           echo "*** or that you have moved SDL since it was installed. In the latter case, you"
           echo "*** may want to edit the sdl-config script: $SDL_CONFIG"
 fi
@@ -50626,120 +50633,85 @@ if test "$wxUSE_WEBVIEW" = "yes"; then
     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=
-  for ac_dir in  $SEARCH_LIB
-  do
-    for ac_extension in a so sl dylib dll.a; do
-      if test -f "$ac_dir/libwebkitgtk-1.0.$ac_extension"; then
-        ac_find_libraries=$ac_dir
-        break 2
-      fi
-    done
-  done
-
-            if test "$ac_find_libraries" != "" ; then
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for WEBKIT" >&5
+echo $ECHO_N "checking for WEBKIT... $ECHO_C" >&6; }
 
-    if test "$ac_find_libraries" = "default location"; then
-    ac_path_to_link=""
-  else
-    echo "$LDFLAGS" | grep "\-L$ac_find_libraries" > /dev/null
-    result=$?
-    if test $result = 0; then
-      ac_path_to_link=""
+if test -n "$PKG_CONFIG"; then
+    if test -n "$WEBKIT_CFLAGS"; then
+        pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
     else
-      ac_path_to_link=" -L$ac_find_libraries"
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"webkit-1.0 >= 1.3.1\"") >&5
+  ($PKG_CONFIG --exists --print-errors "webkit-1.0 >= 1.3.1") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "webkit-1.0 >= 1.3.1" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
     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
-echo "${ECHO_T}yes" >&6; }
+else
+       pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$WEBKIT_LIBS"; then
+        pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"webkit-1.0 >= 1.3.1\"") >&5
+  ($PKG_CONFIG --exists --print-errors "webkit-1.0 >= 1.3.1") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "webkit-1.0 >= 1.3.1" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
 
-                { 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
-  do
-    if test -f "$ac_dir/webkit/webkit.h"; then
-      ac_find_includes=$ac_dir
-      break
-    fi
-  done
 
-                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 $pkg_failed = yes; then
 
-    if test "x$ac_find_includes" = "x/usr/include"; then
-    ac_path_to_include=""
-  else
-    echo "$CPPFLAGS" | grep "\-I$ac_find_includes" > /dev/null
-    result=$?
-    if test $result = 0; then
-      ac_path_to_include=""
-    else
-      ac_path_to_include=" -I$ac_find_includes"
-    fi
-  fi
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "webkit-1.0 >= 1.3.1"`
+        else
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "webkit-1.0 >= 1.3.1"`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$WEBKIT_PKG_ERRORS" >&5
 
-                   CPPFLAGS="$ac_path_to_include $CPPFLAGS"
 
-                                      { echo "$as_me:$LINENO: checking for libsoup headers" >&5
-echo $ECHO_N "checking for libsoup headers... $ECHO_C" >&6; }
+                                { echo "$as_me:$LINENO: WARNING: webkitgtk not found." >&5
+echo "$as_me: WARNING: webkitgtk not found." >&2;}
 
-ac_find_includes=
-for ac_dir in $SEARCH_INCLUDE /usr/include/libsoup-2.4 /usr/include
-  do
-    if test -f "$ac_dir/libsoup/soup.h"; then
-      ac_find_includes=$ac_dir
-      break
-    fi
-  done
+elif test $pkg_failed = untried; then
 
-                   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; }
+                                { echo "$as_me:$LINENO: WARNING: webkitgtk not found." >&5
+echo "$as_me: WARNING: webkitgtk not found." >&2;}
 
-    if test "x$ac_find_includes" = "x/usr/include"; then
-    ac_path_to_include=""
-  else
-    echo "$CPPFLAGS" | grep "\-I$ac_find_includes" > /dev/null
-    result=$?
-    if test $result = 0; then
-      ac_path_to_include=""
-    else
-      ac_path_to_include=" -I$ac_find_includes"
-    fi
-  fi
+else
+       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
+       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
-                       CPPFLAGS="$ac_path_to_include $CPPFLAGS"
+                                USE_WEBVIEW_WEBKIT=1
+                                CPPFLAGS="$CPPFLAGS $WEBKIT_CFLAGS"
+                                GUI_TK_LIBRARY="$GUI_TK_LIBRARY $WEBKIT_LIBS"
 
-                       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: 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
         elif test "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then
                                     old_CPPFLAGS="$CPPFLAGS"
             CPPFLAGS="-x objective-c++ $CPPFLAGS"
@@ -56503,6 +56475,8 @@ HILDON2_CFLAGS!$HILDON2_CFLAGS$ac_delim
 HILDON2_LIBS!$HILDON2_LIBS$ac_delim
 PYTHON!$PYTHON$ac_delim
 COND_PYTHON!$COND_PYTHON$ac_delim
+WEBKIT_CFLAGS!$WEBKIT_CFLAGS$ac_delim
+WEBKIT_LIBS!$WEBKIT_LIBS$ac_delim
 CAIRO_CFLAGS!$CAIRO_CFLAGS$ac_delim
 CAIRO_LIBS!$CAIRO_LIBS$ac_delim
 GST_CFLAGS!$GST_CFLAGS$ac_delim
@@ -56584,8 +56558,6 @@ SHARED_LD_CC!$SHARED_LD_CC$ac_delim
 SHARED_LD_CXX!$SHARED_LD_CXX$ac_delim
 SHARED_LD_MODULE_CC!$SHARED_LD_MODULE_CC$ac_delim
 SHARED_LD_MODULE_CXX!$SHARED_LD_MODULE_CXX$ac_delim
-PIC_FLAG!$PIC_FLAG$ac_delim
-WINDOWS_IMPLIB!$WINDOWS_IMPLIB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -56627,6 +56599,8 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+PIC_FLAG!$PIC_FLAG$ac_delim
+WINDOWS_IMPLIB!$WINDOWS_IMPLIB$ac_delim
 USE_SOVERSION!$USE_SOVERSION$ac_delim
 USE_SOVERLINUX!$USE_SOVERLINUX$ac_delim
 USE_SOVERSOLARIS!$USE_SOVERSOLARIS$ac_delim
@@ -56722,8 +56696,6 @@ COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1!$COND_PLATFORM_MACOSX_1_TOOL
 COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0!$COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0$ac_delim
 COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1!$COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1$ac_delim
 COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0!$COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0$ac_delim
-COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1!$COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1$ac_delim
-COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0!$COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -56765,6 +56737,8 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1!$COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1$ac_delim
+COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0!$COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0$ac_delim
 COND_PLATFORM_MACOSX_1_USE_GUI_1!$COND_PLATFORM_MACOSX_1_USE_GUI_1$ac_delim
 COND_PLATFORM_MACOSX_1_USE_OPENGL_1!$COND_PLATFORM_MACOSX_1_USE_OPENGL_1$ac_delim
 COND_PLATFORM_MACOSX_1_USE_SOVERSION_1!$COND_PLATFORM_MACOSX_1_USE_SOVERSION_1$ac_delim
@@ -56860,8 +56834,6 @@ COND_USE_SOVERSION_0!$COND_USE_SOVERSION_0$ac_delim
 COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1!$COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1$ac_delim
 COND_USE_SOVERSOLARIS_1!$COND_USE_SOVERSOLARIS_1$ac_delim
 COND_USE_STC_1!$COND_USE_STC_1$ac_delim
-COND_USE_THREADS_0!$COND_USE_THREADS_0$ac_delim
-COND_USE_THREADS_1!$COND_USE_THREADS_1$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -56903,6 +56875,8 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+COND_USE_THREADS_0!$COND_USE_THREADS_0$ac_delim
+COND_USE_THREADS_1!$COND_USE_THREADS_1$ac_delim
 COND_USE_XRC_1!$COND_USE_XRC_1$ac_delim
 COND_WINDOWS_IMPLIB_1!$COND_WINDOWS_IMPLIB_1$ac_delim
 COND_WITH_PLUGIN_SDL_1!$COND_WITH_PLUGIN_SDL_1$ac_delim
@@ -56967,7 +56941,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index 98e0a463dd56ffd75bdb62e0a561a032135666c1..16bd623c6095dffbc7d1a698ae34b13e17d9441e 100644 (file)
@@ -7269,44 +7269,16 @@ if test "$wxUSE_WEBVIEW" = "yes"; then
     USE_WEBVIEW_WEBKIT=0
     if test "$wxUSE_WEBVIEW_WEBKIT" = "yes"; then
         if test "$wxUSE_GTK" = 1; then
-            AC_MSG_CHECKING([for webkitgtk libraries])
-            WX_PATH_FIND_LIBRARIES(webkitgtk-1.0)
-            if test "$ac_find_libraries" != "" ; then
-                WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
-                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"
-                AC_MSG_RESULT([yes])
-           
-                AC_MSG_CHECKING(for webkitgtk headers)
-                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 headers)
-                   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"
-
-                       USE_WEBVIEW_WEBKIT=1
-                   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([WebKit libraries not found; disabling WebKit backend])
-            fi
+            PKG_CHECK_MODULES([WEBKIT],
+                              [webkit-1.0 >= 1.3.1],
+                              [
+                                USE_WEBVIEW_WEBKIT=1
+                                CPPFLAGS="$CPPFLAGS $WEBKIT_CFLAGS"
+                                GUI_TK_LIBRARY="$GUI_TK_LIBRARY $WEBKIT_LIBS"
+                              ],
+                              [
+                                AC_MSG_WARN([webkitgtk not found.])
+                              ])
         elif test "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then
             dnl Under Mac we always have the libraries but check for the
             dnl headers