Advertisement
Guest User

fake-pkg-config

a guest
Oct 8th, 2012
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.62 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. prefix=/usr/local
  4. exec_prefix=${prefix}
  5. exec_prefix_set=no
  6. libdir=${exec_prefix}/lib
  7.  
  8. usage="\
  9. Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
  10.  
  11. if test $# -eq 0; then
  12.       echo "${usage}" 1>&2
  13.       exit 1
  14. fi
  15.  
  16. while test $# -gt 0; do
  17.   case "$1" in
  18.   -*=*) optarg=`echo "$1" | LC_ALL="C" sed 's/[-_a-zA-Z0-9]*=//'` ;;
  19.   *) optarg= ;;
  20.   esac
  21.  
  22.   case $1 in
  23.     --prefix=*)
  24.       prefix=$optarg
  25.       if test $exec_prefix_set = no ; then
  26.         exec_prefix=$optarg
  27.       fi
  28.       ;;
  29.     --prefix)
  30.       echo $prefix
  31.       ;;
  32.     --exec-prefix=*)
  33.       exec_prefix=$optarg
  34.       exec_prefix_set=yes
  35.       ;;
  36.     --exec-prefix)
  37.       echo $exec_prefix
  38.       ;;
  39.     --version)
  40.       echo 2.2.2
  41.       ;;
  42.     --exists)
  43.       ;;
  44.     --cflags)
  45. #      echo -I${prefix}/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
  46.       case $2 in
  47.       glib-2.0*)
  48.         echo -I${prefix}/include -I${prefix}/include/glib-2.0
  49.         shift
  50.         ;;
  51.       libxml-2*)
  52.         echo -I${prefix}/include/libxml2
  53.         shift
  54.         ;;
  55.       *)
  56.         ;;
  57.       esac
  58.       ;;
  59.     --libs)
  60.       case $2 in
  61.       glib-2.0*)
  62.         echo -L${exec_prefix}/lib  -lglib-2.0  -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0
  63.         shift
  64.         ;;
  65.       libxml-2*)
  66.         echo -L${exec_prefix}/lib -lxml2
  67.         shift
  68.         ;;
  69.       *)
  70.         ;;
  71.       esac
  72.       ;;
  73.     --static-libs)
  74. #    --libs|--static-libs)
  75.       echo -L${exec_prefix}/lib  -lSDL
  76.       ;;
  77.     *)
  78.       #echo "${usage}" 1>&2
  79.       #exit 1
  80.       ;;
  81.   esac
  82.   shift
  83. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement