Skip to content

Commit

Permalink
Fix inconsistency between --sysconfdir and --with-confdir, deprecate …
Browse files Browse the repository at this point in the history
…--with-confdir.

The inconsistency was created in
c74836d where genssl.sh.in was made
to use sysconfdir while the IRCd and buildsystem still used confdir.
  • Loading branch information
binki committed Mar 2, 2012
1 parent 80e49b4 commit 634d4aa
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 80 deletions.
6 changes: 3 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ libdir = @libdir@
pkglibdir = @pkglibdir@
moduledir = @moduledir@
helpdir = @helpdir@
confdir = @confdir@
sysconfdir = @sysconfdir@
logdir = @logdir@
rundir = @rundir@
pkgrundir = @pkgrundir@
Expand Down Expand Up @@ -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); \
Expand Down
2 changes: 1 addition & 1 deletion bandb/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bindir = @bindir@
libdir = @libdir@
libexecdir = @libexecdir@
pkglibexecdir = @pkglibexecdir@
confdir = @confdir@
sysconfdir = @sysconfdir@
localstatedir = @localstatedir@
PACKAGE_TARNAME = @PACKAGE_TARNAME@

Expand Down
54 changes: 6 additions & 48 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@ helpdir
HELP_DIR
logdir
LOG_DIR
confdir
ETC_DIR
ZLIB_LD
ENCSPEED
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand All @@ -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; }

Expand Down
21 changes: 7 additions & 14 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions doc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@
Expand All @@ -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 \
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion ssld/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bindir = @bindir@
libdir = @libdir@
libexecdir = @libexecdir@
pkglibexecdir = @pkglibexecdir@
confdir = @confdir@
sysconfdir = @sysconfdir@
localstatedir = @localstatedir@
PACKAGE_TARNAME = @PACKAGE_TARNAME@

Expand Down
4 changes: 2 additions & 2 deletions tools/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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@
Expand Down

0 comments on commit 634d4aa

Please sign in to comment.