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 ---------------------------------------------------------------------------
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 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 needed for making link to setup.h
AC_PROG_LN_S
+dnl ------------------------------------------------------------------------
+dnl Check for headers
+dnl ------------------------------------------------------------------------
+
+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
+ AC_CHECK_HEADERS(strings.h)
+fi
+
+dnl defines HAVE_STDLIB_H
+AC_CHECK_HEADERS(stdlib.h)
+dnl defines HAVE_MALLOC_H
+AC_CHECK_HEADERS(malloc.h)
+dnl defines HAVE_UNISTD_H
+AC_CHECK_HEADERS(unistd.h)
+dnl defines HAVE_WCHAR_H
+AC_CHECK_HEADERS(wchar.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)
+
+if test "x$ac_cv_header_fnmatch_h" = "xyes"; then
+ AC_CHECK_FUNCS(fnmatch)
+fi
+
+dnl defines HAVE_LANGINFO_H (GNU libc locale parameters)
+AC_CHECK_HEADERS(langinfo.h)
+
+if test "$wxUSE_GUI" = "yes"; then
+ if test "$wxUSE_UNIX" = "yes"; then
+ dnl defines HAVE_X11_XKBLIB_H
+ AC_CHECK_HEADERS(X11/XKBlib.h)
+ fi
+fi
+
+dnl ---------------------------------------------------------------------------
+dnl Checks for compiler characteristics
+dnl ---------------------------------------------------------------------------
+
+dnl defines const to be empty if c-compiler does not support const fully
+AC_C_CONST
+dnl defines inline to a sensible value for the c-compiler
+AC_C_INLINE
+
+dnl check the sizes of integral types (give some reasonable default values for
+dnl cross-compiling)
+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(void *, 4)
+AC_CHECK_SIZEOF(int, 4)
+AC_CHECK_SIZEOF(long, 4)
+
+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
+dnl Mac OS X does not provide wchar.h and wchar_t is defined by stdlib.h (GD)
+AC_CACHE_CHECK([size of wchar_t], wx_cv_sizeof_wchar_t,
+[
+ AC_TRY_RUN(
+ [
+ #ifdef HAVE_WCHAR_H
+ # ifdef __CYGWIN__
+ # include <stddef.h>
+ # endif
+ # include <wchar.h>
+ #endif
+ #ifdef HAVE_STDLIB_H
+ # include <stdlib.h>
+ #endif
+ #include <stdio.h>
+ int main()
+ {
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%i", sizeof(wchar_t));
+ exit(0);
+ }
+ ],
+ wx_cv_sizeof_wchar_t=`cat conftestval`,
+ wx_cv_sizeof_wchar_t=0,
+ wx_cv_sizeof_wchar_t=4
+ )
+])
+
+AC_DEFINE_UNQUOTED(SIZEOF_WCHAR_T, $wx_cv_sizeof_wchar_t)
+
+dnl check for large file support
+AC_SYS_LARGEFILE
+
+dnl check for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
+WX_C_BIGENDIAN
+
+dnl check for iostream (as opposed to iostream.h) standard header
+WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH))
+
+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
AC_CACHE_SAVE
dnl check for glibc version
+dnl
+dnl VZ: I have no idea why had this check been there originally, but now
+dnl it is only used to get the recursive mutexes under Linux
if test "$USE_LINUX" = 1; then
AC_CACHE_CHECK([for glibc 2.1 or later], wx_cv_lib_glibc21,[
AC_TRY_COMPILE([#include <features.h>],
[
- #if !__GLIBC_PREREQ(2, 1)
+ #if (__GLIBC__ < 2) || (__GLIBC_MINOR__ < 1)
#error not glibc2.1
#endif
],
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}"
;;
*-*-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* )
fi
fi
-dnl ------------------------------------------------------------------------
-dnl Check for headers
-dnl ------------------------------------------------------------------------
-
-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
- AC_CHECK_HEADERS(strings.h)
-fi
-
-dnl defines HAVE_STDLIB_H
-AC_CHECK_HEADERS(stdlib.h)
-dnl defines HAVE_MALLOC_H
-AC_CHECK_HEADERS(malloc.h)
-dnl defines HAVE_UNISTD_H
-AC_CHECK_HEADERS(unistd.h)
-dnl defines HAVE_WCHAR_H
-AC_CHECK_HEADERS(wchar.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)
-
-if test "x$ac_cv_header_fnmatch_h" = "xyes"; then
- AC_CHECK_FUNCS(fnmatch)
-fi
-
-dnl defines HAVE_LANGINFO_H (GNU libc locale parameters)
-AC_CHECK_HEADERS(langinfo.h)
-
-if test "$wxUSE_GUI" = "yes"; then
- if test "$wxUSE_UNIX" = "yes"; then
- dnl defines HAVE_X11_XKBLIB_H
- AC_CHECK_HEADERS(X11/XKBlib.h)
- fi
-fi
-
dnl ---------------------------------------------------------------------------
dnl Checks for typedefs
dnl ---------------------------------------------------------------------------
AC_DEFINE(HAVE_PW_GECOS)
fi
-dnl ---------------------------------------------------------------------------
-dnl Checks for compiler characteristics
-dnl ---------------------------------------------------------------------------
-
-dnl defines const to be empty if c-compiler does not support const fully
-AC_C_CONST
-dnl defines inline to a sensible value for the c-compiler
-AC_C_INLINE
-
-dnl check the sizes of integral types (give some reasonable default values for
-dnl cross-compiling)
-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(void *, 4)
-AC_CHECK_SIZEOF(int, 4)
-AC_CHECK_SIZEOF(long, 4)
-
-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
-dnl Mac OS X does not provide wchar.h and wchar_t is defined by stdlib.h (GD)
-AC_CACHE_CHECK([size of wchar_t], wx_cv_sizeof_wchar_t,
-[
- AC_TRY_RUN(
- [
- #ifdef HAVE_WCHAR_H
- # ifdef __CYGWIN__
- # include <stddef.h>
- # endif
- # include <wchar.h>
- #endif
- #ifdef HAVE_STDLIB_H
- # include <stdlib.h>
- #endif
- #include <stdio.h>
- int main()
- {
- FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
- fprintf(f, "%i", sizeof(wchar_t));
- exit(0);
- }
- ],
- wx_cv_sizeof_wchar_t=`cat conftestval`,
- wx_cv_sizeof_wchar_t=0,
- wx_cv_sizeof_wchar_t=4
- )
-])
-
-AC_DEFINE_UNQUOTED(SIZEOF_WCHAR_T, $wx_cv_sizeof_wchar_t)
-
-dnl for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
-WX_C_BIGENDIAN
-
-dnl check for iostream (as opposed to iostream.h) standard header
-WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH))
-
-dnl check whether C++ compiler supports bool built-in type
-WX_CPP_BOOL
-
dnl ---------------------------------------------------------------------------
dnl Check for functions
dnl ---------------------------------------------------------------------------
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
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"
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