Last change
on this file since 4787 was
4333,
checked in by Sam Hocevar, 12 years ago
|
Large source code cleanup, getting rid of spaces, tabs, and svn keywords.
|
-
Property svn:keywords set to
Id
|
File size:
1.6 KB
|
Line | |
---|
1 | #! /bin/sh |
---|
2 | |
---|
3 | ## config script for libcaca -- Sam Hocevar <sam@hocevar.net> |
---|
4 | |
---|
5 | prefix=@prefix@ |
---|
6 | exec_prefix=@exec_prefix@ |
---|
7 | |
---|
8 | lib_dir=@libdir@ |
---|
9 | include_dir=@includedir@ |
---|
10 | |
---|
11 | usage() |
---|
12 | { |
---|
13 | cat <<EOF |
---|
14 | Usage: caca-config [OPTIONS] [LIBRARIES] |
---|
15 | Options: |
---|
16 | [--prefix[=DIR]] |
---|
17 | [--exec-prefix[=DIR]] |
---|
18 | [--version] |
---|
19 | [--libs] |
---|
20 | [--ldflags] |
---|
21 | [--cflags] |
---|
22 | EOF |
---|
23 | exit $1 |
---|
24 | } |
---|
25 | |
---|
26 | libs="" |
---|
27 | |
---|
28 | if test $# -eq 0 |
---|
29 | then |
---|
30 | usage 1 1>&2 |
---|
31 | fi |
---|
32 | |
---|
33 | while test $# -gt 0 |
---|
34 | do |
---|
35 | case "$1" in |
---|
36 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
---|
37 | *) optarg= ;; |
---|
38 | esac |
---|
39 | |
---|
40 | case $1 in |
---|
41 | --prefix=*) |
---|
42 | prefix=$optarg |
---|
43 | local_prefix=yes |
---|
44 | ;; |
---|
45 | --prefix) |
---|
46 | echo_prefix=yes |
---|
47 | ;; |
---|
48 | --exec-prefix=*) |
---|
49 | exec_prefix=$optarg |
---|
50 | exec_prefix_set=yes |
---|
51 | local_prefix=yes |
---|
52 | ;; |
---|
53 | --exec-prefix) |
---|
54 | echo_exec_prefix=yes |
---|
55 | ;; |
---|
56 | --version) |
---|
57 | echo @VERSION@ |
---|
58 | exit 0 |
---|
59 | ;; |
---|
60 | --cflags) |
---|
61 | echo_cflags=yes |
---|
62 | ;; |
---|
63 | --ldflags) |
---|
64 | echo_ldflags=yes |
---|
65 | ;; |
---|
66 | --libs | --plugin-libs) |
---|
67 | echo_libs=yes |
---|
68 | ;; |
---|
69 | caca) |
---|
70 | libs="$libs -lcaca" |
---|
71 | ;; |
---|
72 | *) |
---|
73 | usage 1 1>&2 |
---|
74 | ;; |
---|
75 | esac |
---|
76 | shift |
---|
77 | done |
---|
78 | |
---|
79 | if test "$libs" = "" |
---|
80 | then |
---|
81 | libs="-lcaca" |
---|
82 | fi |
---|
83 | |
---|
84 | if test "$local_prefix" = "yes" |
---|
85 | then |
---|
86 | if test "$exec_prefix_set" != "yes" |
---|
87 | then |
---|
88 | exec_prefix=$prefix |
---|
89 | fi |
---|
90 | fi |
---|
91 | |
---|
92 | if test "$echo_prefix" = "yes" |
---|
93 | then |
---|
94 | echo $prefix |
---|
95 | fi |
---|
96 | |
---|
97 | if test "$echo_exec_prefix" = "yes" |
---|
98 | then |
---|
99 | echo $exec_prefix |
---|
100 | fi |
---|
101 | |
---|
102 | if test "$echo_cflags" = "yes" |
---|
103 | then |
---|
104 | cflags="-I$include_dir/" |
---|
105 | echo $cflags |
---|
106 | fi |
---|
107 | |
---|
108 | if test "$echo_ldflags" = "yes" |
---|
109 | then |
---|
110 | ldflags="-L$lib_dir" |
---|
111 | echo $ldflags |
---|
112 | fi |
---|
113 | |
---|
114 | if test "$echo_libs" = "yes" |
---|
115 | then |
---|
116 | echo -L@libdir@ $libs |
---|
117 | fi |
---|
118 | |
---|
Note: See
TracBrowser
for help on using the repository browser.