| 1 |
#!/bin/sh |
| 2 |
# Copyright (C) 2006 K.Kosako (sndgk393 AT ybb DOT ne DOT jp) |
| 3 |
|
| 4 |
ONIGMO_VERSION=@PACKAGE_VERSION@ |
| 5 |
|
| 6 |
show_usage() |
| 7 |
{ |
| 8 |
cat <<EOF |
| 9 |
Usage: onigmo-config [OPTION] |
| 10 |
|
| 11 |
Values for OPTION are: |
| 12 |
--prefix[=DIR] change prefix to DIR |
| 13 |
--prefix print prefix |
| 14 |
--exec-prefix[=DIR] change exec_prefix to DIR |
| 15 |
--exec-prefix print exec_prefix |
| 16 |
--cflags print C compiler flags |
| 17 |
--libs print library information |
| 18 |
--version print onigmo version |
| 19 |
--help print this help |
| 20 |
|
| 21 |
EOF |
| 22 |
|
| 23 |
exit 1 |
| 24 |
} |
| 25 |
|
| 26 |
if test $# -eq 0; then |
| 27 |
show_usage |
| 28 |
fi |
| 29 |
|
| 30 |
prefix=@prefix@ |
| 31 |
exec_prefix=@exec_prefix@ |
| 32 |
is_set_exec_prefix=no |
| 33 |
|
| 34 |
while test $# -gt 0; do |
| 35 |
case "$1" in |
| 36 |
-*=*) val=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` |
| 37 |
;; |
| 38 |
*) val= |
| 39 |
;; |
| 40 |
esac |
| 41 |
|
| 42 |
case $1 in |
| 43 |
--prefix=*) |
| 44 |
prefix=$val |
| 45 |
if test $is_set_exec_prefix = no ; then |
| 46 |
exec_prefix=$val |
| 47 |
fi |
| 48 |
;; |
| 49 |
--prefix) |
| 50 |
echo $prefix |
| 51 |
;; |
| 52 |
--exec-prefix=*) |
| 53 |
exec_prefix=$val |
| 54 |
is_set_exec_prefix=yes |
| 55 |
;; |
| 56 |
--exec-prefix) |
| 57 |
echo $exec_prefix |
| 58 |
;; |
| 59 |
--cflags) |
| 60 |
if test @includedir@ != /usr/include ; then |
| 61 |
show_includedir=-I@includedir@ |
| 62 |
fi |
| 63 |
echo $show_includedir |
| 64 |
;; |
| 65 |
--libs) |
| 66 |
echo -L@libdir@ -lonigmo |
| 67 |
;; |
| 68 |
--version) |
| 69 |
echo $ONIGMO_VERSION |
| 70 |
;; |
| 71 |
*) |
| 72 |
show_usage |
| 73 |
;; |
| 74 |
esac |
| 75 |
shift |
| 76 |
done |
| 77 |
|
| 78 |
# END |