Last change
on this file since 5029 was
4655,
checked in by bensch, 20 years ago
|
orxonox/trunk: removed some unnecessary stuff
|
File size:
2.2 KB
|
Rev | Line | |
---|
[4097] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | glib_libs="-framework GLib" |
---|
| 4 | glib_cflags="-I/Library/Frameworks/GLib.framework/Headers" |
---|
| 5 | glib_thread_libs="-framework GLib -lpthread" |
---|
| 6 | glib_thread_cflags="-I/Library/Frameworks/GLib.framework/Headers" |
---|
| 7 | |
---|
| 8 | prefix=/Library/Frameworks |
---|
| 9 | gtk_fw_prefix=/Library/Frameworks |
---|
| 10 | exec_prefix=${prefix} |
---|
| 11 | exec_prefix_set=no |
---|
| 12 | |
---|
| 13 | usage() |
---|
| 14 | { |
---|
[4655] | 15 | cat <<EOF |
---|
[4097] | 16 | Usage: gtk-config [OPTIONS] [LIBRARIES] |
---|
| 17 | Options: |
---|
[4655] | 18 | [--prefix[=DIR]] |
---|
| 19 | [--exec-prefix[=DIR]] |
---|
| 20 | [--version] |
---|
| 21 | [--libs] |
---|
| 22 | [--cflags] |
---|
[4097] | 23 | Libraries: |
---|
[4655] | 24 | gtk |
---|
| 25 | gthread |
---|
[4097] | 26 | EOF |
---|
[4655] | 27 | exit $1 |
---|
[4097] | 28 | } |
---|
| 29 | |
---|
| 30 | if test $# -eq 0; then |
---|
[4655] | 31 | usage 1 1>&2 |
---|
[4097] | 32 | fi |
---|
| 33 | |
---|
| 34 | lib_gtk=yes |
---|
| 35 | |
---|
| 36 | while 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 |
---|
| 79 | done |
---|
| 80 | |
---|
| 81 | if test "$echo_prefix" = "yes"; then |
---|
[4655] | 82 | echo $prefix |
---|
[4097] | 83 | fi |
---|
| 84 | |
---|
| 85 | if test "$echo_exec_prefix" = "yes"; then |
---|
[4655] | 86 | echo $exec_prefix |
---|
[4097] | 87 | fi |
---|
| 88 | |
---|
| 89 | if test "$lib_gthread" = "yes"; then |
---|
| 90 | glib_cflags="$glib_thread_cflags" |
---|
| 91 | glib_libs="$glib_thread_libs" |
---|
| 92 | fi |
---|
| 93 | |
---|
| 94 | if 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 |
---|
| 96 | fi |
---|
| 97 | |
---|
| 98 | if 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 |
---|
| 112 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.