r2042 - in cgm/trunk: . compat compat/new geom/ACIS_SRC
Author: kraftche Date: 2008-08-18 11:40:10 -0500 (Mon, 18 Aug 2008) New Revision: 2042 Added: cgm/trunk/compat/ cgm/trunk/compat/new/ cgm/trunk/compat/new/new.h Modified: cgm/trunk/configure.in cgm/trunk/geom/ACIS_SRC/Makefile.am Log: As of version 4.3, g++ no longer includes backwards-compatible headers ending in '.h' for C++ standard headers. ACIS (at least up to version 16) includes "new.h" in many headers that are included indirectly by CGM code. Provide our own version of new.h and conditionally use it if building with ACIS support and the system does not provide a new.h. Added: cgm/trunk/compat/new/new.h =================================================================== --- cgm/trunk/compat/new/new.h (rev 0) +++ cgm/trunk/compat/new/new.h 2008-08-18 16:40:10 UTC (rev 2042) @@ -0,0 +1,11 @@ +#include <new> + +// According to section 18.4 of the 2005-10-19 working draft +// of the C++ Standard (Doc no: N1905=05-0165), these are the +// symbols defined in the <new> header. + +using std::bad_alloc; +using std::nothrow_t; +using std::nothrow; +using std::new_handler; +using std::set_new_handler; Modified: cgm/trunk/configure.in =================================================================== --- cgm/trunk/configure.in 2008-08-18 15:49:44 UTC (rev 2041) +++ cgm/trunk/configure.in 2008-08-18 16:40:10 UTC (rev 2042) @@ -193,6 +193,17 @@ dnl AC_DEFINE( HAVE_ACIS ) HAVE_ACIS_DEF=-DHAVE_ACIS fi + +# ACIS (at least up to version 16) requires new.h. +# Newer C++ compilers may not provide this backwards-compatibility +# file. Check if it is present, and if not, use our own. +ACIS_NEW_COMPAT_INC='-I${top_srcdir}/compat/new' +if test "x$ACIS_DIR" != "xno"; then + AC_LANG_PUSH(C++) + AC_CHECK_HEADER([new.h],[],[ACIS_INCLUDES="$ACIS_INCLUDES $ACIS_NEW_COMPAT_INC"]) + AC_LANG_POP(C++) +fi + AC_SUBST(ACIS_DEFS) AC_SUBST(ACIS_DIR) AC_SUBST(ACIS_LINK_FLAGS) Modified: cgm/trunk/geom/ACIS_SRC/Makefile.am =================================================================== --- cgm/trunk/geom/ACIS_SRC/Makefile.am 2008-08-18 15:49:44 UTC (rev 2041) +++ cgm/trunk/geom/ACIS_SRC/Makefile.am 2008-08-18 16:40:10 UTC (rev 2042) @@ -9,7 +9,7 @@ INCLUDES = -I$(top_srcdir)/util \ -I$(top_srcdir)/geom \ -I$(srcdir)/gtcAttrib/incl \ - -I$(ACIS_DIR)/include + $(ACIS_INCLUDES) # The name of the library to build noinst_LTLIBRARIES = libcubit_ACIS.la
participants (1)
-
kraftche@mcs.anl.gov