boinc/m4/sah_largefile_breaks_cxx.m4
Eric J. Korpela 0e47fe1fa6 -Unfortunately on some 32 bit systems there is a problem with wx-widgets
configuring itself for largefile support.  On these systems largefile
     support breaks C++ compiles by defining away many of the C standard library
     routines that should reside in namespace std::.  In order to get around
     problem first we have to check the largefile support macros.  Later we will
     use the macro SAH_LARGEFILE_BREAKS_CXX to check for the breakage.  If
     if breakage is found LARGEFILE_BREAKS_CXX is defined in config.h.  This
     define is checked in std_fixes.h and the appropriate functions are defined
     in order to solve the problem. (These functions were already in place)
     Because these defines affect the behavior of standard library headers,
     std_fixes.h is being included from config.h
    -Added AM_CPPFLAGS, AM_CFLAGS, and AM_CXXFLAGS (for flags common to all
     compiles) so they will be defined in all Makefile.am files.
    -Put #ifdef _cplusplus around the C++ specific items in std_fixes.h so it
     may be included from C source files.

svn path=/trunk/boinc/; revision=5375
2005-02-09 19:39:04 +00:00

28 lines
827 B
Plaintext

# SETI_BOINC is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
AC_DEFUN([SAH_LARGEFILE_BREAKS_CXX],[
AC_MSG_CHECKING([whether largefile support breaks C++])
AC_LANG_PUSH(C++)
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#define CONFIG_TEST
#include <iostream>
]],
[[
std::cout << 1.0 << std::endl;
]])],
[tmp_res="no"],
[AC_DEFINE([LARGEFILE_BREAKS_CXX],[1],
["Define to 1 if largefile support causes missing symbols in C++"] )
tmp_res="yes"
sah_cxx_includes=`echo "#include \"$TOP_BUILD_DIR/lib/std_fixes.h\"" ; echo $sah_cxx_includes`
]
)
AC_MSG_RESULT($tmp_res)
AC_LANG_POP
])