pcre-config 2.4 KB

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