TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[TCLUG:2304] gtk-config
- To: tclug-list@listserv.real-time.com
 
- Subject: [TCLUG:2304] gtk-config
 
- From: Andrew McCulloh <mcculloh@2z.net>
 
- Date: Sat, 21 Nov 1998 10:33:27 -0600 (CST)
 
- In-Reply-To: <Pine.LNX.4.03.9811211012270.19749-100000@pcLueyB.Res.Carleton.edu>
 
- References: <Pine.LNX.4.03.9811211012270.19749-100000@pcLueyB.Res.Carleton.edu>
 
Here it is. Put it in your path--you will have to edit the prefix
variable. This is for version 1.0.5 but I've build 1.0.6 things with
it as well..
Andrew
---cut me---
#!/bin/sh
prefix=/usr
exec_prefix=${prefix}
exec_prefix_set=no
usage="\
Usage: gtk-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi
while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac
  case $1 in
    --prefix=*)
      prefix=$optarg
      if test $exec_prefix_set = no ; then
        exec_prefix=$optarg
      fi
      ;;
    --prefix)
      echo $prefix
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo $exec_prefix
      ;;
    --version)
      echo 1.0.5
      ;;
    --cflags)
      if test ${prefix}/include != /usr/include ; then
        includes=-I${prefix}/include
      fi
      echo -I${exec_prefix}/lib/glib/include $includes  -I/usr/X11R6/include
      ;;
    --libs)
      echo -L${exec_prefix}/lib   -L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11  -lm
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done