Commit 9a961934 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

merge setuptools_test

parents 68f12384 abad54cf
ACLOCAL_AMFLAGS = -I m4
pyexec_LTLIBRARIES = pyHealpix.la
src_c_utils = \
c_utils/c_utils.c \
c_utils/c_utils.h \
c_utils/walltime_c.c \
c_utils/walltime_c.h \
c_utils/trig_utils.c \
c_utils/trig_utils.h
src_libfftpack = \
libfftpack/bluestein.h \
libfftpack/bluestein.c \
libfftpack/fftpack.h \
libfftpack/fftpack.c \
libfftpack/ls_fft.h \
libfftpack/ls_fft.c
src_libsharp = \
libsharp/sharp.c \
libsharp/sharp.h \
libsharp/sharp_cxx.h \
libsharp/sharp_almhelpers.c \
libsharp/sharp_almhelpers.h \
libsharp/sharp_complex_hacks.h \
libsharp/sharp_core.c \
libsharp/sharp_core.h \
libsharp/sharp_geomhelpers.c \
libsharp/sharp_geomhelpers.h \
libsharp/sharp_internal.h \
libsharp/sharp_lowlevel.h \
libsharp/sharp_vecsupport.h \
libsharp/sharp_vecutil.h \
libsharp/sharp_ylmgen_c.c \
libsharp/sharp_ylmgen_c.h \
libsharp/sharp_legendre_roots.c \
libsharp/sharp_legendre_roots.h
src_cxxsupport = \
cxxsupport/geom_utils.cc \
cxxsupport/string_utils.cc \
cxxsupport/pointing.cc \
cxxsupport/rotmatrix.cc \
cxxsupport/wigner.cc \
cxxsupport/error_handling.cc \
cxxsupport/alloc_utils.h \
cxxsupport/arr.h \
cxxsupport/datatypes.h \
cxxsupport/error_handling.h \
cxxsupport/geom_utils.h \
cxxsupport/lsconstants.h \
cxxsupport/math_utils.h \
cxxsupport/openmp_support.h \
cxxsupport/planck_rng.h \
cxxsupport/pointing.h \
cxxsupport/rangeset.h \
cxxsupport/rotmatrix.h \
cxxsupport/share_utils.h \
cxxsupport/sse_utils_cxx.h \
cxxsupport/string_utils.h \
cxxsupport/vec3.h \
cxxsupport/wigner.h \
cxxsupport/xcomplex.h \
cxxsupport/sort_utils.h
src_healpix_cxx= \
Healpix_cxx/alm.cc \
Healpix_cxx/alm.h \
Healpix_cxx/alm_healpix_tools.cc \
Healpix_cxx/alm_healpix_tools.h \
Healpix_cxx/alm_powspec_tools.cc \
Healpix_cxx/alm_powspec_tools.h \
Healpix_cxx/healpix_tables.cc \
Healpix_cxx/healpix_tables.h \
Healpix_cxx/healpix_base.cc \
Healpix_cxx/healpix_base.h \
Healpix_cxx/healpix_map.cc \
Healpix_cxx/healpix_map.h \
Healpix_cxx/powspec.cc \
Healpix_cxx/powspec.h
src_pyhealpix = \
pyHealpix.cc \
pybind11/attr.h \
pybind11/cast.h \
pybind11/class_support.h \
pybind11/common.h \
pybind11/complex.h \
pybind11/descr.h \
pybind11/numpy.h \
pybind11/options.h \
pybind11/pybind11.h \
pybind11/pytypes.h \
pybind11/typeid.h
EXTRA_DIST = \
COPYING \
pybind11/LICENSE \
libfftpack/fftpack_inc.c \
libsharp/sharp_core_inc.c \
libsharp/sharp_core_inc2.c \
libsharp/sharp_core_inchelper.c \
exports.version \
tests/pyHealpix_test.py \
tests/pyHealpix_perftest.py \
tests/testscript.sh \
compile_and_install.sh
#TESTS=tests/testscript.sh
pyHealpix_la_SOURCES = $(src_pyhealpix) $(src_c_utils) $(src_libfftpack) $(src_libsharp) $(src_cxxsupport) $(src_healpix_cxx)
pyHealpix_la_LDFLAGS= -module -avoid-version -shared
AM_CPPFLAGS = -I$(top_srcdir)/c_utils -I$(top_srcdir)/libfftpack -I$(top_srcdir)/libsharp -I$(top_srcdir)/cxxsupport -I$(top_srcdir)/Healpix_cxx
if HAVE_LD_VERSION_SCRIPT
pyHealpix_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/exports.version
endif
pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = @PACKAGE_NAME@.pc
DISTCLEANFILES=@PACKAGE_NAME@.pc @PACKAGE_NAME@.pc.in @PACKAGE_NAME@-uninstalled.pc @PACKAGE_NAME@-uninstalled.sh
......@@ -22,40 +22,28 @@ Installation
### Requirements
- no external dependencies, all required code is contained in the package
- no library dependencies, all required code is contained in the package
- for building, a modern C++ compiler is required (successfully tested with
g++ 5.4 clang 4.0 and Intel icpc 17.0)
- for building from the Git repository, GNU autotools are required
### System-wide installation
- Install dependencies for building:
sudo apt-get install g++ autoconf libtool git
sudo apt-get install g++ git python
- Install pyHealpix:
git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git
(cd pyHealpix && autoreconf -i && ./configure --enable-openmp --enable-native-optimizations && make -j4 && sudo make install)
git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git -b setuptools_test
(cd pyHealpix && python setup.py install)
### Local installation for a single user
- Install dependencies for building:
sudo apt-get install g++ autoconf libtool git
sudo apt-get install g++ git python
- Install pyHealpix:
git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git
(cd pyHealpix && autoreconf -i && ./configure --prefix=$HOME/.local --enable-openmp --enable-native-optimizations && make -j4 install)
### Installation on OS X
- Install pyHealpix:
git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git
(cd pyHealpix && autoreconf -i && ./configure --prefix=`python-config --prefix` --enable-openmp --enable-native-optimizations && make -j4 && sudo make install)
(The last command installs the package system-wide. User-specific
installation would be preferrable, but we haven't found a simple recipe yet
how to determine the installation prefix ...)
git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git -b setuptools_test
(cd pyHealpix && python setup.py install --user)
AC_INIT([pyHealpix], [0.1],,[pyHealpix],)
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror])
AM_MAINTAINER_MODE([enable])
dnl Needed for linking on Windows.
dnl Protect with m4_ifdef because AM_PROG_AR is required in
dnl autoconf >= 1.12 when using -Wall, but the macro is
dnl absent in old versions of autoconf.
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
LT_INIT([disable-static])
AC_CONFIG_MACRO_DIR([m4])
dnl Enable silent build rules if this version of Automake supports them
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl locate python and python-config
AM_PATH_PYTHON
AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config])
AS_IF([test -z "$PYTHON_CONFIG"], [
AC_PATH_PROGS([PYTHON_CONFIG],
[python$PYTHON_VERSION-config python-config],
[no],
[`dirname $PYTHON`])
AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON.])])
])
AC_MSG_CHECKING([python include flags])
PYTHON_INCLUDE=`$PYTHON_CONFIG --includes`
AC_MSG_RESULT([$PYTHON_INCLUDE])
AC_MSG_CHECKING([python linker flags])
PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
AC_MSG_RESULT([$PYTHON_LDFLAGS])
dnl Introduce --enable-native-optimizations command line argument to turn on
dnl -march=native compiler flag, disabled by default.
AC_ARG_ENABLE(
[native-optimizations],
[AS_HELP_STRING([--enable-native-optimizations], [Enable non-portable optimizations for your own CPU by compiling with -march=native @<:@default=no@:>@])]
)
AC_PROG_CC_C99
: ${enable_openmp=no}
AC_OPENMP
CPPFLAGS="$CPPFLAGS $OPENMP_CFLAGS"
CFLAGS="$CFLAGS $OPENMP_CFLAGS"
LDFLAGS="$LDFLAGS $OPENMP_CFLAGS"
AS_IF(
[test "x$enable_native_optimizations" = "xyes"],
[AX_CHECK_COMPILE_FLAG([-march=native],[CC="$CC -march=native"])],
)
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[CFLAGS="$CFLAGS -fvisibility=hidden"])
AX_CHECK_COMPILE_FLAG([-O3],[CFLAGS="$CFLAGS -O3"])
AX_CHECK_COMPILE_FLAG([-ffast-math],[CFLAGS="$CFLAGS -ffast-math"])
AX_CHECK_COMPILE_FLAG([-ffunction-sections -fdata-sections],[CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"])
dnl AX_CHECK_COMPILE_FLAG([-flto],[CFLAGS="$CFLAGS -flto"])
AC_PROG_CXX
AC_LANG_PUSH([C++])
AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory])
AC_OPENMP
CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
LDFLAGS="$LDFLAGS $OPENMP_CXXFLAGS"
AS_IF(
[test "x$enable_native_optimizations" = "xyes"],
[AX_CHECK_COMPILE_FLAG([-march=native],[CXX="$CXX -march=native"])],
)
CXXFLAGS="$CXXFLAGS $PYTHON_INCLUDE"
LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS"
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[CXXFLAGS="$CXXFLAGS -fvisibility=hidden"])
AX_CHECK_COMPILE_FLAG([-O3],[CXXFLAGS="$CXXFLAGS -O3"])
AX_CHECK_COMPILE_FLAG([-ffast-math],[CXXFLAGS="$CXXFLAGS -ffast-math"])
AX_CHECK_COMPILE_FLAG([-ffunction-sections -fdata-sections],[CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"])
AX_CHECK_LINK_FLAG([-Wl,-gc-sections],[LDFLAGS="$LDFLAGS -Wl,-gc-sections"])
dnl AX_CHECK_COMPILE_FLAG([-flto],[CXXFLAGS="$CXXFLAGS -flto"])
AC_PROG_LIBTOOL
gl_LINKER_SCRIPT
dnl Create pkgconfig .pc file.
AX_CREATE_PKGCONFIG_INFO(,,,,[$OPENMP_CFLAGS])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
LIBTEST
{
global:
*pyHealpix*;
local:
*;
};
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# 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 <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. 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 the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 5
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the linker or gives an error.
# (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
# when the check is done. The check is thus made with the flags: "LDFLAGS
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
# issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_LINK_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# 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 <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. 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 the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 5
AC_DEFUN([AX_CHECK_LINK_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
ax_check_save_flags=$LDFLAGS
LDFLAGS="$LDFLAGS $4 $1"
AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
LDFLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_LINK_FLAGS
dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Simon Josefsson
dnl gl_LINKER_SCRIPT
dnl -------------
dnl Check if ld supports linker scripts, and define automake conditional
dnl HAVE_LD_VERSION_SCRIPT if so.
AC_DEFUN([gl_LINKER_SCRIPT],
[
AC_ARG_ENABLE([ld-version-script],
AS_HELP_STRING([--enable-ld-version-script],
[enable/disable linker version script (default is enabled when possible)]),
[have_ld_version_script=$enableval], [])
if test -z "$have_ld_version_script"; then
AC_MSG_CHECKING([if -Wl,--version-script works])
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
cat > conftest.map <<EOF
VERS_1 {
global: sym;
};
VERS_2 {
global: sym;
} VERS_1;
EOF
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[have_ld_version_script=yes], [have_ld_version_script=no])
rm -f conftest.map
LDFLAGS="$save_LDFLAGS"
AC_MSG_RESULT($have_ld_version_script)
fi
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
])
# ============================================================================
# http://www.gnu.org/software/autoconf-archive/ax_create_pkgconfig_info.html
# ============================================================================
#
# SYNOPSIS
#
# AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary [,cflags [, ldflags]]]]])]
#
# DESCRIPTION
#
# Defaults:
#
# $1 = $PACKAGE_NAME.pc
# $2 = (empty)
# $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac)
# $4 = $PACKAGE_SUMMARY (or $1 Library)
# $5 = $PACKAGE_CFLAGS (as set at the point in configure.ac)
# $6 = $PACKAGE_LDFLAGS (as set at the point in configure.ac)
#
# PACKAGE_NAME defaults to $PACKAGE if not set.
# PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set.
#
# The resulting file is called $PACKAGE.pc.in / $PACKAGE.pc
#
# You will find this macro most useful in conjunction with
# ax_spec_defaults that can read good initializers from the .spec file. In
# consequencd, most of the generatable installable stuff can be made from
# information being updated in a single place for the whole project.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2008 Sven Verdoolaege <skimo@kotnet.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/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. 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 the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 12
AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl
AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl
AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl
AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl
AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl
AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl
AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl
AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl
AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl
AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl
AS_VAR_PUSHDEF([PKGCONFIG_ldflags],[ax_create_pkgconfig_ldflags])dnl
AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl
AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl
AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl
AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl
# we need the expanded forms...
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
AC_MSG_CHECKING(our pkgconfig libname)
test ".$PKGCONFIG_libname" != "." || \
PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)"
test ".$PKGCONFIG_libname" != "." || \
PKGCONFIG_libname="$PACKAGE"
PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
AC_MSG_RESULT($PKGCONFIG_libname)
AC_MSG_CHECKING(our pkgconfig version)
test ".$PKGCONFIG_version" != "." || \
PKGCONFIG_version="${PACKAGE_VERSION}"
test ".$PKGCONFIG_version" != "." || \
PKGCONFIG_version="$VERSION"
PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
AC_MSG_RESULT($PKGCONFIG_version)
AC_MSG_CHECKING(our pkgconfig_libdir)
test ".$pkgconfig_libdir" = "." && \
pkgconfig_libdir='${libdir}/pkgconfig'
PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"`
PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
AC_MSG_RESULT($pkgconfig_libdir)
test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && (
AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir))
AC_SUBST([pkgconfig_libdir])
AC_MSG_CHECKING(our pkgconfig_libfile)
test ".$pkgconfig_libfile" != "." || \
pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)"
PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"`
PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"`
AC_MSG_RESULT($pkgconfig_libfile)
test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && (
AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile))
AC_SUBST([pkgconfig_libfile])
AC_MSG_CHECKING(our package / suffix)
PKGCONFIG_suffix="$program_suffix"
test ".$PKGCONFIG_suffix" != .NONE || PKGCONFIG_suffix=""
AC_MSG_RESULT(${PACKAGE_NAME} / ${PKGCONFIG_suffix})
AC_MSG_CHECKING(our pkgconfig description)
PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)"
test ".$PKGCONFIG_description" != "." || \
PKGCONFIG_description="$PKGCONFIG_libname Library"
PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
AC_MSG_RESULT($PKGCONFIG_description)
AC_MSG_CHECKING(our pkgconfig requires)
PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)"
PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
AC_MSG_RESULT($PKGCONFIG_requires)
AC_MSG_CHECKING(our pkgconfig ext libs)
PKGCONFIG_pkglibs="$PACKAGE_LIBS"
test ".$PKGCONFIG_pkglibs" != "." || PKGCONFIG_pkglibs="-l$PKGCONFIG_libname"
PKGCONFIG_libs="ifelse($3,,$PKGCONFIG_pkglibs $LIBS,$3)"
PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"`
PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"`
AC_MSG_RESULT($PKGCONFIG_libs)
AC_MSG_CHECKING(our pkgconfig cppflags)
PKGCONFIG_cppflags="ifelse($5,,$PACKAGE_CFLAGS,$5)"
PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"`
PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"`
AC_MSG_RESULT($PKGCONFIG_cppflags)
AC_MSG_CHECKING(our pkgconfig ldflags)
PKGCONFIG_ldflags="ifelse($6,,$PACKAGE_LDFLAGS,$5)"
PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"`
PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"`
AC_MSG_RESULT($PKGCONFIG_ldflags)
test ".$PKGCONFIG_generate" != "." || \
PKGCONFIG_generate="ifelse($1,,$PKGCONFIG_libname.pc,$1)"
PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"`
PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"`
test "$pkgconfig_libfile" != "$PKGCONFIG_generate" && (
AC_MSG_RESULT(generate the pkgconfig later... $PKGCONFIG_generate))
if test ".$PKGCONFIG_src_libdir" = "." ; then
PKGCONFIG_src_libdir=`pwd`
PKGCONFIG_src_libdir=`AS_DIRNAME("$PKGCONFIG_src_libdir/$PKGCONFIG_generate")`
test ! -d $PKGCONFIG_src_libdir/src || \
PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/src"
case ".$objdir" in
*libs) PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/$objdir" ;; esac
AC_MSG_RESULT(noninstalled pkgconfig -L $PKGCONFIG_src_libdir)
fi
if test ".$PKGCONFIG_src_headers" = "." ; then
PKGCONFIG_src_headers=`pwd`
v="$ac_top_srcdir" ;
test ".$v" != "." || v="$ax_spec_dir"
test ".$v" != "." || v="$srcdir"
case "$v" in /*) PKGCONFIG_src_headers="" ;; esac
PKGCONFIG_src_headers=`AS_DIRNAME("$PKGCONFIG_src_headers/$v/x")`
test ! -d $PKGCONFIG_src_headers/incl[]ude || \
PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude"
AC_MSG_RESULT(noninstalled pkgconfig -I $PKGCONFIG_src_headers)
fi
dnl AC_CONFIG_COMMANDS crap disallows to use $PKGCONFIG_libfile here...
AC_CONFIG_COMMANDS([$ax_create_pkgconfig_generate],[
pkgconfig_generate="$ax_create_pkgconfig_generate"
if test ! -f "$pkgconfig_generate.in"
then generate="true"
elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null
then generate="true"
else generate="false";
fi