dnl OS (assume Unix)
USE_UNIX=1
+USE_OS2=0
USE_WIN32=0
USE_DOS=0
USE_BEOS=0
*-pc-os2_emx | *-pc-os2-emx )
AC_DEFINE(__EMX__)
+ USE_OS2=1
PROGRAM_EXT=".exe"
DEFAULT_DEFAULT_wxUSE_PM=1
dnl "c++" wrapper is not always available, so always use plain gcc.
CXX=gcc
- dnl Explicitly link -lstdcpp, since we are using "gcc" not "g++"/"c++".
- LIBS="$LIBS -lstdcpp"
+ LDFLAGS="$LDFLAGS -Zcrtdll -Zsysv-signals"
+ dnl
+ dnl Some special code that's automatically added by autoconf-2.57 for OS/2
+ dnl and hopefully also by autoconf-2.58 and newer on all other platforms.
+ dnl For now however, we still need it to make sure the configure script
+ dnl works on OS/2 no matter what platform it is generated on.
+ ac_executable_extensions=".exe"
+ export ac_executable_extensions
+ dnl This strange code is necessary to deal with handling of
+ dnl backslashes by ksh and pdksh's sh variant.
+ ac_save_IFS="$IFS"
+ IFS="\\"
+ ac_TEMP_PATH=
+ for ac_dir in $PATH; do
+ IFS=$ac_save_IFS
+ if test -z "$ac_TEMP_PATH"; then
+ ac_TEMP_PATH="$ac_dir"
+ else
+ ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir"
+ fi
+ done
+ export PATH="$ac_TEMP_PATH"
+ unset ac_TEMP_PATH
;;
powerpc-*-darwin* )
DEFAULT_wxUSE_GAUGE=no
DEFAULT_wxUSE_GRID=no
DEFAULT_wxUSE_IMAGLIST=no
+ DEFAULT_wxUSE_LISTBOOK=no
DEFAULT_wxUSE_LISTBOX=no
DEFAULT_wxUSE_LISTCTRL=no
DEFAULT_wxUSE_NOTEBOOK=no
DEFAULT_wxUSE_GAUGE=yes
DEFAULT_wxUSE_GRID=yes
DEFAULT_wxUSE_IMAGLIST=yes
+ DEFAULT_wxUSE_LISTBOOK=yes
DEFAULT_wxUSE_LISTBOX=yes
DEFAULT_wxUSE_LISTCTRL=yes
DEFAULT_wxUSE_NOTEBOOK=yes
WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
-WX_ARG_ENABLE(compat20, [ --enable-compat20 enable wxWindows 2.0 compatibility], WXWIN_COMPATIBILITY_2)
WX_ARG_ENABLE(compat22, [ --enable-compat22 enable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
WX_ARG_ENABLE(compat24, [ --disable-compat24 disable wxWindows 2.4 compatibility], WXWIN_COMPATIBILITY_2_4, disable)
DEFAULT_wxUSE_GAUGE=yes
DEFAULT_wxUSE_GRID=yes
DEFAULT_wxUSE_IMAGLIST=yes
+ DEFAULT_wxUSE_LISTBOOK=yes
DEFAULT_wxUSE_LISTBOX=yes
DEFAULT_wxUSE_LISTCTRL=yes
DEFAULT_wxUSE_NOTEBOOK=yes
DEFAULT_wxUSE_GAUGE=no
DEFAULT_wxUSE_GRID=no
DEFAULT_wxUSE_IMAGLIST=no
+ DEFAULT_wxUSE_LISTBOOK=no
DEFAULT_wxUSE_LISTBOX=no
DEFAULT_wxUSE_LISTCTRL=no
DEFAULT_wxUSE_NOTEBOOK=no
WX_ARG_ENABLE(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE)
WX_ARG_ENABLE(grid, [ --enable-grid use wxGrid class], wxUSE_GRID)
WX_ARG_ENABLE(imaglist, [ --enable-imaglist use wxImageList class], wxUSE_IMAGLIST)
+WX_ARG_ENABLE(listbook, [ --enable-listbook use wxListbook class], wxUSE_LISTBOOK)
WX_ARG_ENABLE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX)
WX_ARG_ENABLE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL)
WX_ARG_ENABLE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK)
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 Moreover we need to link explicitly against either stdcpp.a or stdcxx.a
+dnl (depending on compiler version), since we are using "gcc", not "g++/c++".
dnl ---------------------------------------------------------------------------
dnl (OS/2-only piece)
case "${host}" in
dnl Include resources for the "native" port (wxPM).
RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res"
fi
+ AC_CACHE_CHECK([for gcc 3 or later], wx_cv_gcc3,[
+ AC_TRY_COMPILE([#include <features.h>],
+ [
+ #if (__GNUC__ < 3)
+ #error old gcc
+ #endif
+ ],
+ [
+ wx_cv_gcc3=yes
+ ],
+ [
+ wx_cv_gcc3=no
+ ]
+ )
+ ])
+ if test "$wx_cv_gcc3" = "no"; then
+ LIBS="$LIBS -lstdcpp"
+ else
+ LIBS="$LIBS -lstdcxx"
+ fi
;;
esac
dnl (end of OS/2-only piece)
esac
if test "$wxUSE_GUI" = "yes"; then
- if test "$wxUSE_UNIX" = "yes"; then
+ if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_PM" != 1; then
dnl defines HAVE_X11_XKBLIB_H
AC_CHECK_HEADERS(X11/Xlib.h)
AC_CHECK_HEADERS([X11/XKBlib.h], [], [],
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $ZLIB_LINK"
fi
AC_CHECK_HEADER(tiffio.h,
- AC_CHECK_LIB(tiff, TIFFError,
- TIFF_LINK=" -ltiff",
- ,
- $TIFF_PREREQ_LINKS)
+ [
+ AC_CHECK_LIB(tiff, TIFFError,
+ TIFF_LINK=" -ltiff",
+ ,
+ $TIFF_PREREQ_LINKS)
+ ]
)
if test "x$TIFF_LINK" = "x" ; then
if test "$wxUSE_PM" = 1; then
TOOLKIT=PM
GUIDIST=GTK_DIST
- AC_MSG_WARN([OS/2 threads are not yet supported... disabled])
- wxUSE_THREADS="no"
fi
dnl the name of the directory where the files for this toolkit live
fi
if test "$wxUSE_ODBC" != "no" ; then
AC_DEFINE(wxUSE_ODBC)
+ if test "$wxUSE_ODBC" = "builtin" ; then
+ AC_DEFINE(wxUSE_BUILTIN_IODBC)
+ fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db"
dnl is this still necessary in 2.5?
[
AC_CHECK_LIB(nsl, inet_addr,
INET_LINK="nsl",
- AC_CHECK_LIB(resolv, inet_addr,
- INET_LINK="resolv",
- AC_CHECK_LIB(socket, inet_addr,
- INET_LINK="socket"
+ [
+ AC_CHECK_LIB(resolv, inet_addr,
+ INET_LINK="resolv",
+ [
+ AC_CHECK_LIB(socket, inet_addr,
+ INET_LINK="socket"
+ )
+ ]
)
- )
+ ]
)
]
)
AC_CACHE_SAVE
dnl ---------------------------------------------------------------------------
-dnl thread support for Unix (for Win32 see past the next matching "else")
+dnl thread support for Unix (for Win32 and OS/2 see past
+dnl the next matching "else")
dnl ---------------------------------------------------------------------------
dnl under MSW (except mingw32) we always have thread support
CPP_MT_FLAG=
-if test "$TOOLKIT" != "MSW"; then
+if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
dnl the code below:
dnl
CFLAGS="$CFLAGS_OLD"
fi
;;
+ *-pc-os2*emx )
+ CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__"
+ CXXFLAGS="$CXXFLAGS -Zmt -D__ST_MT_ERRNO__"
+ LDFLAGS="$LDFLAGS -Zmt"
+ ;;
esac
fi
fi
dnl compatibility level
dnl ---------------------------------------------------------------------------
-if test "$WXWIN_COMPATIBILITY_2" = "yes"; then
- AC_DEFINE(WXWIN_COMPATIBILITY_2)
-
- WXWIN_COMPATIBILITY_2_2="yes"
-fi
-
if test "x$WXWIN_COMPATIBILITY_2_2" = "xyes"; then
AC_DEFINE(WXWIN_COMPATIBILITY_2_2)
if test "$TOOLKIT" != "MSW"; then
dnl under Solaris and OS/2, socket functions live in -lsocket
AC_CHECK_FUNC(socket,,
- AC_CHECK_LIB(socket, socket,
- if test "$INET_LINK" != " -lsocket"; then
- INET_LINK="$INET_LINK -lsocket"
- fi,
- [
- AC_MSG_WARN([socket library not found - sockets will be disabled])
- wxUSE_SOCKETS=no
- ]
- )
+ [
+ AC_CHECK_LIB(socket, socket,
+ if test "$INET_LINK" != " -lsocket"; then
+ INET_LINK="$INET_LINK -lsocket"
+ fi,
+ [
+ AC_MSG_WARN([socket library not found - sockets will be disabled])
+ wxUSE_SOCKETS=no
+ ]
+ )
+ ]
)
fi
fi
dnl ------------------------------------------------------------------------
dnl under MSW we always have LoadLibrary/GetProcAddress
-if test "$TOOLKIT" != "MSW"; then
+if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
HAVE_DL_FUNCS=0
HAVE_SHL_FUNCS=0
dnl check also for dlerror()
if test "$HAVE_DL_FUNCS" = 1; then
AC_CHECK_FUNCS(dlerror,
- AC_DEFINE(HAVE_DLERROR),
- AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR)))
+ AC_DEFINE(HAVE_DLERROR),
+ [
+ AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))
+ ]
+ )
fi
fi
AC_DEFINE(wxUSE_IMAGLIST)
fi
+if test "$wxUSE_LISTBOOK" = "yes"; then
+ AC_DEFINE(wxUSE_LISTBOOK)
+ USES_CONTROLS=1
+fi
+
if test "$wxUSE_LISTBOX" = "yes"; then
AC_DEFINE(wxUSE_LISTBOX)
USES_CONTROLS=1
makefiles="samples/Makefile.in samples/console/Makefile.in"
else dnl utils
makefiles="utils/HelpGen/Makefile.in \
- utils/HelpGen/src/Makefile.in \
- utils/makegen/Makefile.in"
+ utils/HelpGen/src/Makefile.in"
fi
fi
echo " Should wxWindows be compiled in Unicode mode? ${wxUSE_UNICODE:-no}"
echo " What level of wxWindows compatibility should be enabled?"
-echo " wxWindows 2.0 ${WXWIN_COMPATIBILITY_2:-no}"
echo " wxWindows 2.2 ${WXWIN_COMPATIBILITY_2_2:-no}"
echo " wxWindows 2.4 ${WXWIN_COMPATIBILITY_2_4:-yes}"