diff --git a/.gitignore b/.gitignore index fb2a287a..4c791ffd 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ Makefile *.pc /include/znc/zncconfig.h /znc-buildmod -/znc-config # modperl and modpython generated code /modules/modperl/functions.cpp diff --git a/Makefile.in b/Makefile.in index 658e5103..ee4df722 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/configure.ac b/configure.ac index 508f8011..53e6c626 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/man/Makefile.in b/man/Makefile.in index 145d14f0..358ca0f7 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -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 diff --git a/man/znc-config.1 b/man/znc-config.1 deleted file mode 100644 index ea191c1b..00000000 --- a/man/znc-config.1 +++ /dev/null @@ -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. diff --git a/znc-buildmod.in b/znc-buildmod.in index dd97e183..1b4e4160 100755 --- a/znc-buildmod.in +++ b/znc-buildmod.in @@ -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 diff --git a/znc-config.in b/znc-config.in deleted file mode 100755 index bafd561e..00000000 --- a/znc-config.in +++ /dev/null @@ -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 " - 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 -