pcre2-config 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #!/bin/sh
  2. prefix=/tmp/build/80754af9/pcre2_1641403744153/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol
  3. exec_prefix=${prefix}
  4. exec_prefix_set=no
  5. cflags="[--cflags]"
  6. libs=
  7. if test yes = yes ; then
  8. libs="[--libs16] $libs"
  9. fi
  10. if test yes = yes ; then
  11. libs="[--libs32] $libs"
  12. fi
  13. if test yes = yes ; then
  14. libs="[--libs8] [--libs-posix] $libs"
  15. cflags="$cflags [--cflags-posix]"
  16. fi
  17. usage="Usage: pcre2-config [--prefix] [--exec-prefix] [--version] $libs $cflags"
  18. if test $# -eq 0; then
  19. echo "${usage}" 1>&2
  20. exit 1
  21. fi
  22. libR=
  23. case `uname -s` in
  24. *SunOS*)
  25. libR=" -R${exec_prefix}/lib"
  26. ;;
  27. *BSD*)
  28. libR=" -Wl,-R${exec_prefix}/lib"
  29. ;;
  30. esac
  31. libS=
  32. if test ${exec_prefix}/lib != /usr/lib ; then
  33. libS=-L${exec_prefix}/lib
  34. fi
  35. while test $# -gt 0; do
  36. case "$1" in
  37. -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  38. *) optarg= ;;
  39. esac
  40. case $1 in
  41. --prefix=*)
  42. prefix=$optarg
  43. if test $exec_prefix_set = no ; then
  44. exec_prefix=$optarg
  45. fi
  46. ;;
  47. --prefix)
  48. echo $prefix
  49. ;;
  50. --exec-prefix=*)
  51. exec_prefix=$optarg
  52. exec_prefix_set=yes
  53. ;;
  54. --exec-prefix)
  55. echo $exec_prefix
  56. ;;
  57. --version)
  58. echo 10.37
  59. ;;
  60. --cflags)
  61. if test ${prefix}/include != /usr/include ; then
  62. includes=-I${prefix}/include
  63. fi
  64. echo $includes
  65. ;;
  66. --cflags-posix)
  67. if test yes = yes ; then
  68. if test ${prefix}/include != /usr/include ; then
  69. includes=-I${prefix}/include
  70. fi
  71. echo $includes
  72. else
  73. echo "${usage}" 1>&2
  74. fi
  75. ;;
  76. --libs-posix)
  77. if test yes = yes ; then
  78. echo $libS$libR -lpcre2-posix -lpcre2-8
  79. else
  80. echo "${usage}" 1>&2
  81. fi
  82. ;;
  83. --libs8)
  84. if test yes = yes ; then
  85. echo $libS$libR -lpcre2-8
  86. else
  87. echo "${usage}" 1>&2
  88. fi
  89. ;;
  90. --libs16)
  91. if test yes = yes ; then
  92. echo $libS$libR -lpcre2-16
  93. else
  94. echo "${usage}" 1>&2
  95. fi
  96. ;;
  97. --libs32)
  98. if test yes = yes ; then
  99. echo $libS$libR -lpcre2-32
  100. else
  101. echo "${usage}" 1>&2
  102. fi
  103. ;;
  104. *)
  105. echo "${usage}" 1>&2
  106. exit 1
  107. ;;
  108. esac
  109. shift
  110. done