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.
 
 
 
 
 
 

124 line
1.7 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. [--plugin-libs]
  18. [--ldflags]
  19. [--cflags]
  20. EOF
  21. exit $1
  22. }
  23. libs=""
  24. if test $# -eq 0
  25. then
  26. usage 1 1>&2
  27. fi
  28. while test $# -gt 0
  29. do
  30. case "$1" in
  31. -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  32. *) optarg= ;;
  33. esac
  34. case $1 in
  35. --prefix=*)
  36. prefix=$optarg
  37. local_prefix=yes
  38. ;;
  39. --prefix)
  40. echo_prefix=yes
  41. ;;
  42. --exec-prefix=*)
  43. exec_prefix=$optarg
  44. exec_prefix_set=yes
  45. local_prefix=yes
  46. ;;
  47. --exec-prefix)
  48. echo_exec_prefix=yes
  49. ;;
  50. --version)
  51. echo @VERSION@
  52. exit 0
  53. ;;
  54. --cflags)
  55. echo_cflags=yes
  56. ;;
  57. --ldflags)
  58. echo_ldflags=yes
  59. ;;
  60. --libs | --plugin-libs)
  61. echo_libs=yes
  62. ;;
  63. cucul)
  64. libs="$libs -lcucul"
  65. ;;
  66. caca)
  67. libs="$libs -lcaca @CACA_LIBS@ -lcucul"
  68. ;;
  69. *)
  70. usage 1 1>&2
  71. ;;
  72. esac
  73. shift
  74. done
  75. if test "$libs" = ""
  76. then
  77. libs="-lcaca @CACA_LIBS@ -lcucul"
  78. fi
  79. if test "$local_prefix" = "yes"
  80. then
  81. if test "$exec_prefix_set" != "yes"
  82. then
  83. exec_prefix=$prefix
  84. fi
  85. fi
  86. if test "$echo_prefix" = "yes"
  87. then
  88. echo $prefix
  89. fi
  90. if test "$echo_exec_prefix" = "yes"
  91. then
  92. echo $exec_prefix
  93. fi
  94. if test "$echo_cflags" = "yes"
  95. then
  96. cflags="-I$include_dir/"
  97. echo $cflags
  98. fi
  99. if test "$echo_ldflags" = "yes"
  100. then
  101. ldflags="-L$lib_dir"
  102. echo $ldflags
  103. fi
  104. if test "$echo_libs" = "yes"
  105. then
  106. echo -L@libdir@ $libs
  107. fi