}
int main()
{
- return foo("hi", 17);
+ foo("hi", 17);
+ return 0;
}],
wx_cv_func_va_copy=yes,
wx_cv_func_va_copy=no
dnl check for large file support
AC_SYS_LARGEFILE
-AC_FUNC_FSEEKO
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
else
WX_LARGEFILE_FLAGS="-D_LARGE_FILES"
fi
+ dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source
+ AC_FUNC_FSEEKO
+ if test "$ac_cv_sys_largefile_source" != no; then
+ WX_LARGEFILE_FLAGS="$WX_LARGEFILE_FLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
+ fi
CPPFLAGS="$CPPFLAGS $WX_LARGEFILE_FLAGS"
fi
dnl ------------------------------------------------------------------------
if test "$wxUSE_LIBMSPACK" != "no"; then
-
AC_CHECK_HEADER([mspack.h], [found_mspack_h=1])
if test "x$found_mspack_h" = "x1"; then
AC_CHECK_LIB(mspack, mspack_create_chm_decompressor,
fi
if test "x$MSPACK_LINK" = "x" ; then
wxUSE_LIBMSPACK=no
- else
- AC_DEFINE(wxUSE_LIBMSPACK)
fi
fi
+if test "$wxUSE_LIBMSPACK" != "no"; then
+ AC_DEFINE(wxUSE_LIBMSPACK)
+fi
+
dnl ----------------------------------------------------------------
dnl search for toolkit (widget sets)
if test "x$GCC" != "xyes"; then
dnl see http://docs.hp.com/hpux/onlinedocs/2213/threads.htm
flag="$flag -D_RWSTD_MULTI_THREAD"
-
- dnl we also need -lcma for user threads (-lpthread is for
- dnl kernel threads only) according to Ian Brown
- LIBS="$LIBS -lcma"
fi
;;
*solaris* | alpha*-osf*)
dnl ---------------------------------------------------------------------------
if test "$wxUSE_GUI" = "yes"; then
- AC_DEFINE(wxUSE_GUI)
-
- dnl the things we always pull in the GUI version of the library:
- dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the
- dnl library really can't be built without those)
- dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in
- dnl almost any program and the first 2 are needed to show a message box
- dnl which want to be always able to do)
- dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice
- dnl to compile without them (if the app doesn't do any drawing, it doesn't
- dnl need the dcs, pens, brushes, ...), this just can't be done now
- dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem
- dnl 5. misc stuff: timers, settings, message box
-else
- AC_DEFINE(wxUSE_NOGUI)
+ AC_DEFINE(wxUSE_GUI)
+
+ dnl the things we always pull in the GUI version of the library:
+ dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the
+ dnl library really can't be built without those)
+ dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in
+ dnl almost any program and the first 2 are needed to show a message box
+ dnl which want to be always able to do)
+ dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice
+ dnl to compile without them (if the app doesn't do any drawing, it doesn't
+ dnl need the dcs, pens, brushes, ...), this just can't be done now
+ dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem
+ dnl 5. misc stuff: timers, settings, message box
fi
dnl ---------------------------------------------------------------------------
else
AC_DEFINE_UNQUOTED(SOCKLEN_T, $wx_cv_type_getsockname3)
fi
+ dnl Do this again for getsockopt as it may be different
+ AC_CACHE_CHECK([what is the type of the fifth argument of getsockopt],
+ wx_cv_type_getsockopt5,
+ [
+ AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ socklen_t len;
+ getsockopt(0, 0, 0, 0, &len);
+ ],
+ wx_cv_type_getsockopt5=socklen_t,
+ [
+ dnl the compiler will compile the version with size_t
+ dnl even if the real type of the last parameter is int
+ dnl but it should give at least a warning about
+ dnl converting between incompatible pointer types, so
+ dnl try to use it to get the correct behaviour at
+ dnl least with gcc (otherwise we'd always use size_t)
+ CFLAGS_OLD="$CFLAGS"
+ if test "$GCC" = yes ; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+
+ AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ size_t len;
+ getsockopt(0, 0, 0, 0, &len);
+ ],
+ wx_cv_type_getsockopt5=size_t,
+ AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ int len;
+ getsockopt(0, 0, 0, 0, &len);
+ ],
+ wx_cv_type_getsockopt5=int,
+ wx_cv_type_getsockopt5=unknown
+ )
+ )
+
+ CFLAGS="$CFLAGS_OLD"
+ ]
+ )
+ ])
+
+ if test "$wx_cv_type_getsockopt5" = "unknown"; then
+ wxUSE_SOCKETS=no
+ AC_MSG_WARN([Couldn't find socklen_t synonym for this system])
+ else
+ AC_DEFINE_UNQUOTED(SOCKOPTLEN_T, $wx_cv_type_getsockopt5)
+ fi
AC_LANG_POP
fi
fi
fi
+dnl Check to see if the platform always requires NO_GCC_PRAGMA
GCC_PRAGMA_FLAGS=""
-dnl Find out if we have to define NO_GCC_PRAGMA and WX_PRECOMP:
-if test $GCC_PCH = 1 ; then
- GCC_PRAGMA_FLAGS="-DWX_PRECOMP -DNO_GCC_PRAGMA"
-else
case "${host}" in
powerpc-*-darwin* )
dnl Some Apple's GCC version are broken and can't handle the
fi
;;
esac
+
+dnl Find out if we have to define NO_GCC_PRAGMA and WX_PRECOMP:
+PCH_FLAGS=""
+if test $GCC_PCH = 1 ; then
+ if test "x$GCC_PRAGMA_FLAGS" = "x"; then
+ PCH_FLAGS="-DWX_PRECOMP -DNO_GCC_PRAGMA"
+ else
+ PCH_FLAGS="-DWX_PRECOMP"
+ fi
fi
-CPPFLAGS="$GCC_PRAGMA_FLAGS $CPPFLAGS"
+
+CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"
dnl for convenience, sort the samples in alphabetical order
echo " expat ${wxUSE_EXPAT}"
echo " libmspack ${wxUSE_LIBMSPACK}"
echo " sdl ${wxUSE_LIBSDL}"
-echo " gnomeprint ${wxUSE_LIBGNOMEPRINT}"
+echo " gnomeprint ${wxUSE_LIBGNOMEPRINT-none}"
echo ""