Gitlab will migrate to a new storage backend starting 0300 UTC on 2020-04-04. We do not anticipate a maintenance window for this migration. Performance may be impacted over the weekend. Thanks for your patience.

Commit 03db9f19 authored by John Douglas Veitch's avatar John Douglas Veitch

Create LALInference Package

Original: b03f1788ee817d834350e620eb1c79741e90a3eb
parent 1788c5df
#!/bin/sh
# function to report failure
fail () {
echo "!!! 00boot: $1 failed" >&2
exit 1
}
# help message
helpmsg="Usage $0 [options]
Options: [defaults in brackets after description]"
helpmsg="$helpmsg
--help print this message"
helpmsg="$helpmsg
--with-autoreconf=AUTORECONF use autoreconf program AUTORECONF [autoreconf]"
helpmsg="$helpmsg
--with-aclocal=ACLOCAL use aclocal program ACLOCAL [aclocal]"
helpmsg="$helpmsg
--with-autoheader=AUTOHEADER use autoheader program AUTOHEADER [autoheader]"
helpmsg="$helpmsg
--with-automake=AUTOMAKE use automake program AUTOMAKE [automake]"
helpmsg="$helpmsg
--with-autoconf=AUTOCONF use autoconf program AUTOCONF [autoconf]"
# process args
while test $# -gt 0 ; do
option=$1
case "$option" in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $option in
-h | -help | --help ) echo "$helpmsg"; exit 0;;
-with-autoreconf=* | --with-autoreconf=* ) AUTORECONF="$optarg";;
-with-aclocal=* | --with-aclocal=* ) ACLOCAL="$optarg";;
-with-autoheader=* | --with-autoheader=* ) AUTOHEADER="$optarg";;
-with-automake=* | --with-automake=* ) AUTOMAKE="$optarg";;
-with-autoconf=* | --with-autoconf=* ) AUTOCONF="$optarg";;
*) echo "unrecognized option $option"; exit 1;;
esac
shift
done
# check autotools versions
echo "00boot: checking versions of autotools"
AUTORECONF=${AUTORECONF:-"autoreconf"}
ACLOCAL=${ACLOCAL:-"aclocal"}
AUTOHEADER=${AUTOHEADER:-"autoheader"}
AUTOMAKE=${AUTOMAKE:-"automake"}
AUTOCONF=${AUTOCONF:-"autoconf"}
autoreconf_version="`$AUTORECONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
aclocal_version="`$ACLOCAL --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoheader_version="`$AUTOHEADER --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
automake_version="`$AUTOMAKE --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoconf_version="`$AUTOCONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
if test -z "$autoreconf_version"; then
fail "finding program autoreconf"
fi
if test -z "$aclocal_version"; then
fail "finding program aclocal"
fi
if test -z "$autoheader_version"; then
fail "finding program autoheader"
fi
if test -z "$automake_version"; then
fail "finding program automake"
fi
if test -z "$autoconf_version"; then
fail "finding program autoconf"
fi
# report autotools versions
echo "00boot: using:"
printf "00boot:\t%-16s %s\n" "autoreconf-$autoreconf_version:" "`which $AUTORECONF`"
printf "00boot:\t%-16s %s\n" "aclocal-$aclocal_version:" "`which $ACLOCAL`"
printf "00boot:\t%-16s %s\n" "autoheader-$autoheader_version:" "`which $AUTOHEADER`"
printf "00boot:\t%-16s %s\n" "automake-$automake_version:" "`which $AUTOMAKE`"
printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
# FIXME: autoreconf from Ubuntu 9.10 (and probably also from recent
# Debian versions) automatically run libtoolize with the --copy option
# therefore over writing the supplied libtool scripts with system
# version. This can lead to unexpected build failures therefore to work
# round this "feature" we set the LIBTOOLIZE enviroment variable to
# point to the the true executable which bypasses the running of
# libtoolize, this will not effect the vast majority of users and those
# it will effect will know how to run libtoolize, if required.
# generate build system
echo "00boot: running autoreconf"
LIBTOOLIZE=true $AUTORECONF || fail "autoreconf"
# report success
echo "00boot: success"
echo "
=================================================================
00boot has been run.
Now run './configure' with appropriate options
to configure LAL Inspiral.
================================================================="
This diff is collapsed.
ACLOCAL_AMFLAGS = -I gnuscripts
EXTRA_DIST = \
COPYING \
lalinference.pc.in \
lalinference.spec.in \
lalinference.spec \
aclocal.m4
SUBDIRS = \
gnuscripts \
debian \
include \
src \
test
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = lalinference.pc
DISTCLEANFILES = config.lt
distcleancheck_listfiles = find . -type f \! -name "LALInferenceVCSInfo.h" -print
# vcs-clean: more than maintainer-clean, this cleans everything not in
# the vcs archive
vcs-clean: maintainer-clean
-rm -f aclocal.m4
-rm -f configure
-rm -f Makefile.in
-rm -f include/config.h.in
-rm -f include/Makefile.in
-rm -f include/lal/Makefile.in
-rm -r src/Makefile.in
-rm -f test/Makefile.in
all-local:
@echo "";\
echo "=================================================================";\
echo "";\
echo " LAL Inference has now been successfully built.";\
echo " Now run 'make install' to install LAL Inference.";\
echo "";\
echo "================================================================="
install-exec-local:
@echo "";\
echo "=================================================================";\
echo "";\
echo " LAL Inference has now been successfully installed.";\
echo "";\
echo " Now you may want to setup your environment:";\
echo "";\
echo " Bourne shell [bash] users: please add the";\
echo " following lines to your .profile file";\
echo "";\
echo ' . $(sysconfdir)/lalinference-user-env.sh';\
echo "";\
echo " C-shell [tcsh] users: please add the following";\
echo " lines to your .login file";\
echo "";\
echo ' source $(sysconfdir)/lalinference-user-env.csh';\
echo "";\
echo "================================================================="
AC_INIT([lalinference],[0.0.0.1],[lal-discuss@gravity.phys.uwm.edu])
AM_CONFIG_HEADER([include/config.h src/LALInferenceConfig.h])
AC_CONFIG_SRCDIR([src/LALInference.h])
AC_CONFIG_AUX_DIR([gnuscripts])
AC_CONFIG_MACRO_DIR([gnuscripts])
AC_CONFIG_FILES([ \
lalinference.spec \
lalinference.pc \
Makefile \
gnuscripts/Makefile \
debian/Makefile \
include/Makefile \
include/lal/Makefile \
src/Makefile \
test/Makefile
])
AM_INIT_AUTOMAKE([foreign])
AC_CANONICAL_HOST
# set library api info
# 1. start with version information of "0:0:0" for each libtool library
# 2. update the version information only immediately before a public
# release of your software. More frequent updates are unnecessary,
# and only guarantee that the current interface number gets larger
# faster.
# 3. if the library source code has changed at all since the last
# update, then increment revision ("c:r:a" becomes "c:r+1:a").
# 4. if any interfaces have been added, removed, or changed since the
# last update, increment current, and set revision to 0.
# 5. if any interfaces have been added since the last public release,
# then increment age.
# 6. if any interfaces have been removed since the last public release,
# then set age to 0.
AC_SUBST([LIBCURRENT],[1])
AC_SUBST([LIBREVISION],[0])
AC_SUBST([LIBAGE],[0])
AC_SUBST([LIBVERSION],[${LIBCURRENT}:${LIBREVISION}:${LIBAGE}])
# default install path
AC_PREFIX_DEFAULT([/opt/lscsoft/lalinference])
# nightly build
LALSUITE_ENABLE_NIGHTLY
# put version/configure info in config header
lalinference_version_major=`echo "$VERSION" | cut -d. -f1`
lalinference_version_minor=`echo "$VERSION" | cut -d. -f2`
lalinference_version_micro=`echo "$VERSION" | cut -d. -f3`
lalinference_version_devel=`echo "$VERSION" | cut -d. -f4-`
test -z "$lalinference_version_micro" && lalinference_version_micro=0
test -z "$lalinference_version_devel" && lalinference_version_devel=0
lalinspiral_configure_date=`date +"%Y-%m-%dT%H:%M:%S%z"`
AC_DEFINE_UNQUOTED([LALINFERENCE_VERSION],["$VERSION"],[LALInference Version])
AC_DEFINE_UNQUOTED([LALINFERENCE_VERSION_MAJOR],[$lalinference_version_major],
[LALInference Version Major Number])
AC_DEFINE_UNQUOTED([LALINFERENCE_VERSION_MINOR],[$lalinference_version_minor],
[LALInference Version Minor Number])
AC_DEFINE_UNQUOTED([LALINFERENCE_VERSION_MICRO],[$lalinference_version_micro],
[LALInference Version Micro Number])
AC_DEFINE_UNQUOTED([LALINFERENCE_VERSION_DEVEL],[$lalinference_version_devel],
[LALInference Version Devel Number])
AC_DEFINE_UNQUOTED([LALINFERENCE_CONFIGURE_ARGS],["$ac_configure_args"],
[LALInference Configure Arguments])
AC_DEFINE_UNQUOTED([LALINFERENCE_CONFIGURE_DATE],["$lalinspiral_configure_date"],
[LALInference Configure Date])
# enable strict gcc flags
LALSUITE_ENABLE_GCC_FLAGS
# optional lal libraries
LALSUITE_ENABLE_LALFRAME
# check for c compiler
m4_pattern_allow([AC_PROG_CC_C99])
m4_ifdef([AC_PROG_CC_C99],[AC_PROG_CC_C99],[LALSUITE_AC_PROG_CC_C99])
# use silent build rules if available
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
# checks for programs
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
LT_INIT
AM_PATH_PYTHON([2.4],,[AC_MSG_ERROR([Python-2.4, or higher, is required])])
# check for supported mac os x version
LALSUITE_OSX_VERSION_CHECK
# link tests using libtool
LALSUITE_USE_LIBTOOL
# check for header files
AC_HEADER_STDC
# check for required libraries
AC_CHECK_LIB([m],[main],,[AC_MSG_ERROR([could not find the math library])])
# check for gsl
PKG_CHECK_MODULES([GSL],[gsl],[true],[false])
CPPFLAGS="$CPPFLAGS $GSL_CFLAGS"
LIBS="$LIBS $GSL_LIBS"
AC_CHECK_LIB([gslcblas],[main],,[AC_MSG_ERROR([could not find the gsl library])])
AC_CHECK_LIB([gsl],[gsl_strerror],,[AC_MSG_ERROR([could not find the gsl library])])
# check for gsl headers
AC_CHECK_HEADERS([gsl/gsl_errno.h],,[AC_MSG_ERROR([could not find the gsl/gsl_errno.h header])])
# metaio
PKG_CHECK_MODULES([METAIO],[libmetaio],[true],[false])
CPPFLAGS="$CPPFLAGS $METAIO_CFLAGS"
LIBS="$LIBS $METAIO_LIBS"
AC_CHECK_LIB([metaio],[MetaioOpen],,[AC_MSG_ERROR([could not find the metaio library])])
# check for libmetaio headers
AC_CHECK_HEADERS([metaio.h],,[AC_MSG_ERROR([could not find the metaio.h header])])
# check for lal libraries and headers
LALSUITE_CHECK_LIB([LAL],[6.4.0],[LALVersion],[lal/LALStdio.h])
LALSUITE_CHECK_LIB([LALSupport],[6.4.0],[LALOpenDataFile],[lal/FileIO.h])
LALSUITE_CHECK_LIB([LALMetaIO],[1.0.1],[XLALCreateMetaTableDir],[lal/LIGOLwXMLRead.h])
LALSUITE_CHECK_LIB([LALInspiral],[1.1.0.2],[LALInspiralParameterCalc],[lal/LALInspiral.h])
LALSUITE_CHECK_LIB([LALFrame],[1.0.1],[LALFrOpen],[lal/LALFrameL.h])
# add gcc specific flags
if test "$GCC" = yes; then
CFLAGS="$CFLAGS $lal_gcc_flags"
# add mac os x specific flags
if test "x$MACOSX_VERSION" != "x"; then
CFLAGS="$CFLAGS -mmacosx-version-min=10.4"
fi
fi
# output
LAL_HEADER_LINK=${ac_aux_dir}/header-link.mk
AC_SUBST_FILE([LAL_HEADER_LINK])
AC_PROG_MAKE_SET
AC_OUTPUT
echo "
================================================================
LALInference has now been successfully configured
and will be installed under the directory:
${prefix}
Now run 'make' to build LALInference
and run 'make install' to install LALInference
================================================================="
EXTRA_DIST = \
changelog \
compat \
control \
copyright \
docs \
lalinference-dev.dirs \
lalinference-dev.install \
lalinference.dirs \
lalinference.install \
rules
lalinspiral (1.1.0-1lscsoft1) unstable; urgency=low
* LALInspiral 1.1.0
-- Adam Mercer <adam.mercer@ligo.org> Wed, 5 Jan 2011 16:05:38 -0600
lalinspiral (1.0.0-1lscsoft1) unstable; urgency=low
* LALInspiral 1.0.0
-- Adam Mercer <adam.mercer@ligo.org> Wed, 5 May 2010 09:48:56 -0500
Source: lalinspiral
Section: lscsoft
Priority: optional
Maintainer: Adam Mercer <adam.mercer@ligo.org>
Build-Depends: debhelper (>= 5), zlib1g-dev, libgsl0-dev (>= 1.9), lal-dev (>= 6.5), lalmetaio-dev (>= 1.0.1), libmetaio-dev (>= 8.2), pkg-config, python (>= 2.4)
Standards-Version: 3.7.2
Package: lalinspiral
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, zlib1g, libgsl0 (>= 1.9) | libgsl0ldbl (>= 1.10), lal (>= 6.5), lalmetaio (>= 1.0.1), libmetaio1 (>= 8.2)
Description: LSC Algorithm Library Inspiral
The LSC Algorithm Inspiral Library for gravitational wave data analysis.
This package contains the shared-object libraries needed to run applications
that use the LAL Inspiral library.
Package: lalinspiral-dev
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, lalinspiral (= ${binary:Version}), zlib1g, libgsl0-dev (>= 1.9), lal-dev (>= 6.5), lalmetaio-dev (>= 1.0.1), libmetaio-dev (>= 8.2)
Description: LSC Algorithm Library Inspiral Developers
The LSC Algorithm Inspiral Library for gravitational wave data analysis.
This package contains files needed build applications that use the LAL
Inspiral library.
This package was debianized by Steffen Grunewald <steffen.grunewald@aei.mpg.de> on
Fri, 5 Oct 2007 13:11:00 +0200.
It was checked out from the LSCSOFT CVS.
Official releases can be downloaded from http://lsc-group.phys.uwm.edu/daswg/software
Upstream Authors: LIGO Scientific Collaboration
Copyright:
License:
The Debian packaging is (C) 2007, Steffen Grunewald <steffen.grunewald@aei.mpg.de>.
#NEWS
#README
#README.bugs
#README.contrib
#doc/*.pdf
#opt/lscsoft/lalinference/bin
opt/lscsoft/lalinference/include
opt/lscsoft/lalinference/lib/pkgconfig
#opt/lscsoft/lalinference/share/lal
#opt/lscsoft/lalinference/share/man/man1
#opt/lscsoft/lalinference/share/man/man3
opt/lscsoft/lalinference/include/lal*
opt/lscsoft/lalinference/lib/*a
opt/lscsoft/lalinference/lib/pkgconfig
#opt/lscsoft/lalinference/share/lal
#opt/lscsoft/lalinference/bin
opt/lscsoft/lalinference/etc
opt/lscsoft/lalinference/lib
#opt/lscsoft/lalinference/sbin
opt/lscsoft/lalinference/share
#opt/lscsoft/lalinference/bin/lal-version
opt/lscsoft/lalinference/etc/*
#opt/lscsoft/lalinference/etc/*-user-env.*
opt/lscsoft/lalinference/lib/*.so*
#opt/lscsoft/lalinference/share/lal
#opt/lscsoft/lalinspiral/bin
opt/lscsoft/lalinspiral/include
opt/lscsoft/lalinspiral/lib/pkgconfig
#opt/lscsoft/lalinspiral/share/lal
#opt/lscsoft/lalinspiral/share/man/man1
#opt/lscsoft/lalinspiral/share/man/man3
opt/lscsoft/lalinspiral/include/lal*
opt/lscsoft/lalinspiral/lib/*a
opt/lscsoft/lalinspiral/lib/pkgconfig
#opt/lscsoft/lalinspiral/share/lal
#opt/lscsoft/lalinspiral/bin
opt/lscsoft/lalinspiral/etc
opt/lscsoft/lalinspiral/lib
#opt/lscsoft/lalinspiral/sbin
opt/lscsoft/lalinspiral/share
#opt/lscsoft/lalinspiral/bin/lal-version
opt/lscsoft/lalinspiral/etc/*
#opt/lscsoft/lalinspiral/etc/*-user-env.*
opt/lscsoft/lalinspiral/lib/*.so*
#opt/lscsoft/lalinspiral/share/lal
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
PREFIX = /opt/lscsoft/lalinspiral
METAIOPREFIX = /opt/lscsoft/libmetaio
LALPREFIX = /opt/lscsoft/lal
LALMETAIOPREFIX = /opt/lscsoft/lalmetaio
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
config.status: configure
dh_testdir
# LDFLAGS="-Wl,-z,defs"
CFLAGS="$(CFLAGS)" \
PKG_CONFIG_PATH=$(METAIOPREFIX)/lib/pkgconfig:$(LALPREFIX)/lib/pkgconfig:$(LALMETAIOPREFIX)/lib/pkgconfig \
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=$(PREFIX) \
--mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
--disable-gcc-flags
build: build-stamp
build-stamp: config.status
dh_testdir
$(MAKE) V=1
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp
-$(MAKE) distclean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) DESTDIR=$(CURDIR)/debian/lalinspiral install ; \
echo "tree after install:" ; \
ls -lR $(CURDIR)/debian ; \
$(MAKE) clean
# only if necessary overwrite user-env scripts
# cp -p debian/lalinspiral-user-env.* $(CURDIR)/debian/lalinspiral/$(PREFIX)/etc/
binary-common: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
dh_makeshlibs
dh_installdeb
LD_LIBRARY_PATH=$(PREFIX)/lib dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-common
.PHONY: build clean binary-common binary install
EXTRA_DIST = \
config.guess \
config.sub \
depcomp \
header-link.mk \
install-sh \
lalsuite_build.m4 \
lalsuite_c99.m4 \
lalsuite_gccflags.m4 \
libtool.m4 \
ltmain.sh \
ltoptions.m4 \
ltsugar.m4 \
ltversion.m4 \
lt~obsolete.m4 \
missing
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
all-local: header-links
header-links:
@for file in $(HEADERS) ; do \
sourcedir=`cd $(srcdir) && pwd`; \
targetdir=`cd $(top_builddir)/include/lal && pwd`; \
if test ! -r $$targetdir/$$file ; then \
rm -f $$targetdir/$$file; \
$(LN_S) $$sourcedir/$$file $$targetdir; \
fi; \
done
@for file in LALInspiralConfig.h LALInspiralVCSInfo.h ; do \
d=`pwd`; \
targetdir=`cd $(top_builddir)/include/lal && pwd`; \
if test ! -r $$targetdir/$$file ; then \
rm -f $$targetdir/$$file; \
$(LN_S) $$d/$$file $$targetdir; \
fi; \
done
This diff is collapsed.
../../gnuscripts/lalsuite_build.m4
\ No newline at end of file
../../gnuscripts/lalsuite_c99.m4
\ No newline at end of file
../../gnuscripts/lalsuite_gccflags.m4
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 6 ltsugar.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
# lt_join(SEP, ARG1, [ARG2...])
# -----------------------------
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
# associated separator.
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
# versions in m4sugar had bugs.
m4_define([lt_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
m4_define([_lt_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
# lt_car(LIST)
# lt_cdr(LIST)
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59 which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
# than defined and empty).
#
# This macro is needed until we can rely on Autoconf 2.62, since earlier
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
m4_define([lt_append],
[m4_define([$1],
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
# ----------------------------------------------------------
# Produce a SEP delimited list of all paired combinations of elements of
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
# has the form PREFIXmINFIXSUFFIXn.
# Needed until we can rely on m4_combine added in Autoconf 2.62.
m4_define([lt_combine],
[m4_if(m4_eval([$# > 3]), [1],
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
[[m4_foreach([_Lt_prefix], [$2],
[m4_foreach([_Lt_suffix],
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
# -----------------------------------------------------------------------
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
m4_define([lt_if_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
[lt_append([$1], [$2], [$3])$4],
[$5])],
[lt_append([$1], [$2], [$3])$4])])
# lt_dict_add(DICT, KEY, VALUE)
# -----------------------------
m4_define([lt_dict_add],
[m4_define([$1($2)], [$3])])
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
# --------------------------------------------
m4_define([lt_dict_add_subkey],
[m4_define([$1($2:$3)], [$4])])
# lt_dict_fetch(DICT, KEY, [SUBKEY])
# ----------------------------------
m4_define([lt_dict_fetch],
[m4_ifval([$3],
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------------------
m4_define([lt_if_dict_fetch],
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
[$5],
[$6])])
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
# --------------------------------------------------------------
m4_define([lt_dict_filter],
[m4_if([$5], [], [],
[lt_join(m4_quote(m4_default([$4], [[, ]])),
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004