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 |
| 11 | Usage: xml-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 | ;; |
| 42 | |
| 43 | --prefix) |
| 44 | echo $prefix |
| 45 | ;; |
| 46 | |
| 47 | --version) |
| 48 | echo @VERSION@ |
| 49 | exit 0 |
| 50 | ;; |
| 51 | |
| 52 | --help) |
| 53 | usage 0 |
| 54 | ;; |
| 55 | |
| 56 | --cflags) |
| 57 | echo @XML_INCLUDEDIR@ @XML_CFLAGS@ |
| 58 | ;; |
| 59 | |
| 60 | --libs) |
| 61 | echo @XML_LIBDIR@ @XML_LIBS@ |
| 62 | ;; |
| 63 | |
| 64 | *) |
| 65 | usage |
| 66 | exit 1 |
| 67 | ;; |
| 68 | esac |
| 69 | shift |
| 70 | done |
| 71 | |
| 72 | exit 0 |