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