dnl Version: $Id$
dnl ---------------------------------------------------------------------------
-dnl ---------------------------------------------------------------------------
-dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS. Uses variables
-dnl gtk_config_prefix and/or gtk_config_exec_prefix if defined.
-dnl ---------------------------------------------------------------------------
-dnl
-AC_DEFUN(AM_PATH_GTK,
-[
- if test x$gtk_config_exec_prefix != x ; then
- gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
- if test x${GTK_CONFIG+set} != xset ; then
- GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
- fi
- fi
- if test x$gtk_config_prefix != x ; then
- gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
- if test x${GTK_CONFIG+set} != xset ; then
- GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
- fi
- fi
-
- AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
- min_gtk_version=ifelse([$1], ,0.99.7,$1)
- AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
- no_gtk=""
- if test "$GTK_CONFIG" != "no" ; then
- GTK_CFLAGS=`$GTK_CONFIG --cflags`
- GTK_LIBS=`$GTK_CONFIG --libs gthread`
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- LIBS="$LIBS $GTK_LIBS"
-dnl
-dnl Now check if the installed GTK is sufficiently new. (Also sanity
-dnl checks the results of gtk-config to some extent)
-dnl
- AC_TRY_RUN([
-#include <gtk/gtk.h>
-#include <gtk/gtkfeatures.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main ()
-{
- int major, minor, micro;
-
- if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
- printf("%s, bad version string\n", "$min_gtk_version");
- exit(1);
- }
-
- if ((GTK_MAJOR_VERSION != gtk_major_version) ||
- (GTK_MINOR_VERSION != gtk_minor_version) ||
- (GTK_MICRO_VERSION != gtk_micro_version)) {
- printf("Headers vs. library version mismatch!\n");
- exit(1);
- }
-
- if (gtk_minor_version == 1) return FALSE;
-
- return !((gtk_major_version > major) ||
- ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
- ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
-}
-],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- else
- no_gtk=yes
- fi
- if test "x$no_gtk" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- GTK_CFLAGS=""
- GTK_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(GTK_CFLAGS)
- AC_SUBST(GTK_LIBS)
-])
-
dnl ===========================================================================
dnl macros to find the a file in the list of include/lib paths
dnl ===========================================================================
[
AC_MSG_CHECKING([for --with-$1])
no_cache=0
- AC_ARG_WITH($1, $2,
+ AC_ARG_WITH($1, [$2],
[
if test "$withval" = yes; then
ac_cv_use_$1='$3=yes'
[
AC_MSG_CHECKING([for --with-$1])
no_cache=0
- AC_ARG_WITH($1, $2,
+ AC_ARG_WITH($1, [$2],
[
if test "$withval" = yes; then
ac_cv_use_$1='$3=yes'
[
AC_MSG_CHECKING([for --enable-$1])
no_cache=0
- AC_ARG_ENABLE($1, $2,
+ AC_ARG_ENABLE($1, [$2],
[
if test "$enableval" = yes; then
ac_cv_use_$1='$3=yes'
fi
])
-dnl -
-dnl - GNU libc extension (added by GL)
-dnl -
-
-AC_DEFUN(WX_GNU_EXTENSIONS,
-[
-AC_MSG_CHECKING([if you need GNU extensions])
-AC_CACHE_VAL(wx_cv_gnu_extensions,[
- AC_TRY_COMPILE([#include <features.h>],[
-
-#ifndef __GNU_LIBRARY__
- Compile error wanted
-#endif
-
-],
- [wx_cv_gnu_extensions=yes],
- [wx_cv_gnu_extensions=no])
-])
-
-AC_MSG_RESULT($wx_cv_gnu_extensions)
-if test "$wx_cv_gnu_extensions" = "yes"; then
- AC_DEFINE_UNQUOTED(_GNU_SOURCE)
-fi
-])
-
-
dnl ---------------------------------------------------------------------------
dnl initialization
dnl ---------------------------------------------------------------------------
WX_MAJOR_VERSION_NUMBER=2
WX_MINOR_VERSION_NUMBER=3
-WX_RELEASE_NUMBER=1
+WX_RELEASE_NUMBER=2
WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER
WX_RELEASE=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER
-WX_CURRENT=0
+WX_CURRENT=1
WX_REVISION=0
WX_AGE=0
DEFAULT_wxUSE_CLIPBOARD=no
DEFAULT_wxUSE_TOOLTIPS=no
DEFAULT_wxUSE_DRAG_AND_DROP=no
+ DEFAULT_wxUSE_DRAGIMAGE=no
DEFAULT_wxUSE_SPLINES=no
DEFAULT_wxUSE_MDI_ARCHITECTURE=no
DEFAULT_wxUSE_CONSTRAINTS=no
DEFAULT_wxUSE_IPC=no
DEFAULT_wxUSE_HELP=no
+ DEFAULT_wxUSE_WXHTML_HELP=no
DEFAULT_wxUSE_WXTREE=no
DEFAULT_wxUSE_METAFILE=no
DEFAULT_wxUSE_MIMETYPE=no
DEFAULT_wxUSE_TEXTDLG=no
DEFAULT_wxUSE_STARTUP_TIPS=no
DEFAULT_wxUSE_PROGRESSDLG=no
+ DEFAULT_wxUSE_WIZARDDLG=no
+
DEFAULT_wxUSE_MENUS=no
DEFAULT_wxUSE_MINIFRAME=no
DEFAULT_wxUSE_HTML=no
DEFAULT_wxUSE_APPLE_IEEE=yes
DEFAULT_wxUSE_LOG=yes
+ DEFAULT_wxUSE_LOGWINDOW=yes
+ DEFAULT_wxUSE_LOGGUI=yes
DEFAULT_wxUSE_GUI=yes
DEFAULT_wxUSE_CLIPBOARD=yes
DEFAULT_wxUSE_TOOLTIPS=yes
DEFAULT_wxUSE_DRAG_AND_DROP=yes
+ DEFAULT_wxUSE_DRAGIMAGE=yes
DEFAULT_wxUSE_SPLINES=yes
DEFAULT_wxUSE_MDI_ARCHITECTURE=yes
DEFAULT_wxUSE_CONSTRAINTS=yes
DEFAULT_wxUSE_IPC=yes
DEFAULT_wxUSE_HELP=yes
+ DEFAULT_wxUSE_WXHTML_HELP=yes
DEFAULT_wxUSE_WXTREE=yes
DEFAULT_wxUSE_METAFILE=yes
DEFAULT_wxUSE_MIMETYPE=yes
DEFAULT_wxUSE_TEXTDLG=yes
DEFAULT_wxUSE_STARTUP_TIPS=yes
DEFAULT_wxUSE_PROGRESSDLG=yes
+ DEFAULT_wxUSE_WIZARDDLG=yes
+
DEFAULT_wxUSE_MENUS=yes
DEFAULT_wxUSE_MINIFRAME=yes
DEFAULT_wxUSE_HTML=yes
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 MGL], [wxUSE_MGL="$withval" CACHE_MGL=1 TOOLKIT_GIVEN=1])
-AC_ARG_WITH(gtk-prefix, [ --with-gtk-prefix=PFX Prefix where GTK is installed],
- gtk_config_prefix="$withval", gtk_config_prefix="")
-AC_ARG_WITH(gtk-exec-prefix, [ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed],
- gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
+AC_ARG_ENABLE(gtk2, [ --enable-gtk2 use GTK+ 2.0 if available (EXPERIMENTAL)],wxUSE_GTK2=1,wxUSE_GTK2=0)
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(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 wxWin 2.0 compatibility], WXWIN_COMPATIBILITY_2)
+WX_ARG_ENABLE(compat22, [ --enable-compat22 enable wxWin 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
+
dnl ---------------------------------------------------------------------------
dnl (small) optional non GUI classes
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
WX_ARG_ENABLE(docview, [ --enable-docview use document view architecture], wxUSE_DOC_VIEW_ARCHITECTURE)
-WX_ARG_ENABLE(help, [ --enable-help use help (using external browser at present)], wxUSE_HELP)
+WX_ARG_ENABLE(help, [ --enable-help use help subsystem], wxUSE_HELP)
+WX_ARG_ENABLE(html, [ --enable-html use wxHTML sub-library], wxUSE_HTML)
+WX_ARG_ENABLE(htmlhelp, [ --enable-htmlhelp use wxHTML-based help], wxUSE_WXHTML_HELP)
WX_ARG_ENABLE(constraints, [ --enable-constraints use layout-constraints system], wxUSE_CONSTRAINTS)
WX_ARG_ENABLE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE)
WX_ARG_ENABLE(mdi, [ --enable-mdi use multiple document interface architecture], wxUSE_MDI_ARCHITECTURE)
WX_ARG_ENABLE(treectrl, [ --enable-treectrl use wxTreeCtrl class], wxUSE_TREECTRL)
dnl ---------------------------------------------------------------------------
-dnl misc GUI options
+dnl common dialogs
dnl ---------------------------------------------------------------------------
WX_ARG_ENABLE(commondlg, [ --enable-commondlg use common dialogs (wxDirDialog, wxProgressDialog, wxTextDialog, ...)], wxUSE_COMMONDLGS)
WX_ARG_ENABLE(textdlg, [ --enable-textdlg use wxTextDialog], wxUSE_TEXTDLG)
WX_ARG_ENABLE(tipdlg, [ --enable-tipdlg use startup tips], wxUSE_STARTUP_TIPS)
WX_ARG_ENABLE(progressdlg, [ --enable-progressdlg use wxProgressDialog], wxUSE_PROGRESSDLG)
+WX_ARG_ENABLE(wizarddlg, [ --enable-wizarddlg use wxWizard], wxUSE_WIZARDDLG)
+
+dnl ---------------------------------------------------------------------------
+dnl misc GUI options
+dnl ---------------------------------------------------------------------------
+
WX_ARG_ENABLE(menus, [ --enable-menus use wxMenu/wxMenuBar/wxMenuItem classes], wxUSE_MENUS)
WX_ARG_ENABLE(miniframe, [ --enable-miniframe use wxMiniFrame class], wxUSE_MINIFRAME)
-WX_ARG_ENABLE(html, [ --enable-html use wxHTML sub-library], wxUSE_HTML)
WX_ARG_ENABLE(tooltips, [ --enable-tooltips use wxToolTip class], wxUSE_TOOLTIPS)
WX_ARG_ENABLE(splines, [ --enable-splines use spline drawing code], wxUSE_SPLINES)
WX_ARG_ENABLE(validators, [ --enable-validators use wxValidator and derived classes], wxUSE_VALIDATORS)
WX_ARG_ENABLE(busyinfo, [ --enable-busyinfo use wxBusyInfo], wxUSE_BUSYINFO)
WX_ARG_ENABLE(joystick, [ --enable-joystick compile in joystick support (Linux only)], wxUSE_JOYSTICK)
WX_ARG_ENABLE(metafile, [ --enable-metafiles use wxMetaFile (Windows only)], wxUSE_METAFILE)
+WX_ARG_ENABLE(dragimage, [ --enable-dragimage use wxDragImage], wxUSE_DRAGIMAGE)
dnl ---------------------------------------------------------------------------
dnl support for image formats that do not rely on external library
echo "$var=$value" >> ${wx_arg_cache_file}
fi
if test "$value" = 1; then
- AC_MSG_RESULT([`echo $toolkit | tr [[A-Z]] [[a-z]]`])
+ toolkit_echo=`echo $toolkit | tr [[A-Z]] [[a-z]]`
+ AC_MSG_RESULT($toolkit_echo)
fi
fi
done
fi
if test "$wxUSE_GTK" = 1; then
- dnl avoid calling AM_PATH_GTK twice, so check first for the newer version
- dnl and only then, if it wasn't found, for an older one
- AM_PATH_GTK_2_0(1.3.1, WXGTK20=1,[
- AM_PATH_GTK(1.2.7, WXGTK127=1)
- AM_PATH_GTK(1.2.3, WXGTK12=1)
- ], gthread)
-
- if test "$WXGTK12" != 1 -a "$WXGTK20" != 1; then
- AC_MSG_ERROR([
- Please check that gtk-config is in path, the directory
- where GTK+ libraries are installed (returned by
- 'gtk-config --libs' command) is in LD_LIBRARY_PATH or
- equivalent variable and GTK+ is version 1.2.3 or above.
- ])
- fi
+ AC_MSG_CHECKING([for GTK+ version])
+
+ gtk_version_cached=1
+ AC_CACHE_VAL(wx_cv_lib_gtk,
+ [
+ dnl stupid GTK+ AM macros produce their own messages, so we
+ dnl have to pass to the next line
+ gtk_version_cached=0
+ AC_MSG_RESULT("")
+
+ 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, gthread)
+ fi
- TOOLKIT_INCLUDE="$GTK_CFLAGS"
+ if test -z "$wx_cv_lib_gtk"; then
+ AM_PATH_GTK(1.2.7, wx_cv_lib_gtk=1.2.7)
+ fi
- dnl Appending gthreads as it was done here is not portable, instead
- dnl we now call "gtk-config --libs gthread" which sets the right library
- dnl name for us. The following hacks are no longer required.
+ if test -z "$wx_cv_lib_gtk"; then
+ AM_PATH_GTK(1.2.3, wx_cv_lib_gtk=1.2.3)
+ fi
+
+ if test -z "$wx_cv_lib_gtk"; then
+ dnl looks better in AC_MSG_RESULT
+ wx_cv_lib_gtk=none
+ else
+ dnl we need to cache GTK_CFLAGS and GTK_LIBS for the
+ dnl subsequent runs
+ wx_cv_cflags_gtk=$GTK_CFLAGS
+ wx_cv_libs_gtk=$GTK_LIBS
+ fi
+ ]
+ )
- GUI_TK_LIBRARY="$GTK_LIBS"
+ dnl if it wasn't cached, the messages from AM_PATH_GTK() above are
+ dnl enough
+ if test "$gtk_version_cached" = 1; then
+ AC_MSG_RESULT($wx_cv_lib_gtk)
+ fi
- dnl dnl On FreeBSD, the libs are called gtk12 etc, so we must append gthread12
- dnl echo $GTK_LIBS | fgrep -q "glib12"
- dnl if test $? = 0 ; then
- dnl GUI_TK_LIBRARY="$GTK_LIBS -gthread12"
- dnl else
- dnl GUI_TK_LIBRARY="$GTK_LIBS -lgthread"
- dnl fi
+ case "$wx_cv_lib_gtk" in
+ 2.0) WXGTK20=1
+ ;;
+ 1.2.7) WXGTK127=1
+ WXGTK12=1
+ ;;
+ 1.2.3) WXGTK12=1
+ ;;
+ *) AC_MSG_ERROR([
+Please check that gtk-config is in path, the directory
+where GTK+ libraries are installed (returned by
+'gtk-config --libs' command) is in LD_LIBRARY_PATH or
+equivalent variable and GTK+ is version 1.2.3 or above.
+ ])
+ ;;
+ esac
+
+ TOOLKIT_INCLUDE="$wx_cv_cflags_gtk"
+ GUI_TK_LIBRARY="$wx_cv_libs_gtk"
AFMINSTALL=afminstall
TOOLKIT=GTK
fi
dnl misc other files depending on the port
- PORT_FILES="src/\$(TOOLKITDIR)/files.lst"
+ PORT_FILES="\${top_srcdir}/src/\$(TOOLKITDIR)/files.lst"
if test "$wxUSE_UNIVERSAL" = "yes"; then
PORT_FILES="${PORT_FILES} \${top_srcdir}/src/univ/files.lst"
fi
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 whether C++ compiler supports bool built-in type
WX_CPP_BOOL
-dnl check whether we should define _GNU_SOURCE
-WX_GNU_EXTENSIONS
-
dnl ---------------------------------------------------------------------------
dnl Check for functions
dnl ---------------------------------------------------------------------------
fi
fi
+if test "$WXWIN_COMPATIBILITY_2" = "yes"; then
+ AC_DEFINE(WXWIN_COMPATIBILITY_2)
+
+ WXWIN_COMPATIBILITY_2_2="yes"
+fi
+
+if test "$WXWIN_COMPATIBILITY_2_2" = "yes"; then
+ AC_DEFINE(WXWIN_COMPATIBILITY_2_2)
+fi
+
dnl ---------------------------------------------------------------------------
dnl Optional libraries
dnl ---------------------------------------------------------------------------
JPEG_INCLUDE="-I\${top_srcdir}/src/jpeg"
else
JPEG_LINK=
- AC_CHECK_HEADER(jpeglib.h, AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK="-ljpeg"))
+ dnl can't use AC_CHECK_HEADER as jconfig.h defines things like
+ dnl HAVE_STDLIB_H which are already defined and this provokes
+ dnl a compiler warning which configure considers as an error...
+ AC_MSG_CHECKING(for jpeglib.h)
+ AC_CACHE_VAL(ac_cv_header_jpeglib_h,
+ AC_TRY_COMPILE(
+ [
+ #undef HAVE_STDLIB_H
+ #include <stdio.h>
+ #include <jpeglib.h>
+ ],
+ [
+ ],
+ ac_cv_header_jpeglib_h=yes,
+ ac_cv_header_jpeglib_h=no
+ )
+ )
+ AC_MSG_RESULT($ac_cv_header_jpeglib_h)
+
+ if test "$ac_cv_header_jpeglib_h" = "yes"; then
+ AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK="-ljpeg")
+ fi
+
if test "x$JPEG_LINK" = "x" ; then
AC_MSG_ERROR(system jpeg library not found! Use --with-libjpeg=yes to use the built-in one)
fi
if test "$wxUSE_LOG" = "yes"; then
AC_DEFINE(wxUSE_LOG)
+
+ if test "$wxUSE_LOGGUI" = "yes"; then
+ AC_DEFINE(wxUSE_LOGGUI)
+ fi
+
+ if test "$wxUSE_LOGWINDOW" = "yes"; then
+ AC_DEFINE(wxUSE_LOGWINDOW)
+ fi
fi
if test "$wxUSE_LONGLONG" = "yes"; then
if test "$wxUSE_HELP" = "yes"; then
AC_DEFINE(wxUSE_HELP)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS help"
+
+ if test "$wxUSE_WXHTML_HELP" = "yes"; then
+ AC_DEFINE(wxUSE_WXHTML_HELP)
+ fi
fi
if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
fi
if test "$wxUSE_RESOURCES" = "yes" ; then
- if test "$wxUSE_PROLOGIO" = "yes" ; then
- AC_DEFINE(wxUSE_RESOURCES)
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource"
- else
- AC_MSG_WARN([wxWindows ressource system requires PrologIO and can't be compiled without it.])
- fi
+ AC_DEFINE(wxUSE_RESOURCES)
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource"
fi
if test "$wxUSE_X_RESOURCES" = "yes"; then
dnl AC_DEFINE(wxUSE_WXTREE)
dnl fi
+if test "$wxUSE_DRAGIMAGE" = "yes"; then
+ AC_DEFINE(wxUSE_DRAGIMAGE)
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dragimag"
+fi
+
if test "$wxUSE_MENUS" = "yes"; then
AC_DEFINE(wxUSE_MENUS)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS menu"
AC_DEFINE(wxUSE_TEXTDLG)
fi
+if test "$wxUSE_WIZARDDLG" = "yes"; then
+ AC_DEFINE(wxUSE_WIZARDDLG)
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wizard"
+fi
+
dnl ---------------------------------------------------------------------------
dnl get the string with OS info - used by wxGetOsDescription()
dnl ---------------------------------------------------------------------------
dnl TODO some samples are never built so far:
dnl ipc, mfc, nativdlg, oleauto, ownerdrw, proplist
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs dragimag \
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs \
drawing dynamic event font fractal image \
minimal richedit widgets"