From 634d4aad723305b0ee75967572b7a5906e2eb380 Mon Sep 17 00:00:00 2001 From: Nathan Phillip Brink Date: Fri, 2 Mar 2012 01:11:42 +0000 Subject: [PATCH] Fix inconsistency between --sysconfdir and --with-confdir, deprecate --with-confdir. The inconsistency was created in c74836dc4a5bde1e0bf38da58053bf5f28da8ff5 where genssl.sh.in was made to use sysconfdir while the IRCd and buildsystem still used confdir. --- Makefile.in | 6 +++--- bandb/Makefile.in | 2 +- configure | 54 ++++++----------------------------------------- configure.ac | 21 ++++++------------ doc/Makefile.in | 22 +++++++++---------- ssld/Makefile.in | 2 +- tools/Makefile.in | 4 ++-- 7 files changed, 31 insertions(+), 80 deletions(-) diff --git a/Makefile.in b/Makefile.in index 729a54be..b03ba34e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -28,7 +28,7 @@ libdir = @libdir@ pkglibdir = @pkglibdir@ moduledir = @moduledir@ helpdir = @helpdir@ -confdir = @confdir@ +sysconfdir = @sysconfdir@ logdir = @logdir@ rundir = @rundir@ pkgrundir = @pkgrundir@ @@ -130,8 +130,8 @@ install-mkdirs: -@if test ! -d $(DESTDIR)$(bindir); then \ mkdir -p -m 755 $(DESTDIR)$(bindir); \ fi - -@if test ! -d $(DESTDIR)$(confdir); then \ - mkdir -p -m 755 $(DESTDIR)$(confdir); \ + -@if test ! -d $(DESTDIR)$(sysconfdir); then \ + mkdir -p -m 755 $(DESTDIR)$(sysconfdir); \ fi -@if test ! -d $(DESTDIR)$(mandir); then \ mkdir -p -m 755 $(DESTDIR)$(mandir); \ diff --git a/bandb/Makefile.in b/bandb/Makefile.in index 644f40ec..6ad7e2af 100644 --- a/bandb/Makefile.in +++ b/bandb/Makefile.in @@ -23,7 +23,7 @@ bindir = @bindir@ libdir = @libdir@ libexecdir = @libexecdir@ pkglibexecdir = @pkglibexecdir@ -confdir = @confdir@ +sysconfdir = @sysconfdir@ localstatedir = @localstatedir@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ diff --git a/configure b/configure index d568afde..eb04d674 100755 --- a/configure +++ b/configure @@ -621,7 +621,6 @@ helpdir HELP_DIR logdir LOG_DIR -confdir ETC_DIR ZLIB_LD ENCSPEED @@ -1379,7 +1378,8 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-zlib-path=DIR Path to libz.so for ziplinks support. - --with-confdir=DIR Directory to install config files. + --with-confdir=DIR Directory to install config files [deprecated, use + --sysconfdir instead]. --with-logdir=DIR Directory where to write logfiles. --with-helpdir=DIR Directory to install help files. --with-moduledir=DIR Directory to install modules. @@ -7282,48 +7282,18 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to modify confdir" >&5 -$as_echo_n "checking whether to modify confdir... " >&6; } # Check whether --with-confdir was given. if test "${with_confdir+set}" = set; then : - withval=$with_confdir; confdir=`echo $withval | sed 's/\/$//'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - test "x$prefix" = xNONE && prefix="$ac_default_prefix" - test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - last_ac_define_dir=`eval echo $confdir` - ac_define_dir=`eval echo $last_ac_define_dir` - while test "x$last_ac_define_dir" != "x$ac_define_dir"; do - last_ac_define_dir="$ac_define_dir" - ac_define_dir=`eval echo $last_ac_define_dir` - done - ETC_DIR="$ac_define_dir" - - -cat >>confdefs.h <<_ACEOF -#define ETC_DIR "$ac_define_dir" -_ACEOF - - - - - confdir=`( - test "x$prefix" = xNONE && prefix="$ac_default_prefix" - test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" - eval echo \""$confdir"\" - )` - - + withval=$with_confdir; sysconfdir=`echo $withval | sed 's/\/$//'` else confdir='${sysconfdir}' - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +fi + test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - last_ac_define_dir=`eval echo $confdir` + last_ac_define_dir=`eval echo $sysconfdir` ac_define_dir=`eval echo $last_ac_define_dir` while test "x$last_ac_define_dir" != "x$ac_define_dir"; do last_ac_define_dir="$ac_define_dir" @@ -7339,18 +7309,6 @@ _ACEOF - confdir=`( - test "x$prefix" = xNONE && prefix="$ac_default_prefix" - test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" - eval echo \""$confdir"\" - )` - - - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to modify logdir" >&5 $as_echo_n "checking whether to modify logdir... " >&6; } diff --git a/configure.ac b/configure.ac index 9ab0cbf9..9c345cbd 100644 --- a/configure.ac +++ b/configure.ac @@ -609,22 +609,15 @@ AC_ARG_ENABLE(epoll, AC_HELP_STRING([--enable-epoll],[Force sys_epoll usage (Lin ],) dnl ********************************************************************** -dnl Check for --with-confdir +dnl Check for --with-confdir [deprecated, use --sysconfdir instead] dnl ********************************************************************** -AC_MSG_CHECKING([whether to modify confdir]) -AC_ARG_WITH(confdir, -AC_HELP_STRING([--with-confdir=DIR], - [Directory to install config files.]), - [ confdir=`echo $withval | sed 's/\/$//'` - AC_MSG_RESULT(yes) - AC_DEFINE_DIR(ETC_DIR, confdir, [Prefix where config files are installed.]) - AC_SUBST_DIR([confdir]) ], - [ confdir='${sysconfdir}' - AC_MSG_RESULT(no) - AC_DEFINE_DIR(ETC_DIR, confdir, [Prefix where config files are installed.]) - AC_SUBST_DIR([confdir])] -) +AC_ARG_WITH([confdir], + [AC_HELP_STRING([--with-confdir=DIR], + [Directory to install config files [deprecated, use --sysconfdir instead].])], + [ sysconfdir=`echo $withval | sed 's/\/$//'` ], + [ confdir='${sysconfdir}' ]) +AC_DEFINE_DIR([ETC_DIR], [sysconfdir], [Prefix where config files are installed.]) dnl ********************************************************************** dnl Check for --with-logdir diff --git a/doc/Makefile.in b/doc/Makefile.in index e78b2071..d641146b 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -22,7 +22,7 @@ exec_prefix = @exec_prefix@ exec_suffix = @exec_suffix@ bindir = @bindir@ libexecdir = @libexecdir@ -confdir = @confdir@ +sysconfdir = @sysconfdir@ localstatedir = @localstatedir@ # Change this later! -- adrian moduledir = @moduledir@ @@ -45,9 +45,9 @@ CPPFLAGS = ${INCLUDES} @CPPFLAGS@ all: build install-mkdirs: - -@if test ! -d $(DESTDIR)$(confdir); then \ - echo "mkdir -p $(confdir)"; \ - mkdir -p $(DESTDIR)$(confdir); \ + -@if test ! -d $(DESTDIR)$(sysconfdir); then \ + echo "mkdir -p $(sysconfdir)"; \ + mkdir -p $(DESTDIR)$(sysconfdir); \ fi -@if test ! -d $(DESTDIR)$(mandir); then \ @@ -58,19 +58,19 @@ install-mkdirs: install: install-mkdirs build @echo "ircd: installing example config files ($(CONFS))" @for i in $(CONFS); do \ - if test -f $(DESTDIR)$(confdir)/$$i; then \ - $(MV) $(DESTDIR)$(confdir)/$$i $(DESTDIR)$(confdir)/$$i.old; \ + if test -f $(DESTDIR)$(sysconfdir)/$$i; then \ + $(MV) $(DESTDIR)$(sysconfdir)/$$i $(DESTDIR)$(sysconfdir)/$$i.old; \ fi; \ - $(INSTALL_DATA) $$i $(DESTDIR)$(confdir); \ + $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \ done - -@if test ! -f $(DESTDIR)$(confdir)/ircd.motd; then \ + -@if test ! -f $(DESTDIR)$(sysconfdir)/ircd.motd; then \ echo "ircd: installing motd file (ircd.motd)"; \ - $(INSTALL_DATA) ircd.motd $(DESTDIR)$(confdir); \ + $(INSTALL_DATA) ircd.motd $(DESTDIR)$(sysconfdir); \ fi - -@if test -f $(DESTDIR)$(confdir)/links.txt; then \ - $(RM) $(DESTDIR)$(confdir)/links.txt; \ + -@if test -f $(DESTDIR)$(sysconfdir)/links.txt; then \ + $(RM) $(DESTDIR)$(sysconfdir)/links.txt; \ fi @echo "ircd: installing manpage" diff --git a/ssld/Makefile.in b/ssld/Makefile.in index cdf3b853..c226b69b 100644 --- a/ssld/Makefile.in +++ b/ssld/Makefile.in @@ -23,7 +23,7 @@ bindir = @bindir@ libdir = @libdir@ libexecdir = @libexecdir@ pkglibexecdir = @pkglibexecdir@ -confdir = @confdir@ +sysconfdir = @sysconfdir@ localstatedir = @localstatedir@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 06271327..cbd99c7c 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -26,7 +26,7 @@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ libexecdir = @libexecdir@ -confdir = @confdir@ +sysconfdir = @sysconfdir@ localstatedir = @localstatedir@ PROGS = viconf mkpasswd convertilines convertklines genssl.sh @@ -71,7 +71,7 @@ exec_prefix = @exec_prefix@ exec_suffix = @exec_suffix@ bindir = @bindir@ libexecdir = @libexecdir@ -confdir = @confdir@ +sysconfdir = @sysconfdir@ localstatedir = @localstatedir@ # Change this later! -- adrian moduledir = @moduledir@