From 0dd0716c761e328292bf8aac1b15edbdc4f73d2e Mon Sep 17 00:00:00 2001 From: Einhard Leichtfuß Date: Tue, 25 Dec 2018 17:04:47 +0100 Subject: Globally use the same (default_)user_config_dir Also, - Fix issues with doubled slashes in man pages (in configure.ac). - Update some copyright years. --- configure.ac | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index dd45df4..3dd2988 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,7 @@ test -z "$bash_completion_dir" \ AC_SUBST([sysconfdir_expanded]) # Use a function to allow for local variables. -fun() { +expand_sysconfdir() { local prefix="$prefix" local TARGET="$PACKAGE_NAME" local next @@ -54,9 +54,6 @@ fun() { # If $prefix is unset by the user, set it to autoconf's default value: test "$prefix" = NONE && prefix=/usr/local - # Prevent //. - test "$prefix" = / && prefix='' - sysconfdir_expanded="$sysconfdir" # Expand $sysconfdir recursively (notably including $prefix): @@ -66,7 +63,14 @@ fun() { do sysconfdir_expanded="$next" done -}; fun + + # Prevent //. + sysconfdir_expanded="${sysconfdir_expanded//\/\//\/}" + test "$sysconfdir_expanded" = / && sysconfdir_expanded='' +}; expand_sysconfdir + + +AC_SUBST([default_user_config_file], ['$HOME/.config/ctct_config']) AC_ARG_VAR([default_datadir], ['directory to store contact data in']) @@ -77,28 +81,23 @@ test -z "$default_fallback_editor" && default_fallback_editor=vi AC_ARG_VAR([default_input_program], ['the program that newly created or edited contact files get passed to on stdin']) -test -z "$default_input_program" \ - && default_input_program='cat' +test -z "$default_input_program" && default_input_program='cat' AC_ARG_VAR([default_output_program], ['the program that gets passed the contact files on stdin']) -test -z "$default_output_program" \ - && default_output_program='cat' +test -z "$default_output_program" && default_output_program='cat' AC_ARG_VAR([default_visual_program], ['the program that is used to display the data']) -test -z "$default_visual_program" \ - && default_visual_program='cat' +test -z "$default_visual_program" && default_visual_program='cat' AC_ARG_VAR([default_confirm_deletion], ['whether to ask for confirmation upon deletion of a contact']) -test -z "$default_confirm_deletion" \ - && default_confirm_deletion=true +test -z "$default_confirm_deletion" && default_confirm_deletion=true AC_ARG_VAR([default_confirm_default_yes], ['whether to consider "yes" as answer upon a not answered confirmation']) -test -z "$default_confirm_default_yes" \ - && default_confirm_default_yes=false +test -z "$default_confirm_default_yes" && default_confirm_default_yes=false AC_OUTPUT -- cgit v1.2.3