blob: 8230b8857d62fe3e1a82202d78b20595a3071488 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
--- a/config/gdlib-config.in
+++ b/config/gdlib-config.in
@@ -2,14 +2,9 @@
#
# Return information about the local GD library installation
#
-# Modeled after pdflib-config
+# Modified to use pkgconfig
-# installation directories
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-bindir=@bindir@
+pkg=gdlib
usage()
{
@@ -50,43 +45,43 @@ while test $# -gt 0; do
case $1 in
--libdir)
- echo $libdir
+ pkg-config --variable=libdir ${pkg}
;;
--includedir)
- echo $includedir
+ pkg-config --variable=includedir ${pkg}
;;
--version)
- echo @VERSION@
+ pkg-config --modversion ${pkg}
;;
--majorversion)
- echo @GDLIB_MAJOR@
+ pkg-config --modversion ${pkg} | cut -f 1 -d .
;;
--minorversion)
- echo @GDLIB_MINOR@
+ pkg-config --modversion ${pkg} | cut -f 2 -d .
;;
--revision)
- echo @GDLIB_REVISION@
+ pkg-config --modversion ${pkg} | cut -f 3 -d .
;;
--ldflags)
- echo @LDFLAGS@
+ pkg-config --libs-only-L ${pkg}
;;
--libs)
- echo -lgd @LIBS@ @LIBICONV@
+ pkg-config --libs ${pkg}
;;
--cflags|--includes)
- echo -I@includedir@
+ pkg-config --cflags ${pkg}
;;
--features)
echo @FEATURES@
;;
--all)
- echo "GD library @VERSION@"
- echo "includedir: $includedir"
- echo "cflags: -I@includedir@"
- echo "ldflags: @LDFLAGS@"
- echo "libs: @LIBS@ @LIBICONV@"
- echo "libdir: $libdir"
- echo "features: @FEATURES@"
+ echo "GD library $($0 --version)@"
+ echo "includedir: $($0 --includedir)"
+ echo "cflags: $($0 --cflags)"
+ echo "ldflags: $($0 --ldflags)"
+ echo "libs: $($0 --libs)"
+ echo "libdir: $($0 --libdir)"
+ echo "features: $($0 --features)"
;;
*)
usage 1 1>&2
|