# Configuration used on all platforms

#
# Check version of g++
# (shamelessly stolen from ACE_wrappers/include/makeinclude/wrapper_macros.GNU
#

ifeq ($(findstring g++,$(CXX)),g++)
  ifeq ($(CXX),g++)
    JX_HAS_GNUG_PRE_2_8 := \
      $(shell \
        if $(CXX) --version | egrep '^(cygnus-)?2\.[0-7]' > /dev/null; then \
        echo 1; else echo 0; fi)
    JX_HAS_GNUG_2_95 := \
      $(shell \
        if $(CXX) --version | egrep '^(cygnus-)?2\.95' > /dev/null; then \
        echo 1; else echo 0; fi)
  else  # ! g++
  ifeq (eg++,$(findstring eg++,$(CXX)))
    # Assume that eg++ is egcs.
    JX_HAS_GNUG_PRE_2_8 := 0
    JX_HAS_GNUG_2_95    := 0
  else  # ! plain g++ or eg++
    # CXX is something like g++386.  Assume, for now, that it's an old g++.
    JX_HAS_GNUG_PRE_2_8 := 1
    JX_HAS_GNUG_2_95    := 0
  endif # ! plain g++ or eg++
  endif # ! g++
endif # g++

ifeq ($(JX_HAS_GNUG_PRE_2_8),0)
  J_RAW_SYSTEM_STUFF += -fno-exceptions
endif

ifeq ($(JX_HAS_GNUG_2_95),1)
  J_RAW_SYSTEM_STUFF += -fpermissive
endif
