]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
Fix best size computation for wxTextCtrl without borders in wxMSW.
[wxWidgets.git] / configure.in
index 69a7babfea60276b61c7a1196729bb4655974091..d639c276386964526cd1ac2a87d01238b41f40c9 100644 (file)
@@ -395,6 +395,8 @@ DEFAULT_wxUSE_UNICODE_UTF8=auto
 DEFAULT_wxUSE_OPENGL=auto
 DEFAULT_wxUSE_MEDIACTRL=auto
 DEFAULT_wxUSE_COMPILER_TLS=auto
+DEFAULT_wxUSE_HOTKEY=auto
+DEFAULT_wxUSE_METAFILE=auto
 
 DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no
 
@@ -848,6 +850,7 @@ WX_ARG_FEATURE(richtext,    [  --enable-richtext       use wxRichTextCtrl], wxUS
 WX_ARG_FEATURE(postscript,  [  --enable-postscript     use wxPostscriptDC device context (default for gtk+)], wxUSE_POSTSCRIPT)
 WX_ARG_FEATURE(printarch,   [  --enable-printarch      use printing architecture], wxUSE_PRINTING_ARCHITECTURE)
 WX_ARG_FEATURE(svg,         [  --enable-svg            use wxSVGFileDC device context], wxUSE_SVG)
+WX_ARG_FEATURE(webview,     [  --enable-webview        use wxWebView library], wxUSE_WEBVIEW)
 
 dnl wxDC is implemented in terms of wxGraphicsContext in wxOSX so the latter
 dnl can't be disabled, don't even provide an option to do it
@@ -861,7 +864,6 @@ dnl ---------------------------------------------------------------------------
 
 WX_ARG_FEATURE(clipboard,   [  --enable-clipboard      use wxClipboard class], wxUSE_CLIPBOARD)
 WX_ARG_FEATURE(dnd,         [  --enable-dnd            use Drag'n'Drop classes], wxUSE_DRAG_AND_DROP)
-WX_ARG_FEATURE(metafile,    [  --enable-metafile       use win32 metafiles], wxUSE_METAFILE)
 
 dnl ---------------------------------------------------------------------------
 dnl optional GUI controls (in alphabetical order except the first one)
@@ -933,6 +935,7 @@ if test "$wxUSE_CONTROLS" = "no"; then
     DEFAULT_wxUSE_TOOLTIPS=no
     DEFAULT_wxUSE_TREEBOOK=no
     DEFAULT_wxUSE_TREECTRL=no
+    DEFAULT_wxUSE_TREELISTCTRL=no
 fi
 
 dnl features affecting multiple controls
@@ -1005,6 +1008,7 @@ WX_ARG_FEATURE(toolbar,     [  --enable-toolbar        use wxToolBar class], wxU
 WX_ARG_FEATURE(toolbook,    [  --enable-toolbook       use wxToolbook class], wxUSE_TOOLBOOK)
 WX_ARG_FEATURE(treebook,    [  --enable-treebook       use wxTreebook class], wxUSE_TREEBOOK)
 WX_ARG_FEATURE(treectrl,    [  --enable-treectrl       use wxTreeCtrl class], wxUSE_TREECTRL)
+WX_ARG_FEATURE(treelist,    [  --enable-treelist       use wxTreeListCtrl class], wxUSE_TREELISTCTRL)
 
 dnl ---------------------------------------------------------------------------
 dnl common dialogs
@@ -1037,12 +1041,14 @@ WX_ARG_FEATURE(splines,     [  --enable-splines        use spline drawing code],
 WX_ARG_FEATURE(mousewheel,  [  --enable-mousewheel     use mousewheel], wxUSE_MOUSEWHEEL)
 WX_ARG_FEATURE(validators,  [  --enable-validators     use wxValidator and derived classes], wxUSE_VALIDATORS)
 WX_ARG_FEATURE(busyinfo,    [  --enable-busyinfo       use wxBusyInfo], wxUSE_BUSYINFO)
+WX_ARG_FEATURE(hotkey,      [  --enable-hotkey         use wxWindow::RegisterHotKey()], wxUSE_HOTKEY)
 WX_ARG_FEATURE(joystick,    [  --enable-joystick       use wxJoystick], wxUSE_JOYSTICK)
-WX_ARG_FEATURE(metafile,    [  --enable-metafiles      use wxMetaFile (Win32 only)], wxUSE_METAFILE)
+WX_ARG_FEATURE(metafile,    [  --enable-metafiles      use wxMetaFile], wxUSE_METAFILE)
 WX_ARG_FEATURE(dragimage,   [  --enable-dragimage      use wxDragImage], wxUSE_DRAGIMAGE)
 WX_ARG_FEATURE(accessibility,[  --enable-accessibility  enable accessibility support], wxUSE_ACCESSIBILITY)
 WX_ARG_FEATURE(uiactionsim,  [  --enable-uiactionsim    use wxUIActionSimulator (experimental)], wxUSE_UIACTIONSIMULATOR)
 WX_ARG_FEATURE(dctransform,  [  --enable-dctransform    use wxDC::SetTransformMatrix and related], wxUSE_DC_TRANSFORM_MATRIX)
+WX_ARG_FEATURE(webviewwebkit,[  --enable-webview-webkit use wxWebView WebKit backend], wxUSE_WEBVIEW_WEBKIT)
 
 dnl ---------------------------------------------------------------------------
 dnl support for image formats that do not rely on external library
@@ -1067,6 +1073,7 @@ WX_ARG_FEATURE(ps-in-msw,   [  --enable-ps-in-msw      use PS printing in wxMSW
 WX_ARG_FEATURE(ownerdrawn,  [  --enable-ownerdrawn     use owner drawn controls (Win32 and OS/2 only)], wxUSE_OWNER_DRAWN)
 WX_ARG_FEATURE(uxtheme,     [  --enable-uxtheme        enable support for Windows XP themed look (Win32 only)], wxUSE_UXTHEME)
 WX_ARG_FEATURE(wxdib,       [  --enable-wxdib          use wxDIB class (Win32 only)], wxUSE_DIB)
+WX_ARG_FEATURE(webviewie,   [  --enable-webview-ie     use wxWebView IE backend (Win32 only)], wxUSE_WEBVIEW_IE)
 
 dnl this one is not really MSW-specific but it exists mainly to be turned off
 dnl under MSW, it should be off by default on the other platforms
@@ -2895,7 +2902,6 @@ if test "$wxUSE_GUI" = "yes"; then
 
     GUI_TK_LIBRARY=
 
-    WXGTK12=
     WXGTK127=
     WXGTK2=
     WXGPE=
@@ -2960,9 +2966,6 @@ if test "$wxUSE_GUI" = "yes"; then
                     esac
 
                     AM_PATH_GTK_2_0(2.4.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES)
-
-                    dnl we use symbols from X11 directly so we should link with it
-                    GTK_LIBS="$GTK_LIBS -lX11"
                 fi
 
                 dnl detect GTK1.x
@@ -2980,6 +2983,9 @@ if test "$wxUSE_GUI" = "yes"; then
                     dnl looks better in AC_MSG_RESULT
                     wx_cv_lib_gtk=none
                 else
+                    dnl we use symbols from X11 directly so we should link with it
+                    GTK_LIBS="$GTK_LIBS -lX11"
+
                     dnl we need to cache GTK_CFLAGS and GTK_LIBS for the
                     dnl subsequent runs
                     wx_cv_cflags_gtk=$GTK_CFLAGS
@@ -2999,10 +3005,8 @@ if test "$wxUSE_GUI" = "yes"; then
                     TOOLKIT_VERSION=2
                     ;;
             1.2.7)  WXGTK127=1
-                    WXGTK12=1
-                    ;;
-            1.2.3)  WXGTK12=1
                     ;;
+            1.2*) ;;
             *)      AC_MSG_ERROR([
 The development files for GTK+ were not found. For GTK+ 2, please
 ensure that pkg-config is in the path and that gtk+-2.0.pc is
@@ -3107,10 +3111,6 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
 
         TOOLKIT_INCLUDE="$wx_cv_cflags_gtk"
         GUI_TK_LIBRARY="$wx_cv_libs_gtk $GUI_TK_LIBRARY"
-
-        dnl disable GTK runtime type checks
-        TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -DG_DISABLE_CAST_CHECKS"
-
         AFMINSTALL=afminstall
         TOOLKIT=GTK
         GUIDIST=GTK_DIST
@@ -5367,11 +5367,6 @@ fi
 
 if test "$WXGTK2" = 1 ; then
   AC_DEFINE_UNQUOTED(__WXGTK20__,$WXGTK2)
-  WXGTK12=1
-fi
-
-if test "$WXGTK12" = 1 ; then
-  AC_DEFINE_UNQUOTED(__WXGTK12__,$WXGTK12)
 fi
 
 if test "$WXGTK127" = 1 ; then
@@ -5408,6 +5403,8 @@ if test "$wxUSE_DEBUG_FLAG" = "no" ; then
     if test "$wxUSE_GTK" = 1 ; then
         if test "x$wxGTK_VERSION" = "x1" ; then
             CPPFLAGS="-DGTK_NO_CHECK_CASTS $CPPFLAGS"
+        else
+            CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS"
         fi
     fi
 fi
@@ -5983,6 +5980,20 @@ if test "$wxUSE_BUSYINFO" = "yes"; then
   AC_DEFINE(wxUSE_BUSYINFO)
 fi
 
+if test "$wxUSE_HOTKEY" = "yes"; then
+  if test "$wxUSE_MSW" != 1 -a "$wxUSE_OSX_COCOA" != 1 -a "$wxUSE_OSX_CARBON" != 1; then
+    AC_MSG_WARN([Hot keys not supported by the current toolkit, disabled])
+    wxUSE_HOTKEY=no
+  fi
+elif test "$wxUSE_HOTKEY" = "auto"; then
+  if test "$wxUSE_MSW" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_OSX_CARBON" = 1; then
+    wxUSE_HOTKEY=yes
+  fi
+fi
+if test "$wxUSE_HOTKEY" = "yes"; then
+  AC_DEFINE(wxUSE_HOTKEY)
+fi
+
 if test "$wxUSE_STD_CONTAINERS" = "yes"; then
   AC_DEFINE(wxUSE_STD_CONTAINERS)
 fi
@@ -6631,7 +6642,7 @@ if test "$wxUSE_SVG" = "yes"; then
 fi
 
 dnl ---------------------------------------------------------------------------
-dnl wxMetafile availability
+dnl wxMetafile
 dnl ---------------------------------------------------------------------------
 
 if test "$wxUSE_METAFILE" = "yes"; then
@@ -6639,6 +6650,18 @@ if test "$wxUSE_METAFILE" = "yes"; then
         AC_MSG_WARN([wxMetafile is not available on this system... disabled])
         wxUSE_METAFILE=no
     fi
+elif test "$wxUSE_METAFILE" = "auto"; then
+    if test "$wxUSE_MSW" = 1 -o "$wxUSE_MAC" = 1 -o "$wxUSE_PM" = 1; then
+        wxUSE_METAFILE=yes
+    fi
+fi
+
+if test "$wxUSE_METAFILE" = "yes"; then
+    AC_DEFINE(wxUSE_METAFILE)
+    if test "$wxUSE_MSW" = 1; then
+        dnl this one should probably be made separately configurable
+        AC_DEFINE(wxUSE_ENH_METAFILE)
+    fi
 fi
 
 dnl ---------------------------------------------------------------------------
@@ -6683,13 +6706,6 @@ if test "$USE_WIN32" = 1 -a \( "$wxUSE_DATAOBJ"       = "yes" \
         wxUSE_DATAOBJ=no
         wxUSE_OLE=no
     fi
-
-    if test "$wxUSE_METAFILE" = "yes"; then
-        AC_DEFINE(wxUSE_METAFILE)
-
-        dnl this one should probably be made separately configurable
-        AC_DEFINE(wxUSE_ENH_METAFILE)
-    fi
 fi
 
 if test "$wxUSE_IPC" = "yes"; then
@@ -6729,13 +6745,6 @@ if test "$wxUSE_CLIPBOARD" = "yes"; then
 fi
 
 if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
-    if test "$wxUSE_GTK" = 1; then
-        if test "$WXGTK12" != 1; then
-            AC_MSG_WARN([Drag and drop is only supported under GTK+ 1.2... disabled])
-            wxUSE_DRAG_AND_DROP=no
-        fi
-    fi
-
     if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_X11" = 1 -o "$wxUSE_MGL" = 1 -o \
             "$wxUSE_DFB" = 1; then
         AC_MSG_WARN([Drag and drop not yet supported under $TOOLKIT... disabled])
@@ -7141,6 +7150,11 @@ if test "$wxUSE_TREECTRL" = "yes"; then
     fi
 fi
 
+if test "$wxUSE_TREECTRL" = "yes"; then
+    AC_DEFINE(wxUSE_TREELISTCTRL)
+    USES_CONTROLS=1
+fi
+
 if test "$wxUSE_POPUPWIN" = "yes"; then
     if test "$wxUSE_OLD_COCOA" = 1 ; then
         AC_MSG_WARN([Popup window not yet supported under Mac OS X... disabled])
@@ -7308,10 +7322,6 @@ if test "$wxUSE_MENUS" = "yes"; then
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS menu"
 fi
 
-if test "$wxUSE_METAFILE" = "yes"; then
-    AC_DEFINE(wxUSE_METAFILE)
-fi
-
 if test "$wxUSE_MIMETYPE" = "yes"; then
     AC_DEFINE(wxUSE_MIMETYPE)
 fi
@@ -7356,6 +7366,74 @@ if test "$wxUSE_RICHTEXT" = "yes"; then
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS richtext"
 fi
 
+USE_WEBVIEW=0
+if test "$wxUSE_WEBVIEW" = "yes"; then
+   AC_DEFINE(wxUSE_WEBVIEW)
+   USE_WEBVIEW=1
+   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
+           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])
+       else
+           AC_MSG_RESULT([no])
+           AC_MSG_WARN([libwebkitgtk-1.0 not found; disabling webkit backend])
+           wxUSE_WEBVIEW_WEBKIT="no"
+       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])
+       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])
+       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"
+        AC_CHECK_HEADER([WebKit/HIWebView.h],
+                        [
+                           AC_DEFINE(wxUSE_WEBVIEW_WEBKIT)
+                           WEBKIT_LINK="-framework WebKit"
+                        ],
+                        [
+                           AC_MSG_WARN([WebKit headers not found; disabling wxWebView WebKit])
+                           wxUSE_WEBVIEW_WEBKIT=no
+                        ],
+                        [
+                           #include <Carbon/Carbon.h>
+                           #include <WebKit/WebKit.h>
+                        ])
+        CPPFLAGS="$old_CPPFLAGS"
+    elif test "$wxUSE_OLD_COCOA" = 1; then
+        AC_DEFINE(wxUSE_WEBVIEW_WEBKIT)
+    else
+        wxUSE_WEBVIEW_WEBKIT=no
+    fi
+fi
+
 dnl ---------------------------------------------------------------------------
 dnl wxImage options
 dnl ---------------------------------------------------------------------------
@@ -7738,6 +7816,10 @@ if test "$wxUSE_GUI" = "yes"; then
     if test "$wxUSE_STC" = "yes" ; then
         BUILT_WX_LIBS="stc $BUILT_WX_LIBS"
     fi
+    if test "$wxUSE_WEBVIEW" = "yes" ; then
+        STD_GUI_LIBS="web $STD_GUI_LIBS"
+        BUILT_WX_LIBS="web $BUILT_WX_LIBS"
+    fi
     if test "$wxUSE_XRC" = "yes" ; then
         STD_GUI_LIBS="xrc $STD_GUI_LIBS"
         BUILT_WX_LIBS="xrc $BUILT_WX_LIBS"