1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 10:05:05 -07:00

build: changed to only generate/install .pc file if pkg-config is found

This change improves the pkg-config support to only generate/install a .pc
file if pkg-config is found, assuming it is part of the build toolchain.

Note:

The minimal version set for pkg-config is 0.25, because this is the oldest
version I am able to test at the moment.
This commit is contained in:
Christian Wiese 2013-08-12 23:53:09 +02:00 committed by Frank Denis
parent dcea4e938b
commit 2f64b991b6
2 changed files with 9 additions and 1 deletions

View File

@ -10,5 +10,7 @@ SUBDIRS = \
src \
test
if HAVE_PKG_CONFIG
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = @PACKAGE_NAME@.pc
endif

View File

@ -110,6 +110,10 @@ AC_SUBST([MAINT])
dnl Checks
PKG_PROG_PKG_CONFIG([0.25])
AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "x"])
AC_SUBST(HAVE_PKG_CONFIG)
AC_PROG_CC_C99
AM_PROG_AS
AC_USE_SYSTEM_EXTENSIONS
@ -362,7 +366,9 @@ AH_VERBATIM([NDEBUG], [/* Never ever ignore assertions */
#/**/undef/**/ NDEBUG
#endif])
AC_CONFIG_FILES([libsodium.pc])
AS_IF([test "x$PKG_CONFIG" != "x"], [
AC_CONFIG_FILES([libsodium.pc])
])
AC_CONFIG_FILES([Makefile
src/Makefile
src/libsodium/Makefile