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