[packages/lal-inspiral] - updated to 1.7.7 - removed separate build system files (all required files already in tarball) - a
qboosh
qboosh at pld-linux.org
Mon Jul 3 05:33:47 CEST 2017
commit cae6bb9df87e42fa321d6dc48dfbb3fe5b4c8ecd
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Jul 3 05:35:18 2017 +0200
- updated to 1.7.7
- removed separate build system files (all required files already in tarball)
- added env patch (don't touch system variables which don't require changing)
check_series_macros.h | 20 ----
generate_vcs_info.py | 287 -------------------------------------------------
lal-inspiral-env.patch | 14 +++
lal-inspiral.spec | 165 +++++++++++++++++++++++-----
lalsuite_build.m4 | 242 -----------------------------------------
lalsuite_c99.m4 | 255 -------------------------------------------
lalsuite_gccflags.m4 | 24 -----
7 files changed, 153 insertions(+), 854 deletions(-)
---
diff --git a/lal-inspiral.spec b/lal-inspiral.spec
index 62e3e01..4694224 100644
--- a/lal-inspiral.spec
+++ b/lal-inspiral.spec
@@ -1,54 +1,118 @@
Summary: LAL routines for inspiral and ringdown CBC gravitational wave data analysis
+Summary(pl.UTF-8): Procedury LAL do analizy danych fal grawitacyjnych układów podwójnych
Name: lal-inspiral
-Version: 1.0.0.3
-Release: 0.2
+Version: 1.7.7
+Release: 1
Epoch: 1
License: GPL v2
Group: Libraries
-Source0: %{name}-%{version}.tar.xz
-# Source0-md5: 87b9e53659c570bb3488b8d30608b36e
-Source1: lalsuite_build.m4
-Source2: lalsuite_c99.m4
-Source3: lalsuite_gccflags.m4
-Source4: generate_vcs_info.py
-Source5: check_series_macros.h
-URL: https://www.lsc-group.phys.uwm.edu/daswg/projects/lalsuite.html
-BuildRequires: lal-metaio-devel
+Source0: http://software.ligo.org/lscsoft/source/lalsuite/lalinspiral-%{version}.tar.xz
+# Source0-md5: 9dd7f5d18f094735fd547d980eac6088
+Patch0: %{name}-env.patch
+URL: https://wiki.ligo.org/DASWG/LALSuite
+BuildRequires: autoconf >= 2.63
+BuildRequires: automake >= 1:1.11
+BuildRequires: gsl-devel >= 1.13
+BuildRequires: lal-devel >= 6.18.0
+BuildRequires: lal-frame-devel >= 1.4.3
+BuildRequires: lal-metaio-devel >= 1.3.1
+BuildRequires: lal-simulation-devel >= 1.7.0
+BuildRequires: libframe-devel
+BuildRequires: libstdc++-devel
+BuildRequires: metaio-devel
+BuildRequires: octave-devel >= 1:3.2.0
+BuildRequires: pkgconfig
+BuildRequires: python-devel >= 1:2.6
+BuildRequires: python-numpy-devel >= 1:1.7
+BuildRequires: swig >= 3.0.12
+BuildRequires: swig-python >= 2.0.12
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+Requires: gsl >= 1.13
+Requires: lal >= 6.18.0
+Requires: lal-frame >= 1.4.3
+Requires: lal-metaio >= 1.3.1
+Requires: lal-simulation >= 1.7.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
LAL routines for inspiral and ringdown CBC gravitational wave data
analysis.
+%description -l pl.UTF-8
+Procedury LAL do analizy danych fal grawitacyjnych układów podwójnych.
+
%package devel
Summary: Header files for lal-inspiral library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lal-inspiral
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
+Requires: gsl-devel >= 1.13
+Requires: lal-devel >= 6.18.0
+Requires: lal-metaio-devel >= 1.3.1
+Requires: lal-simulation-devel >= 1.7.0
+Requires: metaio-devel
%description devel
Header files for lal-inspiral library.
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki lal-inspiral.
+
%package static
Summary: Static lal-inspiral library
+Summary(pl.UTF-8): Statyczna biblioteka lal-inspiral
Group: Development/Libraries
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%description static
Static lal-inspiral library.
+%description static -l pl.UTF-8
+Statyczna biblioteka lal-inspiral.
+
+%package -n octave-lalinspiral
+Summary: Octave interface for LAL Inspiral
+Summary(pl.UTF-8): Interfejs Octave do biblioteki LAL Inspiral
+Group: Applications/Math
+Requires: %{name} = %{version}-%{release}
+Requires: octave-lal >= 6.18.0
+
+%description -n octave-lalinspiral
+Octave interface for LAL Inspiral.
+
+%description -n octave-lalinspiral -l pl.UTF-8
+Interfejs Octave do biblioteki LAL Inspiral.
+
+%package -n python-lalinspiral
+Summary: Python bindings for LAL Inspiral
+Summary(pl.UTF-8): Wiązania Pythona do biblioteki LAL Inspiral
+Group: Libraries/Python
+Requires: %{name} = %{version}-%{release}
+Requires: python-lal >= 6.18.0
+Requires: python-modules >= 1:2.6
+
+%description -n python-lalinspiral
+Python bindings for LAL Inspiral.
+
+%description -n python-lalinspiral -l pl.UTF-8
+Wiązania Pythona do biblioteki LAL Inspiral.
+
%prep
%setup -q -n lalinspiral-%{version}
-install %SOURCE1 %SOURCE2 %SOURCE3 gnuscripts
-install %SOURCE4 %SOURCE5 src
-rm gnuscripts/pkg.m4
-cp %{_aclocaldir}/pkg.m4 gnuscripts
+%patch0 -p1
%build
+%{__libtoolize}
+%{__aclocal} -I gnuscripts
+%{__autoconf}
+%{__autoheader}
+%{__automake}
%configure \
- CFLAGS="%{rpmcflags} \
- -w" \
+ --disable-silent-rules \
+ --enable-swig
-%{__make} -w V=1
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
@@ -56,8 +120,13 @@ rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/liblalinspiral.la
+
install -d $RPM_BUILD_ROOT/etc/shrc.d
-mv $RPM_BUILD_ROOT%{_sysconfdir}/*sh $RPM_BUILD_ROOT/etc/shrc.d
+%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/*sh $RPM_BUILD_ROOT/etc/shrc.d
+
+%py_postclean
%clean
rm -rf $RPM_BUILD_ROOT
@@ -67,16 +136,60 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
-/etc/shrc.d/lalinspiral-user-env*
+%attr(755,root,root) %{_bindir}/lalinspiral_version
+%attr(755,root,root) %{_libdir}/liblalinspiral.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblalinspiral.so.10
+/etc/shrc.d/lalinspiral-user-env.csh
+/etc/shrc.d/lalinspiral-user-env.fish
+/etc/shrc.d/lalinspiral-user-env.sh
%files devel
%defattr(644,root,root,755)
-%{_libdir}/lib*.so
-%{_libdir}/lib*.la
-%{_includedir}/lal/*
-%{_pkgconfigdir}/*.pc
+%attr(755,root,root) %{_libdir}/liblalinspiral.so
+%{_includedir}/lal/BBHPhenomCoeffs.h
+%{_includedir}/lal/Chisq_*.h
+%{_includedir}/lal/CoherentInspiral.h
+%{_includedir}/lal/CoincInspiralEllipsoid.h
+%{_includedir}/lal/FindChirp*.h
+%{_includedir}/lal/GenerateInspRing.h
+%{_includedir}/lal/GenerateInspiral.h
+%{_includedir}/lal/GeneratePPNInspiral.h
+%{_includedir}/lal/GenerateRing.h
+%{_includedir}/lal/Inject.h
+%{_includedir}/lal/InspiralInjectionParams.h
+%{_includedir}/lal/LALEOBNRv2Waveform.h
+%{_includedir}/lal/LALInspiral*.h
+%{_includedir}/lal/LALNoiseModelsInspiral.h
+%{_includedir}/lal/LALPSpinInspiralRD.h
+%{_includedir}/lal/LALSQTPN*.h
+%{_includedir}/lal/LALSTPNWaveform*.h
+%{_includedir}/lal/LALTrigScanCluster.h
+%{_includedir}/lal/LIGOLwXMLInspiralRead.h
+%{_includedir}/lal/LIGOLwXMLRingdownRead.h
+%{_includedir}/lal/LIGOMetadataInspiralUtils.h
+%{_includedir}/lal/LIGOMetadataRingdownUtils.h
+%{_includedir}/lal/NRWaveIO.h
+%{_includedir}/lal/NRWaveInject.h
+%{_includedir}/lal/RingUtils.h
+%{_includedir}/lal/SWIGLALInspiralTest.h
+%{_includedir}/lal/SWIGLALInspiral*.i
+%{_includedir}/lal/SimulateInspiral.h
+%{_includedir}/lal/TemplateBankGeneration.h
+%{_includedir}/lal/TrigScanEThincaCommon.h
+%{_includedir}/lal/swiglalinspiral.i
+%{_pkgconfigdir}/lalinspiral.pc
%files static
%defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/liblalinspiral.a
+
+%files -n octave-lalinspiral
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/octave/*/site/oct/*/lalinspiral.oct
+
+%files -n python-lalinspiral
+%defattr(644,root,root,755)
+%dir %{py_sitedir}/lalinspiral
+%attr(755,root,root) %{py_sitedir}/lalinspiral/_lalinspiral.so
+%{py_sitedir}/lalinspiral/*.py[co]
+%{py_sitedir}/lalinspiral/sbank
diff --git a/check_series_macros.h b/check_series_macros.h
deleted file mode 100644
index fcbca6c..0000000
--- a/check_series_macros.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <math.h>
-#include <lal/LALConstants.h>
-#include <lal/XLALError.h>
-#include <lal/Date.h>
-#include <lal/Units.h>
-
-#define LAL_CHECK_VALID_SERIES(s,val) \
- do { \
- if ( !(s) ) XLAL_ERROR_VAL( func, XLAL_EFAULT, val ); \
- if ( !(s)->data || !(s)->data->data || !(s)->data->length ) XLAL_ERROR_VAL( func, XLAL_EINVAL, val ); \
- } while (0)
-
-#define LAL_CHECK_CONSISTENT_TIME_SERIES(s1,s2,val) \
- do { \
- if ( XLALGPSCmp( &(s1)->epoch, &(s2)->epoch ) != 0 ) XLAL_ERROR_VAL( func, XLAL_ETIME, val ); \
- if ( fabs( (s1)->deltaT - (s2)->deltaT ) > LAL_REAL8_EPS ) XLAL_ERROR_VAL( func, XLAL_ETIME, val ); \
- if ( fabs( (s1)->f0 - (s2)->f0 ) > LAL_REAL8_EPS ) XLAL_ERROR_VAL( func, XLAL_EFREQ, val ); \
- if ( XLALUnitCompare( &(s1)->sampleUnits, &(s2)->sampleUnits ) ) XLAL_ERROR_VAL( func, XLAL_EUNIT, val ); \
- if ( (s1)->data->length != (s1)->data->length ) XLAL_ERROR_VAL( func, XLAL_EBADLEN, val ); \
- } while (0)
diff --git a/generate_vcs_info.py b/generate_vcs_info.py
deleted file mode 100644
index 13569d6..0000000
--- a/generate_vcs_info.py
+++ /dev/null
@@ -1,287 +0,0 @@
-# generate_vcs_info.py - determine git version info
-#
-# Based on generateGitID.sh by Reinhard Prix
-#
-# Copyright (C) 2009,2010, Adam Mercer <adam.mercer at ligo.org>
-# Copyright (C) 2009,2010, Nickolas Fotopoulos <nvf at gravity.phys.uwm.edu>
-# Copyright (C) 2008,2009, John T. Whelan <john.whelan at ligo.org>
-# Copyright (C) 2008, Reinhard Prix <reinhard.ligo.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#
-# preamble
-#
-
-# metadata
-__author__ = 'Adam Mercer <adam.mercer at ligo.org>'
-
-# import required system modules
-import exceptions
-import os
-import sys
-import time
-import optparse
-import filecmp
-import shutil
-try:
- import subprocess
-except ImportError:
- sys.exit("Python-2.4, or higher is required")
-
-#
-# class definitions
-#
-
-# version info class
-class git_info:
- def __init__(self):
- id = None
- date = None
- branch = None
- tag = None
- author = None
- committer = None
- status = None
-
-# git invocation error exception handler
-class GitInvocationError(exceptions.LookupError):
- pass
-
-#
-# helper methods
-#
-
-# command line option parsing
-def parse_args():
- # usage information
- usage = '%prog [options] project src_dir build_dir'
-
- # define option parser
- parser = optparse.OptionParser(usage=usage)
- parser.add_option('--sed', action='store_true', default=False,
- help='output sed commands for version replacement')
- parser.add_option('--sed-file', action='store_true', default=False,
- help='output sed file for version replacement')
-
- # parse command line options
- opts, args = parser.parse_args()
-
- # check for positional arguments
- if (len(args) != 3):
- parser.error('incorrect number of command line options specified')
-
- # check that both --sed and --file are not specified
- if opts.sed and opts.sed_file:
- parser.error('cannot specify both --sed and --sed-file')
-
- return opts, args[0], args[1], args[2]
-
-#
-# process management methods
-#
-
-# return output from running given command
-def call_out(command):
- """
- Run the given command (with shell=False) and return a tuple of
- (int returncode, str output). Strip the output of enclosing whitespace.
- """
- # start external command process
- p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-
- # get outputs
- out, _ = p.communicate()
-
- return p.returncode, out.strip()
-
-def check_call_out(command):
- """
- Run the given command (with shell=False) and return the output as a
- string. Strip the output of enclosing whitespace.
- If the return code is non-zero, throw GitInvocationError.
- """
- # start external command process
- p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-
- # get outputs
- out, _ = p.communicate()
-
- # throw exception if process failed
- if p.returncode != 0:
- raise GitInvocationError, 'failed to run "%s"' % " ".join(command)
-
- return out.strip()
-
-#
-# git version method
-#
-
-def in_git_repository():
- """
- Return True if git is available and we are in a git repository; else
- return False.
-
- NB: Unfortunately there is a magic number without any documentation to back
- it up. It turns out that git status returns non-zero exit codes for all sorts
- of success conditions, but I cannot find any documentation of them. 128 was
- determined empirically. I sure hope that it's portable.
- """
- ret_code, git_path = call_out(('which', 'git'))
- return (ret_code != 1) and not git_path.startswith('no') \
- and (call_out((git_path, 'status'))[0] != 128)
-
-# generate sed command file containing version info
-def generate_git_version_info():
- # info object
- info = git_info()
-
- git_path = check_call_out(('which', 'git'))
-
- # determine basic info about the commit
- # %H -- full git hash id
- # %ct -- commit time
- # %an, %ae -- author name, email
- # %cn, %ce -- committer name, email
- git_id, git_udate, git_author_name, git_author_email, \
- git_committer_name, git_committer_email = \
- check_call_out((git_path, 'log', '-1',
- '--pretty=format:%H,%ct,%an,%ae,%cn,%ce')).split(",")
-
- git_date = time.strftime('%Y-%m-%d %H:%M:%S +0000',
- time.gmtime(float(git_udate)))
- git_author = '%s <%s>' % (git_author_name, git_author_email)
- git_committer = '%s <%s>' % (git_committer_name, git_committer_email)
-
- # determine branch
- branch_match = check_call_out((git_path, 'rev-parse',
- '--symbolic-full-name', 'HEAD'))
- if branch_match == "HEAD":
- git_branch = None
- else:
- git_branch = os.path.basename(branch_match)
-
- # determine tag
- status, git_tag = call_out((git_path, 'describe', '--exact-match',
- '--tags', git_id))
- if status != 0:
- git_tag = None
-
- # refresh index
- check_call_out((git_path, 'update-index', '-q', '--refresh'))
-
- # check working copy for changes
- status_output = subprocess.call((git_path, 'diff-files', '--quiet'))
- if status_output != 0:
- git_status = 'UNCLEAN: Modified working tree'
- else:
- # check index for changes
- status_output = subprocess.call((git_path, 'diff-index', '--cached',
- '--quiet', 'HEAD'))
- if status_output != 0:
- git_status = 'UNCLEAN: Modified index'
- else:
- git_status = 'CLEAN: All modifications committed'
-
- # determine version strings
- info.id = git_id
- info.date = git_date
- info.branch = git_branch
- info.tag = git_tag
- info.author = git_author
- info.committer = git_committer
- info.status = git_status
-
- return info
-
-#
-# main program entry point
-#
-
-if __name__ == "__main__":
- # parse command line options
- options, project, src_dir, build_dir = parse_args()
-
- # filenames
- basename = '%sVCSInfo.h' % project
- infile = '%s.in' % basename # used after chdir to src_dir
- tmpfile= '%s/%s.tmp' % (build_dir, basename)
- srcfile = '%s/%s' % (src_dir, basename)
- dstfile = '%s/%s' % (build_dir, basename)
-
- # copy vcs header to build_dir, if appropriate
- if os.access(srcfile, os.F_OK) and not os.access(dstfile, os.F_OK):
- shutil.copy(srcfile, dstfile)
-
- # change to src_dir
- os.chdir(src_dir)
-
- # generate version information output, if appropriate
- # NB: First assume that git works and we are in a repository since
- # checking it is expensive and rarely necessary.
- try:
- info = generate_git_version_info()
- except GitInvocationError:
- # We expect a failure if either git is not available or we are not
- # in a repository. Any other failure is unexpected and should throw an
- # error.
- if not in_git_repository():
- sys.exit(0)
- else:
- sys.exit("Unexpected failure in discovering the git version")
-
- if options.sed_file:
- # output sed command file to stdout
- print 's/@ID@/%s/g' % info.id
- print 's/@DATE@/%s/g' % info.date
- print 's/@BRANCH@/%s/g' % info.branch
- print 's/@TAG@/%s/g' % info.tag
- print 's/@AUTHOR@/%s/g' % info.author
- print 's/@COMMITTER@/%s/g' % info.committer
- print 's/@STATUS@/%s/g' % info.status
- elif options.sed:
- # generate sed command line options
- sed_cmd = ('sed',
- '-e', 's/@ID@/%s/' % info.id,
- '-e', 's/@DATE@/%s/' % info.date,
- '-e', 's/@BRANCH@/%s/' % info.branch,
- '-e', 's/@TAG@/%s/' % info.tag,
- '-e', 's/@AUTHOR@/%s/' % info.author,
- '-e', 's/@COMMITTER@/%s/' % info.committer,
- '-e', 's/@STATUS@/%s/' % info.status,
- infile)
-
- # create tmp file
- # FIXME: subprocess.check_call becomes available in Python 2.5
- sed_retcode = subprocess.call(sed_cmd, stdout=open(tmpfile, "w"))
- if sed_retcode:
- raise GitInvocationError, "Failed call (modulo quoting): " \
- + " ".join(sed_cmd) + " > " + tmpfile
-
- # only update vcs header if appropriate
- if os.access(dstfile, os.F_OK) and filecmp.cmp(dstfile, tmpfile):
- os.remove(tmpfile)
- else:
- os.rename(tmpfile, dstfile)
- else:
- # output version info
- print 'Id: %s' % info.id
- print 'Date: %s' % info.date
- print 'Branch: %s' % info.branch
- print 'Tag: %s' % info.tag
- print 'Author: %s' % info.author
- print 'Committer: %s' % info.committer
- print 'Status: %s' % info.status
-
-# vim: syntax=python tw=72 ts=2 et
diff --git a/lal-inspiral-env.patch b/lal-inspiral-env.patch
new file mode 100644
index 0000000..cc1ed85
--- /dev/null
+++ b/lal-inspiral-env.patch
@@ -0,0 +1,14 @@
+--- lalinspiral-1.7.7/Makefile.am.orig 2015-03-27 05:14:39.000000000 +0100
++++ lalinspiral-1.7.7/Makefile.am 2017-07-02 21:10:16.094489089 +0200
+@@ -23,11 +23,6 @@
+ user_environment = \
+ set $(PACKAGE)_PREFIX $(prefix); \
+ set $(PACKAGE)_DATADIR $(pkgdatadir); \
+- prepend MANPATH $(mandir); \
+- prepend OCTAVE_PATH $(octexecdir); \
+- prepend PATH $(bindir); \
+- prepend PKG_CONFIG_PATH $(libdir)/pkgconfig; \
+- prepend PYTHONPATH $(pyexecdir) $(pythondir); \
+ $(END_OF_LIST)
+
+ pkgconfigdir = $(libdir)/pkgconfig
diff --git a/lalsuite_build.m4 b/lalsuite_build.m4
deleted file mode 100644
index f41e055..0000000
--- a/lalsuite_build.m4
+++ /dev/null
@@ -1,242 +0,0 @@
-# lalsuite_build.m4 - top level build macros
-#
-# serial 7
-
-AC_DEFUN([LALSUITE_ENABLE_MODULE],[
-AM_CONDITIONAL([$1],[test x$$2 = xtrue])
-eval $1_ENABLE_VAL="`eval test "$$2" = "true" && echo "ENABLED" || echo "DISABLED"`"
-])
-
-AC_DEFUN([LALSUITE_CHECK_LIB],[
-m4_pushdef([lowercase],translit([[$1]], [A-Z], [a-z]))
-m4_pushdef([uppercase],translit([[$1]], [a-z], [A-Z]))
-PKG_CHECK_MODULES(uppercase,[lowercase >= $2],[lowercase="true"],[lowercase="false"])
-if test "$lowercase" = "true"; then
- CPPFLAGS="$CPPFLAGS $[]uppercase[]_CFLAGS"
- LIBS="$LIBS $[]uppercase[]_LIBS"
- if test "$LALSUITE_BUILD" = "true"; then
- AC_DEFINE([HAVE_LIB]uppercase,[1],[Define to 1 if you have the $1 library])
- lowercase="true"
- else
- AC_CHECK_LIB(lowercase,[$3],[lowercase="true"],[AC_MSG_ERROR([could not find the $1 library])])
- AC_CHECK_HEADERS([$4],,[AC_MSG_ERROR([could not find the $4 header])])
- if test "$1" != "LALSupport"; then
- LALSUITE_HEADER_LIBRARY_MISMATCH_CHECK([$1])
- fi
- AC_DEFINE([HAVE_LIB]uppercase,[1],[Define to 1 if you have the $1 library])
- fi
-else
- AC_MSG_ERROR([could not find the $1 library])
-fi
-LALSUITE_ENABLE_MODULE(uppercase,lowercase)
-m4_popdef([lowercase])
-m4_popdef([uppercase])
-])
-
-AC_DEFUN([LALSUITE_CHECK_OPT_LIB],[
-m4_pushdef([lowercase],translit([[$1]], [A-Z], [a-z]))
-m4_pushdef([uppercase],translit([[$1]], [a-z], [A-Z]))
-if test "$lowercase" = "true"; then
- PKG_CHECK_MODULES(uppercase,[lowercase >= $2],[lowercase="true"],[lowercase="false"])
- if test "$lowercase" = "true"; then
- if test "$LALSUITE_BUILD" = "true"; then
- AC_DEFINE([HAVE_LIB]uppercase,[1],[Define to 1 if you have the $1 library])
- lowercase="true"
- CPPFLAGS="$CPPFLAGS $[]uppercase[]_CFLAGS"
- LIBS="$LIBS $[]uppercase[]_LIBS"
- else
- CPPFLAGS="$CPPFLAGS $[]uppercase[]_CFLAGS"
- LIBS="$LIBS $[]uppercase[]_LIBS"
- AC_CHECK_LIB(lowercase,[$3],[lowercase="true"],[lowercase=false
- AC_MSG_WARN([could not find the $1 library])])
- if test "$lowercase" = true; then
- AC_CHECK_HEADERS([$4],,[lowercase=false])
- if test "$lowercase" = true; then
- if test "$1" != "LALSupport"; then
- LALSUITE_HEADER_LIBRARY_MISMATCH_CHECK([$1])
- fi
- if test "$lowercase" = true; then
- AC_DEFINE([HAVE_LIB]uppercase,[1],[Define to 1 if you have the $1 library])
- fi
- fi
- fi
- fi
- fi
-fi
-LALSUITE_ENABLE_MODULE(uppercase,lowercase)
-m4_popdef([lowercase])
-m4_popdef([uppercase])
-])
-
-AC_DEFUN([LALSUITE_HEADER_LIBRARY_MISMATCH_CHECK],[
-AC_MSG_CHECKING([whether $1 headers match the library])
-lib_structure=`echo $1 | sed 's/LAL/lal/'`VCSInfo
-header_structure=`echo $1 | sed 's/LAL/lal/'`HeaderVCSInfo
-AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <string.h>
-#include <stdlib.h>
-#include <lal/$1VCSInfo.h>
-int main(void) { exit(XLALVCSInfoCompare(&$lib_structure, &$header_structure) ? 1 : 0); }
- ]])],
- [
- AC_MSG_RESULT(yes)
- ],
- [
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Your $1 headers do not match your
-library. Check config.log for details.
-])
- ],
- [
- AC_MSG_WARN([cross compiling: not checking])
- ]
-)
-])
-
-AC_DEFUN([LALSUITE_ENABLE_NIGHTLY],
-[AC_ARG_ENABLE(
- [nightly],
- AC_HELP_STRING([--enable-nightly],[nightly build [default=no]]),
- [ case "${enableval}" in
- yes) NIGHTLY_VERSION=`date +"%Y%m%d"`
- VERSION="${VERSION}.${NIGHTLY_VERSION}" ;;
- no) NIGHTLY_VERSION="";;
- *) NIGHTLY_VERSION="${enableval}"
- VERSION="${VERSION}.${NIGHTLY_VERSION}" ;;
- esac ],
- [ NIGHTLY_VERSION="" ] )
- AC_SUBST(NIGHTLY_VERSION)
-])
-
-AC_DEFUN([LALSUITE_ENABLE_LALFRAME],
-[AC_ARG_ENABLE(
- [lalframe],
- AC_HELP_STRING([--enable-lalframe],[compile code that requires lalframe library [default=yes]]),
- [ case "${enableval}" in
- yes) lalframe=true;;
- no) lalframe=false;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-frame) ;;
- esac
- ], [ lalframe=true ] )
-if test "$frame" = "false"; then
- lalframe=false
-fi
-])
-
-AC_DEFUN([LALSUITE_ENABLE_LALMETAIO],
-[AC_ARG_ENABLE(
- [lalmetaio],
- AC_HELP_STRING([--enable-lalmetaio],[compile code that requires lalmetaio library [default=yes]]),
- [ case "${enableval}" in
- yes) lalmetaio=true;;
- no) lalmetaio=false;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-metaio) ;;
- esac
- ], [ lalmetaio=true ] )
-if test "$metaio" = "false"; then
- lalmetaio=false
-fi
-])
-
-AC_DEFUN([LALSUITE_ENABLE_LALBURST],
-[AC_ARG_ENABLE(
- [lalburst],
- AC_HELP_STRING([--enable-lalburst],[compile code that requires lalburst library [default=yes]]),
- [ case "${enableval}" in
- yes) lalburst=true;;
- no) lalburst=false;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-burst) ;;
- esac
- ], [ lalburst=true ] )
-if test "$lalmetaio" = "false"; then
- lalburst=false
-fi])
-
-AC_DEFUN([LALSUITE_ENABLE_LALINSPIRAL],
-[AC_ARG_ENABLE(
- [lalinspiral],
- AC_HELP_STRING([--enable-lalinspiral],[compile code that requires lalinspiral library [default=yes]]),
- [ case "${enableval}" in
- yes) lalinspiral=true;;
- no) lalinspiral=false;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-inspiral) ;;
- esac
- ], [ lalinspiral=true ] )
-if test "$lalmetaio" = "false"; then
- lalinspiral=false
-fi
-])
-
-AC_DEFUN([LALSUITE_ENABLE_LALPULSAR],
-[AC_ARG_ENABLE(
- [lalpulsar],
- AC_HELP_STRING([--enable-lalpulsar],[compile code that requires lalpulsar library [default=yes]]),
- [ case "${enableval}" in
- yes) lalpulsar=true;;
- no) lalpulsar=false;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-lalpulsar) ;;
- esac
- ], [ lalpulsar=true ] )
-])
-
-AC_DEFUN([LALSUITE_ENABLE_LALSTOCHASTIC],
-[AC_ARG_ENABLE(
- [lalstochastic],
- AC_HELP_STRING([--enable-lalstochastic],[compile code that requires lalstochastic library [default=yes]]),
- [ case "${enableval}" in
- yes) lalstochastic=true;;
- no) lalstochastic=false;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-stochastic) ;;
- esac
- ], [ lalstochastic=true ] )
-if test "$lalmetaio" = "false"; then
- lalstochastic=false
-fi
-])
-
-AC_DEFUN([LALSUITE_ENABLE_LALXML],
-[AC_ARG_ENABLE(
- [lalxml],
- AC_HELP_STRING([--enable-lalxml],[compile code that requires lalxml library [default=no]]),
- [ case "${enableval}" in
- yes) lalxml=true;;
- no) lalxml=false;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-lalxml) ;;
- esac
- ], [ lalxml=false ] )
-if test "$lalpulsar" = "false"; then
- lalxml=false
-fi
-])
-
-AC_DEFUN([LALSUITE_ENABLE_BOINC],
-[AC_ARG_ENABLE(
- [boinc],
- AC_HELP_STRING([--enable-boinc],[enable BOINC support [default=no]]),
- [ case "${enableval}" in
- yes) boinc=true;;
- no) boinc=false;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-boinc);;
- esac
- ], [ boinc=false ] )
-AC_ARG_VAR([BOINC_PREFIX],[BOINC installation directory (optional)])
-])
-
-AC_DEFUN([LALSUITE_CHECK_BOINC],
-[AC_MSG_CHECKING([whether LAL has been compiled with BOINC support])
-AC_TRY_RUN([
-#include <lal/LALConfig.h>
-#ifdef LAL_BOINC_ENABLED
-int main( void ) { return 0; }
-#else
-int main( void ) { return 1; }
-#endif
-],
-AC_MSG_RESULT([yes])
-[boinc=true],
-AC_MSG_RESULT([no])
-[boinc=false],
-AC_MSG_RESULT([unknown])
-[boinc=false])
-])
diff --git a/lalsuite_c99.m4 b/lalsuite_c99.m4
deleted file mode 100644
index 397573c..0000000
--- a/lalsuite_c99.m4
+++ /dev/null
@@ -1,255 +0,0 @@
-# lalsuite_c99.m4 - c99 detection macro taken from autoconf-2.63
-#
-# serial 1
-
-# This file is part of Autoconf. -*- Autoconf -*-
-# Programming languages support.
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free
-# Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception, the Free Software Foundation gives unlimited
-# permission to copy, distribute and modify the configure scripts that
-# are the output of Autoconf. You need not follow the terms of the GNU
-# General Public License when using or distributing such scripts, even
-# though portions of the text of Autoconf appear in them. The GNU
-# General Public License (GPL) does govern all other use of the material
-# that constitutes the Autoconf program.
-#
-# Certain portions of the Autoconf source text are designed to be copied
-# (in certain cases, depending on the input) into the output of
-# Autoconf. We call these the "data" portions. The rest of the Autoconf
-# source text consists of comments plus executable code that decides which
-# of the data portions to output in any given case. We call these
-# comments and executable code the "non-data" portions. Autoconf never
-# copies any of the non-data portions into its output.
-#
-# This special exception to the GPL applies to versions of Autoconf
-# released by the Free Software Foundation. When you make and
-# distribute a modified version of Autoconf, you may extend this special
-# exception to the GPL to apply to your modified version as well, *unless*
-# your modified version has the potential to copy into its output some
-# of the text that was the non-data portion of the version that you started
-# with. (In other words, unless your change moves or copies text from
-# the non-data portions to the data portions.) If your modification has
-# such potential, you must delete any notice of this special exception
-# to the GPL from your modified version.
-#
-# Written by David MacKenzie, with help from
-# Akim Demaille, Paul Eggert,
-# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
-# Roland McGrath, Noah Friedman, david d zuhn, and many others.
-
-
-# _LALSUITE_AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
-# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
-# --------------------------------------------------------------
-# Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99')
-# by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails,
-# try again with each compiler option in the space-separated OPTION-LIST; if one
-# helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE,
-# else ACTION-IF-UNAVAILABLE.
-AC_DEFUN([_LALSUITE_AC_C_STD_TRY],
-[AC_MSG_CHECKING([for $CC option to accept ISO ]m4_translit($1, [c], [C]))
-AC_CACHE_VAL(ac_cv_prog_cc_$1,
-[ac_cv_prog_cc_$1=no
-ac_save_CC=$CC
-AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])])
-for ac_arg in '' $4
-do
- CC="$ac_save_CC $ac_arg"
- _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_$1=$ac_arg])
- test "x$ac_cv_prog_cc_$1" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-])# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_$1" in
- x)
- AC_MSG_RESULT([none needed]) ;;
- xno)
- AC_MSG_RESULT([unsupported]) ;;
- *)
- CC="$CC $ac_cv_prog_cc_$1"
- AC_MSG_RESULT([$ac_cv_prog_cc_$1]) ;;
-esac
-AS_IF([test "x$ac_cv_prog_cc_$1" != xno], [$5], [$6])
-])# _LALSUITE_AC_C_STD_TRY
-
-
-# _LALSUITE_AC_PROG_CC_C99 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE])
-# ----------------------------------------------------------------
-# If the C compiler is not in ISO C99 mode by default, try to add an
-# option to output variable CC to make it so. This macro tries
-# various options that select ISO C99 on some system or another. It
-# considers the compiler to be in ISO C99 mode if it handles _Bool,
-# // comments, flexible array members, inline, long long int, mixed
-# code and declarations, named initialization of structs, restrict,
-# va_copy, varargs macros, variable declarations in for loops and
-# variable length arrays.
-AC_DEFUN([_LALSUITE_AC_PROG_CC_C99],
-[_LALSUITE_AC_C_STD_TRY([c99],
-[[#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros. These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
- int x = 1234;
- int y = 5678;
- debug ("Flag");
- debug ("X = %d\n", x);
- showlist (The first, second, and third items.);
- report (x>y, "x is %d but y is %d", x, y);
-}
-
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
- your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
- your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-
-struct incomplete_array
-{
- int datasize;
- double data[];
-};
-
-struct named_init {
- int number;
- const wchar_t *name;
- double average;
-};
-
-typedef const char *ccp;
-
-static inline int
-test_restrict (ccp restrict text)
-{
- // See if C++-style comments work.
- // Iterate through items via the restricted pointer.
- // Also check for declarations in for loops.
- for (unsigned int i = 0; *(text+i) != '\0'; ++i)
- continue;
- return 0;
-}
-
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
-{
- va_list args;
- va_start (args, format);
- va_list args_copy;
- va_copy (args_copy, args);
-
- const char *str;
- int number;
- float fnumber;
-
- while (*format)
- {
- switch (*format++)
- {
- case 's': // string
- str = va_arg (args_copy, const char *);
- break;
- case 'd': // int
- number = va_arg (args_copy, int);
- break;
- case 'f': // float
- fnumber = va_arg (args_copy, double);
- break;
- default:
- break;
- }
- }
- va_end (args_copy);
- va_end (args);
-}
-]],
-[[
- // Check bool.
- _Bool success = false;
-
- // Check restrict.
- if (test_restrict ("String literal") == 0)
- success = true;
- char *restrict newvar = "Another string";
-
- // Check varargs.
- test_varargs ("s, d' f .", "string", 65, 34.234);
- test_varargs_macros ();
-
- // Check flexible array members.
- struct incomplete_array *ia =
- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
- ia->datasize = 10;
- for (int i = 0; i < ia->datasize; ++i)
- ia->data[i] = i * 1.234;
-
- // Check named initializers.
- struct named_init ni = {
- .number = 34,
- .name = L"Test wide string",
- .average = 543.34343,
- };
-
- ni.number = 58;
-
- int dynamic_array[ni.number];
- dynamic_array[ni.number - 1] = 543;
-
- // work around unused variable warnings
- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
- || dynamic_array[ni.number - 1] != 543);
-]],
-dnl Try
-dnl GCC -std=gnu99 (unused restrictive modes: -std=c99 -std=iso9899:1999)
-dnl AIX -qlanglvl=extc99 (unused restrictive mode: -qlanglvl=stdc99)
-dnl HP cc -AC99
-dnl Intel ICC -std=c99, -c99 (deprecated)
-dnl IRIX -c99
-dnl Solaris -xc99=all (Forte Developer 7 C mishandles -xc99 on Solaris 9,
-dnl as it incorrectly assumes C99 semantics for library functions)
-dnl Tru64 -c99
-dnl with extended modes being tried first.
-[[-std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99]], [$1], [$2])[]dnl
-])# _LALSUITE_AC_PROG_CC_C99
-
-
-# LALSUITE_AC_PROG_CC_C99
-# --------------
-AC_DEFUN([LALSUITE_AC_PROG_CC_C99],
-[ AC_REQUIRE([AC_PROG_CC])dnl
- _LALSUITE_AC_PROG_CC_C99
-])
diff --git a/lalsuite_gccflags.m4 b/lalsuite_gccflags.m4
deleted file mode 100644
index ca321fd..0000000
--- a/lalsuite_gccflags.m4
+++ /dev/null
@@ -1,24 +0,0 @@
-# lalsuite_gccflags.m4 - macros to set strict gcc flags
-#
-# serial 3
-
-AC_DEFUN([LALSUITE_ENABLE_GCC_FLAGS],
-[AC_ARG_ENABLE([gcc_flags],
- AC_HELP_STRING([--enable-gcc-flags],[turn on strict gcc warning flags (default=yes)]),
- [case "${enableval}" in
- yes) DO_ENABLE_LALSUITE_GCC_FLAGS;;
- no) ;;
- *) DO_ENABLE_LALSUITE_GCC_FLAGS;;
- esac ],
- [ DO_ENABLE_LALSUITE_GCC_FLAGS ] )
-])
-
-AC_DEFUN([DO_ENABLE_LALSUITE_GCC_FLAGS],
-[
- lal_gcc_flags="-g3 -O4 -Wall -W -Werror -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common -Wnested-externs -Wno-format-zero-length -fno-strict-aliasing"
- case $host_cpu-$host_os in
- *i386-darwin*) lal_gcc_flags="${lal_gcc_flags} -pedantic" ;;
- *x86_64-darwin*) lal_gcc_flags="${lal_gcc_flags} -pedantic" ;;
- *) lal_gcc_flags="${lal_gcc_flags} -pedantic-errors" ;;
- esac
-])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lal-inspiral.git/commitdiff/cae6bb9df87e42fa321d6dc48dfbb3fe5b4c8ecd
More information about the pld-cvs-commit
mailing list