X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/856da3247aa242d12c2d70723dd4f7a7f4929578..b119ee87a55eb961034672abdc22c5c44ba203ea:/configure.in diff --git a/configure.in b/configure.in index f378c77574..676a8c17a6 100644 --- a/configure.in +++ b/configure.in @@ -719,7 +719,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 @@ -1915,45 +1914,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 +2022,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 +2038,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 +2685,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 @@ -4027,8 +4077,9 @@ dnl dnl so we first check if the function is in the library dnl dnl FIXME: replace this mess with WX_CHECK_FUNCS() -AC_CHECK_FUNCS(snprintf vsnprintf) +AC_CHECK_FUNCS(snprintf vsnprintf vsscanf) +AC_LANG_PUSH(C++) if test "$ac_cv_func_vsnprintf" = "yes"; then dnl yes it is -- now check if it is in the headers AC_CACHE_CHECK([for vsnprintf declaration], wx_cv_func_vsnprintf_decl, @@ -4164,6 +4215,39 @@ define HAVE_UNIX98_PRINTF as 1 in setup.h if it is available.]) fi fi +dnl the same as above but for vsscanf() now: it's not present in at least +dnl Solaris 9 headers for gcc-3.4 (due to fixinclude's processing of stdio.h) +if test "$ac_cv_func_vsscanf" = "yes"; then + AC_CACHE_CHECK([for vsscanf declaration], wx_cv_func_vsscanf_decl, + [ + AC_TRY_COMPILE( + [ + #include + #include + #ifdef __MSL__ + #if __MSL__ >= 0x6000 + namespace std {} + using namespace std; + #endif + #endif + ], + [ + char *buf; + va_list args; + vsscanf(buf, "%s", args); + ], + wx_cv_func_vsscanf_decl=yes, + wx_cv_func_vsscanf_decl=no + ) + ] + ) + + if test "$wx_cv_func_vsscanf_decl" = "yes"; then + AC_DEFINE(HAVE_VSSCANF_DECL) + fi +fi +AC_LANG_POP() + if test "$wxUSE_UNICODE" = yes; then dnl also look if we have wide char IO functions, notice that [f]putws are @@ -4549,7 +4633,7 @@ if test "$wxUSE_TARSTREAM" = "yes"; then getgrgid_r(0, &grp, buf, sizeof(buf), &pgrp) ]]) fi - + fi @@ -4897,6 +4981,8 @@ 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], @@ -6065,10 +6151,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 @@ -6636,6 +6718,11 @@ if test "$wxUSE_TEXTCTRL" = "yes"; then AC_DEFINE(wxUSE_TEXTCTRL) USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS text" + + dnl we don't have special switches to disable wxUSE_RICHEDIT[2], it doesn't + dnl seem useful to allow disabling them + AC_DEFINE(wxUSE_RICHEDIT) + AC_DEFINE(wxUSE_RICHEDIT2) fi if test "$wxUSE_TOGGLEBTN" = "yes"; then @@ -7846,6 +7933,11 @@ AC_CONFIG_FILES([ lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}:wx-config-inplace. [ chmod +x lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} ], [ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ]) +dnl this is used to run ifacecheck with the same flags used by the compiler +dnl for the real compilation: +AC_CONFIG_FILES([ utils/ifacecheck/rungccxml.sh ], + [ chmod +x utils/ifacecheck/rungccxml.sh ]) + if test "$wx_cv_version_script" = "yes"; then AC_CONFIG_FILES(version-script) fi @@ -7900,8 +7992,7 @@ for subdir in $SUBDIRS; do fi else dnl we build wxBase only - dnl don't take all samples/utils, just those which build with - dnl wxBase + dnl don't take all samples/utils, just those which build with wxBase if test ${subdir} = "samples"; then dnl only take those samples which compile in the current dnl configuration and which exist @@ -7913,10 +8004,9 @@ for subdir in $SUBDIRS; do done elif test ${subdir} = "utils"; then makefiles="" - for util in HelpGen tex2rtf ; do + for util in ifacecheck ; do if test -d $srcdir/utils/$util ; then - makefiles="utils/$util/Makefile.in \ - utils/$util/src/Makefile.in \ + makefiles="utils/$util/src/Makefile.in \ $makefiles" fi done