diff --git a/Makefile.am b/Makefile.am index cdf1447..aaae22b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,8 @@ SUBDIRS = src tests examples man $(CXXMPH) -EXTRA_DIST = cmph.spec configure.ac cmph.pc.in LGPL-2 MPL-1.1 +EXTRA_DIST = cmph.spec configure.ac cmph.pc.in cxxmph.pc.in LGPL-2 MPL-1.1 +pkgconfig_DATA = cmph.pc +if USE_CXXMPH + pkgconfig_DATA += cxxmph.pc +endif pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = cmph.pc diff --git a/configure.ac b/configure.ac index bb24aa8..9b3d760 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,7 @@ if test x$cxxmph = xtrue; then fi AC_SUBST([CXXMPH], "cxxmph") fi +AM_CONDITIONAL([USE_CXXMPH], [test "$cxxmph" = yes]) # Unit tests based on the check library. Disabled by default. # We do not use pkg-config because it is inconvenient for all developers to @@ -68,5 +69,5 @@ AC_SUBST(CHECK_LIBS) AC_SUBST(CHECK_CFLAGS) AC_CHECK_SPOON -AC_CONFIG_FILES([Makefile src/Makefile cxxmph/Makefile tests/Makefile examples/Makefile man/Makefile cmph.pc]) +AC_CONFIG_FILES([Makefile src/Makefile cxxmph/Makefile tests/Makefile examples/Makefile man/Makefile cmph.pc cxxmph.pc]) AC_OUTPUT