X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6517fa86c3c162a6ce8e38ed1ab9e59cdcd9cbea..68ca12fef650ce4622e05ba4eb21a7aa23849107:/configure.in diff --git a/configure.in b/configure.in index 503c1be899..f610a35c0c 100644 --- a/configure.in +++ b/configure.in @@ -109,9 +109,9 @@ DEFAULT_wxUSE_PM=0 DEFAULT_wxUSE_X11=0 DEFAULT_wxUSE_DFB=0 -dnl these are the values which are really default for the given platform - -dnl they're not cached and are only used if no --with-toolkit was given *and* -dnl nothing was found in the cache +dnl these are the values which are really default for the given platform: +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 @@ -361,8 +361,6 @@ dnl platform should be changed, it can be done here too) dnl dnl NB: see also DEFAULT_wxUSE variables defined above -WX_ARG_CACHE_INIT - dnl it's only necessary to list the options which should be disabled by dnl default, all the rest have default value of "yes" (or, rather, of dnl wxUSE_ALL_FEATURES which is the only which has to be set to "yes" by @@ -384,8 +382,10 @@ dnl features disabled by default DEFAULT_wxUSE_ACCESSIBILITY=no DEFAULT_wxUSE_DATAVIEWCTRL=no DEFAULT_wxUSE_GRAPHICS_CONTEXT=no +DEFAULT_wxUSE_IPV6=no DEFAULT_wxUSE_MEDIACTRL=no DEFAULT_wxUSE_TAB_DIALOG=no +DEFAULT_wxUSE_GSTREAMER8=no DEFAULT_wxUSE_UNICODE_UTF8=auto DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no @@ -401,21 +401,6 @@ DEFAULT_wxUSE_GTK2=yes dnl Always default to no. Only special cases require this. DEFAULT_wxUSE_OBJC_UNIQUIFYING=no - -for toolkit in $ALL_TOOLKITS; do - LINE=`grep "wxUSE_$toolkit=" ${wx_arg_cache_file}` - if test "x$LINE" != "x" ; then - has_toolkit_in_cache=1 - eval "DEFAULT_$LINE" - eval "CACHE_$toolkit=1" - - LINE=`grep "wx${toolkit}_VERSION=" ${wx_arg_cache_file}` - if test "x$LINE" != "x" ; then - eval "DEFAULT_$LINE" - fi - fi -done - dnl =========================== dnl deal with configure options dnl =========================== @@ -467,8 +452,7 @@ if test "$wxUSE_UNIVERSAL" = "yes"; then fi 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, and we don't need to cache them -dnl automatically +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]) @@ -513,16 +497,6 @@ AC_MSG_CHECKING([for --with-macosx-sdk]) AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use an OS X SDK at PATH], [ wxUSE_MACOSX_SDK=$withval wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval" - echo "wxUSE_MACOSX_SDK=$wxUSE_MACOSX_SDK" >> ${wx_arg_cache_file}.tmp - ], [ - # NOTE: Empty string on purpose so that --without-macosx-sdk (thus no) - # will override --enable-universal_binary's automatic SDK usage. - wxUSE_MACOSX_SDK= - LINE=`grep "^wxUSE_MACOSX_SDK=" ${wx_arg_cache_file}` - if test "x$LINE" != x ; then - eval "$LINE" - echo "$LINE" >> ${wx_arg_cache_file}.tmp - fi ]) AC_MSG_RESULT([$wxUSE_MACOSX_SDK]) @@ -530,17 +504,6 @@ AC_MSG_CHECKING([for --with-macosx-version-min]) AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries which require at least this OS X version], [ wxUSE_MACOSX_VERSION_MIN=$withval wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval" - echo "wxUSE_MACOSX_VERSION_MIN=$wxUSE_MACOSX_VERSION_MIN" >> ${wx_arg_cache_file}.tmp - ], [ - # default "yes" because when not using an SDK it means the same as no - # but when using an SDK it means to use the SDK version - wxUSE_MACOSX_VERSION_MIN=yes - # See if there is a value in the cache - LINE=`grep "^wxUSE_MACOSX_VERSION_MIN=" ${wx_arg_cache_file}` - if test "x$LINE" != x ; then - eval "$LINE" - echo "$LINE" >> ${wx_arg_cache_file}.tmp - fi ]) AC_MSG_RESULT([$wxUSE_MACOSX_VERSION_MIN]) @@ -608,6 +571,7 @@ WX_ARG_FEATURE(ftp, [ --enable-ftp use wxFTP (requires wxP WX_ARG_FEATURE(http, [ --enable-http use wxHTTP (requires wxProtocol], wxUSE_PROTOCOL_HTTP) WX_ARG_FEATURE(fileproto, [ --enable-fileproto use wxFileProto class (requires wxProtocol], wxUSE_PROTOCOL_FILE) WX_ARG_FEATURE(sockets, [ --enable-sockets use socket/network classes], wxUSE_SOCKETS) +WX_ARG_FEATURE(ipv6, [ --enable-ipv6 enable IPv6 support in wxSocket], wxUSE_IPV6) WX_ARG_FEATURE(ole, [ --enable-ole use OLE classes (Win32 only)], wxUSE_OLE) WX_ARG_FEATURE(dataobj, [ --enable-dataobj use data object classes], wxUSE_DATAOBJ) @@ -857,6 +821,7 @@ WX_ARG_FEATURE(listbook, [ --enable-listbook use wxListbook class], wx WX_ARG_FEATURE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX) WX_ARG_FEATURE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL) WX_ARG_FEATURE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK) +WX_ARG_FEATURE(notifmsg, [ --enable-notifmsg use wxNotificationMessage class], wxUSE_NOTIFICATION_MESSAGE) WX_ARG_FEATURE(odcombobox, [ --enable-odcombobox use wxOwnerDrawnComboBox class], wxUSE_ODCOMBOBOX) WX_ARG_FEATURE(radiobox, [ --enable-radiobox use wxRadioBox class], wxUSE_RADIOBOX) WX_ARG_FEATURE(radiobtn, [ --enable-radiobtn use wxRadioButton class], wxUSE_RADIOBTN) @@ -947,9 +912,6 @@ WX_ARG_FEATURE(wxdib, [ --enable-wxdib use wxDIB class (Win32 on fi dnl for GUI only -dnl cache the options values before (may be) aborting below -WX_ARG_CACHE_FLUSH - dnl check that no more than one toolkit is given and that if none are given that dnl we have a default one @@ -990,16 +952,7 @@ if test "$wxUSE_GUI" = "yes"; then else dnl try to guess the most apropriate toolkit for this platform for toolkit in $ALL_TOOLKITS; do - if test "$has_toolkit_in_cache" != 1; then - var=DEFAULT_DEFAULT_wxUSE_$toolkit - else - var=DEFAULT_wxUSE_$toolkit - - eval "version=\$DEFAULT_wx${toolkit}_VERSION" - if test "x$version" != "x"; then - eval "wx${toolkit}_VERSION=$version" - fi - fi + var=DEFAULT_DEFAULT_wxUSE_$toolkit eval "wxUSE_$toolkit=\$${var}" done fi @@ -1023,7 +976,7 @@ if test "$wxUSE_GUI" = "yes"; then AC_MSG_ERROR(Please specify a toolkit -- cannot determine the default for ${host}) ;; *) - AC_MSG_ERROR(Please specify at most one toolkit (maybe some are cached in configarg.cache?)) + AC_MSG_ERROR(Please specify at most one toolkit) esac # to be removed when --disable-gtk2 isn't needed @@ -1033,25 +986,13 @@ if test "$wxUSE_GUI" = "yes"; then wxGTK_VERSION=1 fi - dnl cache the wxUSE_ values too for toolkit in $ALL_TOOLKITS; do - var=wxUSE_$toolkit - eval "value=\$${var}" - if test "x$value" != x; then - cache_var=CACHE_$toolkit - eval "cache=\$${cache_var}" - if test "$cache" = 1; then - echo "$var=$value" >> ${wx_arg_cache_file} - eval "version=\$wx${toolkit}_VERSION" - if test "x$version" != "x"; then - echo "wx${toolkit}_VERSION=$version" >> ${wx_arg_cache_file} - fi - fi + var=wxUSE_$toolkit + eval "value=\$${var}" if test "$value" = 1; then - toolkit_echo=`echo $toolkit | tr A-Z a-z` + toolkit_echo=`echo $toolkit | tr '[[A-Z]]' '[[a-z]]'` AC_MSG_RESULT($toolkit_echo) fi - fi done else if test "x$host_alias" != "x"; then @@ -1879,7 +1820,7 @@ if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then if test "$wx_cv_class_stdbasicstring" != yes; then 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 + elif test "$wxUSE_STD_STRING" = "yes"; 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]) @@ -1895,7 +1836,7 @@ if test "$wxUSE_STD_IOSTREAM" = "yes"; then [#include ]) if test "$wxUSE_STD_IOSTREAM" != "yes"; then - if grep wxUSE_STD_IOSTREAM $wx_arg_cache_file >/dev/null; then + if test "$wxUSE_STD_IOSTREAM" = "yes"; 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]) @@ -2836,15 +2777,6 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config CFLAGS="$wx_cv_cflags_gtk $CFLAGS" LIBS="$LIBS $wx_cv_libs_gtk" - dnl gtk_icon_size_lookup is not available in the GTK+ headers - dnl that have shipped with some versions of Sun's JDS. Not using - dnl AC_CHECK_FUNCS here since it only checks the function exists - dnl in the lib (not the header). - AC_CHECK_DECLS([gtk_icon_size_lookup], [], - [AC_DEFINE(NEED_GTK_ICON_SIZE_LOOKUP)], - [#include ]) - - dnl test if we have at least GTK+ 2.10: AC_MSG_CHECKING([if GTK+ is version >= 2.10]) AC_TRY_COMPILE([ @@ -3447,7 +3379,7 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config if test "$TOOLKIT" = "PM" ; then TOOLKIT_DIR="os2" else - TOOLKIT_DIR=`echo ${TOOLKIT} | tr A-Z a-z` + TOOLKIT_DIR=`echo ${TOOLKIT} | tr '[[A-Z]]' '[[a-z]]'` fi if test "$wxUSE_UNIVERSAL" = "yes"; then @@ -3837,7 +3769,7 @@ if test "$wxUSE_DEBUG_INFO" = "yes"; then DEBUG_INFO=1 fi -WX_VERSION_TAG=`echo WX${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}_${WX_RELEASE} | tr a-z A-Z` +WX_VERSION_TAG=`echo WX${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}_${WX_RELEASE} | tr '[[a-z]]' '[[A-Z]]'` TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}-${WX_RELEASE}" @@ -3902,8 +3834,6 @@ dnl defines pid_t if not already defined AC_TYPE_PID_T dnl defines size_t if not already defined AC_TYPE_SIZE_T -dnl defines uid_t and gid_t if not already defined -AC_TYPE_UID_T dnl sets HAVE_SSIZE_T if ssize_t is defined AC_CHECK_TYPES(ssize_t) @@ -6025,6 +5955,33 @@ if test "$wxUSE_SOCKETS" = "yes" ; then fi if test "$wxUSE_SOCKETS" = "yes" ; then + if test "$wxUSE_IPV6" = "yes"; then + AC_CACHE_CHECK( + [whether we have sockaddr_in6], + [wx_cv_type_sockaddr_in6], + [ + AC_TRY_COMPILE( + [ + #include + #include + #include + ], + [ + struct sockaddr_in6 sa6; + ], + wx_cv_type_sockaddr_in6=yes, + wx_cv_type_sockaddr_in6=no + ) + ] + ) + + if test "$wx_cv_type_sockaddr_in6"="yes"; then + AC_DEFINE(wxUSE_IPV6) + else + AC_MSG_WARN([IPv6 support not available... disabled]) + fi + fi + AC_DEFINE(wxUSE_SOCKETS) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets" fi @@ -6543,6 +6500,10 @@ if test "$wxUSE_NOTEBOOK" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook" fi +if test "$wxUSE_NOTIFICATION_MESSAGE" = "yes"; then + AC_DEFINE(wxUSE_NOTIFICATION_MESSAGE) +fi + if test "$wxUSE_ODCOMBOBOX" = "yes"; then AC_DEFINE(wxUSE_ODCOMBOBOX) USES_CONTROLS=1 @@ -7097,7 +7058,7 @@ if test "$wxUSE_MEDIACTRL" = "yes"; then if test "$wxUSE_GSTREAMER" = "yes"; then CPPFLAGS="$GST_CFLAGS $CPPFLAGS" - LIBS="$GST_LIBS $LIBS" + EXTRALIBS_MEDIA="$GST_LIBS" AC_DEFINE(wxUSE_GSTREAMER) else @@ -7337,6 +7298,7 @@ LIBS=`echo $LIBS` EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS" EXTRALIBS_XML="$EXPAT_LINK" EXTRALIBS_HTML="$MSPACK_LINK" +EXTRALIBS_MEDIA="$GST_LIBS" EXTRALIBS_STC="-lwxscintilla${lib_debug_suffix}${WX_LIB_FLAVOUR}-${WX_RELEASE}${HOST_SUFFIX}" if test "$wxUSE_GUI" = "yes"; then EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $WEBKIT_LINK $EXTRALIBS_HILDON $EXTRALIBS_GNOMEVFS $EXTRALIBS_GNOMEPRINT` @@ -7383,7 +7345,7 @@ if test "x$wxUSE_UNIVERSAL" = "xyes" ; then ;; *) - for t in `echo $wxUNIV_THEMES | tr , ' ' | tr a-z A-Z`; do + for t in `echo $wxUNIV_THEMES | tr , ' ' | tr '[[a-z]]' '[[A-Z]]'`; do AC_DEFINE_UNQUOTED(wxUSE_THEME_$t) done esac @@ -7435,6 +7397,7 @@ AC_SUBST(CXXWARNINGS) AC_SUBST(EXTRALIBS) AC_SUBST(EXTRALIBS_XML) AC_SUBST(EXTRALIBS_HTML) +AC_SUBST(EXTRALIBS_MEDIA) AC_SUBST(EXTRALIBS_GUI) AC_SUBST(EXTRALIBS_OPENGL) AC_SUBST(EXTRALIBS_SDL) @@ -7447,7 +7410,7 @@ 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=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'` AC_SUBST(TOOLKIT_LOWERCASE) AC_SUBST(TOOLKIT_VERSION) AC_SUBST(SAMPLES_RPATH_FLAG) @@ -7520,7 +7483,7 @@ then if $CXX -o conftest$PROGRAM_EXT conftest.cpp >/dev/null 2>&1 then - if tr -dc a-z < conftest$PROGRAM_EXT | + if tr -dc '[a-z]' < conftest$PROGRAM_EXT | grep awidetest >/dev/null then wx_cv_gcc_pch_bug=no @@ -7870,7 +7833,7 @@ for subdir in $SUBDIRS; do dnl assume that everything compiles for utils &c dnl any that shouldn't be built can be added to dnl DISABLED_UTILS, DISABLED_DEMOS - disabled_var=DISABLED_`echo $subdir | tr a-z A-Z` + 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"`