dnl without this order in this file, autoconf will not work! dnl the argument is a source file out of your sources. But dnl acinclude.m4 makes the job for all programs ;-) AC_INIT(acinclude.m4) dnl enable the following if you want to use autoconf/automake dnl framework from a certain directory (like kde-common) AC_CONFIG_AUX_DIR(admin) AC_CANONICAL_SYSTEM AC_ARG_PROGRAM AM_INIT_AUTOMAKE(Moan,1.0) if test -z $ROOTSYS; then echo "No ROOT system directory found, please setup ROOT first" exit 1 fi dnl Select KCC compiler if ROOT architecture is linuxkcc if test `root-config --arch` = "linuxkcc"; then CXX=KCC which KCC >& /dev/null if test -z $? ; then echo "KCC not found but required by this ROOT version, please setup KCC" exit 2 fi fi AC_PREFIX_DEFAULT(/usr/local) if test "x$prefix" = "xNONE"; then prefix=$ac_default_prefix ac_configure_args="$ac_configure_args --prefix $prefix" fi SRT_PACKAGE_BASE=$PWD/.d0packages TMB_PACKAGES="" SRT_INCLUDES="-I\${SRT_PRIVATE_CONTEXT}/include -I\${SRT_PUBLIC_CONTEXT}/include" dnl without this order in this file, automake will be confused! dnl AM_CONFIG_HEADER(analysis/config.h) AC_ARG_WITH(emutils, [ --with-emutils=DIR turns on compilation with the EM utils library], [ AC_DEFINE(EM_UTILS,1,[Turns on compilation with the EM utils library]) if test $withval = "yes"; then CPPFLAGS="$CPPFLAGS -I\${SRT_PUBLIC_CONTEXT}/include" else CPPFLAGS="$CPPFLAGS -I$withval" fi ]) AC_DEFUN(AC_ADD_TMB_PACKAGE, [ TMB_PACKAGES="$1 $TMB_PACKAGES" AC_DEFINE(translit($1,`a-z', `A-Z'),0,[CVS Version tag used]) $1_VERS=0 $1_DIR=${SRT_PUBLIC_CONTEXT}/$1 AC_SUBST($1_VERS) AC_SUBST($1_DIR) AC_ARG_WITH($1, [ --with-$1=VERSION sets the CVS tag version of $1 to use], [ if test $withval ; then SRT_INCLUDES="-I\${SRT_PACKAGE_BASE}/$1/$withval $SRT_INCLUDES" $1_VERS=$withval $1_DIR=${SRT_PACKAGE_BASE}/$1/$withval TMP_PACKAGES="" for i in $TMB_PACKAGES; do if test "$i" = "$1" ; then TMP_PACKAGES="$TMP_PACKAGES $i/$withval" else TMP_PACKAGES="$TMP_PACKAGES $i" fi done TMB_PACKAGES="$TMP_PACKAGES" if test ! -d "${SRT_PACKAGE_BASE}/$1/$withval"; then if test -d .cvstmp; then rm -fr .cvstmp fi cvs export -r $withval -d .cvstmp $1 mkdir -p "${SRT_PACKAGE_BASE}/$1" mv .cvstmp "${SRT_PACKAGE_BASE}/$1/$withval" fi AC_DEFINE_UNQUOTED(translit($1,`a-z', `A-Z'),"$withval", [CVS Version tag used]) fi ]) ]) AC_ADD_TMB_PACKAGE(tmb_tree) AC_ADD_TMB_PACKAGE(tmb_analyze) AC_ADD_TMB_PACKAGE(mc_analyze) AC_ADD_TMB_PACKAGE(tmb_bcjet) AC_ADD_TMB_PACKAGE(muo_cand) AC_SUBST(SRT_PACKAGE_BASE) AC_SUBST(SRT_INCLUDES) AC_SUBST(TMB_PACKAGES) dnl checks for programs. dnl first check for c/c++ compilers AC_PROG_CXX([KCC g++ egcs gcc]) AC_PROG_CXXCPP AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_RANLIB dnl in this space add everything you want to check for dnl examples are specific headers, libraries, etc. ANALYSIS_LIB_TESTS dnl perform program name transformation #AC_ARG_PROGRAM dnl Last thing before we ooutput is add --backend to make dnl dependencies work with KCC if test `root-config --arch` = "linuxkcc"; then CXXFLAGS="$CXXFLAGS --backend" LDFLAGS="$LDFLAGS -v" fi dnl add here all your Makefiles. These will be created by configure AC_OUTPUT(Makefile analysis/Makefile analysis/reco/Makefile analysis/mc/Makefile analysis/tmb/Makefile analysis/cuts/Makefile analysis/functions/Makefile analysis/selectors/Makefile cuts/Makefile thumbnail/Makefile)