Skip to content

Commit

Permalink
Drop znc-config, change znc-buildmod so it doesn't need znc-config
Browse files Browse the repository at this point in the history
This fixes issues where znc-buildmod was grabbing a different ZNC installation
from path.
  • Loading branch information
kylef committed Jul 4, 2012
1 parent 2858ab4 commit 9be208c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 131 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Makefile
*.pc
/include/znc/zncconfig.h
/znc-buildmod
/znc-config

# modperl and modpython generated code
/modules/modperl/functions.cpp
Expand Down
4 changes: 1 addition & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ BIN_SRCS := src/main.cpp
LIB_OBJS := $(patsubst %cpp,%o,$(LIB_SRCS))
BIN_OBJS := $(patsubst %cpp,%o,$(BIN_SRCS))
CLEAN := znc src/*.o core core.*
DISTCLEAN := Makefile config.log config.status znc-config znc-buildmod .depend \
DISTCLEAN := Makefile config.log config.status znc-buildmod .depend \
modules/.depend modules/Makefile man/Makefile znc.pc znc-uninstalled.pc

CXXFLAGS += -D_MODDIR_=\"$(MODDIR)\" -D_DATADIR_=\"$(DATADIR)\"
Expand Down Expand Up @@ -108,7 +108,6 @@ install: znc $(LIBZNC)
find $(DESTDIR)$(DATADIR)/webskins -type d -exec chmod 0755 '{}' \;
find $(DESTDIR)$(DATADIR)/webskins -type f -exec chmod 0644 '{}' \;
$(INSTALL_PROGRAM) znc $(DESTDIR)$(bindir)
$(INSTALL_SCRIPT) znc-config $(DESTDIR)$(bindir)
$(INSTALL_SCRIPT) znc-buildmod $(DESTDIR)$(bindir)
$(INSTALL_DATA) $(srcdir)/include/znc/*.h $(DESTDIR)$(includedir)/znc
$(INSTALL_DATA) include/znc/zncconfig.h $(DESTDIR)$(includedir)/znc
Expand All @@ -129,7 +128,6 @@ install: znc $(LIBZNC)

uninstall:
rm $(DESTDIR)$(bindir)/znc
rm $(DESTDIR)$(bindir)/znc-config
rm $(DESTDIR)$(bindir)/znc-buildmod
rm $(DESTDIR)$(includedir)/znc/*.h
rm $(DESTDIR)$(PKGCONFIGDIR)/znc.pc
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ AC_SUBST([SWIG])
AC_SUBST([python_CFLAGS])
AC_SUBST([python_LIBS])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([znc-config])
AC_CONFIG_FILES([znc-buildmod])
AC_CONFIG_FILES([man/Makefile])
AC_CONFIG_FILES([znc.pc])
Expand Down
2 changes: 1 addition & 1 deletion man/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mandir := @mandir@
INSTALL := @INSTALL@
INSTALL_DATA := @INSTALL_DATA@

MAN1 := znc.1.gz znc-buildmod.1.gz znc-config.1.gz
MAN1 := znc.1.gz znc-buildmod.1.gz

ifneq "$(V)" ""
VERBOSE=1
Expand Down
46 changes: 0 additions & 46 deletions man/znc-config.1

This file was deleted.

27 changes: 15 additions & 12 deletions znc-buildmod.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ OK="[ ok ]"

# Update $PATH so that we will also find the znc binary if we were compiled
# with ./configure --prefix=/some/path
prefix="@prefix@"
exec_prefix="@exec_prefix@"
bindir="@bindir@"
PATH="$bindir:$PATH"

# Check if we got everything we need

ZNC_CONFIG=znc-config

check_binary()
{
which $1 > /dev/null 2>&1
Expand All @@ -24,10 +20,8 @@ check_binary()
fi
}

check_binary "${ZNC_CONFIG}" "Please (re)install ZNC."

if test "x$CXX" = "x" ; then
CXX=`${ZNC_CONFIG} --cxx`
CXX="@CXX@"
fi
if test "x$CXX" = "x" ; then
CXX=g++
Expand All @@ -40,11 +34,20 @@ if test -z "$1"; then
exit 1
fi

CXXFLAGS="`${ZNC_CONFIG} --cflags` $CXXFLAGS"
LIBS="`${ZNC_CONFIG} --libs` $LIBS"
LDFLAGS="`${ZNC_CONFIG} --libznc` $LDFLAGS"
MODLINK="`${ZNC_CONFIG} --modlink` $MODLINK"
VERSION="`${ZNC_CONFIG} --version`"
CXXFLAGS="@CPPFLAGS@ @MODFLAGS@ -I@prefix@/include $CXXFLAGS"
MODLINK="@MODLINK@ $MODLINK"
VERSION="@PACKAGE_VERSION@"

# Ugly cygwin stuff :(
LIBZNC="@LIBZNC@"
LIBZNCDIR="@LIBZNCDIR@"
if test "x" = "x$LIBZNC"; then
LIBZNCFLAGS=""
else
LIBZNCFLAGS="-L\"$LIBZNCDIR\" -lznc"
fi

LDFLAGS="$LIBZNCFLAGS $LDFLAGS"

while test ! -z "$1"
do
Expand Down
67 changes: 0 additions & 67 deletions znc-config.in

This file was deleted.

0 comments on commit 9be208c

Please sign in to comment.