~ubuntu-branches/ubuntu/intrepid/libgtkada2/intrepid

« back to all changes in this revision

Viewing changes to src/tools/gtkada-config.in

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-08-11 09:46:51 UTC
  • mfrom: (6.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20080811094651-9mjd6acwa98ffw5c
Tags: 2.12.0-2ubuntu1
Add lpia to supported architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# @configure_input@
 
3
 
 
4
prefix=@prefix@
 
5
exec_prefix=@exec_prefix@
 
6
libdir=@libdir@/gtkada
 
7
includedir=@includedir@/gtkada
 
8
gtk_libs="@GTK_LIBS@"
 
9
 
 
10
cflags_static="-aI${includedir} -aO${libdir}/static"
 
11
cflags_relocatable="-aI${includedir} -aO${libdir}/relocatable"
 
12
libs_relocatable="-L${libdir}/relocatable -lgtkada ${gtk_libs}"
 
13
libs_static="-L${libdir}/static -lgtkada ${gtk_libs}"
 
14
 
 
15
usage()
 
16
{
 
17
        cat <<EOF
 
18
Usage: gtkada-config [OPTIONS]
 
19
Options:
 
20
        [--prefix]
 
21
        [--version|-v]
 
22
        [--libs]
 
23
        [--cflags]
 
24
        [--static]
 
25
        [--help|-h]
 
26
EOF
 
27
        exit $1
 
28
}
 
29
 
 
30
show_cflags=1
 
31
show_libs=1
 
32
libtype=relocatable
 
33
 
 
34
# Can have the following values:
 
35
#   0 = none
 
36
#   1 = cflags
 
37
#   2 = libs
 
38
#   4 = complete
 
39
output_type=4
 
40
while test $# -gt 0; do
 
41
  case "$1" in
 
42
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
 
43
  *) optarg= ;;
 
44
  esac
 
45
 
 
46
  case $1 in
 
47
    --help|-h)
 
48
      usage 1>&2
 
49
      exit 1
 
50
      ;;
 
51
    --static)
 
52
      libtype=static
 
53
      ;;  
 
54
    --prefix)
 
55
      echo $prefix
 
56
      exit 0
 
57
      ;;
 
58
    --version|-v)
 
59
      echo @GTKADA_VERSION@
 
60
      exit 0
 
61
      ;;
 
62
    --libs)
 
63
      show_libs=1
 
64
      show_cflags=0
 
65
      ;;
 
66
    --cflags)
 
67
      show_libs=0
 
68
      show_cflags=1
 
69
      ;;
 
70
    *)
 
71
      usage 1>&2
 
72
      exit 1
 
73
      ;;
 
74
  esac
 
75
  shift
 
76
done
 
77
 
 
78
## Force static if relocatable was not installed
 
79
if [ -d $libdir/relocatable ]; then
 
80
   :
 
81
else
 
82
   libtype=static
 
83
fi
 
84
 
 
85
result=""
 
86
 
 
87
if [ $show_cflags = 1 ]; then
 
88
   if [ $libtype = static ]; then
 
89
      result="$cflags_static"
 
90
   else
 
91
      result="$cflags_relocatable"
 
92
   fi
 
93
 
 
94
   if [ $show_libs = 1 ]; then
 
95
     result="$result -largs "
 
96
   fi
 
97
fi
 
98
 
 
99
if [ $show_libs = 1 ]; then
 
100
   if [ $libtype = static ]; then
 
101
     result="${result}${libs_static}"
 
102
   else
 
103
     result="${result}${libs_relocatable}"
 
104
   fi
 
105
fi
 
106
 
 
107
echo $result