Commit 4e9e07cb authored by jolien's avatar jolien
Browse files

Added library-config and package-config files to lal.

Original: 595bffeff6a40cb065ee7d03b3e6995fcea8384e
parent 20655c8a
......@@ -176,13 +176,21 @@ if test "${fftw3}" = "false"; then
fi
dnl Checks for optional libraries and header files.
LAL_CFLAGS="-I$includedir/lal"
if test "${frame}" = "true"; then
AC_DEFINE(LAL_FRAME_ENABLED,1,Define if using Frame library)
LAL_CHECK_FRAMELIB
LAL_FRAME_ENABLED="yes"
else
LAL_FRAME_ENABLED="no"
fi
if test "${mpi}" = "true"; then
AC_DEFINE(LAL_MPI_ENABLED,1,Define if using MPI)
LAL_CHECK_MPI
LAL_MPI_ENABLED="yes"
LAL_CFLAGS="$LAL_CFLAGS $MPICFLAGS $MPICPPFLAGS"
else
LAL_MPI_ENABLED="no"
fi
if test "${lal_pthread_lock}" = "true"; then
AC_CHECK_HEADERS(pthread.h, break)
......@@ -191,6 +199,13 @@ fi
LALLIBADD="$LIBS"
LIBS="$lal_save_LIBS"
AC_SUBST(LALLIBADD)
LAL_LIBADD="$LIBS $LALLIBADD"
LAL_LIBS="-L$libdir -llal $LAL_LIBADD"
AC_SUBST(LAL_LIBADD)
AC_SUBST(LAL_LIBS)
AC_SUBST(LAL_CFLAGS)
AC_SUBST(LAL_MPI_ENABLED)
AC_SUBST(LAL_FRAME_ENABLED)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
......@@ -255,14 +270,16 @@ PKGLIST="$lal_pkg_list"
AC_SUBST(PKGLIST)
AC_SUBST(LIBLISTBASE)
AC_SUBST(LIBLISTMPI)
AC_SUBST(LIBLISTMPI)
AC_SUBST(LIBLISTFRAME)
AC_SUBST(LIBLISTMPIFRAME)
EOF
# Output
cat >> configure.in <<\EOF
AC_OUTPUT_COMMANDS([chmod +x lal-config])
AC_OUTPUT([ \
lal.pc \
lal-config \
Makefile \
doc/Makefile \
doc/laldoc/Makefile \
......
......@@ -2,7 +2,11 @@
SUBDIRS = include packages doc lib
#CLEANFILES = $(top_builddir)/include/*.h
EXTRA_DIST = README.bugs README.contrib acconfig.h \
lal-config.in lal.pc.in \
misc/doc.mk misc/dvi.mk misc/include.mk misc/main.tex.in
bin_SCRIPTS = lal-config
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = lal.pc
# cvs-clean: more than maintainer-clean, this cleans
......
......@@ -2,9 +2,11 @@
SUBDIRS = laldoc autodoc
man_MANS = lal.3 lal-config.1
INSTALLFILES = lalspec.dvi lalspec.ps lalspec.pdf lsd.dvi lsd.ps lsd.pdf
DISTCLEANFILES = $(INSTALLFILES)
EXTRA_DIST = ligodcc.cls lalspec.tex lsd.tex lal.sty \
EXTRA_DIST = $(man_MANS) ligodcc.cls lalspec.tex lsd.tex lal.sty \
lsdFigDirStructure.eps merger.eps \
lsdFigDirStructure.pdf merger.pdf
......
.TH LAL 1 "LSC Algorithm Library" "LSC"
.SH NAME
lal-config - script to get information about the installed version of LAL
.SH SYNOPSIS
.B lal-config
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags] [\-\-mpi\-enabled] [\-\-frame\-enabled]
.SH DESCRIPTION
.PP
\fIlal-config\fP is a tool that is used to configure to determine
the compiler and linker flags that should be used to compile
and link programs that use \fILAL\fP. It is also used internally
to the .m4 macros for GNU autoconf that will be included with \fILAL\fP
in the future.
.
.SH OPTIONS
.l
\fIlal-config\fP accepts the following options:
.TP 8
.B \-\-version
Print the currently installed version of \fILAL\fP on the standard output.
.TP 8
.B \-\-libs
Print the linker flags that are necessary to link a \fILAL\fP program.
.TP 8
.B \-\-cflags
Print the compiler flags that are necessary to compile a \fILAL\fP program.
.TP 8
.B \-\-prefix=PREFIX
If specified, use PREFIX instead of the installation prefix that \fILAL\fP
was built with when computing the output for the \-\-cflags and
\-\-libs options. This option is also used for the exec prefix
if \-\-exec\-prefix was not specified. This option must be specified
before any \-\-libs or \-\-cflags options.
.TP 8
.B \-\-exec\-prefix=PREFIX
If specified, use PREFIX instead of the installation exec prefix that
\fILAL\fP was built with when computing the output for the \-\-cflags
and \-\-libs options. This option must be specified before any
\-\-libs or \-\-cflags options.
.TP 8
.B \-\-mpi\-enabled
If specified, use indicate if LAL has been compiled with MPI support.
.TP 8
.B \-\-frame\-enabled
If specified, use indicate if LAL has been compiled with FrameL support.
.SH SEE ALSO
.BR gtk-config (1)
.TH LAL 3 "LSC Algorithm Library" "LSC"
.SH NAME
LAL - LSC Algorithm Library
.SH SYNOPSIS
#include <lal/...>
.SH DESCRIPTION
The LSC Algorithm Library (LAL) is a collection of routines for gravitational
wave data analysis.
.PP
For more information please consult the LAL Scientific Documentation manual,
which is installed with the LAL library. For more information, consult
the LAL webpage
.B http://www.lsc-group.phys.uwm.edu/lal
#! /bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
my_lal_libs=-llal
lal_mpi_enabled=@LAL_MPI_ENABLED@
lal_frame_enabled=@LAL_FRAME_ENABLED@
usage()
{
cat <<EOF
Usage: lal-config [OPTIONS] [LIBRARIES]
Options:
[--prefix[=DIR]]
[--exec-prefix[=DIR]]
[--version]
[--libs]
[--cflags]
[--mpi-enabled]
[--frame-enabled]
Libraries:
lal
lalsupport
lalframe
EOF
exit $1
}
if test $# -eq 0; then
usage 1 1>&2
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case "$1" in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo @VERSION@
exit 0
;;
--cflags)
echo_cflags=yes
;;
--libs)
echo_libs=yes
;;
--mpi-enabled)
echo $lal_mpi_enabled
;;
--frame-enabled)
echo $lal_frame_enabled
;;
lal)
lib_lal=yes
;;
lalsupport)
lib_lalsupport=yes
;;
lalframe)
if test "$lal_frame_enabled" = "yes" ; then
lib_lalframe=yes
else
echo "LAL was not compiled with frame support!" 1>&2
exit 1
fi
;;
--help)
usage 0
;;
*)
usage 1 1>&2
exit 1
;;
esac
shift
done
if test "$echo_prefix" = "yes"; then
echo $prefix
fi
if test "$echo_exec_prefix" = "yes"; then
echo $exec_prefix
fi
if test "$echo_cflags" = "yes"; then
echo @LAL_CFLAGS@
fi
if test "$lib_lalsupport" = "yes"; then
my_lal_libs="-llalsupport $my_lal_libs"
fi
if test "$lib_lalframe" = "yes"; then
my_lal_libs="-llalframe $my_lal_libs"
fi
if test "$echo_libs" = "yes"; then
echo -L@libdir@ $my_lal_libs @LAL_LIBADD@
fi
exit 0
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: LAL
Description: LSC Algorithm Library
Version: @VERSION@
Libs: @LAL_LIBS@
Cflags: @LAL_CFLAGS@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment