AC_DEFINE(__EMX__)
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"
+ 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* )
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)
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 )
PATH_IFS=';'
-dnl Really ought to text for this as meanwhile there are flex versions using
-dnl lex.yy as well due to FAT support being more and more dropped...
- LEX_STEM="lexyy"
;;
*)
PATH_IFS=':'
- LEX_STEM="lex.yy"
;;
esac
dnl ar command
dnl defines AR with the appropriate command
-AC_CHECK_PROG(AR, ar, ar, ar)
+AC_CHECK_PROG(AR, ar, ar)
+if test "x$AR" = "x" ; then
+ AC_MSG_ERROR([ar is needed to build wxWindows])
+fi
dnl install checks
dnl defines INSTALL with the appropriate command
fi dnl make without VPATH
fi dnl not GNU make
-dnl YACC checks
-dnl defines YACC with the appropriate command
-AC_PROG_YACC
-
-dnl LEX checks
-dnl defines LEX with the appropriate command
-dnl defines LEXLIB with the appropriate library
-AC_PROG_LEX
-
dnl needed for making link to setup.h
AC_PROG_LN_S
dnl (OS/2-only piece)
case "${host}" in
*-pc-os2_emx | *-pc-os2-emx )
- dnl Explicitly link -lstdcpp, since we are using "gcc" not "g++"/"c++".
- LIBS="$LIBS -lstdcpp"
if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
dnl More complete Unix emulation for unix-like ports
dnl by linking in POSIX/2's cExt (if available).
if test "$wxUSE_GUI" = "yes"; then
if test "$wxUSE_UNIX" = "yes"; then
dnl defines HAVE_X11_XKBLIB_H
- AC_CHECK_HEADERS(X11/XKBlib.h)
+ AC_CHECK_HEADERS(X11/Xlib.h)
+ AC_CHECK_HEADERS([X11/XKBlib.h], [], [],
+ [
+ #if HAVE_X11_XLIB_H
+ #include <X11/Xlib.h>
+ #endif
+ ])
fi
fi
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
dnl ------------------------------------------------------------------------
if test "$wxUSE_EXPAT" != "no"; then
- wxUSE_XML=1
+ wxUSE_XML=yes
AC_DEFINE(wxUSE_EXPAT)
AC_DEFINE(wxUSE_XML)
if test "$wxUSE_MSW" = 1 ; then
TOOLKIT=MSW
GUIDIST=MSW_DIST
+
+ dnl -mwindows causes a heap of other default gui libs to be linked in.
+ dnl FIXME: If cygwin needs this, please push it above, if not, please
+ dnl remove this comment :-)
+ case "${host}" in
+ *-*-mingw32* )
+ WXCONFIG_LDFLAGS_GUI="$LDFLAGS -Wl,--subsystem,windows -mwindows"
+ esac
fi
if test "$wxUSE_GTK" = 1; then
case "${host}" in
*-*-linux* | *-*-gnu* )
SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(top_builddir)lib"
+ ;;
*-*-solaris2* )
if test "$GCC" = yes ; then
[
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"
+ )
+ ]
)
- )
+ ]
)
]
)
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 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
dnl pragmas:
CPPFLAGS="-DNO_GCC_PRAGMA $CPPFLAGS"
;;
- *)
- ;;
esac
fi
+dnl We have to output NO_GCC_PRAGMA with wx-config on Apple, too:
+case "${host}" in
+ powerpc-*-darwin* )
+ dnl Some Apple's GCC version are broken and can't handle the
+ dnl pragmas:
+ CODE_GEN_FLAGS_CXX="-DNO_GCC_PRAGMA $CODE_GEN_FLAGS_CXX"
+ ;;
+esac
dnl for convenience, sort the samples in alphabetical order
SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq | tr '\n' ' '| tr -d '\r'`"
dnl makefile variables
-AC_SUBST(LEX_STEM)
AC_SUBST(PATH_IFS)
dnl global options
AC_SUBST(WXCONFIG_LIBS_STATIC_GL)
AC_SUBST(WXCONFIG_INCLUDE)
AC_SUBST(WXCONFIG_RPATH)
+AC_SUBST(WXCONFIG_LDFLAGS_GUI)
AC_SUBST(WX_LARGEFILE_FLAGS)
AC_SUBST(CODE_GEN_FLAGS)
AC_SUBST(CODE_GEN_FLAGS_CXX)
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}"