SimDist
diff -u -r1.3 -r1.4
--- aclocal.m4 25 Oct 2005 22:47:04 -0000 1.3
+++ aclocal.m4 18 Nov 2005 01:37:20 -0000 1.4
@@ -6,13 +6,35 @@
for p in $(echo ${packages_list})
do
- SIM_ADD_CONFIG_FILE(packages/$p/package.gmk)
- SIM_ADD_CONFIG_FILE(packages/$p/$p.gmk)
- SIM_ADD_CONFIG_FILE(packages/$p/src.sh)
+
+ # Makefile
SIM_ADD_CONFIG_FILE(packages/$p/GNUmakefile)
-done
-#echo -e "config_files:"$config_files
+ # variables for the build system
+ SIM_ADD_CONFIG_FILE(packages/$p/package.gmk)
+
+ # vars required by the package itself (e.g. SLIC_BASE)
+ SIM_ADD_CONFIG_FILE(packages/$p/env.gmk)
+
+ # download script if exists
+ if test -e "$sim_packages_dir/$p/${download_script}.in"
+ then
+ SIM_ADD_CONFIG_FILE(packages/$p/${download_script})
+ fi
+
+ # cvs script if exists
+ if test -e "$sim_packages_dir/$p/${cvs_script}.in"
+ then
+ SIM_ADD_CONFIG_FILE(packages/$p/${cvs_script})
+ fi
+
+ # patch script if exists
+ if test -e "$sim_packages_dir/$p/${patch_script}.in"
+ then
+ SIM_ADD_CONFIG_FILE(packages/$p/${patch_script})
+ fi
+
+done
])
@@ -25,13 +47,69 @@
AC_MSG_ERROR("Missing config file to add.")
fi
-config_files="$config_files"$1" "
-#echo "after add config_files:"$config_files
+config_files="$config_files"$1" "
+
+])
+
+AC_DEFUN(SIM_CHECK_PROGS, [
+
+# make
+AC_PROG_MAKE_SET
+
+# g++
+AC_PROG_CXX
+
+# cvs
+AC_CHECK_PROG(have_cvs, cvs, yes, no)
+
+if test $have_cvs == "no"
+then
+ AC_MSG_ERROR(cvs not found)
+fi
+
+# java (for ant bundled with LCIO)
+AC_CHECK_PROG(have_java, java, yes, no)
+
+if test $have_java == "no"
+then
+ AC_MSG_ERROR(java not found)
+fi
+
+# wget
+AC_CHECK_PROG(have_wget, wget, yes, no)
+
+if test $have_wget == "no"
+then
+ AC_MSG_ERROR(wget not found)
+fi
])
AC_DEFUN(SIM_INIT, [
+packages_dep_order="clhep geant4 lcphys xerces gdml lcio lcdd slic"
+AC_SUBST(packages_dep_order)
+
+packages_reverse_dep_order=""
+for p in $(echo $packages_dep_order)
+do
+ packages_reverse_dep_order=${p}" "${packages_reverse_dep_order}
+done
+
+AC_SUBST(packages_reverse_dep_order)
+
+download_script=download.sh
+AC_SUBST(download_script)
+
+cvs_script=cvs.sh
+AC_SUBST(cvs_script)
+
+patch_script=patch.sh
+AC_SUBST(patch_script)
+
+gen_files="package.gmk env.gmk download.sh cvs.sh patch.sh GNUmakefile *.tar.gz *.tgz"
+AC_SUBST(gen_files)
+
sim_dist_dir=$(pwd)
AC_SUBST(sim_dist_dir)
@@ -39,24 +117,23 @@
SIM_ADD_CONFIG_FILE("build/common.gmk")
sim_packages_dir=$(pwd)/packages
-
AC_SUBST(sim_packages_dir)
sim_build_dir=$(pwd)/build
-
AC_SUBST(sim_build_dir)
sim_scripts_dir=$(pwd)/scripts
-
AC_SUBST(sim_scripts_dir)
sim_package_default_versions_file=${sim_build_dir}/package_versions.txt
-
AC_MSG_CHECKING(for packages list)
for p in $(ls -w 1 packages | grep -v CVS)
do
- packages_list="$packages_list"${p}" "
+ if test -d $sim_packages_dir/$p
+ then
+ packages_list="$packages_list"${p}" "
+ fi
done
packages_list=${packages_list%\ }
@@ -67,16 +144,13 @@
])
-AC_DEFUN(CONFIG_PACKAGE_BASE, [
-
-#echo "config_package:$1"
+AC_DEFUN(SIM_CONFIG_PACKAGE_BASE, [
if test -z $1
then
- AC_MSG_ERROR("Require name of the package to configure.")
+ AC_MSG_ERROR("Name of the package to configure is missing.")
fi
-
# name of package is first arg
package_name="$1"
@@ -87,7 +161,7 @@
if ! test -e ${package_root_dir}
then
- AC_MSG_ERROR("$package_name root package area does not exist!")
+ AC_MSG_ERROR("$package_name root package area does not exist!")
fi
# get the version string for this package from the default packages file
@@ -106,68 +180,68 @@
# set package name, version, base dir and build dir for each dep
case "$package_name" in
-clhep )
+clhep )
AC_SUBST(clhep_base_dir, ${package_base_dir})
AC_SUBST(clhep_version, ${package_version})
AC_SUBST(clhep_package_name, ${package_name})
AC_SUBST(clhep_build_dir, ${package_base_dir}/CLHEP);;
-gdml )
+gdml )
AC_SUBST(gdml_base_dir, ${package_base_dir})
AC_SUBST(gdml_version, ${package_version})
AC_SUBST(gdml_package_name, ${package_name})
AC_SUBST(gdml_build_dir, ${package_base_dir}/CPPGDML);;
-geant4 )
+geant4 )
AC_SUBST(geant4_base_dir, ${package_base_dir})
AC_SUBST(geant4_version, ${package_version})
AC_SUBST(geant4_package_name, ${package_name})
AC_SUBST(geant4_build_dir, ${package_base_dir}/source);;
-lcdd )
+lcdd )
AC_SUBST(lcdd_base_dir, ${package_base_dir})
AC_SUBST(lcdd_version, ${package_version})
AC_SUBST(lcdd_package_name, ${package_name})
AC_SUBST(lcdd_build_dir, ${package_base_dir});;
-lcio )
+lcio )
AC_SUBST(lcio_base_dir, ${package_base_dir})
AC_SUBST(lcio_version, ${package_version})
AC_SUBST(lcio_package_name, ${package_name})
AC_SUBST(lcio_build_dir, ${package_base_dir});;
-lcphys )
+lcphys )
AC_SUBST(lcphys_base_dir, ${package_base_dir})
AC_SUBST(lcphys_version, ${package_version})
AC_SUBST(lcphys_package_name, ${package_name})
AC_SUBST(lcphys_build_dir, ${package_base_dir});;
-slic )
+slic )
AC_SUBST(slic_base_dir, ${package_base_dir})
AC_SUBST(slic_version, ${package_version})
AC_SUBST(slic_package_name, ${package_name})
AC_SUBST(slic_build_dir, ${package_base_dir});;
-xerces )
- AC_SUBST(xerces_base_dir, ${package_base_dir})
+xerces )
+ AC_SUBST(xerces_base_dir, ${package_base_dir})
AC_SUBST(xerces_version, ${package_version})
AC_SUBST(xerces_package_name, ${package_name})
AC_SUBST(xerces_build_dir, ${package_base_dir}/src/xercesc);;
-* )
+* )
AC_MSG_ERROR($package_name is an unknown package.)
esac
])
-AC_DEFUN(CONFIG_PACKAGES, [
+AC_DEFUN(SIM_CONFIG_PACKAGES, [
# setup common helper vars for each package
for p in $(echo ${packages_list})
do
- CONFIG_PACKAGE_BASE($p)
+ SIM_CONFIG_PACKAGE_BASE($p)
done
# extras for each package
-CONFIG_GEANT4
-CONFIG_XERCES
+SIM_CONFIG_GEANT4
+SIM_CONFIG_XERCES
])
-AC_DEFUN(CONFIG_GEANT4, [
+AC_DEFUN(SIM_CONFIG_GEANT4, [
if test $host_os == "CYGWIN"
then
@@ -178,11 +252,9 @@
AC_SUBST(g4system)
-SIM_ADD_CONFIG_FILE($sim_packages_dir/geant4/patch.sh)
-
])
-AC_DEFUN(CONFIG_XERCES, [
+AC_DEFUN(SIM_CONFIG_XERCES, [
if test $host_os == "Linux"
then
@@ -197,11 +269,9 @@
AC_SUBST(xerces_configure_args)
-SIM_ADD_CONFIG_FILE($sim_packages_dir/xerces/patch.sh)
-
])
-AC_DEFUN(OS_SHARED_LIBS_VAR, [
+AC_DEFUN(SIM_OS_SHARED_LIBS_VAR, [
if test $host_os == "Linux"
then
@@ -219,7 +289,7 @@
])
# function to set string of host OS
-AC_DEFUN(HOST_OS, [
+AC_DEFUN(SIM_HOST_OS, [
AC_MSG_CHECKING(for supported OS)
SimDist
diff -u -r1.5 -r1.6
--- configure 25 Oct 2005 22:47:04 -0000 1.5
+++ configure 18 Nov 2005 01:37:20 -0000 1.6
@@ -1,10 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for SimDist v1r0p0.
+# Generated by GNU Autoconf 2.57 for SimDist v1r0p0.
#
# Report bugs to <[log in to unmask]>.
#
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -21,10 +22,9 @@
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
-DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
@@ -43,7 +43,7 @@
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
@@ -220,17 +220,16 @@
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
- test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
# IFS
@@ -273,7 +272,7 @@
PACKAGE_STRING='SimDist v1r0p0'
[log in to unmask]
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SET_MAKE CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT sim_dist_dir sim_packages_dir sim_build_dir sim_scripts_dir clhep_base_dir clhep_version clhep_package_name clhep_build_dir gdml_base_dir gdml_version gdml_package_name gdml_build_dir geant4_base_dir geant4_version geant4_package_name geant4_build_dir lcdd_base_dir lcdd_version lcdd_package_name lcdd_build_dir lcio_base_dir lcio_version lcio_package_name lcio_build_dir lcphys_base_dir lcphys_version lcphys_package_name lcphys_build_dir slic_base_dir slic_version slic_package_name slic_build_dir xerces_base_dir xerces_version xerces_packag!
e_name xerces_build_dir g4system xerces_configure_args os_shared_libs_var LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SET_MAKE CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT have_cvs have_java have_wget packages_dep_order packages_reverse_dep_order download_script cvs_script patch_script gen_files sim_dist_dir sim_packages_dir sim_build_dir sim_scripts_dir clhep_base_dir clhep_version clhep_package_name clhep_build_dir gdml_base_dir gdml_version gdml_package_name gdml_build_dir geant4_base_dir geant4_version geant4_package_name geant4_build_dir lcdd_base_dir lcdd_version lcdd_package_name lcdd_build_dir lcio_base_dir lcio_version lcio_pac!
kage_name lcio_build_dir lcphys_base_dir lcphys_version lcphys_package_name lcphys_build_dir slic_base_dir slic_version slic_package_name slic_build_dir xerces_base_dir xerces_version xerces_package_name xerces_build_dir g4system xerces_configure_args os_shared_libs_var LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -632,7 +631,7 @@
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+ localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
@@ -672,10 +671,10 @@
# Try the directory containing this script, then its parent.
ac_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -763,9 +762,9 @@
cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -844,45 +843,12 @@
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
@@ -893,7 +859,7 @@
echo
$SHELL $ac_srcdir/configure --help=recursive
elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
+ test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
@@ -907,9 +873,10 @@
if $ac_init_version; then
cat <<\_ACEOF
SimDist configure v1r0p0
-generated by GNU Autoconf 2.59
+generated by GNU Autoconf 2.57
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -921,7 +888,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by SimDist $as_me v1r0p0, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@
@@ -998,19 +965,19 @@
2)
ac_configure_args1="$ac_configure_args1 '$ac_arg'"
if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
+ ac_must_keep_next=false # Got value, back to normal.
else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
fi
ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
# Get rid of the leading space.
@@ -1044,12 +1011,12 @@
case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
*ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
;;
*)
sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
}
@@ -1078,7 +1045,7 @@
for ac_var in $ac_subst_files
do
eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
@@ -1097,7 +1064,7 @@
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
- rm -f core *.core &&
+ rm -f core core.* *.core &&
rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
@@ -1177,7 +1144,7 @@
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
eval ac_old_val="\$ac_cv_env_${ac_var}_value"
@@ -1194,13 +1161,13 @@
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
@@ -1257,10 +1224,13 @@
-# Checks for programs.
+# check for required progs
+
+
+# make
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1287,6 +1257,8 @@
SET_MAKE="MAKE=${MAKE-make}"
fi
+
+# g++
ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -1401,6 +1373,7 @@
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -1420,8 +1393,8 @@
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
-echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
+echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
@@ -1441,23 +1414,23 @@
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
+ ;;
conftest.$ac_ext )
- # This is the source file.
- ;;
+ # This is the source file.
+ ;;
[ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
*.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
* )
- break;;
+ break;;
esac
done
else
@@ -1531,8 +1504,8 @@
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
+ export ac_cv_exeext
+ break;;
* ) break;;
esac
done
@@ -1557,6 +1530,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -1607,6 +1581,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -1626,21 +1601,11 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -1653,7 +1618,7 @@
ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
fi
@@ -1669,6 +1634,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -1685,21 +1651,11 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -1712,7 +1668,7 @@
ac_cv_prog_cxx_g=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
@@ -1732,7 +1688,8 @@
fi
fi
for ac_declaration in \
- '' \
+ ''\
+ '#include <stdlib.h>' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
@@ -1740,13 +1697,14 @@
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_declaration
#include <stdlib.h>
+$ac_declaration
int
main ()
{
@@ -1757,21 +1715,11 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -1784,8 +1732,9 @@
continue
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -1802,21 +1751,11 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -1828,7 +1767,7 @@
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
@@ -1844,6 +1783,143 @@
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# cvs
+# Extract the first word of "cvs", so it can be a program name with args.
+set dummy cvs; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_have_cvs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$have_cvs"; then
+ ac_cv_prog_have_cvs="$have_cvs" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_have_cvs="yes"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_have_cvs" && ac_cv_prog_have_cvs="no"
+fi
+fi
+have_cvs=$ac_cv_prog_have_cvs
+if test -n "$have_cvs"; then
+ echo "$as_me:$LINENO: result: $have_cvs" >&5
+echo "${ECHO_T}$have_cvs" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+if test $have_cvs == "no"
+then
+ { { echo "$as_me:$LINENO: error: cvs not found" >&5
+echo "$as_me: error: cvs not found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# java (for ant bundled with LCIO)
+# Extract the first word of "java", so it can be a program name with args.
+set dummy java; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_have_java+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$have_java"; then
+ ac_cv_prog_have_java="$have_java" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_have_java="yes"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_have_java" && ac_cv_prog_have_java="no"
+fi
+fi
+have_java=$ac_cv_prog_have_java
+if test -n "$have_java"; then
+ echo "$as_me:$LINENO: result: $have_java" >&5
+echo "${ECHO_T}$have_java" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+if test $have_java == "no"
+then
+ { { echo "$as_me:$LINENO: error: java not found" >&5
+echo "$as_me: error: java not found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# wget
+# Extract the first word of "wget", so it can be a program name with args.
+set dummy wget; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_have_wget+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$have_wget"; then
+ ac_cv_prog_have_wget="$have_wget" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_have_wget="yes"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_have_wget" && ac_cv_prog_have_wget="no"
+fi
+fi
+have_wget=$ac_cv_prog_have_wget
+if test -n "$have_wget"; then
+ echo "$as_me:$LINENO: result: $have_wget" >&5
+echo "${ECHO_T}$have_wget" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+if test $have_wget == "no"
+then
+ { { echo "$as_me:$LINENO: error: wget not found" >&5
+echo "$as_me: error: wget not found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
# set the var host_os to determine basic OS (Linux, Mac, Windows)
@@ -1881,6 +1957,29 @@
# initialize required autoconf vars for sim setup
+packages_dep_order="clhep geant4 lcphys xerces gdml lcio lcdd slic"
+
+
+packages_reverse_dep_order=""
+for p in $(echo $packages_dep_order)
+do
+ packages_reverse_dep_order=${p}" "${packages_reverse_dep_order}
+done
+
+
+
+download_script=download.sh
+
+
+cvs_script=cvs.sh
+
+
+patch_script=patch.sh
+
+
+gen_files="package.gmk env.gmk download.sh cvs.sh patch.sh GNUmakefile *.tar.gz *.tgz"
+
+
sim_dist_dir=$(pwd)
@@ -1897,30 +1996,28 @@
fi
config_files="$config_files""build/common.gmk"" "
-#echo "after add config_files:"$config_files
sim_packages_dir=$(pwd)/packages
-
sim_build_dir=$(pwd)/build
-
sim_scripts_dir=$(pwd)/scripts
-
sim_package_default_versions_file=${sim_build_dir}/package_versions.txt
-
echo "$as_me:$LINENO: checking for packages list" >&5
echo $ECHO_N "checking for packages list... $ECHO_C" >&6
for p in $(ls -w 1 packages | grep -v CVS)
do
- packages_list="$packages_list"${p}" "
+ if test -d $sim_packages_dir/$p
+ then
+ packages_list="$packages_list"${p}" "
+ fi
done
packages_list=${packages_list%\ }
@@ -1939,6 +2036,24 @@
for p in $(echo ${packages_list})
do
+ # Makefile
+
+
+#echo "add config file: packages/$p/GNUmakefile"
+
+if test -z packages/$p/GNUmakefile
+then
+ { { echo "$as_me:$LINENO: error: \"Missing config file to add.\"" >&5
+echo "$as_me: error: \"Missing config file to add.\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+config_files="$config_files"packages/$p/GNUmakefile" "
+
+
+
+ # variables for the build system
+
#echo "add config file: packages/$p/package.gmk"
@@ -1950,57 +2065,83 @@
fi
config_files="$config_files"packages/$p/package.gmk" "
-#echo "after add config_files:"$config_files
+ # vars required by the package itself (e.g. SLIC_BASE)
+
+
+#echo "add config file: packages/$p/env.gmk"
+
+if test -z packages/$p/env.gmk
+then
+ { { echo "$as_me:$LINENO: error: \"Missing config file to add.\"" >&5
+echo "$as_me: error: \"Missing config file to add.\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+config_files="$config_files"packages/$p/env.gmk" "
+
-#echo "add config file: packages/$p/$p.gmk"
-if test -z packages/$p/$p.gmk
+ # download script if exists
+ if test -e "$sim_packages_dir/$p/${download_script}.in"
+ then
+
+
+#echo "add config file: packages/$p/${download_script}"
+
+if test -z packages/$p/${download_script}
then
{ { echo "$as_me:$LINENO: error: \"Missing config file to add.\"" >&5
echo "$as_me: error: \"Missing config file to add.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
-config_files="$config_files"packages/$p/$p.gmk" "
-#echo "after add config_files:"$config_files
+config_files="$config_files"packages/$p/${download_script}" "
+ fi
+ # cvs script if exists
+ if test -e "$sim_packages_dir/$p/${cvs_script}.in"
+ then
-#echo "add config file: packages/$p/src.sh"
-if test -z packages/$p/src.sh
+#echo "add config file: packages/$p/${cvs_script}"
+
+if test -z packages/$p/${cvs_script}
then
{ { echo "$as_me:$LINENO: error: \"Missing config file to add.\"" >&5
echo "$as_me: error: \"Missing config file to add.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
-config_files="$config_files"packages/$p/src.sh" "
-#echo "after add config_files:"$config_files
+config_files="$config_files"packages/$p/${cvs_script}" "
+ fi
+ # patch script if exists
+ if test -e "$sim_packages_dir/$p/${patch_script}.in"
+ then
-#echo "add config file: packages/$p/GNUmakefile"
-if test -z packages/$p/GNUmakefile
+#echo "add config file: packages/$p/${patch_script}"
+
+if test -z packages/$p/${patch_script}
then
{ { echo "$as_me:$LINENO: error: \"Missing config file to add.\"" >&5
echo "$as_me: error: \"Missing config file to add.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
-config_files="$config_files"packages/$p/GNUmakefile" "
-#echo "after add config_files:"$config_files
+config_files="$config_files"packages/$p/${patch_script}" "
-done
+ fi
-#echo -e "config_files:"$config_files
+done
@@ -2014,16 +2155,13 @@
do
-#echo "config_package:$p"
-
if test -z $p
then
- { { echo "$as_me:$LINENO: error: \"Require name of the package to configure.\"" >&5
-echo "$as_me: error: \"Require name of the package to configure.\"" >&2;}
+ { { echo "$as_me:$LINENO: error: \"Name of the package to configure is missing.\"" >&5
+echo "$as_me: error: \"Name of the package to configure is missing.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
-
# name of package is first arg
package_name="$p"
@@ -2155,22 +2293,6 @@
-#echo "add config file: $sim_packages_dir/geant4/patch.sh"
-
-if test -z $sim_packages_dir/geant4/patch.sh
-then
- { { echo "$as_me:$LINENO: error: \"Missing config file to add.\"" >&5
-echo "$as_me: error: \"Missing config file to add.\"" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-config_files="$config_files"$sim_packages_dir/geant4/patch.sh" "
-#echo "after add config_files:"$config_files
-
-
-
-
-
if test $host_os == "Linux"
then
@@ -2187,22 +2309,6 @@
-#echo "add config file: $sim_packages_dir/xerces/patch.sh"
-
-if test -z $sim_packages_dir/xerces/patch.sh
-then
- { { echo "$as_me:$LINENO: error: \"Missing config file to add.\"" >&5
-echo "$as_me: error: \"Missing config file to add.\"" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-config_files="$config_files"$sim_packages_dir/xerces/patch.sh" "
-#echo "after add config_files:"$config_files
-
-
-
-
-
# set which variable to use for runtime location of shared libs
@@ -2223,11 +2329,6 @@
-# substitute DEFS and CXXFLAGS
-#AC_SUBST([CXXFLAGS])
-#AC_SUBST([CPPFLAGS])
-#AC_SUBST([DEFS])
-
# add a few random input files
@@ -2241,7 +2342,6 @@
fi
config_files="$config_files"scripts/slic.sh" "
-#echo "after add config_files:"$config_files
@@ -2256,7 +2356,6 @@
fi
config_files="$config_files"GNUmakefile" "
-#echo "after add config_files:"$config_files
@@ -2296,13 +2395,13 @@
# `set' does not quote correctly, so add quotes (double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
} |
@@ -2332,13 +2431,13 @@
# trailing colons and then remove the whole line if VPATH becomes empty
[truncated at 1000 lines; 293 more skipped]