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