From 117ccbf38ab4c3e09a2200350b3686b9f25766af Mon Sep 17 00:00:00 2001 From: "Bastian M. Wojek" Date: Sat, 20 Jun 2009 05:50:09 +0000 Subject: [PATCH] Few minor script and flag changes --- INSTALL | 2 +- autogen.sh | 38 ++++++++++++++++---------- configure.ac | 21 ++++++-------- src/Makefile.am | 2 +- src/classes/Makefile.am | 6 ++-- src/external/TLemRunHeader/Makefile.am | 1 + 6 files changed, 39 insertions(+), 31 deletions(-) diff --git a/INSTALL b/INSTALL index 8c10d556..d761b4cc 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ #--------------------------------------------------------------------- # INSTALL # Andreas Suter, 2008/01/15 -# $Id: README 3854 2009-04-14 19:32:35Z nemu $ +# $Id: INSTALL 3854 2009-04-14 19:32:35Z nemu $ #--------------------------------------------------------------------- To get it all build: diff --git a/autogen.sh b/autogen.sh index 8f8c335a..2215d992 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,10 +1,10 @@ #! /bin/sh -# $Id: autogen.sh,v 1.4 2002/12/02 01:39:49 murrayc Exp $ +# autogen.sh # # Copyright (c) 2009 BMW # -# Based on a autogen.sh script written by Daniel Elstner +# Based on an autogen.sh script written by 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 @@ -27,22 +27,32 @@ test "x${dir}" = "x" && dir='.' if test "x`cd "${dir}" 2>/dev/null && pwd`" != "x`pwd`" then - echo "This script must be executed directly from the source directory." + echo "This script must be executed directly from the source directory!" exit 1 fi -rm -f config.cache acconfig.h +rm -f config.cache -echo "--> libtoolize" && \ -libtoolize --force && \ -echo "--> aclocal" && \ -aclocal && \ -echo "--> autoconf" && \ -autoconf && \ -echo "--> autoheader" && \ -autoheader && \ -echo "--> automake" && \ -automake --add-missing --gnu && exit 0 +if test -e admin/depcomp && \ + test -e admin/install-sh && \ + test -e admin/ltmain.sh && \ + test -e admin/missing && \ + test -e aclocal.m4 +then + echo ">> autoreconf" && \ + autoreconf && exit 0 +else + echo ">> libtoolize" && \ + libtoolize --force && \ + echo ">> aclocal" && \ + aclocal && \ + echo ">> autoconf" && \ + autoconf && \ + echo ">> autoheader" && \ + autoheader && \ + echo ">> automake" && \ + automake --add-missing --gnu && exit 0 +fi exit 1 diff --git a/configure.ac b/configure.ac index 422dc764..c062e80e 100644 --- a/configure.ac +++ b/configure.ac @@ -85,8 +85,8 @@ dnl Ask user for path to fftw3 stuff dnl ----------------------------------------------- FFTW3_FOUND=0 -AC_ARG_WITH(fftw3, - [ --with-fftw3= prefix of FFTW3 installation. e.g. /usr/local or /usr], +AC_ARG_WITH([fftw3], + [AC_HELP_STRING([--with-fftw3],[prefix of FFTW3 installation. e.g. /usr/local or /usr])], [FFTW3_PREFIX=$with_fftw3 if !(test -r ${FFTW3_PREFIX}/include/fftw3.h); then AC_MSG_ERROR(FFTW3 cannot be found at the specified path!) @@ -96,7 +96,7 @@ AC_ARG_WITH(fftw3, [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)]) - else if test -r /usr/include/fftw3.h; then + 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)]) else @@ -106,7 +106,6 @@ AC_ARG_WITH(fftw3, e.g. --with-fftw3=/usr/local or --with-fftw3=/usr] ) fi - fi ] ) ] @@ -125,8 +124,8 @@ dnl Ask user for path to gsl stuff dnl ----------------------------------------------- GSL_FOUND=0 -AC_ARG_WITH(gsl, - [ --with-gsl= prefix of GSL installation. e.g. /usr/local or /usr], +AC_ARG_WITH([gsl], + [AC_HELP_STRING([--with-gsl],[prefix of GSL installation. e.g. /usr/local or /usr])], [GSL_PREFIX=$with_gsl if !(test -r ${GSL_PREFIX}/include/gsl/gsl_sf_hyperg.h); then AC_MSG_ERROR(GSL cannot be found at the specified path!) @@ -136,7 +135,7 @@ AC_ARG_WITH(gsl, [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)]) - else if test -r /usr/include/gsl/gsl_sf_hyperg.h; then + 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)]) else @@ -146,7 +145,6 @@ AC_ARG_WITH(gsl, e.g. --with-gsl=/usr/local or --with-gsl=/usr] ) fi - fi ] ) ] @@ -165,8 +163,8 @@ dnl Ask user for path to boost stuff dnl ----------------------------------------------- BOOST_FOUND=0 -AC_ARG_WITH(boostinc, - [ --with-boostinc= path to the header files of the Boost installation. e.g. /usr/local/include or /usr/include], +AC_ARG_WITH([boostinc], + [AC_HELP_STRING([--with-boostinc],[path to the header files of the Boost installation, e.g. /usr/local/include or /usr/include])], [BOOST_INCLUDE=$with_boostinc if !(test -r ${BOOST_INCLUDE}/boost/spirit.hpp); then AC_MSG_ERROR(Boost cannot be found at the specified path!) @@ -176,7 +174,7 @@ AC_ARG_WITH(boostinc, [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)]) - else if test -r /usr/include/boost/spirit.hpp; then + 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)]) else @@ -186,7 +184,6 @@ AC_ARG_WITH(boostinc, e.g. --with-boostinc=/usr/local/include or --with-boostinc=/usr/include or --with-boostinc=/usr/include/boost-1_33_0] ) fi - fi ] ) ] diff --git a/src/Makefile.am b/src/Makefile.am index 41ee2e76..ba1482a0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,7 @@ xml_DATA = musrfit_startup.xml LIBADD = $(LEM_LIBS) $(PMUSR_LIBS) -AM_CFLAGS = -g -O3 -Wall -Wno-trigraphs +AM_CXXFLAGS = -Wall -Wno-trigraphs INCLUDES = $(PMUSR_CFLAGS) $(FFTW3_CFLAGS) $(GSL_CFLAGS) $(BOOST_CFLAGS) $(ROOT_CFLAGS) LIBS = $(LEM_LIBS) $(PMUSR_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS) diff --git a/src/classes/Makefile.am b/src/classes/Makefile.am index 8ac75cb4..223c754c 100644 --- a/src/classes/Makefile.am +++ b/src/classes/Makefile.am @@ -64,10 +64,10 @@ ext_source_dir = $(top_srcdir)/src/external/MuSR_software/Class_MuSR_PSI ext_h_sources = $(ext_source_dir)/MuSR_td_PSI_bin.h $(ext_source_dir)/tydefs.h ext_cpp_sources = $(ext_source_dir)/MuSR_td_PSI_bin.cpp -include_HEADERS = $(h_sources) $(ext_h_sources) -noinst_HEADERS = $(h_linkdef) $(dict_h_sources) +include_HEADERS = $(h_sources) $(ext_source_dir)/MuSR_td_PSI_bin.h +noinst_HEADERS = $(h_linkdef) $(dict_h_sources) $(ext_source_dir)/tydefs.h INCLUDES = -I$(top_srcdir)/src/include -I$(ext_source_dir) $(LEM_CFLAGS) $(FFTW3_CFLAGS) $(GSL_CFLAGS) $(BOOST_CFLAGS) $(ROOT_CFLAGS) -AM_CXXFLAGS = -g -O3 -Wall -Wno-trigraphs +AM_CXXFLAGS = -Wall -Wno-trigraphs BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources) AM_CPPFLAGS = -I@ROOTINCDIR@ diff --git a/src/external/TLemRunHeader/Makefile.am b/src/external/TLemRunHeader/Makefile.am index 88e44219..5c703817 100644 --- a/src/external/TLemRunHeader/Makefile.am +++ b/src/external/TLemRunHeader/Makefile.am @@ -23,6 +23,7 @@ dict_cpp_sources = \ include_HEADERS = $(h_sources) noinst_HEADERS = $(h_linkdef) $(dict_h_sources) INCLUDES = -I. $(ROOT_CFLAGS) +AM_CXXFLAGS = -Wall -Wno-trigraphs BUILT_SOURCES = $(dict_cpp_sources) $(dist_h_sources) AM_CPPFLAGS = -I@ROOTINCDIR@