Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 736804 | Differences between
and this patch

Collapse All | Expand All

(-)nut-2.7.4.original/m4/nut_check_libgd.m4 (-13 / +10 lines)
Lines 16-27 Link Here
16
	dnl unusable and the user fails to pass better values in --with
16
	dnl unusable and the user fails to pass better values in --with
17
	dnl arguments
17
	dnl arguments
18
	CFLAGS=""
18
	CFLAGS=""
19
	LDFLAGS="-L/usr/X11R6/lib"
19
	LDFLAGS=""
20
	LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11"
20
	LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm"
21
21
22
	AC_MSG_CHECKING(for gd version via gdlib-config)
22
	AC_MSG_CHECKING(for gd version via gdlib-config)
23
	GD_VERSION=`gdlib-config --version 2>/dev/null`
23
	GD_VERSION=`pkg-config --modversion gdlib 2>/dev/null`
24
	if test "$?" != "0" -o -z "${GD_VERSION}"; then
24
	if test "`pkg-config --exists gdlib`" != "0" -o -z "${GD_VERSION}"; then
25
		GD_VERSION="none"
25
		GD_VERSION="none"
26
	fi
26
	fi
27
	AC_MSG_RESULT(${GD_VERSION} found)
27
	AC_MSG_RESULT(${GD_VERSION} found)
Lines 34-42 Link Here
34
		AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]])
34
		AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]])
35
		;;
35
		;;
36
	*)
36
	*)
37
		CFLAGS="`gdlib-config --includes 2>/dev/null`"
37
		CFLAGS="`pkg-config --cflags gdlib 2>/dev/null`"
38
		LDFLAGS="`gdlib-config --ldflags 2>/dev/null`"
38
		LDFLAGS="`pkg-config --cflags gdlib 2>/dev/null`"
39
		LIBS="`gdlib-config --libs 2>/dev/null`"
39
		LIBS="`pkg-config --libs gdlib 2>/dev/null`"
40
		;;
40
		;;
41
	esac
41
	esac
42
42
Lines 74-86 Link Here
74
74
75
	dnl check if gd is usable
75
	dnl check if gd is usable
76
	AC_CHECK_HEADERS(gd.h gdfontmb.h, [nut_have_libgd=yes], [nut_have_libgd=no], [AC_INCLUDES_DEFAULT])
76
	AC_CHECK_HEADERS(gd.h gdfontmb.h, [nut_have_libgd=yes], [nut_have_libgd=no], [AC_INCLUDES_DEFAULT])
77
	AC_SEARCH_LIBS(gdImagePng, gd, [], [nut_have_libgd=no])
78
77
79
	if test "${nut_have_libgd}" = "yes"; then
78
	AC_DEFINE(HAVE_LIBGD, 1, [Define if you have Boutell's libgd installed])
80
		AC_DEFINE(HAVE_LIBGD, 1, [Define if you have Boutell's libgd installed])
79
	LIBGD_CFLAGS="${CFLAGS}"
81
		LIBGD_CFLAGS="${CFLAGS}"
80
	LIBGD_LDFLAGS="${LDFLAGS} ${LIBS}"
82
		LIBGD_LDFLAGS="${LDFLAGS} ${LIBS}"
83
	fi
84
81
85
	dnl put back the original versions
82
	dnl put back the original versions
86
	CFLAGS="${CFLAGS_ORIG}"
83
	CFLAGS="${CFLAGS_ORIG}"

Return to bug 736804