Use pkg-config to get values in libart2-config.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 6 years ago
parent d5cb41f44a
commit 7c59d8ccd2
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -12,7 +12,6 @@ art_config.h:
EXTRA_DIST = \
libart.def \
libart-config.in \
libart-2.0.pc.in \
libart-2.0-uninstalled.pc.in
@ -166,9 +165,6 @@ tests: testart testuta
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libart-2.0.pc
libart2-config: libart-config
cp -f libart-config libart2-config
install-data-local: install-ms-lib install-libtool-import-lib
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib

@ -108,7 +108,6 @@ libart-2.0.pc
libart-2.0-uninstalled.pc
libart-zip])
AC_CONFIG_FILES([libart-config],[chmod +x libart-config])
AC_CONFIG_FILES([gen_art_config.sh],[chmod +x gen_art_config.sh])
AC_OUTPUT

@ -5,6 +5,6 @@ includedir=@includedir@
Name: libart
Description: LGPL version of the libart library
Version: @VERSION@
Version: @LIBART_VERSION@
Libs: ${pc_top_builddir}/${pcfiledir}/libart_lgpl_2.la
Cflags: -I${pc_top_builddir}/${pcfiledir}

@ -5,6 +5,6 @@ includedir=@includedir@
Name: libart
Description: LGPL version of the libart library
Version: @VERSION@
Version: @LIBART_VERSION@
Libs: -L${libdir} -lart_lgpl_2
Cflags: -I${includedir}/libart-2.0

@ -1,19 +1,24 @@
#!/bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
libs=""
output_libs=no
usage="\
Usage: libart-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
Usage: libart2-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
if ! which pkg-config >/dev/null; then
echo "pkg-config not found on your system" 1>&2
exit 1
fi
prefix=`pkg-config --variable=prefix libart-2.0`
exec_prefix=`pkg-config --variable=exec_prefix libart-2.0`
exec_prefix_set=no
libs=""
output_libs=no
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
@ -38,14 +43,13 @@ while test $# -gt 0; do
echo $exec_prefix
;;
--version)
echo @LIBART_VERSION@
echo `pkg-config --modversion libart-2.0`
;;
--cflags)
includes=-I@includedir@/libart-2.0
echo $includes
echo `pkg-config --cflags-only-I libart-2.0`
;;
--libs)
libs="$libs -L@libdir@ -lart_lgpl_2"
libs=`pkg-config --libs libart-2.0`
output_libs=yes
;;
--static)
@ -62,4 +66,3 @@ done
if test $output_libs = yes ; then
echo $libs
fi
Loading…
Cancel
Save