From 07bea8f0a02d7cd922233c2dc200c0b11105c5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 22 Jul 2004 07:37:44 +0000 Subject: [PATCH] detect WebKit availability git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 92 +++++++++++++++++++++++++++++++++++++++++++++++++--- configure.in | 26 ++++++++++++--- 2 files changed, 109 insertions(+), 9 deletions(-) diff --git a/configure b/configure index b51edb47c2..92e3ecea5d 100755 --- a/configure +++ b/configure @@ -36894,10 +36894,16 @@ _ACEOF fi if test "$wxUSE_EXCEPTIONS" = "yes"; then - cat >>confdefs.h <<\_ACEOF + if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then + { echo "$as_me:$LINENO: WARNING: --enable-exceptions can't be used with --enable-no_exceptions" >&5 +echo "$as_me: WARNING: --enable-exceptions can't be used with --enable-no_exceptions" >&2;} + else + cat >>confdefs.h <<\_ACEOF #define wxUSE_EXCEPTIONS 1 _ACEOF + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS except" + fi fi USE_HTML=0 @@ -36912,14 +36918,87 @@ _ACEOF SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/htmlctrl" fi fi - if test "$wxUSE_WEBKIT" = "yes"; then - cat >>confdefs.h <<\_ACEOF + if test "$wxUSE_MAC" = 1; then + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -x objective-c++" + 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 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_WebKit_HIWebView_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_WebKit_HIWebView_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_WebKit_HIWebView_h" >&5 +echo "${ECHO_T}$ac_cv_header_WebKit_HIWebView_h" >&6 +if test $ac_cv_header_WebKit_HIWebView_h = yes; then + + cat >>confdefs.h <<\_ACEOF #define wxUSE_WEBKIT 1 _ACEOF + WEBKIT_LINK="-framework WebKit" + +else + + { echo "$as_me:$LINENO: WARNING: WebKit headers not found; disabling wxWebKit" >&5 +echo "$as_me: WARNING: WebKit headers not found; disabling wxWebKit" >&2;} + wxUSE_WEBKIT=no + fi + + CPPFLAGS="$old_CPPFLAGS" + elif test "$wxUSE_COCOA" = 1; then + cat >>confdefs.h <<\_ACEOF +#define wxUSE_WEBKIT 1 +_ACEOF + + else + wxUSE_WEBKIT=no + fi +fi + + if test "$wxUSE_MENUS" = "yes"; then cat >>confdefs.h <<\_ACEOF #define wxUSE_MENUS 1 @@ -37194,7 +37273,10 @@ fi if test "$wxUSE_MAC" = 1 ; then - LDFLAGS="$LDFLAGS -framework Carbon -framework Cocoa -framework WebKit -framework System" + if test "$wxUSE_SOUND" = "yes"; then + LDFLAGS="$LDFLAGS -framework QuickTime" + fi + LDFLAGS="$LDFLAGS -framework Carbon -framework Cocoa -framework System" fi if test "$wxUSE_COCOA" = 1 ; then LDFLAGS="$LDFLAGS -framework Cocoa -framework System" @@ -37672,7 +37754,7 @@ EXTRALIBS_XML="$EXPAT_LINK" EXTRALIBS_HTML="$MSPACK_LINK" EXTRALIBS_ODBC="$ODBC_LINK" if test "$wxUSE_GUI" = "yes"; then - EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK | sed 's/ \+/ /g'` + EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $WEBKIT_LINK | sed 's/ \+/ /g'` fi if test "$wxUSE_OPENGL" = "yes"; then EXTRALIBS_OPENGL="$LDFLAGS_GL $OPENGL_LIBS" diff --git a/configure.in b/configure.in index e692124502..9d40bf52bd 100644 --- a/configure.in +++ b/configure.in @@ -5638,11 +5638,29 @@ if test "$wxUSE_HTML" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/htmlctrl" fi fi - if test "$wxUSE_WEBKIT" = "yes"; then - AC_DEFINE(wxUSE_WEBKIT) + if test "$wxUSE_MAC" = 1; then + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -x objective-c++" + AC_CHECK_HEADER([WebKit/HIWebView.h], + [ + AC_DEFINE(wxUSE_WEBKIT) + WEBKIT_LINK="-framework WebKit" + ], + [ + AC_MSG_WARN([WebKit headers not found; disabling wxWebKit]) + wxUSE_WEBKIT=no + ], + [#include ]) + CPPFLAGS="$old_CPPFLAGS" + elif test "$wxUSE_COCOA" = 1; then + AC_DEFINE(wxUSE_WEBKIT) + else + wxUSE_WEBKIT=no + fi fi + if test "$wxUSE_MENUS" = "yes"; then AC_DEFINE(wxUSE_MENUS) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS menu" @@ -5855,7 +5873,7 @@ if test "$wxUSE_MAC" = 1 ; then if test "$wxUSE_SOUND" = "yes"; then LDFLAGS="$LDFLAGS -framework QuickTime" fi - LDFLAGS="$LDFLAGS -framework Carbon -framework Cocoa -framework WebKit -framework System" + LDFLAGS="$LDFLAGS -framework Carbon -framework Cocoa -framework System" fi if test "$wxUSE_COCOA" = 1 ; then LDFLAGS="$LDFLAGS -framework Cocoa -framework System" @@ -5958,7 +5976,7 @@ EXTRALIBS_XML="$EXPAT_LINK" EXTRALIBS_HTML="$MSPACK_LINK" EXTRALIBS_ODBC="$ODBC_LINK" if test "$wxUSE_GUI" = "yes"; then - EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK | sed 's/ \+/ /g'` + EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $WEBKIT_LINK | sed 's/ \+/ /g'` fi if test "$wxUSE_OPENGL" = "yes"; then EXTRALIBS_OPENGL="$LDFLAGS_GL $OPENGL_LIBS"