Daniel Veillard | a6e1d12 | 1998-10-04 14:41:05 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | |
| 3 | prefix=@prefix@ |
| 4 | exec_prefix=@exec_prefix@ |
| 5 | includedir=@includedir@ |
| 6 | |
| 7 | usage() |
| 8 | { |
| 9 | cat <<EOF |
| 10 | Usage: xml-config [OPTION] |
| 11 | |
| 12 | Known 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 |
| 19 | EOF |
| 20 | |
| 21 | exit $1 |
| 22 | } |
| 23 | |
| 24 | if test $# -eq 0; then |
| 25 | usage 1 |
| 26 | fi |
| 27 | |
| 28 | cflags=false |
| 29 | libs=false |
| 30 | |
| 31 | while 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 Veillard | e3d88ef | 2000-01-24 13:55:06 +0000 | [diff] [blame] | 47 | echo @VERSION@ |
Daniel Veillard | a6e1d12 | 1998-10-04 14:41:05 +0000 | [diff] [blame] | 48 | exit 0 |
| 49 | ;; |
| 50 | |
| 51 | --help) |
| 52 | usage 0 |
| 53 | ;; |
| 54 | |
| 55 | --cflags) |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 56 | echo @XML_INCLUDEDIR@ @XML_CFLAGS@ |
Daniel Veillard | a6e1d12 | 1998-10-04 14:41:05 +0000 | [diff] [blame] | 57 | ;; |
| 58 | |
| 59 | --libs) |
Daniel Veillard | b96e643 | 1999-08-29 21:02:19 +0000 | [diff] [blame] | 60 | echo -L@libdir@ @XML_LIBS@ @LIBS@ |
Daniel Veillard | a6e1d12 | 1998-10-04 14:41:05 +0000 | [diff] [blame] | 61 | ;; |
| 62 | |
| 63 | *) |
| 64 | usage |
| 65 | exit 1 |
| 66 | ;; |
| 67 | esac |
| 68 | shift |
| 69 | done |
| 70 | |
| 71 | exit 0 |