| 1 |
dnl Process this file with autoconf to produce a configure script. |
| 2 |
|
| 3 |
dnl Define the reference directory checking if the file exist there |
| 4 |
dnl Any file argument can be passed to AC_INIT but, on the same time, |
| 5 |
dnl changing all the relative path for all the files involved in the code! |
| 6 |
dnl this will be called in the all the other MAKEFILEs as "@top_srcdir@" |
| 7 |
AC_INIT(event/PamelaRun.h) |
| 8 |
AC_CONFIG_HEADER(dummy.h) |
| 9 |
|
| 10 |
dnl Adds several standard checks. It takes the program name and version number as arguments. |
| 11 |
AM_INIT_AUTOMAKE([yoda],[4.2.4]) |
| 12 |
|
| 13 |
dnl Indicates that you will be using a config.h file |
| 14 |
dnl config.h will be generated by AUTOCONF using a confing.h.in file |
| 15 |
dnl config.h.in can be generated automatically using AUTOHEADER |
| 16 |
dnl However, you need a stamp-h file in your project to ensure that |
| 17 |
dnl AUTOMAKE regenerates config.h from config.h.in. |
| 18 |
dnl Type 'touch stamp-h' to add this file to your project |
| 19 |
AM_CONFIG_HEADER(config.h) |
| 20 |
|
| 21 |
AC_LIBTOOL_DLOPEN |
| 22 |
|
| 23 |
dnl The following macros make the system type available to configure scripts |
| 24 |
AC_CANONICAL_HOST |
| 25 |
|
| 26 |
dnl Indicates that the source code may be in C |
| 27 |
AC_PROG_CC |
| 28 |
|
| 29 |
dnl ------------------Fortran support---------------------------------- |
| 30 |
dnl Determine a Fortran 77 compiler to use. If F77 is not already set in the environment, |
| 31 |
dnl then check for g77 and f77, and then some other names. |
| 32 |
dnl Set the output variable F77 to the name of the compiler found |
| 33 |
AC_PROG_F77(f77 fort77 g77) |
| 34 |
|
| 35 |
dnl Determine the linker flags (e.g., `-L' and `-l') for the Fortran 77 |
| 36 |
dnl intrinsic and run-time libraries that are required to successfully |
| 37 |
dnl link a Fortran 77 program or shared library. |
| 38 |
dnl The output variable FLIBS is set to these flags |
| 39 |
AC_F77_LIBRARY_LDFLAGS |
| 40 |
dnl ------------------Fortran support---------------------------------- |
| 41 |
|
| 42 |
|
| 43 |
dnl Indicates that the source code may be in C++ |
| 44 |
AC_PROG_CXX |
| 45 |
AC_PROG_LIBTOOL |
| 46 |
|
| 47 |
dnl Will generate an install target so that users may just type 'make install' to install the software |
| 48 |
dnl Set output variable INSTALL to the path of a BSD compatible install program, |
| 49 |
dnl if one is found in the current PATH. |
| 50 |
dnl Otherwise, set INSTALL to `dir/install-sh -c', checking the directories specified to |
| 51 |
dnl AC_CONFIG_AUX_DIR (or its default directories) to determine dir |
| 52 |
AC_PROG_INSTALL |
| 53 |
|
| 54 |
dnl This will allow you to build code in sub-directories into temporary libraries, |
| 55 |
dnl which MAKE will then link in with the rest of the code |
| 56 |
dnl AC_PROG_RANLIB |
| 57 |
|
| 58 |
|
| 59 |
AC_PROG_MAKE_SET |
| 60 |
AC_CHECK_PROG(HAS_DOXYFILE, doxygen, yes) |
| 61 |
|
| 62 |
missing_dir=`cd $ac_aux_dir && pwd` |
| 63 |
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
| 64 |
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
| 65 |
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
| 66 |
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
| 67 |
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
| 68 |
|
| 69 |
|
| 70 |
dnl Process the different options |
| 71 |
AC_ARG_WITH(root, |
| 72 |
[--with-root=path Use the specified ROOT directory], |
| 73 |
ROOTSYS=$with_root,) |
| 74 |
|
| 75 |
ROOT_LIBRARY="${ROOTSYS}/lib" |
| 76 |
|
| 77 |
ROOT_LDFLAGS=" \ |
| 78 |
${ROOT_LIBRARY}/libCint.so ${ROOT_LIBRARY}/libCore.so \ |
| 79 |
${ROOT_LIBRARY}/libTree.so \ |
| 80 |
-ldl" |
| 81 |
|
| 82 |
|
| 83 |
ROOT_INCLUDES="-I${ROOTSYS}/include" |
| 84 |
AC_SUBST(ROOT_INCLUDES) |
| 85 |
AC_SUBST(ROOT_LDFLAGS) |
| 86 |
ROOTCINT=${ROOTSYS}/bin/rootcint |
| 87 |
AC_SUBST(ROOTCINT) |
| 88 |
|
| 89 |
AC_MSG_CHECKING(for gprof) |
| 90 |
AC_ARG_ENABLE(gprof, |
| 91 |
[--enable-gprof enable memory profiling with gprof], |
| 92 |
gprof=$enableval,gprof=no) |
| 93 |
if test "$gprof" != no |
| 94 |
then |
| 95 |
CXXFLAGS="-pg $CXXFLAGS" |
| 96 |
AC_MSG_RESULT(enabled) |
| 97 |
else |
| 98 |
AC_MSG_RESULT(no) |
| 99 |
fi |
| 100 |
|
| 101 |
AC_ARG_WITH(log4cxx, |
| 102 |
[--with-log4cxx=path Use the specified directroy for log4cxx], |
| 103 |
LOG4CXX=$with_log4cxx,) |
| 104 |
LOG4CXX_INCLUDES="-I${LOG4CXX}/include" |
| 105 |
AC_SUBST(LOG4CXX_INCLUDES) |
| 106 |
#------------------------------------------------------------ |
| 107 |
AC_ARG_WITH(log4cxx, |
| 108 |
[--with-log4cxx=path Use the specified directroy for log4cxx], |
| 109 |
LOG4CXX=$with_log4cxx,) |
| 110 |
|
| 111 |
LOG4CXX_LIBRARY="${LOG4CXX}/lib" |
| 112 |
LOG4CXX_INCLUDES="-I${LOG4CXX}/include" |
| 113 |
LOG4CXX_LDFLAGS=" ${LOG4CXX_LIBRARY}/liblog4cxx.so " |
| 114 |
|
| 115 |
AC_SUBST(LOG4CXX_INCLUDES) |
| 116 |
AC_SUBST(LOG4CXX_LDFLAGS) |
| 117 |
AC_SUBST(LOG4CXX_LIBRARY) |
| 118 |
#------------------------------------------------------------ |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
dnl Checks for header files. |
| 123 |
AC_HEADER_STDC |
| 124 |
|
| 125 |
|
| 126 |
dnl Indicates the name of the Makefile which will be generated |
| 127 |
dnl and the various subDirs where it will be generated one |
| 128 |
dnl Add your own Makefiles to create here. |
| 129 |
AC_OUTPUT(Makefile Doxyfile \ |
| 130 |
event/Makefile \ |
| 131 |
|
| 132 |
dnl ------------------makes for Packets and SubPackets---------------- |
| 133 |
event/mcmd/Makefile \ |
| 134 |
event/tmtc/Makefile \ |
| 135 |
event/log/Makefile \ |
| 136 |
event/arrDump/Makefile \ |
| 137 |
event/tabDump/Makefile \ |
| 138 |
event/varDump/Makefile \ |
| 139 |
event/tsbt/Makefile \ |
| 140 |
event/tsbb/Makefile \ |
| 141 |
event/endrun/Makefile \ |
| 142 |
event/physics/Makefile \ |
| 143 |
event/physics/tracker/Makefile \ |
| 144 |
event/physics/anticounter/Makefile \ |
| 145 |
event/physics/calorimeter/Makefile \ |
| 146 |
event/physics/neutronDetector/Makefile \ |
| 147 |
event/physics/trigger/Makefile \ |
| 148 |
event/physics/tof/Makefile \ |
| 149 |
event/physics/S4/Makefile \ |
| 150 |
dnl ------------------makes for Packets and SubPackets---------------- |
| 151 |
|
| 152 |
|
| 153 |
dnl ------------------makes for Techmodel Data---------------- |
| 154 |
techmodel/Makefile \ |
| 155 |
techmodel/forroutines/tracker/Makefile \ |
| 156 |
techmodel/forroutines/tracker/readraw/Makefile \ |
| 157 |
techmodel/forroutines/anticounter/Makefile \ |
| 158 |
techmodel/forroutines/calorimeter/Makefile \ |
| 159 |
techmodel/forroutines/tof/Makefile \ |
| 160 |
techmodel/forroutines/trigger/Makefile \ |
| 161 |
techmodel/forroutines/Makefile \ |
| 162 |
techmodel/physics/Makefile \ |
| 163 |
dnl ------------------makes for Techmodel Data---------------- |
| 164 |
) |
| 165 |
|
| 166 |
|