X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32df13a52a03dc59b3c315d385cef19bcee2b049..abd6692ca8b91b072068bf3e1f80e68afb62fe53:/configure.in diff --git a/configure.in b/configure.in index 6e48d6b6a6..cd9eb836ca 100644 --- a/configure.in +++ b/configure.in @@ -205,6 +205,10 @@ case "${host}" in AC_DEFINE(__BSD__) DEFAULT_DEFAULT_wxUSE_GTK=1 NEEDS_D_REENTRANT_FOR_R_FUNCS=1 + + dnl some standard declarations in NetBSD headers are only included if + dnl _NETBSD_SOURCE and _LIBC are defined, e.g. getservbyname_r in netdb.h + CPPFLAGS="-D_NETBSD_SOURCE -D_LIBC $CPPFLAGS" ;; *-*-osf* ) USE_ALPHA=1 @@ -418,6 +422,7 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_TEXTFILE=no DEFAULT_wxUSE_SOUND=no DEFAULT_wxUSE_MEDIACTRL=no + DEFAULT_wxUSE_GSTREAMER8=no DEFAULT_wxUSE_INTL=no DEFAULT_wxUSE_CONFIG=no DEFAULT_wxUSE_FONTMAP=no @@ -526,13 +531,14 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_STATLINE=no DEFAULT_wxUSE_STATTEXT=no DEFAULT_wxUSE_STATUSBAR=yes - DEFAULT_wxUSE_TABDIALOG=no + DEFAULT_wxUSE_TAB_DIALOG=no DEFAULT_wxUSE_TEXTCTRL=no DEFAULT_wxUSE_TOGGLEBTN=no DEFAULT_wxUSE_TOOLBAR=no DEFAULT_wxUSE_TOOLBAR_NATIVE=no DEFAULT_wxUSE_TOOLBAR_SIMPLE=no DEFAULT_wxUSE_TREEBOOK=no + DEFAULT_wxUSE_TOOLBOOK=no DEFAULT_wxUSE_TREECTRL=no DEFAULT_wxUSE_POPUPWIN=no DEFAULT_wxUSE_TIPWINDOW=no @@ -619,6 +625,7 @@ else DEFAULT_wxUSE_TEXTFILE=yes DEFAULT_wxUSE_SOUND=yes DEFAULT_wxUSE_MEDIACTRL=no + DEFAULT_wxUSE_GSTREAMER8=no DEFAULT_wxUSE_INTL=yes DEFAULT_wxUSE_CONFIG=yes DEFAULT_wxUSE_FONTMAP=yes @@ -727,13 +734,14 @@ else DEFAULT_wxUSE_STATLINE=yes DEFAULT_wxUSE_STATTEXT=yes DEFAULT_wxUSE_STATUSBAR=yes - DEFAULT_wxUSE_TABDIALOG=no + DEFAULT_wxUSE_TAB_DIALOG=no DEFAULT_wxUSE_TEXTCTRL=yes DEFAULT_wxUSE_TOGGLEBTN=yes DEFAULT_wxUSE_TOOLBAR=yes DEFAULT_wxUSE_TOOLBAR_NATIVE=yes DEFAULT_wxUSE_TOOLBAR_SIMPLE=yes DEFAULT_wxUSE_TREEBOOK=yes + DEFAULT_wxUSE_TOOLBOOK=yes DEFAULT_wxUSE_TREECTRL=yes DEFAULT_wxUSE_POPUPWIN=yes DEFAULT_wxUSE_TIPWINDOW=yes @@ -868,7 +876,7 @@ WX_ARG_ENABLE(no_rtti, [ --enable-no_rtti create code without RTTI WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without C++ exceptions handling], wxUSE_NO_EXCEPTIONS) 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(enable-universal_binary, [ --enable-universal_binary create Mac PowerPC and Intel Universal binary (not yet working)], wxUSE_UNIVERSAL_BINARY) +WX_ARG_ENABLE(universal_binary, [ --enable-universal_binary create Mac PowerPC and Intel Universal binary (not yet working)], wxUSE_UNIVERSAL_BINARY) WX_ARG_ENABLE(compat24, [ --enable-compat24 enable wxWidgets 2.4 compatibility], WXWIN_COMPATIBILITY_2_4, enable) WX_ARG_ENABLE(compat26, [ --disable-compat26 disable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6, disable) @@ -929,6 +937,7 @@ WX_ARG_ENABLE(timer, [ --enable-timer use wxTimer class], wxUS WX_ARG_ENABLE(unicode, [ --enable-unicode compile wxString with Unicode support], wxUSE_UNICODE) WX_ARG_ENABLE(sound, [ --enable-sound use wxSound class], wxUSE_SOUND) WX_ARG_ENABLE(mediactrl, [ --enable-mediactrl use wxMediaCtrl class], wxUSE_MEDIACTRL) +WX_ARG_ENABLE(gstreamer8, [ --enable-gstreamer8 force GStreamer 0.8 instead of 0.10 with the wxMediaCtrl class on unix], wxUSE_GSTREAMER8) WX_ARG_ENABLE(wxprintfv, [ --enable-wxprintfv use wxWidgets implementation of vprintf()], wxUSE_EXPERIMENTAL_PRINTF) WX_ARG_ENABLE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM) @@ -1041,6 +1050,7 @@ if test "$wxUSE_CONTROLS" = "yes"; then DEFAULT_wxUSE_TOOLBAR_SIMPLE=yes DEFAULT_wxUSE_TOOLTIPS=yes DEFAULT_wxUSE_TREEBOOK=yes + DEFAULT_wxUSE_TOOLBOOK=yes DEFAULT_wxUSE_TREECTRL=yes DEFAULT_wxUSE_POPUPWIN=yes DEFAULT_wxUSE_TIPWINDOW=yes @@ -1083,6 +1093,7 @@ elif test "$wxUSE_CONTROLS" = "no"; then DEFAULT_wxUSE_TOOLBAR_SIMPLE=no DEFAULT_wxUSE_TOOLTIPS=no DEFAULT_wxUSE_TREEBOOK=no + DEFAULT_wxUSE_TOOLBOOK=no DEFAULT_wxUSE_TREECTRL=no DEFAULT_wxUSE_POPUPWIN=no DEFAULT_wxUSE_TIPWINDOW=no @@ -1121,13 +1132,14 @@ WX_ARG_ENABLE(statbox, [ --enable-statbox use wxStaticBox class], wx WX_ARG_ENABLE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE) WX_ARG_ENABLE(stattext, [ --enable-stattext use wxStaticText class], wxUSE_STATTEXT) WX_ARG_ENABLE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR) -WX_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TABDIALOG) +WX_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TAB_DIALOG) WX_ARG_ENABLE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL) WX_ARG_ENABLE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN) WX_ARG_ENABLE(toolbar, [ --enable-toolbar use wxToolBar class], wxUSE_TOOLBAR) WX_ARG_ENABLE(tbarnative, [ --enable-tbarnative use native wxToolBar class], wxUSE_TOOLBAR_NATIVE) WX_ARG_ENABLE(tbarsmpl, [ --enable-tbarsmpl use wxToolBarSimple class], wxUSE_TOOLBAR_SIMPLE) WX_ARG_ENABLE(treebook, [ --enable-treebook use wxTreebook class], wxUSE_TREEBOOK) +WX_ARG_ENABLE(toolbook, [ --enable-toolbook use wxToolbook class], wxUSE_TOOLBOOK) WX_ARG_ENABLE(treectrl, [ --enable-treectrl use wxTreeCtrl class], wxUSE_TREECTRL) WX_ARG_ENABLE(tipwindow, [ --enable-tipwindow use wxTipWindow class], wxUSE_TIPWINDOW) WX_ARG_ENABLE(popupwin, [ --enable-popupwin use wxPopUpWindow class], wxUSE_POPUPWIN) @@ -1398,8 +1410,7 @@ dnl is -traditional needed for correct compilations dnl adds -traditional for gcc if needed AC_PROG_GCC_TRADITIONAL -AC_LANG_SAVE -AC_LANG_CPLUSPLUS +AC_LANG_PUSH(C++) dnl C++-compiler checks dnl defines CXX with the compiler to use @@ -1411,7 +1422,7 @@ dnl see CFLAGS line above CXXFLAGS=${CXXFLAGS:=} AC_BAKEFILE_PROG_CXX -AC_LANG_RESTORE +AC_LANG_POP dnl ranlib command dnl defines RANLIB with the appropriate command @@ -1666,8 +1677,7 @@ case "${host}" in dnl --------------------------------------------------------------------- dnl (non-OS/2-only piece) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [ AC_TRY_LINK([ @@ -1703,7 +1713,7 @@ case "${host}" in fi fi - AC_LANG_RESTORE + AC_LANG_POP dnl (end of non-OS/2-only piece) ;; esac @@ -1893,8 +1903,7 @@ if test "x$wx_largefile" = "xyes"; then [if -D__STDC_EXT__ is required], wx_cv_STDC_EXT_required, [ - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) AC_TRY_COMPILE( [], [ @@ -1905,7 +1914,7 @@ if test "x$wx_largefile" = "xyes"; then wx_cv_STDC_EXT_required=no, wx_cv_STDC_EXT_required=yes ) - AC_LANG_RESTORE + AC_LANG_POP ] ) if test "x$wx_cv_STDC_EXT_required" = "xyes"; then @@ -2639,13 +2648,12 @@ if test "$wxUSE_EXPAT" != "no"; then AC_CACHE_CHECK([if expat.h is valid C++ header], wx_cv_expat_is_not_broken, [ - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) AC_TRY_COMPILE([#include ],[], wx_cv_expat_is_not_broken=yes, wx_cv_expat_is_not_broken=no ) - AC_LANG_RESTORE + AC_LANG_POP ] ) if test "$wx_cv_expat_is_not_broken" = "yes" ; then @@ -3426,18 +3434,6 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config CPPFLAGS="$CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/carbon/morefilex -DTARGET_CARBON $CPPFLAGS" fi - if test "x$wxUSE_UNIVERSAL_BINARY" = "xyes"; then - CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 $CXXFLAGS" - CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 $CFLAGS" - LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 $LDFLAGS" - DEPSMODE=none - bk_use_pch=no - - # 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. - # TODO: how can we avoid a hardwired reference to the SDK, above? (Someone used -lSystemStubs to avoid it) - fi - TOOLKIT=MAC dnl we can't call this MAC_DIST or autoconf thinks its a macro GUIDIST=MACX_DIST @@ -3979,8 +3975,7 @@ AC_CHECK_TYPES(ssize_t) dnl check what exactly size_t is on this machine - this is necessary to avoid dnl ambiguous overloads in several places, notably wx/string.h and wx/array.h -AC_LANG_SAVE -AC_LANG_CPLUSPLUS +AC_LANG_PUSH(C++) AC_CACHE_CHECK([if size_t is unsigned int], wx_cv_size_t_is_uint, [ @@ -4027,7 +4022,7 @@ else fi fi -AC_LANG_RESTORE +AC_LANG_POP dnl --------------------------------------------------------------------------- dnl Checks for structures @@ -4106,8 +4101,7 @@ fi dnl *printf() functions sometimes are available in the library but not dnl prototyped -- if this is the case, we can't use them from C++ code, but to dnl detect this we have to use C++ compiler for testing -AC_LANG_SAVE -AC_LANG_CPLUSPLUS +AC_LANG_PUSH(C++) dnl check for vsnprintf() -- a safe version of vsprintf()) dnl @@ -4261,7 +4255,7 @@ if test "$wxUSE_UNICODE" = yes; then [AC_MSG_RESULT([no])]); fi -AC_LANG_RESTORE +AC_LANG_POP if test "x$ac_cv_header_fnmatch_h" = "xyes"; then AC_CHECK_FUNCS(fnmatch) @@ -4277,11 +4271,10 @@ if test "$TOOLKIT" != "MSW"; then dnl check for available version of iconv() -AC_LANG_SAVE -AC_LANG_CPLUSPLUS +AC_LANG_PUSH(C++) AM_ICONV LIBS="$LIBICONV $LIBS" -AC_LANG_RESTORE +AC_LANG_POP dnl check for POSIX signals if we need them if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then @@ -4293,8 +4286,7 @@ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then fi if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) AC_CACHE_CHECK([for sa_handler type], wx_cv_type_sa_handler, [ @@ -4311,7 +4303,7 @@ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then ]) ]) - AC_LANG_RESTORE + AC_LANG_POP AC_DEFINE_UNQUOTED(wxTYPE_SA_HANDLER, $wx_cv_type_sa_handler) fi @@ -4319,8 +4311,7 @@ fi dnl backtrace() and backtrace_symbols() for wxStackWalker if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) AC_CACHE_CHECK([for backtrace() in ], wx_cv_func_backtrace, [ @@ -4361,7 +4352,7 @@ if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then fi fi - AC_LANG_RESTORE + AC_LANG_POP fi if test "$wxUSE_STACKWALKER" = "yes" -a "$USE_WIN32" != "1" -a "$USE_UNIX" != "1"; then @@ -4400,8 +4391,7 @@ AC_CACHE_CHECK(for statfs, wx_cv_func_statfs, if test "$wx_cv_func_statfs" = "yes"; then dnl check whether we have its dcelaration too: some systems (AIX 4) lack it - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) AC_CACHE_CHECK(for statfs declaration, wx_cv_func_statfs_decl, AC_TRY_COMPILE( [ @@ -4420,7 +4410,7 @@ if test "$wx_cv_func_statfs" = "yes"; then wx_cv_func_statfs_decl=no ) ) - AC_LANG_RESTORE + AC_LANG_POP if test "$wx_cv_func_statfs_decl" = "yes"; then AC_DEFINE(HAVE_STATFS_DECL) @@ -4451,8 +4441,7 @@ else dnl dnl for this check C++ compiler has to be used as passing incompatible dnl pointers is just a warning and not an error in C - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) AC_CACHE_CHECK(for statvfs argument type, wx_cv_type_statvfs_t, AC_TRY_COMPILE( @@ -4488,7 +4477,7 @@ else ) ) - AC_LANG_RESTORE + AC_LANG_POP if test "$wx_cv_type_statvfs_t" != "unknown"; then AC_DEFINE(HAVE_STATVFS) @@ -4564,12 +4553,11 @@ AC_CHECK_FUNCS(uname gethostname, break) dnl check for MT-safe version of strtok (on DEC Alpha, it's ok for C compiler dnl but not for C++ one - hence change language) -AC_LANG_SAVE -AC_LANG_CPLUSPLUS +AC_LANG_PUSH(C++) AC_CHECK_FUNCS(strtok_r) -AC_LANG_RESTORE +AC_LANG_POP dnl check for inet_addr and inet_aton (these may live either in libc, or in dnl libnsl or libresolv or libsocket) @@ -5009,6 +4997,7 @@ 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 dnl to gethostbyname_r/gethostbyaddr_r and getservbyname_r +AC_LANG_PUSH(C++) dnl AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO), [ dnl no getaddrinfo, so check for gethostbyname_r and dnl related functions (taken from python's configure.in) @@ -5036,6 +5025,7 @@ dnl AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO), [ dnl check to fit this case, if it's really needed. - SN ) dnl ] dnl ) +AC_LANG_POP if test "$wxUSE_THREADS" = "yes"; then AC_DEFINE(wxUSE_THREADS) @@ -5157,7 +5147,10 @@ if test "$wxUSE_OPTIMISE" = "no" ; then fi else if test "$GCC" = yes ; then - OPTIMISE_CFLAGS="-O2" + dnl Switch on optimisation but keep strict-aliasing off for now (see + dnl -fstrict-aliasing in the gcc manual). When it is switched back on + dnl consider using -Wstrict-aliasing=2. + OPTIMISE_CFLAGS="-O2 -fno-strict-aliasing" else OPTIMISE_CFLAGS="-O" fi @@ -5580,8 +5573,7 @@ if test "$wxUSE_DATETIME" = "yes"; then if test "$ac_cv_func_strptime" = "yes"; then AC_CACHE_CHECK([for strptime declaration], wx_cv_func_strptime_decl, [ - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) AC_TRY_COMPILE( [ #include @@ -5593,7 +5585,7 @@ if test "$wxUSE_DATETIME" = "yes"; then wx_cv_func_strptime_decl=yes, wx_cv_func_strptime_decl=no ) - AC_LANG_RESTORE + AC_LANG_POP ] ) fi @@ -5695,8 +5687,7 @@ if test "$wxUSE_DATETIME" = "yes"; then wx_cv_func_gettimeofday_has_2_args, [ dnl on some _really_ old systems it takes only 1 argument - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) AC_TRY_COMPILE( [ @@ -5724,7 +5715,7 @@ if test "$wxUSE_DATETIME" = "yes"; then ] ) ) - AC_LANG_RESTORE + AC_LANG_POP ]) if test "$wx_cv_func_gettimeofday_has_2_args" != "yes"; then @@ -6116,8 +6107,7 @@ if test "$USE_WIN32" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ if test "$ac_cv_header_ole2_h" = "yes" ; then if test "$GCC" = yes ; then - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) AC_MSG_CHECKING([if g++ requires -fvtable-thunks]) AC_TRY_COMPILE([#include @@ -6126,7 +6116,7 @@ if test "$USE_WIN32" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ [AC_MSG_RESULT(no)], [AC_MSG_RESULT(yes) WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fvtable-thunks"]) - AC_LANG_RESTORE + AC_LANG_POP LIBS=" -lrpcrt4 -loleaut32 -lole32 -luuid$LIBS" if test "$wxUSE_OLE" = "yes" ; then AC_DEFINE(wxUSE_OLE) @@ -6428,7 +6418,7 @@ if test "$wxUSE_STATUSBAR" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar" fi -if test "$wxUSE_TABDIALOG" = "yes"; then +if test "$wxUSE_TAB_DIALOG" = "yes"; then AC_DEFINE(wxUSE_TAB_DIALOG) fi @@ -6494,6 +6484,11 @@ if test "$wxUSE_TREEBOOK" = "yes"; then USES_CONTROLS=1 fi +if test "$wxUSE_TOOLBOOK" = "yes"; then + AC_DEFINE(wxUSE_TOOLBOOK) + USES_CONTROLS=1 +fi + if test "$wxUSE_TREECTRL" = "yes"; then if test "$wxUSE_IMAGLIST" = "yes"; then AC_DEFINE(wxUSE_TREECTRL) @@ -6765,6 +6760,8 @@ dnl --------------------------------------------------------------------------- dnl wxMediaCtrl dnl --------------------------------------------------------------------------- +USE_MEDIA=0 + if test "$wxUSE_MEDIACTRL" = "yes"; then dnl ----------------------------------------------------------------------- dnl GStreamer @@ -6773,77 +6770,57 @@ if test "$wxUSE_MEDIACTRL" = "yes"; then wxUSE_GSTREAMER="yes" dnl ------------------------------------------------------------------- - dnl Test for gstreamer module from pkg-config + dnl Test for at least 0.8 gstreamer module from pkg-config + dnl Even totem doesn't accept 0.9 evidently. + dnl + dnl So, we first check to see if 0.10 if available - if not we + dnl try the older 0.8 version dnl ------------------------------------------------------------------- - PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.8, + GST_VERSION_MAJOR=0 + GST_VERSION_MINOR=10 + GST_VERSION_RELEASE=0 + GSTREAMER_REQ=$GST_VERSION_MAJOR.$GST_VERSION_MINOR.$GST_VERSION_RELEASE + GST_MAJORMINOR=$GST_VERSION_MAJOR.$GST_VERSION_MINOR + + if test "$wxUSE_GSTREAMER8" = "no"; then + PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR + gstreamer-plugins-base-$GST_MAJORMINOR + gconf-2.0, [ - CPPFLAGS="$GSTREAMER_CFLAGS $CPPFLAGS" - LIBS="$LIBS $GSTREAMER_LIBS -lgstplay-0.8" + CPPFLAGS="$GST_CFLAGS $CPPFLAGS" + LIBS="$LIBS $GST_LIBS -lgstinterfaces-$GST_MAJORMINOR" ], [ - AC_MSG_WARN([GStreamer installation not found]) - wxUSE_GSTREAMER="no" + GST_VERSION_MINOR=8 ]) - - dnl ------------------------------------------------------------------- - dnl Perform a check for a GStreamer element using gst-inspect - dnl Thomas Vander Stichele - dnl Last modification: 25/01/2005 - dnl - dnl AM_GST_ELEMENT_CHECK(ELEMENT-NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - dnl ------------------------------------------------------------------- - AC_DEFUN([AM_GST_ELEMENT_CHECK], - [ - if test "x$GST_INSPECT" == "x"; then - AC_CHECK_PROG(GST_INSPECT, gst-inspect, gst-inspect, []) - fi - - if test "x$GST_INSPECT" != "x"; then - AC_MSG_CHECKING(GStreamer element $1) - if [ $GST_INSPECT $1 > /dev/null 2> /dev/null ]; then - AC_MSG_RESULT(found.) - $2 else - AC_MSG_RESULT(not found.) - $3 - fi + GST_VERSION_MINOR=8 fi - ]) - dnl ------------------------------------------------------------------- - dnl Test for x video sink (video useless without) - dnl ------------------------------------------------------------------- - AM_GST_ELEMENT_CHECK(xvimagesink,[], - [ - wxUSE_GSTREAMER="no" - AC_MSG_WARN([x video sink not found - cannot use GStreamer]) - ]) + GSTREAMER_REQ=$GST_VERSION_MAJOR.$GST_VERSION_MINOR.$GST_VERSION_RELEASE + GST_MAJORMINOR=$GST_VERSION_MAJOR.$GST_VERSION_MINOR - dnl ------------------------------------------------------------------- - dnl Check for gstplay-0.8 lib and corresponding x overlay header - dnl ------------------------------------------------------------------- - AC_CHECK_HEADER(gst/xoverlay/xoverlay.h, [], + if test x$GST_VERSION_MINOR = x8; then + PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR + gstreamer-interfaces-$GST_MAJORMINOR + gstreamer-gconf-$GST_MAJORMINOR, [ - wxUSE_GSTREAMER="no" - AC_MSG_WARN([xoverlay header not found, cannot use GStreamer]) + CPPFLAGS="$GST_CFLAGS $CPPFLAGS" + LIBS="$LIBS $GST_LIBS" ], - [#include ]) - - AC_MSG_CHECKING([for gstplay 0.8]) - WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],gstplay-0.8) - - if test "$ac_find_libraries" = "" ; then - AC_MSG_RESULT([no]) + [ + AC_MSG_WARN([Proper GStreamer .8/.10 installation not found]) wxUSE_GSTREAMER="no" - else - AC_MSG_RESULT([yes]) + ]) fi + if test "$wxUSE_GSTREAMER" = "yes"; then AC_DEFINE(wxUSE_GSTREAMER) AC_MSG_RESULT([GStreamer detection successful]) fi fi + USE_MEDIA=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mediaplayer" AC_DEFINE(wxUSE_MEDIACTRL) fi @@ -6907,7 +6884,6 @@ fi AC_SUBST(CORE_BASE_LIBS) AC_SUBST(CORE_GUI_LIBS) - dnl --------------------------------------------------------------------------- dnl Output the makefiles and such from the results found above dnl --------------------------------------------------------------------------- @@ -6997,7 +6973,7 @@ if test "$wxUSE_GUI" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs drawing \ dynamic erase event exec font image minimal mobile \ mobile/wxedit mobile/styles propsize render \ - richedit rotate shaped vscroll widgets" + rotate shaped vscroll widgets" if test "$wxUSE_MONOLITHIC" != "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS console" @@ -7234,8 +7210,39 @@ if test "$wxUSE_WINE" = "yes"; then 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 "$wxUSE_UNIVERSAL_BINARY" = "yes" ; then + CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 $CXXFLAGS" + CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 $CFLAGS" + LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 $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. + # TODO: how can we avoid a hardwired reference to the SDK, above? (Someone used -lSystemStubs to avoid it) +fi + AC_BAKEFILE([m4_include(autoconf_inc.m4)]) +dnl HACK ALERT!! +dnl For now, we need to alter bk-deps not to generate deps +dnl when we've configured a Universal binary build. +dnl The next version of Bakefile will have the correct fix for this +dnl at which time, this hack can be removed. + +if test "$wxUSE_MAC" = 1 ; then + if test "$wxUSE_UNIVERSAL_BINARY" = "yes" ; then + sed "s/DEPSMODE=gcc/DEPSMODE=none/" < bk-deps > temp + mv temp bk-deps + chmod +x bk-deps + fi +fi + if test "$wxUSE_SHARED" = "yes"; then dnl We get the shared build linker from bakefile, since it