Commit 8d57975d authored by Tiago Peixoto's avatar Tiago Peixoto

Add pkg-config support

This facilitates the development of C++ extensions to graph-tool.
parent 6a4646f4
Pipeline #74 passed with stage
......@@ -54,6 +54,8 @@ nobase_dist_graphtooldoc_DATA = \
EXTRA_DIST = $(graphtooldoc_DATA) autogen.sh
pkgconfig_DATA = graph-tool-py${PYTHON_VERSION}.pc
# Copy all the spec files. Of cource, only one is actually used.
dist-hook:
for specfile in *.spec; do \
......
......@@ -30,6 +30,10 @@ AC_DISABLE_STATIC
LT_INIT
AC_PROG_INSTALL
# pkg-config generation
PKG_PROG_PKG_CONFIG
PKG_INSTALLDIR
AX_CXX_COMPILE_STDCXX_14([ext],[mandatory])
dnl turn on warnings
......@@ -187,9 +191,10 @@ AC_PYTHON_DEVEL([== '${PYTHON_FULL_VERSION}'])
# default directory for submodules
[MOD_DIR="${PYTHON_SITE_PKG}"]
AC_ARG_WITH([python-module-path], [AS_HELP_STRING([--with-python-module-path=DIR],
[directory where python module will be installed
[default=auto-detected] ])],
AC_ARG_WITH([python-module-path],
[AS_HELP_STRING([--with-python-module-path=DIR],
[directory where python module will be installed
[default=auto-detected]])],
MOD_DIR=$withval)
echo "graph-tool will be installed at: ${MOD_DIR}"
......@@ -424,6 +429,11 @@ fi
AC_SUBST(MOD_LDFLAGS)
AX_CREATE_PKGCONFIG_INFO([graph-tool-py${PYTHON_VERSION}.pc], [],
[${PYTHON_LDFLAGS} -l${BOOST_PYTHON_LIB}],
[graph-tool Python library],
[-ftemplate-depth-250 ${SPARSEHASH_CFLAGS} ${PYTHON_CPPFLAGS} -I${NUMPY_DIR} ${BOOST_CPPFLAGS} -I${MOD_DIR}/include -I${MOD_DIR}/include/boost-workaround],
[])
AC_CONFIG_FILES([
Makefile
......
This diff is collapsed.
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