]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
added wxApp::Yield
[wxWidgets.git] / configure.in
index ddc3bbe691dd3ad108ce816c77fbd905f872a665..cc00d3f7aadd82c13725c6dd0253aa94ee01dd43 100644 (file)
@@ -1844,16 +1844,11 @@ equivalent variable and GTK+ is version 1.2.3 or above.
         TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXWINE__"
     fi
 
-    dnl use standard macros to check for X headers/libs, this brings support
-    dnl for the standard configure options --x-includes and --x-libraries;
-    dnl the path to the X headers/libs is not only needed for motif, but also
-    dnl by the OpenGL and XKBlib.h checks further down
-
-    AC_PATH_XTRA
-    CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-    LDFLAGS="$LDFLAGS $X_LIBS"
-
     if test "$wxUSE_MOTIF" = 1; then
+        dnl use standard macros to check for X headers/libs, this brings support
+        dnl for the standard configure options --x-includes and --x-libraries
+        AC_PATH_XTRA
+
         if test "$no_x" = "yes"; then
           AC_MSG_ERROR(X11 not found, please use --x-includes and/or --x-libraries options)
         fi
@@ -2383,14 +2378,7 @@ AC_CACHE_CHECK([for wchar_t], wx_cv_type_wchar_t,
             ws = L"Hello, world!";
         ],
         wx_cv_type_wchar_t=yes,
-        AC_TRY_COMPILE([#include <stdlib.h>],
-            [
-                wchar_t wc, *ws;
-                wc = L'a';
-                ws = L"Hello, world!";
-            ],
-        wx_cv_type_wchar_t=yes,
-        wx_cv_type_wchar_t=no)
+        wx_cv_type_wchar_t=no
     )
 ])
 
@@ -2728,11 +2716,12 @@ fi
 dnl check for vfork() (even if it's the same as fork() in modern Unices)
 AC_CHECK_FUNCS(vfork)
 
-dnl get the library function to use for wxGetDiskSpace()
+dnl get the library function to use for wxGetDiskSpace(): it is statfs() under
+dnl Linux and *BSD and statvfs() under Solaris
 AC_CACHE_CHECK(for statfs, wx_cv_func_statfs,
     AC_TRY_COMPILE(
         [
-             #ifdef __DARWIN__
+             #if defined(__BSD__)
                #include <sys/param.h>
                #include <sys/mount.h>
              #else
@@ -2759,7 +2748,33 @@ AC_CACHE_CHECK(for statfs, wx_cv_func_statfs,
 if test "$wx_cv_func_statfs" = "yes"; then
     AC_DEFINE(HAVE_STATFS)
 else
-    AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()])
+    AC_CACHE_CHECK(for statvfs, wx_cv_func_statvfs,
+        AC_TRY_COMPILE(
+            [
+                 #include <sys/statvfs.h>
+            ],
+            [
+                 long l;
+                 struct statvfs fs;
+                 statvfs("/", &fs);
+                 l = fs.f_bsize;
+                 l += fs.f_blocks;
+                 l += fs.f_bavail;
+            ],
+            [
+                 wx_cv_func_statvfs=yes
+            ],
+            [
+                 wx_cv_func_statvfs=no
+            ]
+        )
+    )
+
+    if test "$wx_cv_func_statvfs" = "yes"; then
+        AC_DEFINE(HAVE_STATVFS)
+    else
+        AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()])
+    fi
 fi
 
 dnl check for fcntl() or at least flock() needed by Unix implementation of
@@ -4467,7 +4482,7 @@ dnl makefile system without libtool
 LD_LIBS="\${top_builddir}/lib/${WX_LIBRARY_NAME_STATIC} $EXTRA_LIBS"
 
 dnl all -I options we must pass to the compiler
-INCLUDES="-I. -I\${top_builddir}/lib/wx/include/${TOOLCHAIN_NAME} -I\${top_srcdir}/include \
+INCLUDES="-I\${top_builddir}/lib/wx/include/${TOOLCHAIN_NAME} -I\${top_srcdir}/include \
 $REGEX_INCLUDE $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE \
 $FREETYPE_INCLUDE $TOOLKIT_INCLUDE"