File: gtkada-config.in

package info (click to toggle)
libgtkada2 2.8.1-6lenny3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 13,496 kB
  • ctags: 3,886
  • sloc: ada: 103,189; ansic: 45,411; perl: 5,500; sh: 2,812; makefile: 1,169; xml: 19
file content (73 lines) | stat: -rw-r--r-- 1,256 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/sh
# @configure_input@

prefix=@prefix@

gtk_libs="@GTK_LIBS@"
gtkada_libs="-L$prefix/lib/gtkada"
gtkada_cflags="-aI$prefix/include/gtkada -aO$prefix/lib/gtkada"
gtkada_lflags="-lgtkada"

usage()
{
        cat <<EOF
Usage: gtkada-config [OPTIONS]
Options:
        [--prefix]
        [--version|-v]
        [--libs]
        [--cflags]
        [--static]
        [--help|-h]
EOF
        exit $1
}

# Can have the following values:
#   0 = none
#   1 = cflags
#   2 = libs
#   4 = complete
output_type=4
while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --help|-h)
      usage 1>&2
      exit 1
      ;;
    --static)
      gtkada_libs="$prefix/lib/gtkada/libgtkada.a"
      gtkada_lflags=""
      ;;  
    --prefix)
      echo $prefix
      output_type=0
      ;;
    --version|-v)
      echo @GTKADA_VERSION@
      exit 1
      ;;
    --libs)
      output_type=2
      ;;
    --cflags)
      output_type=1
      ;;
    *)
      usage 1>&2
      exit 1
      ;;
  esac
  shift
done

case $output_type in
   1) echo $gtkada_cflags ;;
   2) echo $gtkada_libs $gtkada_lflags $gtk_libs ;;
   4) echo $gtkada_cflags -largs $gtkada_libs $gtkada_lflags $gtk_libs;;
esac