diff --git a/Makefile.in b/Makefile.in index 0b78e4c6..1fc0fc67 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,6 +21,7 @@ LDFLAGS := @LDFLAGS@ LIBS := @LIBS@ LIBZNC := @LIBZNC@ LIBZNCDIR:= @LIBZNCDIR@ +LIBZNC_VERSION := @LIBZNC_VERSION@ MODDIR := @MODDIR@ DATADIR := @DATADIR@ PKGCONFIGDIR := $(libdir)/pkgconfig @@ -50,7 +51,8 @@ LIB_OBJS := $(patsubst %cpp,%o,$(LIB_SRCS)) BIN_OBJS := $(patsubst %cpp,%o,$(BIN_SRCS)) TESTS := StringTest ConfigTest UtilsTest ThreadTest NickTest ClientTest NetworkTest TESTS := $(addprefix test/,$(addsuffix .o,$(TESTS))) -CLEAN := znc src/*.o test/*.o core core.* .version_extra .depend modules/.depend unittest +CLEAN := znc src/*.o test/*.o core core.* .version_extra .depend modules/.depend \ + unittest $(LIBZNC) DISTCLEAN := Makefile config.log config.status znc-buildmod include/znc/zncconfig.h \ modules/Makefile man/Makefile znc.pc znc-uninstalled.pc test/Makefile @@ -87,7 +89,7 @@ znc: $(OBJS) else znc: $(BIN_OBJS) $(LIBZNC) $(E) Linking znc... - $(Q)$(CXX) $(LDFLAGS) -o $@ $(BIN_OBJS) -L. -lznc -Wl,-rpath,$(LIBZNCDIR) $(LIBS) + $(Q)$(CXX) $(LDFLAGS) -o $@ $(BIN_OBJS) -L. -lznc-$(LIBZNC_VERSION) -Wl,-rpath,$(LIBZNCDIR) $(LIBS) $(LIBZNC): $(LIB_OBJS) $(E) Linking $(LIBZNC)... diff --git a/configure.ac b/configure.ac index 52d6afcf..d9ce2e48 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,7 @@ dnl Needed for AC_PATH_PROGS_FEATURE_CHECK which was added in 2.62 AC_PREREQ([2.62]) dnl Keep the version number in sync with main.h! AC_INIT([znc], [1.7.x]) +LIBZNC_VERSION=1.7 AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/znc.cpp]) AC_LANG([C++]) @@ -473,7 +474,7 @@ if test -z "$ISCYGWIN" ; then appendMod -fPIC else # But cygwin does want most of ZNC in a shared lib - LIBZNC="libznc.dll" + LIBZNC="cygznc-${LIBZNC_VERSION}.dll" LIBZNCDIR="$bindir" fi @@ -665,6 +666,7 @@ AC_SUBST([LDFLAGS]) AC_SUBST([LIBS]) AC_SUBST([LIBZNC]) AC_SUBST([LIBZNCDIR]) +AC_SUBST([LIBZNC_VERSION]) AC_SUBST([ISCYGWIN]) AC_SUBST([MODLINK]) AC_SUBST([NOSSL]) diff --git a/modules/Makefile.in b/modules/Makefile.in index 0dea7dab..414d6e52 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -40,6 +40,7 @@ MODDIR := @MODDIR@ DATADIR := @DATADIR@ LIBZNC := @LIBZNC@ LIBZNCDIR:= @LIBZNCDIR@ +LIBZNC_VERSION := @LIBZNC_VERSION@ INSTALL := @INSTALL@ INSTALL_PROGRAM := @INSTALL_PROGRAM@ INSTALL_SCRIPT := @INSTALL_SCRIPT@ @@ -62,7 +63,7 @@ C= endif ifneq "$(LIBZNC)" "" -LDFLAGS += -L.. -lznc -Wl,-rpath,$(LIBZNCDIR) +LDFLAGS += -L.. -lznc-$(LIBZNC_VERSION) -Wl,-rpath,$(LIBZNCDIR) endif CLEAN :=