mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 07:15:59 +01:00
Introduce PKG_CONFIG
This commit is contained in:
parent
427df9fc49
commit
9d1b58a4d9
2 changed files with 22 additions and 19 deletions
2
Makefile
2
Makefile
|
@ -68,7 +68,7 @@ all: options ${PROJECT} po build-manpages
|
|||
# pkg-config based version checks
|
||||
.version-checks/%: config.mk
|
||||
$(QUIET)test $($(*)_VERSION_CHECK) -eq 0 || \
|
||||
pkg-config --atleast-version $($(*)_MIN_VERSION) $($(*)_PKG_CONFIG_NAME) || ( \
|
||||
${PKG_CONFIG} --atleast-version $($(*)_MIN_VERSION) $($(*)_PKG_CONFIG_NAME) || ( \
|
||||
echo "The minimum required version of $(*) is $($(*)_MIN_VERSION)" && \
|
||||
false \
|
||||
)
|
||||
|
|
39
config.mk
39
config.mk
|
@ -29,13 +29,16 @@ GTK_VERSION_CHECK ?= 1
|
|||
GTK_MIN_VERSION = 3.0
|
||||
GTK_PKG_CONFIG_NAME = gtk+-3.0
|
||||
|
||||
# pkg-config binary
|
||||
PKG_CONFIG ?= pkg-config
|
||||
|
||||
# database
|
||||
# To disable support for the sqlite backend set WITH_SQLITE to 0.
|
||||
WITH_SQLITE ?= $(shell (pkg-config --atleast-version=3.5.9 sqlite3 && echo 1) || echo 0)
|
||||
WITH_SQLITE ?= $(shell (${PKG_CONFIG} --atleast-version=3.5.9 sqlite3 && echo 1) || echo 0)
|
||||
|
||||
# synctex
|
||||
# To use the embedded copy of the syntex parser set WITH_SYSTEM_SYNCTEX to 0.
|
||||
WITH_SYSTEM_SYNCTEX ?= $(shell (pkg-config synctex && echo 1) || echo 0)
|
||||
WITH_SYSTEM_SYNCTEX ?= $(shell (${PKG_CONFIG} synctex && echo 1) || echo 0)
|
||||
|
||||
# mimetype detection
|
||||
# To disable support for mimetype detction with libmagic set WITH_MAGIC to 0.
|
||||
|
@ -63,24 +66,24 @@ PLUGINDIR ?= ${LIBDIR}/zathura
|
|||
LOCALEDIR ?= ${PREFIX}/share/locale
|
||||
|
||||
# libs
|
||||
GTK_INC ?= $(shell pkg-config --cflags gtk+-3.0)
|
||||
GTK_LIB ?= $(shell pkg-config --libs gtk+-3.0)
|
||||
GTK_INC ?= $(shell ${PKG_CONFIG} --cflags gtk+-3.0)
|
||||
GTK_LIB ?= $(shell ${PKG_CONFIG} --libs gtk+-3.0)
|
||||
|
||||
GTHREAD_INC ?= $(shell pkg-config --cflags gthread-2.0)
|
||||
GTHREAD_LIB ?= $(shell pkg-config --libs gthread-2.0)
|
||||
GTHREAD_INC ?= $(shell ${PKG_CONFIG} --cflags gthread-2.0)
|
||||
GTHREAD_LIB ?= $(shell ${PKG_CONFIG} --libs gthread-2.0)
|
||||
|
||||
GMODULE_INC ?= $(shell pkg-config --cflags gmodule-no-export-2.0)
|
||||
GMODULE_LIB ?= $(shell pkg-config --libs gmodule-no-export-2.0)
|
||||
GMODULE_INC ?= $(shell ${PKG_CONFIG} --cflags gmodule-no-export-2.0)
|
||||
GMODULE_LIB ?= $(shell ${PKG_CONFIG} --libs gmodule-no-export-2.0)
|
||||
|
||||
GLIB_INC ?= $(shell pkg-config --cflags glib-2.0)
|
||||
GLIB_LIB ?= $(shell pkg-config --libs glib-2.0)
|
||||
GLIB_INC ?= $(shell ${PKG_CONFIG} --cflags glib-2.0)
|
||||
GLIB_LIB ?= $(shell ${PKG_CONFIG} --libs glib-2.0)
|
||||
|
||||
GIRARA_INC ?= $(shell pkg-config --cflags girara-gtk3)
|
||||
GIRARA_LIB ?= $(shell pkg-config --libs girara-gtk3)
|
||||
GIRARA_INC ?= $(shell ${PKG_CONFIG} --cflags girara-gtk3)
|
||||
GIRARA_LIB ?= $(shell ${PKG_CONFIG} --libs girara-gtk3)
|
||||
|
||||
ifneq (${WITH_SQLITE},0)
|
||||
SQLITE_INC ?= $(shell pkg-config --cflags sqlite3)
|
||||
SQLITE_LIB ?= $(shell pkg-config --libs sqlite3)
|
||||
SQLITE_INC ?= $(shell ${PKG_CONFIG} --cflags sqlite3)
|
||||
SQLITE_LIB ?= $(shell ${PKG_CONFIG} --libs sqlite3)
|
||||
endif
|
||||
|
||||
ifneq (${WITH_MAGIC},0)
|
||||
|
@ -89,11 +92,11 @@ MAGIC_LIB ?= -lmagic
|
|||
endif
|
||||
|
||||
ifneq ($(WITH_SYSTEM_SYNCTEX),0)
|
||||
SYNCTEX_INC ?= $(shell pkg-config --cflags synctex)
|
||||
SYNCTEX_LIB ?= $(shell pkg-config --libs synctex)
|
||||
SYNCTEX_INC ?= $(shell ${PKG_CONFIG} --cflags synctex)
|
||||
SYNCTEX_LIB ?= $(shell ${PKG_CONFIG} --libs synctex)
|
||||
else
|
||||
ZLIB_INC ?= $(shell pkg-config --cflags zlib)
|
||||
ZLIB_LIB ?= $(shell pkg-config --libs zlib)
|
||||
ZLIB_INC ?= $(shell ${PKG_CONFIG} --cflags zlib)
|
||||
ZLIB_LIB ?= $(shell ${PKG_CONFIG} --libs zlib)
|
||||
endif
|
||||
|
||||
INCS = ${GIRARA_INC} ${GTK_INC} ${GTHREAD_INC} ${GMODULE_INC} ${GLIB_INC}
|
||||
|
|
Loading…
Reference in a new issue