diff options
author | Emanuele Petriglia <inbox@emanuelepetriglia.com> | 2019-11-24 15:15:19 +0100 |
---|---|---|
committer | Ali Abdallah <ali.abdallah@suse.com> | 2020-05-26 19:11:22 +0200 |
commit | 6865f62dec175c09ed733b6051f0980c14da74a4 (patch) | |
tree | aa069acd19460bfd13351ae3dec9a398e99ab853 /configure.ac.in | |
parent | 1af69867372ff46fb1f2596859e6c351f135c83e (diff) | |
download | xfconf-6865f62dec175c09ed733b6051f0980c14da74a4.tar.gz |
Add Bash completion for xfconf-query
Signed-off-by: Emanuele Petriglia <inbox@emanuelepetriglia.com>
Signed-off-by: Ali Abdallah <ali.abdallah@suse.com>
Diffstat (limited to 'configure.ac.in')
-rw-r--r-- | configure.ac.in | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac.in b/configure.ac.in index d26f4d2..92b6818 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -194,6 +194,22 @@ if test "x$enable_profiling" = "xyes"; then fi AM_CONDITIONAL([ENABLE_PROFILING], [test "x$enable_profiling" = "xyes"]) +dnl Bash completion for xfconf-query. +AC_ARG_WITH([bash-completion-dir], + AS_HELP_STRING([--with-bash-completion-dir[=PATH]], + [Install the bash auto-completion script in this directory. @<:@default=yes@:>@]), + [], + [with_bash_completion_dir=yes]) + +if test "x$with_bash_completion_dir" = "xyes"; then + PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0], + [BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"], + [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"]) +else + BASH_COMPLETION_DIR="$with_bash_completion_dir/completions" +fi +AC_SUBST([BASH_COMPLETION_DIR]) +AM_CONDITIONAL([ENABLE_BASH_COMPLETION],[test "x$with_bash_completion_dir" != "xno"]) AC_OUTPUT([ Makefile @@ -216,6 +232,7 @@ xfconf/libxfconf-0.pc xfconf-query/Makefile xfconfd/Makefile gsettings-backend/Makefile +completions/Makefile ]) dnl *************************** @@ -227,6 +244,11 @@ echo echo " * GSettings Backend: $ac_gsettings_backend" echo " * GObject Introspection: $enable_introspection" echo " * Vala support: $enable_vala" +if test "x$with_bash_completion_dir" != "xno"; then +echo " * Bash completion path: $BASH_COMPLETION_DIR" +else +echo " * Bash completion: no" +fi echo echo " * Debug: $enable_debug" echo |