From 484c1484c9ae01354b1910bae5ed8a729e00b3be Mon Sep 17 00:00:00 2001 From: David Adam Date: Mon, 4 Apr 2016 14:33:35 +0800 Subject: Customisable extra configuration, completion and function directories - Add options to the autotools build to set the path for the "vendor" or "extra" configuration snippets, functions and completions directories. - Remove the vendor_completions directory from the Xcode build, as these are relocatable and compiling the paths in does not make sense. This allows packaging tools like Homebrew and Nix to use a common directory outside of the main prefix for third-party completions, and to make these available for programmatic discovery through `pkg-config`. Closes #2113 --- configure.ac | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index af4fc5af..f31825ce 100644 --- a/configure.ac +++ b/configure.ac @@ -845,7 +845,7 @@ You may need to install the PCRE2 development library for your system.]) fi fi -# Re-test as value may have changed +# Re-test as value may have changed. if test "x$included_pcre2" = "xyes"; then # Build configure/Makefile for pcre2 AC_MSG_NOTICE([using included PCRE2 library]) @@ -862,7 +862,29 @@ if test "x$included_pcre2" = "xyes"; then LIBS="$LIBS $PCRE2_LIBS" fi -# Tell the world what we know +# Allow configurable extra directories. +AC_SUBST(extra_completionsdir) +AC_ARG_WITH([extra-completionsdir], + AS_HELP_STRING([--with-extra-completionsdir=DIR], + [path for extra completions]), + [extra_completionsdir=$withval], + [extra_completionsdir='${datadir}/fish/vendor_completions.d']) + +AC_SUBST(extra_functionsdir) +AC_ARG_WITH([extra_functionsdir], + AS_HELP_STRING([--with-extra-functionsdir=DIR], + [path for extra functions]), + [extra_functionsdir=$withval], + [extra_functionsdir='${datadir}/fish/vendor_functions.d']) + +AC_SUBST(extra_snippetsdir) +AC_ARG_WITH([extra-snippetsdir], + AS_HELP_STRING([--with-extra-snippetsdir=DIR], + [path for extra snippets]), + [extra_snippetsdir=$withval], + [extra_snippetsdir='${datadir}/fish/vendor_conf.d']) + +# Tell the world what we know. AC_CONFIG_FILES([Makefile]) AC_OUTPUT -- cgit v1.2.3