+dnl ---------------------------------------------------------------------------
+dnl When we are using gcc on OS/2, we want to be either using resources (PM)
+dnl or a more complete POSIX emulation for Motif/GTK+/X11
+dnl ---------------------------------------------------------------------------
+dnl (OS/2-only piece)
+case "${host}" in
+ *-pc-os2_emx | *-pc-os2-emx )
+ dnl Explicitly link -lstdcpp, since we are using "gcc" not "g++"/"c++".
+ LIBS="$LIBS -lstdcpp"
+ if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
+ dnl More complete Unix emulation for unix-like ports
+ dnl by linking in POSIX/2's cExt (if available).
+ AC_CHECK_LIB(cExt, drand48, LIBS="$LIBS -lcExt")
+ else
+ dnl Include resources for the "native" port (wxPM).
+ RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res"
+ fi
+ ;;
+esac
+dnl (end of OS/2-only piece)
+
+dnl ------------------------------------------------------------------------
+dnl Check for headers
+dnl ------------------------------------------------------------------------
+
+dnl test for strings.h needed under AIX, but do not check for it wxMac as
+dnl it exists but is only a simple redirection to string.h and it is in
+dnl conflict with Strings.h in FlatCarbon headers
+if test "$wxUSE_MAC" != 1; then
+ dnl defines HAVE_STRINGS_H
+ AC_CHECK_HEADERS(strings.h)
+fi
+
+dnl defines HAVE_STDLIB_H
+AC_CHECK_HEADERS(stdlib.h)
+dnl defines HAVE_MALLOC_H
+AC_CHECK_HEADERS(malloc.h)
+dnl defines HAVE_UNISTD_H
+AC_CHECK_HEADERS(unistd.h)
+dnl defines HAVE_WCHAR_H
+AC_CHECK_HEADERS(wchar.h)
+
+dnl maybe wchar_t is in wcstr.h if we don't have wchar.h?
+if test "$ac_cv_header_wchar_h" != "yes"; then
+ dnl defines HAVE_WCSTR_H
+ AC_CHECK_HEADERS(wcstr.h)
+fi
+
+dnl defines HAVE_FNMATCH_H
+AC_CHECK_HEADERS(fnmatch.h)
+
+if test "x$ac_cv_header_fnmatch_h" = "xyes"; then
+ AC_CHECK_FUNCS(fnmatch)
+fi
+
+dnl defines HAVE_LANGINFO_H (GNU libc locale parameters)
+AC_CHECK_HEADERS(langinfo.h)
+
+if test "$wxUSE_GUI" = "yes"; then
+ if test "$wxUSE_UNIX" = "yes"; then
+ dnl defines HAVE_X11_XKBLIB_H
+ AC_CHECK_HEADERS(X11/XKBlib.h)
+ fi
+fi
+
+dnl ---------------------------------------------------------------------------
+dnl Checks for compiler characteristics
+dnl ---------------------------------------------------------------------------
+
+dnl defines const to be empty if c-compiler does not support const fully
+AC_C_CONST
+dnl defines inline to a sensible value for the c-compiler
+AC_C_INLINE
+
+dnl check the sizes of integral types (give some reasonable default values for
+dnl cross-compiling)
+dnl defines the size of certain types of variables in SIZEOF_<TYPE>
+AC_CHECK_SIZEOF(char, 1)
+AC_CHECK_SIZEOF(short, 2)
+AC_CHECK_SIZEOF(void *, 4)
+AC_CHECK_SIZEOF(int, 4)
+AC_CHECK_SIZEOF(long, 4)
+
+case "${host}" in
+ arm-*-linux* )
+ AC_CHECK_SIZEOF(long long, 8)
+ ;;
+ *-hp-hpux* )
+ AC_CHECK_SIZEOF(long long, 0)
+ if test "$ac_cv_sizeof_long_long" != "0"; then
+ dnl HPUX 10.20 headers need this define in order to use long long definitions
+ CPPFLAGS="$CPPFLAGS -D_INCLUDE_LONGLONG"
+ fi
+ ;;
+ * )
+ AC_CHECK_SIZEOF(long long, 0)
+esac
+
+dnl we have to do it ourselves because SGI/Irix's stdio.h does not include
+dnl wchar_t and AC_CHECK_SIZEOF only includes stdio.h
+dnl Mac OS X does not provide wchar.h and wchar_t is defined by stdlib.h (GD)
+AC_CACHE_CHECK([size of wchar_t], wx_cv_sizeof_wchar_t,
+[
+ AC_TRY_RUN(
+ [
+ /* DJGPP only has fake wchar_t: */
+ #ifdef __DJGPP__
+ # error "fake wchar_t"
+ #endif
+ #ifdef HAVE_WCHAR_H
+ # ifdef __CYGWIN__
+ # include <stddef.h>
+ # endif
+ # include <wchar.h>
+ #endif
+ #ifdef HAVE_STDLIB_H
+ # include <stdlib.h>
+ #endif
+ #include <stdio.h>
+ int main()
+ {
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%i", sizeof(wchar_t));
+ exit(0);
+ }
+ ],
+ wx_cv_sizeof_wchar_t=`cat conftestval`,
+ wx_cv_sizeof_wchar_t=0,
+ [
+ case "${host}" in
+ *-pc-msdosdjgpp )
+ wx_cv_sizeof_wchar_t=0
+ ;;
+ * )
+ wx_cv_sizeof_wchar_t=4
+ ;;
+ esac
+ ]
+ )
+])
+
+AC_DEFINE_UNQUOTED(SIZEOF_WCHAR_T, $wx_cv_sizeof_wchar_t)
+
+dnl check for large file support
+AC_SYS_LARGEFILE
+
+dnl we need to define _FILE_OFFSET_BITS or _LARGE_FILES on the compiler command
+dnl line because otherwise the system headers risk being included before
+dnl wx/defs.h which defines these constants leading to inconsistent
+dnl sizeof(off_t) in different source files of the same program and linking
+dnl problems
+if test "x$wx_largefile" = "xyes"; then
+ if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
+ WX_LARGEFILE_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
+ else
+ WX_LARGEFILE_FLAGS="-D_LARGE_FILES"
+ fi
+ CPPFLAGS="$CPPFLAGS $WX_LARGEFILE_FLAGS"
+fi
+
+dnl check for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
+WX_C_BIGENDIAN
+
+dnl check for iostream (as opposed to iostream.h) standard header
+WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH))
+
+dnl check whether C++ compiler supports bool built-in type
+WX_CPP_BOOL
+
+dnl check whether C++ compiler supports explicit keyword
+WX_CPP_EXPLICIT
+