USE_AIX=1
USE_SYSV=1
USE_SVR4=1
+ dnl Irvin Probst <irvin.probst@fr.thalesgroup.com> reports that the shared
+ dnl libraries under AIX have the same suffix as the normal ones
+ SO_SUFFIX=a
AC_DEFINE(__AIX__)
AC_DEFINE(__SYSV__)
AC_DEFINE(__SVR4__)
;;
*-*-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 ---------------------------------------------------------------------------
DEFAULT_wxUSE_PROTOCOL_FTP=no
DEFAULT_wxUSE_PROTOCOL_FILE=no
DEFAULT_wxUSE_URL=no
-
+
DEFAULT_wxUSE_COMMONDLGS=no
DEFAULT_wxUSE_CHOICEDLG=no
DEFAULT_wxUSE_COLOURDLG=no
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)
WX_ARG_ENABLE(compat20, [ --enable-compat20 enable wxWindows 2.0 compatibility], WXWIN_COMPATIBILITY_2)
WX_ARG_ENABLE(compat22, [ --disable-compat22 disable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
+AC_ARG_ENABLE(rpath, [ --enable-rpath=DIR output the rpath flag from wx-config], [wxRPATH_DIR="$enableval"])
+
+if test "$wxRPATH_DIR" != "" -a "$wxRPATH_DIR" != "disable"; then
+ WXCONFIG_RPATH="-Wl,-rpath -Wl,$wxRPATH_DIR"
+fi
+
+
dnl ---------------------------------------------------------------------------
dnl (small) optional non GUI classes
dnl ---------------------------------------------------------------------------
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 install checks
dnl defines INSTALL with the appropriate command
AC_PROG_INSTALL
+
+dnl make install path absolute (if not already); will fail with MSDOS paths
+case ${INSTALL} in
+ /* ) # Absolute
+ ;;
+ *)
+ INSTALL=`pwd`/${INSTALL} ;;
+esac
+
+
case "${host}" in
dnl The other BSD's should probably go in here too, since this is
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
PNG_LINK=
if test "$wxUSE_LIBPNG" != "no" ; then
AC_DEFINE(wxUSE_LIBPNG)
-
+
if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBPNG" = "builtin" ; then
AC_MSG_WARN([wxMGL doesn't work with builtin png library, will use MGL one instead])
wxUSE_LIBPNG=sys
fi
fi
+ wxUSE_UNIVERSAL="yes"
+
TOOLKIT_INCLUDE="-I$MGL_ROOT/include"
GUI_TK_LIBRARY="-L$MGL_ROOT/lib/$mgl_lib_type/$mgl_os -lmgl -lmglcpp -lpm"
TOOLKIT_INCLUDE="-I$MICROWINDOWS/include"
GUI_TK_LIBRARY="-L$MICROWINDOWS/lib -lmwin -lmwengine -mwfonts -mwdrivers -mwinlib"
+ wxUSE_UNIVERSAL="yes"
+
AFMINSTALL=afminstall
TOOLKIT=MICROWIN
GUIDIST=MICROWIN_DIST
-
- TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__ -D__WXMSW__ -D__WIN95__ -D__WIN32__ -DMWIN -DMICROWIN_NOCONTROLS -DMICROWIN_TODO=1"
+
+ TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXMSW__ -D__WIN95__ -D__WIN32__ -DMWIN -DMICROWIN_NOCONTROLS -DMICROWIN_TODO=1"
fi
if test "$wxUSE_X11" = 1; then
)
fi
+ wxUSE_UNIVERSAL="yes"
+
if test "$wxUSE_NANOX" = "yes"; then
TOOLKIT_INCLUDE="-I\$(top_srcdir)/include/wx/x11/nanox -I\$(MICROWIN)/src/include $TOOLKIT_INCLUDE"
TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__NANOX__ -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 -DHAVE_FILEIO -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DLINUX=1 -DUNIX=1 -DUSE_EXPOSURE -DSCREEN_HEIGHT=480 -DSCREEN_WIDTH=640 -DSCREEN_DEPTH=4 -DX11=1"
)
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 dynamic shared libraries (in order to embed the resources)
if test "$wxUSE_MAC" = 1; then
dnl the name of the resources file for wxMac
- WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.r"
+ WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.r"
WX_RESOURCES_MACOSX_DATA="lib${WX_LIBRARY}.rsrc"
fi
;;
;;
*-*-aix* )
- SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o"
+ dnl the abs path below used to be hardcoded here so I guess it must
+ dnl be some sort of standard location under AIX?
+ AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib,
+ makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib)
+
+ SHARED_LD="$(AIX_CXX_LD) -p 0 -o"
;;
*-*-cygwin* | *-*-mingw32* )
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*)
# they had a reason, right??
CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-pcc-struct-return"
fi
+
+ dnl Ian Brown <ian.brown@printsoft.de> reports that versions of gcc before
+ dnl 3.0 overflow the table of contents on rs6000 as they create an entry
+ dnl for each subroutine by default -- using the switch below only creates
+ dnl one entry per file instead at the price of minor performance penalty
+ dnl
+ dnl TODO: test for the gcc version here (how?)
+ case "${host}" in
+ powerpc*-*-aix* )
+ CODE_GEN_FLAGS="$CODE_GEN_FLAGS -mminimal-toc"
+ ;;
+ esac
fi
if test "$wxUSE_OPTIMISE" = "no" ; then
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
if test "$wxUSE_UNICODE" = "yes" ; then
AC_DEFINE(wxUSE_UNICODE)
-
+
if test "$wxUSE_MSW" != 1; then
wxUSE_UNICODE_MSLU=no
fi
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
+
+ if test "$wxUSE_CLIPBOARD" = "yes"; then
+ AC_DEFINE(wxUSE_CLIPBOARD)
- dnl required by clipboard code in configuration check
- AC_DEFINE(wxUSE_DATAOBJ)
+ 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"
else
if test "$wxUSE_PM" = 1; then
AC_MSG_WARN([wxPopupWindow not yet supported under PM... disabled])
- else
+ else
AC_DEFINE(wxUSE_POPUPWIN)
USES_CONTROLS=1
if test "$wxUSE_TIPWINDOW" = "yes"; then
if test "$wxUSE_PM" = 1; then
AC_MSG_WARN([wxTipWindow not yet supported under PM... disabled])
- else
+ else
AC_DEFINE(wxUSE_TIPWINDOW)
fi
fi
if test "$wxUSE_SYSTEM_OPTIONS" = "yes"; then
AC_DEFINE(wxUSE_SYSTEM_OPTIONS)
+if test "$TOOLKIT" = "MSW"; then
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS taskbar"
+fi
+
fi
if test "$wxUSE_PROTOCOL" = "yes"; then
AC_SUBST(WXCONFIG_LIBS_STATIC)
AC_SUBST(WXCONFIG_LIBS_STATIC_GL)
AC_SUBST(WXCONFIG_INCLUDE)
+AC_SUBST(WXCONFIG_RPATH)
dnl the list of files to compile/install
AC_SUBST(ALL_OBJECTS)