#! /bin/sh - #$Id: configure,v 1.15.2.1 2009/08/11 15:48:46 gcosmo Exp $ # ====================================================================== # A configure script for Geant4Py # ====================================================================== export LANG=C IFS=' ' PATH=/bin:/usr/bin export PATH # ====================================================================== # testing the echo features # ====================================================================== if `(echo "testing\c"; echo 1,2,3) | grep c > /dev/null` ; then if `(echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn > /dev/null`; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi # ====================================================================== # help message # ====================================================================== show_help() { cat < conftest.cc < int main() { if (BOOST_VERSION >= 103200) return 0; else return 1; } EOF g++ -I$boost_incdir -o conftest conftest.cc > /dev/null 2>&1 ./conftest q_boost_version=$? rm conftest.cc conftest if [ $q_boost_version = 0 ]; then echo "ok" else echo "boost version >= 1.32.00 is required." exit -1 fi echo $ac_n "Checking for Boost lib dir ... $ac_c" if [ ! $boost_libdir ]; then if [ $arch = 64 ]; then boost_libdir=/usr/lib64 else boost_libdir=/usr/lib fi fi set $boost_libdir $extra_libdir for adir in $* do if [ -f "$adir"/lib${boost_python_lib}.${shlib} ]; then boost_libdir=$adir break fi done if [ ! -d "$boost_libdir" ]; then echo "no" echo $ac_n "### $boost_libdir (boost-libdir) does not exist. $ac_c" echo "Try --with-boost-libdir option." exit -1 fi echo "$boost_libdir" echo $ac_n "Checking for Boost Python lib name ... $ac_c" if [ ! -f "$boost_libdir"/lib${boost_python_lib}.${shlib} ]; then echo "no" echo $ac_n "### lib${boost_python_lib}.${shlib} (boost-python-lib) does not exist. $ac_c" echo "Try --with-boost-python-lib option." exit -1 fi echo "lib${boost_python_lib}.${shlib}" # --- echo $ac_n "Checking for OpenGL support ...$ac_c" if [ -f "$g4_libdir"/libG4OpenGL.${shlib} ]; then if [ $enable_openglx = 0 ]; then echo "disabled" else echo "yes" fi else echo "no" enable_openglx=0 fi # --- echo $ac_n "Checking for physics list support ...$ac_c" if [ -f "$g4_incdir"/QGSP.hh ]; then enable_physicslist=1 fi if [ $enable_physicslist = 0 ]; then echo "no" else echo "yes" fi # --- echo $ac_n "Checking for GDML support ...$ac_c" if [ -f "$g4_incdir"/G4GDMLParser.hh ]; then echo "yes" enable_gdml=1 else echo "no" enable_gdml=0 fi # --- if [ $enable_gdml = 1 ]; then echo $ac_n "Checking for Xerces-C include dir ...$ac_c" set $xercesc_incdir $extra_incdir for adir in $* do if [ -d "$adir/xercesc" ]; then xercesc_incdir=$adir break fi done if [ -d "$xercesc_incdir/xercesc" ]; then echo "yes" else echo "no" echo "### $xercesc_incdir/xercesc does not exist. " echo "Try --with-xercesc-incdir option." exit -1 fi echo $ac_n "Checking for Xerces-C lib dir ...$ac_c" if [ ! $xercesc_libdir ]; then if [ $arch = 64 ]; then xercesc_libdir=/usr/lib64 else xercesc_libdir=/usr/lib fi fi set $xerces_libdir $extra_libdir for adir in $* do if [ -f "$adir"/libxerces-c.${shlib} ]; then xercesc_libdir=$adir break fi done if [ -f "$xercesc_libdir"/libxerces-c.${shlib} ]; then echo "yes" else echo "no" echo "### $xercesc_libdir/libxerces-c.${shlib} does not exist. " echo "Try --with-xercesc-libdir option." exit -1 fi fi # --- echo $ac_n "Writing config.gmk ... $ac_c" make_config=config/config.gmk cat > $make_config <> $make_config <> $make_config < config.status echo "done" # --- echo "" echo $ac_n "Enabled support for$ac_c" if [ $enable_openglx = 1 ]; then echo $ac_n " openglx$ac_c" fi if [ $enable_openglxm = 1 ]; then echo $ac_n " openglxm$ac_c" fi if [ $enable_raytracerx = 1 ]; then echo $ac_n " raytracerx$ac_c" fi if [ $enable_physicslist = 1 ]; then echo $ac_n " physicslist$ac_c" fi if [ $enable_gdml = 1 ]; then echo $ac_n " gdml$ac_c" fi echo "." # --- echo "" echo "To build Geant4Py type:" echo "" echo " make" echo " make install" echo "" exit 0