configure.in.tcl
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:7k
源码类别:

通讯编程

开发平台:

Visual C++

  1. dnl autoconf rules to find tcl
  2. dnl $Header: /cvsroot/nsnam/conf/configure.in.tcl,v 1.47 2008/02/21 05:16:04 tom_henderson Exp $ (LBL)
  3. AC_ARG_WITH(tcl, --with-tcl=path specify a pathname for tcl, d=$withval, d="")
  4. AC_ARG_WITH(tcl-ver, --with-tcl-ver=path specify the version of tcl/tk, TCL_VERS=$withval, TCL_VERS=8.4.18)
  5. dnl Truncate anything beyond and including the second decimal point
  6. TCL_HI_VERS=`echo $TCL_VERS | sed 's/^([[0-9]]*).([[0-9]]*).([[0-9]]*)/1.2/'`
  7. TCL_MAJOR_VERS=`echo $TCL_VERS | sed 's/^([[0-9]]*).([[0-9]]*).([[0-9]]*)/1/'`
  8. TCL_ALT_VERS=`echo $TCL_HI_VERS | sed 's/.//'`
  9. dnl work with one version in the past
  10. TCL_OLD_VERS=8.3
  11. TCL_OLD_ALT_VERS=`echo $TCL_OLD_VERS | sed 's/.//'`
  12. dnl These paths are pretty hellish and should probably be pruned.
  13. TCL_TCL_PLACES_D="$d 
  14. $d/lib/tcl$TCL_HI_VERS 
  15. $d/lib/tcl$TCL_VERS 
  16. $d/lib/tcl$TCL_ALT_VERS 
  17. $d/lib/tcl 
  18. $d/../lib/tcl$TCL_HI_VERS 
  19. $d/../lib/tcl$TCL_VERS 
  20. $d/../lib/tcl$TCL_ALT_VERS 
  21. $d/lib/tcl$TCL_OLD_VERS 
  22. $d/lib/tcl$TCL_OLD_ALT_VERS 
  23. $d/../lib/tcl$TCL_OLD_VERS 
  24. $d/../lib/tcl$TCL_OLD_ALT_VERS 
  25. $d/lib 
  26. /System/Library/Frameworks/Tcl.framework/Versions/8.4/Resources/Scripts 
  27. $d/library 
  28. "
  29. TCL_TCL_PLACES="../lib/tcl$TCL_HI_VERS 
  30. ../lib/tcl$TCL_ALT_VERS 
  31. ../lib/tcl$TCL_VERS 
  32. ../lib/tcl 
  33. ../tcl$TCL_HI_VERS/library 
  34. ../tcl$TCL_VERS/library 
  35.                 ../tcl$TCL_ALT_VERS/library 
  36. /usr/lib/tcl$TCL_VERS 
  37. /usr/lib/tcl$TCL_HI_VERS 
  38. /usr/lib/tcl$TCL_ALT_VERS 
  39. /usr/lib/tcl 
  40. /usr/share/tcl$TCL_VERS 
  41. /usr/share/tcl$TCL_HI_VERS 
  42. /usr/share/tcl$TCL_ALT_VERS 
  43. /usr/share/tcl 
  44. /lib/tcl$TCL_VERS 
  45. /lib/tcl$TCL_HI_VERS 
  46. /lib/tcl$TCL_ALT_VERS 
  47. /usr/lib/tcl$TCL_OLD_VERS 
  48. /usr/lib/tcl$TCL_OLD_ALT_VERS 
  49. /lib/tcl$TCL_OLD_VERS 
  50. /lib/tcl$TCL_OLD_ALT_VERS 
  51. /usr/lib 
  52.                 /usr/src/local/tcl$TCL_VERS/library 
  53.                 /usr/src/local/tcl$TCL_HI_VERS/library 
  54.                 /usr/src/local/tcl$TCL_ALT_VERS/library 
  55.                 /usr/local/lib/tcl$TCL_VERS 
  56.                 /usr/local/lib/tcl$TCL_HI_VERS 
  57.                 /usr/local/lib/tcl$TCL_ALT_VERS 
  58.                 /usr/local/include/tcl$TCL_VERS 
  59.                 /usr/local/include/tcl$TCL_HI_VERS 
  60.                 /usr/local/include/tcl$TCL_ALT_VERS 
  61. ../tcl$TCL_OLD_VERS/library 
  62.                 ../tcl$TCL_OLD_ALT_VERS/library 
  63.                 /usr/src/local/tcl$TCL_OLD_VERS/library 
  64.                 /usr/src/local/tcl$TCL_OLD_ALT_VERS/library 
  65.                 /usr/local/lib/tcl$TCL_OLD_VERS 
  66.                 /usr/local/lib/tcl$TCL_OLD_ALT_VERS 
  67.                 /usr/local/include/tcl$TCL_OLD_VERS 
  68.                 /usr/local/include/tcl$TCL_OLD_ALT_VERS 
  69.                 /usr/local/include 
  70.                 $prefix/include 
  71. $prefix/lib/tcl 
  72.                 $x_includes/tk 
  73.                 $x_includes 
  74.                 /usr/contrib/include 
  75.                 /usr/include"
  76. TCL_H_PLACES_D="$d/generic 
  77. $d/unix 
  78. $d/include/tcl$TCL_HI_VERS 
  79. $d/include/tcl$TCL_VERS 
  80. $d/include/tcl$TCL_ALT_VERS 
  81. $d/include 
  82. "
  83. TCL_H_PLACES=" 
  84. ../include 
  85. ../tcl$TCL_VERS/unix 
  86. ../tcl$TCL_ALT_VERS/unix 
  87. ../tcl$TCL_HI_VERS/generic 
  88. ../tcl$TCL_VERS/generic 
  89. ../tcl$TCL_ALT_VERS/generic 
  90. /usr/src/local/tcl$TCL_VERS/generic 
  91. /usr/src/local/tcl$TCL_HI_VERS/generic 
  92. /usr/src/local/tcl$TCL_ALT_VERS/generic 
  93. /usr/src/local/tcl$TCL_VERS/unix 
  94. /usr/src/local/tcl$TCL_HI_VERS/unix 
  95. /usr/src/local/tcl$TCL_ALT_VERS/unix 
  96. /usr/contrib/include 
  97. /usr/local/lib/tcl$TCL_VERS 
  98. /usr/local/lib/tcl$TCL_HI_VERS 
  99. /usr/local/lib/tcl$TCL_ALT_VERS 
  100. /usr/local/include/tcl$TCL_VERS 
  101. /usr/local/include/tcl$TCL_HI_VERS 
  102. /usr/local/include/tcl$TCL_ALT_VERS 
  103. /usr/local/include 
  104. /import/tcl/include/tcl$TCL_VERS 
  105. /import/tcl/include/tcl$TCL_HI_VERS 
  106. /import/tcl/include/tcl$TCL_ALT_VERS 
  107. ../tcl$TCL_OLD_VERS/generic 
  108. ../tcl$TCL_OLD_ALT_VERS/generic 
  109. /usr/src/local/tcl$TCL_OLD_VERS/generic 
  110. /usr/src/local/tcl$TCL_OLD_ALT_VERS/generic 
  111. ../tcl$TCL_OLD_VERS/unix 
  112. ../tcl$TCL_OLD_ALT_VERS/unix 
  113. /usr/src/local/tcl$TCL_OLD_VERS/unix 
  114. /usr/src/local/tcl$TCL_OLD_ALT_VERS/unix 
  115. /usr/local/lib/tcl$TCL_OLD_VERS 
  116. /usr/local/lib/tcl$TCL_OLD_ALT_VERS 
  117. /usr/local/include/tcl$TCL_OLD_VERS 
  118. /usr/local/include/tcl$TCL_OLD_ALT_VERS 
  119. /import/tcl/include/tcl$TCL_OLD_VERS 
  120. /import/tcl/include/tcl$TCL_OLD_ALT_VERS 
  121. $prefix/include 
  122. $x_includes/tk 
  123. $x_includes 
  124. /usr/include 
  125. /usr/include/tcl$TCL_VERS 
  126. /usr/include/tcl$TCL_HI_VERS 
  127. /usr/include/tcl$TCL_ALT_VERS 
  128. /usr/include/tcl"
  129. dnl /usr/include/tcl is for Debian Linux
  130. TCL_LIB_PLACES_D="$d 
  131. $d/lib 
  132. $d/unix"
  133. TCL_LIB_PLACES=" 
  134. ../lib 
  135. ../tcl$TCL_VERS/unix 
  136. ../tcl$TCL_HI_VERS/unix 
  137.                 ../tcl$TCL_ALT_VERS/unix 
  138.                 /usr/src/local/tcl$TCL_VERS/unix 
  139.                 /usr/src/local/tcl$TCL_HI_VERS/unix 
  140.                 /usr/src/local/tcl$TCL_ALT_VERS/unix 
  141.                 /usr/contrib/lib 
  142.                 /usr/local/lib/tcl$TCL_VERS 
  143.                 /usr/local/lib/tcl$TCL_HI_VERS 
  144.                 /usr/local/lib/tcl$TCL_ALT_VERS 
  145. /usr/lib/tcl$TCL_VERS 
  146. /usr/lib/tcl$TCL_HI_VERS 
  147. /usr/lib/tcl$TCL_ALT_VERS 
  148. ../tcl$TCL_OLD_VERS/unix 
  149.                 ../tcl$TCL_OLD_ALT_VERS/unix 
  150.                 /usr/src/local/tcl$TCL_OLD_VERS/unix 
  151.                 /usr/src/local/tcl$TCL_OLD_ALT_VERS/unix 
  152.                 /usr/local/lib/tcl$TCL_OLD_VERS 
  153.                 /usr/local/lib/tcl$TCL_OLD_ALT_VERS 
  154. /usr/lib/tcl$TCL_OLD_VERS 
  155. /usr/lib/tcl$TCL_OLD_ALT_VERS 
  156.                 /usr/local/lib 
  157.                 $prefix/lib 
  158.                 $x_libs/tk 
  159.                 $x_libs 
  160.                 /usr/lib 
  161. "
  162. dnl Decide which set of .tcl library files to use
  163. dnl XXX: this is a hack
  164. V_TCL_LIBRARY_FILES="$(TCL_`echo $TCL_ALT_VERS`_LIBRARY_FILES)"
  165. dnl Next line is horrible hack for 8.3.5 and the http2.4/http.tcl dir (diff from al lother 8.3.x dirs).  They finally ditch the separate http version in 8.4, thank goodness.  -johnh
  166. test "x$TCL_VERS" = x8.3.5 && V_TCL_LIBRARY_FILES="$(TCL_835_LIBRARY_FILES)"
  167. AC_SUBST(V_TCL_LIBRARY_FILES)
  168. NS_BEGIN_PACKAGE(tcl)
  169. NS_CHECK_HEADER_PATH(tcl.h,$TCL_H_PLACES,$d,$TCL_H_PLACES_D,V_INCLUDE_TCL,tcl)
  170. NS_CHECK_LIB_PATH(tcl$TCL_HI_VERS,$TCL_LIB_PLACES,$d,$TCL_LIB_PLACES_D,V_LIB_TCL,tcl)
  171. NS_CHECK_ANY_PATH(init.tcl,$TCL_TCL_PLACES,$d,$TCL_TCL_PLACES_D,V_LIBRARY_TCL,tcl)
  172. #
  173. # check for tclsh
  174. #
  175. oldpath=$PATH
  176. # $d/unix works if $d is the 8.0 distribution
  177. # $d/bin is for the ns-allinone distribution (kind of hacky, isn't it?)
  178. PATH=../bin:../tcl$TCL_HI_VERS/unix:../tcl$TCL_VERS/unix:$d/unix:$d/bin:$PATH
  179. AC_PATH_PROGS(V_TCLSH,tclsh$TCL_VERS tclsh$TCL_HI_VERS tclsh tclsh$TCL_OLD_VERS,no)
  180. if test x"$V_TCLSH" = xno
  181. then
  182. # out of luck
  183. NS_PACKAGE_NOT_COMPLETE(tcl)
  184. fi
  185. # absolutize it
  186. V_TCLSH=`absolutize $V_TCLSH`
  187. PATH=$oldpath
  188. NS_END_PACKAGE(tcl,yes)
  189. AC_SUBST(V_LIBRARY_TCL)