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 \
|
src \
|
||||||
test
|
test
|
||||||
|
|
||||||
|
if HAVE_PKG_CONFIG
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = @PACKAGE_NAME@.pc
|
pkgconfig_DATA = @PACKAGE_NAME@.pc
|
||||||
|
endif
|
||||||
|
@ -110,6 +110,10 @@ AC_SUBST([MAINT])
|
|||||||
|
|
||||||
dnl Checks
|
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
|
AC_PROG_CC_C99
|
||||||
AM_PROG_AS
|
AM_PROG_AS
|
||||||
AC_USE_SYSTEM_EXTENSIONS
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
@ -362,7 +366,9 @@ AH_VERBATIM([NDEBUG], [/* Never ever ignore assertions */
|
|||||||
#/**/undef/**/ NDEBUG
|
#/**/undef/**/ NDEBUG
|
||||||
#endif])
|
#endif])
|
||||||
|
|
||||||
|
AS_IF([test "x$PKG_CONFIG" != "x"], [
|
||||||
AC_CONFIG_FILES([libsodium.pc])
|
AC_CONFIG_FILES([libsodium.pc])
|
||||||
|
])
|
||||||
AC_CONFIG_FILES([Makefile
|
AC_CONFIG_FILES([Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/libsodium/Makefile
|
src/libsodium/Makefile
|
||||||
|
Loading…
Reference in New Issue
Block a user