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

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 7c59d8ccd2)
r14.0.x
Slávek Banko 6 years ago
parent e041d2bbeb
commit b72d215669
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -12,7 +12,6 @@ art_config.h:
EXTRA_DIST = \ EXTRA_DIST = \
libart.def \ libart.def \
libart-config.in \
libart-2.0.pc.in \ libart-2.0.pc.in \
libart-2.0-uninstalled.pc.in libart-2.0-uninstalled.pc.in
@ -166,9 +165,6 @@ tests: testart testuta
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libart-2.0.pc 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 install-data-local: install-ms-lib install-libtool-import-lib
uninstall-local: uninstall-ms-lib uninstall-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-2.0-uninstalled.pc
libart-zip]) 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_CONFIG_FILES([gen_art_config.sh],[chmod +x gen_art_config.sh])
AC_OUTPUT AC_OUTPUT

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

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

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