]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
work around probable bug in GTK+ 2.18 when calling WriteText on a new, empty control...
[wxWidgets.git] / configure.in
index f5e9343db14da4f54f8d00878bdabc19912244f1..5c7b65eeab4156d7b26fbe345100be154a8218eb 100644 (file)
@@ -363,6 +363,7 @@ dnl libraries disabled by default
 DEFAULT_wxUSE_DMALLOC=no
 DEFAULT_wxUSE_LIBGNOMEVFS=no
 DEFAULT_wxUSE_LIBHILDON=no
+DEFAULT_wxUSE_LIBHILDON2=no
 DEFAULT_wxUSE_LIBMSPACK=no
 DEFAULT_wxUSE_LIBSDL=no
 
@@ -579,7 +580,7 @@ WX_ARG_WITH(libmspack,     [  --with-libmspack        use libmspack (CHM help fi
 WX_ARG_WITHOUT(gtkprint,   [  --without-gtkprint      don't use GTK printing support], wxUSE_GTKPRINT)
 WX_ARG_WITHOUT(gnomeprint, [  --without-gnomeprint    don't use GNOME printing libraries], wxUSE_LIBGNOMEPRINT)
 WX_ARG_WITH(gnomevfs,      [  --with-gnomevfs         use GNOME VFS for associating MIME types], wxUSE_LIBGNOMEVFS)
-WX_ARG_WITH(hildon,        [  --with-hildon           use Hildon framework for Nokia 770], wxUSE_LIBHILDON)
+WX_ARG_WITH(hildon,        [  --with-hildon           use Hildon framework for Nokia 770/800/810], wxUSE_LIBHILDON)
 WX_ARG_WITH(opengl,        [  --with-opengl           use OpenGL (or Mesa)], wxUSE_OPENGL)
 
 fi
@@ -728,6 +729,7 @@ WX_ARG_FEATURE(epollloop,     [  --enable-epollloop      use wxEpollDispatcher c
 WX_ARG_FEATURE(selectloop,    [  --enable-selectloop     use wxSelectDispatcher class], wxUSE_SELECT_DISPATCHER)
 
 dnl please keep the settings below in alphabetical order
+WX_ARG_FEATURE(any,           [  --enable-any            use wxAny class], wxUSE_ANY)
 WX_ARG_FEATURE(apple_ieee,    [  --enable-apple_ieee     use the Apple IEEE codec], wxUSE_APPLE_IEEE)
 WX_ARG_FEATURE(arcstream,     [  --enable-arcstream      use wxArchive streams], wxUSE_ARCHIVE_STREAMS)
 WX_ARG_FEATURE(base64,        [  --enable-base64         use base64 encoding/decoding functions], wxUSE_BASE64)
@@ -748,6 +750,7 @@ WX_ARG_FEATURE(fontmap,       [  --enable-fontmap        use font encodings conv
 WX_ARG_FEATURE(fs_archive,    [  --enable-fs_archive     use virtual archive filesystems], wxUSE_FS_ARCHIVE)
 WX_ARG_FEATURE(fs_inet,       [  --enable-fs_inet        use virtual HTTP/FTP filesystems], wxUSE_FS_INET)
 WX_ARG_FEATURE(fs_zip,        [  --enable-fs_zip         now replaced by fs_archive], wxUSE_FS_ZIP)
+WX_ARG_FEATURE(fswatcher,     [  --enable-fswatcher      use wxFileSystemWatcher class], wxUSE_FSWATCHER)
 WX_ARG_FEATURE(geometry,      [  --enable-geometry       use geometry class], wxUSE_GEOMETRY)
 WX_ARG_FEATURE(log,           [  --enable-log            use logging system], wxUSE_LOG)
 WX_ARG_FEATURE(longlong,      [  --enable-longlong       use wxLongLong class], wxUSE_LONGLONG)
@@ -758,7 +761,7 @@ WX_ARG_FEATURE(sound,         [  --enable-sound          use wxSound class], wxU
 WX_ARG_FEATURE(stdpaths,      [  --enable-stdpaths       use wxStandardPaths class], wxUSE_STDPATHS)
 WX_ARG_FEATURE(stopwatch,     [  --enable-stopwatch      use wxStopWatch class], wxUSE_STOPWATCH)
 WX_ARG_FEATURE(streams,       [  --enable-streams        use wxStream etc classes], wxUSE_STREAMS)
-WX_ARG_FEATURE(system_options,[  --enable-sysoptions     use wxSystemOptions], wxUSE_SYSTEM_OPTIONS)
+WX_ARG_FEATURE(sysoptions,    [  --enable-sysoptions     use wxSystemOptions], wxUSE_SYSTEM_OPTIONS)
 WX_ARG_FEATURE(tarstream,     [  --enable-tarstream      use wxTar streams], wxUSE_TARSTREAM)
 WX_ARG_FEATURE(textbuf,       [  --enable-textbuf        use wxTextBuffer class], wxUSE_TEXTBUFFER)
 WX_ARG_FEATURE(textfile,      [  --enable-textfile       use wxTextFile class], wxUSE_TEXTFILE)
@@ -915,6 +918,7 @@ WX_ARG_FEATURE(grid,        [  --enable-grid           use wxGrid class], wxUSE_
 WX_ARG_FEATURE(headerctrl,  [  --enable-headerctrl     use wxHeaderCtrl class], wxUSE_HEADERCTRL)
 WX_ARG_FEATURE(hyperlink,   [  --enable-hyperlink      use wxHyperlinkCtrl class], wxUSE_HYPERLINKCTRL)
 WX_ARG_FEATURE(imaglist,    [  --enable-imaglist       use wxImageList class], wxUSE_IMAGLIST)
+WX_ARG_FEATURE(infobar,     [  --enable-infobar        use wxInfoBar class], wxUSE_INFOBAR)
 WX_ARG_FEATURE(listbook,    [  --enable-listbook       use wxListbook class], wxUSE_LISTBOOK)
 WX_ARG_FEATURE(listbox,     [  --enable-listbox        use wxListBox class], wxUSE_LISTBOX)
 WX_ARG_FEATURE(listctrl,    [  --enable-listctrl       use wxListCtrl class], wxUSE_LISTCTRL)
@@ -2734,6 +2738,11 @@ if test "$USE_WIN32" = 1 ; then
        x86_64-*-mingw32* )
             dnl --- For mingw-w64 lctl3d32's name has changed
             LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lwctl3d32 -ladvapi32 -lwsock32 -lgdi32"
+
+            dnl we need to define this to embed the manifest for correct
+            dnl platform from wx/msw/wx.rc (this is not needed for x86 which is
+            dnl the default in wx/msw/rcdefs.h)
+            WINDRES_CPU_DEFINE="--define WX_CPU_AMD64"
         ;;
         * )
             LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32"
@@ -2900,47 +2909,71 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
             CFLAGS="$wx_cv_cflags_gtk $CFLAGS"
             LIBS="$LIBS $wx_cv_libs_gtk"
 
-            dnl test if we have at least GTK+ 2.10:
-            AC_MSG_CHECKING([if GTK+ is version >= 2.10])
+            dnl test if we have at least GTK+ 2.18:
+            AC_MSG_CHECKING([if GTK+ is version >= 2.18])
             AC_TRY_COMPILE([
                             #include <gtk/gtk.h>
                            ],
                            [
-                            #if !GTK_CHECK_VERSION(2,10,0)
-                            Not GTK+ 2.10
+                            #if !GTK_CHECK_VERSION(2,18,0)
+                            Not GTK+ 2.18
                             #endif
                            ],
                            [
+                            AC_DEFINE(__WXGTK218__)
                             AC_DEFINE(__WXGTK210__)
                             AC_DEFINE(__WXGTK26__)
                             AC_MSG_RESULT([yes])
-                            ac_wxgtk210=1
+                            ac_wxgtk218=1
                            ],
                            [
                             AC_MSG_RESULT([no])
-                            ac_wxgtk210=0
+                            ac_wxgtk218=0
                            ])
 
-            if test "$ac_wxgtk210" = 0; then
-                dnl test if we have at least GTK+ 2.6:
-                AC_MSG_CHECKING([if GTK+ is version >= 2.6])
+            if test "$ac_wxgtk218" = 0; then
+                dnl test if we have at least GTK+ 2.10:
+                AC_MSG_CHECKING([if GTK+ is version >= 2.10])
                 AC_TRY_COMPILE([
                                 #include <gtk/gtk.h>
-                            ],
-                            [
-                                #if !GTK_CHECK_VERSION(2,6,0)
-                                Not GTK+ 2.6
+                               ],
+                               [
+                                #if !GTK_CHECK_VERSION(2,10,0)
+                                Not GTK+ 2.10
                                 #endif
-                            ],
-                            [
+                               ],
+                               [
+                                AC_DEFINE(__WXGTK210__)
                                 AC_DEFINE(__WXGTK26__)
                                 AC_MSG_RESULT([yes])
-                                ac_wxgtk26=1
-                            ],
-                            [
+                                ac_wxgtk210=1
+                               ],
+                               [
                                 AC_MSG_RESULT([no])
-                                ac_wxgtk26=0
-                            ])
+                                ac_wxgtk210=0
+                               ])
+
+                if test "$ac_wxgtk210" = 0; then
+                    dnl test if we have at least GTK+ 2.6:
+                    AC_MSG_CHECKING([if GTK+ is version >= 2.6])
+                    AC_TRY_COMPILE([
+                                    #include <gtk/gtk.h>
+                                ],
+                                [
+                                    #if !GTK_CHECK_VERSION(2,6,0)
+                                    Not GTK+ 2.6
+                                    #endif
+                                ],
+                                [
+                                    AC_DEFINE(__WXGTK26__)
+                                    AC_MSG_RESULT([yes])
+                                    ac_wxgtk26=1
+                                ],
+                                [
+                                    AC_MSG_RESULT([no])
+                                    ac_wxgtk26=0
+                                ])
+                fi
             fi
 
             CFLAGS="$save_CFLAGS"
@@ -3466,11 +3499,20 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
         dnl wxMac version of wxBase and wxCocoa or wxBase-only built on Darwin
         dnl are different, so they need different names:
         WXBASEPORT="_carbon"
+
+        dnl in addition to defining __WXOSX_CARBON__ for this toolkit we want
+        dnl to also define these extra symbols to make it possible to test for
+        dnl any Mac port (__WXMAC__ is for backwards compatibility, __WXOSX__
+        dnl is a new name)
+        TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXMAC__ -D__WXOSX__"
     fi
 
     if test "$wxUSE_OSX_COCOA" = 1; then
         TOOLKIT=OSX_COCOA
         GUIDIST=OSX_COCOA_DIST
+
+        dnl see the comment above in wxUSE_OSX_CARBON branch
+        TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXMAC__ -D__WXOSX__"
     fi
 
     if test "$wxUSE_COCOA" = 1; then
@@ -4853,7 +4895,14 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
       else
           dnl yes, these special compiler flags should be used with the
           dnl linker as well
+          dnl
+          dnl NB: add them to LDFLAGS immediately because we need them to be
+          dnl     used for the subsequent tests some of which can fail without
+          dnl     MT support, hence the reason for the duplication below:
+          dnl     adding them just to WXCONFIG_LDFLAGS and adding the entire
+          dnl     contents of the latter to LDFLAGS in the end is not enough.
           LDFLAGS="$THREADS_CFLAGS $LDFLAGS"
+          WXCONFIG_LDFLAGS="$THREADS_CFLAGS $WXCONFIG_LDFLAGS"
           LIBS="$THREADS_LINK $LIBS"
 
           AC_MSG_CHECKING([if more special flags are required for pthreads])
@@ -4867,6 +4916,7 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
                 dnl     search path should include -L/usr/lib/threads at the
                 dnl     beginning of the path.
                 LDFLAGS="-L/usr/lib/threads $LDFLAGS"
+                WXCONFIG_LDFLAGS="-L/usr/lib/threads $WXCONFIG_LDFLAGS"
                 flag="-D_THREAD_SAFE"
                 ;;
             *-freebsd*)
@@ -5461,6 +5511,29 @@ if test "$wxUSE_PLUGINS" = "yes" ; then
     fi
 fi
 
+dnl ---------------------------------------------------------------------------
+dnl File system watcher checks
+dnl ---------------------------------------------------------------------------
+
+if test "$wxUSE_FSWATCHER" = "yes"; then
+    AC_DEFINE(wxUSE_FSWATCHER)
+    SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS fswatcher"
+
+    if test "$wxUSE_UNIX" = "yes"; then
+        AC_CHECK_HEADERS(sys/inotify.h,,, [AC_INCLUDES_DEFAULT()])
+        if test "$ac_cv_header_sys_inotify_h" = "yes"; then
+            AC_DEFINE(wxHAS_INOTIFY)
+        else
+            AC_CHECK_HEADERS(sys/event.h,,, [AC_INCLUDES_DEFAULT()])
+            if test "$ac_cv_header_sys_event_h" = "yes"; then
+                AC_DEFINE(wxHAS_KQUEUE)
+            else
+                AC_MSG_WARN([No native wxFileSystemWatcher implementation available for on this platform])
+            fi
+        fi
+    fi
+fi
+
 dnl ---------------------------------------------------------------------------
 dnl Register non-GUI class options for makefiles and setup.h
 dnl ---------------------------------------------------------------------------
@@ -5473,6 +5546,10 @@ if test "$wxUSE_EXTENDED_RTTI" = "yes"; then
   AC_DEFINE(wxUSE_EXTENDED_RTTI)
 fi
 
+if test "$wxUSE_ANY" = "yes"; then
+    AC_DEFINE(wxUSE_ANY)
+fi
+
 if test "$wxUSE_APPLE_IEEE" = "yes"; then
   AC_DEFINE(wxUSE_APPLE_IEEE)
 fi
@@ -5618,12 +5695,30 @@ if test "$WXGTK2" = 1; then
                 CFLAGS="$CFLAGS $HILDON_CFLAGS"
                 CXXFLAGS="$CXXFLAGS $HILDON_CFLAGS"
                 AC_DEFINE(wxUSE_LIBHILDON)
+                ac_hildon_lgpl=1
             ],
             [
                 AC_MSG_WARN([libhildon_lgpl not found])
                         wxUSE_LIBHILDON="no"
+                        ac_hildon_lgpl=0
             ]
         )
+
+        if test "$ac_hildon_lgpl" = 0 ; then
+            PKG_CHECK_MODULES(HILDON2,
+                              [hildon-1 >= 1.99],
+                [
+                    EXTRALIBS_HILDON="$HILDON2_LIBS"
+                    CFLAGS="$CFLAGS $HILDON2_CFLAGS"
+                    CXXFLAGS="$CXXFLAGS $HILDON2_CFLAGS"
+                    AC_DEFINE(wxUSE_LIBHILDON2)
+                ],
+                [
+                    AC_MSG_WARN([libhildon_1 not found])
+                            wxUSE_LIBHILDON2="no"
+                ]
+            )
+        fi
     fi
 fi
 
@@ -6663,6 +6758,10 @@ if test "$wxUSE_IMAGLIST" = "yes"; then
     AC_DEFINE(wxUSE_IMAGLIST)
 fi
 
+if test "$wxUSE_INFOBAR" = "yes"; then
+    AC_DEFINE(wxUSE_INFOBAR)
+fi
+
 if test "$wxUSE_LISTBOOK" = "yes"; then
     AC_DEFINE(wxUSE_LISTBOOK)
     USES_CONTROLS=1
@@ -7394,27 +7493,25 @@ dnl Output the makefiles and such from the results found above
 dnl ---------------------------------------------------------------------------
 
 dnl all additional libraries (except wxWidgets itself) we link with
-
+EXTRA_FRAMEWORKS=
 if test "$wxUSE_MAC" = 1 ; then
-    if test "$wxUSE_SOUND" = "yes" || test "$wxUSE_MEDIACTRL" = "yes"; then
-        if test "$USE_DARWIN" = 1; then
-            LDFLAGS="$LDFLAGS -framework QuickTime"
-        fi
-    fi
     if test "$USE_DARWIN" = 1; then
-        LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL"
+        EXTRA_FRAMEWORKS="-framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime"
     fi
 fi
 if test "$wxUSE_COCOA" = 1 ; then
-    LDFLAGS="$LDFLAGS -framework IOKit -framework Cocoa"
+    EXTRA_FRAMEWORKS="-framework IOKit -framework Cocoa"
     if test "$wxUSE_MEDIACTRL" = "yes"; then
-        LDFLAGS="$LDFLAGS -framework QuickTime"
+        EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework QuickTime"
     fi
 fi
 if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1 ; then
-    LDFLAGS="$LDFLAGS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices"
+    EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices"
 fi
 
+LDFLAGS="$LDFLAGS $EXTRA_FRAMEWORKS"
+WXCONFIG_LDFLAGS="$WXCONFIG_LDFLAGS $EXTRA_FRAMEWORKS"
+
 LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK $LIBS"
 
 if test "$wxUSE_GUI" = "yes"; then
@@ -7698,6 +7795,9 @@ case "$TOOLKIT" in
             if test "$wxUSE_LIBHILDON" = "yes"; then
                 TOOLKIT_EXTRA="$TOOLKIT_EXTRA hildon"
             fi
+            if test "$wxUSE_LIBHILDON2" = "yes"; then
+                TOOLKIT_EXTRA="$TOOLKIT_EXTRA hildon"
+            fi
 
             if test "$TOOLKIT_EXTRA" != ""; then
                 TOOLKIT_DESC="$TOOLKIT_DESC with support for `echo $TOOLKIT_EXTRA | tr -s ' '`"
@@ -7785,7 +7885,7 @@ if test "$wxUSE_MSW" = 1 ; then
         AC_MSG_ERROR([Required windres program not found])
     fi
 
-    RESCOMP="$WINDRES"
+    RESCOMP="$WINDRES $WINDRES_CPU_DEFINE"
 fi
 
 if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then
@@ -7983,6 +8083,7 @@ AC_SUBST(WXCONFIG_CXXFLAGS)
 
 AC_SUBST(WXCONFIG_LIBS)
 AC_SUBST(WXCONFIG_RPATH)
+AC_SUBST(WXCONFIG_LDFLAGS)
 AC_SUBST(WXCONFIG_LDFLAGS_GUI)
 AC_SUBST(WXCONFIG_RESFLAGS)