Drop znc-config, change znc-buildmod so it doesn't need znc-config

This fixes issues where znc-buildmod was grabbing a different ZNC installation
from path.
This commit is contained in:
Kyle Fuller
2012-07-04 22:21:37 +01:00
parent 2858ab4b26
commit 9be208c242
7 changed files with 17 additions and 131 deletions

1
.gitignore vendored
View File

@@ -15,7 +15,6 @@ Makefile
*.pc
/include/znc/zncconfig.h
/znc-buildmod
/znc-config
# modperl and modpython generated code
/modules/modperl/functions.cpp

View File

@@ -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)\"
@@ -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
@@ -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

View File

@@ -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])

View File

@@ -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

View File

@@ -1,46 +0,0 @@
.TH ZNC\-CONFIG 1 2008\-06\-01 ZNC
.SH NAME
znc\-config \- script to get information about the installed version of ZNC
.SH SYNOPSIS
.B znc\-config \-\-cflags
.br
.B znc\-config \-\-include
.br
.B znc\-config \-\-libs
.br
.B znc\-config \-\-moddir
.br
.B znc\-config \-\-datadir
.br
.B znc\-config \-\-version
.br
.B znc\-config \-\-prefix
.br
.SH DESCRIPTION
.BR znc\-config
helps you compiling ZNC modules.
This tool gives you a list of compiler and linker flags that you need to
compile modules for the installed ZNC instance.
.SH OPTIONS
.TP
.B \-\-cflags
Displays the necessary compiler options.
This does not include the include directories!
.TP
.B \-\-include
This prints the compiler flags needed for the include directories.
.TP
.B \-\-libs
Prints the linker flags needed for ZNC modules.
.TP
.B \-\-moddir
Print the directory to which modules are installed.
.TP
.B \-\-datadir
Print the directory to which data files for modules are installed.
.TP
.B \-\-version
Displays the version number of ZNC.
.TP
.B \-\-prefix
Displays the prefix under which ZNC is installed.

View File

@@ -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
@@ -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++
@@ -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

View File

@@ -1,67 +0,0 @@
#!/bin/sh
prefix="@prefix@"
exec_prefix="@exec_prefix@"
datarootdir="@datarootdir@"
bindir="@bindir@"
datadir="@datadir@"
CXX="@CXX@"
CXXFLAGS="@CPPFLAGS@ @MODFLAGS@ -I@prefix@/include"
MODLINK="@MODLINK@"
# LIBS="@LIBS@"
# No libs needed, ZNC links against $LIBS and thus modules don't need to.
LIBS=""
MODDIR="@MODDIR@"
DATADIR="@DATADIR@"
VERSION="@PACKAGE_VERSION@"
# Ugly cygwin stuff :(
LIBZNC="@LIBZNC@"
LIBZNCDIR="@LIBZNCDIR@"
if test "x" = "x$LIBZNC"; then
LIBZNCFLAGS=""
else
LIBZNCFLAGS="-L\"$LIBZNCDIR\" -lznc"
fi
if test -z "$1"; then
echo "USAGE: $0 <flag>"
echo " --cxx [$CXX]"
echo " --cflags [$CXXFLAGS]"
echo " --modlink [$MODLINK]"
echo " --libs [$LIBS]"
echo " --moddir [$MODDIR]"
echo " --datadir [$DATADIR]"
echo " --version [$VERSION]"
echo " --prefix [$prefix]"
echo " --libznc [$LIBZNCFLAGS]"
exit 1
fi
case $1 in
--cxx)
echo $CXX;;
--cflags)
echo $CXXFLAGS;;
--modlink)
echo $MODLINK;;
--include)
# Left here for backwards compatibility
;;
--libs)
echo $LIBS;;
--moddir)
echo $MODDIR;;
--datadir)
echo $DATADIR;;
--version)
echo $VERSION;;
--prefix)
echo $prefix;;
--libznc)
echo $LIBZNCFLAGS;;
esac
exit 0