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.
 
 
 
 
 
 

111 lines
1.5 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. 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. *)
  63. usage 1 1>&2
  64. ;;
  65. esac
  66. shift
  67. done
  68. if test "$local_prefix" = "yes"
  69. then
  70. if test "$exec_prefix_set" != "yes"
  71. then
  72. exec_prefix=$prefix
  73. fi
  74. fi
  75. if test "$echo_prefix" = "yes"
  76. then
  77. echo $prefix
  78. fi
  79. if test "$echo_exec_prefix" = "yes"
  80. then
  81. echo $exec_prefix
  82. fi
  83. if test "$echo_cflags" = "yes"
  84. then
  85. cflags="-I$include_dir/"
  86. echo $cflags
  87. fi
  88. if test "$echo_ldflags" = "yes"
  89. then
  90. ldflags="-L$lib_dir"
  91. echo $ldflags
  92. fi
  93. if test "$echo_libs" = "yes"
  94. then
  95. echo -L@libdir@ -lcucul -lcaca @CUCUL_LIBS@ @CACA_LIBS@
  96. fi