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
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
)
])
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
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
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"