dnl the file passed to AC_INIT should be specific to our package
AC_INIT(wx-config.in)
+dnl sets build, host, target variables and the same with _alias
AC_CANONICAL_SYSTEM
dnl When making releases do:
DEFAULT_wxUSE_ODBC=no
DEFAULT_wxUSE_OPENGL=no
+ DEFAULT_wxUSE_ON_FATAL_EXCEPTION=no
DEFAULT_wxUSE_STD_IOSTREAM=no
DEFAULT_wxUSE_FILE=no
DEFAULT_wxUSE_TEXTFILE=no
DEFAULT_wxUSE_ODBC=no
DEFAULT_wxUSE_OPENGL=no
+ DEFAULT_wxUSE_ON_FATAL_EXCEPTION=yes
DEFAULT_wxUSE_STD_IOSTREAM=no
DEFAULT_wxUSE_FILE=yes
DEFAULT_wxUSE_TEXTFILE=yes
WX_ARG_ENABLE(intl, [ --enable-intl use internationalization system], wxUSE_INTL)
WX_ARG_ENABLE(config, [ --enable-config use wxConfig (and derived) classes], wxUSE_CONFIG)
-dnl can't use sockets without GUI so far
-if test "$wxUSE_GUI" = "yes"; then
WX_ARG_ENABLE(sockets, [ --enable-sockets use socket/network classes], wxUSE_SOCKETS)
-else
-wxUSE_SOCKETS=no
-fi
-WX_ARG_ENABLE(dialupman, [ --enable-dialupman use dialup network classes], wxUSE_DIALUP_MANAGER)
WX_ARG_ENABLE(ipc, [ --enable-ipc use interprocess communication (wxSocket etc.)], wxUSE_IPC)
+
+WX_ARG_ENABLE(dialupman, [ --enable-dialupman use dialup network classes], wxUSE_DIALUP_MANAGER)
WX_ARG_ENABLE(apple_ieee, [ --enable-apple_ieee use the Apple IEEE codec], wxUSE_APPLE_IEEE)
WX_ARG_ENABLE(timedate, [ --enable-timedate use date/time classes], wxUSE_TIMEDATE)
WX_ARG_ENABLE(wave, [ --enable-wave use wxWave class], wxUSE_WAVE)
WX_ARG_ENABLE(fs_zip, [ --enable-fs_zip use virtual ZIP filesystems], wxUSE_FS_ZIP)
WX_ARG_ENABLE(zipstream, [ --enable-zipstream use wxZipInputStream], wxUSE_ZIPSTREAM)
+WX_ARG_ENABLE(catch_segvs, [ --enable-catch_segvs catch signals and pass them to wxApp::OnFatalException], wxUSE_ON_FATAL_EXCEPTION)
+
dnl ---------------------------------------------------------------------------
dnl "big" options (i.e. those which change a lot of things throughout the library)
dnl ---------------------------------------------------------------------------
dnl cross-compiling support: we're cross compiling if the build system is
dnl different from the target one (assume host and target be always the same)
-if eval "test $host != $build"; then
- if eval "test $host_alias != NONE"; then
+if test "$build" != "$host" ; then
CC=$host_alias-gcc
CXX=$host_alias-c++
AR=$host_alias-ar
LD=$host_alias-ld
NM=$host_alias-nm
STRIP=$host_alias-strip
- fi
fi
dnl C-compiler checks
if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then
if test "$cross_compiling" = "yes" ; then
- AC_MSG_WARN(Cross compiling --- skipping windows.h check)
+ dnl mingw32 will find them even if they're not in one of standard paths
+ AC_MSG_WARN(skipping windows.h check for cross-compilation)
else
AC_MSG_CHECKING(for Windows headers)
WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h)
AC_CHECK_HEADERS(fnmatch.h)
if test "$wxUSE_GUI" = "yes"; then
- dnl defines HAVE_X11_XKBLIB_H
- AC_CHECK_HEADERS(X11/XKBlib.h)
+ if test "$wxUSE_UNIX" = "yes"; then
+ dnl defines HAVE_X11_XKBLIB_H
+ AC_CHECK_HEADERS(X11/XKBlib.h)
+ fi
fi
dnl ---------------------------------------------------------------------------
dnl under MSW we always have Sleep()
if test "$TOOLKIT" != "MSW"; then
+dnl check for POSIX signals if we need them
+if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then
+ AC_CHECK_FUNCS(sigaction)
+
+ if test "$ac_cv_func_sigaction" = "no"; then
+ AC_MSG_WARN([No POSIX signal functions on this system, wxApp::OnFatalException will not be called])
+ wxUSE_ON_FATAL_EXCEPTION=no
+ fi
+fi
+
dnl check for vfork() (even if it's the same as fork() in modern Unices)
AC_CHECK_FUNCS(vfork)
dnl check for uname (POSIX) and gethostname (BSD)
AC_CHECK_FUNCS(uname gethostname, break)
-dnl check for MT-safe version of strtok
+dnl check for MT-safe version of strtok (on DEC Alpha, it's ok for C compiler
+dnl but not for C++ one - hence change language)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
AC_CHECK_FUNCS(strtok_r)
+AC_LANG_RESTORE
+
dnl check for inet_addr and inet_aton (these may live either in libc, or in
dnl libnsl or libresolv)
INET_LINK=
AC_DEFINE(wxUSE_ZIPSTREAM)
fi
+if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
+ AC_DEFINE(wxUSE_ON_FATAL_EXCEPTION)
+fi
+
if test "$wxUSE_BUSYINFO" = "yes"; then
AC_DEFINE(wxUSE_BUSYINFO)
fi
dnl ---------------------------------------------------------------------------
if test "$wxUSE_IPC" = "yes"; then
+ if test "$wxUSE_SOCKETS" != "yes"; then
+ AC_MSG_WARN(wxWindows IPC classes require sockets, disabled)
+ fi
+
AC_DEFINE(wxUSE_IPC)
fi
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}/include -I\${top_srcdir}/include -I\${top_srcdir}/contrib/include $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE $TOOLKIT_INCLUDE"
+INCLUDES="-I. -I\${top_builddir}/include -I\${top_srcdir}/include $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE $TOOLKIT_INCLUDE"
dnl C/C++ compiler options used to compile wxWindows
if test "$GXX" = yes ; then