OSDN Git Service

perl module & chmod +x tests/*.sh
[chasen-legacy/chasen.git] / chasen-config.in
1 #!/bin/sh
2
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 sysconfdir=@sysconfdir@
6 exec_prefix_set=no
7
8 usage()
9 {
10     cat <<EOF
11 Usage: chasen-config [OPTIONS]
12
13 Options:
14   [--prefix[=DIR]]
15   [--exec-prefix[=DIR]]
16   [--chasenrc-path]
17   [--libs]
18   [--cflags]
19   [--dicdir]
20   [--sharedir]
21   [--mkchadic]  [--help]
22   [--version]
23 EOF
24
25     exit $1
26 }
27
28 if test $# -eq 0; then
29     usage 1
30 fi
31
32 cflags=false
33 libs=false
34
35 while test $# -gt 0; do
36     case "$1" in
37     -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
38     *) optarg= ;;
39     esac
40
41     case "$1" in
42     --prefix=*)
43         prefix=$optarg
44         if test $exec_prefix_set = no ; then
45           exec_prefix=$optarg
46         fi
47         ;;
48
49     --prefix)
50         echo $prefix
51         ;;
52
53     --exec-prefix=*)
54         exec_prefix=$optarg
55         exec_prefix_set=yes
56         ;;
57
58     --exec-prefix)
59         echo $exec_prefix
60         ;;
61
62     --chasenrc-path)
63         echo $sysconfdir/chasenrc
64         ;;
65
66     --version)
67         echo @VERSION@
68         exit 0
69         ;;
70
71     --help)
72         usage 0
73         ;;
74
75     --cflags)
76         if test @includedir@ != /usr/include ; then
77           includes=-I@includedir@
78         fi
79         echo $includes
80         ;;
81
82     --libs)
83         echo -L@libdir@ -lchasen
84         ;;
85
86     --dicdir)
87         echo @libdir@/chasen/dic
88         ;;
89
90     --mkchadic)
91         echo @libexecdir@/chasen
92         ;;
93
94     *)
95         usage
96         exit 1
97         ;;
98     esac
99     shift
100 done
101
102 exit 0