summaryrefslogtreecommitdiff
path: root/include/makeinclude
diff options
context:
space:
mode:
authorcrodrigu <crodrigu@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-03-15 04:58:11 +0000
committercrodrigu <crodrigu@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-03-15 04:58:11 +0000
commit228c7f8d7362f461711b0e8ec3471b8f6d499171 (patch)
tree0fef309a708839029026f1d46f37b4680115e80a /include/makeinclude
parent48a8dc1cb4e212d5671f257d8fce1add8128968a (diff)
downloadATCD-228c7f8d7362f461711b0e8ec3471b8f6d499171.tar.gz
ChangeLogTag: Fri Mar 15 00:16:06 2002 Craig Rodrigues <crodrigu@bbn.com>
Diffstat (limited to 'include/makeinclude')
-rw-r--r--include/makeinclude/platform_freebsd.GNU35
-rw-r--r--include/makeinclude/platform_netbsd.GNU33
2 files changed, 67 insertions, 1 deletions
diff --git a/include/makeinclude/platform_freebsd.GNU b/include/makeinclude/platform_freebsd.GNU
index 631ad555c72..ec19e671667 100644
--- a/include/makeinclude/platform_freebsd.GNU
+++ b/include/makeinclude/platform_freebsd.GNU
@@ -13,8 +13,41 @@ debug = 1
CC = gcc
CXX = g++
+
+CXX_VERSION := $(shell $(CXX) -dumpversion)
+
+# If no option has been specified, try to enable implicit_templates based
+# on the version of the compiler.
+#
+ifeq ($(implicit_templates),)
+ ifeq (2.95,$(findstring 2.95,$(CXX_VERSION)))
+ implicit_templates = 1
+ else
+ ifeq (3.,$(findstring 3.,$(CXX_VERSION)))
+ implicit_templates = 1
+ endif
+ ifeq (2.96,$(findstring 2.96,$(CXX_VERSION)))
+ implicit_templates = 1
+ endif
+ endif
+endif
+
+# User didn't specify and we couldn't guess if this version of the compiler
+# works fine with implicit template instantiation. Turn if off. This could
+# as well go into the previous check but GNU Make conditionals are lame.
+#
+ifeq ($(implicit_templates),)
+ implicit_templates = 0
+endif
+
+ifeq ($(implicit_templates),0)
+ ifeq ($(IMPLICIT_TEMPLATES_FLAG),) # Turn on flags if none is speficied.
+ IMPLICIT_TEMPLATES_FLAG=-fno-implicit-templates
+ endif
+endif
+
CFLAGS += -W -Wall -Wpointer-arith -pipe
-CCFLAGS += $(CFLAGS) -fno-implicit-templates
+CCFLAGS += $(CFLAGS) $(IMPLICIT_TEMPLATES_FLAG)
DCFLAGS += -g
ifneq ($(VERSION),3)
LDFLAGS += -Wl,-rpath $(ACE_ROOT)/ace
diff --git a/include/makeinclude/platform_netbsd.GNU b/include/makeinclude/platform_netbsd.GNU
index d9e08b01139..9616ce54193 100644
--- a/include/makeinclude/platform_netbsd.GNU
+++ b/include/makeinclude/platform_netbsd.GNU
@@ -11,6 +11,39 @@ versioned_so = 1
CC = gcc
CXX = g++
+
+CXX_VERSION := $(shell $(CXX) -dumpversion)
+
+# If no option has been specified, try to enable implicit_templates based
+# on the version of the compiler.
+#
+ifeq ($(implicit_templates),)
+ ifeq (2.95,$(findstring 2.95,$(CXX_VERSION)))
+ implicit_templates = 1
+ else
+ ifeq (3.,$(findstring 3.,$(CXX_VERSION)))
+ implicit_templates = 1
+ endif
+ ifeq (2.96,$(findstring 2.96,$(CXX_VERSION)))
+ implicit_templates = 1
+ endif
+ endif
+endif
+
+# User didn't specify and we couldn't guess if this version of the compiler
+# works fine with implicit template instantiation. Turn if off. This could
+# as well go into the previous check but GNU Make conditionals are lame.
+#
+ifeq ($(implicit_templates),)
+ implicit_templates = 0
+endif
+
+ifeq ($(implicit_templates),0)
+ ifeq ($(IMPLICIT_TEMPLATES_FLAG),) # Turn on flags if none is speficied.
+ IMPLICIT_TEMPLATES_FLAG=-fno-implicit-templates
+ endif
+endif
+
CFLAGS += -w -fno-strict-prototypes
CCFLAGS += $(CFLAGS) -fno-implicit-templates
DCFLAGS += -g