Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 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 |
Daniel Veillard | 070803b | 2002-05-03 07:29:38 +0000 | [diff] [blame] | 11 | Usage: xml2-config [OPTION] |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 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 |
Daniel Veillard | 070803b | 2002-05-03 07:29:38 +0000 | [diff] [blame] | 41 | includedir=$prefix/include |
| 42 | libdir=$prefix/lib |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 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 | echo @XML_LIBDIR@ @XML_LIBS@ |
| 64 | ;; |
| 65 | |
| 66 | *) |
| 67 | usage |
| 68 | exit 1 |
| 69 | ;; |
| 70 | esac |
| 71 | shift |
| 72 | done |
| 73 | |
| 74 | exit 0 |