source: libcaca/branches/0.9/caca-config.in @ 3237

Last change on this file since 3237 was 245, checked in by Sam Hocevar, 17 years ago
  • configure.ac: + Set the executable bit of caca-config when regenerating that file.
  • caca-config.in: + No longer use USE_SLANG_TRUE and USE_NCURSES_TRUE since we now

have @CACA_LIBS@.

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1#! /bin/sh
2
3##  config script for libcaca -- Sam Hocevar <sam@zoy.org>
4##  $Id: caca-config.in 245 2003-12-11 15:54:53Z 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
28if test $# -eq 0
29then
30  usage 1 1>&2
31fi
32
33while test $# -gt 0
34do
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@NEED_PIC_TRUE@    --libs)
67@NEED_PIC_FALSE@    --libs | --plugin-libs)
68      echo_libs=yes
69      ;;
70@NEED_PIC_TRUE@    --plugin-libs)
71@NEED_PIC_TRUE@      echo_plugin_libs=yes
72@NEED_PIC_TRUE@      ;;
73    *)
74      usage 1 1>&2
75      ;;
76  esac
77  shift
78done
79
80if test "$local_prefix" = "yes"
81then
82  if test "$exec_prefix_set" != "yes"
83  then
84    exec_prefix=$prefix
85  fi
86fi
87
88if test "$echo_prefix" = "yes"
89then
90  echo $prefix
91fi
92
93if test "$echo_exec_prefix" = "yes"
94then
95  echo $exec_prefix
96fi
97
98if test "$echo_cflags" = "yes"
99then
100  cflags="-I$include_dir/"
101  echo $cflags
102fi
103
104if test "$echo_ldflags" = "yes"
105then
106  ldflags="-L$lib_dir"
107  echo $ldflags
108fi
109
110if test "$echo_libs" = "yes"
111then
112  echo -L@libdir@ -lcaca @CACA_LIBS@
113fi
114
115@NEED_PIC_TRUE@if test "$echo_plugin_libs" = "yes"
116@NEED_PIC_TRUE@then
117@NEED_PIC_TRUE@  echo -L@libdir@ -lcaca_pic @CACA_LIBS@
118@NEED_PIC_TRUE@fi
119
Note: See TracBrowser for help on using the repository browser.