From e82f76b87ff9779532908a02315b6425fb8a53f4 Mon Sep 17 00:00:00 2001 From: Einhard Leichtfuß Date: Mon, 24 Dec 2018 21:56:30 +0100 Subject: Rename conf file and bash completion script Also, - Add the new manpage to the Makefile. - Add additional dependencies in README. - Fix some small formatting mistakes in ctct(1). --- configure | 56 ++++++++++++++++++++------------------------------------ 1 file changed, 20 insertions(+), 36 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 2e278a5..b3b2ca9 100755 --- a/configure +++ b/configure @@ -591,12 +591,10 @@ default_confirm_deletion default_visual_program default_output_program default_input_program -default_user_config_dir default_fallback_editor default_datadir -default_confdir +sysconfdir_expanded bash_completion_dir -confdir target_alias host_alias build_alias @@ -642,11 +640,9 @@ enable_option_checking ac_precious_vars='build_alias host_alias target_alias -confdir bash_completion_dir default_datadir default_fallback_editor -default_user_config_dir default_input_program default_output_program default_visual_program @@ -1258,15 +1254,12 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Some influential environment variables: - confdir 'system wide configuration directory' bash_completion_dir 'directory to store bash-completion script in' default_datadir 'directory to store contact data in' default_fallback_editor 'editor to use if EDITOR is unset' - default_user_config_dir - 'user configuration directory' default_input_program 'the program that newly created or edited contact files get passed to on stdin' @@ -1711,46 +1704,41 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_files="$ac_config_files Makefile ctct.1 ctct_config.5 ctct.bash_completion config.sh" +ac_config_files="$ac_config_files Makefile ctct.1 ctct_config.5 bash_completion ctct_config" ac_config_files="$ac_config_files ctct" -# Do not use $(.) notation here, confdir shall allow for shell substitution. - -test -z "$confdir" && confdir='${sysconfdir}/${TARGET}' - test -z "$bash_completion_dir" \ && bash_completion_dir='${datarootdir}/bash-completion/completions' -# Used in manpage. Needs to be fully expanded. +# Used in manpage and the ctct script. Needs to be fully expanded. # Use a function to allow for local variables. fun() { - if test -z "$default_confdir" - then + local prefix="$prefix" + local TARGET="$PACKAGE_NAME" + local next - # If $prefix is unset by the user, set it to autoconf's default value: - test "$prefix" = NONE && local prefix=/usr/local + # If $prefix is unset by the user, set it to autoconf's default value: + test "$prefix" = NONE && prefix=/usr/local - # Prevent //. - test "$prefix" = / && local prefix='' + # Prevent //. + test "$prefix" = / && prefix='' - local TARGET="$PACKAGE_NAME" - default_confdir="$confdir" + sysconfdir_expanded="$sysconfdir" - # Resolve $confdir recursively (notably including $prefix): - while - eval "default_confdir_expand=\"$default_confdir\"" - test "$default_confdir" != "$default_confdir_expand" - do - default_confdir="$default_confdir_expand" - done - fi + # Expand $sysconfdir recursively (notably including $prefix): + while + eval "next=\"$sysconfdir_expanded\"" + test "$next" != "$sysconfdir_expanded" + do + sysconfdir_expanded="$next" + done }; fun @@ -1761,10 +1749,6 @@ test -z "$default_datadir" && default_datadir='$HOME/.ctct' test -z "$default_fallback_editor" && default_fallback_editor=vi -test -z "$default_user_config_dir" \ - && default_user_config_dir='$HOME/.config/'"$PACKAGE_NAME" - - test -z "$default_input_program" \ && default_input_program='cat' @@ -2493,8 +2477,8 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "ctct.1") CONFIG_FILES="$CONFIG_FILES ctct.1" ;; "ctct_config.5") CONFIG_FILES="$CONFIG_FILES ctct_config.5" ;; - "ctct.bash_completion") CONFIG_FILES="$CONFIG_FILES ctct.bash_completion" ;; - "config.sh") CONFIG_FILES="$CONFIG_FILES config.sh" ;; + "bash_completion") CONFIG_FILES="$CONFIG_FILES bash_completion" ;; + "ctct_config") CONFIG_FILES="$CONFIG_FILES ctct_config" ;; "ctct") CONFIG_FILES="$CONFIG_FILES ctct" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; -- cgit v1.2.3