github的一些开源项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
2.3 KiB

  1. #!/bin/sh
  2. prefix=@prefix@
  3. exec_prefix=@exec_prefix@
  4. exec_prefix_set=no
  5. cflags="[--cflags]"
  6. libs=
  7. if test @enable_pcre2_16@ = yes ; then
  8. libs="[--libs16] $libs"
  9. fi
  10. if test @enable_pcre2_32@ = yes ; then
  11. libs="[--libs32] $libs"
  12. fi
  13. if test @enable_pcre2_8@ = 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@libdir@"
  26. ;;
  27. *BSD*)
  28. libR=" -Wl,-R@libdir@"
  29. ;;
  30. esac
  31. libS=
  32. if test @libdir@ != /usr/lib ; then
  33. libS=-L@libdir@
  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 @PACKAGE_VERSION@
  59. ;;
  60. --cflags)
  61. if test @includedir@ != /usr/include ; then
  62. includes=-I@includedir@
  63. fi
  64. echo $includes @PCRE2_STATIC_CFLAG@
  65. ;;
  66. --cflags-posix)
  67. if test @enable_pcre2_8@ = yes ; then
  68. if test @includedir@ != /usr/include ; then
  69. includes=-I@includedir@
  70. fi
  71. echo $includes @PCRE2POSIX_CFLAG@
  72. else
  73. echo "${usage}" 1>&2
  74. fi
  75. ;;
  76. --libs-posix)
  77. if test @enable_pcre2_8@ = yes ; then
  78. echo $libS$libR -lpcre2-posix@LIB_POSTFIX@ -lpcre2-8@LIB_POSTFIX@
  79. else
  80. echo "${usage}" 1>&2
  81. fi
  82. ;;
  83. --libs8)
  84. if test @enable_pcre2_8@ = yes ; then
  85. echo $libS$libR -lpcre2-8@LIB_POSTFIX@
  86. else
  87. echo "${usage}" 1>&2
  88. fi
  89. ;;
  90. --libs16)
  91. if test @enable_pcre2_16@ = yes ; then
  92. echo $libS$libR -lpcre2-16@LIB_POSTFIX@
  93. else
  94. echo "${usage}" 1>&2
  95. fi
  96. ;;
  97. --libs32)
  98. if test @enable_pcre2_32@ = yes ; then
  99. echo $libS$libR -lpcre2-32@LIB_POSTFIX@
  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