Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

caca-config.in 1.6 KiB

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