source: libcaca/trunk/caca-config.in @ 987

Last change on this file since 987 was 987, checked in by Sam Hocevar, 14 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
6prefix=@prefix@
7exec_prefix=@exec_prefix@
8
9lib_dir=@libdir@
10include_dir=@includedir@
11
12usage()
13{
14  cat <<EOF
15Usage: caca-config [OPTIONS] [LIBRARIES]
16Options:
17   [--prefix[=DIR]]
18   [--exec-prefix[=DIR]]
19   [--version]
20   [--libs]
21   [--plugin-libs]
22   [--ldflags]
23   [--cflags]
24EOF
25  exit $1
26}
27
28libs=""
29
30if test $# -eq 0
31then
32  usage 1 1>&2
33fi
34
35while test $# -gt 0
36do
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
82done
83
84if test "$libs" = ""
85then
86  libs="-lcaca @CACA_LIBS@ -lcucul"
87fi
88
89if test "$local_prefix" = "yes"
90then
91  if test "$exec_prefix_set" != "yes"
92  then
93    exec_prefix=$prefix
94  fi
95fi
96
97if test "$echo_prefix" = "yes"
98then
99  echo $prefix
100fi
101
102if test "$echo_exec_prefix" = "yes"
103then
104  echo $exec_prefix
105fi
106
107if test "$echo_cflags" = "yes"
108then
109  cflags="-I$include_dir/"
110  echo $cflags
111fi
112
113if test "$echo_ldflags" = "yes"
114then
115  ldflags="-L$lib_dir"
116  echo $ldflags
117fi
118
119if test "$echo_libs" = "yes"
120then
121  echo -L@libdir@ $libs
122fi
123
Note: See TracBrowser for help on using the repository browser.