dnl adds -traditional for gcc if needed
AC_PROG_GCC_TRADITIONAL
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
dnl C++-compiler checks
dnl defines CXX with the compiler to use
CXXFLAGS=${CXXFLAGS:=}
AC_BAKEFILE_PROG_CXX
-AC_LANG_RESTORE
+AC_LANG_POP
dnl ranlib command
dnl defines RANLIB with the appropriate command
dnl ---------------------------------------------------------------------
dnl (non-OS/2-only piece)
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
AC_TRY_LINK([
fi
fi
- AC_LANG_RESTORE
+ AC_LANG_POP
dnl (end of non-OS/2-only piece)
;;
esac
[if -D__STDC_EXT__ is required],
wx_cv_STDC_EXT_required,
[
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_TRY_COMPILE(
[],
[
wx_cv_STDC_EXT_required=no,
wx_cv_STDC_EXT_required=yes
)
- AC_LANG_RESTORE
+ AC_LANG_POP
]
)
if test "x$wx_cv_STDC_EXT_required" = "xyes"; then
AC_CACHE_CHECK([if expat.h is valid C++ header],
wx_cv_expat_is_not_broken,
[
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_TRY_COMPILE([#include <expat.h>],[],
wx_cv_expat_is_not_broken=yes,
wx_cv_expat_is_not_broken=no
)
- AC_LANG_RESTORE
+ AC_LANG_POP
]
)
if test "$wx_cv_expat_is_not_broken" = "yes" ; then
dnl check what exactly size_t is on this machine - this is necessary to avoid
dnl ambiguous overloads in several places, notably wx/string.h and wx/array.h
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
AC_CACHE_CHECK([if size_t is unsigned int],
wx_cv_size_t_is_uint,
[
fi
fi
-AC_LANG_RESTORE
+AC_LANG_POP
dnl ---------------------------------------------------------------------------
dnl Checks for structures
dnl *printf() functions sometimes are available in the library but not
dnl prototyped -- if this is the case, we can't use them from C++ code, but to
dnl detect this we have to use C++ compiler for testing
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
dnl check for vsnprintf() -- a safe version of vsprintf())
dnl
[AC_MSG_RESULT([no])]);
fi
-AC_LANG_RESTORE
+AC_LANG_POP
if test "x$ac_cv_header_fnmatch_h" = "xyes"; then
AC_CHECK_FUNCS(fnmatch)
dnl check for available version of iconv()
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
AM_ICONV
LIBS="$LIBICONV $LIBS"
-AC_LANG_RESTORE
+AC_LANG_POP
dnl check for POSIX signals if we need them
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then
fi
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_CACHE_CHECK([for sa_handler type], wx_cv_type_sa_handler,
[
])
])
- AC_LANG_RESTORE
+ AC_LANG_POP
AC_DEFINE_UNQUOTED(wxTYPE_SA_HANDLER, $wx_cv_type_sa_handler)
fi
dnl backtrace() and backtrace_symbols() for wxStackWalker
if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_CACHE_CHECK([for backtrace() in <execinfo.h>], wx_cv_func_backtrace,
[
fi
fi
- AC_LANG_RESTORE
+ AC_LANG_POP
fi
if test "$wxUSE_STACKWALKER" = "yes" -a "$USE_WIN32" != "1" -a "$USE_UNIX" != "1"; then
if test "$wx_cv_func_statfs" = "yes"; then
dnl check whether we have its dcelaration too: some systems (AIX 4) lack it
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_CACHE_CHECK(for statfs declaration, wx_cv_func_statfs_decl,
AC_TRY_COMPILE(
[
wx_cv_func_statfs_decl=no
)
)
- AC_LANG_RESTORE
+ AC_LANG_POP
if test "$wx_cv_func_statfs_decl" = "yes"; then
AC_DEFINE(HAVE_STATFS_DECL)
dnl
dnl for this check C++ compiler has to be used as passing incompatible
dnl pointers is just a warning and not an error in C
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_CACHE_CHECK(for statvfs argument type, wx_cv_type_statvfs_t,
AC_TRY_COMPILE(
)
)
- AC_LANG_RESTORE
+ AC_LANG_POP
if test "$wx_cv_type_statvfs_t" != "unknown"; then
AC_DEFINE(HAVE_STATVFS)
dnl check for MT-safe version of strtok (on DEC Alpha, it's ok for C compiler
dnl but not for C++ one - hence change language)
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
AC_CHECK_FUNCS(strtok_r)
-AC_LANG_RESTORE
+AC_LANG_POP
dnl check for inet_addr and inet_aton (these may live either in libc, or in
dnl libnsl or libresolv or libsocket)
dnl for it, so testing for it is temporarily disabled and we are restricted
dnl to gethostbyname_r/gethostbyaddr_r and getservbyname_r
+AC_LANG_PUSH(C++)
dnl AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO), [
dnl no getaddrinfo, so check for gethostbyname_r and
dnl related functions (taken from python's configure.in)
dnl check to fit this case, if it's really needed. - SN )
dnl ]
dnl )
+AC_LANG_POP
if test "$wxUSE_THREADS" = "yes"; then
AC_DEFINE(wxUSE_THREADS)
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_LANG_PUSH(C++)
AC_TRY_COMPILE(
[
#include <time.h>
wx_cv_func_strptime_decl=yes,
wx_cv_func_strptime_decl=no
)
- AC_LANG_RESTORE
+ AC_LANG_POP
]
)
fi
wx_cv_func_gettimeofday_has_2_args,
[
dnl on some _really_ old systems it takes only 1 argument
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_TRY_COMPILE(
[
]
)
)
- AC_LANG_RESTORE
+ AC_LANG_POP
])
if test "$wx_cv_func_gettimeofday_has_2_args" != "yes"; then
if test "$ac_cv_header_ole2_h" = "yes" ; then
if test "$GCC" = yes ; then
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_MSG_CHECKING([if g++ requires -fvtable-thunks])
AC_TRY_COMPILE([#include <windows.h>
[AC_MSG_RESULT(no)],
[AC_MSG_RESULT(yes)
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fvtable-thunks"])
- AC_LANG_RESTORE
+ AC_LANG_POP
LIBS=" -lrpcrt4 -loleaut32 -lole32 -luuid$LIBS"
if test "$wxUSE_OLE" = "yes" ; then
AC_DEFINE(wxUSE_OLE)