25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

124 satır
1.9 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. @USE_SLANG_TRUE@libs_slang="-lslang"
  9. @USE_NCURSES_TRUE@libs_ncurses="-lncurses"
  10. libs="$libs_slang $libs_ncurses"
  11. usage()
  12. {
  13. cat <<EOF
  14. Usage: caca-config [OPTIONS] [LIBRARIES]
  15. Options:
  16. [--prefix[=DIR]]
  17. [--exec-prefix[=DIR]]
  18. [--version]
  19. [--libs]
  20. [--plugin-libs]
  21. [--ldflags]
  22. [--cflags]
  23. EOF
  24. exit $1
  25. }
  26. if test $# -eq 0
  27. then
  28. usage 1 1>&2
  29. fi
  30. while test $# -gt 0
  31. do
  32. case "$1" in
  33. -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  34. *) optarg= ;;
  35. esac
  36. case $1 in
  37. --prefix=*)
  38. prefix=$optarg
  39. local_prefix=yes
  40. ;;
  41. --prefix)
  42. echo_prefix=yes
  43. ;;
  44. --exec-prefix=*)
  45. exec_prefix=$optarg
  46. exec_prefix_set=yes
  47. local_prefix=yes
  48. ;;
  49. --exec-prefix)
  50. echo_exec_prefix=yes
  51. ;;
  52. --version)
  53. echo @VERSION@
  54. exit 0
  55. ;;
  56. --cflags)
  57. echo_cflags=yes
  58. ;;
  59. --ldflags)
  60. echo_ldflags=yes
  61. ;;
  62. @NEED_PIC_TRUE@ --libs)
  63. @NEED_PIC_FALSE@ --libs | --plugin-libs)
  64. echo_libs=yes
  65. ;;
  66. @NEED_PIC_TRUE@ --plugin-libs)
  67. @NEED_PIC_TRUE@ echo_plugin_libs=yes
  68. @NEED_PIC_TRUE@ ;;
  69. *)
  70. usage 1 1>&2
  71. ;;
  72. esac
  73. shift
  74. done
  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@ -lcaca $libs
  103. fi
  104. @NEED_PIC_TRUE@if test "$echo_plugin_libs" = "yes"
  105. @NEED_PIC_TRUE@then
  106. @NEED_PIC_TRUE@ echo -L@libdir@ -lcaca_pic $libs
  107. @NEED_PIC_TRUE@fi