diff --git a/config/gdlib-config.in b/config/gdlib-config.in index 6e4e494..24baa78 100755 --- a/config/gdlib-config.in +++ b/config/gdlib-config.in @@ -10,9 +10,10 @@ echo "gdlib-config: warning: this script is deprecated;" \ # installation directories prefix=@prefix@ exec_prefix=@exec_prefix@ -libdir=@libdir@ +libdir=`pkg-config gdlib --variable=libdir` includedir=@includedir@ bindir=@bindir@ +ldflags=`pkg-config gdlib --variable=ldflags` usage() { @@ -71,7 +72,7 @@ while test $# -gt 0; do echo @GDLIB_REVISION@ ;; --ldflags) - echo @LDFLAGS@ + echo $ldflags ;; --libs) echo -lgd @LIBS@ @LIBICONV@ @@ -86,7 +87,7 @@ while test $# -gt 0; do echo "GD library @VERSION@" echo "includedir: $includedir" echo "cflags: -I@includedir@" - echo "ldflags: @LDFLAGS@" + echo "ldflags: $ldflags" echo "libs: @LIBS@ @LIBICONV@" echo "libdir: $libdir" echo "features: @FEATURES@" diff --git a/config/gdlib-config.in.mlib b/config/gdlib-config.in.mlib new file mode 100755 index 0000000..6e4e494 --- /dev/null +++ b/config/gdlib-config.in.mlib @@ -0,0 +1,99 @@ +#!/bin/sh +# +# Return information about the local GD library installation +# +# Modeled after pdflib-config + +echo "gdlib-config: warning: this script is deprecated;" \ + "please use the pkg-config file instead." >&2 + +# installation directories +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +bindir=@bindir@ + +usage() +{ + cat <&2 +fi + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --libdir) + echo $libdir + ;; + --includedir) + echo $includedir + ;; + --version) + echo @VERSION@ + ;; + --majorversion) + echo @GDLIB_MAJOR@ + ;; + --minorversion) + echo @GDLIB_MINOR@ + ;; + --revision) + echo @GDLIB_REVISION@ + ;; + --ldflags) + echo @LDFLAGS@ + ;; + --libs) + echo -lgd @LIBS@ @LIBICONV@ + ;; + --cflags|--includes) + echo -I@includedir@ + ;; + --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@" + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done