- use pkg-config to determine version of libgd - use apache-rpm-macros OBS-URL: https://build.opensuse.org/request/show/857934 OBS-URL: https://build.opensuse.org/package/show/hardware/nut?expand=0&rev=93
29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
Index: nut-2.7.4/m4/nut_check_libgd.m4
|
|
===================================================================
|
|
--- nut-2.7.4.orig/m4/nut_check_libgd.m4
|
|
+++ nut-2.7.4/m4/nut_check_libgd.m4
|
|
@@ -19,8 +19,8 @@ if test -z "${nut_have_libgd_seen}"; the
|
|
LDFLAGS="-L/usr/X11R6/lib"
|
|
LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11"
|
|
|
|
- AC_MSG_CHECKING(for gd version via gdlib-config)
|
|
- GD_VERSION=`gdlib-config --version 2>/dev/null`
|
|
+ AC_MSG_CHECKING(for gd version via pkg-config)
|
|
+ GD_VERSION=`pkg-config --modversion gdlib 2>/dev/null`
|
|
if test "$?" != "0" -o -z "${GD_VERSION}"; then
|
|
GD_VERSION="none"
|
|
fi
|
|
@@ -34,9 +34,9 @@ if test -z "${nut_have_libgd_seen}"; the
|
|
AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]])
|
|
;;
|
|
*)
|
|
- CFLAGS="`gdlib-config --includes 2>/dev/null`"
|
|
- LDFLAGS="`gdlib-config --ldflags 2>/dev/null`"
|
|
- LIBS="`gdlib-config --libs 2>/dev/null`"
|
|
+ CFLAGS="`pkg-config gdlib --cflags 2>/dev/null`"
|
|
+ LDFLAGS="`pkg-config gdlib --libs 2>/dev/null`"
|
|
+ LIBS=""
|
|
;;
|
|
esac
|
|
|