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_DISABLE(optimise, [ --disable-optimise compile without optimisations], 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)
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
dnl ---------------------------------------------------------------------------
WX_ARG_FEATURE(intl, [ --enable-intl use internationalization system], wxUSE_INTL)
+WX_ARG_FEATURE(xlocale, [ --enable-xlocale use x-locale support (requires wxLocale)], wxUSE_XLOCALE)
WX_ARG_FEATURE(config, [ --enable-config use wxConfig (and derived) classes], wxUSE_CONFIG)
WX_ARG_FEATURE(protocols, [ --enable-protocols use wxProtocol and derived classes], wxUSE_PROTOCOL)
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
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 <hash_map>
- #include <hash_set>],
- [std::hash_map<double*, char*, std::hash<double*>, std::equal_to<double*> > test1;
- std::hash_set<char*, std::hash<char*>, std::equal_to<char*> > 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 <ext/hash_map>
- #include <ext/hash_set>],
- [__gnu_cxx::hash_map<double*, char*, __gnu_cxx::hash<double*>, std::equal_to<double*> > test1;
- __gnu_cxx::hash_set<char*, __gnu_cxx::hash<char*>, std::equal_to<char*> > 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 <unordered_map>
+ #include <unordered_set>],
+ [std::unordered_map<double*, char*> test1;
+ std::unordered_set<char*> 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 <tr1/unordered_map>
+ #include <tr1/unordered_set>],
+ [std::tr1::unordered_map<double*, char*> test1;
+ std::tr1::unordered_set<char*> 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 <hash_map>
+ #include <hash_set>],
+ [std::hash_map<double*, char*, std::hash<double*>, std::equal_to<double*> > test1;
+ std::hash_set<char*, std::hash<char*>, std::equal_to<char*> > 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 <ext/hash_map>
+ #include <ext/hash_set>],
+ [__gnu_cxx::hash_map<double*, char*, __gnu_cxx::hash<double*>, std::equal_to<double*> > test1;
+ __gnu_cxx::hash_set<char*, __gnu_cxx::hash<char*>, std::equal_to<char*> > test2;],
+ wx_cv_class_gnuhashmapset=yes,
+ wx_cv_class_gnuhashmapset=no)
+ ]
+ )],
+ [],
+ [ ]
+ )
+
+ fi
fi
fi
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 \
\
/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
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
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,
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 <stdio.h>
+ #include <stdarg.h>
+ #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
getgrgid_r(0, &grp, buf, sizeof(buf), &pgrp)
]])
fi
-
+
fi
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],
HAVE_DL_FUNCS=0
HAVE_SHL_FUNCS=0
if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then
- if test "$USE_DARWIN" = 1; then
- dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X
- HAVE_DL_FUNCS=1
- elif test "$USE_DOS" = 1; then
+ if test "$USE_DOS" = 1; then
HAVE_DL_FUNCS=0
else
dnl the test is a bit complicated because we check for dlopen() both with
])
])
- dnl check also for dlerror()
- if test "$HAVE_DL_FUNCS" = 1; then
- AC_CHECK_FUNCS(dlerror,
- AC_DEFINE(HAVE_DLERROR),
- [
- AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))
- ]
- )
+ dnl check also for dlerror()
+ if test "$HAVE_DL_FUNCS" = 1; then
+ AC_CHECK_FUNCS(dlerror,
+ AC_DEFINE(HAVE_DLERROR),
+ [
+ AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))
+ ]
+ )
+ fi
fi
+
+ dnl Force HAVE_DL_FUNCS on for Darwin, even if the tests failed (e.g. pre-10.3)
+ if test "$USE_DARWIN" = 1; then
+ dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X
+ HAVE_DL_FUNCS=1
fi
if test "$HAVE_DL_FUNCS" = 0; then
fi
fi
+if test "$wxUSE_XLOCALE" == "yes" ; then
+ AC_DEFINE(wxUSE_XLOCALE)
+ AC_CHECK_TYPES(locale_t,,,
+ [#include <xlocale.h>
+ #include <locale.h>])
+fi
+
if test "$wxUSE_LOG" = "yes"; then
AC_DEFINE(wxUSE_LOG)
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
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
fi
fi
if test "$USE_DARWIN" = 1; then
- LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework System"
+ LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System"
else
LDFLAGS="$LDFLAGS -lCarbonLib"
fi
[ 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
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
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