Commit 51a7267b authored by Lynn Garren's avatar Lynn Garren

merge in changes from 1.9

parent 671e0929
......@@ -12,44 +12,48 @@ bin_SCRIPTS = Cast-config
all-local: $(top_builddir)/CLHEP
# create temporary CLHEP header tree
# we only copy headers for packages listed in @PACKAGE@-deps
# search for header directories in the following order:
# 1. $(top_srcdir)/..
# 2. $(CLHEPSOURCE_DIR)/CLHEP
# 3. $(CLHEP_DIR)/CLHEP
# 1. $(top_builddir)/this-package
# 2. $(top_builddir)/../other-packages
# 3. $(CLHEPSOURCE_DIR)/CLHEP
# 4. $(CLHEP_DIR)/include/CLHEP
#
# abs_ => absolute path
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
COPY_P = @COPY_P@
$(top_builddir)/CLHEP:
mkdir $(top_builddir)/CLHEP;
cd $(abs_top_builddir); list=`ls $(abs_top_srcdir)/..`; \
$(top_builddir)/CLHEP: temp-package-dirs
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
if test -d $(abs_top_srcdir)/../"$$pkg"/"$$pkg"; then \
(cd $(abs_top_builddir)/CLHEP; mkdir $$pkg; cd $$pkg; \
hdrs=`ls $(abs_top_srcdir)/../$$pkg/$$pkg`; \
for hdr in $$hdrs; do $(LN_S) $(abs_top_srcdir)/../$$pkg/$$pkg/$$hdr $$hdr; done; \
if test -f $(abs_top_builddir)/../"$$pkg"/"$$pkg"/defs.h; then $(LN_S) $(abs_top_builddir)/../$$pkg/$$pkg/defs.h defs.h; fi; \
if test -f $(abs_top_builddir)/"$$pkg"/defs.h && test ! -e defs.h ; then $(LN_S) $(abs_top_builddir)/$$pkg/defs.h defs.h; fi); \
fi; done
cd $(abs_top_builddir); \
if test -n "$(CLHEPSOURCE_DIR)" && test -d $(CLHEPSOURCE_DIR)/CLHEP; then \
(list=`ls $(CLHEPSOURCE_DIR)/CLHEP`; \
for pkg in $$list; do cd $(abs_top_builddir)/CLHEP; \
if test -d $(CLHEPSOURCE_DIR)/CLHEP/"$$pkg"/"$$pkg" && test ! -d "$$pkg"; then \
(mkdir $$pkg; cd $$pkg; \
hdrs=`ls $(CLHEPSOURCE_DIR)/CLHEP/$$pkg/$$pkg`; \
for hdr in $$hdrs; do $(LN_S) $(CLHEPSOURCE_DIR)/CLHEP/$$pkg/$$pkg/$$hdr $$hdr; done); \
fi; done); fi
cd $(abs_top_builddir); \
if test -n "$(CLHEP_DIR)" && test -d $(CLHEP_DIR)/CLHEP; then \
(list=`ls $(CLHEP_DIR)/CLHEP`; \
for pkg in $$list; do cd $(abs_top_builddir)/CLHEP; \
if test -d $(CLHEP_DIR)/CLHEP/"$$pkg"/"$$pkg" && test ! -d "$$pkg"; then \
(mkdir $$pkg; cd $$pkg; \
hdrs=`ls $(CLHEP_DIR)/CLHEP/$$pkg/$$pkg`; \
for hdr in $$hdrs; do $(LN_S) $(CLHEP_DIR)/CLHEP/$$pkg/$$pkg/$$hdr $$hdr; done); \
fi; done); fi
if test -d "$$pkg" ; then \
(cd $$pkg && $(MAKE) $(AM_MAKEFLAGS) TEMPDIR=$(abs_top_builddir) install-tmpHEADERS) || exit 1 ; \
else \
if test -d ../"$$pkg"/"$$pkg" ; then \
(cd ../$$pkg/$$pkg && $(MAKE) $(AM_MAKEFLAGS) TEMPDIR=$(abs_top_builddir) install-tmpHEADERS) || exit 1 ; \
else \
if test -d $(CLHEPSOURCE_DIR)/CLHEP/"$$pkg"/"$$pkg"; then \
hdrs=`ls $(CLHEPSOURCE_DIR)/CLHEP/$$pkg/$$pkg`; \
for hdr in $$hdrs; do $(COPY_P) $(CLHEPSOURCE_DIR)/CLHEP/$$pkg/$$pkg/$$hdr $(abs_top_builddir)/CLHEP/$$pkg/$$hdr; done; \
else \
if test -n "$(CLHEP_DIR)" && test -d $(CLHEP_DIR)/include/CLHEP; then \
if test -d $(CLHEP_DIR)/include/CLHEP/"$$pkg"; then \
hdrs=`ls $(CLHEP_DIR)/include/CLHEP/$$pkg`; \
for hdr in $$hdrs; do $(COPY_P) $(CLHEP_DIR)/include/CLHEP/$$pkg/$$hdr $(abs_top_builddir)/CLHEP/$$pkg/$$hdr; done; \
fi; \
fi; \
fi; \
fi; \
fi; \
done;
temp-package-dirs:
$(mkinstalldirs) $(abs_top_builddir)/CLHEP;
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
$(mkinstalldirs) $(abs_top_builddir)/CLHEP/$$pkg; \
done;
docs:
cd doc; $(MAKE) $(AM_MAKEFLAGS)
......
......@@ -31,6 +31,7 @@ AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([Cast/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([Cast-deps])
AC_CONFIG_FILES([Cast/copy-header.pl], [chmod +x Cast/copy-header.pl])
# Configuration inquiry program/script:
AC_CONFIG_FILES([Cast-config], [chmod +x Cast-config])
......@@ -50,6 +51,7 @@ AC_SUBST(Cast_CPPFLAGS)
AC_SUBST(Cast_LIBS)
AC_SUBST(Cast_LDFLAGS)
AC_SUBST(COPY_P)
# ----------------------------------------------------------------------
# Supply boilerplate for Cast/defs.h source header:
......@@ -100,7 +102,7 @@ AH_BOTTOM([#endif // CAST_DEFS_H])
# ----------------------------------------------------------------------
# Locate a C++ compiler:
AC_PROG_CXX(g++ c++ aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC gpp)
AC_PROG_CXX(cl g++ c++ aCC CC cxx cc++ FCC KCC RCC xlC_r xlC gpp)
# Use it hereinafter:
AC_LANG(C++)
......@@ -112,64 +114,64 @@ AC_REQUIRE_CPP
case "$target" in
*-*-win32*)
case "$CXX" in
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";;
g++) CXXFLAGS="-O";;
c++) CXXFLAGS="-O";;
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";COPY_P="copy -p";;
g++) CXXFLAGS="-O";COPY_P="copy -p";;
c++) CXXFLAGS="-O";COPY_P="copy -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-cygwin*)
case "$CXX" in
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-solaris*)
case "$CXX" in
CC) CXXFLAGS="-O -mt";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
CC) CXXFLAGS="-O -mt";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-linux*)
case "$CXX" in
g++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
alpha*-dec-osf*)
case "$CXX" in
cxx) CXXFLAGS="-O -std strict_ansi -timplicit_local";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
cxx) CXXFLAGS="-O -std strict_ansi -timplicit_local";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-hpux*)
case "$CXX" in
aCC) CXXFLAGS="-O -Aa +DAportable +Onolimit";;
CC) CXXFLAGS="+O3 +DAportable +a1 -z -pta +Onolimit";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
aCC) CXXFLAGS="-O -Aa +DAportable +Onolimit";COPY_P="cp -p";;
CC) CXXFLAGS="+O3 +DAportable +a1 -z -pta +Onolimit";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-aix*)
case "$CXX" in
xlC) CXXFLAGS="-O3 -qtwolink -+";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
xlC) CXXFLAGS="-O3 -qtwolink -+";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-irix*)
case "$CXX" in
CC) CXXFLAGS="-O -OPT:Olimit=0 -pta";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
CC) CXXFLAGS="-O -OPT:Olimit=0 -pta";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
powerpc-apple-darwin*)
case "$CXX" in
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
esac
......@@ -189,6 +191,7 @@ esac
# Check for needed header files:
# ----------------------------------------------------------------------
AC_CHECK_HEADERS([sstream])
# ----------------------------------------------------------------------
# Check for needed typedefs, structures, and compiler characteristics:
......
......@@ -10,9 +10,13 @@
// ----------------------------------------------------------------------
#include "CLHEP/Cast/itos.h"
#include "CLHEP/Cast/defs.h"
#if HAVE_SSTREAM
#include <sstream>
#else
#include "CLHEP/Cast/StringStream.h"
#endif
#include "CLHEP/Cast/itos.h"
std::string itos( long i ) {
......
Thu Nov 06 2003 Lynn Garren <garren@fnal.gov>
* adding ZOOM Exceptions package for FNAL
* adding supporting RefCount and Cast packages
Fri Oct 24 2003 Lynn Garren <garren@fnal.gov>
* tagged for CLHEP 2.0.0.0
......
......@@ -9,7 +9,7 @@ top level directory, or you may build any package separately.
# about linking
#-------------------------------------------------------------
CLHEP builds libraries for each package instead of a single CLHEP library.
CLHEP builds libraries for each package in addition to a single CLHEP library.
This alllows you to link with only the necessary parts of CLHEP.
We provide a "clheplib" script which gives the list of libraries to link,
in the correct order. The script can be embedded in a makefile.
......@@ -53,6 +53,9 @@ of the options that you are likely to find most useful.
[default is the same as PREFIX]
--disable-shared build only static libraries
--disable-static build only shared libraries
--enable-exceptions use the CLHEP/Exceptions package
--disable-exceptions DO NOT use the CLHEP/Exceptions package
[--disable-exceptions is the default]
#-------------------------------------------------------------
# building documents
......
......@@ -2,7 +2,9 @@
includedir = $(prefix)/include/CLHEP
SUBDIRS = Vector Evaluator GenericFunctions Geometry Matrix Random RandomObjects Units Utilities HepPDT HepMC StdHep
SUBDIRS = Units Vector Evaluator GenericFunctions Geometry \
Random Matrix RandomObjects HepPDT HepMC StdHep \
RefCount Cast Exceptions
bin_SCRIPTS = clheplib
......@@ -33,7 +35,7 @@ install-docs:
done
clheplib: build-clheplib
build-clheplib $(SUBDIRS)
./build-clheplib $(SUBDIRS)
install-exec-local: install-LTCLHEPLIB
......
......@@ -12,44 +12,48 @@ bin_SCRIPTS = RefCount-config
all-local: $(top_builddir)/CLHEP
# create temporary CLHEP header tree
# we only copy headers for packages listed in @PACKAGE@-deps
# search for header directories in the following order:
# 1. $(top_srcdir)/..
# 2. $(CLHEPSOURCE_DIR)/CLHEP
# 3. $(CLHEP_DIR)/CLHEP
# 1. $(top_builddir)/this-package
# 2. $(top_builddir)/../other-packages
# 3. $(CLHEPSOURCE_DIR)/CLHEP
# 4. $(CLHEP_DIR)/include/CLHEP
#
# abs_ => absolute path
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
COPY_P = @COPY_P@
$(top_builddir)/CLHEP:
mkdir $(top_builddir)/CLHEP;
cd $(abs_top_builddir); list=`ls $(abs_top_srcdir)/..`; \
$(top_builddir)/CLHEP: temp-package-dirs
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
if test -d $(abs_top_srcdir)/../"$$pkg"/"$$pkg"; then \
(cd $(abs_top_builddir)/CLHEP; mkdir $$pkg; cd $$pkg; \
hdrs=`ls $(abs_top_srcdir)/../$$pkg/$$pkg`; \
for hdr in $$hdrs; do $(LN_S) $(abs_top_srcdir)/../$$pkg/$$pkg/$$hdr $$hdr; done; \
if test -f $(abs_top_builddir)/../"$$pkg"/"$$pkg"/defs.h; then $(LN_S) $(abs_top_builddir)/../$$pkg/$$pkg/defs.h defs.h; fi; \
if test -f $(abs_top_builddir)/"$$pkg"/defs.h && test ! -e defs.h ; then $(LN_S) $(abs_top_builddir)/$$pkg/defs.h defs.h; fi); \
fi; done
cd $(abs_top_builddir); \
if test -n "$(CLHEPSOURCE_DIR)" && test -d $(CLHEPSOURCE_DIR)/CLHEP; then \
(list=`ls $(CLHEPSOURCE_DIR)/CLHEP`; \
for pkg in $$list; do cd $(abs_top_builddir)/CLHEP; \
if test -d $(CLHEPSOURCE_DIR)/CLHEP/"$$pkg"/"$$pkg" && test ! -d "$$pkg"; then \
(mkdir $$pkg; cd $$pkg; \
hdrs=`ls $(CLHEPSOURCE_DIR)/CLHEP/$$pkg/$$pkg`; \
for hdr in $$hdrs; do $(LN_S) $(CLHEPSOURCE_DIR)/CLHEP/$$pkg/$$pkg/$$hdr $$hdr; done); \
fi; done); fi
cd $(abs_top_builddir); \
if test -n "$(CLHEP_DIR)" && test -d $(CLHEP_DIR)/CLHEP; then \
(list=`ls $(CLHEP_DIR)/CLHEP`; \
for pkg in $$list; do cd $(abs_top_builddir)/CLHEP; \
if test -d $(CLHEP_DIR)/CLHEP/"$$pkg"/"$$pkg" && test ! -d "$$pkg"; then \
(mkdir $$pkg; cd $$pkg; \
hdrs=`ls $(CLHEP_DIR)/CLHEP/$$pkg/$$pkg`; \
for hdr in $$hdrs; do $(LN_S) $(CLHEP_DIR)/CLHEP/$$pkg/$$pkg/$$hdr $$hdr; done); \
fi; done); fi
if test -d "$$pkg" ; then \
(cd $$pkg && $(MAKE) $(AM_MAKEFLAGS) TEMPDIR=$(abs_top_builddir) install-tmpHEADERS) || exit 1 ; \
else \
if test -d ../"$$pkg"/"$$pkg" ; then \
(cd ../$$pkg/$$pkg && $(MAKE) $(AM_MAKEFLAGS) TEMPDIR=$(abs_top_builddir) install-tmpHEADERS) || exit 1 ; \
else \
if test -d $(CLHEPSOURCE_DIR)/CLHEP/"$$pkg"/"$$pkg"; then \
hdrs=`ls $(CLHEPSOURCE_DIR)/CLHEP/$$pkg/$$pkg`; \
for hdr in $$hdrs; do $(COPY_P) $(CLHEPSOURCE_DIR)/CLHEP/$$pkg/$$pkg/$$hdr $(abs_top_builddir)/CLHEP/$$pkg/$$hdr; done; \
else \
if test -n "$(CLHEP_DIR)" && test -d $(CLHEP_DIR)/include/CLHEP; then \
if test -d $(CLHEP_DIR)/include/CLHEP/"$$pkg"; then \
hdrs=`ls $(CLHEP_DIR)/include/CLHEP/$$pkg`; \
for hdr in $$hdrs; do $(COPY_P) $(CLHEP_DIR)/include/CLHEP/$$pkg/$$hdr $(abs_top_builddir)/CLHEP/$$pkg/$$hdr; done; \
fi; \
fi; \
fi; \
fi; \
fi; \
done;
temp-package-dirs:
$(mkinstalldirs) $(abs_top_builddir)/CLHEP;
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
$(mkinstalldirs) $(abs_top_builddir)/CLHEP/$$pkg; \
done;
docs:
cd doc; $(MAKE) $(AM_MAKEFLAGS)
......
CLHEP-@PACKAGE@-@VERSION@ CLHEP-@PACKAGE@-@VERSION@
CLHEP-@PACKAGE@-@VERSION@ CLHEP-Cast-@VERSION@
CLHEP-@PACKAGE@-@VERSION@ CLHEP-RefCount-@VERSION@
## Process this file with automake to produce Makefile.in
includedir = $(prefix)/include/CLHEP
tempincludedir = $(TEMPDIR)/CLHEP/@PACKAGE@
COPY_P = @COPY_P@
pkginclude_HEADERS = \
ZMhandleTo.h \
......@@ -11,3 +13,15 @@ pkginclude_HEADERS = \
# Identify generated file(s) to be removed when 'make clean' is requested:
CLEANFILES = defs.h
# copy headers into $(tempincludedir)
install-tmpHEADERS:
@echo " install headers in $(tempincludedir) "
@list='$(pkginclude_HEADERS)'; \
if test $(tempincludedir); then \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
./copy-header.pl $$d$$p $(tempincludedir)/$$f; \
done; \
fi; test -z "$$fail"
#!/usr/bin/env perl
#
# copy a header into the temporary CLHEP header tree if
# a) the header is not already there
# b) the source is newer
#
if ($#ARGV != 1) {
print "mungeit requires two arguments - exit\n";
exit;
} else {
$source_header=$ARGV[0];
$dest_header=$ARGV[1];
&check_header;
}
exit;
sub check_header {
# make sure source exists
if ( ! -e $source_header ) {
print "$source_header does not exist - exit\n";
exit;
}
# copy if not already there - otherwise, check the time stamp
if ( ! -e $dest_header ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
} else {
$source_header_time = -M $source_header;
$dest_header_time = -M $dest_header;
# copy only if source is newer
if( $source_header_time < $dest_header_time ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
}
}
}
......@@ -31,6 +31,7 @@ AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([RefCount/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([RefCount-deps])
AC_CONFIG_FILES([RefCount/copy-header.pl], [chmod +x RefCount/copy-header.pl])
# Configuration inquiry program/script:
AC_CONFIG_FILES([RefCount-config], [chmod +x RefCount-config])
......@@ -47,6 +48,7 @@ AC_SUBST(RefCount_CPPFLAGS)
AC_SUBST(RefCount_LIBS)
AC_SUBST(RefCount_LDFLAGS)
AC_SUBST(COPY_P)
# ----------------------------------------------------------------------
# Supply boilerplate for RefCount/defs.h source header:
......@@ -97,7 +99,7 @@ AH_BOTTOM([#endif // REFCOUNT_DEFS_H])
# ----------------------------------------------------------------------
# Locate a C++ compiler:
AC_PROG_CXX(g++ c++ aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC gpp)
AC_PROG_CXX(cl g++ c++ aCC CC cxx cc++ FCC KCC RCC xlC_r xlC gpp)
# Use it hereinafter:
AC_LANG(C++)
......@@ -109,64 +111,64 @@ AC_REQUIRE_CPP
case "$target" in
*-*-win32*)
case "$CXX" in
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";;
g++) CXXFLAGS="-O";;
c++) CXXFLAGS="-O";;
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";COPY_P="copy -p";;
g++) CXXFLAGS="-O";COPY_P="copy -p";;
c++) CXXFLAGS="-O";COPY_P="copy -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-cygwin*)
case "$CXX" in
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-solaris*)
case "$CXX" in
CC) CXXFLAGS="-O -mt";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
CC) CXXFLAGS="-O -mt";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-linux*)
case "$CXX" in
g++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
alpha*-dec-osf*)
case "$CXX" in
cxx) CXXFLAGS="-O -std strict_ansi -timplicit_local";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
cxx) CXXFLAGS="-O -std strict_ansi -timplicit_local";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-hpux*)
case "$CXX" in
aCC) CXXFLAGS="-O -Aa +DAportable +Onolimit";;
CC) CXXFLAGS="+O3 +DAportable +a1 -z -pta +Onolimit";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
aCC) CXXFLAGS="-O -Aa +DAportable +Onolimit";COPY_P="cp -p";;
CC) CXXFLAGS="+O3 +DAportable +a1 -z -pta +Onolimit";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-aix*)
case "$CXX" in
xlC) CXXFLAGS="-O3 -qtwolink -+";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
xlC) CXXFLAGS="-O3 -qtwolink -+";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-irix*)
case "$CXX" in
CC) CXXFLAGS="-O -OPT:Olimit=0 -pta";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
CC) CXXFLAGS="-O -OPT:Olimit=0 -pta";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
powerpc-apple-darwin*)
case "$CXX" in
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
esac
......
......@@ -41,6 +41,8 @@ AC_SUBST(Utilities_CPPFLAGS)
AC_SUBST(Utilities_LIBS)
AC_SUBST(Utilities_LDFLAGS)
AC_SUBST(COPY_P)
# ----------------------------------------------------------------------
# Supply boilerplate for Utilities/defs.h source header:
......@@ -91,7 +93,7 @@ AH_BOTTOM([#endif // UTILITIES_DEFS_H])
# ----------------------------------------------------------------------
# Locate a C++ compiler:
AC_PROG_CXX(g++ c++ aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC gpp)
AC_PROG_CXX(cl g++ c++ aCC CC cxx cc++ FCC KCC RCC xlC_r xlC gpp)
# Use it hereinafter:
AC_LANG(C++)
......@@ -103,64 +105,64 @@ AC_REQUIRE_CPP
case "$target" in
*-*-win32*)
case "$CXX" in
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";;
g++) CXXFLAGS="-O";;
c++) CXXFLAGS="-O";;
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";COPY_P="copy -p";;
g++) CXXFLAGS="-O";COPY_P="copy -p";;
c++) CXXFLAGS="-O";COPY_P="copy -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-cygwin*)
case "$CXX" in
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-solaris*)
case "$CXX" in
CC) CXXFLAGS="-O -mt";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
CC) CXXFLAGS="-O -mt";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-linux*)
case "$CXX" in
g++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
alpha*-dec-osf*)
case "$CXX" in
cxx) CXXFLAGS="-O -std strict_ansi -timplicit_local";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
cxx) CXXFLAGS="-O -std strict_ansi -timplicit_local";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-hpux*)
case "$CXX" in
aCC) CXXFLAGS="-O -Aa +DAportable +Onolimit";;
CC) CXXFLAGS="+O3 +DAportable +a1 -z -pta +Onolimit";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
aCC) CXXFLAGS="-O -Aa +DAportable +Onolimit";COPY_P="cp -p";;
CC) CXXFLAGS="+O3 +DAportable +a1 -z -pta +Onolimit";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-aix*)
case "$CXX" in
xlC) CXXFLAGS="-O3 -qtwolink -+";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
xlC) CXXFLAGS="-O3 -qtwolink -+";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
*-*-irix*)
case "$CXX" in
CC) CXXFLAGS="-O -OPT:Olimit=0 -pta";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";;
CC) CXXFLAGS="-O -OPT:Olimit=0 -pta";COPY_P="cp -p";;
g++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
c++) CXXFLAGS="-O -ansi -pedantic -Wall";COPY_P="cp -p";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
powerpc-apple-darwin*)