updated libxml2 to 2.5.10
[TestXSLT.git] / libxml2 / xml2-config.in
1 #! /bin/sh
2
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 includedir=@includedir@
6 libdir=@libdir@
7
8 usage()
9 {
10     cat <<EOF
11 Usage: xml2-config [OPTION]
12
13 Known 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
20 EOF
21
22     exit $1
23 }
24
25 if test $# -eq 0; then
26     usage 1
27 fi
28
29 cflags=false
30 libs=false
31
32 while 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         includedir=$prefix/include
42         libdir=$prefix/lib
43         ;;
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         if [ "`uname`" = "Linux" ]
64         then
65             if [ "@XML_LIBDIR@" = "-L/usr/lib64" ]
66             then
67                 echo @XML_LIBS@ 
68             else
69                 echo @XML_LIBDIR@ @XML_LIBS@ 
70             fi
71         else
72             echo @XML_LIBDIR@ @XML_LIBS@ 
73         fi
74         ;;
75
76     *)
77         usage
78         exit 1
79         ;;
80     esac
81     shift
82 done
83
84 exit 0