DEFAULT_DEFAULT_wxUSE_DFB=0
PROGRAM_EXT=
-SO_SUFFIX=so
SAMPLES_RPATH_FLAG=
SAMPLES_RPATH_POSTLINK=
USE_HPUX=1
DEFAULT_DEFAULT_wxUSE_MOTIF=1
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
USE_AIX=1
USE_SYSV=1
USE_SVR4=1
- dnl quoting from http://www-1.ibm.com/servers/esdd/articles/gnu.html:
- dnl
- dnl Both archive libraries and shared libraries on AIX have an .a
- dnl extension. This will explain why you can't link with an .so and
- dnl why it works with the name changed to .a.
- SO_SUFFIX=a
AC_DEFINE(__AIX__)
AC_DEFINE(__SYSV__)
AC_DEFINE(__SVR4__)
dnl MBN: some of the defines have been moved after toolkit detection
dnl because for wxMotif/wxGTK/wxX11 to build on Cygwin
dnl USE_UNIX must be set and not USE_WIN32
- SO_SUFFIX=dll
PROGRAM_EXT=".exe"
DEFAULT_DEFAULT_wxUSE_MSW=1
;;
dnl Darwin based distributions (including Mac OS X)
USE_BSD=1
USE_DARWIN=1
- SO_SUFFIX=dylib
AC_DEFINE(__BSD__)
AC_DEFINE(__DARWIN__)
AC_DEFINE(TARGET_CARBON)
dnl For some reason the test that should be cross-compiler capable fails
dnl However, there is no doubt that MacOS PowerPC is big endian.
ac_cv_c_bigendian=yes
- SO_SUFFIX=shlib
dnl AC_DEFINE(TARGET_CARBON)
dnl platform.h needs TARGET_CARBON before setup.h, we'll add it to CPPFLAGS
DEFAULT_DEFAULT_wxUSE_OSX_CARBON=1
fi dnl wxUSE_VARARG_MACROS == yes
+
dnl check for large file support
+LARGEFILE_CPPFLAGS=
AC_SYS_LARGEFILE
+if test "$ac_cv_sys_file_offset_bits" = "64"; then
+ LARGEFILE_CPPFLAGS="-D_FILE_OFFSET_BITS=64"
+elif test "$ac_cv_sys_large_files" = 1; then
+ LARGEFILE_CPPFLAGS="-D_LARGE_FILES"
+fi
dnl we need to define _FILE_OFFSET_BITS or _LARGE_FILES on the compiler command
dnl line because otherwise the system headers risk being included before
dnl wx/defs.h which defines these constants leading to inconsistent
dnl sizeof(off_t) in different source files of the same program and linking
dnl problems
-if test "x$wx_largefile" = "xyes"; then
- if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
- WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
-
- dnl We get "Large Files (ILP32) not supported in strict ANSI mode."
- dnl #error from HP standard headers unless __STDC_EXT__ is defined.
- dnl The compiler should define it automatically, but some old g++
- dnl versions don't define it, so test and add it if necessary. AFAIK
- dnl the problem only affects the C++ compiler so it is added to
- dnl CXXFLAGS only.
- if test "$USE_HPUX" = 1 -a "$GXX" = "yes"; then
- AC_CACHE_CHECK(
- [if -D__STDC_EXT__ is required],
- wx_cv_STDC_EXT_required,
- [
- AC_LANG_PUSH(C++)
- AC_TRY_COMPILE(
- [],
- [
- #ifndef __STDC_EXT__
- choke me
- #endif
- ],
- wx_cv_STDC_EXT_required=no,
- wx_cv_STDC_EXT_required=yes
- )
- AC_LANG_POP()
- ]
- )
- if test "x$wx_cv_STDC_EXT_required" = "xyes"; then
- WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -D__STDC_EXT__"
- fi
+if test -n "$LARGEFILE_CPPFLAGS"; then
+ WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS $LARGEFILE_CPPFLAGS"
+
+ dnl We get "Large Files (ILP32) not supported in strict ANSI mode."
+ dnl #error from HP standard headers unless __STDC_EXT__ is defined.
+ dnl The compiler should define it automatically, but some old g++
+ dnl versions don't define it, so test and add it if necessary. AFAIK
+ dnl the problem only affects the C++ compiler so it is added to
+ dnl CXXFLAGS only.
+ if test "$USE_HPUX" = 1 -a "$GXX" = "yes"; then
+ AC_CACHE_CHECK(
+ [if -D__STDC_EXT__ is required],
+ wx_cv_STDC_EXT_required,
+ [
+ AC_LANG_PUSH(C++)
+ AC_TRY_COMPILE(
+ [],
+ [
+ #ifndef __STDC_EXT__
+ choke me
+ #endif
+ ],
+ wx_cv_STDC_EXT_required=no,
+ wx_cv_STDC_EXT_required=yes
+ )
+ AC_LANG_POP()
+ ]
+ )
+ if test "x$wx_cv_STDC_EXT_required" = "xyes"; then
+ WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -D__STDC_EXT__"
fi
- else
- WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGE_FILES"
- fi
- dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source
- AC_FUNC_FSEEKO
- if test "$ac_cv_sys_largefile_source" != no; then
- WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
fi
fi
+dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source
+dnl
+dnl it may be affected by large file flags (this happens under HP-UX 11 for
+dnl example) so set them before using it and also use C++ to ensure that we get
+dnl errors, not warnings, about the missing functions
+AC_LANG_PUSH(C++)
+old_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $LARGEFILE_CPPFLAGS"
+AC_FUNC_FSEEKO
+CPPFLAGS="$old_CPPFLAGS"
+AC_LANG_POP()
+if test "$ac_cv_sys_largefile_source" != no; then
+ WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
+fi
+
dnl check for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
WX_C_BIGENDIAN
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="+W 2340 $CXXFLAGS"
+ dnl 4232: "conversion from 'Foo *' to a more strictly aligned type 'Bar *'
+ dnl may cause misaligned access": this might indicate a real problem
+ dnl but any use of GTK+ cast macros results in it so it's unusable
+ dnl for wxGTK code
+ CXXFLAGS="+W 2340,4232 $CXXFLAGS"
fi
dnl DEC/Compaq/HP cxx warnings
fi
fi
-if test "$wxUSE_XLOCALE" == "yes" ; then
+if test "$wxUSE_XLOCALE" = "yes" ; then
AC_DEFINE(wxUSE_XLOCALE)
AC_CHECK_TYPES(locale_t,,,
[#include <xlocale.h>
dnl remark #1419: external declaration in primary source file
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 -Wunused-parameter -Wno-ctor-dtor-privacy"
+ AX_CXXFLAGS_GCC_OPTION(-Woverloaded-virtual, CXXWARNINGS)
fi
AC_SUBST(DEBUG_FLAG)
TOOLKIT_LOWERCASE=xxx
if test "$TOOLKIT" = "MAC"; then
- TOOLKIT_LOWERCASE=osx
+ TOOLKIT_LOWERCASE=osx_carbon
fi
if test "$TOOLKIT" = "OSX_CARBON"; then
- TOOLKIT_LOWERCASE=osx
+ TOOLKIT_LOWERCASE=osx_carbon
fi
if test "$TOOLKIT" = "OSX_COCOA"; then
- TOOLKIT_LOWERCASE=osx
+ TOOLKIT_LOWERCASE=osx_cocoa
fi
if test "$TOOLKIT_LOWERCASE" = "xxx"; then
TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'`