;;
*-*-cygwin* | *-*-mingw32* )
- USE_UNIX=0
- USE_WIN32=1
+ dnl MBN: some of the defines have been moved after toolkit detection
+ dnl because for wxMotif/wxGTK/wxX11 to build on Cygwin
+ dnl USE_UNIX must be set and not USE_WIN32
SO_SUFFIX=dll
- AC_DEFINE(__WIN32__)
- AC_DEFINE(__WIN95__)
- AC_DEFINE(__WINDOWS__)
- AC_DEFINE(__GNUWIN32__)
- AC_DEFINE(STRICT)
- AC_DEFINE(WINVER, 0x0400)
PROGRAM_EXT=".exe"
RESCOMP=windres
DEFAULT_DEFAULT_wxUSE_MSW=1
AC_DEFINE(__DOS__)
PROGRAM_EXT=".exe"
DEFAULT_DEFAULT_wxUSE_MGL=1
+ dnl DJGPP needs explicit -lstdc++ for some reason (VS: mayb some versions only?)
+ LIBS="$LIBS -lstdc++"
;;
*-pc-os2_emx | *-pc-os2-emx )
AC_MSG_ERROR(unknown system type ${host}.)
esac
-if test "$USE_UNIX" = 1 ; then
- wxUSE_UNIX=yes
- AC_DEFINE(__UNIX__)
-fi
-
dnl ---------------------------------------------------------------------------
dnl command line options for configure
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(wine, [ --with-wine use WINE], [wxUSE_WINE="$withval" CACHE_WINE=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(msw, [ --with-msw use MS-Windows], [wxUSE_MSW="$withval" CACHE_MSW=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(pm, [ --with-pm use OS/2 Presentation Manager], [wxUSE_PM="$withval" CACHE_PM=1 TOOLKIT_GIVEN=1])
-AC_ARG_WITH(mgl, [ --with-mgl use SciTech MGL], [wxUSE_MGL="$withval" CACHE_MGL=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(mgl, [ --with-mgl use SciTech MGL], [wxUSE_MGL="$withval" wxUSE_UNIVERSAL="yes" CACHE_MGL=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(microwin, [ --with-microwin use MicroWindows], [wxUSE_MICROWIN="$withval" CACHE_MICROWIN=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(x11, [ --with-x11 use X11], [wxUSE_X11="$withval" wxUSE_UNIVERSAL="yes" CACHE_X11=1 TOOLKIT_GIVEN=1])
WX_ARG_ENABLE(nanox, [ --enable-nanox use NanoX], wxUSE_NANOX)
AC_MSG_RESULT(base ($host_alias hosted) only)
fi
+dnl ---------------------------------------------------------------------------
+dnl When we are using Cygwin with Motif/GTK+, we want it to appear like
+dnl 'just' a POSIX platform, so the Win32 API must not be available
+dnl ---------------------------------------------------------------------------
+
+define_win32=0
+case "${host}" in
+ *-*-cygwin*)
+ if test "$wxUSE_MSW" = 1 ; then
+ define_win32=1
+ fi
+ ;;
+ *-*-mingw*)
+ define_win32=1
+ ;;
+esac
+
+if test "$define_win32" = 1 ; then
+ USE_UNIX=0
+ USE_WIN32=1
+ AC_DEFINE(__WIN32__)
+ AC_DEFINE(__WIN95__)
+ AC_DEFINE(__WINDOWS__)
+ AC_DEFINE(__GNUWIN32__)
+ AC_DEFINE(STRICT)
+ AC_DEFINE(WINVER, 0x0400)
+else
+ USE_UNIX=1
+ USE_WIN32=0
+fi
+
+if test "$USE_UNIX" = 1 ; then
+ wxUSE_UNIX=yes
+ AC_DEFINE(__UNIX__)
+fi
+
dnl ---------------------------------------------------------------------------
dnl Checks for programs
dnl ---------------------------------------------------------------------------
dnl check whether C++ compiler supports bool built-in type
WX_CPP_BOOL
+dnl check whether C++ compiler supports explicit keyword
+WX_CPP_EXPLICIT
+
dnl ---------------------------------------------------------------------------
dnl Define search path for includes and libraries: all headers and libs will be
dnl looked for in all directories of this path
)
fi
- GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXm$xpm_link -lXmu -lXext -lXt -lX11"
+ dnl MBN: this should really be an AC_TRY_LINK, but it is faster
+ dnl to special case it
+ xt_needs_sm_ice=
+ case "${host}" in
+ *-*-cygwin* )
+ xt_needs_sm_ice=" -lSM -lICE"
+ ;;
+ esac
+
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXm$xpm_link -lXmu -lXext -lXt${xt_needs_sm_ice} -lX11"
TOOLKIT_VPATH="\${top_srcdir}/src/motif${PATH_IFS}\${top_srcdir}/src/motif/xmcombo"
TOOLKIT=MOTIF
GUIDIST=MOTIF_DIST
dnl FIXME: is this GL stuff actually even used for wxMSW? should it be??
- if test "$cross_compiling" != "yes"; then
+ if test "$cross_compiling" != "yes" -a "$TOOLKIT_DIR" = "msw"; then
WX_LIBRARY="wxmsw${WX_MSW_VERSION}${lib_unicode_suffix}${lib_debug_suffix}"
WX_LIBRARY_GL="wxmsw_gl${WX_MSW_VERSION}${lib_unicode_suffix}${lib_debug_suffix}"
WX_LIBRARY_NAME_SHARED="${WX_LIBRARY}.${SO_SUFFIX}"
dnl and finally the userland threads
THREAD_OPTS="-kthread lthread $THREAD_OPTS c_r"
;;
- *-*-darwin*)
+ *-*-darwin* | *-*-cygwin* )
dnl Darwin / Mac OS X just uses -lpthread tested below
+ dnl and so does Cygwin
THREAD_OPTS=""
;;
*-*-aix*)
dnl VZ: the GUI hooks wxSocket needs are not implemented yet in wxX11
if test "$wxUSE_SOCKETS" = "yes"; then
- if test "$TOOLKIT" = "X11"; then
+ if test "$wxUSE_X11" = "1"; then
AC_MSG_WARN([wxSocket not yet supported under X11... disabled])
wxUSE_SOCKETS="no"
fi
+
+ if test "$wxUSE_MGL" = "1"; then
+ AC_MSG_WARN([wxSocket not yet supported under MGL... disabled])
+ wxUSE_SOCKETS="no"
+ fi
fi
if test "$wxUSE_SOCKETS" = "yes"; then
fi
if test "$wxUSE_CLIPBOARD" = "yes"; then
- AC_DEFINE(wxUSE_CLIPBOARD)
+ if test "$wxUSE_MGL" = 1; then
+ AC_MSG_WARN([Clipboard not yet supported under MGL... disabled])
+ wxUSE_CLIPBOARD=no
+ fi
- dnl required by clipboard code in configuration check
- AC_DEFINE(wxUSE_DATAOBJ)
+ if test "$wxUSE_CLIPBOARD" = "yes"; then
+ AC_DEFINE(wxUSE_CLIPBOARD)
+
+ dnl required by clipboard code in configuration check
+ AC_DEFINE(wxUSE_DATAOBJ)
+ fi
fi
if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
wxUSE_DRAG_AND_DROP=no
fi
+ if test "$wxUSE_MGL" = 1; then
+ AC_MSG_WARN([Drag and drop not yet supported under MGL... disabled])
+ wxUSE_DRAG_AND_DROP=no
+ fi
+
if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
AC_DEFINE(wxUSE_DRAG_AND_DROP)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd"