mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 11:48:51 +00:00
build: rename bookmarkfs.pc -> bookmarkfs_util.pc
Also update configure_ext.m4 to support EX_DEP() with underscores in package name.
This commit is contained in:
parent
906769f1f7
commit
81db7a786c
5 changed files with 13 additions and 15 deletions
|
@ -160,7 +160,7 @@ Notes
|
|||
### Linking to an Existing BookmarkFS Utility Library
|
||||
|
||||
If a BookmarkFS utility library is already installed, it can be
|
||||
specified with `--with-bookmarkfs[=<pkgconfdir>]` during configuration,
|
||||
specified with `--with-bookmarkfs-util[=<pkgconfdir>]` during configuration,
|
||||
in the same way as with other dependencies.
|
||||
|
||||
In this case, the utility library will not be built from source,
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
ACLOCAL_AMFLAGS = -I m4
|
||||
SUBDIRS = doc src tests
|
||||
|
||||
pkgconfig_DATA = bookmarkfs.pc
|
||||
pkgconfig_DATA = bookmarkfs_util.pc
|
||||
|
|
|
@ -14,8 +14,8 @@ exec_prefix=@exec_prefix@
|
|||
includedir=@includedir@
|
||||
libdir=@libdir@
|
||||
|
||||
Name: ${package}
|
||||
Description: BookmarkFS
|
||||
Name: ${package}_util
|
||||
Description: BookmarkFS Utility Library
|
||||
Version: ${version}
|
||||
URL: https://www.nongnu.org/bookmarkfs/
|
||||
Cflags: -I${includedir}
|
|
@ -9,7 +9,7 @@ dnl
|
|||
|
||||
AC_PREREQ([2.70])
|
||||
AC_INIT([bookmarkfs], [0.1.0], [bug-bookmarkfs@nongnu.org])
|
||||
AC_CONFIG_SRCDIR([bookmarkfs.pc.in])
|
||||
AC_CONFIG_SRCDIR([bookmarkfs_util.pc.in])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_TESTDIR([tests])
|
||||
|
@ -120,7 +120,7 @@ EX_FEAT([fsck-handler-tcl], [no], [Tcl-based fsck handler])
|
|||
|
||||
AX_PTHREAD
|
||||
|
||||
EX_DEP([bookmarkfs], [>= 0.1], [BookmarkFS utility library], [
|
||||
EX_DEP([bookmarkfs_util], [>= 0.1], [BookmarkFS utility library], [
|
||||
AS_VAR_SET([enable_bookmarkfs_util], [no])
|
||||
])
|
||||
|
||||
|
@ -219,6 +219,6 @@ AC_CONFIG_FILES([
|
|||
doc/Makefile
|
||||
src/Makefile
|
||||
tests/Makefile tests/atlocal
|
||||
bookmarkfs.pc
|
||||
bookmarkfs_util.pc
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
|
|
@ -42,19 +42,18 @@ dnl Check whether a package exists with `pkg-config`,
|
|||
dnl and provide an option to specify the package's custom install location.
|
||||
dnl
|
||||
AC_DEFUN([EX_DEP], [
|
||||
m4_pushdef([with_var_], [with_]m4_translit([$1], [-], [_]))
|
||||
AC_ARG_WITH([$1], m4_normalize([
|
||||
AS_HELP_STRING([--with-$1[[=PKGCONFIGDIR]]],
|
||||
AS_HELP_STRING([--with-m4_translit([$1], [_], [-])[[=PKGCONFIGDIR]]],
|
||||
[pkg-config search path for $3])
|
||||
]), , [
|
||||
AS_VAR_SET([with_var_], [no])
|
||||
AS_VAR_SET([with_$1], [no])
|
||||
m4_foreach([feat_name_], [m4_shiftn(4, $@)], [
|
||||
AS_VAR_IF([enable_]m4_translit(feat_name_, [-], [_]), [yes], [
|
||||
AS_VAR_SET([with_var_], [yes])
|
||||
AS_VAR_SET([with_$1], [yes])
|
||||
])
|
||||
])
|
||||
])
|
||||
AS_VAR_IF([with_var_], [no], [
|
||||
AS_VAR_IF([with_$1], [no], [
|
||||
m4_foreach([feat_name_], [m4_shiftn(4, $@)], [
|
||||
AS_VAR_IF([enable_]m4_translit(feat_name_, [-], [_]), [yes], [
|
||||
AC_MSG_ERROR(m4_normalize([
|
||||
|
@ -65,14 +64,13 @@ AC_DEFUN([EX_DEP], [
|
|||
])
|
||||
], [
|
||||
AS_VAR_SET([old_pkg_config_path_], ["${PKG_CONFIG_PATH}"])
|
||||
AS_VAR_IF([with_var_], [yes], , [
|
||||
AS_VAR_SET([PKG_CONFIG_PATH], ["${with_var_}:${PKG_CONFIG_PATH}"])
|
||||
AS_VAR_IF([with_$1], [yes], , [
|
||||
AS_VAR_SET([PKG_CONFIG_PATH], ["${with_$1}:${PKG_CONFIG_PATH}"])
|
||||
export PKG_CONFIG_PATH
|
||||
])
|
||||
PKG_CHECK_MODULES(m4_toupper([$1]), [$1 $2], [$4])
|
||||
AS_VAR_SET([PKG_CONFIG_PATH], ["${old_pkg_config_path_}"])
|
||||
])
|
||||
m4_popdef([with_var_])
|
||||
])
|
||||
|
||||
dnl
|
||||
|
|
Loading…
Add table
Reference in a new issue