dnl initialization
dnl ---------------------------------------------------------------------------
-AC_INIT([wxWidgets], [2.6.2], [wx-dev@lists.wxwidgets.org])
+AC_INIT([wxWidgets], [2.7.0], [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])
dnl wx_release_number += 1
wx_major_version_number=2
-wx_minor_version_number=6
-wx_release_number=2
-wx_subrelease_number=1
+wx_minor_version_number=7
+wx_release_number=0
+wx_subrelease_number=0
WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
WX_VERSION=$WX_RELEASE.$wx_release_number
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
+ dnl _HPUX_SOURCE is defined, see stdsyms(5)
+ CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
;;
*-*-linux* )
USE_LINUX=1
WX_ARG_ENABLE(gui, [ --enable-gui use GUI classes], wxUSE_GUI)
WX_ARG_ENABLE(monolithic, [ --enable-monolithic build wxWidgets as single library], wxUSE_MONOLITHIC)
WX_ARG_ENABLE(plugins, [ --enable-plugins build parts of wxWidgets as loadable components], wxUSE_PLUGINS)
+WX_ARG_WITH(subdirs, [ --without-subdirs don't generate makefiles for samples/demos/...], wxWITH_SUBDIRS, without)
if test "$wxUSE_GUI" = "yes"; then
WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
-WX_ARG_ENABLE(compat22, [ --enable-compat22 enable wxWidgets 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
-WX_ARG_ENABLE(compat24, [ --disable-compat24 disable wxWidgets 2.4 compatibility], WXWIN_COMPATIBILITY_2_4, disable)
+WX_ARG_ENABLE(compat24, [ --enable-compat24 enable wxWidgets 2.4 compatibility], WXWIN_COMPATIBILITY_2_4, enable)
+WX_ARG_ENABLE(compat26, [ --disable-compat26 disable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6, disable)
WX_ARG_ENABLE(rpath, [ --disable-rpath disable use of rpath for uninstalled builds], wxUSE_RPATH)
CXXFLAGS="$CXXFLAGS -woff 3970"
fi
+dnl HP-UX c89/aCC compiler warnings
+if test "x$HPCC" = "xyes"; then
+ dnl 2011: "unrecognized preprocessor directive": nice warning but it's given
+ dnl even for directives inside #if which is not true (i.e. which are
+ dnl used for other compilers/OS) and so we have no way to get rid of it
+ dnl 2450: "long long is non standard" -- yes, we know
+ CFLAGS="$CFLAGS +W 2011,2450"
+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="$CXXFLAGS +W 2340"
+fi
+
+dnl DEC/Compaq/HP cxx warnings
+if test "x$COMPAQCXX" = "xyes"; then
+ dnl -w0 enables all warnings, then we disable some of them:
+ dnl basclsnondto: base class dtor non virtual (sometimes we do want this)
+ dnl unrimpret: "end of routine block may be unreachable" is given for
+ dnl every "if ( ) return ...; else return ...;"
+ dnl intconlosbit: "conversion to integral type of smaller size could lose
+ dnl data" this is a useful warning but there are too many of
+ dnl them for now
+ CXXFLAGS="-w0 -msg_disable basclsnondto,unrimpret,intconlosbit"
+fi
+
dnl check for std::string or std::wstring
if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then
AC_LANG_PUSH(C++)
AC_PATH_XTRA
if test "$no_x" = "yes"; then
- AC_MSG_ERROR(X11 not found, please use --x-includes and/or --x-libraries options)
+ AC_MSG_ERROR([X11 not found, please use --x-includes and/or --x-libraries options (see config.log for details)])
fi
dnl for some reason AC_PATH_XTRA seems to add -INONE and -LNONE (and
[
pthread_mutexattr_t attr;
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
- ], [
- wx_cv_type_pthread_mutexattr_t=yes
- ], [
- wx_cv_type_pthread_mutexattr_t=no
- ]
+ ],
+ wx_cv_type_pthread_mutexattr_t=yes,
+ wx_cv_type_pthread_mutexattr_t=no
)
])
if test "$wx_cv_type_pthread_mutexattr_t" = "yes"; then
AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_T)
+
+ dnl check if we already have the declaration we need, it is not
+ dnl present in some systems' headers
+ AC_CACHE_CHECK([for pthread_mutexattr_settype declaration],
+ wx_cv_func_pthread_mutexattr_settype_decl, [
+ AC_TRY_COMPILE([#include <pthread.h>],
+ [
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+ ],
+ wx_cv_func_pthread_mutexattr_settype_decl=yes,
+ wx_cv_func_pthread_mutexattr_settype_decl=no
+ )
+ ])
+ if test "$wx_cv_func_pthread_mutexattr_settype_decl" = "yes"; then
+ AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL)
+ fi
else
dnl don't despair, there may be another way to do it
AC_CACHE_CHECK([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER],
dnl compatibility level
dnl ---------------------------------------------------------------------------
-if test "x$WXWIN_COMPATIBILITY_2_2" = "xyes"; then
- AC_DEFINE(WXWIN_COMPATIBILITY_2_2)
+if test "x$WXWIN_COMPATIBILITY_2_4" = "xyes"; then
+ AC_DEFINE(WXWIN_COMPATIBILITY_2_4)
- WXWIN_COMPATIBILITY_2_4="yes"
+ WXWIN_COMPATIBILITY_2_6="yes"
fi
-if test "x$WXWIN_COMPATIBILITY_2_4" != "xno"; then
- AC_DEFINE(WXWIN_COMPATIBILITY_2_4)
+if test "x$WXWIN_COMPATIBILITY_2_6" != "xno"; then
+ AC_DEFINE(WXWIN_COMPATIBILITY_2_6)
fi
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl time/date functions
-dnl ------------------------------------------------------------------------
+dnl ---------------------------------------------------------------------------
if test "$wxUSE_DATETIME" = "yes"; then
- dnl check for strptime
+ dnl check for strptime and for its declaration as some systems lack it
AC_CHECK_FUNCS(strptime)
+ if test "$ac_cv_func_strptime" = "yes"; then
+ AC_CACHE_CHECK([for strptime declaration], wx_cv_func_strptime_decl,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE(
+ [
+ #include <time.h>
+ ],
+ [
+ struct tm t;
+ strptime("foo", "bar", &t);
+ ],
+ wx_cv_func_strptime_decl=yes,
+ wx_cv_func_strptime_decl=no
+ )
+ AC_LANG_RESTORE
+ ]
+ )
+ fi
+ if test "$wx_cv_func_strptime_decl" = "yes"; then
+ AC_DEFINE(HAVE_STRPTIME_DECL)
+ fi
dnl check for timezone variable
dnl doesn't exist under Darwin / Mac OS X which uses tm_gmtoff instead
dnl C/C++ compiler options used to compile wxWidgets
dnl
dnl check for icc before gcc as icc is also recognized as gcc
-if test "$GCC" = yes ; then
+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
CWARNINGS="-Wall -Wundef"
fi
-if test "$INTELCXX" = yes ; then
+if test "x$INTELCXX" = "xyes" ; then
dnl Intel compiler gives some warnings which simply can't be worked
dnl around or of which we have too many (810, 869) so it's impractical to
dnl keep them enabled even if in theory it would be nice and some others
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,869,981,1418,1419"
+ CXXWARNINGS="-Wall -wd279,383,444,810,869,981,1418,1419"
elif test "$GXX" = yes ; then
dnl CXXWARNINGS="-Wall -W -Wcast-qual -Werror"
CXXWARNINGS="-Wall -Wundef -Wno-ctor-dtor-privacy"
CPPFLAGS="-DWX_PRECOMP $CPPFLAGS"
fi
+dnl TOOLCHAIN_DEFS are used by wx-config but should be also used for wx build
+dnl itself
+CPPFLAGS="$CPPFLAGS $TOOLCHAIN_DEFS"
dnl for convenience, sort the samples in alphabetical order
dnl
dnl AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR:include ])
dnl AC_CONFIG_LINKS([ contrib/include ])
-
+if test "$wxWITH_SUBDIRS" != "no"; then
dnl Configure samples, contrib etc. directories, but only if they are present:
if test "$wxUSE_GUI" = "yes"; then
SUBDIRS="samples demos utils contrib"
done
fi
done
-
+fi dnl wxWITH_SUBDIRS
AC_OUTPUT
echo " Should wxWidgets be compiled in Unicode mode? ${wxUSE_UNICODE:-no}"
echo " What level of wxWidgets compatibility should be enabled?"
-echo " wxWidgets 2.2 ${WXWIN_COMPATIBILITY_2_2:-no}"
-echo " wxWidgets 2.4 ${WXWIN_COMPATIBILITY_2_4:-yes}"
+echo " wxWidgets 2.4 ${WXWIN_COMPATIBILITY_2_4:-no}"
+echo " wxWidgets 2.6 ${WXWIN_COMPATIBILITY_2_6:-yes}"
echo " Which libraries should wxWidgets use?"
echo " jpeg ${wxUSE_LIBJPEG-none}"