您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

120 行
1.6 KiB

  1. #! /bin/sh
  2. ## config script for libcaca -- Sam Hocevar <sam@zoy.org>
  3. ## $Id$
  4. prefix=@prefix@
  5. exec_prefix=@exec_prefix@
  6. lib_dir=@libdir@
  7. include_dir=@includedir@
  8. usage()
  9. {
  10. cat <<EOF
  11. Usage: caca-config [OPTIONS] [LIBRARIES]
  12. Options:
  13. [--prefix[=DIR]]
  14. [--exec-prefix[=DIR]]
  15. [--version]
  16. [--libs]
  17. [--ldflags]
  18. [--cflags]
  19. EOF
  20. exit $1
  21. }
  22. libs=""
  23. if test $# -eq 0
  24. then
  25. usage 1 1>&2
  26. fi
  27. while test $# -gt 0
  28. do
  29. case "$1" in
  30. -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  31. *) optarg= ;;
  32. esac
  33. case $1 in
  34. --prefix=*)
  35. prefix=$optarg
  36. local_prefix=yes
  37. ;;
  38. --prefix)
  39. echo_prefix=yes
  40. ;;
  41. --exec-prefix=*)
  42. exec_prefix=$optarg
  43. exec_prefix_set=yes
  44. local_prefix=yes
  45. ;;
  46. --exec-prefix)
  47. echo_exec_prefix=yes
  48. ;;
  49. --version)
  50. echo @VERSION@
  51. exit 0
  52. ;;
  53. --cflags)
  54. echo_cflags=yes
  55. ;;
  56. --ldflags)
  57. echo_ldflags=yes
  58. ;;
  59. --libs | --plugin-libs)
  60. echo_libs=yes
  61. ;;
  62. caca)
  63. libs="$libs -lcaca"
  64. ;;
  65. *)
  66. usage 1 1>&2
  67. ;;
  68. esac
  69. shift
  70. done
  71. if test "$libs" = ""
  72. then
  73. libs="-lcaca"
  74. fi
  75. if test "$local_prefix" = "yes"
  76. then
  77. if test "$exec_prefix_set" != "yes"
  78. then
  79. exec_prefix=$prefix
  80. fi
  81. fi
  82. if test "$echo_prefix" = "yes"
  83. then
  84. echo $prefix
  85. fi
  86. if test "$echo_exec_prefix" = "yes"
  87. then
  88. echo $exec_prefix
  89. fi
  90. if test "$echo_cflags" = "yes"
  91. then
  92. cflags="-I$include_dir/"
  93. echo $cflags
  94. fi
  95. if test "$echo_ldflags" = "yes"
  96. then
  97. ldflags="-L$lib_dir"
  98. echo $ldflags
  99. fi
  100. if test "$echo_libs" = "yes"
  101. then
  102. echo -L@libdir@ $libs
  103. fi