From bcebaacfd9509c270c04fae10d21261f52e016b5 Mon Sep 17 00:00:00 2001 From: "Bastian M. Wojek" Date: Mon, 22 Jun 2009 13:54:55 +0000 Subject: [PATCH] Added ROOTAUXLIBS and ROOTAUXCFLAGS to the Makefiles --- autogen.sh | 3 +-- configure.ac | 27 +++++++++++++++----------- src/Makefile.am | 4 ---- src/classes/Makefile.am | 4 ---- src/external/TLemRunHeader/Makefile.am | 3 --- 5 files changed, 17 insertions(+), 24 deletions(-) diff --git a/autogen.sh b/autogen.sh index d544414c..13abf0de 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,8 +3,7 @@ # autogen.sh # # Copyright (c) 2009 BMW -# -# Based on an autogen.sh script written by Daniel Elstner +# Copyright (c) 2002 Daniel Elstner # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License VERSION 2 as diff --git a/configure.ac b/configure.ac index 60af895e..6f66fba6 100644 --- a/configure.ac +++ b/configure.ac @@ -95,13 +95,13 @@ AC_ARG_WITH([fftw3], [PKG_CHECK_MODULES(FFTW3, fftw3 >= 3.1.0, [FFTW3_FOUND=1], [if test -r /usr/local/include/fftw3.h; then FFTW3_PREFIX="/usr/local" - AC_MSG_RESULT([using ${FFTW3_PREFIX} as prefix of the FFTW3 installation... (ignore the no just above)]) + AC_MSG_RESULT([using ${FFTW3_PREFIX} as prefix of the FFTW3 installation... (ignore the negative check result just above)]) elif test -r /usr/include/fftw3.h; then FFTW3_PREFIX="/usr" - AC_MSG_RESULT([using ${FFTW3_PREFIX} as prefix of the FFTW3 installation... (ignore the no just above)]) + AC_MSG_RESULT([using ${FFTW3_PREFIX} as prefix of the FFTW3 installation... (ignore the negative check result just above)]) elif test -r /sw/include/fftw3.h; then FFTW3_PREFIX="/sw" - AC_MSG_RESULT([using ${FFTW3_PREFIX} as prefix of the FFTW3 installation... (ignore the no just above)]) + AC_MSG_RESULT([using ${FFTW3_PREFIX} as prefix of the FFTW3 installation... (ignore the negative check result just above)]) else AC_MSG_ERROR( [FFTW3 not found. Please call configure with the --with-fftw3 option. @@ -137,13 +137,13 @@ AC_ARG_WITH([gsl], [PKG_CHECK_MODULES(GSL, gsl >= 1.9, [GSL_FOUND=1], [if test -r /usr/local/include/gsl/gsl_sf_hyperg.h; then GSL_PREFIX="/usr/local" - AC_MSG_RESULT([using ${GSL_PREFIX} as prefix of the GSL installation... (ignore the no just above)]) + AC_MSG_RESULT([using ${GSL_PREFIX} as prefix of the GSL installation... (ignore the negative check result just above)]) elif test -r /usr/include/gsl/gsl_sf_hyperg.h; then GSL_PREFIX="/usr" - AC_MSG_RESULT([using ${GSL_PREFIX} as prefix of the GSL installation... (ignore the no just above)]) + AC_MSG_RESULT([using ${GSL_PREFIX} as prefix of the GSL installation... (ignore the negative check result just above)]) elif test -r /sw/include/gsl/gsl_sf_hyperg.h; then GSL_PREFIX="/sw" - AC_MSG_RESULT([using ${GSL_PREFIX} as prefix of the GSL installation... (ignore the no just above)]) + AC_MSG_RESULT([using ${GSL_PREFIX} as prefix of the GSL installation... (ignore the negative check result just above)]) else AC_MSG_ERROR( [GSL not found. Please call configure with the --with-gsl option. @@ -179,13 +179,13 @@ AC_ARG_WITH([boostinc], [PKG_CHECK_MODULES(BOOST, boost >= 1.30, [BOOST_FOUND=1], [if test -r /usr/local/include/boost/spirit.hpp; then BOOST_INCLUDE="/usr/local/include" - AC_MSG_RESULT([using ${BOOST_INCLUDE} as include path for the Boost headers... (ignore the no just above)]) + AC_MSG_RESULT([using ${BOOST_INCLUDE} as include path for the Boost headers... (ignore the negative check result just above)]) elif test -r /usr/include/boost/spirit.hpp; then BOOST_INCLUDE="/usr/include" - AC_MSG_RESULT([using ${BOOST_INCLUDE} as include path for the Boost headers... (ignore the no just above)]) + AC_MSG_RESULT([using ${BOOST_INCLUDE} as include path for the Boost headers... (ignore the negative check result just above)]) elif test -r /sw/include/boost/spirit.hpp; then BOOST_INCLUDE="/sw/include" - AC_MSG_RESULT([using ${BOOST_INCLUDE} as include path for the Boost headers... (ignore the no just above)]) + AC_MSG_RESULT([using ${BOOST_INCLUDE} as include path for the Boost headers... (ignore the negative check result just above)]) else AC_MSG_ERROR( [Boost not found. Please call configure with the --with-boostinc option. @@ -212,11 +212,16 @@ dnl ----------------------------------------------- ROOT_PATH([5.22/00], [], AC_MSG_ERROR([Either ROOT is not installed correctly or the version is too old... please check!])) -ROOT_LIBS="-L@ROOTLIBDIR@ @ROOTGLIBS@ -lMinuit2 -lMathMore -lXMLParser" -ROOT_CFLAGS="-I@ROOTINCDIR@ @ROOTCFLAGS@" +ROOT_LIBS="-L${ROOTLIBDIR} ${ROOTGLIBS} ${ROOTAUXLIBS} -lMinuit2 -lMathMore -lXMLParser" +ROOT_CFLAGS="-I${ROOTINCDIR} ${ROOTCFLAGS} ${ROOTAUXCFLAGS}" AC_SUBST(ROOT_LIBS) AC_SUBST(ROOT_CFLAGS) +# It should be checked properly for -lMinuit2 -- at the moment we simply look if a header file is present in the include directory: + +AC_CHECK_FILE([${ROOTINCDIR}/../include/Minuit2/MnMinimize.h], AC_MSG_RESULT([Minuit2 headers found... OK]), + AC_MSG_ERROR([Minuit2 headers not found... Please check!])) + dnl ----------------------------------------------- dnl Set some paths and flags for PMusr and TLemRunHeader diff --git a/src/Makefile.am b/src/Makefile.am index 4667ab5b..fd52d6e4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,10 +14,6 @@ xml_DATA = musrfit_startup.xml LIBADD = $(PMUSR_LIBS) $(LEM_LIBS) -# The ROOT flags and libs have to be specified here... different automake-versions do not expand the @...@ in the variable of configure.ac -ROOT_CFLAGS = -I@ROOTINCDIR@ @ROOTCFLAGS@ -ROOT_LIBS = -L@ROOTLIBDIR@ @ROOTGLIBS@ -lMinuit2 -lMathMore -lXMLParser - AM_CXXFLAGS = $(LOCAL_BIN_CXXFLAGS) AM_LDFLAGS = $(LOCAL_BIN_LDFLAGS) INCLUDES = $(PMUSR_CFLAGS) $(FFTW3_CFLAGS) $(GSL_CFLAGS) $(BOOST_CFLAGS) $(ROOT_CFLAGS) diff --git a/src/classes/Makefile.am b/src/classes/Makefile.am index 4d7d5c8e..b005cdee 100644 --- a/src/classes/Makefile.am +++ b/src/classes/Makefile.am @@ -67,10 +67,6 @@ ext_cpp_sources = $(ext_source_dir)/MuSR_td_PSI_bin.cpp include_HEADERS = $(h_sources) $(ext_source_dir)/MuSR_td_PSI_bin.h noinst_HEADERS = $(h_linkdef) $(dict_h_sources) $(ext_source_dir)/tydefs.h -# The ROOT flags and libs have to be specified here... different automake-versions do not expand the @...@ in the variable of configure.ac -ROOT_CFLAGS = -I@ROOTINCDIR@ @ROOTCFLAGS@ -ROOT_LIBS = -L@ROOTLIBDIR@ @ROOTGLIBS@ -lMinuit2 -lMathMore -lXMLParser - INCLUDES = -I$(top_srcdir)/src/include -I$(ext_source_dir) $(LEM_CFLAGS) $(FFTW3_CFLAGS) $(GSL_CFLAGS) $(BOOST_CFLAGS) $(ROOT_CFLAGS) AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS) diff --git a/src/external/TLemRunHeader/Makefile.am b/src/external/TLemRunHeader/Makefile.am index 847fb0bb..02eb6290 100644 --- a/src/external/TLemRunHeader/Makefile.am +++ b/src/external/TLemRunHeader/Makefile.am @@ -23,9 +23,6 @@ dict_cpp_sources = \ include_HEADERS = $(h_sources) noinst_HEADERS = $(h_linkdef) $(dict_h_sources) -ROOT_CFLAGS = -I@ROOTINCDIR@ @ROOTCFLAGS@ -ROOT_LIBS = -L@ROOTLIBDIR@ @ROOTGLIBS@ - INCLUDES = -I. $(ROOT_CFLAGS) AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)