X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5cfbef2a6908c24438b716c79da4981954779f69..caac7804114079a6ab0dcf1a6c15f9fd8340e4a0:/configure.in?ds=sidebyside diff --git a/configure.in b/configure.in index 4d24aba9d6..9c13d6a5d0 100644 --- a/configure.in +++ b/configure.in @@ -94,13 +94,14 @@ NEEDS_D_REENTRANT_FOR_R_FUNCS=0 dnl the list of all available toolkits dnl dnl update NUM_TOOLKITS calculation below when adding a new toolkit here! -ALL_TOOLKITS="COCOA GTK MAC MGL MICROWIN MOTIF MSW PM X11 DFB" +ALL_TOOLKITS="COCOA GTK OSX_CARBON OSX_COCOA 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_GTK=0 -DEFAULT_wxUSE_MAC=0 +DEFAULT_wxUSE_OSX_CARBON=0 +DEFAULT_wxUSE_OSX_COCOA=0 DEFAULT_wxUSE_MGL=0 DEFAULT_wxUSE_MICROWIN=0 DEFAULT_wxUSE_MOTIF=0 @@ -114,7 +115,8 @@ dnl they're used if no --with- options were given to detect the dnl toolkit to use by default for the target platform DEFAULT_DEFAULT_wxUSE_COCOA=0 DEFAULT_DEFAULT_wxUSE_GTK=0 -DEFAULT_DEFAULT_wxUSE_MAC=0 +DEFAULT_DEFAULT_wxUSE_OSX_CARBON=0 +DEFAULT_DEFAULT_wxUSE_OSX_COCOA=0 DEFAULT_DEFAULT_wxUSE_MGL=0 DEFAULT_DEFAULT_wxUSE_MICROWIN=0 DEFAULT_DEFAULT_wxUSE_MOTIF=0 @@ -124,7 +126,6 @@ DEFAULT_DEFAULT_wxUSE_X11=0 DEFAULT_DEFAULT_wxUSE_DFB=0 PROGRAM_EXT= -SO_SUFFIX=so SAMPLES_RPATH_FLAG= SAMPLES_RPATH_POSTLINK= @@ -139,7 +140,6 @@ case "${host}" in USE_HPUX=1 DEFAULT_DEFAULT_wxUSE_MOTIF=1 NEEDS_D_REENTRANT_FOR_R_FUNCS=1 - SO_SUFFIX=sl AC_DEFINE(__HPUX__) dnl many standard declarations in HP-UX headers are only included if either @@ -243,12 +243,6 @@ case "${host}" in USE_AIX=1 USE_SYSV=1 USE_SVR4=1 - dnl quoting from http://www-1.ibm.com/servers/esdd/articles/gnu.html: - dnl - dnl Both archive libraries and shared libraries on AIX have an .a - dnl extension. This will explain why you can't link with an .so and - dnl why it works with the name changed to .a. - SO_SUFFIX=a AC_DEFINE(__AIX__) AC_DEFINE(__SYSV__) AC_DEFINE(__SVR4__) @@ -266,7 +260,6 @@ case "${host}" in dnl MBN: some of the defines have been moved after toolkit detection dnl because for wxMotif/wxGTK/wxX11 to build on Cygwin dnl USE_UNIX must be set and not USE_WIN32 - SO_SUFFIX=dll PROGRAM_EXT=".exe" DEFAULT_DEFAULT_wxUSE_MSW=1 ;; @@ -317,11 +310,10 @@ case "${host}" in dnl Darwin based distributions (including Mac OS X) USE_BSD=1 USE_DARWIN=1 - SO_SUFFIX=dylib AC_DEFINE(__BSD__) AC_DEFINE(__DARWIN__) AC_DEFINE(TARGET_CARBON) - DEFAULT_DEFAULT_wxUSE_MAC=1 + DEFAULT_DEFAULT_wxUSE_OSX_CARBON=1 DEFAULT_STD_FLAG=no ;; powerpc-apple-macos* ) @@ -330,10 +322,9 @@ case "${host}" in dnl For some reason the test that should be cross-compiler capable fails dnl However, there is no doubt that MacOS PowerPC is big endian. ac_cv_c_bigendian=yes - SO_SUFFIX=shlib dnl AC_DEFINE(TARGET_CARBON) dnl platform.h needs TARGET_CARBON before setup.h, we'll add it to CPPFLAGS - DEFAULT_DEFAULT_wxUSE_MAC=1 + DEFAULT_DEFAULT_wxUSE_OSX_CARBON=1 DEFAULT_STD_FLAG=no ;; @@ -454,7 +445,9 @@ dnl we use AC_ARG_WITH and not WX_ARG_WITH for the toolkit options as they 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(mac, [ --with-mac use Mac OS X], [wxUSE_MAC="$withval" CACHE_MAC=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(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]) @@ -473,6 +466,8 @@ dnl we have a default one AC_MSG_CHECKING(for toolkit) + + # In Wine, we need to default to MSW, not GTK or MOTIF if test "$wxUSE_WINE" = "yes"; then DEFAULT_DEFAULT_wxUSE_GTK=0 @@ -515,9 +510,9 @@ if test "$wxUSE_GUI" = "yes"; then 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_MAC:-0} \ - + ${wxUSE_MGL:-0} + ${wxUSE_DFB:-0} + ${wxUSE_MICROWIN:-0} \ - + ${wxUSE_MOTIF:-0} + ${wxUSE_MSW:-0} + ${wxUSE_X11:-0}` + NUM_TOOLKITS=`expr ${wxUSE_COCOA:-0} + ${wxUSE_GTK:-0} + ${wxUSE_OSX_CARBON:-0} \ + + ${wxUSE_OSX_COCOA:-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. case "${host}" in @@ -558,6 +553,11 @@ else fi fi +wxUSE_MAC=0 +if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1; then + wxUSE_MAC=1 +fi + dnl --------------------------------------------------------------------------- dnl external libraries dnl --------------------------------------------------------------------------- @@ -602,7 +602,6 @@ dnl global compile options dnl --------------------------------------------------------------------------- WX_ARG_DISABLE(shared, [ --disable-shared create static library instead of shared], wxUSE_SHARED) -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) @@ -610,7 +609,7 @@ WX_ARG_ENABLE(std_string, [ --enable-std_string use standard C++ string WX_ARG_DISABLE(unicode, [ --disable-unicode compile without Unicode support], wxUSE_UNICODE) WX_ARG_ENABLE(mslu, [ --enable-mslu use MS Layer for Unicode on Windows 9x (Win32 only)], wxUSE_UNICODE_MSLU) WX_ARG_ENABLE_PARAM(utf8, [ --enable-utf8 use UTF-8 representation for strings (Unix only)], wxUSE_UNICODE_UTF8) -WX_ARG_ENABLE(utf8only, [ --enable-utf8only only support UTF-8 locales in UTF-8 build (Unix only)], wxUSE_UNICODE_UTF8_LOCALE) +WX_ARG_ENABLE(utf8only, [ --enable-utf8only only support UTF-8 locales in UTF-8 build (Unix only)], wxUSE_UNICODE_UTF8_LOCALE) WX_ARG_ENABLE(extended_rtti, [ --enable-extended_rtti use extended RTTI (XTI)], wxUSE_EXTENDED_RTTI) if test "$USE_OS2" = 1; then DEFAULT_wxUSE_OMF=no @@ -639,6 +638,17 @@ if test "$wxUSE_DEBUG_FLAG" = "yes" -a "$wxUSE_DEBUG_INFO" = "yes"; then BUILD=debug fi +dnl disable optimizations by default if --enable-debug was used but leave them +dnl enabled if just --enable-debug_{flag,info} was +dnl +dnl in any case, only set the default value and allow overriding it with an +dnl explicit --enable-optimise +if test "$wxUSE_DEBUG" = "yes"; then + DEFAULT_wxUSE_OPTIMISE=no +fi + +WX_ARG_DISABLE(optimise, [ --disable-optimise compile without optimisations], wxUSE_OPTIMISE) + WX_ARG_ENABLE(debug_gdb, [ --enable-debug_gdb create code with extra GDB debugging information], wxUSE_DEBUG_GDB) WX_ARG_ENABLE(debug_cntxt, [ --enable-debug_cntxt use wxDebugContext], wxUSE_DEBUG_CONTEXT) WX_ARG_ENABLE(mem_tracing, [ --enable-mem_tracing create code with memory tracing], wxUSE_MEM_TRACING) @@ -719,7 +729,6 @@ WX_ARG_FEATURE(textbuf, [ --enable-textbuf use wxTextBuffer class] WX_ARG_FEATURE(textfile, [ --enable-textfile use wxTextFile class], wxUSE_TEXTFILE) WX_ARG_FEATURE(timer, [ --enable-timer use wxTimer class], wxUSE_TIMER) WX_ARG_FEATURE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT) -WX_ARG_FEATURE(weakref, [ --enable-weakref make wxEvtHandler trackable with wxWeakRef<>], wxUSE_WEAKREF) WX_ARG_FEATURE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM) dnl URL-related classes @@ -747,6 +756,7 @@ WX_ARG_FEATURE(html, [ --enable-html use wxHTML sub-library], WX_ARG_FEATURE(htmlhelp, [ --enable-htmlhelp use wxHTML-based help], wxUSE_WXHTML_HELP) WX_ARG_FEATURE(xrc, [ --enable-xrc use XRC resources sub-library], wxUSE_XRC) WX_ARG_FEATURE(aui, [ --enable-aui use AUI docking library], wxUSE_AUI) +WX_ARG_FEATURE(propgrid, [ --enable-propgrid use wxPropertyGrid library], wxUSE_PROPGRID) WX_ARG_FEATURE(stc, [ --enable-stc use wxStyledTextCtrl library], wxUSE_STC) WX_ARG_FEATURE(constraints, [ --enable-constraints use layout-constraints system], wxUSE_CONSTRAINTS) WX_ARG_FEATURE(loggui, [ --enable-loggui use standard GUI logger], wxUSE_LOGGUI) @@ -1664,76 +1674,79 @@ fi fi dnl wxUSE_VARARG_MACROS == yes + dnl check for large file support +LARGEFILE_CPPFLAGS= AC_SYS_LARGEFILE +if test "$ac_cv_sys_file_offset_bits" = "64"; then + LARGEFILE_CPPFLAGS="-D_FILE_OFFSET_BITS=64" +elif test "$ac_cv_sys_large_files" = 1; then + LARGEFILE_CPPFLAGS="-D_LARGE_FILES" +fi dnl we need to define _FILE_OFFSET_BITS or _LARGE_FILES on the compiler command dnl line because otherwise the system headers risk being included before dnl wx/defs.h which defines these constants leading to inconsistent dnl sizeof(off_t) in different source files of the same program and linking dnl problems -if test "x$wx_largefile" = "xyes"; then - if test "x$ac_cv_sys_file_offset_bits" = "x64"; then - WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" - - dnl We get "Large Files (ILP32) not supported in strict ANSI mode." - dnl #error from HP standard headers unless __STDC_EXT__ is defined. - dnl The compiler should define it automatically, but some old g++ - dnl versions don't define it, so test and add it if necessary. AFAIK - dnl the problem only affects the C++ compiler so it is added to - dnl CXXFLAGS only. - if test "$USE_HPUX" = 1 -a "$GXX" = "yes"; then - AC_CACHE_CHECK( - [if -D__STDC_EXT__ is required], - wx_cv_STDC_EXT_required, - [ - AC_LANG_PUSH(C++) - AC_TRY_COMPILE( - [], - [ - #ifndef __STDC_EXT__ - choke me - #endif - ], - wx_cv_STDC_EXT_required=no, - wx_cv_STDC_EXT_required=yes - ) - AC_LANG_POP() - ] - ) - if test "x$wx_cv_STDC_EXT_required" = "xyes"; then - WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -D__STDC_EXT__" - fi +if test -n "$LARGEFILE_CPPFLAGS"; then + WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS $LARGEFILE_CPPFLAGS" + + dnl We get "Large Files (ILP32) not supported in strict ANSI mode." + dnl #error from HP standard headers unless __STDC_EXT__ is defined. + dnl The compiler should define it automatically, but some old g++ + dnl versions don't define it, so test and add it if necessary. AFAIK + dnl the problem only affects the C++ compiler so it is added to + dnl CXXFLAGS only. + if test "$USE_HPUX" = 1 -a "$GXX" = "yes"; then + AC_CACHE_CHECK( + [if -D__STDC_EXT__ is required], + wx_cv_STDC_EXT_required, + [ + AC_LANG_PUSH(C++) + AC_TRY_COMPILE( + [], + [ + #ifndef __STDC_EXT__ + choke me + #endif + ], + wx_cv_STDC_EXT_required=no, + wx_cv_STDC_EXT_required=yes + ) + AC_LANG_POP() + ] + ) + if test "x$wx_cv_STDC_EXT_required" = "xyes"; then + WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -D__STDC_EXT__" fi - else - WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGE_FILES" - fi - dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source - AC_FUNC_FSEEKO - if test "$ac_cv_sys_largefile_source" != no; then - WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source" fi fi +dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source +dnl +dnl it may be affected by large file flags (this happens under HP-UX 11 for +dnl example) so set them before using it and also use C++ to ensure that we get +dnl errors, not warnings, about the missing functions +AC_LANG_PUSH(C++) +old_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LARGEFILE_CPPFLAGS" +AC_FUNC_FSEEKO +CPPFLAGS="$old_CPPFLAGS" +AC_LANG_POP() +if test "$ac_cv_sys_largefile_source" != no; then + WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source" +fi + dnl check for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling) WX_C_BIGENDIAN dnl check for iostream (as opposed to iostream.h) standard header WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH)) -dnl check whether C++ compiler supports bool built-in type -WX_CPP_BOOL - dnl check whether C++ compiler supports explicit keyword WX_CPP_EXPLICIT -dnl check whether C++ compiler supports C++ casts -AC_CXX_CONST_CAST -AC_CXX_REINTERPRET_CAST -AC_CXX_STATIC_CAST -dnl we don't use HAVE_DYNAMIC_CAST anywhere right now... -dnl AC_CXX_DYNAMIC_CAST - dnl With Sun CC, temporaries have block scope by default. This flag is needed dnl to get the expression scope behaviour that conforms to the standard. if test "x$SUNCXX" = xyes; then @@ -1773,7 +1786,11 @@ fi if test "x$HPCXX" = "xyes"; then dnl 2340: "value copied to temporary, reference to temporary used": very dnl painful as triggered by any occurrence of user-defined conversion - CXXFLAGS="+W 2340 $CXXFLAGS" + dnl 4232: "conversion from 'Foo *' to a more strictly aligned type 'Bar *' + dnl may cause misaligned access": this might indicate a real problem + dnl but any use of GTK+ cast macros results in it so it's unusable + dnl for wxGTK code + CXXFLAGS="+W 2340,4232 $CXXFLAGS" fi dnl DEC/Compaq/HP cxx warnings @@ -1915,45 +1932,89 @@ if test "$wxUSE_STL" = "yes"; then AC_DEFINE(HAVE_STD_STRING_COMPARE) fi - dnl check for hash_map and hash_set headers - AC_CHECK_HEADER([hash_map], - [AC_CACHE_CHECK([for standard hash_map and hash_set], - wx_cv_class_stdhashmapset, - [AC_TRY_COMPILE([#include - #include ], - [std::hash_map, std::equal_to > test1; - std::hash_set, std::equal_to > test2;], - wx_cv_class_stdhashmapset=yes, - wx_cv_class_stdhashmapset=no) - ] - )], - [], - [ ] - ) - - if test "$wx_cv_class_stdhashmapset" = yes; then - AC_DEFINE(HAVE_HASH_MAP) - AC_DEFINE(HAVE_STD_HASH_MAP) + if test "$wx_cv_class_gnuhashmapset" = yes; then + AC_DEFINE(HAVE_EXT_HASH_MAP) + AC_DEFINE(HAVE_GNU_CXX_HASH_MAP) fi - AC_CHECK_HEADER([ext/hash_map], - [AC_CACHE_CHECK([for GNU hash_map and hash_set], - wx_cv_class_gnuhashmapset, - [AC_TRY_COMPILE([#include - #include ], - [__gnu_cxx::hash_map, std::equal_to > test1; - __gnu_cxx::hash_set, std::equal_to > test2;], - wx_cv_class_gnuhashmapset=yes, - wx_cv_class_gnuhashmapset=no) + AC_CHECK_HEADER([unordered_map], + [AC_CACHE_CHECK([for unordered_map and unordered_set in std], + wx_cv_class_stdunorderedmapset, + [AC_TRY_COMPILE([#include + #include ], + [std::unordered_map test1; + std::unordered_set test2;], + wx_cv_class_stdunorderedmapset=yes, + wx_cv_class_stdunorderedmapset=no) ] )], [], [ ] ) - if test "$wx_cv_class_gnuhashmapset" = yes; then - AC_DEFINE(HAVE_EXT_HASH_MAP) - AC_DEFINE(HAVE_GNU_CXX_HASH_MAP) + if test "$wx_cv_class_stdunorderedmapset" = yes; then + AC_DEFINE(HAVE_STD_UNORDERED_MAP) + AC_DEFINE(HAVE_STD_UNORDERED_SET) + else + AC_CHECK_HEADER([tr1/unordered_map], + [AC_CACHE_CHECK([for unordered_map and unordered_set in std::tr1], + wx_cv_class_tr1unorderedmapset, + [AC_TRY_COMPILE([#include + #include ], + [std::tr1::unordered_map test1; + std::tr1::unordered_set test2; + #if defined(__GNUC__) && (__GNUC__==4) && (__GNUC_MINOR__<2) + #error can't use unordered_{map,set} with gcc-4.[01]: http://gcc.gnu.org/PR24389 + #endif], + wx_cv_class_tr1unorderedmapset=yes, + wx_cv_class_tr1unorderedmapset=no) + ] + )], + [], + [ ] + ) + + if test "$wx_cv_class_tr1unorderedmapset" = yes; then + AC_DEFINE(HAVE_TR1_UNORDERED_MAP) + AC_DEFINE(HAVE_TR1_UNORDERED_SET) + else + dnl check for hash_map and hash_set headers + AC_CHECK_HEADER([hash_map], + [AC_CACHE_CHECK([for std::hash_map and hash_set], + wx_cv_class_stdhashmapset, + [AC_TRY_COMPILE([#include + #include ], + [std::hash_map, std::equal_to > test1; + std::hash_set, std::equal_to > test2;], + wx_cv_class_stdhashmapset=yes, + wx_cv_class_stdhashmapset=no) + ] + )], + [], + [ ] + ) + + if test "$wx_cv_class_stdhashmapset" = yes; then + AC_DEFINE(HAVE_HASH_MAP) + AC_DEFINE(HAVE_STD_HASH_MAP) + fi + + AC_CHECK_HEADER([ext/hash_map], + [AC_CACHE_CHECK([for GNU hash_map and hash_set], + wx_cv_class_gnuhashmapset, + [AC_TRY_COMPILE([#include + #include ], + [__gnu_cxx::hash_map, std::equal_to > test1; + __gnu_cxx::hash_set, std::equal_to > test2;], + wx_cv_class_gnuhashmapset=yes, + wx_cv_class_gnuhashmapset=no) + ] + )], + [], + [ ] + ) + + fi fi fi @@ -1979,6 +2040,10 @@ dnl In the same vein. Motif 2.1 should be tried before Motif 1.2 for the dnl systems which have both (AIX 4.x does) SEARCH_INCLUDE="\ /usr/local/include \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + /usr/local/X11R6/include \ + /usr/local/include/X11R6 \ \ /usr/Motif-2.1/include \ /usr/Motif-1.2/include \ @@ -1991,29 +2056,25 @@ SEARCH_INCLUDE="\ \ /usr/X11R6/include \ /usr/X11R6.4/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ \ /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ \ /usr/X11/include \ /usr/include/X11 \ - /usr/local/X11/include \ - /usr/local/include/X11 \ \ /usr/XFree86/include/X11 \ /usr/pkg/include \ \ + /usr/local/X1R5/include \ + /usr/local/include/X11R5 \ + /usr/X11R5/include \ + /usr/include/X11R5 \ + \ + /usr/local/X11R4/include \ + /usr/local/include/X11R4 \ + /usr/X11R4/include \ + /usr/include/X11R4 \ + \ /usr/openwin/share/include" dnl try to find out the standard lib locations for the systems with multiple @@ -2642,8 +2703,15 @@ if test "$USE_WIN32" = 1 ; then dnl --- FIXME: This is still a somewhat random list of libs, dnl --- some of them should probably be included conditionally. - LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32" - + case "${host}" in + x86_64-*-mingw32* ) + dnl --- For mingw-w64 lctl3d32's name has changed + LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lwctl3d32 -ladvapi32 -lwsock32 -lgdi32" + ;; + * ) + LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32" + ;; + esac if test "$wxUSE_ACCESSIBILITY" = "yes" ; then LIBS="$LIBS -loleacc" fi @@ -3346,7 +3414,7 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config fi fi - if test "$wxUSE_MAC" = 1; then + if test "$wxUSE_OSX_CARBON" = 1; then AC_MSG_CHECKING([for compiler syntax to enable Pascal strings]) if test "$GCC" = yes; then AC_MSG_RESULT([gcc]) @@ -3365,14 +3433,19 @@ 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 - TOOLKIT=MAC + TOOLKIT=OSX_CARBON dnl we can't call this MAC_DIST or autoconf thinks its a macro - GUIDIST=MACX_DIST + GUIDIST=OSX_CARBON_DIST dnl wxMac version of wxBase and wxCocoa or wxBase-only built on Darwin dnl are different, so they need different names: WXBASEPORT="_carbon" fi + if test "$wxUSE_OSX_COCOA" = 1; then + TOOLKIT=OSX_COCOA + GUIDIST=OSX_COCOA_DIST + fi + if test "$wxUSE_COCOA" = 1; then TOOLKIT=COCOA GUIDIST=COCOA_DIST @@ -3560,7 +3633,7 @@ if test "$wxUSE_OPENGL" = "yes"; then if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = 1; then AC_MSG_WARN([wxGLCanvas not implemented for this port, library will be compiled without it.]) wxUSE_OPENGL="no" - elif test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then + elif test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_COCOA" = 1; then OPENGL_LIBS="-framework OpenGL -framework AGL" elif test "$wxUSE_MSW" = 1; then OPENGL_LIBS="-lopengl32 -lglu32" @@ -4182,8 +4255,9 @@ if test "$ac_cv_func_vsscanf" = "yes"; then #endif ], [ - char *buf, *parse; - vsscanf(buf, "%s", parse); + char *buf; + va_list args; + vsscanf(buf, "%s", args); ], wx_cv_func_vsscanf_decl=yes, wx_cv_func_vsscanf_decl=no @@ -4924,12 +4998,57 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then AC_MSG_WARN([wxMutex won't be recursive on this platform]) fi fi + + dnl test for compiler thread-specific variables support + AC_CACHE_CHECK([for __thread keyword], + wx_cv_cc___thread, + [ + AC_TRY_COMPILE([#include ], + [ + static __thread int n = 0; + static __thread int *p = 0; + ], + wx_cv_cc___thread=yes, + wx_cv_cc___thread=no + ) + ] + ) + + if test "$wx_cv_cc___thread" = "yes"; then + AX_GXX_VERSION + if test -n "$ax_cv_gxx_version"; then + dnl g++ supports __thread since at least version 3.3 but its support + dnl seems to be broken until 4.1, see + dnl http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/108388 + dnl + dnl NB: we still need to test __thread support with + dnl AC_TRY_COMPILE above even for g++ 4 as it doesn't + dnl support it for all architectures (e.g. it doesn't + dnl work under OS X) + AC_MSG_CHECKING([whether __thread support in g++ is usable]) + case "$ax_cv_gxx_version" in + 1.* | 2.* | 3.* ) + AC_MSG_RESULT([no, it's broken]) + wx_cv_cc___thread=no + ;; + *) + AC_MSG_RESULT([yes, it works]) + ;; + esac + fi + fi + + if test "$wx_cv_cc___thread" = "yes"; then + AC_DEFINE(HAVE___THREAD_KEYWORD) + fi fi dnl from if !MSW else if test "$wxUSE_THREADS" = "yes" ; then case "${host}" in + x86_64-*-mingw32* ) + ;; *-*-mingw32* ) dnl check if the compiler accepts -mthreads AC_CACHE_CHECK([if compiler supports -mthreads], @@ -5036,7 +5155,6 @@ dnl compilers: we'd need a separate DEBUG_CXXFLAGS if this is ever not the case) DEBUG_CFLAGS= if test "$wxUSE_DEBUG_INFO" = "yes" ; then DEBUG_CFLAGS="-g" - wxUSE_OPTIMISE=no fi if test "$wxUSE_DEBUG_GDB" = "yes" ; then @@ -5596,7 +5714,7 @@ if test "$wxUSE_INTL" = "yes" ; then fi fi -if test "$wxUSE_XLOCALE" == "yes" ; then +if test "$wxUSE_XLOCALE" = "yes" ; then AC_DEFINE(wxUSE_XLOCALE) AC_CHECK_TYPES(locale_t,,, [#include @@ -6098,10 +6216,6 @@ if test "$wxUSE_VARIANT" = "yes"; then AC_DEFINE(wxUSE_VARIANT) fi -if test "$wxUSE_WEAKREF" = "yes"; then - AC_DEFINE(wxUSE_WEAKREF) -fi - if test "$wxUSE_FS_INET" = "yes"; then AC_DEFINE(wxUSE_FS_INET) fi @@ -6118,7 +6232,7 @@ if test "$wxUSE_GUI" = "yes" -a "$wxUSE_JOYSTICK" = "yes"; then wxUSE_JOYSTICK=yes dnl mac only available on darwin - elif test "$TOOLKIT" = "MAC" -o "$TOOLKIT" = "COCOA"; then + elif test "$TOOLKIT" = "OSX" -o "$TOOLKIT" = "COCOA"; then if test "$USE_DARWIN" = 1; then dnl check for a bug in the headers, some have bad setEventCallout AC_MSG_CHECKING([headers have declarations needed for joystick support]) @@ -6217,9 +6331,6 @@ fi if test "$wxUSE_DOC_VIEW_ARCHITECTURE" = "yes" ; then AC_DEFINE(wxUSE_DOC_VIEW_ARCHITECTURE) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docview" - if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docvwmdi" - fi fi if test "$wxUSE_HELP" = "yes"; then @@ -6799,9 +6910,6 @@ if test "$wxUSE_HTML" = "yes"; then AC_DEFINE(wxUSE_HTML) USE_HTML=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox" - if test "$wxUSE_MAC" = 1; then - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/htmlctrl" - fi fi if test "$wxUSE_WEBKIT" = "yes"; then if test "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then @@ -6826,6 +6934,9 @@ if test "$wxUSE_WEBKIT" = "yes"; then else wxUSE_WEBKIT=no fi + if test "$wxUSE_WEBKIT" = "yes"; then + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/htmlctrl" + fi fi USE_XRC=0 @@ -6847,6 +6958,13 @@ if test "$wxUSE_AUI" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS aui" fi +USE_PROPGRID=0 +if test "$wxUSE_PROPGRID" = "yes"; then + AC_DEFINE(wxUSE_PROPGRID) + USE_PROPGRID=1 + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS propgrid" +fi + USE_STC=0 if test "$wxUSE_STC" = "yes"; then AC_DEFINE(wxUSE_STC) @@ -7072,6 +7190,10 @@ dnl --------------------------------------------------------------------------- dnl wxGraphicsContext dnl --------------------------------------------------------------------------- +if test "$wxUSE_MAC" = 1; then + 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) @@ -7224,6 +7346,12 @@ if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_AUI" = "yes" ; then BUILT_WX_LIBS="aui $BUILT_WX_LIBS" fi + if test "$wxUSE_PROPGRID" = "yes" ; then + BUILT_WX_LIBS="propgrid $BUILT_WX_LIBS" + fi + if test "$wxUSE_RICHTEXT" = "yes" ; then + BUILT_WX_LIBS="richtext $BUILT_WX_LIBS" + fi if test "$wxUSE_STC" = "yes" ; then BUILT_WX_LIBS="stc $BUILT_WX_LIBS" fi @@ -7248,14 +7376,10 @@ if test "$wxUSE_MAC" = 1 ; then if test "$wxUSE_SOUND" = "yes" || test "$wxUSE_MEDIACTRL" = "yes"; then if test "$USE_DARWIN" = 1; then LDFLAGS="$LDFLAGS -framework QuickTime" - else - LDFLAGS="$LDFLAGS -lQuickTimeLib" fi fi if test "$USE_DARWIN" = 1; then - LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System" - else - LDFLAGS="$LDFLAGS -lCarbonLib" + LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL" fi fi if test "$wxUSE_COCOA" = 1 ; then @@ -7310,14 +7434,14 @@ dnl check for icc before gcc as icc is also recognized as gcc if test "x$INTELCC" = "xyes" ; then dnl Warnings which can't be easily suppressed in C code are disabled: dnl - dnl remark #810: conversion from "x" to "y" may lose significant bits - dnl remark #869: parameter "foo" was never referenced - dnl remark #1572: floating-point equality and inequality comparisons - dnl are unreliable - dnl remark #1684: conversion from pointer to same-sized integral type - dnl - dnl (for others see below) - CWARNINGS="-Wall -wd810,869,981,1418,1572,1684" + dnl #810: conversion from "x" to "y" may lose significant bits + dnl #869: parameter "foo" was never referenced + dnl #1572: floating-point equality and inequality comparisons + dnl are unreliable + dnl #1684: conversion from pointer to same-sized integral type + dnl #2259: non-pointer conversion from "x" to "y" may lose significant + dnl bits + CWARNINGS="-Wall -wd810,869,981,1418,1572,1684,2259" elif test "$GCC" = yes ; then CWARNINGS="-Wall -Wundef" fi @@ -7329,18 +7453,19 @@ if test "x$INTELCXX" = "xyes" ; then dnl (279) are generated for standard macros and so there is nothing we can dnl do about them dnl - dnl remark #279: controlling expression is constant - dnl remark #383: value copied to temporary, reference to temporary used - dnl remark #444: destructor for base class "xxx" is not virtual - dnl remark #810: conversion from "x" to "y" may lose significant bits - dnl remark #869: parameter "foo" was never referenced - dnl remark #981: operands are evaluated in unspecified order - dnl remark #1418: external definition with no prior declaration - dnl remark #1419: external declaration in primary source file - CXXWARNINGS="-Wall -wd279,383,444,810,869,981,1418,1419" + dnl #279: controlling expression is constant + dnl #383: value copied to temporary, reference to temporary used + dnl #444: destructor for base class "xxx" is not virtual + dnl #981: operands are evaluated in unspecified order + dnl #1418: external definition with no prior declaration + dnl #1419: external declaration in primary source file + dnl #1881: argument must be a constant null pointer value + dnl + dnl (for others see CWARNINGS above) + CXXWARNINGS="-Wall -wd279,383,444,810,869,981,1418,1419,1881,2259" elif test "$GXX" = yes ; then - dnl CXXWARNINGS="-Wall -W -Wcast-qual -Werror" CXXWARNINGS="-Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy" + AX_CXXFLAGS_GCC_OPTION(-Woverloaded-virtual, CXXWARNINGS) fi @@ -7504,7 +7629,19 @@ AC_SUBST(UNICODE) AC_SUBST(BUILD) AC_SUBST(DEBUG_INFO) AC_SUBST(DEBUG_FLAG) -TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'` +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 AC_SUBST(TOOLKIT_LOWERCASE) AC_SUBST(TOOLKIT_VERSION) AC_SUBST(SAMPLES_RPATH_FLAG) @@ -7635,7 +7772,7 @@ if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then 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 + if test "$wxUSE_OSX_CARBON" = 1; then POSTLINK_COMMAND="\$(REZ) -d __DARWIN__ -t APPL Carbon.r -o" RESCOMP="$REZ" WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL Carbon.r -o" @@ -7758,6 +7895,8 @@ dnl Add visibility support flags to CFLAGS/CXXFLAGS - do it this late so that dnl it doesn't affect compilation checks above CFLAGS="$CFLAGS $CFLAGS_VISIBILITY" CXXFLAGS="$CXXFLAGS $CXXFLAGS_VISIBILITY" +OBJCFLAGS="$OBJCFLAGS $CFLAGS_VISIBILITY" +OBJCXXFLAGS="$OBJCXXFLAGS $CXXFLAGS_VISIBILITY" dnl for convenience, sort the samples in alphabetical order dnl