Last change
on this file since 2900 was
2821,
checked in by Sam Hocevar, 14 years ago
|
Starting refactoring to get rid of libcucul. The initial reason for the
split is rendered moot by the plugin system: when enabled, binaries do
not link directly with libX11 or libGL. I hope this is a step towards
more consisteny and clarity.
|
-
Property svn:keywords set to
Id
|
File size:
1.6 KB
|
Line | |
---|
1 | #! /bin/sh |
---|
2 | |
---|
3 | ## config script for libcaca -- Sam Hocevar <sam@zoy.org> |
---|
4 | ## $Id: caca-config.in 2821 2008-09-27 13:12:46Z 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 | [--ldflags] |
---|
22 | [--cflags] |
---|
23 | EOF |
---|
24 | exit $1 |
---|
25 | } |
---|
26 | |
---|
27 | libs="" |
---|
28 | |
---|
29 | if test $# -eq 0 |
---|
30 | then |
---|
31 | usage 1 1>&2 |
---|
32 | fi |
---|
33 | |
---|
34 | while test $# -gt 0 |
---|
35 | 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 | local_prefix=yes |
---|
45 | ;; |
---|
46 | --prefix) |
---|
47 | echo_prefix=yes |
---|
48 | ;; |
---|
49 | --exec-prefix=*) |
---|
50 | exec_prefix=$optarg |
---|
51 | exec_prefix_set=yes |
---|
52 | local_prefix=yes |
---|
53 | ;; |
---|
54 | --exec-prefix) |
---|
55 | echo_exec_prefix=yes |
---|
56 | ;; |
---|
57 | --version) |
---|
58 | echo @VERSION@ |
---|
59 | exit 0 |
---|
60 | ;; |
---|
61 | --cflags) |
---|
62 | echo_cflags=yes |
---|
63 | ;; |
---|
64 | --ldflags) |
---|
65 | echo_ldflags=yes |
---|
66 | ;; |
---|
67 | --libs | --plugin-libs) |
---|
68 | echo_libs=yes |
---|
69 | ;; |
---|
70 | caca) |
---|
71 | libs="$libs -lcaca" |
---|
72 | ;; |
---|
73 | *) |
---|
74 | usage 1 1>&2 |
---|
75 | ;; |
---|
76 | esac |
---|
77 | shift |
---|
78 | done |
---|
79 | |
---|
80 | if test "$libs" = "" |
---|
81 | then |
---|
82 | libs="-lcaca" |
---|
83 | fi |
---|
84 | |
---|
85 | if test "$local_prefix" = "yes" |
---|
86 | then |
---|
87 | if test "$exec_prefix_set" != "yes" |
---|
88 | then |
---|
89 | exec_prefix=$prefix |
---|
90 | fi |
---|
91 | fi |
---|
92 | |
---|
93 | if test "$echo_prefix" = "yes" |
---|
94 | then |
---|
95 | echo $prefix |
---|
96 | fi |
---|
97 | |
---|
98 | if test "$echo_exec_prefix" = "yes" |
---|
99 | then |
---|
100 | echo $exec_prefix |
---|
101 | fi |
---|
102 | |
---|
103 | if test "$echo_cflags" = "yes" |
---|
104 | then |
---|
105 | cflags="-I$include_dir/" |
---|
106 | echo $cflags |
---|
107 | fi |
---|
108 | |
---|
109 | if test "$echo_ldflags" = "yes" |
---|
110 | then |
---|
111 | ldflags="-L$lib_dir" |
---|
112 | echo $ldflags |
---|
113 | fi |
---|
114 | |
---|
115 | if test "$echo_libs" = "yes" |
---|
116 | then |
---|
117 | echo -L@libdir@ $libs |
---|
118 | fi |
---|
119 | |
---|
Note: See
TracBrowser
for help on using the repository browser.