mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Install a file for pkg-config
configure now generates to files for pkg-config: znc.pc and znc-uninstalled.pc This is supposed to replace the znc-config binary. Everything which can be done with znc-config can now also be done with pkg-config. znc-uninstalled.pc is only generated by configure, but not installed by the Makefiles. It's there to fix some kind of bug we have with znc-config. ZNC can run quite fine from the source, there is no need to ever run "make install". The only problem is that e.g. znc-extra won't build, since it gets -I/usr/local/include/znc from znc-config which doesn't work since znc was never installed. pkg-config has a nice fix for this: If you ask for "a", but "a-uninstalled" exists, pkg-config will use the later one instead. This is used in znc-uninstalled.pc to output a different -I flag which works for the uninstalled headers. (You only have to set $PKG_CONFIG_PATH to znc's source dir for this to work) git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1503 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -18,6 +18,7 @@ LDFLAGS := @LDFLAGS@
|
||||
LIBS := @LIBS@
|
||||
LIBZNC := @LIBZNC@
|
||||
LIBZNCDIR:= @LIBZNCDIR@
|
||||
PKGCONFIGDIR := $(prefix)/lib/pkgconfig
|
||||
|
||||
LIB_SRCS := ZNCString.cpp Csocket.cpp znc.cpp User.cpp IRCSock.cpp Client.cpp DCCBounce.cpp \
|
||||
DCCSock.cpp Chan.cpp Nick.cpp Server.cpp Modules.cpp MD5.cpp Buffer.cpp Utils.cpp \
|
||||
@@ -73,10 +74,12 @@ distclean: clean
|
||||
install: znc $(LIBZNC)
|
||||
mkdir -p $(DESTDIR)$(bindir)
|
||||
mkdir -p $(DESTDIR)$(includedir)/znc
|
||||
mkdir -p $(DESTDIR)$(PKGCONFIGDIR)
|
||||
install -m 0755 znc $(DESTDIR)$(bindir)
|
||||
install -m 0755 znc-config $(DESTDIR)$(bindir)
|
||||
install -m 0755 znc-buildmod $(DESTDIR)$(bindir)
|
||||
install -m 0644 $(srcdir)/*.h $(DESTDIR)$(includedir)/znc
|
||||
install -m 0644 znc.pc $(DESTDIR)$(PKGCONFIGDIR)
|
||||
@if test -n "$(LIBZNC)"; then \
|
||||
mkdir -p $(DESTDIR)$(LIBZNCDIR) ; \
|
||||
install -m 0755 $(LIBZNC) $(DESTDIR)$(LIBZNCDIR) ; \
|
||||
|
||||
@@ -3449,6 +3449,10 @@ ac_config_files="$ac_config_files znc-buildmod"
|
||||
|
||||
ac_config_files="$ac_config_files man/Makefile"
|
||||
|
||||
ac_config_files="$ac_config_files znc.pc"
|
||||
|
||||
ac_config_files="$ac_config_files znc-uninstalled.pc"
|
||||
|
||||
if test "$MODULES" = "yes"; then
|
||||
ac_config_files="$ac_config_files modules/Makefile"
|
||||
|
||||
@@ -4065,6 +4069,8 @@ do
|
||||
"znc-config") CONFIG_FILES="$CONFIG_FILES znc-config" ;;
|
||||
"znc-buildmod") CONFIG_FILES="$CONFIG_FILES znc-buildmod" ;;
|
||||
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
|
||||
"znc.pc") CONFIG_FILES="$CONFIG_FILES znc.pc" ;;
|
||||
"znc-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES znc-uninstalled.pc" ;;
|
||||
"modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;;
|
||||
|
||||
*) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
|
||||
|
||||
@@ -237,6 +237,8 @@ AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_FILES([znc-config])
|
||||
AC_CONFIG_FILES([znc-buildmod])
|
||||
AC_CONFIG_FILES([man/Makefile])
|
||||
AC_CONFIG_FILES([znc.pc])
|
||||
AC_CONFIG_FILES([znc-uninstalled.pc])
|
||||
if test "$MODULES" = "yes"; then
|
||||
AC_CONFIG_FILES([modules/Makefile])
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# You can access these with e.g. pkg-config --variable=moddir znc
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
datarootdir=@datarootdir@
|
||||
bindir=@bindir@
|
||||
datadir=@datadir@
|
||||
includedir=@includedir@
|
||||
|
||||
cxx=@CXX@
|
||||
CPPFLAGS=@CPPFLAGS@
|
||||
MODFLAGS=@MODFLAGS@
|
||||
version=@VERSION@
|
||||
moddir=@MODDIR@
|
||||
moddatadir=@DATADIR@
|
||||
modlink=@MODLINK@
|
||||
|
||||
# This and the following two lines should be the only differences to znc.pc.in
|
||||
srcdir=@abs_srcdir@
|
||||
INC_PATH=-I${srcdir}/
|
||||
|
||||
Name: ZNC
|
||||
Description: An advanced IRC proxy
|
||||
Version: ${version}
|
||||
URL: http://znc.in
|
||||
Cflags: ${CPPFLAGS} ${MODFLAGS} ${INC_PATH}
|
||||
@@ -0,0 +1,23 @@
|
||||
# You can access these with e.g. pkg-config --variable=moddir znc
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
datarootdir=@datarootdir@
|
||||
bindir=@bindir@
|
||||
datadir=@datadir@
|
||||
includedir=@includedir@
|
||||
|
||||
cxx=@CXX@
|
||||
CPPFLAGS=@CPPFLAGS@
|
||||
MODFLAGS=@MODFLAGS@
|
||||
version=@VERSION@
|
||||
moddir=@MODDIR@
|
||||
moddatadir=@DATADIR@
|
||||
modlink=@MODLINK@
|
||||
|
||||
INC_PATH=-I${includedir}/znc
|
||||
|
||||
Name: ZNC
|
||||
Description: An advanced IRC proxy
|
||||
Version: ${version}
|
||||
URL: http://znc.in
|
||||
Cflags: ${CPPFLAGS} ${MODFLAGS} ${INC_PATH}
|
||||
Reference in New Issue
Block a user