Commit 119c1990 authored by Lynn Garren's avatar Lynn Garren
Browse files

new utility packages for Exceptions

parent e02a79ff
Makefile.in
configure
aclocal.m4
autom4te.cache
config.h.in
#! /bin/sh
# @configure_input@
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
usage()
{
cat >2 <<EOF
Usage: Cast-config [OPTION]
Known values for OPTION are:
--prefix show installation prefix
--cxx print compilation command
--cppflags print pre-processor flags
--cxxflags print C++ compiler flags
--ldflags print linker flags
--libs print libraries to link against
--help display this help and exit
--version output version information
EOF
exit $1
}
if test $# -eq 0; then
usage 1
fi
while test $# -gt 0; do
case "$1" in
-*=*)
optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
;;
*)
optarg=
;;
esac
case "$1" in
--prefix=*)
prefix="$optarg"
;;
--prefix)
echo "$prefix"
;;
--version)
echo @PACKAGE@ @VERSION@
exit 0
;;
--help)
usage 0
;;
--cxx)
echo @CXX@
;;
--cppflags)
echo @AM_CPPFLAGS@ @CPPFLAGS@ @Cast_CPPFLAGS@
;;
--cxxflags)
echo @AM_CXXFLAGS@ @CXXFLAGS@
;;
--ldflags)
echo @AM_LDFLAGS@ @LDFLAGS@ @Cast_LDFLAGS@
;;
--libs)
echo @LIBS@ @Cast_LIBS@ -lm
;;
*)
usage
exit 1
;;
esac
shift
done
exit 0
CLHEP-@PACKAGE@-@VERSION@ CLHEP-@PACKAGE@-@VERSION@
Makefile.in
defs.h.in
## Process this file with automake to produce Makefile.in
includedir = $(prefix)/include/CLHEP
pkginclude_HEADERS = \
itos.h \
defs.h
# Identify generated file(s) to be removed when 'make clean' is requested:
CLEANFILES = defs.h
// ----------------------------------------------------------------------
//
// itos - convert (long) integer to string
//
// History:
// 19-Dec-1997 WEB Initial draft
// 14-Feb-2000 WEB Improve C++ Standard compliance
//
// ----------------------------------------------------------------------
#ifndef STRING_INCLUDED
#define STRING_INCLUDED
#include <string>
#endif
std::string itos( long i );
#-------------------------------------------------------------
# installing from a source code tar ball
#-------------------------------------------------------------
Unwind the source code tar ball in some relevant directory.
Autoconf and automake will aready have been run.
Determine where the files will be installed.
Create a build directory that is NOT in the source code directory tree.
cd <build_directory>
<source_code_direcotry>/configure --prefix=<install_dir>
(Note that files will be installed under /usr/local if you do not
specify a prefix.)
make
(Build temporary copies of libraries and executables.)
make check
(Run the tests.)
make install
(Copy libraries, headers, executables, etc. to relevant
subdirectories under <install_dir>.)
#-------------------------------------------------------------
# building from cvs
#-------------------------------------------------------------
You will need current versions of automake, autoconf, and libtool.
See building autotools below.
cvs co CLHEP/package OR cvs co package
cd [CLHEP/]package
bootstrap
Now continue with directions as if you unpacked a source code tarball.
#-------------------------------------------------------------
# building autotools
#-------------------------------------------------------------
If you do not have at least autoconf 2.57 and automake 1.6, you will
need to build autoconf, automake, and libtool. On some platforms,
you may also need to build m4 and texinfo.
Download the relevant tarballs from gnu.org.
Untar them in a common source code tree.
Decide whether you want to install them in /usr/local or your own
install directory. If you use your own install directory, use
--prefix=<install_dir>
with configure.
For each autotool package:
<source_code_dir>/configure [--prefix=<install_dir>]
make
make install
Make sure that <install_dir>/bin is at the front of your path.
#-------------------------------------------------------------
## Process this file with automake to produce Makefile.in
includedir = $(prefix)/include/CLHEP
# put . first so that CLHEP directory is built before anything else
SUBDIRS = Cast . src
# list all subdirectories - for distribution and cleaning
DIST_SUBDIRS = Cast . src
bin_SCRIPTS = Cast-config
all-local: $(top_builddir)/CLHEP
# create temporary CLHEP header tree
# search for header directories in the following order:
# 1. $(top_srcdir)/..
# 2. $(CLHEPSOURCE_DIR)/CLHEP
# 3. $(CLHEP_DIR)/CLHEP
#
# abs_ => absolute path
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
$(top_builddir)/CLHEP:
mkdir $(top_builddir)/CLHEP;
cd $(abs_top_builddir); list=`ls $(abs_top_srcdir)/..`; \
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
docs:
cd doc; $(MAKE) $(AM_MAKEFLAGS)
install-docs:
cd doc; $(MAKE) $(AM_MAKEFLAGS) install-docs
# extra clean rule
clean-local:
rm -rf $(top_builddir)/CLHEP
config.sub
config.guess
depcomp
install-sh
missing
mkinstalldirs
This diff is collapsed.
#! /bin/sh
# run autotool commands
set -x
aclocal -I autotools
autoheader
automake --add-missing --copy
autoconf
# ready to make a source code distribution tarball
# ======================================================================
# This is the Cast configuration input file
# Process this file with autoconf to produce a configure script.
# ======================================================================
# ----------------------------------------------------------------------
# Identify the package and initialize the autotools:
# ----------------------------------------------------------------------
AC_PREREQ(2.57)
AC_INIT(CLHEP Cast, 1.9.0.0, CLHEP@cern.ch, Cast)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/itos.cc])
AM_INIT_AUTOMAKE(1.6 foreign)
AC_PROG_LIBTOOL
AC_PROG_LN_S
AC_PROG_INSTALL
# ----------------------------------------------------------------------
# Identify the files that 'configure' is to produce:
# ----------------------------------------------------------------------
# Header containing #defines:
AM_CONFIG_HEADER([Cast/defs.h])
# Makefiles:
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([Cast/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([Cast-deps])
# Configuration inquiry program/script:
AC_CONFIG_FILES([Cast-config], [chmod +x Cast-config])
# Test driver program/script:
##AC_CONFIG_FILES([test/sizeFixedTypes.sh], [chmod +x test/sizeFixedTypes.sh])
# ----------------------------------------------------------------------
# Capture post-install information:
# ----------------------------------------------------------------------
Cast_CPPFLAGS="-I$includedir"
Cast_LDFLAGS="-L$libdir"
Cast_LIBS="-lCLHEP-$PACKAGE-$VERSION"
AC_SUBST(Cast_CPPFLAGS)
AC_SUBST(Cast_LIBS)
AC_SUBST(Cast_LDFLAGS)
# ----------------------------------------------------------------------
# Supply boilerplate for Cast/defs.h source header:
# ----------------------------------------------------------------------
AH_TOP([#ifndef CAST_DEFS_H
#define CAST_DEFS_H])
## the undefs are converted by configure
AH_VERBATIM([PACKAGE],[/* Name of package */
#ifndef PACKAGE
#undef PACKAGE
#endif])
AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#undef PACKAGE_BUGREPORT
#endif])
AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#undef PACKAGE_NAME
#endif])
AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#undef PACKAGE_STRING
#endif])
AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#undef PACKAGE_TARNAME
#endif])
AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#undef PACKAGE_VERSION
#endif])
AH_VERBATIM([VERSION],[/* Version number of package */
#ifndef VERSION
#undef VERSION
#endif])
## backwards compatibility
AH_VERBATIM([ENABLE_BACKWARDS_COMPATIBILITY],[/* backwards compatibility will be enabled ONLY in CLHEP 1.9 */
#ifndef ENABLE_BACKWARDS_COMPATIBILITY
#define ENABLE_BACKWARDS_COMPATIBILITY
#endif])
AH_BOTTOM([#endif // CAST_DEFS_H])
# ----------------------------------------------------------------------
# Account for any user configuration options:
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Check for needed programs:
# ----------------------------------------------------------------------
# Locate a C++ compiler:
AC_PROG_CXX(g++ c++ aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC gpp)
# Use it hereinafter:
AC_LANG(C++)
# Ensure we've found a preprocessor:
AC_REQUIRE_CPP
# worry about compiler flags
case "$target" in
*-*-win32*)
case "$CXX" in
cl) CXXFLAGS="-DWIN32 -O -GX -GR -MD";;
g++) CXXFLAGS="-O";;
c++) CXXFLAGS="-O";;
*) 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";;
*) 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";;
*) 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";;
*) 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";;
*) 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";;
*) 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";;
*) 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";;
*) 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";;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac;;
esac
# ----------------------------------------------------------------------
# Set system-dependent options:
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Check for needed libraries:
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Check for needed header files:
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Check for needed typedefs, structures, and compiler characteristics:
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Check for needed library functions:
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Finish up:
# ----------------------------------------------------------------------
AC_OUTPUT
# ======================================================================
## Process this file with automake to produce Makefile.in
INCLUDES = -I$(top_builddir)
lib_LTLIBRARIES = libCLHEP-Cast-@VERSION@.la
libCLHEP_Cast_@VERSION@_la_SOURCES = \
itos.cc
// ----------------------------------------------------------------------
//
// itos - convert (long) integer to string
//
// History:
// 19-Dec-1997 WEB Initial draft
// 05-Dec-1998 WEB Added "using" statement
// 14-Feb-2000 WEB Improve C++ Standard compliance
//
// ----------------------------------------------------------------------
#include "CLHEP/Cast/itos.h"
#include <sstream>
std::string itos( long i ) {
std::ostringstream s;
s << i;
return s.str();
} // itos()
Makefile.in
configure
aclocal.m4
autom4te.cache
config.h.in
#-------------------------------------------------------------
# installing from a source code tar ball
#-------------------------------------------------------------
Unwind the source code tar ball in some relevant directory.
Autoconf and automake will aready have been run.
Determine where the files will be installed.
Create a build directory that is NOT in the source code directory tree.
cd <build_directory>
<source_code_direcotry>/configure --prefix=<install_dir>
(Note that files will be installed under /usr/local if you do not
specify a prefix.)
make
(Build temporary copies of libraries and executables.)
make check
(Run the tests.)
make install
(Copy libraries, headers, executables, etc. to relevant
subdirectories under <install_dir>.)
#-------------------------------------------------------------
# building from cvs
#-------------------------------------------------------------
You will need current versions of automake, autoconf, and libtool.
See building autotools below.
cvs co CLHEP/package OR cvs co package
cd [CLHEP/]package
bootstrap
Now continue with directions as if you unpacked a source code tarball.
#-------------------------------------------------------------
# building autotools
#-------------------------------------------------------------
If you do not have at least autoconf 2.57 and automake 1.6, you will
need to build autoconf, automake, and libtool. On some platforms,
you may also need to build m4 and texinfo.
Download the relevant tarballs from gnu.org.
Untar them in a common source code tree.
Decide whether you want to install them in /usr/local or your own
install directory. If you use your own install directory, use
--prefix=<install_dir>
with configure.
For each autotool package:
<source_code_dir>/configure [--prefix=<install_dir>]
make
make install
Make sure that <install_dir>/bin is at the front of your path.
#-------------------------------------------------------------
## Process this file with automake to produce Makefile.in
includedir = $(prefix)/include/CLHEP
# put . first so that CLHEP directory is built before anything else
SUBDIRS = RefCount . src
# list all subdirectories - for distribution and cleaning
DIST_SUBDIRS = RefCount . src
bin_SCRIPTS = RefCount-config
all-local: $(top_builddir)/CLHEP
# create temporary CLHEP header tree
# search for header directories in the following order:
# 1. $(top_srcdir)/..
# 2. $(CLHEPSOURCE_DIR)/CLHEP
# 3. $(CLHEP_DIR)/CLHEP
#
# abs_ => absolute path
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
$(top_builddir)/CLHEP:
mkdir $(top_builddir)/CLHEP;
cd $(abs_top_builddir); list=`ls $(abs_top_srcdir)/..`; \
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 \