Compare commits

...

2 Commits

Author SHA1 Message Date
CismonX ed4631b913
fix: allow custom pkgconfigdir
should not assume that ${libdir}/pkgconfig is pkgconfigdir.
2023-04-28 10:05:41 +08:00
CismonX c160c9f47a
fix: add readline flags when building libarify 2023-04-28 10:03:16 +08:00
5 changed files with 8 additions and 8 deletions

View File

@ -32,11 +32,11 @@ Build and Install
ARIF can be built and installed from source using the GNU build system.
Notable build options:
- `--with-readline[=PREFIX]` (default), `--without-readline`
- `--with-readline[=PKGCONFIGDIR]` (default), `--without-readline`
* Whether to build the ARIF library with GNU Readline features.
- `--enable-arify` (default), `--disable-arify`
* Whether to build the `arify` command-line tool.
- `--with-rime[=PREFIX]`, `--without-rime` (default)
- `--with-rime[=PKGCONFIGDIR]`, `--without-rime` (default)
* Whether to build the example Rime IME integration.
Example shell script:

View File

@ -11,5 +11,4 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = doc examples include src tests
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = arif.pc

View File

@ -91,6 +91,7 @@ AC_CHECK_FUNCS([atexit memchr strcasecmp])
# -- Output --
PKG_INSTALLDIR()
AC_CONFIG_FILES([
Makefile
doc/Makefile

View File

@ -43,13 +43,13 @@ dnl
AC_DEFUN([ARIF_CHECK_PKG], [
m4_pushdef([with_var_], [with_]m4_translit([$1], [-+.], [___]))
AC_ARG_WITH([$1], m4_normalize([
AS_HELP_STRING([--with-$1[[=PREFIX]]], [installation path of $3])
AS_HELP_STRING(
[--with-$1[[=PKGCONFIGDIR]]], [pkg-config search path for $3])
]), [], [$4])
AS_VAR_IF(with_var_, [no], [$6], [
AS_VAR_SET([SAVED_PKG_CONFIG_PATH_], ["${PKG_CONFIG_PATH}"])
AS_VAR_IF(with_var_, [yes], [], [
AS_VAR_SET([PKG_CONFIG_PATH],
["${with_$1}/lib/pkgconfig:${PKG_CONFIG_PATH}"])
AS_VAR_SET([PKG_CONFIG_PATH], ["${with_$1}:${PKG_CONFIG_PATH}"])
])
export PKG_CONFIG_PATH
PKG_CHECK_MODULES(m4_toupper([$1]), [$1 $2], [$5])

View File

@ -31,8 +31,8 @@ if BUILD_ARIFY
arify_LDADD = libarify.la
arify_SOURCES = arify_cli.c
libarify_la_CPPFLAGS = $(ARIF_CPPFLAGS_)
libarify_la_LIBADD = $(DL_LIBS) libarif.la
libarify_la_CPPFLAGS = $(READLINE_CFLAGS) $(ARIF_CPPFLAGS_)
libarify_la_LIBADD = $(READLINE_LIBS) $(DL_LIBS) libarif.la
libarify_la_SOURCES = arify.c
if BUILD_ARIF_READLINE