Commit 1777ad8e authored by Lynn Garren's avatar Lynn Garren
Browse files

remove autoconf build option entirely

parent 6c2704d2
## Process this file with automake to produce Makefile.in
if USE_GMAKE
MAKE = gmake
endif
includedir = $(prefix)/include/CLHEP
tempincludedir = $(TEMPDIR)/CLHEP/@PACKAGE@
COPY_P = @COPY_P@
pkginclude_HEADERS = \
itos.h \
defs.h
# 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"
## Process this file with automake to produce Makefile.in
if USE_GMAKE
MAKE = gmake
endif
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
# we only copy headers for packages listed in @PACKAGE@-deps
# search for header directories in the following order:
# 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: 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 "$$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)
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
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 Cast 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 Cast, 2.2.0.8, http://savannah.cern.ch/projects/clhep/, Cast)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/itos.cc])
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([Cast/defs.h])
# Makefiles:
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])
# 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])
AH_BOTTOM([#endif // CAST_DEFS_H])
# ----------------------------------------------------------------------
# Account for any user configuration options:
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Check for needed programs:
# ----------------------------------------------------------------------
# Locate a C++ compiler:
AC_PROG_CXX(cl g++ g++4 c++ icc aCC CC cxx cc++ FCC 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 -Wl,--no-undefined"
MY_SHNAME="-Wl,-soname,"
MY_LD="-Wl,--rpath -Wl,"
SHEXT=so
AR="ar"; ARFLAGS="cru"
;;
*-*-darwin*)
AM_CXXFLAGS="-O -pedantic -Wall"
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"
;;
*-*-cygwin*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall"
MY_SHFLAGS="-DPIC"; SHEXT=dll
MY_SHLINK="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive"
MY_SHLINKEXTRA="-Wl,--no-whole-archive"
MY_SHNAME="-Wl,-out-implib="; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
build_static="yes"
build_shared="no"
;;
*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall"
MY_SHFLAGS="-fPIC -DPIC"
MY_SHLINK="-shared -Wl,--no-undefined"
MY_SHNAME="-Wl,-soname,"
MY_LD="-Wl,--rpath -Wl,"
SHEXT=so
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 -Wl,--no-undefined"
MY_SHNAME="-Wl,-soname,"
MY_LD="-Wl,--rpath -Wl,"
SHEXT=so
AR="ar"; ARFLAGS="cru"
;;
*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall"
MY_SHFLAGS="-fPIC -DPIC"
MY_SHLINK="-shared -Wl,--no-undefined"
MY_SHNAME="-Wl,-soname,"
MY_LD="-Wl,--rpath -Wl,"
SHEXT=so
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 -Wl,--no-undefined"
MY_SHNAME="-Wl,-soname,"
MY_LD="-Wl,--rpath -Wl,"
SHEXT=so
AR="ar"; ARFLAGS="cru"
;;
*-*-darwin*)
AM_CXXFLAGS="-O -pedantic -Wall"
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"
;;
*-*-cygwin*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall"
MY_SHFLAGS="-DPIC"; SHEXT=dll
MY_SHLINK="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive"
MY_SHLINKEXTRA="-Wl,--no-whole-archive"
MY_SHNAME="-Wl,-out-implib="; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
build_static="yes"
build_shared="no"
;;
*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall"
MY_SHFLAGS="-fPIC -DPIC"
MY_SHLINK="-shared -Wl,--no-undefined"
MY_SHNAME="-Wl,-soname,"
MY_LD="-Wl,--rpath -Wl,"
SHEXT=so
AR="ar"; ARFLAGS="cru"
esac;;
icc)
case "$target" in
*-*-linux*)
AM_CXXFLAGS="-O -ansi -fp-model precise -no-gcc -w1"
AM_LDFLAGS="-lstdc++"
MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="xiar"; ARFLAGS="cru"
;;
*)
AM_CXXFLAGS="-O -ansi -fp-model precise -no-gcc -w1"
AM_LDFLAGS="-lstdc++"
MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="xiar"; ARFLAGS="cru"
esac;;
cl)
AM_CXXFLAGS="-EHsc -nologo -GR -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)
# ----------------------------------------------------------------------
# Check for supported link flags
# ----------------------------------------------------------------------
AC_CHECK_LIB([c -Wl,--as-needed],open,[MY_SHEXTRA="-Wl,--as-needed"])
AC_SUBST(MY_SHEXTRA)
# ----------------------------------------------------------------------
# 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
if USE_GMAKE
MAKE = gmake
endif
INCLUDES = -I$(top_builddir)
libCLHEP_Cast_@VERSION@_a_SOURCES = \
itos.cc
libCLHEP_Cast_@VERSION@_so_OBJECTS = $(patsubst %.cc,$(shareddir)/%.$(OBJEXT),$(libCLHEP_Cast_@VERSION@_a_SOURCES))
# these if/else blocks will be parsed by automake and translated
if BUILD_SHARED
shareddir = shared
if BUILD_VISUAL
lib_shared = CLHEP-Cast-@VERSION@.$(SHEXT)
else
lib_shared = libCLHEP-Cast-@VERSION@.$(SHEXT)
endif
SHFLAGS = @MY_SHFLAGS@
SHLINK = @MY_SHLINK@ @MY_SHEXTRA@
SHNAME = @MY_SHNAME@
endif
if BUILD_STATIC
lib_LIBRARIES = libCLHEP-Cast-@VERSION@.a
endif
CLEANFILES = $(lib_shared)
all-local: $(shareddir) $(lib_shared)
$(shareddir):
test -d $(shareddir) || mkdir $(shareddir)
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_Cast_@VERSION@_so_OBJECTS)
$(SHLINK) $(SHNAME)$@ $(libCLHEP_Cast_@VERSION@_so_OBJECTS)
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) /c /Fo$@ $<
else
$(lib_shared): $(libCLHEP_Cast_@VERSION@_so_OBJECTS)
$(CXXLINK) $(SHLINK) $(SHNAME)$@ $(libCLHEP_Cast_@VERSION@_so_OBJECTS)
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) -c -o $@ $<
endif
install-exec-local: $(lib_shared)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@list='$(lib_shared)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$p'"; \
$(INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
clean-local:
-test -d $(shareddir) && rm -f $(shareddir)/*.$(OBJEXT)
distclean-local:
-test -d $(shareddir) && rm -rf ./$(shareddir)
## Process this file with automake to produce Makefile.in
if USE_GMAKE
MAKE = gmake
endif
includedir = $(prefix)/include/CLHEP
tempincludedir = $(TEMPDIR)/CLHEP/@PACKAGE@
COPY_P = @COPY_P@
pkginclude_HEADERS = \
Evaluator.h \
defs.h
# 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"
## Process this file with automake to produce Makefile.in
if USE_GMAKE
MAKE = gmake
endif
includedir = $(prefix)/include/CLHEP
# put . first so that CLHEP directory is built before anything else
SUBDIRS = Evaluator . src test
# list all subdirectories - for distribution and cleaning
DIST_SUBDIRS = Evaluator . src test
bin_SCRIPTS = Evaluator-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_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: 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 "$$pkg" ; then \