opm-core/configure.ac
Roland Kaufmann 72c732746d Provide pkgconfig files for library
A boilerplate .pc file is provided in the lib/pkgconfig directory. Using
this location has the advantage of being in the same path relative to
the libraries as it will be in the installation. The drawback is that the
lib/ directory no longer contains just output unless one uses out-of-tree
builds.

In the root directory of the project a local .pc file is provided which
instead of the usual end-installation directory rather points to the
build and source directories. By adding the build directory to the
PKG_CONFIG_PATH environment variable, a local build can be referred to
from other projects (such as examples or specific test-cases).

Having two different files is unfortunately necessary since pkgconfig
does not support prefix rewriting on Linux, and having them in two
different directories is necessary since the AutoMake-generated files
is not capable of renaming a file, only relocating it.
2012-09-21 13:07:00 +02:00

59 lines
1.5 KiB
Plaintext

# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
AC_INIT([OPM Core Library], [0.1], [atgeirr@sintef.no],
[opmcore], [https://public.ict.sintef.no/opm/hg/opmcore])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Needed for automake since version 1.12 because extra-portability
# warnings were then added to -Wall. Ifdef makes it backwards compatible.
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([opm/core/grid.h])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
m4_ifdef([LT_INIT],
[LT_INIT[]dnl
LT_LANG([C++])dnl
LT_LANG([Fortran 77])dnl
LT_LANG([Fortran])dnl
],dnl
[AC_PROG_LIBTOOL[]dnl
AC_PROG_CXX[]dnl
AC_PROG_F77[]dnl
AC_PROG_FC[]dnl
])[]dnl
OPM_CORE_CHECKS
OPM_DYNLINK_BOOST_TEST
dnl Substitute Autoconf's abs_*dir variables into the Makefiles for the
dnl benefit of external code that uses these variables to derive
dnl locations (e.g., Dune's DUNE_CHECK_MODULES macro). Automakes prior
dnl to version 1.10 do not automatically substitute these variables into
dnl output files.
AC_SUBST([abs_srcdir])
AC_SUBST([abs_builddir])
AC_SUBST([abs_top_srcdir])
AC_SUBST([abs_top_builddir])
AC_CONFIG_FILES([
Makefile
tests/Makefile
examples/Makefile
tutorials/Makefile
opm-core.pc
lib/pkgconfig/opm-core.pc
])
AC_OUTPUT