DEFAULT_wxUSE_STD_IOSTREAM=$DEFAULT_STD_FLAG
DEFAULT_wxUSE_STD_STRING=$DEFAULT_STD_FLAG
+dnl libraries disabled by default
+DEFAULT_wxUSE_DMALLOC=no
+DEFAULT_wxUSE_LIBGNOMEVFS=no
+DEFAULT_wxUSE_LIBHILDON=no
+DEFAULT_wxUSE_LIBMSPACK=no
+DEFAULT_wxUSE_LIBSDL=no
+DEFAULT_wxUSE_ODBC=no
+DEFAULT_wxUSE_OPENGL=no
+
+dnl features disabled by default
+DEFAULT_wxUSE_ACCESSIBILITY=no
+DEFAULT_wxUSE_DATAVIEWCTRL=no
+DEFAULT_wxUSE_GRAPHICS_CONTEXT=no
+DEFAULT_wxUSE_MEDIACTRL=no
+DEFAULT_wxUSE_TAB_DIALOG=no
+
DEFAULT_wxUSE_UNICODE_UTF8=auto
DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no
-DEFAULT_wxUSE_WCSRTOMBS=no
-DEFAULT_wxUSE_ACCESSIBILITY=no
+dnl Mac/Cocoa users need to enable building universal binaries explicitly
+DEFAULT_wxUSE_UNIVERSAL_BINARY=no
DEFAULT_wxUSE_OFFICIAL_BUILD=no
dnl should be used for the options which are enabled by default
dnl - WX_ARG_FEATURE is a version of WX_ARG_ENABLE which should be used for
dnl optional features, i.e. options which should be disabled if
-dnl --disable-all_features is specified (WX_ARG_WITH/WX_ARG_SYS_WITH are
+dnl --disable-all-features is specified (WX_ARG_WITH/WX_ARG_SYS_WITH are
dnl also affected by this)
dnl ---------------------------------------------------------------------------
VENDOR="custom"
fi
-WX_ARG_DISABLE(all_features,[ --disable-all_features disable all optional features to build minimal library], wxUSE_ALL_FEATURES)
+WX_ARG_DISABLE(all-features,[ --disable-all-features disable all optional features to build minimal library], wxUSE_ALL_FEATURES)
dnl ---------------------------------------------------------------------------
dnl port selection
WX_ARG_SYS_WITH(libtiff, [ --with-libtiff use libtiff (TIFF file format)], wxUSE_LIBTIFF)
WX_ARG_SYS_WITH(libxpm, [ --with-libxpm use libxpm (XPM file format)], wxUSE_LIBXPM)
WX_ARG_WITH(libmspack, [ --with-libmspack use libmspack (CHM help files loading)], wxUSE_LIBMSPACK)
-WX_ARG_WITH(sdl, [ --with-sdl use SDL for audio on Unix], wxUSE_LIBSDL)
+WX_ARG_WITHOUT(gtkprint, [ --without-gtkprint don't use GTK printing support], wxUSE_GTKPRINT)
WX_ARG_WITHOUT(gnomeprint, [ --without-gnomeprint don't use GNOME printing libraries], wxUSE_LIBGNOMEPRINT)
WX_ARG_WITH(gnomevfs, [ --with-gnomevfs use GNOME VFS for associating MIME types], wxUSE_LIBGNOMEVFS)
WX_ARG_WITH(hildon, [ --with-hildon use Hildon framework for Nokia 770], wxUSE_LIBHILDON)
dnl for GUI only
WX_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (http://dmalloc.com/)], wxUSE_DMALLOC)
+WX_ARG_WITH(sdl, [ --with-sdl use SDL for audio on Unix], wxUSE_LIBSDL)
WX_ARG_SYS_WITH(regex, [ --with-regex enable support for wxRegEx class], wxUSE_REGEX)
WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB)
WX_ARG_SYS_WITH(odbc, [ --with-odbc use the IODBC and wxODBC classes], wxUSE_ODBC)
WX_ARG_SYS_WITH(expat, [ --with-expat enable XML support using expat parser], wxUSE_EXPAT)
+AC_MSG_CHECKING([for --with-macosx-sdk])
+AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use an OS X SDK at PATH], [
+ wxUSE_MACOSX_SDK=$withval
+ wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval"
+ echo "wxUSE_MACOSX_SDK=$wxUSE_MACOSX_SDK" >> ${wx_arg_cache_file}.tmp
+ ], [
+ # NOTE: Empty string on purpose so that --without-macosx-sdk (thus no)
+ # will override --enable-universal_binary's automatic SDK usage.
+ wxUSE_MACOSX_SDK=
+ LINE=`grep "^wxUSE_MACOSX_SDK=" ${wx_arg_cache_file}`
+ if test "x$LINE" != x ; then
+ eval "$LINE"
+ echo "$LINE" >> ${wx_arg_cache_file}.tmp
+ fi
+ ])
+AC_MSG_RESULT([$wxUSE_MACOSX_SDK])
+
+AC_MSG_CHECKING([for --with-macosx-version-min])
+AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries which require at least this OS X version], [
+ wxUSE_MACOSX_VERSION_MIN=$withval
+ wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval"
+ echo "wxUSE_MACOSX_VERSION_MIN=$wxUSE_MACOSX_VERSION_MIN" >> ${wx_arg_cache_file}.tmp
+ ], [
+ # default "yes" because when not using an SDK it means the same as no
+ # but when using an SDK it means to use the SDK version
+ wxUSE_MACOSX_VERSION_MIN=yes
+ # See if there is a value in the cache
+ LINE=`grep "^wxUSE_MACOSX_VERSION_MIN=" ${wx_arg_cache_file}`
+ if test "x$LINE" != x ; then
+ eval "$LINE"
+ echo "$LINE" >> ${wx_arg_cache_file}.tmp
+ fi
+ ])
+AC_MSG_RESULT([$wxUSE_MACOSX_VERSION_MIN])
+
dnl ---------------------------------------------------------------------------
dnl global compile options
dnl ---------------------------------------------------------------------------
WX_ARG_DISABLE(shared, [ --disable-shared create static library instead of shared], wxUSE_SHARED)
-WX_ARG_ENABLE(optimise, [ --enable-optimise create optimised code], wxUSE_OPTIMISE)
+WX_ARG_DISABLE(optimise, [ --disable-optimise create optimised code], wxUSE_OPTIMISE)
WX_ARG_ENABLE(debug, [ --enable-debug same as debug_flag and debug_info], wxUSE_DEBUG)
WX_ARG_ENABLE(stl, [ --enable-stl use STL for containers], wxUSE_STL)
WX_ARG_ENABLE(std_iostreams, [ --enable-std_iostreams use standard C++ stream classes], wxUSE_STD_IOSTREAM)
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_DISABLE(vararg_macros,[ --disable-vararg_macros don't use vararg macros, even if they are supported], wxUSE_VARARG_MACROS)
-WX_ARG_ENABLE_PARAM(universal_binary, [[ --enable-universal_binary[=SDK] create Mac PowerPC and Intel Universal binary (not yet working)]], wxUSE_UNIVERSAL_BINARY)
+WX_ARG_ENABLE_PARAM(universal_binary, [[ --enable-universal_binary create Mac PowerPC and Intel Universal binary]], wxUSE_UNIVERSAL_BINARY)
WX_ARG_ENABLE(compat26, [ --enable-compat26 enable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6)
WX_ARG_DISABLE(compat28, [ --disable-compat28 disable wxWidgets 2.8 compatibility], WXWIN_COMPATIBILITY_2_8)
WX_ARG_ENABLE(objc_uniquifying,[ --enable-objc_uniquifying enable Objective-C class name uniquifying], wxUSE_OBJC_UNIQUIFYING)
+WX_ARG_DISABLE(visibility, [ --disable-visibility disable use of ELF symbols visibility even if supported], wxUSE_VISIBILITY)
+
dnl ---------------------------------------------------------------------------
dnl optional non GUI features
dnl ---------------------------------------------------------------------------
WX_ARG_FEATURE(ipc, [ --enable-ipc use interprocess communication (wxSocket etc.)], wxUSE_IPC)
+WX_ARG_FEATURE(baseevtloop, [ --enable-baseevtloop use event loop in console programs too], wxUSE_CONSOLE_EVENTLOOP)
+WX_ARG_FEATURE(epollloop, [ --enable-epollloop use wxEpollDispatcher class (Linux only)], wxUSE_EPOLL_DISPATCHER)
+WX_ARG_FEATURE(selectloop, [ --enable-selectloop use wxSelectDispatcher class], wxUSE_SELECT_DISPATCHER)
+
dnl please keep the settings below in alphabetical order
WX_ARG_FEATURE(apple_ieee, [ --enable-apple_ieee use the Apple IEEE codec], wxUSE_APPLE_IEEE)
WX_ARG_FEATURE(arcstream, [ --enable-arcstream use wxArchive streams], wxUSE_ARCHIVE_STREAMS)
WX_ARG_FEATURE(ffile, [ --enable-ffile use wxFFile class], wxUSE_FFILE)
WX_ARG_FEATURE(file, [ --enable-file use wxFile class], wxUSE_FILE)
WX_ARG_FEATURE(filesystem, [ --enable-filesystem use virtual file systems classes], wxUSE_FILESYSTEM)
+WX_ARG_FEATURE(fontenum, [ --enable-fontenum use wxFontEnumerator class], wxUSE_FONTENUM)
WX_ARG_FEATURE(fontmap, [ --enable-fontmap use font encodings conversion classes], wxUSE_FONTMAP)
WX_ARG_FEATURE(fs_archive, [ --enable-fs_archive use virtual archive filesystems], wxUSE_FS_ARCHIVE)
WX_ARG_FEATURE(fs_inet, [ --enable-fs_inet use virtual HTTP/FTP filesystems], wxUSE_FS_INET)
WX_ARG_FEATURE(threads, [ --enable-threads use threads], wxUSE_THREADS)
+WX_ARG_ENABLE(iniconf, [ --enable-iniconf use wxIniConfig (Win32 only)], wxUSE_INICONF)
+WX_ARG_FEATURE(regkey, [ --enable-regkey use wxRegKey class (Win32 only)], wxUSE_REGKEY)
+
if test "$wxUSE_GUI" = "yes"; then
dnl ---------------------------------------------------------------------------
WX_ARG_FEATURE(logdialog, [ --enable-logdialog use wxLogDialog], wxUSE_LOGDIALOG)
WX_ARG_FEATURE(webkit, [ --enable-webkit use wxWebKitCtrl (Mac)], wxUSE_WEBKIT)
WX_ARG_FEATURE(richtext, [ --enable-richtext use wxRichTextCtrl], wxUSE_RICHTEXT)
-WX_ARG_FEATURE(graphics_ctx, [ --enable-graphics_ctx use graphics context 2D drawing API], wxUSE_GRAPHICS_CONTEXT)
+WX_ARG_FEATURE(graphics_ctx,[ --enable-graphics_ctx use graphics context 2D drawing API], wxUSE_GRAPHICS_CONTEXT)
WX_ARG_FEATURE(postscript, [ --enable-postscript use wxPostscriptDC device context (default for gtk+)], wxUSE_POSTSCRIPT)
+WX_ARG_FEATURE(svg, [ --enable-svg use wxSVGFileDC device context], wxUSE_SVG)
dnl ---------------------------------------------------------------------------
dnl IPC &c
dnl optional GUI controls (in alphabetical order except the first one)
dnl ---------------------------------------------------------------------------
-WX_ARG_FEATURE(controls, [ --enable-controls use all usual controls], wxUSE_CONTROLS)
+dnl don't set DEFAULT_wxUSE_XXX below if the option is not specified
+DEFAULT_wxUSE_CONTROLS=none
+WX_ARG_DISABLE(controls, [ --disable-controls disable compilation of all standard controls], wxUSE_CONTROLS)
dnl even with --enable-controls, some may be disabled by giving
dnl --disable-<control> later on the command line - but by default all will be
DEFAULT_wxUSE_DISPLAY=yes
DEFAULT_wxUSE_DETECT_SM=yes
DEFAULT_wxUSE_DIRPICKERCTRL=yes
+ DEFAULT_wxUSE_FILECTRL=yes
DEFAULT_wxUSE_FILEPICKERCTRL=yes
DEFAULT_wxUSE_FONTPICKERCTRL=yes
DEFAULT_wxUSE_GAUGE=yes
DEFAULT_wxUSE_DISPLAY=no
DEFAULT_wxUSE_DETECT_SM=no
DEFAULT_wxUSE_DIRPICKERCTRL=no
+ DEFAULT_wxUSE_FILECTRL=no
DEFAULT_wxUSE_FILEPICKERCTRL=no
DEFAULT_wxUSE_FONTPICKERCTRL=no
DEFAULT_wxUSE_GAUGE=no
WX_ARG_FEATURE(detect_sm, [ --enable-detect_sm use code to detect X11 session manager], wxUSE_DETECT_SM)
WX_ARG_FEATURE(editablebox, [ --enable-editablebox use wxEditableListBox class], wxUSE_EDITABLELISTBOX)
WX_ARG_FEATURE(filepicker, [ --enable-filepicker use wxFilePickerCtrl class], wxUSE_FILEPICKERCTRL)
+WX_ARG_FEATURE(filectrl, [ --enable-filectrl use wxFileCtrl class], wxUSE_FILECTRL)
WX_ARG_FEATURE(fontpicker, [ --enable-fontpicker use wxFontPickerCtrl class], wxUSE_FONTPICKERCTRL)
WX_ARG_FEATURE(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE)
WX_ARG_FEATURE(grid, [ --enable-grid use wxGrid class], wxUSE_GRID)
WX_ARG_FEATURE(stattext, [ --enable-stattext use wxStaticText class], wxUSE_STATTEXT)
WX_ARG_FEATURE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR)
WX_ARG_FEATURE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TAB_DIALOG)
+WX_ARG_FEATURE(taskbaricon, [ --enable-taskbaricon use wxTaskBarIcon class], wxUSE_TASKBARICON)
WX_ARG_FEATURE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL)
WX_ARG_FEATURE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN)
WX_ARG_FEATURE(toolbar, [ --enable-toolbar use wxToolBar class], wxUSE_TOOLBAR)
WX_ARG_FEATURE(dragimage, [ --enable-dragimage use wxDragImage], wxUSE_DRAGIMAGE)
WX_ARG_FEATURE(accessibility,[ --enable-accessibility enable accessibility support], wxUSE_ACCESSIBILITY)
-if test "$wxUSE_MSW" = "1"; then
- WX_ARG_FEATURE(dccache, [ --enable-dccache cache temporary wxDC objects (Win32 only)], wxUSE_DC_CACHEING)
-fi
-
dnl ---------------------------------------------------------------------------
dnl support for image formats that do not rely on external library
dnl ---------------------------------------------------------------------------
WX_ARG_FEATURE(xpm, [ --enable-xpm use xpm images (XPM file format)], wxUSE_XPM)
WX_ARG_FEATURE(ico_cur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR)
+dnl ---------------------------------------------------------------------------
+dnl wxMSW-only options
+dnl ---------------------------------------------------------------------------
+
+WX_ARG_FEATURE(dccache, [ --enable-dccache cache temporary wxDC objects (Win32 only)], wxUSE_DC_CACHEING)
+WX_ARG_FEATURE(ps-in-msw, [ --enable-ps-in-msw use PS printing in wxMSW (Win32 only)], wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW)
+WX_ARG_FEATURE(ownerdrawn, [ --enable-ownerdrawn use owner drawn controls (Win32 only)], wxUSE_OWNER_DRAWN)
+WX_ARG_FEATURE(uxtheme, [ --enable-uxtheme enable support for Windows XP themed look (Win32 only)], wxUSE_UXTHEME)
+WX_ARG_FEATURE(wxdib, [ --enable-wxdib use wxDIB class (Win32 only)], wxUSE_DIB)
+
fi
dnl for GUI only
AC_MSG_ERROR([C++ compiler is needed to build wxWidgets])
fi
-dnl ranlib command
-dnl defines RANLIB with the appropriate command
-AC_PROG_RANLIB
-
dnl ar command
dnl defines AR with the appropriate command
dnl
fi
fi
-dnl install checks
-dnl defines INSTALL with the appropriate command
-AC_PROG_INSTALL
+retest_macosx_linking=no
-dnl make install path absolute (if not already);
-dnl will fail with (some) MSDOS paths
-case ${INSTALL} in
- /* ) # Absolute
- ;;
- ?:* ) # Drive letter, considered as absolute.
- ;;
- *)
- INSTALL=`pwd`/${INSTALL} ;;
-esac
-
-
-case "${host}" in
-
- dnl The other BSD's should probably go in here too, since this is
- dnl to workaround a strange static lib BSDism.
- dnl Mac OS X install seems to ignore -p option...
- *-*-darwin* )
- INSTALL_PROGRAM="cp -fp"
- INSTALL_DATA="cp -fp"
- ;;
- *)
- ;;
-esac
-
-dnl strip command
-dnl defines STRIP as strip or nothing (true) if not found
-AC_CHECK_TOOL(STRIP, strip, true)
+dnl Support the old --enable-universal_binary in case anyone was using it.
+#if test "$wxUSE_MAC" = 1; then
+ if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
+ dnl --enable-universal_binary uses a default SDK (currently 10.4u)
+ dnl --enable-universal_binary=SDK names a path to an SDK
+ if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
+ # Implicitly turn on the new --with-macosx-sdk using the default
+ # SDK which provides the behavior this option has always had.
+ if test "x$wxUSE_MACOSX_SDK" = "x"; then
+ AC_MSG_WARN([Enabling default SDK due to --enable-universal_binary.])
+ AC_MSG_WARN([If you don't want this, specify --without-macosx-sdk])
+ wxUSE_MACOSX_SDK=yes
+ fi
+ else
+ # Complain to user if he specified an argument to --enable-universal_binary
+ # and also 1) specified --with-macosx-sdk using the default (yes) or
+ # 2) specified --with-macosx-sdk using a path or 3) specified
+ # --without-macosx-sdk (no).
+ if test "x$wxUSE_MACOSX_SDK" != "x" ; then
+ AC_MSG_FAILURE([Please specify the new --with-macosx-sdk=PATH and do not specify an arg to --enable-universal_binary])
+ else
+ # Put the SDK path into the wxUSE_MACOSX_SDK. We don't have to
+ # special-case the empty string because the below test simply
+ # converts "no" to the empty string anyway.
+ wxUSE_MACOSX_SDK="$wxUSE_UNIVERSAL_BINARY"
+ dnl Warn about deprecated usage.
+ AC_MSG_WARN([Please use --with-macosx-sdk=PATH and --enable-universal_binary without an argument])
+ fi
+ fi
+ dnl FIXME: I think it would be better to put this into CC, CXX, and LD rather than the flags.
+ OSX_UNIV_OPTS="-arch ppc -arch i386"
+ CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
+ CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
+ LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS"
+ dnl NOTE: Only the compiler driver needs arch flags. The link editor
+ dnl is incapable of using them but the compiler driver (which we use
+ dnl as LD when building dynamic libraries) uses them to invoke the
+ dnl real ld multiple times. If we moved to libtool -dynamic we would
+ dnl need no arch flags because libtool automatically invokes ld for
+ dnl every architecture found in the fat input files.
+ dnl
+ dnl For static library builds, AR/RANLIB automatically create proper
+ dnl fat archives although AR is unable to update them once RANLIB has
+ dnl made them into proper fat archives. Fortunately, our link process
+ dnl simply removes the .a file before using ar to create a new one.
+ dnl If we did move to libtool -static we still wouldn't need arch flags
+ dnl because libtool automatically figures it out based on input.
+ retest_macosx_linking=yes
+
+ dnl HACK: PCH could be made to work by precompiling for each architecture into separate directories
+ dnl and including all architecture directories with each compiler invocation.
+ dnl That would require a major rework of Bakefile and at the same time it would be nice to have
+ dnl Objective-C++ precompiled headers.
+ AC_MSG_WARN([Disabling precompiled headers due to universal binary build.])
+ bk_use_pch=no
+ fi
+#fi
-dnl Win32 tools
-if test "$wxUSE_WINE" = "yes"; then
- AC_CHECK_TOOL(WINDRES, wrc)
- RESCOMP="$WINDRES"
-else
- case "${host}" in
- *-*-cygwin* | *-*-mingw32* )
- dnl Bakefile CVS (as of 2005-11-24) now detects windres properly
- dnl ... maybe it does, but it does not make it available here
- dnl anymore, so do it ourselves still.
- AC_CHECK_TOOL(WINDRES, windres)
- RESCOMP="$WINDRES"
- AC_CHECK_TOOL(DLLTOOL, dlltool)
- ;;
- esac
+dnl Set up the Mac OS X SDK. We do this early so configure tests will occur
+dnl with the SDK in place.
+dnl NOTE: We clobber wxUSE_MACOSX_SDK with the SDK path
+if test "x$wxUSE_MACOSX_SDK" = "xno"; then
+ wxUSE_MACOSX_SDK=
+elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then
+ # TODO: Search for most recent SDK and use it.
+ wxUSE_MACOSX_SDK="/Developer/SDKs/MacOSX10.4u.sdk"
fi
-dnl does make support "-include" (only GNU make does AFAIK)?
-AC_CACHE_CHECK([if make is GNU make], wx_cv_prog_makeisgnu,
+
+if test "x$wxUSE_MACOSX_SDK" != "x"; then
+ AC_MSG_CHECKING([for SDK directory $wxUSE_MACOSX_SDK])
+ if ! test -d "$wxUSE_MACOSX_SDK"; then
+ AC_MSG_FAILURE([not found])
+ else
+ AC_MSG_RESULT([exists])
+ fi
+ MACOSX_SDK_OPTS="-isysroot $wxUSE_MACOSX_SDK"
+ eval "CC=\"$CC $MACOSX_SDK_OPTS\""
+ eval "CXX=\"$CXX $MACOSX_SDK_OPTS\""
+ eval "LD=\"$LD $MACOSX_SDK_OPTS\""
+ retest_macosx_linking=yes
+ dnl NOTE: When libtool is used in lieu of AR/RANLIB (i.e. in static mode)
+ dnl the syslibroot makes no difference. We aren't using libtool now but
+ dnl if we ever did, be aware that you don't need to worry about it.
+fi
+
+dnl Set up the deployment target
+dnl No : Don't specify a min version even if using an SDK
+dnl Yes : Use the version from the SDK if used, otherwise same as no
+dnl Param: Use the specified version
+if test "x$wxUSE_MACOSX_VERSION_MIN" = "xno"; then
+ wxUSE_MACOSX_VERSION_MIN=
+elif test "x$wxUSE_MACOSX_VERSION_MIN" = "xyes"; then
+ if test "x$wxUSE_MACOSX_SDK" != "x"; then
+ AC_MSG_CHECKING([SDK deployment version])
+dnl We need to quote the next line where we don't need macros and do need [] in the regex
+[
+ MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" buildSettings | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
+]
+ # If that failed, try again with the new key
+ if test "x$MACOSX_SDK_PLIST_VERSION_MIN" == "x"; then
[
- if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null |
- $EGREP -s GNU > /dev/null); then
- wx_cv_prog_makeisgnu="yes"
+ MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" DefaultProperties | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
+]
+ fi
+
+ if test "x$MACOSX_SDK_PLIST_VERSION_MIN" != "x"; then
+ wxUSE_MACOSX_VERSION_MIN=$MACOSX_SDK_PLIST_VERSION_MIN
+ AC_MSG_RESULT([$wxUSE_MACOSX_VERSION_MIN])
+ else
+ AC_MSG_WARN([Could not determine deployment target from SDKSettings.plist])
+ wxUSE_MACOSX_VERSION_MIN=
+ fi
else
- wx_cv_prog_makeisgnu="no"
+ wxUSE_MACOSX_VERSION_MIN=
fi
-])
-
-if test "x$wx_cv_prog_makeisgnu" = "xyes"; then
- IF_GNU_MAKE=""
-else
- IF_GNU_MAKE="#"
fi
-AC_SUBST(IF_GNU_MAKE)
+if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then
+ MACOSX_VERSION_MIN_OPTS="-mmacosx-version-min=$wxUSE_MACOSX_VERSION_MIN"
+ eval "CC=\"$CC $MACOSX_VERSION_MIN_OPTS\""
+ eval "CXX=\"$CXX $MACOSX_VERSION_MIN_OPTS\""
+ eval "LD=\"$LD $MACOSX_VERSION_MIN_OPTS\""
+ retest_macosx_linking=yes
+fi
-dnl we don't need to check for VPATH support in GNU make - it does have it
-if test "x$wx_cv_prog_makeisgnu" != "xyes"; then
-dnl check if VPATH works
-AC_CACHE_CHECK([if make supports VPATH], wx_cv_prog_makevpath, [
-dnl create Makefile
-cat - << EOF > confMake
-check : file
- cp \$? \$@
- cp \$? final_file
-EOF
+dnl If either an SDK or a version option was added, make sure that we can
+dnl still compile and link both C and C++. If we didn't do this, then most
+dnl of the remaining tests would fail.
+if test "x$retest_macosx_linking" = "xyes"; then
+ AC_LANG_PUSH(C)
+ AC_MSG_CHECKING([if C compiler works with SDK/version options])
+ AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([no. Try a different SDK]); exit 1])
+ AC_LANG_POP()
-if test ! -d sub ; then
- mkdir sub
-fi
-echo dummy > sub/file
-${MAKE-make} -f confMake VPATH=sub 2>&5 > /dev/null
-RESULT=$?
-rm -f sub/file check final_file confMake
-rmdir sub
-if test "$RESULT" = 0; then
- wx_cv_prog_makevpath="yes"
-else
- wx_cv_prog_makevpath="no"
+ AC_LANG_PUSH(C++)
+ AC_MSG_CHECKING([if C++ compiler works with SDK/version options])
+ AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([no. Try a different SDK]); exit 1])
+ AC_LANG_POP()
fi
-])
-if test "x$wx_cv_prog_makevpath" != "xyes"; then
-AC_MSG_ERROR([
-You need a make-utility that is able to use the variable
-VPATH correctly.
-If your version of make does not support VPATH correctly,
-please install GNU-make (possibly as gmake), and start
-configure with the following command:
-export MAKE=gmake; ./configure for sh-type shells
-setenv MAKE gmake; ./configure for csh-type shells
-Also please do remember to use gmake in this case every time
-you are trying to compile.
-])
-fi dnl make without VPATH
-fi dnl not GNU make
-dnl needed for making link to setup.h
-AC_PROG_LN_S
+case "${host}" in
+ dnl The other BSD's should probably go in here too, since this is
+ dnl to workaround a strange static lib BSDism.
+ dnl Mac OS X install seems to ignore -p option...
+ *-*-darwin* )
+ INSTALL_PROGRAM="cp -fp"
+ INSTALL_DATA="cp -fp"
+ ;;
+ *)
+ ;;
+esac
dnl ------------------------------------------------------------------------
dnl Platform specific tests
dnl Note: non-empty last parameter makes check compile-only,
dnl skipping worthless preprocessing check
-AC_CHECK_HEADERS(stdlib.h fnmatch.h langinfo.h malloc.h unistd.h wchar.h,,, [AC_INCLUDES_DEFAULT()])
+AC_CHECK_HEADERS(langinfo.h wchar.h,,, [AC_INCLUDES_DEFAULT])
dnl maybe wchar_t is in wcstr.h if we don't have wchar.h?
if test "$ac_cv_header_wchar_h" != "yes"; then
- AC_CHECK_HEADER(wcstr.h,,, [AC_INCLUDES_DEFAULT()])
+ AC_CHECK_HEADERS([wcstr.h],,, [AC_INCLUDES_DEFAULT()])
fi
case "${host}" in
dnl POSIX needs this for select(), but old systems don't have it
if test "$USE_UNIX" = 1 ; then
- AC_CHECK_HEADER([sys/select.h],,, [AC_INCLUDES_DEFAULT()])
+ AC_CHECK_HEADERS([sys/select.h],,, [AC_INCLUDES_DEFAULT()])
fi
-dnl defines HAVE_SYS_EPOLL_H - for epoll mainloop implementation in wxbase
-AC_CHECK_HEADERS(sys/epoll.h)
-
dnl ---------------------------------------------------------------------------
dnl Checks for compiler characteristics
dnl ---------------------------------------------------------------------------
fi
fi
+dnl check for atomic operations builtins for wx/atomic.h:
+WX_ATOMIC_BUILTINS
+
dnl pop C++
AC_LANG_POP()
fi
fi
fi
-
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png"
fi
dnl ------------------------------------------------------------------------
dnl are we building for a win32 target environment?
dnl If so, setup common stuff needed for both GUI and Base libs.
if test "$USE_WIN32" = 1 ; then
- AC_CHECK_HEADER(w32api.h,,, [ ])
+ AC_CHECK_HEADERS(w32api.h,,, [ ])
AC_CHECK_HEADER(windows.h,,
[
AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
WIN32INSTALL=win32install
dnl pbt.h is missing on Wine at least
- AC_CHECK_HEADER(pbt.h,, [AC_DEFINE(NEED_PBT_H)], [ ])
+ AC_CHECK_HEADER([pbt.h],, [AC_DEFINE(NEED_PBT_H)], [ ])
fi
if test "$wxUSE_GUI" = "yes"; then
fi
if test "$wxUSE_MOTIF" = 1; then
- if test "$wxUSE_UNICODE" = "yes"; then
- AC_MSG_ERROR([Unicode configuration not supported with Motif])
- fi
-
AC_MSG_CHECKING(for Motif/Lesstif headers)
WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, Xm/Xm.h)
if test "$ac_find_includes" != "" ; then
dnl If UTF-8 support wasn't explicitly enabled or disabled, enable it only
dnl for ports where it makes sense by default (GTK+, DirectFB):
if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_UTF8" = "auto" ; then
- if test "$TOOLKIT" = "DFB" ; then
- wxUSE_UNICODE_UTF8=yes
- elif test "$TOOLKIT" = "GTK" -a "$WXGTK20" = "1" ; then
+ if test "$USE_UNIX" = "1" -a "$wxUSE_DARWIN" != "1" ; then
wxUSE_UNICODE_UTF8=yes
elif test "$USE_OS2" = "1" ; then
dnl wide char support is quite incomplete in libc;
if test "$wxUSE_GUI" = "yes"; then
if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_PM" != 1; then
dnl defines HAVE_X11_XKBLIB_H
- AC_CHECK_HEADER(X11/Xlib.h,,, [ ])
- AC_CHECK_HEADER([X11/XKBlib.h],,,
+ AC_CHECK_HEADERS([X11/Xlib.h],,, [ ])
+ AC_CHECK_HEADERS([X11/XKBlib.h],,,
[
#if HAVE_X11_XLIB_H
#include <X11/Xlib.h>
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xxf86vm)
if test "$ac_find_libraries" != "" ; then
AC_MSG_RESULT([yes])
- AC_CHECK_HEADER([X11/extensions/xf86vmode.h],
+ AC_CHECK_HEADERS([X11/extensions/xf86vmode.h],
[
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXxf86vm"
],
AC_MSG_RESULT([no])
fi
fi
- ])
+ ],, [ ])
],
[],
[ ])
dnl test for GCC's visibility support (sets CFLAGS_VISIBILITY, which is
dnl assigned to CFLAGS and CXXFLAGS below)
- WX_VISIBILITY
+ if test "$wxUSE_VISIBILITY" != "no"; then
+ WX_VISIBILITY
+ fi
dnl test for Sun CC which can be used under both Solaris and Linux
if test "x$SUNCXX" = xyes; then
AC_LANG_RESTORE
fi
-if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then
- dnl base name of the resource file for wxMac must be the same
- dnl as library installation base name (-install_name)
- WX_RESOURCES_MACOSX_ASCII="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.r"
- WX_RESOURCES_MACOSX_DATA="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.rsrc"
-
- dnl add the resources target for wxMac
- LIBWXMACRES="\$(wx_top_builddir)/lib/${WX_RESOURCES_MACOSX_ASCII}"
-
- AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez)
- AC_CHECK_PROG(DEREZ, DeRez, DeRez, /Developer/Tools/DeRez)
- AC_CHECK_PROG(SETFILE, SetFile, SetFile, /Developer/Tools/SetFile)
-
- MACSETFILE="\$(SETFILE)"
-
- dnl resources are bundled both with shared library and applications
- dnl since the carb resource *must* be included in the application
- if test "$wxUSE_MAC" = 1; then
- POSTLINK_COMMAND="\$(REZ) -d __DARWIN__ -t APPL Carbon.r -o"
- RESCOMP="$REZ"
- WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL Carbon.r -o"
- else
- POSTLINK_COMMAND="echo -n | \$(REZ) -d __DARWIN__ -t APPL ${LIBWXMACRES}"
- RESCOMP="echo -n \| $REZ"
- WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL \$libdir/$WX_RESOURCES_MACOSX_ASCII"
- fi
-
-else
- dnl default value is to (silently) do nothing in the makefile
- MACSETFILE="@true"
-
- if test "$wxUSE_PM" = 1; then
- RESCOMP="emxbind"
- WXCONFIG_RESFLAGS="-ep"
-
- dnl Is this one really used anywhere for pm?
- POSTLINK_COMMAND="$RESCOMP $WXCONFIG_RESFLAGS"
- else
- POSTLINK_COMMAND="@true"
- fi
-
-fi
-
-
dnl ---------------------------------------------------------------------------
dnl Checks for typedefs
dnl ---------------------------------------------------------------------------
if test "$wx_cv_func_snprintf_decl" = "yes"; then
AC_DEFINE(HAVE_SNPRINTF_DECL)
-
- dnl we know there is an snprintf declaration, but some old headers
- dnl may have one taking a "char *" format instead of "const char *"
- AC_CACHE_CHECK([if snprintf declaration is broken], wx_cv_func_broken_snprintf_decl,
- [
- AC_TRY_COMPILE(
- [
- #include <stdio.h>
- #include <stdarg.h>
- #ifdef __MSL__
- #if __MSL__ >= 0x6000
- namespace std {}
- using namespace std;
- #endif
- #endif
- ],
- [
- char *buf;
- const char *fmt = "%s";
- snprintf(buf, 10u, fmt, "wx");
- ],
- wx_cv_func_broken_snprintf_decl=no,
- wx_cv_func_broken_snprintf_decl=yes
- )
- ]
- )
-
- if test "$wx_cv_func_broken_snprintf_decl" = "yes"; then
- AC_DEFINE(HAVE_BROKEN_SNPRINTF_DECL)
- fi
fi
if test "$wxUSE_PRINTF_POS_PARAMS" = "yes"; then
if test "$wxUSE_UNICODE" = yes; then
- dnl our wxVsnprintf() implementation needs to use the system swprintf() in Unicode
- dnl builds so let's check if swprintf() is declared as C99 imposes:
- dnl int swprintf(wchar_t *s, size_t n, const wchar_t *format, ...);
- dnl or rather as:
- dnl int swprintf(wchar_t *s, const wchar_t *format, ...);
- AC_CHECK_FUNCS(swprintf)
-
- if test "$ac_cv_func_swprintf" = "yes"; then
- AC_CACHE_CHECK([if swprintf declaration is broken], wx_cv_func_broken_swprintf_decl,
- [
- AC_TRY_COMPILE(
- [
- #include <stdio.h>
- #include <stdarg.h>
- #include <wchar.h>
- ],
- [
- wchar_t *buf;
- const wchar_t *fmt = L"test";
- swprintf(buf, 10u, fmt);
- ],
- wx_cv_func_broken_swprintf_decl=no,
- wx_cv_func_broken_swprintf_decl=yes
- )
- ]
- )
-
- if test "$wx_cv_func_broken_swprintf_decl" = "yes"; then
- AC_DEFINE(HAVE_BROKEN_SWPRINTF_DECL)
- fi
- fi
-
dnl also look if we have wide char IO functions, notice that [f]putws are
dnl declared in special widec.h under Solaris
wchar_headers="#include <stdio.h>
#include <wchar.h>"
case "${host}" in
*-*-solaris2* )
- AC_CHECK_HEADER(widec.h,,, [AC_INCLUDES_DEFAULT()])
+ AC_CHECK_HEADERS(widec.h,,, [AC_INCLUDES_DEFAULT()])
if test "$ac_cv_header_widec_h" = "yes"; then
wchar_headers="$wchar_headers
#include <widec.h>"
fi
esac
- WX_CHECK_FUNCS(wputc wputchar putws fputws wprintf vswprintf,,,
+ WX_CHECK_FUNCS(putws fputws wprintf vswprintf,,,
[$wchar_headers])
dnl MinGW has a vswprintf with a different prototype, and
[AC_MSG_RESULT([no])]);
fi
-if test "x$ac_cv_header_fnmatch_h" = "xyes"; then
- WX_CHECK_FUNCS(fnmatch,,,[#include <fnmatch.h>])
-fi
-
if test "$wxUSE_FILE" = "yes"; then
WX_CHECK_FUNCS(fsync)
fi
fi
fi
-dnl check for timegm() used by datetime.cpp
-AC_CHECK_FUNCS(timegm)
-
dnl look for a function to modify the environment
-AC_CHECK_FUNCS(putenv setenv, break)
+AC_CHECK_FUNCS(setenv putenv, break)
+if test "$ac_cv_func_setenv" = "yes"; then
+ AC_CHECK_FUNCS(unsetenv)
+fi
HAVE_SOME_SLEEP_FUNC=0
if test "$USE_BEOS" = 1; then
AC_DEFINE(wxHAVE_PTHREAD_CLEANUP)
fi
- AC_CHECK_HEADER(sched.h,,, [AC_INCLUDES_DEFAULT()])
+ AC_CHECK_HEADERS(sched.h,,, [AC_INCLUDES_DEFAULT()])
if test "$ac_cv_header_sched_h" = "yes"; then
AC_CHECK_FUNC(sched_yield,
AC_DEFINE(HAVE_SCHED_YIELD),
AC_CHECK_FUNC(localtime_r, [ AC_DEFINE(HAVE_LOCALTIME_R) ])
AC_CHECK_FUNC(gmtime_r, [ AC_DEFINE(HAVE_GMTIME_R) ])
-AC_CHECK_FUNC(readdir_r, [ AC_DEFINE(HAVE_READDIR_R) ])
dnl By preference, we probably should use getaddrinfo which avoids thread
dnl safety issues and supports IPv6, however there currently is no code
dnl for it, so testing for it is temporarily disabled and we are restricted
PKG_PROG_PKG_CONFIG()
if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
+
+ if test "$wxUSE_GTKPRINT" = "yes" ; then
+
+ PKG_CHECK_MODULES(GTKPRINT,
+ [gtk+-unix-print-2.0 >= 2.10],
+ [
+ CFLAGS="$GTKPRINT_CFLAGS $CFLAGS"
+ CXXFLAGS="$GTKPRINT_CFLAGS $CXXFLAGS"
+ AC_DEFINE(wxUSE_GTKPRINT)
+ ],
+ [
+ AC_MSG_WARN([GTK printing support not found (GTK+ >= 2.10), library will use GNOME printing support or standard PostScript printing])
+ wxUSE_GTKPRINT="no"
+ ]
+ )
+ fi
+
if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then
PKG_CHECK_MODULES(LIBGNOMEPRINTUI,
AC_DEFINE(wxUSE_OBJC_UNIQUIFYING)
fi
+dnl ---------------------------------------------------------------------------
+dnl console event loop stuff
+dnl ---------------------------------------------------------------------------
+
+if test "$wxUSE_CONSOLE_EVENTLOOP" = "yes"; then
+ AC_DEFINE(wxUSE_CONSOLE_EVENTLOOP)
+
+ if test "$wxUSE_UNIX" = "yes"; then
+ if test "$wxUSE_SELECT_DISPATCHER" = "yes"; then
+ AC_DEFINE(wxUSE_SELECT_DISPATCHER)
+ fi
+
+ if test "$wxUSE_EPOLL_DISPATCHER" = "yes"; then
+ AC_CHECK_HEADERS(sys/epoll.h,,, [AC_INCLUDES_DEFAULT()])
+ if test "$ac_cv_header_sys_epoll_h" = "yes"; then
+ AC_DEFINE(wxUSE_EPOLL_DISPATCHER)
+ else
+ AC_MSG_WARN([sys/epoll.h not available, wxEpollDispatcher disabled])
+ fi
+ fi
+ fi
+fi
+
dnl ---------------------------------------------------------------------------
dnl time/date functions
dnl ---------------------------------------------------------------------------
+dnl check for gettimeofday (SVr4, BSD 4.3) and ftime (V7, BSD 4.3) for the
+dnl function to be used for high resolution timers
+AC_CHECK_FUNCS(gettimeofday ftime, break)
+
+if test "$ac_cv_func_gettimeofday" = "yes"; then
+ AC_CACHE_CHECK([whether gettimeofday takes two arguments],
+ wx_cv_func_gettimeofday_has_2_args,
+ [
+ dnl on some _really_ old systems it takes only 1 argument
+ AC_TRY_COMPILE(
+ [
+ #include <sys/time.h>
+ #include <unistd.h>
+ ],
+ [
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ ],
+ wx_cv_func_gettimeofday_has_2_args=yes,
+ AC_TRY_COMPILE(
+ [
+ #include <sys/time.h>
+ #include <unistd.h>
+ ],
+ [
+ struct timeval tv;
+ gettimeofday(&tv);
+ ],
+ wx_cv_func_gettimeofday_has_2_args=no,
+ [
+ AC_MSG_WARN([failed to determine number of gettimeofday() arguments])
+ wx_cv_func_gettimeofday_has_2_args=unknown
+ ]
+ )
+ )
+ ])
+
+ if test "$wx_cv_func_gettimeofday_has_2_args" != "yes"; then
+ AC_DEFINE(WX_GETTIMEOFDAY_NO_TZ)
+ fi
+fi
+
if test "$wxUSE_DATETIME" = "yes"; then
dnl check for strptime and for its declaration as some systems lack it
AC_CHECK_FUNC(strptime)
AC_DEFINE(WX_GMTOFF_IN_TM)
fi
- dnl check for gettimeofday (SVr4, BSD 4.3) and ftime (V7, BSD 4.3) for the
- dnl function to be used for high resolution timers
- AC_CHECK_FUNCS(gettimeofday ftime, break)
-
- if test "$ac_cv_func_gettimeofday" = "yes"; then
- AC_CACHE_CHECK([whether gettimeofday takes two arguments],
- wx_cv_func_gettimeofday_has_2_args,
- [
- dnl on some _really_ old systems it takes only 1 argument
- AC_TRY_COMPILE(
- [
- #include <sys/time.h>
- #include <unistd.h>
- ],
- [
- struct timeval tv;
- gettimeofday(&tv, NULL);
- ],
- wx_cv_func_gettimeofday_has_2_args=yes,
- AC_TRY_COMPILE(
- [
- #include <sys/time.h>
- #include <unistd.h>
- ],
- [
- struct timeval tv;
- gettimeofday(&tv);
- ],
- wx_cv_func_gettimeofday_has_2_args=no,
- [
- AC_MSG_WARN([failed to determine number of gettimeofday() arguments])
- wx_cv_func_gettimeofday_has_2_args=unknown
- ]
- )
- )
- ])
-
- if test "$wx_cv_func_gettimeofday_has_2_args" != "yes"; then
- AC_DEFINE(WX_GETTIMEOFDAY_NO_TZ)
- fi
- fi
-
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest"
fi
dnl can't be compiled because of an error and with the default
dnl AC_CHECK_HEADER semantics we'd still detect it in this case and
dnl build would fail later
- AC_CHECK_HEADER(linux/joystick.h, [wxUSE_JOYSTICK=yes],, [AC_INCLUDES_DEFAULT()])
+ AC_CHECK_HEADERS([linux/joystick.h], [wxUSE_JOYSTICK=yes],, [AC_INCLUDES_DEFAULT()])
fi
fi
dnl String stuff
dnl ---------------------------------------------------------------------------
+if test "$wxUSE_FONTENUM" = "yes" ; then
+ AC_DEFINE(wxUSE_FONTENUM)
+fi
+
if test "$wxUSE_FONTMAP" = "yes" ; then
AC_DEFINE(wxUSE_FONTMAP)
fi
fi
fi
-if test "$wxUSE_wxUSE_EXPERIMENTAL_PRINTF" = "yes"; then
- AC_DEFINE(wxUSE_EXPERIMENTAL_PRINTF)
-fi
-
-dnl ----------------------------------------------------------------
-dnl Register PostScript options for makefiles and setup.h
-dnl ----------------------------------------------------------------
-
-if test "$wxUSE_POSTSCRIPT" = "yes" ; then
- AC_DEFINE(wxUSE_POSTSCRIPT)
-fi
-
-AC_DEFINE(wxUSE_AFM_FOR_POSTSCRIPT)
-
-AC_DEFINE(wxUSE_NORMALIZED_PS_FONTS)
-
dnl ---------------------------------------------------------------------------
dnl big GUI components: MDI, doc/view, printing, help, ...
dnl ---------------------------------------------------------------------------
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS printing"
fi
+if test "$wxUSE_POSTSCRIPT" = "yes" ; then
+ AC_DEFINE(wxUSE_POSTSCRIPT)
+fi
+
+AC_DEFINE(wxUSE_AFM_FOR_POSTSCRIPT)
+
+if test "$wxUSE_SVG" = "yes"; then
+ AC_DEFINE(wxUSE_SVG)
+fi
dnl ---------------------------------------------------------------------------
dnl wxMetafile availability
if test "$wxUSE_CHECKLST" = "yes"; then
AC_DEFINE(wxUSE_CHECKLISTBOX)
USES_CONTROLS=1
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS checklst"
fi
if test "$wxUSE_COLOURPICKERCTRL" = "yes"; then
USES_CONTROLS=1
fi
+if test "$wxUSE_FILECTRL" = "yes"; then
+ AC_DEFINE(wxUSE_FILECTRL)
+ USES_CONTROLS=1
+fi
+
if test "$wxUSE_FILEPICKERCTRL" = "yes"; then
AC_DEFINE(wxUSE_FILEPICKERCTRL)
USES_CONTROLS=1
wxUSE_DISPLAY=no
else
AC_DEFINE(wxUSE_DISPLAY)
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS display multimon"
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS display"
fi
fi
if test "$wxUSE_LISTBOX" = "yes"; then
AC_DEFINE(wxUSE_LISTBOX)
USES_CONTROLS=1
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listbox"
fi
if test "$wxUSE_LISTCTRL" = "yes"; then
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS combo"
fi
-dnl if test "$wxUSE_PROPSHEET" = "yes"; then
-dnl AC_DEFINE(wxUSE_PROPSHEET)
-dnl USES_CONTROLS=1
-dnl SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS proplist"
-dnl fi
-
if test "$wxUSE_RADIOBOX" = "yes"; then
AC_DEFINE(wxUSE_RADIOBOX)
USES_CONTROLS=1
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS access"
fi
-if test "$wxUSE_DC_CACHEING" = "yes"; then
- AC_DEFINE(wxUSE_DC_CACHEING)
-fi
-
if test "$wxUSE_DRAGIMAGE" = "yes"; then
AC_DEFINE(wxUSE_DRAGIMAGE)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dragimag"
if test "$wxUSE_MINIFRAME" = "yes"; then
AC_DEFINE(wxUSE_MINIFRAME)
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS minifram"
fi
if test "$wxUSE_SYSTEM_OPTIONS" = "yes"; then
AC_DEFINE(wxUSE_SYSTEM_OPTIONS)
- if test "$TOOLKIT" = "MSW" -o "$TOOLKIT" = "GTK" -o "$TOOLKIT" = "X11" -o \
- "$TOOLKIT" = "MOTIF" -o "$TOOLKIT" = "COCOA"; then
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS taskbar"
- fi
+fi
+
+if test "$wxUSE_TASKBARICON" = "yes"; then
+ AC_DEFINE(wxUSE_TASKBARICON)
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS taskbar"
fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wizard"
fi
+dnl ---------------------------------------------------------------------------
+dnl wxMSW-only options
+dnl ---------------------------------------------------------------------------
+
+if test "$wxUSE_MSW" = 1 ; then
+
+ if test "$wxUSE_DC_CACHEING" = "yes"; then
+ AC_DEFINE(wxUSE_DC_CACHEING)
+ fi
+
+ if test "$wxUSE_DIB" = "yes"; then
+ AC_DEFINE(wxUSE_WXDIB)
+ fi
+
+ if test "$wxUSE_OWNER_DRAWN" = "yes"; then
+ AC_DEFINE(wxUSE_OWNER_DRAWN)
+ fi
+
+ if test "$wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW" = "yes"; then
+ AC_DEFINE(wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW)
+ fi
+
+ if test "$wxUSE_UXTHEME" = "yes"; then
+ AC_DEFINE(wxUSE_UXTHEME)
+ fi
+
+fi
+dnl wxUSE_MSW = 1
+
+
+if test "$USE_WIN32" = 1 ; then
+ if test "$wxUSE_INICONF" = "yes"; then
+ AC_DEFINE(wxUSE_INICONF)
+ fi
+
+ if test "$wxUSE_REGKEY" = "yes"; then
+ AC_DEFINE(wxUSE_REGKEY)
+ fi
+fi
+dnl USE_WIN32 = 1
+
dnl ---------------------------------------------------------------------------
dnl wxGraphicsContext
dnl ---------------------------------------------------------------------------
dnl TODO some samples are never built so far: mfc (requires VC++)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs drawing \
- dynamic erase event exec font image minimal mobile \
- mobile/wxedit mobile/styles propsize render \
- rotate shaped svg taborder vscroll widgets"
+ erase event exec font image minimal mobile \
+ mobile/wxedit mobile/styles render \
+ shaped svg taborder vscroll widgets"
if test "$wxUSE_MONOLITHIC" != "yes"; then
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS console"
AC_SUBST(EXTRALIBS_OPENGL)
AC_SUBST(EXTRALIBS_SDL)
AC_SUBST(WITH_PLUGIN_SDL)
+AC_SUBST(EXTRALIBS_GTKPRINT)
AC_SUBST(EXTRALIBS_GNOMEPRINT)
AC_SUBST(EXTRALIBS_GNOMEVFS)
AC_SUBST(EXTRALIBS_HILDON)
TOOLKIT_DESC="GTK+"
if test "$WXGTK20" = 1; then
TOOLKIT_DESC="$TOOLKIT_DESC 2"
+ if test "$wxUSE_GTKPRINT" = "yes" ; then
+ TOOLKIT_EXTRA="$TOOLKIT_EXTRA GTK+ printing";
+ fi
if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then
TOOLKIT_EXTRA="$TOOLKIT_EXTRA gnomeprint";
fi
BAKEFILE_FORCE_PLATFORM=win32
fi
-dnl ---------------------------------------------------------------------------
-dnl Add Universal binary support
-dnl Note we don't do this earlier because adding these cpp/ld flags could
-dnl cause configure tests to fail.
-dnl ---------------------------------------------------------------------------
-if test "$wxUSE_MAC" = 1 ; then
- if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
- dnl --enable-universal_binary uses a default SDK (currently 10.4u)
- dnl --enable-universal_binary=SDK names a path to an SDK
- if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
- OSX_UNIV_OPTS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
- else
- dnl '' would mean universal with no SDK, which may be the case if
- dnl the compiler uses a sysroot by default
- OSX_UNIV_OPTS=${wxUSE_UNIVERSAL_BINARY:+"-isysroot '$wxUSE_UNIVERSAL_BINARY'"}
- fi
- OSX_UNIV_OPTS="$OSX_UNIV_OPTS -arch ppc -arch i386"
- CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
- CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
- LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS"
- bk_use_pch=no
- fi
- # TODO: where do we add "-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" for libtool (static builds only)?
- # The makefile currently uses AR and RANLIB, which libtool apparently supercedes.
-fi
-
dnl gcc 3.4 has a pch bug which truncates wide character constants in headers.
dnl Hopefully for a non-unicode build there aren't any wide constants in
dnl headers, but for a unicode build it's best to disable pch.
AC_BAKEFILE([m4_include(autoconf_inc.m4)])
+dnl make install path absolute (if not already);
+dnl will fail with (some) MSDOS paths
+case ${INSTALL} in
+ /* ) # Absolute
+ ;;
+ ?:* ) # Drive letter, considered as absolute.
+ ;;
+ *)
+ INSTALL=`pwd`/${INSTALL} ;;
+esac
+
+if test "$wxUSE_GUI" = "yes"; then
+
+if test "$wxUSE_MSW" = 1 ; then
+ if test "x$WINDRES" = "x"; then
+ AC_MSG_ERROR([Required windres program not found])
+ fi
+
+ RESCOMP="$WINDRES"
+fi
+
+if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then
+ dnl base name of the resource file for wxMac must be the same
+ dnl as library installation base name (-install_name)
+ WX_RESOURCES_MACOSX_ASCII="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.r"
+ WX_RESOURCES_MACOSX_DATA="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.rsrc"
+
+ dnl add the resources target for wxMac
+ LIBWXMACRES="\$(wx_top_builddir)/lib/${WX_RESOURCES_MACOSX_ASCII}"
+
+ AC_CHECK_PROG(DEREZ, DeRez, DeRez, /Developer/Tools/DeRez)
+
+ MACSETFILE="\$(SETFILE)"
+
+ dnl resources are bundled both with shared library and applications
+ dnl since the carb resource *must* be included in the application
+ if test "$wxUSE_MAC" = 1; then
+ POSTLINK_COMMAND="\$(REZ) -d __DARWIN__ -t APPL Carbon.r -o"
+ RESCOMP="$REZ"
+ WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL Carbon.r -o"
+ else
+ POSTLINK_COMMAND="cat /dev/null | \$(REZ) -d __DARWIN__ -t APPL ${LIBWXMACRES}"
+ RESCOMP="cat /dev/null \| $REZ"
+ WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL \$libdir/$WX_RESOURCES_MACOSX_ASCII"
+ fi
+
+else
+ dnl default value is to (silently) do nothing in the makefile
+ MACSETFILE="@true"
+
+ if test "$wxUSE_PM" = 1; then
+ RESCOMP="emxbind"
+ WXCONFIG_RESFLAGS="-ep"
+
+ dnl Is this one really used anywhere for pm?
+ POSTLINK_COMMAND="$RESCOMP $WXCONFIG_RESFLAGS"
+ else
+ POSTLINK_COMMAND="@true"
+ fi
+fi
+
+fi
+dnl wxUSE_GUI = 1
+
+
dnl find out if the compiler supports PCH
dnl
dnl TODO: this should be in bakefile
echo " Should wxWidgets be compiled in debug mode? ${wxUSE_DEBUG:-no}"
echo " Should wxWidgets be linked as a shared library? ${wxUSE_SHARED:-no}"
-echo -n " Should wxWidgets support Unicode? ${wxUSE_UNICODE:-no}"
+echo $ECHO_N " Should wxWidgets support Unicode? ${wxUSE_UNICODE:-no}$ECHO_C"
if test "$wxUSE_UNICODE" = "yes"; then
if test "$wxUSE_UNICODE_UTF8" = "yes"; then
echo " (using UTF-8)"
echo " wxWidgets 2.8 ${WXWIN_COMPATIBILITY_2_8:-yes}"
echo " Which libraries should wxWidgets use?"
+echo " STL ${wxUSE_STL}"
echo " jpeg ${wxUSE_LIBJPEG-none}"
echo " png ${wxUSE_LIBPNG-none}"
echo " regex ${wxUSE_REGEX}"