home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / base / 04_xap_libs.mo / usr / bin / imlib-config < prev    next >
Encoding:
Text File  |  2005-02-02  |  1.6 KB  |  77 lines

  1. #!/bin/sh
  2. #
  3. # Shamelessly ripped form gtk's gtk-config.in
  4. #
  5.  
  6. gx_libs=" -ljpeg -ltiff -lungif -lpng -lz -lm"
  7. gdk_gx_libs=" "
  8. gdk_libs=""
  9.  
  10. prefix=/usr
  11. exec_prefix=${prefix}
  12. exec_prefix_set=no
  13.  
  14. usage="\
  15. Usage: imlib-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--libs-gdk] [--cflags] [--cflags-gdk]"
  16.  
  17. if test $# -eq 0; then
  18.       echo "${usage}" 1>&2
  19.       exit 1
  20. fi
  21.  
  22. while test $# -gt 0; do
  23.   case "$1" in
  24.   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  25.   *) optarg= ;;
  26.   esac
  27.  
  28.   case $1 in
  29.     --prefix=*)
  30.       prefix=$optarg
  31.       if test $exec_prefix_set = no ; then
  32.         exec_prefix=$optarg
  33.       fi
  34.       ;;
  35.     --prefix)
  36.       echo $prefix
  37.       ;;
  38.     --exec-prefix=*)
  39.       exec_prefix=$optarg
  40.       exec_prefix_set=yes
  41.       ;;
  42.     --exec-prefix)
  43.       echo $exec_prefix
  44.       ;;
  45.     --version)
  46.       echo 1.9.15
  47.       ;;
  48.     --cflags)
  49.       if test ${prefix}/include != /usr/include ; then
  50.         includes=-I${prefix}/include
  51.       fi
  52.       echo $includes  -I/usr/X11R6/include 
  53.       ;;
  54.     --cflags-gdk)
  55.       if test ${prefix}/include != /usr/include ; then
  56.         includes=-I${prefix}/include
  57.       fi
  58.       echo `/usr/bin/gtk-config --cflags` $includes  -I/usr/X11R6/include
  59.       ;;
  60.     --libs)
  61.       libdirs=-L${exec_prefix}/lib
  62.       echo $libdirs -lImlib  $gx_libs -lXext  -L/usr/X11R6/lib  -lSM -lICE -lXext -lX11 
  63.       ;;
  64.     --libs-gdk)
  65.       libdirs=-L${exec_prefix}/lib
  66.       echo $libdirs -lgdk_imlib$gdk_gx_libs `/usr/bin/gtk-config --libs` $gdk_libs
  67.       ;;
  68.     *)
  69.       echo "${usage}" 1>&2
  70.       exit 1
  71.       ;;
  72.   esac
  73.   shift
  74. done
  75.  
  76. exit 0
  77.