pcre-config.in 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/bin/sh
  2. prefix=@prefix@
  3. exec_prefix=@exec_prefix@
  4. exec_prefix_set=no
  5. usage="\
  6. Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]"
  7. if test $# -eq 0; then
  8. echo "${usage}" 1>&2
  9. exit 1
  10. fi
  11. while test $# -gt 0; do
  12. case "$1" in
  13. -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  14. *) optarg= ;;
  15. esac
  16. case $1 in
  17. --prefix=*)
  18. prefix=$optarg
  19. if test $exec_prefix_set = no ; then
  20. exec_prefix=$optarg
  21. fi
  22. ;;
  23. --prefix)
  24. echo $prefix
  25. ;;
  26. --exec-prefix=*)
  27. exec_prefix=$optarg
  28. exec_prefix_set=yes
  29. ;;
  30. --exec-prefix)
  31. echo $exec_prefix
  32. ;;
  33. --version)
  34. echo @PCRE_VERSION@
  35. ;;
  36. --cflags | --cflags-posix)
  37. if test @includedir@ != /usr/include ; then
  38. includes=-I@includedir@
  39. fi
  40. echo $includes
  41. ;;
  42. --libs-posix)
  43. echo -L@libdir@ -lpcreposix -lpcre
  44. ;;
  45. --libs)
  46. echo -L@libdir@ -lpcre
  47. ;;
  48. *)
  49. echo "${usage}" 1>&2
  50. exit 1
  51. ;;
  52. esac
  53. shift
  54. done