blob: 768e336dd2f371bdbe62858d542a42c1b709122b [file] [log] [blame]
Owen Taylor3473f882001-02-23 17:55:21 +00001#! /bin/sh
2
3prefix=@prefix@
4exec_prefix=@exec_prefix@
5includedir=@includedir@
6libdir=@libdir@
7
8usage()
9{
10 cat <<EOF
11Usage: xml-config [OPTION]
12
13Known values for OPTION are:
14
15 --prefix=DIR change libxml prefix [default $prefix]
16 --libs print library linking information
17 --cflags print pre-processor and compiler flags
18 --help display this help and exit
19 --version output version information
20EOF
21
22 exit $1
23}
24
25if test $# -eq 0; then
26 usage 1
27fi
28
29cflags=false
30libs=false
31
32while test $# -gt 0; do
33 case "$1" in
34 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
35 *) optarg= ;;
36 esac
37
38 case "$1" in
39 --prefix=*)
40 prefix=$optarg
41 ;;
42
43 --prefix)
44 echo $prefix
45 ;;
46
47 --version)
48 echo @VERSION@
49 exit 0
50 ;;
51
52 --help)
53 usage 0
54 ;;
55
56 --cflags)
57 echo @XML_INCLUDEDIR@ @XML_CFLAGS@
58 ;;
59
60 --libs)
61 echo @XML_LIBDIR@ @XML_LIBS@
62 ;;
63
64 *)
65 usage
66 exit 1
67 ;;
68 esac
69 shift
70done
71
72exit 0