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:
parent
dcea4e938b
commit
2f64b991b6
@ -10,5 +10,7 @@ SUBDIRS = \
|
||||
src \
|
||||
test
|
||||
|
||||
if HAVE_PKG_CONFIG
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = @PACKAGE_NAME@.pc
|
||||
endif
|
||||
|
@ -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])
|
||||
|
||||
AS_IF([test "x$PKG_CONFIG" != "x"], [
|
||||
AC_CONFIG_FILES([libsodium.pc])
|
||||
])
|
||||
AC_CONFIG_FILES([Makefile
|
||||
src/Makefile
|
||||
src/libsodium/Makefile
|
||||
|
Loading…
Reference in New Issue
Block a user