dnl the list of all available toolkits
dnl
dnl update NUM_TOOLKITS calculation below when adding a new toolkit here!
-ALL_TOOLKITS="COCOA GTK OSX_CARBON OSX_COCOA MGL MICROWIN MOTIF MSW PM X11 DFB"
+ALL_TOOLKITS="COCOA GTK OSX_CARBON OSX_COCOA OSX_IPHONE MGL MICROWIN MOTIF MSW PM X11 DFB"
dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones
dnl which are either yes or no
-DEFAULT_wxUSE_COCOA=0
+DEFAULT_wxUSE_OLD_COCOA=0
DEFAULT_wxUSE_GTK=0
DEFAULT_wxUSE_OSX_CARBON=0
DEFAULT_wxUSE_OSX_COCOA=0
+DEFAULT_wxUSE_OSX_IPHONE=0
DEFAULT_wxUSE_MGL=0
DEFAULT_wxUSE_MICROWIN=0
DEFAULT_wxUSE_MOTIF=0
dnl these are the values which are really default for the given platform:
dnl they're used if no --with-<toolkit> options were given to detect the
dnl toolkit to use by default for the target platform
-DEFAULT_DEFAULT_wxUSE_COCOA=0
+DEFAULT_DEFAULT_wxUSE_OLD_COCOA=0
DEFAULT_DEFAULT_wxUSE_GTK=0
DEFAULT_DEFAULT_wxUSE_OSX_CARBON=0
DEFAULT_DEFAULT_wxUSE_OSX_COCOA=0
+DEFAULT_DEFAULT_wxUSE_OSX_IPHONE=0
DEFAULT_DEFAULT_wxUSE_MGL=0
DEFAULT_DEFAULT_wxUSE_MICROWIN=0
DEFAULT_DEFAULT_wxUSE_MOTIF=0
DEFAULT_STD_FLAG=no
;;
+ arm-apple-darwin*)
+ dnl iPhone
+ USE_BSD=1
+ USE_DARWIN=1
+ AC_DEFINE(__BSD__)
+ AC_DEFINE(__DARWIN__)
+ DEFAULT_DEFAULT_wxUSE_OSX_IPHONE=1
+ ;;
+
*-*-darwin* )
dnl Darwin based distributions (including Mac OS X)
USE_BSD=1
dnl features disabled by default
DEFAULT_wxUSE_ACCESSIBILITY=no
-DEFAULT_wxUSE_GRAPHICS_CONTEXT=no
DEFAULT_wxUSE_IPV6=no
DEFAULT_wxUSE_GSTREAMER8=no
dnl shouldn't default to wxUSE_ALL_FEATURES
AC_ARG_WITH(gtk, [[ --with-gtk[=VERSION] use GTK+, VERSION can be 2 (default), 1 or "any"]], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1])
-AC_ARG_WITH(osx_carbon, [ --with-osx_carbon use Mac OS X (Carbon) ], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1])
-AC_ARG_WITH(osx_cocoa, [ --with-osx_cocoa use Mac OS X (Cocoa) ], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1])
-AC_ARG_WITH(mac, [ --with-mac use Mac OS X (Default) ], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1])
-AC_ARG_WITH(cocoa, [ --with-cocoa use Cocoa], [wxUSE_COCOA="$withval" CACHE_COCOA=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(osx_carbon, [ --with-osx_carbon use Mac OS X (Carbon)], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(osx_cocoa, [ --with-osx_cocoa use Mac OS X (Cocoa)], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(osx_iphone, [ --with-osx_iphone use iPhone OS X port], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(osx, [ --with-osx use Mac OS X (default port, currently Carbon)], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(carbon, [ --with-carbon same as --with-osx_carbon], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(cocoa, [ --with-cocoa same as --with-osx_cocoa], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(iphone, [ --with-iphone same as --with-osx_iphone], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(mac, [ --with-mac same as --with-osx], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(old_cocoa, [ --with-old_cocoa use old, deprecated, Cocoa port], [wxUSE_OLD_COCOA="$withval" CACHE_OLD_COCOA=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(wine, [ --with-wine use Wine], [wxUSE_WINE="$withval" CACHE_WINE=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])
dnl we suppose that expr is available (maybe there is a better way to do
dnl this? what about using ALL_TOOLKITS? TODO)
- NUM_TOOLKITS=`expr ${wxUSE_COCOA:-0} + ${wxUSE_GTK:-0} + ${wxUSE_OSX_CARBON:-0} \
- + ${wxUSE_OSX_COCOA:-0} + ${wxUSE_MGL:-0} + ${wxUSE_DFB:-0} \
+ NUM_TOOLKITS=`expr ${wxUSE_OLD_COCOA:-0} + ${wxUSE_GTK:-0} + ${wxUSE_OSX_CARBON:-0} \
+ + ${wxUSE_OSX_COCOA:-0} + ${wxUSE_OSX_IPHONE:-0} + ${wxUSE_MGL:-0} + ${wxUSE_DFB:-0} \
+ ${wxUSE_MICROWIN:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_MSW:-0} + ${wxUSE_X11:-0}`
dnl Allow wxUSE_PM only for OS/2 with EMX.
fi
wxUSE_MAC=0
-if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1; then
+if test "$wxUSE_OSX_CARBON" = 1 \
+ -o "$wxUSE_OSX_COCOA" = 1 \
+ -o "$wxUSE_OSX_IPHONE" = 1; then
wxUSE_MAC=1
fi
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(fs_zip, [ --enable-fs_zip now replaced by fs_archive], wxUSE_FS_ZIP)
+WX_ARG_FEATURE(fswatcher, [ --enable-fswatcher use wxFileSystemWatcher class], wxUSE_FSWATCHER)
WX_ARG_FEATURE(geometry, [ --enable-geometry use geometry class], wxUSE_GEOMETRY)
WX_ARG_FEATURE(log, [ --enable-log use logging system], wxUSE_LOG)
WX_ARG_FEATURE(longlong, [ --enable-longlong use wxLongLong class], wxUSE_LONGLONG)
WX_ARG_FEATURE(stdpaths, [ --enable-stdpaths use wxStandardPaths class], wxUSE_STDPATHS)
WX_ARG_FEATURE(stopwatch, [ --enable-stopwatch use wxStopWatch class], wxUSE_STOPWATCH)
WX_ARG_FEATURE(streams, [ --enable-streams use wxStream etc classes], wxUSE_STREAMS)
-WX_ARG_FEATURE(system_options,[ --enable-sysoptions use wxSystemOptions], wxUSE_SYSTEM_OPTIONS)
+WX_ARG_FEATURE(sysoptions, [ --enable-sysoptions use wxSystemOptions], wxUSE_SYSTEM_OPTIONS)
WX_ARG_FEATURE(tarstream, [ --enable-tarstream use wxTar streams], wxUSE_TARSTREAM)
WX_ARG_FEATURE(textbuf, [ --enable-textbuf use wxTextBuffer class], wxUSE_TEXTBUFFER)
WX_ARG_FEATURE(textfile, [ --enable-textfile use wxTextFile class], wxUSE_TEXTFILE)
WX_ARG_FEATURE(gstreamer8, [ --enable-gstreamer8 force GStreamer 0.8 instead of 0.10 with the wxMediaCtrl class on unix], wxUSE_GSTREAMER8)
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(postscript, [ --enable-postscript use wxPostscriptDC device context (default for gtk+)], wxUSE_POSTSCRIPT)
WX_ARG_FEATURE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE)
WX_ARG_FEATURE(svg, [ --enable-svg use wxSVGFileDC device context], wxUSE_SVG)
+dnl wxDC is implemented in terms of wxGraphicsContext in wxOSX so the latter
+dnl can't be disabled, don't even provide an option to do it
+if test "$wxUSE_MAC" != 1; then
+WX_ARG_FEATURE(graphics_ctx,[ --enable-graphics_ctx use graphics context 2D drawing API], wxUSE_GRAPHICS_CONTEXT)
+fi
+
dnl ---------------------------------------------------------------------------
dnl IPC &c
dnl ---------------------------------------------------------------------------
wxUSE_MACOSX_VERSION_MIN=
fi
elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then
- OSX_VERSION=`sw_vers -productVersion | grep 10.[[0-9]]`
- if test "$wxUSE_OSX_CARBON" = 1 -o "x$OSX_VERSION" = "x10.4"; then
- # otherwise configure stops on leopard for universal_binary
- wxUSE_MACOSX_VERSION_MIN=10.4
+ AC_CHECK_PROGS(OSX_SW_VERS, sw_vers)
+ if test "$OSX_SW_VERS" != ""; then
+ OSX_VERSION=`sw_vers -productVersion | grep 10.[[0-9]]`
else
- # for OS X Cocoa, use 10.5 so we can get 64-bit compile on Snow Leopard
- wxUSE_MACOSX_VERSION_MIN=10.5
+ dnl can't determine it (happens e.g. when cross-compiling) so use a
+ dnl conservative default
+ AC_MSG_WARN([Assuming OS X 10.4, use --with-macosx-version-min to override.])
+ OSX_VERSION="10.4"
fi
+
+ case "$OSX_VERSION" in
+ 10.4* )
+ wxUSE_MACOSX_VERSION_MIN=10.4
+ ;;
+
+ * )
+ if test "$wxUSE_OSX_CARBON" = 1; then
+ # otherwise configure stops on leopard for universal_binary
+ wxUSE_MACOSX_VERSION_MIN=10.4
+ else
+ # for Cocoa, use 10.5 to be able to compile it in 64 bits too
+ wxUSE_MACOSX_VERSION_MIN=10.5
+ fi
+ ;;
+ esac
fi
NEEDS_GCC40="no"
AC_CHECK_HEADER(png.h,,, [ ])
if test "$ac_cv_header_png_h" = "yes"; then
- AC_CHECK_LIB(png, png_check_sig, PNG_LINK=" -lpng -lz", , [-lz -lm])
+ AC_CHECK_LIB(png, png_sig_cmp, PNG_LINK=" -lpng -lz", , [-lz -lm])
fi
if test "x$PNG_LINK" = "x" ; then
dnl --- FIXME: This is still a somewhat random list of libs,
dnl --- some of them should probably be included conditionally.
case "${host}" in
- x86_64-*-mingw32* )
+ x86_64-*-mingw32* )
dnl --- For mingw-w64 lctl3d32's name has changed
LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lwctl3d32 -ladvapi32 -lwsock32 -lgdi32"
WXGTK2=
WXGPE=
- if test "$wxUSE_COCOA" = 1 ; then
+ if test "$wxUSE_OLD_COCOA" = 1 ; then
if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes"; then
AC_MSG_WARN([Printing not supported under wxCocoa yet, disabled])
wxUSE_PRINTING_ARCHITECTURE=no
TOOLKIT_INCLUDE="$wx_cv_cflags_gtk"
GUI_TK_LIBRARY="$wx_cv_libs_gtk $GUI_TK_LIBRARY"
+ dnl disable GTK runtime type checks
+ TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -DG_DISABLE_CAST_CHECKS"
+
AFMINSTALL=afminstall
TOOLKIT=GTK
GUIDIST=GTK_DIST
fi
if test "x$wxUSE_UNIX" = "xyes"; then
- CPPFLAGS="$CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/carbon/morefilex -I/Developer/Headers/FlatCarbon $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS_PASCAL -I/Developer/Headers/FlatCarbon $CPPFLAGS"
else
dnl platform.h needs TARGET_CARBON before setup.h
- CPPFLAGS="$CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/carbon/morefilex -DTARGET_CARBON $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS_PASCAL -DTARGET_CARBON $CPPFLAGS"
fi
TOOLKIT=OSX_CARBON
TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXMAC__ -D__WXOSX__"
fi
- if test "$wxUSE_COCOA" = 1; then
+ if test "$wxUSE_OSX_IPHONE" = 1; then
+ TOOLKIT=OSX_IPHONE
+ fi
+
+ if test "$wxUSE_OLD_COCOA" = 1; then
TOOLKIT=COCOA
GUIDIST=COCOA_DIST
fi
dnl ---------------------------------------------------------------------------
dnl Xinerama (for unix ) - Brian Victor
dnl ---------------------------------------------------------------------------
- if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1; then
+ if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1; then
AC_MSG_CHECKING([for Xinerama])
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xinerama)
if test "$ac_find_libraries" != "" ; then
dnl X11 session management
dnl ---------------------------------------------------------------------------
if test "$wxUSE_DETECT_SM" = "yes"; then
- if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1; then
+ if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1; then
AC_MSG_CHECKING([for -lSM - X11 session management])
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],SM)
if test "$ac_find_libraries" != "" ; then
dnl look in glcanvas.h for the list of platforms supported by wxGlCanvas:
- if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_COCOA" = 1; then
+ if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_OLD_COCOA" = 1; then
OPENGL_LIBS="-framework OpenGL -framework AGL"
elif test "$wxUSE_MSW" = 1; then
OPENGL_LIBS="-lopengl32 -lglu32"
dnl These just save us from exporting lib_{unicode,flavour}_suffix.
dnl If we ever need to do that, we won't need to keep these.
-if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_COCOA" = 1; then
+if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_OLD_COCOA" = 1; then
WX_LIBRARY_BASENAME_NOGUI="wx_base${lib_unicode_suffix}${WX_LIB_FLAVOUR}"
else
WX_LIBRARY_BASENAME_NOGUI="wx_base${WXBASEPORT}${lib_unicode_suffix}${WX_LIB_FLAVOUR}"
-if test "$wxUSE_COCOA" = 1; then
+if test "$wxUSE_OLD_COCOA" = 1; then
AC_LANG_SAVE
AC_WX_LANG_OBJECTIVEC
dnl Recent AppKit/NSEvent.h include parts of IOKit which eventually
else
dnl yes, these special compiler flags should be used with the
dnl linker as well
+ dnl
+ dnl NB: add them to LDFLAGS immediately because we need them to be
+ dnl used for the subsequent tests some of which can fail without
+ dnl MT support, hence the reason for the duplication below:
+ dnl adding them just to WXCONFIG_LDFLAGS and adding the entire
+ dnl contents of the latter to LDFLAGS in the end is not enough.
LDFLAGS="$THREADS_CFLAGS $LDFLAGS"
+ WXCONFIG_LDFLAGS="$THREADS_CFLAGS $WXCONFIG_LDFLAGS"
LIBS="$THREADS_LINK $LIBS"
AC_MSG_CHECKING([if more special flags are required for pthreads])
dnl search path should include -L/usr/lib/threads at the
dnl beginning of the path.
LDFLAGS="-L/usr/lib/threads $LDFLAGS"
+ WXCONFIG_LDFLAGS="-L/usr/lib/threads $WXCONFIG_LDFLAGS"
flag="-D_THREAD_SAFE"
;;
*-freebsd*)
fi
fi
+dnl ---------------------------------------------------------------------------
+dnl File system watcher checks
+dnl ---------------------------------------------------------------------------
+
+if test "$wxUSE_FSWATCHER" = "yes"; then
+ AC_DEFINE(wxUSE_FSWATCHER)
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS fswatcher"
+
+ if test "$wxUSE_UNIX" = "yes"; then
+ AC_CHECK_HEADERS(sys/inotify.h,,, [AC_INCLUDES_DEFAULT()])
+ if test "$ac_cv_header_sys_inotify_h" = "yes"; then
+ AC_DEFINE(wxHAS_INOTIFY)
+ else
+ AC_CHECK_HEADERS(sys/event.h,,, [AC_INCLUDES_DEFAULT()])
+ if test "$ac_cv_header_sys_event_h" = "yes"; then
+ AC_DEFINE(wxHAS_KQUEUE)
+ else
+ AC_MSG_WARN([No native wxFileSystemWatcher implementation available for on this platform])
+ fi
+ fi
+ fi
+fi
+
dnl ---------------------------------------------------------------------------
dnl Register non-GUI class options for makefiles and setup.h
dnl ---------------------------------------------------------------------------
fi
if test "$wxUSE_TOGGLEBTN" = "yes"; then
- if test "$wxUSE_COCOA" = 1 ; then
+ if test "$wxUSE_OLD_COCOA" = 1 ; then
AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled])
wxUSE_TOGGLEBTN=no
fi
fi
if test "$wxUSE_POPUPWIN" = "yes"; then
- if test "$wxUSE_COCOA" = 1 ; then
+ if test "$wxUSE_OLD_COCOA" = 1 ; then
AC_MSG_WARN([Popup window not yet supported under Mac OS X... disabled])
else
if test "$wxUSE_PM" = 1; then
fi
if test "$wxUSE_DIALUP_MANAGER" = "yes"; then
- if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 -o "$wxUSE_MGL" = 1; then
+ if test "$wxUSE_MAC" = 1 -o "$wxUSE_OLD_COCOA" = 1 -o "$wxUSE_MGL" = 1; then
AC_MSG_WARN([Dialup manager not supported on this platform... disabled])
else
AC_DEFINE(wxUSE_DIALUP_MANAGER)
#include <WebKit/WebKit.h>
])
CPPFLAGS="$old_CPPFLAGS"
- elif test "$wxUSE_COCOA" = 1; then
+ elif test "$wxUSE_OLD_COCOA" = 1; then
AC_DEFINE(wxUSE_WEBKIT)
else
wxUSE_WEBKIT=no
dnl wxGraphicsContext
dnl ---------------------------------------------------------------------------
+dnl Under Mac we don't even provide --enable-graphics_ctx switch as we always
+dnl need it -- but because we don't have the option, wxUSE_GRAPHICS_CONTEXT is
+dnl not defined automatically and we need to do it ourselves
if test "$wxUSE_MAC" = 1; then
- wxUSE_GRAPHICS_CONTEXT="yes"
+ wxUSE_GRAPHICS_CONTEXT="yes"
fi
if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then
- if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then
- AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)
- elif test "$wxUSE_GTK" != 1; then
- dnl for other builds we'll just wing it for now...
- AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)
- else
- dnl ...but let's check for cairo availability for wxGTK builds
- PKG_CHECK_MODULES(CAIRO, cairo,
- [AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)],
- [AC_MSG_WARN([Cairo library not found, unable to set wxUSE_GRAPHICS_CONTEXT])]
- )
- fi
+ wx_has_graphics=0
+ if test "$wxUSE_MSW" = 1; then
+ AC_CACHE_CHECK([if GDI+ is available], wx_cv_lib_gdiplus,
+ [
+ dnl we need just the header, not the library, as we load the
+ dnl GDI+ DLL dynamically anyhow during run-time
+ AC_LANG_PUSH(C++)
+ AC_TRY_COMPILE(
+ [#include <gdiplus.h>],
+ [
+ using namespace Gdiplus;
+ ],
+ wx_cv_lib_gdiplus=yes,
+ wx_cv_lib_gdiplus=no
+ )
+ AC_LANG_POP()
+ ]
+ )
+ if test "$wx_cv_lib_gdiplus" = "yes"; then
+ wx_has_graphics=1
+ fi
+ elif test "$wxUSE_GTK" = 1; then
+ PKG_CHECK_MODULES(CAIRO, cairo,
+ [wx_has_graphics=1],
+ [AC_MSG_WARN([Cairo library not found])]
+ )
+ else
+ dnl assume it's ok, add more checks here if needed
+ wx_has_graphics=1
+ fi
+
+ if test "$wx_has_graphics" = 1; then
+ AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)
+ else
+ AC_MSG_WARN([wxGraphicsContext won't be available])
+ fi
fi
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl all additional libraries (except wxWidgets itself) we link with
-
+EXTRA_FRAMEWORKS=
if test "$wxUSE_MAC" = 1 ; then
if test "$USE_DARWIN" = 1; then
- LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime"
+ EXTRA_FRAMEWORKS="-framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime"
fi
fi
-if test "$wxUSE_COCOA" = 1 ; then
- LDFLAGS="$LDFLAGS -framework IOKit -framework Cocoa"
+if test "$wxUSE_OLD_COCOA" = 1 ; then
+ EXTRA_FRAMEWORKS="-framework IOKit -framework Cocoa"
if test "$wxUSE_MEDIACTRL" = "yes"; then
- LDFLAGS="$LDFLAGS -framework QuickTime"
+ EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework QuickTime"
fi
fi
-if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1 ; then
- LDFLAGS="$LDFLAGS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices"
+if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1 ; then
+ EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices"
fi
+LDFLAGS="$LDFLAGS $EXTRA_FRAMEWORKS"
+WXCONFIG_LDFLAGS="$WXCONFIG_LDFLAGS $EXTRA_FRAMEWORKS"
+
LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK $LIBS"
if test "$wxUSE_GUI" = "yes"; then
if test "$TOOLKIT" = "MSW"; then
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS regtest"
if test "$wxUSE_UNIVERSAL" != "yes"; then
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ownerdrw nativdlg"
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ownerdrw nativdlg dll"
fi
fi
if test "$TOOLKIT" = "PM" -a "$wxUSE_UNIVERSAL" != "yes"; then
AC_SUBST(UNICODE)
AC_SUBST(DEBUG_INFO)
AC_SUBST(DEBUG_FLAG)
-TOOLKIT_LOWERCASE=xxx
-if test "$TOOLKIT" = "MAC"; then
- TOOLKIT_LOWERCASE=osx_carbon
-fi
-if test "$TOOLKIT" = "OSX_CARBON"; then
- TOOLKIT_LOWERCASE=osx_carbon
-fi
-if test "$TOOLKIT" = "OSX_COCOA"; then
- TOOLKIT_LOWERCASE=osx_cocoa
-fi
-if test "$TOOLKIT_LOWERCASE" = "xxx"; then
- TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'`
-fi
+TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'`
AC_SUBST(TOOLKIT_LOWERCASE)
AC_SUBST(TOOLKIT_VERSION)
AC_SUBST(DYLIB_RPATH_INSTALL)
RESCOMP="$WINDRES $WINDRES_CPU_DEFINE"
fi
-if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then
+if test "$wxUSE_MAC" = 1 -o "$wxUSE_OLD_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"
AC_SUBST(WXCONFIG_LIBS)
AC_SUBST(WXCONFIG_RPATH)
+AC_SUBST(WXCONFIG_LDFLAGS)
AC_SUBST(WXCONFIG_LDFLAGS_GUI)
AC_SUBST(WXCONFIG_RESFLAGS)