Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/scripts/gtk-config.osXframework @ 4655

Last change on this file since 4655 was 4655, checked in by bensch, 19 years ago

orxonox/trunk: removed some unnecessary stuff

File size: 2.2 KB
Line 
1#!/bin/sh
2
3glib_libs="-framework GLib"
4glib_cflags="-I/Library/Frameworks/GLib.framework/Headers"
5glib_thread_libs="-framework GLib -lpthread"
6glib_thread_cflags="-I/Library/Frameworks/GLib.framework/Headers"
7
8prefix=/Library/Frameworks
9gtk_fw_prefix=/Library/Frameworks
10exec_prefix=${prefix}
11exec_prefix_set=no
12
13usage()
14{
15        cat <<EOF
16Usage: gtk-config [OPTIONS] [LIBRARIES]
17Options:
18        [--prefix[=DIR]]
19        [--exec-prefix[=DIR]]
20        [--version]
21        [--libs]
22        [--cflags]
23Libraries:
24        gtk
25        gthread
26EOF
27        exit $1
28}
29
30if test $# -eq 0; then
31        usage 1 1>&2
32fi
33
34lib_gtk=yes
35
36while test $# -gt 0; do
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      if test $exec_prefix_set = no ; then
46        exec_prefix=$optarg
47      fi
48      ;;
49    --prefix)
50      echo_prefix=yes
51      ;;
52    --exec-prefix=*)
53      exec_prefix=$optarg
54      exec_prefix_set=yes
55      ;;
56    --exec-prefix)
57      echo_exec_prefix=yes
58      ;;
59    --version)
60      echo 1.2.10
61      ;;
62    --cflags)
63      echo_cflags=yes
64      ;;
65    --libs)
66      echo_libs=yes
67      ;;
68    gtk)
69      lib_gtk=yes
70      ;;
71    gthread)
72      lib_gthread=yes
73      ;;
74    *)
75      usage 1 1>&2
76      ;;
77  esac
78  shift
79done
80
81if test "$echo_prefix" = "yes"; then
82        echo $prefix
83fi
84
85if test "$echo_exec_prefix" = "yes"; then
86        echo $exec_prefix
87fi
88
89if test "$lib_gthread" = "yes"; then
90      glib_cflags="$glib_thread_cflags"
91      glib_libs="$glib_thread_libs"
92fi
93
94if test "$echo_cflags" = "yes"; then
95      echo -F${gtk_fw_prefix} ${glib_cflags} -I${gtk_fw_prefix}/GDK.framework/Headers -I${gtk_fw_prefix}/GTK.framework/Headers
96fi
97
98if test "$echo_libs" = "yes"; then
99      my_glib_libs=
100      libdirs=-F${exec_prefix}
101      for i in $glib_libs ; do
102        if test $i != -F${exec_prefix} ; then
103          if test -z "$my_glib_libs" ; then
104            my_glib_libs="$i"
105          else
106            my_glib_libs="$my_glib_libs $i"
107          fi
108        fi
109      done
110
111      echo $libdirs -F${gtk_fw_prefix} -framework GLib -framework GDK -framework GTK ${glib_cflags} -lm
112fi
Note: See TracBrowser for help on using the repository browser.