Ticket #10005: gdlib-config

File gdlib-config, 3.6 KB (added by ternyk@…, 5 years ago)

Compiled gdlib-config (check the unterminated quote in there)

Line 
1#!/bin/sh
2#
3# Return information about the local GD library installation
4#
5# Modeled after pdflib-config
6
7# installation directories
8prefix=/home/cave/Projects/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr
9exec_prefix=/home/cave/Projects/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr
10libdir=${exec_prefix}/lib
11includedir=${prefix}/include
12bindir=/usr/bin
13
14usage()
15{
16        cat <<EOF
17Print information on GD library's version, configuration, and use.
18Usage: gdlib-config [options]
19Options:
20        --libdir          # directory where GD library is installed
21        --includedir      # directory where GD library headers are installed
22        --version         # complete GD library version string
23        --majorversion    # GD library major version number
24        --minorversion    # GD library minor version number
25        --revision        # GD library revision version number
26        --ldflags         # options required for linking against GD library
27        --libs            # libs required for linking against GD library
28        --cflags          # options required for compiling GD library apps
29        --includes        # same as --cflags
30        --features        # lists optional features compiled into gd, separated
31                          # by spaces. Currently (as of 2.0.26) the optional
32                          # features are GD_PNG, GD_JPEG, GD_XPM, and
33                          # GD_FREETYPE. When these features are reported by
34                          # --features, it is safe to include calls to the
35                          # related functions in your code.
36        --all             # print a summary of all GD library configure options
37EOF
38        exit $1
39}
40
41if test $# -eq 0; then
42        usage 1 1>&2
43fi
44
45while test $# -gt 0; do
46    case "$1" in
47    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
48    *) optarg= ;;
49    esac
50
51    case $1 in
52    --libdir)
53        echo $libdir
54        ;;
55    --includedir)
56        echo $includedir
57        ;;
58    --version)
59        echo 2.0.35
60        ;;
61    --majorversion)
62        echo 2
63        ;;
64    --minorversion)
65        echo 0
66        ;;
67    --revision)
68        echo 35
69        ;;
70    --ldflags)
71        echo  -L/home/cave/Projects/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib -L/home/cave/Projects/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib -L/home/cave/Projects/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/lib -L/home/cave/Projects/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib -L/home/cave/Projects/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/lib  -L/home/cave/Projects/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib
72        ;;
73    --libs)
74        echo -ljpeg -lpng12 -lz -lm
75        ;;
76    --cflags|--includes)
77        echo -I${prefix}/include
78        ;;
79    --features)
80        echo GD_JPEG GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON
81        ;;
82    --all)
83        echo "GD library  2.0.35"
84        echo "includedir: $includedir"
85        echo "cflags:     -I${prefix}/include"
86        echo "ldflags:     -L/home/cave/Projects/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib -L/home/cave/Projects/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib -L/home/cave/Projects/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/lib -L/home/cave/Projects/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib -L/home/cave/Projects/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/lib  -L/home/cave/Projects/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib"
87        echo "libs:       -ljpeg -lpng12 -lz -lm
88        echo "libdir:     $libdir"
89        echo "features:   GD_JPEG GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON"
90        ;;
91    *)
92        usage 1 1>&2
93        ;;
94    esac
95    shift
96done