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" = "xyes"; then
- CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
+ if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
+ WX_LARGEFILE_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
else
- CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
+ WX_LARGEFILE_FLAGS="-D_LARGE_FILES"
fi
+ CPPFLAGS="$CPPFLAGS $WX_LARGEFILE_FLAGS"
fi
dnl check for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
fi
if test "$USE_DARWIN" = 1; then
- // Mac OS X/Darwin GCC uses precompiled headers by default
- // this can cause problems both when compiling wxMac and wxBase
+ dnl Mac OS X/Darwin GCC uses precompiled headers by default
+ dnl this can cause problems both when compiling wxMac and wxBase
if test "$wxUSE_PRECOMP" = "yes"; then
CPPFLAGS="$CPPFLAGS -cpp-precomp"
else
for libp in "" " -lXp"; do
if test "$libs_found" = "0"; then
for libsm_ice in " -lSM -lICE"; do
- if test "$libs_found" = "0"; then
+ if test "$libs_found" = "0"; then
save_LIBS="$LIBS"
LIBS="$GUI_TK_LIBRARY -lXm${xpm_link} ${libp} -lXmu -lXext -lXt${libsm_ice} -lX11"
save_CFLAGS=$CFLAGS
case "${host}" in
*-hp-hpux* )
dnl default settings are good for gcc but not for the native HP-UX
- if test "$GCC" == "yes"; then
- SHARED_LD="${SHARED_LD} ${PIC_FLAG}"
+ if test "$GCC" = "yes"; then
+ dnl -o flag must be after PIC flag
+ SHARED_LD="${CXX} -shared ${PIC_FLAG} -o"
else
dnl no idea why it wants it, but it does
LDFLAGS="$LDFLAGS -L/usr/lib"
*-aix* | *-freebsd*)
flag="-D_THREAD_SAFE"
;;
+ *-hp-hpux* )
+ flag="-D_REENTRANT"
+ ;;
*solaris* | alpha*-osf*)
flag="-D_REENTRANT"
;;
if test "$wxUSE_THREADS" = "yes" ; then
case "${host}" in
*-*-mingw32* )
- CFLAGS="$CFLAGS -mthreads"
- CXXFLAGS="$CXXFLAGS -mthreads"
- TOOLCHAIN_DEFS="$TOOLCHAIN_DEFS -mthreads"
- LDFLAGS="$LDFLAGS -mthreads"
+ dnl check if the compiler accepts -mthreads
+ AC_CACHE_CHECK([if compiler supports -mthreads],
+ wx_cv_cflags_mthread,
+ [
+ CFLAGS_OLD="$CFLAGS"
+ CFLAGS="$CFLAGS -mthreads"
+ AC_TRY_COMPILE([], [],
+ wx_cv_cflags_mthread=yes,
+ wx_cv_cflags_mthread=no
+ )
+ ]
+ )
+
+ if test "$wx_cv_cflags_mthread" = "yes"; then
+ dnl it does, use it
+ CXXFLAGS="$CXXFLAGS -mthreads"
+ TOOLCHAIN_DEFS="$TOOLCHAIN_DEFS -mthreads"
+ LDFLAGS="$LDFLAGS -mthreads"
+ else
+ dnl it doesn't
+ CFLAGS="$CFLAGS_OLD"
+ fi
;;
esac
fi
if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then
-dnl There is now experimental generic MDI support
+dnl There is now experimental generic MDI support
dnl if test "$wxUSE_UNIVERSAL" = "yes"; then
dnl AC_MSG_WARN(MDI not yet supported for wxUniversal... disabled)
dnl wxUSE_MDI_ARCHITECTURE=no
AC_SUBST(WXCONFIG_LIBS_STATIC_GL)
AC_SUBST(WXCONFIG_INCLUDE)
AC_SUBST(WXCONFIG_RPATH)
+AC_SUBST(WX_LARGEFILE_FLAGS)
dnl the list of files to compile/install
AC_SUBST(ALL_OBJECTS)