blob: 768e336dd2f371bdbe62858d542a42c1b709122b [file] [log] [blame]
Daniel Veillarda6e1d121998-10-04 14:41:05 +00001#! /bin/sh
2
3prefix=@prefix@
4exec_prefix=@exec_prefix@
5includedir=@includedir@
Daniel Veillardd2ade932000-09-30 14:39:55 +00006libdir=@libdir@
Daniel Veillarda6e1d121998-10-04 14:41:05 +00007
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)
Daniel Veillarde3d88ef2000-01-24 13:55:06 +000048 echo @VERSION@
Daniel Veillarda6e1d121998-10-04 14:41:05 +000049 exit 0
50 ;;
51
52 --help)
53 usage 0
54 ;;
55
56 --cflags)
Daniel Veillardf5c2c871999-12-01 09:51:45 +000057 echo @XML_INCLUDEDIR@ @XML_CFLAGS@
Daniel Veillarda6e1d121998-10-04 14:41:05 +000058 ;;
59
60 --libs)
Daniel Veillardd2ade932000-09-30 14:39:55 +000061 echo @XML_LIBDIR@ @XML_LIBS@
Daniel Veillarda6e1d121998-10-04 14:41:05 +000062 ;;
63
64 *)
65 usage
66 exit 1
67 ;;
68 esac
69 shift
70done
71
72exit 0