Commit 76230bbf authored by Leif Lonnblad's avatar Leif Lonnblad
Browse files

This commit was manufactured by cvs2svn to create tag

'CLHEP_1_9_3_0'.
parent cbf6459a
Makefile.in
configure
aclocal.m4
autom4te.cache
config.h.in
#-------------------------------------------------------------
# platform specific issues
#-------------------------------------------------------------
This package requires autoconf 2.59 or later and automake 1.9.1 or later.
If you bootstrap, you will probably have to build these yourself.
See "building autotools" below.
The new libtool no longer properly supports shared libraries for gcc 2.95.2.
If you build CLHEP with gcc 2.95.2, you must configure --disable-shared.
To build for Solaris CC, configure with CXX=CC CC=cc and use gmake.
On MacOSX, you need to define MACOSX_DEPLOYMENT_TARGET appropriately.
For instance, set MACOSX_DEPLOYMENT_TARGET to "10.4" if you
have MacOS 10.4 installed on your system.
#-------------------------------------------------------------
# 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>.)
#-------------------------------------------------------------
# configure options
#-------------------------------------------------------------
A variety of options can be given to configure. Below is a list
of the options that you are likely to find most useful.
--help provides a partial list of options
--prefix=PREFIX install architecture-independent files in PREFIX
[default is /usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[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
#-------------------------------------------------------------
Documents are neither built nor installed automatically.
Use the following commands to build and install documents:
make docs
make install-docs
#-------------------------------------------------------------
# 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.59 and automake 1.9.1, 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
(http://www.gnu.org/software/autoconf/, http://www.gnu.org/software/automake/,
and http://www.gnu.org/software/libtool/)
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
if USE_GMAKE
MAKE = gmake
endif
includedir = $(prefix)/include/CLHEP
SUBDIRS = Utilities
docs:
cd doc; $(MAKE) $(AM_MAKEFLAGS)
install-docs:
cd doc; $(MAKE) $(AM_MAKEFLAGS) install-docs
// $Id: CLHEP.h,v 1.1.1.1 2003/07/15 20:15:05 garren Exp $
// ----------------------------------------------------------
// For backward compatibility
//
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/config/TemplateFunctions.h"
## Process this file with automake to produce Makefile.in
if USE_GMAKE
MAKE = gmake
endif
includedir = $(prefix)/include/CLHEP
pkginclude_HEADERS = \
fortran.h \
defs.h
# Identify generated file(s) to be removed when 'make clean' is requested:
CLEANFILES = defs.h
// -*- C++ -*-
// CLASSDOC OFF
// $Id: fortran.h,v 1.2 2003/08/13 20:00:14 garren Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
// This file is a part of what might become CLHEP -
// a Class Library for High Energy Physics.
//
// This file contains definitions of macros for declaring and using
// FORTRAN commonblocks and routines in C++ code. It is assumed that
// the default f77 compiler is used for the supported platforms (currently
// HP9000, apollo, decstation, NeXT (using f2c)). If f2c is used, the f2c.h
// file should be included befor this one. If the FORTRAN_PPU macro is
// defined to 1 before this file is included, an underscore will always be
// post-pended to any fortran name. If it is defined to 0, no underclore will
// be post-pended. If FORTRAN_PPU is not defined, an intelligent guess is
// performed in this file.
//
//.SS Usage:
//
// a fortran subroutine delcared as e.g.
//
// .ft B
// SUBROUTINE GOGEN (U0,P0,NP,M,U,P)
//
// with
//
// .ft B
// REAL U0,P0(4),M(30),U(30),P(4,30)
// .fi
// INTEGER NP(2)
//
// should be declared as
//
// .ft B
// extern "C" {
// .fi
// extern void
// .fi
// FORTRAN_ROUTINE(gogen)(float*,float[4],int[2],float[30],float[30][4]);
// .fi
// }
//
// and called by
//
// .ft B
// FORTRAN_ROUTINE(gogen)(&U0, P0, NP, M, U, P1);
//
// a fortran common block declared as e.g.
//
// .ft B
// COMMON /LUJETS/ N,K(4000,5),P(4000,5),V(4000,5)
//
// using normal implicit rules should be declared as
//
// .ft B
// extern "C" {
// .fi
// BEGIN_FORTRAN_COMMON(lujets)
// .fi
// int n;
// .fi
// int k[5][4000];
// .fi
// float p[5][4000];
// .fi
// float v[5][4000];
// .fi
// END_FORTRAN_COMMON(lujets)
// .fi
// }
//
// and accessed by eg.
//
// .ft B
// FORTRAN_COMMON(lujets).k[2][FORTRAN_COMMON(lujets).n-4] = 2;
//
// Author: Leif Lonnblad
//
// fortran.h,v 1.2 1992/11/30 12:31:26 lonnblad Exp
#ifndef _FORTRAN_H_
#define _FORTRAN_H_
#include "CLHEP/Utilities/defs.h"
#ifdef FORTRAN_PPU
#define ADD_UNDERSCORE(name) name ## _
#else
#define ADD_UNDERSCORE(name) name
#endif
//#if defined(__apollo) && !defined(USING_F2C)
#ifdef __apollo
#ifndef USING_F2C
#define BEGIN_FORTRAN_COMMON(name) struct {
#define END_FORTRAN_COMMON(name) \
} ADD_UNDERSCORE(name) __attribute((__section(ADD_UNDERSCORE(name))));
#define FORTRAN_COMMON(name) ADD_UNDERSCORE(name)
#define FORTRAN_ROUTINE(name) ADD_UNDERSCORE(name)
#define FORTRAN_LOGICAL int
#else
#define BEGIN_FORTRAN_COMMON(name) extern struct {
#define END_FORTRAN_COMMON(name) } ADD_UNDERSCORE(name);
#define FORTRAN_COMMON(name) ADD_UNDERSCORE(name)
#define FORTRAN_ROUTINE(name) ADD_UNDERSCORE(name)
#define FORTRAN_LOGICAL long
#endif
#else
#define BEGIN_FORTRAN_COMMON(name) extern struct {
#define END_FORTRAN_COMMON(name) } ADD_UNDERSCORE(name);
#define FORTRAN_COMMON(name) ADD_UNDERSCORE(name)
#define FORTRAN_ROUTINE(name) ADD_UNDERSCORE(name)
#define FORTRAN_LOGICAL long
#endif
#endif // _FORTRAN_H_
config.sub
config.guess
depcomp
install-sh
missing
mkinstalldirs
This diff is collapsed.
#! /bin/sh
set -x
# cleanup should not be necessary
# however, in some cases strange results are found if you do not start clean
rm -rf autom4te.cache
rm -f aclocal.m4
rm -f Makefile.in */Makefile.in */defs.h.in
rm -f autotools/config* autotools/depcomp autotools/install-sh autotools/m*
rm -f configure config.*
# run autotool commands
aclocal -I autotools
autoheader
automake --add-missing --copy
autoconf
# ready to make a source code distribution tarball
# ======================================================================
# This is the Utilities configuration input file
# Process this file with autoconf to produce a configure script.
# ======================================================================
# ----------------------------------------------------------------------
# Identify the package and initialize the autotools:
# ----------------------------------------------------------------------
AC_PREREQ(2.59)
AC_INIT(CLHEP Utilities, 1.9.3.0, http://savannah.cern.ch/projects/clhep/, Utilities)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.9 foreign)
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
# ----------------------------------------------------------------------
# --enable-shared and --enable-static
# both shared and static libraries are built by default
# ----------------------------------------------------------------------
AC_ARG_ENABLE(shared,
AC_HELP_STRING([--disable-shared],[do not build shared libraries]),
[case "${enableval}" in
yes) build_shared="yes";;
no) build_shared="no";;
*) build_shared="yes";;
esac],
[build_shared="yes"])
AC_ARG_ENABLE(static,
AC_HELP_STRING([--disable-static],[do not build static libraries]),
[case "${enableval}" in
yes) build_static="yes";;
no) build_static="no";;
*) build_static="yes";;
esac],
[build_static="yes"])
AC_ARG_ENABLE(visual,
AC_HELP_STRING([--enable-visual],[on by default when using Visual C++]),
[case "${enableval}" in
yes) build_visual="yes";;
no) build_visual="no";;
*) build_visual="no";;
esac],
[build_visual="no"])
AC_ARG_ENABLE(gmake,
AC_HELP_STRING([--enable-gmake],[use gmake (default is make)]),
[case "${enableval}" in
yes) use_gmake="yes";;
no) use_gmake="no";;
*) use_gmake="no";;
esac],
[use_gmake="no"])
# ----------------------------------------------------------------------
# Identify the files that 'configure' is to produce:
# ----------------------------------------------------------------------
# Header containing #defines:
AM_CONFIG_HEADER([Utilities/defs.h])
# Makefiles:
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([Utilities/Makefile])
# ----------------------------------------------------------------------
# Capture post-install information:
# ----------------------------------------------------------------------
Utilities_CPPFLAGS="-I$includedir"
Utilities_LDFLAGS=" "
Utilities_LIBS=" "
AC_SUBST(Utilities_CPPFLAGS)
AC_SUBST(Utilities_LIBS)
AC_SUBST(Utilities_LDFLAGS)
# ----------------------------------------------------------------------
# Supply boilerplate for Utilities/defs.h source header:
# ----------------------------------------------------------------------
AH_TOP([#ifndef UTILITIES_DEFS_H
#define UTILITIES_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 // UTILITIES_DEFS_H])
# ----------------------------------------------------------------------
# Account for any user configuration options:
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Check for needed programs:
# ----------------------------------------------------------------------
# Locate a C++ compiler:
AC_PROG_CXX(cl g++ g++4 c++ aCC CC cxx cc++ FCC KCC RCC xlC_r xlC gpp)
# Use it hereinafter:
AC_LANG(C++)
# Ensure we've found a preprocessor:
AC_REQUIRE_CPP
# copy and diff
case "$target" in
*-*-win32*)
COPY_P="copy -p";DIFF_Q="diff -q -b"
;;
*-*-cygwin*)
COPY_P="cp -p";DIFF_Q="diff -q -b"
;;
*-*-solaris*)
COPY_P="cp -p";DIFF_Q="diff -b"
use_gmake="yes"
;;
*-*-linux*)
COPY_P="cp -p";DIFF_Q="diff -q -b"
;;
*)
COPY_P="cp -p";DIFF_Q="diff -q -b"
esac
AM_CONDITIONAL(USE_GMAKE, test x$use_gmake = xyes)
AC_SUBST(COPY_P)
AC_SUBST(DIFF_Q)
# worry about compiler flags
case "$CXX" in
g++)
case "$target" in
*-*-linux*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
;;
*-*-darwin*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
MY_SHFLAGS=""; MY_SHLINK="-dynamiclib -single_module -undefined dynamic_lookup"; SHEXT=dylib
MY_SHNAME="-Wl,-install_name,"; MY_LD="-bind_at_load -Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
;;
*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall"
MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
esac;;
g++4)
case "$target" in
*-*-linux*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
;;
*-*-darwin*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
MY_SHFLAGS=""; MY_SHLINK="-dynamiclib -single_module -undefined dynamic_lookup"; SHEXT=dylib
MY_SHNAME="-Wl,-install_name,"; MY_LD="-bind_at_load -Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
;;
*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall"
MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
esac;;
c++)
case "$target" in
*-*-linux*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
;;
*-*-darwin*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
MY_SHFLAGS=""; MY_SHLINK="-dynamiclib -single_module -undefined dynamic_lookup"; SHEXT=dylib
MY_SHNAME="-Wl,-install_name,"; MY_LD="-bind_at_load -Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
;;
*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall"
MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
esac;;
cl)
AM_CXXFLAGS="-EHsc -nologo -GR -GX -MD"
AR="ar"; ARFLAGS="cru"
MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
MY_SHNAME="/OUT:"; MY_LD=" "
build_static="no"
build_shared="yes"
build_visual="yes"
CXXFLAGS=" "
AC_SUBST(CXXFLAGS)
;;
CC)
case "$target" in
*-*-solaris*)
AM_CXXFLAGS="-O"
MY_SHFLAGS="-KPIC -DPIC"; MY_SHLINK="-G"; SHEXT=so
MY_SHNAME="-h"; MY_LD="-R"
AM_LDFLAGS="-lsunmath"
AR="CC"; ARFLAGS="-xar -o"
build_shared="no"
;;
*-*-hpux*) AM_CXXFLAGS="+O3 +DAportable +a1 -z -pta +Onolimit"
AR="ar"; ARFLAGS="cru"
build_shared="no"
;;
*-*-irix*) AM_CXXFLAGS="-O -OPT:Olimit=0 -pta"
AR="ar"; ARFLAGS="cru"
build_shared="no"
;;
*) echo UNEXPECTED CHOICE OF OPERATING SYSTEM FOR $CXX: $target
esac;;
aCC)
AM_CXXFLAGS="-O -Aa +DAportable +Onolimit"
AR="ar"; ARFLAGS="cru"
build_shared="no"
;;
cxx)
AM_CXXFLAGS="-O -std strict_ansi -timplicit_local"
AR="ar"; ARFLAGS="cru"
build_shared="no"
;;
xlC)
AM_CXXFLAGS="-O3 -qtwolink -+"
AR="ar"; ARFLAGS="cru"
build_shared="no"
;;
*) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
esac
AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_LDFLAGS)
AC_SUBST(MY_SHFLAGS)
AC_SUBST(MY_SHLINK)
AC_SUBST(MY_SHNAME)
AC_SUBST(MY_LD)
AC_SUBST(SHEXT)
AC_SUBST(AR)
AC_SUBST(ARFLAGS)
# ----------------------------------------------------------------------
# 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
# ======================================================================