blob: da31e7f18b7cab6dd9904aa89d8d4d9307c12df3 [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
Daniel Veillard070803b2002-05-03 07:29:38 +000011Usage: xml2-config [OPTION]
Owen Taylor3473f882001-02-23 17:55:21 +000012
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
Daniel Veillard070803b2002-05-03 07:29:38 +000041 includedir=$prefix/include
42 libdir=$prefix/lib
Owen Taylor3473f882001-02-23 17:55:21 +000043 ;;
44
45 --prefix)
46 echo $prefix
47 ;;
48
49 --version)
50 echo @VERSION@
51 exit 0
52 ;;
53
54 --help)
55 usage 0
56 ;;
57
58 --cflags)
59 echo @XML_INCLUDEDIR@ @XML_CFLAGS@
60 ;;
61
62 --libs)
63 echo @XML_LIBDIR@ @XML_LIBS@
64 ;;
65
66 *)
67 usage
68 exit 1
69 ;;
70 esac
71 shift
72done
73
74exit 0