Change MODDIR really into the moddir and add --moddir to znc-config

Now we don't append znc everywhere where MODDIR is used :)

Thanks to CNU for the initial patch (yay, I didn't forget to mention him.
I did with the last commit. The --disable-perl one was spotted by him too)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@862 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2007-11-04 08:25:27 +00:00
parent 8100ef945c
commit 1c3105d782
4 changed files with 14 additions and 10 deletions
Vendored
+2 -2
View File
@@ -3626,7 +3626,7 @@ fi
if test "${with_module_prefix+set}" = set; then
withval=$with_module_prefix; MODDIR=$withval
else
MODDIR="${prefix}/libexec"
MODDIR="${prefix}/libexec/znc"
fi
@@ -3726,7 +3726,7 @@ fi
MODFLAGS="$MODFLAGS -mimpure-text"
fi
appendCXX "-D_MODDIR_=\\\"${MODDIR}/znc\\\""
appendCXX "-D_MODDIR_=\\\"${MODDIR}\\\""
if test -z "$NOPERL"; then
echo -n "checking for perl... "
+2 -2
View File
@@ -127,7 +127,7 @@ fi
AC_ARG_WITH( [module-prefix],
AC_HELP_STRING([--with-module-prefix=/path/to/moduledir], []),
[MODDIR=$withval],
[MODDIR="${prefix}/libexec"] )
[MODDIR="${prefix}/libexec/znc"] )
if test "$MODULES" = "yes"; then
if test -z "$NOCHECK_DL"; then
@@ -151,7 +151,7 @@ if test "$MODULES" = "yes"; then
MODFLAGS="$MODFLAGS -mimpure-text"
fi
appendCXX "-D_MODDIR_=\\\"${MODDIR}/znc\\\""
appendCXX "-D_MODDIR_=\\\"${MODDIR}\\\""
if test -z "$NOPERL"; then
echo -n "checking for perl... "
+5 -5
View File
@@ -42,16 +42,16 @@ all: $(OBJS) $(TARGETS)
depend: .depend
install: all create_install_dir install_metadirs $(PERLHOOK)
install -m 0755 $(TARGETS) $(DESTDIR)$(MODDIR)/znc
install -m 0755 $(TARGETS) $(DESTDIR)$(MODDIR)
create_install_dir:
mkdir -p $(DESTDIR)$(MODDIR)/znc
rm -rf $(DESTDIR)$(MODDIR)/znc/*.so
mkdir -p $(DESTDIR)$(MODDIR)
rm -rf $(DESTDIR)$(MODDIR)/*.so
install_metadirs: create_install_dir
for a in *; do \
if [ -d $$a ] && [ -f $${a}.so ]; then \
cp -Rp $$a $(DESTDIR)$(MODDIR)/znc; \
cp -Rp $$a $(DESTDIR)$(MODDIR); \
fi \
done
@@ -73,7 +73,7 @@ modperl.o: modperl.cpp
modperl_install: create_install_dir
for i in *.pm; do \
install -m 0755 $$i $(DESTDIR)$(MODDIR)/znc; \
install -m 0755 $$i $(DESTDIR)$(MODDIR); \
done
else
modperl.so:
+5 -1
View File
@@ -3,13 +3,15 @@
CXXFLAGS="@CXXFLAGS@"
INCLUDES="-I@prefix@/include/znc @INCLUDES@"
LIBS="@LIBS@"
MODDIR="@MODDIR@"
VERSION="@VERSION@"
if test -z "$1"; then
echo "USAGE: $0 <--cflags|--include|--libs|--version>"
echo "USAGE: $0 <--cflags|--include|--libs|--moddir|--version|--prefix>"
echo " --cflags [$CXXFLAGS]"
echo " --include [$INCLUDES]"
echo " --libs [$LIBS]"
echo " --moddir [$MODDIR]"
echo " --version [$VERSION]"
echo " --prefix [@prefix@]"
exit 1
@@ -22,6 +24,8 @@ case $1 in
echo $INCLUDES;;
--libs)
echo $LIBS;;
--moddir)
echo $MODDIR;;
--version)
echo $VERSION;;
--prefix)