dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.am) AC_CANONICAL_SYSTEM dnl Select the compilers used dnl The compiler flags are somewhat dictated by cfortran package dnl See http://www-zeus.desy.de/~burow/cfortran/ case "$host" in *-*-linux*) CXX=g++ CC=g++ CXXFLAGS="-Wall -g -O0 -Df2cFortran" F77=g77 FFLAGS="-g" LDFLAGS="-g" ;; *-*-hpux*) CC=cc CXX=CC LD=CC CXXFLAGS="-g -Dextname +z" F77=f77 FFLAGS="-K +ppu -g" LDFLAGS="-g +a1 +z" ;; *-*-aix*) CC=xlc CXX=xlC CXXFLAGS="-g" F77=f77 FFLAGS="-g" LDFLAGS="-g" ;; *) AC_MSG_ERROR([default compiler unknown for this system!]) ;; esac dnl -------------------------------------------------------------- dnl We need ROOT for our GUI dnl AC_ARG_WITH(rootsys, [--with-rootsys=ROOTSYS Defines the ROOTSYS for ROOT], ROOTSYS=$withval, ) AC_CHECK_FILE(${ROOTSYS}/bin/root-config, , AC_MSG_ERROR([can't find ROOT! Check that ROOTSYS is set or use --with-rootsys])) ROOTLIBS="`$ROOTSYS/bin/root-config --libs`" ROOTGLIBS="`$ROOTSYS/bin/root-config --glibs`" ROOTFLAGS="`$ROOTSYS/bin/root-config --cflags`" CXXFLAGS="$CXXFLAGS $ROOTFLAGS" AC_SUBST(FFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(ROOTSYS) AC_SUBST(ROOTLIBS) AC_SUBST(ROOTGLIBS) AC_SUBST(ROOTFLAGS) dnl ------------------------------------------------------------------ dnl We need the Cernlib to access Paw Ntuples dnl AC_ARG_WITH(cernlib, [--with-cernlib=DIR Where to find the cernlib script], CERNLIB=$withval, CERNLIB=$CERN/$CERN_LEVEL/bin) AC_CHECK_FILE($CERNLIB/cernlib, , AC_MSG_ERROR([can't find cernlib script ! Use --with-cernlib=DIR])) CERNLIBRARIES="`$CERNLIB/cernlib packlib kernlib pawlib`" AC_SUBST(CERNLIBRARIES) dnl Check for some languages AC_PROG_CXX AC_PROG_F77 dnl AC_F77_LIBRARY_LDFLAGS finds the Fortran77 intrinsic and run-time libraries dnl and sets the FLIBS variable AC_F77_LIBRARY_LDFLAGS AM_INIT_AUTOMAKE(roo2h,1.0) AM_DISABLE_STATIC AM_PROG_LIBTOOL AC_OUTPUT(Makefile)