X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3af300180901744729b5a83b26917f52df0c0457..91b073576e8fd216c71acacf5c1495e1a56dd39f:/configure.in diff --git a/configure.in b/configure.in index 4c521d332d..92094c5db2 100644 --- a/configure.in +++ b/configure.in @@ -17,7 +17,7 @@ dnl --------------------------------------------------------------------------- dnl initialization dnl --------------------------------------------------------------------------- -AC_INIT([wxWidgets], [2.6.0], [wx-dev@lists.wxwidgets.org]) +AC_INIT([wxWidgets], [2.6.1], [wx-dev@lists.wxwidgets.org]) dnl the file passed to AC_CONFIG_SRCDIR should be specific to our package AC_CONFIG_SRCDIR([wx-config.in]) @@ -56,7 +56,7 @@ dnl libwx_$(TOOLKIT)-$(WX_RELEASE).so.$(WX_CURRENT).$(WX_REVISION).$(WX_AGE) wx_major_version_number=2 wx_minor_version_number=6 -wx_release_number=0 +wx_release_number=1 wx_subrelease_number=0 WX_RELEASE=$wx_major_version_number.$wx_minor_version_number @@ -66,7 +66,7 @@ WX_SUBVERSION=$WX_VERSION.$wx_subrelease_number WX_MSW_VERSION=$wx_major_version_number$wx_minor_version_number$wx_release_number WX_CURRENT=0 -WX_REVISION=0 +WX_REVISION=1 WX_AGE=0 @@ -288,8 +288,6 @@ case "${host}" in AC_DEFINE(__DOS__) PROGRAM_EXT=".exe" DEFAULT_DEFAULT_wxUSE_MGL=1 - dnl DJGPP needs explicit -lstdc++ for some reason (VS: mayb some versions only?) - LIBS="$LIBS -lstdc++" ;; *-pc-os2_emx | *-pc-os2-emx ) @@ -439,7 +437,6 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_TEXTFILE=no DEFAULT_wxUSE_SOUND=no DEFAULT_wxUSE_MEDIACTRL=no - DEFAULT_wxUSE_DIRECTSHOW=no DEFAULT_wxUSE_INTL=no DEFAULT_wxUSE_CONFIG=no DEFAULT_wxUSE_FONTMAP=no @@ -636,7 +633,6 @@ else DEFAULT_wxUSE_TEXTFILE=yes DEFAULT_wxUSE_SOUND=yes DEFAULT_wxUSE_MEDIACTRL=no - DEFAULT_wxUSE_DIRECTSHOW=no DEFAULT_wxUSE_INTL=yes DEFAULT_wxUSE_CONFIG=yes DEFAULT_wxUSE_FONTMAP=yes @@ -1797,8 +1793,8 @@ dnl SGI/Irix's stdio.h does not include wchar_t. Mac OS X does not provide dnl wchar.h and wchar_t is defined by stdlib.h (GD) AC_CHECK_SIZEOF(wchar_t, 0, [ - /* DJGPP only has fake wchar_t: */ - #ifdef __DJGPP__ + /* DJGPP's wchar_t is now a keyword in C++ (still not C though) */ + #if defined(__DJGPP__) && !( (__GNUC_MINOR__ >= 8 && __GNUC__ == 2 ) || __GNUC__ >= 3 ) # error "fake wchar_t" #endif #ifdef HAVE_WCHAR_H @@ -1813,6 +1809,11 @@ AC_CHECK_SIZEOF(wchar_t, 0, #include ] ) +if test "$ac_cv_sizeof_wchar_t" != "0"; then + wxUSE_WCHAR_T=yes +else + wxUSE_WCHAR_T=no +fi dnl checks needed to define wxVaCopy AC_CACHE_CHECK([for va_copy], @@ -1919,19 +1920,26 @@ AC_CXX_STATIC_CAST dnl we don't use HAVE_DYNAMIC_CAST anywhere right now... dnl AC_CXX_DYNAMIC_CAST -dnl check various STL features -if test "$wxUSE_UNICODE" = "yes" -a \ - \( "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes" \); then +dnl check for std::string or std::wstring +if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then AC_LANG_PUSH(C++) + if test "$wxUSE_UNICODE" = "yes"; then + std_string="std::wstring" + char_type="wchar_t" + else + std_string="std::string" + char_type="char" + fi + dnl check if declares std::wstring - AC_MSG_CHECKING([for std::wstring in ]) + AC_MSG_CHECKING([for $std_string in ]) AC_TRY_COMPILE([#include ], - [std::wstring foo;], + [$std_string foo;], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_STD_WSTRING)], [AC_MSG_RESULT(no) - AC_MSG_CHECKING([if std::basic_string works]) + AC_MSG_CHECKING([if std::basic_string<$char_type> works]) AC_TRY_COMPILE([ #ifdef HAVE_WCHAR_H # ifdef __CYGWIN__ @@ -1945,17 +1953,43 @@ if test "$wxUSE_UNICODE" = "yes" -a \ #include #include ], - [std::basic_string foo; - const wchar_t* dummy = foo.c_str();], + [std::basic_string<$char_type> foo; + const $char_type* dummy = foo.c_str();], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Can't compile without unicode string class])] + if test "$wxUSE_STL" = "yes"; then + AC_MSG_ERROR([Can't use --enable-stl without $std_string or std::basic_string<$char_type>]) + elif grep wxUSE_STD_STRING $wx_arg_cache_file >/dev/null; then + AC_MSG_ERROR([Can't use --enable-std_string without $std_string or std::basic_string<$char_type>]) + else + AC_MSG_WARN([No $std_string or std::basic_string<$char_type>, switching to --disable-std_string]) + wxUSE_STD_STRING=no + fi + ] ) ]) AC_LANG_POP fi +if test "$wxUSE_STD_IOSTREAM" = "yes"; then + AC_LANG_PUSH(C++) + + AC_CHECK_TYPES([std::istream, std::ostream],, + [wxUSE_STD_IOSTREAM=no], + [#include ]) + + if test "$wxUSE_STD_IOSTREAM" != "yes"; then + if grep wxUSE_STD_IOSTREAM $wx_arg_cache_file >/dev/null; then + AC_MSG_ERROR([Can't use --enable-std_iostreams without std::istream and std::ostream]) + else + AC_MSG_WARN([No std::iostreams, switching to --disable-std_iostreams]) + fi + fi + + AC_LANG_POP +fi + if test "$wxUSE_STL" = "yes"; then AC_LANG_PUSH(C++) @@ -2447,6 +2481,17 @@ dnl ------------------------------------------------------------------------ dnl Check for expat libraries dnl ------------------------------------------------------------------------ +if test "$wxUSE_WCHAR_T" != "yes"; then + if test "$wxUSE_EXPAT" != "no"; then + AC_MSG_WARN([wxWidgets requires wchar_t to use expat, disabling]) + wxUSE_EXPAT=no + fi + if test "$wxUSE_XML" != "no"; then + AC_MSG_WARN([wxWidgets requires wchar_t to use xml, disabling]) + wxUSE_XML=no + fi +fi + if test "$wxUSE_EXPAT" != "no"; then wxUSE_XML=yes AC_DEFINE(wxUSE_EXPAT) @@ -3251,7 +3296,7 @@ dnl ---------------------------------------------------------------- IODBC_C_SRC="" -dnl ODBC is handled seperately for MSW +dnl ODBC is handled separately for MSW if test "$TOOLKIT" != "MSW" ; then if test "$wxUSE_ODBC" = "sys" -o "$wxUSE_ODBC" = "yes" ; then @@ -3423,7 +3468,7 @@ if test "$wxUSE_OPENGL" = "yes"; then if test "x$OPENGL_LIBS" = "x"; then dnl it should be an error and not a warning because OpenGL is not on - dnl by default and so if it had been explicitely requested, we + dnl by default and so if it had been explicitly requested, we dnl shouldn't just fall back to compiling the library without it AC_MSG_ERROR(OpenGL libraries not available) fi @@ -3506,8 +3551,10 @@ if test "$wxUSE_SHARED" = "yes"; then ;; powerpc-*-darwin* ) - SAMPLES_RPATH_POSTLINK="\$(top_builddir)change-install-names \$(LIBDIRNAME) \$(prefix) \$@" - cat <change-install-names + install_name_tool=`which install_name_tool` + if test "$install_name_tool" -a -x "$install_name_tool"; then + SAMPLES_RPATH_POSTLINK="\$(top_builddir)change-install-names \$(LIBDIRNAME) \$(prefix) \$@" + cat <change-install-names #!/bin/sh libnames=\`cd \${1} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\` inst_cmd="install_name_tool " @@ -3516,7 +3563,8 @@ for i in \${libnames} ; do done \${inst_cmd} \${3} EOF - chmod +x change-install-names + chmod +x change-install-names + fi ;; *-*-cygwin* | *-*-mingw32* ) @@ -3764,7 +3812,7 @@ dnl Check for functions dnl --------------------------------------------------------------------------- dnl don't check for wchar_t functions if we haven't got wchar_t itself -if test "$ac_cv_sizeof_wchar_t" != "0"; then +if test "$wxUSE_WCHAR_T" = "yes"; then AC_DEFINE(wxUSE_WCHAR_T) dnl check for wcslen in all possible places @@ -4612,7 +4660,9 @@ fi if test "$wxUSE_DEBUG_GDB" = "yes" ; then wxUSE_DEBUG_INFO=yes - WXDEBUG="-ggdb" + if test "$GCC" = yes; then + WXDEBUG="-ggdb" + fi fi if test "$wxUSE_DEBUG_FLAG" = "yes" ; then @@ -4632,7 +4682,7 @@ if test "$wxUSE_MEM_TRACING" = "yes" ; then fi if test "$wxUSE_DMALLOC" = "yes" ; then - DMALLOC_LIBS="-ldmalloc" + DMALLOC_LIBS="-ldmallocthcxx" fi PROFILE= @@ -4856,13 +4906,15 @@ if test "$wxUSE_TIMER" = "yes"; then AC_DEFINE(wxUSE_TIMER) fi +dnl Unix implementation needs additional checks because audio support +dnl comes in many favours: +if test "$USE_UNIX" = "1" ; then + AC_CHECK_HEADERS([sys/soundcard.h],, + [DISABLED_CONTRIB="$DISABLED_CONTRIB mmedia"]) +fi WITH_PLUGIN_SDL=0 if test "$wxUSE_SOUND" = "yes"; then - dnl Unix implementation needs additional checks because audio support - dnl comes in many favours: if test "$USE_UNIX" = "1" ; then - AC_CHECK_HEADERS([sys/soundcard.h]) - if test "$wxUSE_LIBSDL" != "no"; then AM_PATH_SDL([1.2.0], [ @@ -4945,7 +4997,12 @@ if test "$wxUSE_ZIPSTREAM" = "yes"; then fi if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then - AC_DEFINE(wxUSE_ON_FATAL_EXCEPTION) + if test "$USE_UNIX" != 1; then + AC_MSG_WARN([Catching fatal exceptions not currently supported on this system, wxApp::OnFatalException will not be called]) + wxUSE_ON_FATAL_EXCEPTION=no + else + AC_DEFINE(wxUSE_ON_FATAL_EXCEPTION) + fi fi if test "$wxUSE_STACKWALKER" = "yes"; then @@ -4953,8 +5010,8 @@ if test "$wxUSE_STACKWALKER" = "yes"; then fi if test "$wxUSE_DEBUGREPORT" = "yes"; then - if test "$USE_OS2" = "1"; then - AC_MSG_WARN([Creating debug reports not supported under OS/2 yet, disabled]) + if test "$USE_UNIX" != "1" -a "$USE_WIN32" != "1"; then + AC_MSG_WARN([Creating debug reports not currently supported on this system, disabled]) wxUSE_DEBUGREPORT=no else AC_DEFINE(wxUSE_DEBUGREPORT) @@ -6168,24 +6225,6 @@ dnl wxMediaCtrl dnl --------------------------------------------------------------------------- if test "$wxUSE_MEDIACTRL" = "yes"; then - if test "$wxUSE_MSW" = 1; then - dnl ----------------------------------------------------------------------- - dnl DirectShow MSW - dnl ----------------------------------------------------------------------- - wxUSE_DIRECTSHOW="yes" - AC_CHECK_HEADERS([dshow.h], [], - [ - wxUSE_DIRECTSHOW="no" - AC_MSG_WARN([DirectShow not installed; consider installing the DirectX7 SDK or higher]) - ], - [#include ]) - - if test "$wxUSE_DIRECTSHOW" = "yes"; then - AC_DEFINE(wxUSE_DIRECTSHOW) - LIBS="$LIBS -lstrmiids" - fi - fi - dnl ----------------------------------------------------------------------- dnl GStreamer dnl ----------------------------------------------------------------------- @@ -6350,8 +6389,6 @@ if test "$wxUSE_MAC" = 1 ; then else LDFLAGS="$LDFLAGS -lCarbonLib" fi -elif test "$USE_DARWIN" = 1; then - LDFLAGS="$LDFLAGS -framework IOKit -framework CoreServices -framework System" fi if test "$wxUSE_COCOA" = 1 ; then LDFLAGS="$LDFLAGS -framework IOKit -framework Cocoa" @@ -6359,6 +6396,9 @@ if test "$wxUSE_COCOA" = 1 ; then LDFLAGS="$LDFLAGS -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" +fi dnl FIXME: should this be covered by the conditional above dnl given the -lm comment there? Or should that comment (and @@ -6615,8 +6655,16 @@ case "$TOOLKIT" in ;; esac +if test "$wxUSE_WINE" = "yes"; then + BAKEFILE_FORCE_PLATFORM=win32 +fi + AC_BAKEFILE([m4_include(autoconf_inc.m4)]) +if test "$wxUSE_WINE" = "yes"; then + RESCOMP=wrc +fi + if test "$wxUSE_SHARED" = "yes"; then dnl We get the shared build linker from bakefile, since it @@ -6855,8 +6903,14 @@ for subdir in `echo $SUBDIRS`; do makefiles="samples/$sample/Makefile.in $makefiles" fi done - else dnl assume that everything compiles for utils &c - makefiles=`(cd $srcdir ; find $subdir -name Makefile.in)` + else + dnl assume that everything compiles for utils &c + dnl any that shouldn't be built can be added to + dnl DISABLED_UTILS, DISABLED_CONTRIB or DISABLED_DEMOS + disabled_var=DISABLED_`echo $subdir | tr [[a-z]] [[A-Z]]`; + eval "disabled=\$$disabled_var" + disabled=/`echo X $disabled | sed 's@ @/|/@g'`/ + makefiles=`(cd $srcdir ; find $subdir -name Makefile.in) | egrep -v "$disabled"` fi else dnl we build wxBase only dnl don't take all samples/utils, just those which build with