diff --git a/INSTALL.md b/INSTALL.md index 903374e..8b3949c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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: diff --git a/Makefile.am b/Makefile.am index 289a427..1fa8f3c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,5 +11,4 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = doc examples include src tests -pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = arif.pc diff --git a/configure.ac b/configure.ac index f180ad2..4b7e9a7 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,7 @@ AC_CHECK_FUNCS([atexit memchr strcasecmp]) # -- Output -- +PKG_INSTALLDIR() AC_CONFIG_FILES([ Makefile doc/Makefile diff --git a/m4/arif_ac.m4 b/m4/arif_ac.m4 index 1dd83f3..dd5c18c 100644 --- a/m4/arif_ac.m4 +++ b/m4/arif_ac.m4 @@ -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])