logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

sdl-config (1349B)


  1. #!/bin/sh
  2. prefix=@prefix@
  3. exec_prefix=${prefix}
  4. exec_prefix_set=no
  5. libdir=@libdir@
  6. usage="\
  7. Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
  8. #usage="\
  9. #Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
  10. if test $# -eq 0; then
  11. echo "${usage}" 1>&2
  12. exit 1
  13. fi
  14. while test $# -gt 0; do
  15. case "$1" in
  16. -*=*) optarg=`echo "$1" | LC_ALL="C" sed 's/[-_a-zA-Z0-9]*=//'` ;;
  17. *) optarg= ;;
  18. esac
  19. case $1 in
  20. --prefix=*)
  21. prefix=$optarg
  22. if test $exec_prefix_set = no ; then
  23. exec_prefix=$optarg
  24. fi
  25. ;;
  26. --prefix)
  27. echo $prefix
  28. ;;
  29. --exec-prefix=*)
  30. exec_prefix=$optarg
  31. exec_prefix_set=yes
  32. ;;
  33. --exec-prefix)
  34. echo $exec_prefix
  35. ;;
  36. --version)
  37. echo 1.2.99
  38. ;;
  39. --cflags)
  40. echo -I${prefix}/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
  41. ;;
  42. --libs)
  43. if test x"${prefix}" != x"/usr" ; then
  44. libdirs="-L/usr/lib64"
  45. else
  46. libdirs=""
  47. fi
  48. echo $libdirs -lSDL -lpthread
  49. ;;
  50. # --static-libs)
  51. ## --libs|--static-libs)
  52. # echo -L/usr/lib64 -lSDL -lpthread -lm -ldl -lasound -lm -ldl -lpthread -lpthread
  53. # ;;
  54. *)
  55. echo "${usage}" 1>&2
  56. exit 1
  57. ;;
  58. esac
  59. shift
  60. done