AC_DEFINE(__EMX__)
PROGRAM_EXT=".exe"
DEFAULT_DEFAULT_wxUSE_PM=1
+ LIBS="$LIBS -lstdcpp"
;;
powerpc-*-darwin* )
DEFAULT_wxUSE_DIALUP_MANAGER=yes
DEFAULT_wxUSE_JOYSTICK=yes
DEFAULT_wxUSE_DYNLIB_CLASS=yes
- DEFAULT_wxUSE_DYNAMIC_LOADER=no
+ DEFAULT_wxUSE_DYNAMIC_LOADER=yes
DEFAULT_wxUSE_LONGLONG=yes
DEFAULT_wxUSE_GEOMETRY=yes
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_ARG_ENABLE(gtk2, [ --enable-gtk2 use GTK+ 2.0 if available (EXPERIMENTAL)],wxUSE_GTK2=1,wxUSE_GTK2=0)
+AC_ARG_ENABLE(gtk2, [ --enable-gtk2 use GTK+ 2.0 if available (EXPERIMENTAL)],wxUSE_GTK2="yes",wxUSE_GTK2="no")
WX_ARG_SYS_WITH(libpng, [ --with-libpng use libpng (PNG image format)], wxUSE_LIBPNG)
WX_ARG_SYS_WITH(libjpeg, [ --with-libjpeg use libjpeg (JPEG file format)], wxUSE_LIBJPEG)
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(compat22, [ --disable-compat22 disable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
dnl ---------------------------------------------------------------------------
dnl (small) optional non GUI classes
WX_ARG_ENABLE(ico_cur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR)
fi
+
+dnl General settings (needed for GUI and non-GUI compilations alike).
+dnl Path separator; ':' for unix, ';' for OS/2
+dnl Stem for flex output; lexyy for OS/2, lex.yy otherwise
+case "${host}" in
+ *-pc-os2_emx | *-pc-os2-emx )
+ dnl PATH_IFS is autodetected by OS/2's configure (usually ';')
+ LEX_STEM="lexyy"
+ ;;
+ *)
+ PATH_IFS=':'
+ LEX_STEM="lex.yy"
+ ;;
+esac
+
dnl for GUI only
dnl cache the options values before (may be) aborting below
+ ${wxUSE_WINE:-0} + ${wxUSE_MSW:-0} + ${wxUSE_MGL:-0} + ${wxUSE_MICROWIN:-0} + ${wxUSE_X11:-0}`
dnl Allow wxUSE_PM only for OS/2 with EMX.
- dnl Path separator; ':' for unix.
- dnl Stem for flex output; lexyy for OS/2, lex.yy otherwise
case "${host}" in
*-pc-os2_emx | *-pc-os2-emx )
- # PATH_IFS is autodetected by OS/2's configure (usually ';')
NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}`
- LEX_STEM="lexyy"
- ;;
- *)
- PATH_IFS=':'
- LEX_STEM="lex.yy"
- ;;
esac
case "$NUM_TOOLKITS" in
fi
done
else
- PATH_IFS=':'
AC_MSG_RESULT(base ($host_alias hosted) only)
fi
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 test "$build" != "$host" ; then
- if test "$USE_WIN32" = 1 -o "$USE_DOS" = 1 ; then
+ if test "$USE_WIN32" = 1 -o "$USE_DOS" = 1 -o "$USE_UNIX"; then
CC=$host_alias-gcc
CXX=$host_alias-c++
AR=$host_alias-ar
AC_CACHE_CHECK([if make is GNU make], wx_cv_prog_makeisgnu,
[
if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null |
- egrep -qs GNU); then
+ egrep -s GNU > /dev/null); then
wx_cv_prog_makeisgnu="yes"
else
wx_cv_prog_makeisgnu="no"
wx_cv_lib_gtk=
if test "x$wxUSE_GTK2" = "xyes"; then
- AM_PATH_GTK_2_0(1.3.1, wx_cv_lib_gtk=2.0, , $GTK_MODULES)
+ AM_PATH_GTK_2_0(2.0.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES)
fi
if test -z "$wx_cv_lib_gtk"; then
AFMINSTALL=afminstall
COMPILED_X_PROGRAM=0
- if test "$wxUSE_NANOX" = 1; then
+ if test "$wxUSE_NANOX" = "yes"; then
AC_MSG_CHECKING(for MicroWindows/NanoX distribution)
if test "x$MICROWIN" = x ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR([Cannot find MicroWindows library. Make sure MICROWIN is set.])
else
AC_MSG_RESULT($MICROWIN)
+ AC_DEFINE(wxUSE_NANOX)
fi
fi
)
fi
- if test "$wxUSE_NANOX" = 1; then
+ 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__"
- GUI_TK_LIBRARY="$GUI_TK_LIBRARY \$MICROWIN/src/lib/libnano-X.a \$MICROWIN/src/lib/libmwengine.a \$MICROWIN/src/lib/libmwfonts.a \$MICROWIN/src/lib/libmwdrivers.a \$MICROWIN/src/lib/libmwobjects.a"
+ 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"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY \$(MICROWIN)/src/lib/libnano-X.a"
else
- GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lX11"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lX11$xpm_link"
fi
TOOLKIT_VPATH="\${top_srcdir}/src/x11"
ALL_HEADERS="\$(ALL_HEADERS) \${UNIV_HEADERS}"
PORT_FILES="${PORT_FILES} \${top_srcdir}/src/univ/files.lst"
- TOOLKIT_VPATH="\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes${PATH_IFS}\${top_srcdir}/src/${TOOLKIT_DIR}"
+ if test "$wxUSE_X11" = 1; then
+ TOOLKIT_VPATH="\${top_srcdir}/src/${TOOLKIT_DIR}${PATH_IFS}\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes"
+ else
+ TOOLKIT_VPATH="\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes${PATH_IFS}\${top_srcdir}/src/${TOOLKIT_DIR}"
+ fi
TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__"
WIDGET_SET=univ
else
;;
*-*-darwin* )
+ dnl For Unix to MacOS X porting instructions, see:
+ dnl http://fink.sourceforge.net/doc/porting/porting.html
CFLAGS="$CFLAGS -fno-common -DDYLIB_INIT"
CXXFLAGS="$CXXFLAGS -fno-common -DDYLIB_INIT"
SHARED_LD="$CXX -dynamiclib -init _wxWindowsDylibInit -o"
PIC_FLAG="-dynamic -fPIC"
+ SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}"
+ SONAME_FLAGS_GL=${SONAME_FLAGS}
;;
*-*-aix* )
WX_ALL_INSTALLED="${WX_ALL_INSTALLED} preinstall_res"
AC_CHECK_PROG(RESCOMP, Rez, Rez, /Developer/Tools/Rez)
AC_CHECK_PROG(DEREZ, DeRez, DeRez, /Developer/Tools/DeRez)
+ MACOSX_BUNDLE="bundle"
LIBWXMACRES="\$(top_builddir)/lib/lib${WX_LIBRARY}.r"
LIBWXMACRESCOMP="\$(RESCOMP) Carbon.r -t APPL ${LIBWXMACRES} -o \$(BIN_PROGRAM)"
LIBWXMACRESWXCONFIG="${RESCOMP} Carbon.r -t APPL \${prefix}/lib/${WX_RESOURCES_MACOSX_COMPILED} -o"
+else
+ if test "$wxUSE_PM" = 1; then
+ LIBWXMACRESCOMP="emxbind -ep \$(BIN_PROGRAM)"
+ fi
fi
dnl ------------------------------------------------------------------------
dnl Check for headers
dnl ------------------------------------------------------------------------
-dnl do not check for strings.h for wxMac
-dnl it exists but is only a simple redirection to string.h
-dnl it is in conflict with Strings.h in FlatCarbon headers
+dnl test for strings.h needed under AIX, but do not check for it wxMac as
+dnl it exists but is only a simple redirection to string.h and it is in
+dnl conflict with Strings.h in FlatCarbon headers
if test "$wxUSE_MAC" != 1; then
- dnl defines HAVE_STRINGS_H (where some string functions live on AIX for example)
+ dnl defines HAVE_STRINGS_H
AC_CHECK_HEADERS(strings.h)
fi
AC_CHECK_HEADERS(unistd.h)
dnl defines HAVE_WCHAR_H
AC_CHECK_HEADERS(wchar.h)
-dnl defines HAVE_WCSTR_H
-AC_CHECK_HEADERS(wcstr.h)
-dnl defined HAVE_WCTYPE_H
-AC_CHECK_HEADERS(wctype.h)
+
+dnl maybe wchar_t is in wcstr.h if we don't have wchar.h?
+if test "$ac_cv_header_wchar_h" != "yes"; then
+ dnl defines HAVE_WCSTR_H
+ AC_CHECK_HEADERS(wcstr.h)
+fi
+
+dnl checking for wctype.h is useless as we need wcslen(), not just wchar_t and
+dnl this function is never provided by it
+dnl AC_CHECK_HEADERS(wctype.h)
+
dnl defines HAVE_FNMATCH_H
AC_CHECK_HEADERS(fnmatch.h)
dnl defines HAVE_LANGINFO_H (GNU libc locale parameters)
dnl defines the size of certain types of variables in SIZEOF_<TYPE>
AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(short, 2)
-AC_CHECK_SIZEOF(int *, 4)
+AC_CHECK_SIZEOF(void *, 4)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
-AC_CHECK_SIZEOF(long long, 0)
+
+case "${host}" in
+ arm-*-linux* )
+ AC_CHECK_SIZEOF(long long, 8)
+ ;;
+ * )
+ AC_CHECK_SIZEOF(long long, 0)
+esac
+
dnl we have to do it ourselves because SGI/Irix's stdio.h does not include
dnl wchar_t and AC_CHECK_SIZEOF only includes stdio.h
WXWIN_COMPATIBILITY_2_2="yes"
fi
-if test "$WXWIN_COMPATIBILITY_2_2" = "yes"; then
+if test "x$WXWIN_COMPATIBILITY_2_2" != "xno"; then
AC_DEFINE(WXWIN_COMPATIBILITY_2_2)
fi
dnl wxSocket
dnl ------------------------------------------------------------------------
-dnl under MSW we always have sockets
-if test "$TOOLKIT" != "MSW"; 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
+ AC_MSG_WARN([wxSocket not yet supported under X11... disabled])
+ wxUSE_SOCKETS="no"
+ fi
+fi
- if test "$wxUSE_SOCKETS" = "yes"; then
- dnl under Solaris, socket functions live in -lsocket
+if test "$wxUSE_SOCKETS" = "yes"; then
+ dnl under MSW we always have sockets
+ 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,
- INET_LINK="$INET_LINK -lsocket",
+ 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
+if test "$wxUSE_SOCKETS" = "yes" ; then
dnl this test may be appropriate if building under cygwin
dnl right now I'm assuming it also uses the winsock stuff
dnl like mingw does.. -- RL
-
- if test "$wxUSE_SOCKETS" = "yes" ; then
+ if test "$TOOLKIT" != "MSW"; then
dnl determine the type of third argument for getsockname
AC_CACHE_CHECK([what is the type of the third argument of getsockname],
wx_cv_type_getsockname3,
fi
fi
fi
-dnl if !MSW
if test "$wxUSE_SOCKETS" = "yes" ; then
AC_DEFINE(wxUSE_SOCKETS)
if test "$wxUSE_UNICODE" = "yes" ; then
AC_DEFINE(wxUSE_UNICODE)
+
+ if test "$wxUSE_MSW" != 1; then
+ wxUSE_UNICODE_MSLU=no
+ fi
if test "$wxUSE_MSW" = 1 -a "$wxUSE_UNICODE_MSLU" = "yes"; then
AC_CHECK_LIB(unicows,main,
if test "$wxUSE_MSW" = 1; then
if test "$wxUSE_MS_HTML_HELP" = "yes"; then
- AC_CHECK_HEADER(htmlhelp.h,
- [
- AC_DEFINE(wxUSE_MS_HTML_HELP)
- ],
- [
- AC_MSG_WARN([MS HTML Help cannot be used without htmlhelp.h... disabled])
- wxUSE_MS_HTML_HELP=no
- ])
+ AC_DEFINE(wxUSE_MS_HTML_HELP)
fi
fi
fi
if test "$wxUSE_RESOURCES" = "yes" ; then
- AC_DEFINE(wxUSE_RESOURCES)
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource"
+ if test "$wxUSE_NANOX" = "yes"; then
+ AC_MSG_WARN([Cannot use resource database functions in NanoX])
+ else
+ AC_DEFINE(wxUSE_RESOURCES)
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource"
+ fi
fi
if test "$wxUSE_X_RESOURCES" = "yes"; then
fi
if test "$wxUSE_CLIPBOARD" = "yes"; then
- if test "$wxUSE_X11" = 1; then
- AC_MSG_WARN([Clipboard not yet supported under X11... disabled])
- wxUSE_CLIPBOARD=no
- fi
+ AC_DEFINE(wxUSE_CLIPBOARD)
- if test "$wxUSE_CLIPBOARD" = "yes"; then
- AC_DEFINE(wxUSE_CLIPBOARD)
-
- dnl required by clipboard code in configuration check
- AC_DEFINE(wxUSE_DATAOBJ)
- fi
+ dnl required by clipboard code in configuration check
+ AC_DEFINE(wxUSE_DATAOBJ)
fi
if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
fi
if test "$wxUSE_DIRDLG" = "yes"; then
- if test "$wxUSE_CONSTRAINTS" != "yes"; then
- AC_MSG_WARN(wxDirDialog requires constraints so it won't be compiled without them)
+ if test "$wxUSE_TREECTRL" != "yes"; then
+ AC_MSG_WARN(wxDirDialog requires wxTreeCtrl so it won't be compiled without it)
else
- if test "$wxUSE_TREECTRL" != "yes"; then
- AC_MSG_WARN(wxDirDialog requires wxTreeCtrl so it won't be compiled without it)
- else
- AC_DEFINE(wxUSE_DIRDLG)
- fi
+ AC_DEFINE(wxUSE_DIRDLG)
fi
fi
dnl TODO some samples are never built so far:
dnl ipc, mfc, nativdlg, oleauto, ownerdrw
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs \
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs \
drawing dynamic erase event exec font image \
minimal richedit rotate widgets"
dnl additional for Mac OS X
AC_SUBST(DEREZ)
+AC_SUBST(MACOSX_BUNDLE)
AC_SUBST(LIBWXMACRES)
AC_SUBST(LIBWXMACRESCOMP)
AC_SUBST(LIBWXMACRESWXCONFIG)