PageRenderTime 2434ms CodeModel.GetById 34ms RepoModel.GetById 2ms app.codeStats 0ms

/misc/ncurses-config.in

https://github.com/OMFGB/external_libncurses
Autoconf | 161 lines | 112 code | 12 blank | 37 comment | 6 complexity | 711154a9bf9075fe06d19629c30458b0 MD5 | raw file
  1. #!@SHELL@
  2. # $Id: ncurses-config.in,v 1.12 2007/03/17 20:02:19 tom Exp $
  3. ##############################################################################
  4. # Copyright (c) 2006,2007 Free Software Foundation, Inc. #
  5. # #
  6. # Permission is hereby granted, free of charge, to any person obtaining a #
  7. # copy of this software and associated documentation files (the "Software"), #
  8. # to deal in the Software without restriction, including without limitation #
  9. # the rights to use, copy, modify, merge, publish, distribute, distribute #
  10. # with modifications, sublicense, and/or sell copies of the Software, and to #
  11. # permit persons to whom the Software is furnished to do so, subject to the #
  12. # following conditions: #
  13. # #
  14. # The above copyright notice and this permission notice shall be included in #
  15. # all copies or substantial portions of the Software. #
  16. # #
  17. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
  18. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
  19. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
  20. # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
  21. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
  22. # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
  23. # DEALINGS IN THE SOFTWARE. #
  24. # #
  25. # Except as contained in this notice, the name(s) of the above copyright #
  26. # holders shall not be used in advertising or otherwise to promote the sale, #
  27. # use or other dealings in this Software without prior written #
  28. # authorization. #
  29. ##############################################################################
  30. #
  31. # Author: Thomas E. Dickey, 2006
  32. prefix="@prefix@"
  33. exec_prefix="@exec_prefix@"
  34. bindir="@bindir@"
  35. libdir="@libdir@"
  36. datadir="@datadir@"
  37. mandir="@mandir@"
  38. THIS="ncurses@DFT_ARG_SUFFIX@"
  39. LANG=C; export LANG
  40. LANGUAGE=C; export LANGUAGE
  41. LC_ALL=C; export LC_ALL
  42. LC_CTYPE=C; export LC_CTYPE
  43. test $# = 0 && exec @SHELL@ $0 --error
  44. while test $# -gt 0; do
  45. case "$1" in
  46. -*=*)
  47. ARG=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
  48. ;;
  49. *)
  50. ARG=
  51. ;;
  52. esac
  53. case "$1" in
  54. # basic configuration
  55. --prefix=*)
  56. prefix="$ARG"
  57. test -z "$exec_prefix" && exec_prefix="$ARG"
  58. ;;
  59. --prefix)
  60. echo "$prefix"
  61. ;;
  62. --exec-prefix=*)
  63. exec_prefix="$ARG"
  64. ;;
  65. --exec-prefix)
  66. echo "$exec_prefix"
  67. ;;
  68. # compile/link
  69. --cflags)
  70. INCS=
  71. if test "${prefix}/include" != /usr/include ; then
  72. INCS="-I${prefix}/include"
  73. fi
  74. if test "@WITH_OVERWRITE@" != no ; then
  75. INCS="$INCS -I${prefix}/include/${THIS}"
  76. fi
  77. sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
  78. $INCS
  79. ENDECHO
  80. ;;
  81. --libs)
  82. sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
  83. -L${exec_prefix}/lib @EXTRA_LDFLAGS@ -l${THIS} @LIBS@
  84. ENDECHO
  85. ;;
  86. # identification
  87. --version)
  88. echo "@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@"
  89. ;;
  90. --abi-version)
  91. echo "@cf_cv_abi_version@"
  92. ;;
  93. --mouse-version)
  94. echo "@NCURSES_MOUSE_VERSION@"
  95. ;;
  96. # locations
  97. --bindir)
  98. echo "${bindir}"
  99. ;;
  100. --datadir)
  101. echo "${datadir}"
  102. ;;
  103. --libdir)
  104. echo "${libdir}"
  105. ;;
  106. --mandir)
  107. echo "${mandir}"
  108. ;;
  109. --terminfo)
  110. echo "@TERMINFO@"
  111. ;;
  112. --terminfo-dirs)
  113. echo "@TERMINFO_DIRS@"
  114. ;;
  115. --termpath)
  116. echo "@TERMPATH@"
  117. ;;
  118. # general info
  119. --help)
  120. cat <<ENDHELP
  121. Usage: ${THIS}-config [options]
  122. Options:
  123. --prefix echos the package-prefix of ${THIS}
  124. --prefix=ARG sets the package-prefix of ${THIS}
  125. --exec-prefix echos the executable-prefix of ${THIS}
  126. --exec-prefix=ARG sets the executable-prefix of ${THIS}
  127. --cflags echos the C compiler flags needed to compile with ${THIS}
  128. --libs echos the libraries needed to link with ${THIS}
  129. --version echos the release+patchdate version of ${THIS}
  130. --abi-version echos the ABI version of ${THIS}
  131. --mouse-version echos the mouse-interface version of ${THIS}
  132. --bindir echos the directory containing ${THIS} programs
  133. --datadir echos the directory containing ${THIS} data
  134. --libdir echos the directory containing ${THIS} libraries
  135. --mandir echos the directory containing ${THIS} manpages
  136. --terminfo echos the \$TERMINFO terminfo database path
  137. --terminfo-dirs echos the \$TERMINFO_DIRS directory list
  138. --termpath echos the \$TERMPATH termcap list
  139. --help prints this message
  140. ENDHELP
  141. ;;
  142. --error|*)
  143. @SHELL@ $0 --help 1>&2
  144. exit 1
  145. ;;
  146. esac
  147. shift
  148. done
  149. # vile:shmode