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

通讯编程

开发平台:

Visual C++

  1. dnl autoconf rules to find tcl
  2. dnl $Header: /cvsroot/otcl-tclcl/conf/configure.in.tcl,v 1.46 2007/02/18 22:16:52 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.5
  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. /usr/local/lib/tcl$TCL_HI_VERS 
  26. /usr/local/lib/tcl$TCL_VERS 
  27. /usr/local/lib/tcl$TCL_ALT_VERS 
  28. $d/lib 
  29. $d/library 
  30. "
  31. TCL_TCL_PLACES="../lib/tcl$TCL_HI_VERS 
  32. ../lib/tcl$TCL_ALT_VERS 
  33. ../lib/tcl$TCL_VERS 
  34. ../lib/tcl 
  35. ../tcl$TCL_HI_VERS/library 
  36. ../tcl$TCL_VERS/library 
  37.                 ../tcl$TCL_ALT_VERS/library 
  38. /usr/lib/tcl$TCL_VERS 
  39. /usr/lib/tcl$TCL_HI_VERS 
  40. /usr/lib/tcl$TCL_ALT_VERS 
  41. /usr/lib/tcl 
  42. /usr/share/tcl$TCL_VERS 
  43. /usr/share/tcl$TCL_HI_VERS 
  44. /usr/share/tcl$TCL_ALT_VERS 
  45. /usr/local/src/tcl$TCL_VERS 
  46. /usr/local/src/tcl$TCL_HI_VERS 
  47. /usr/local/src/tcl$TCL_ALT_VERS 
  48. /usr/share/tcl 
  49. /lib/tcl$TCL_VERS 
  50. /lib/tcl$TCL_HI_VERS 
  51. /lib/tcl$TCL_ALT_VERS 
  52. /usr/lib/tcl$TCL_OLD_VERS 
  53. /usr/lib/tcl$TCL_OLD_ALT_VERS 
  54. /lib/tcl$TCL_OLD_VERS 
  55. /lib/tcl$TCL_OLD_ALT_VERS 
  56. /usr/lib 
  57.                 /usr/src/local/tcl$TCL_VERS/library 
  58.                 /usr/src/local/tcl$TCL_HI_VERS/library 
  59.                 /usr/src/local/tcl$TCL_ALT_VERS/library 
  60.                 /usr/local/lib/tcl$TCL_VERS 
  61.                 /usr/local/lib/tcl$TCL_HI_VERS 
  62.                 /usr/local/lib/tcl$TCL_ALT_VERS 
  63.                 /usr/local/include/tcl$TCL_VERS 
  64.                 /usr/local/include/tcl$TCL_HI_VERS 
  65.                 /usr/local/include/tcl$TCL_ALT_VERS 
  66. ../tcl$TCL_OLD_VERS/library 
  67.                 ../tcl$TCL_OLD_ALT_VERS/library 
  68.                 /usr/src/local/tcl$TCL_OLD_VERS/library 
  69.                 /usr/src/local/tcl$TCL_OLD_ALT_VERS/library 
  70.                 /usr/local/lib/tcl$TCL_OLD_VERS 
  71.                 /usr/local/lib/tcl$TCL_OLD_ALT_VERS 
  72.                 /usr/local/include/tcl$TCL_OLD_VERS 
  73.                 /usr/local/include/tcl$TCL_OLD_ALT_VERS 
  74.                 /usr/local/include 
  75.                 $prefix/include 
  76. $prefix/lib/tcl 
  77.                 $x_includes/tk 
  78.                 $x_includes 
  79.                 /usr/contrib/include 
  80.                 /usr/include"
  81. TCL_H_PLACES_D="$d/generic 
  82. $d/unix 
  83. $d/include/tcl$TCL_HI_VERS 
  84. $d/include/tcl$TCL_VERS 
  85. $d/include/tcl$TCL_ALT_VERS 
  86. $d/include 
  87. /usr/local/include  
  88. "
  89. TCL_H_PLACES=" 
  90. ../include 
  91. ../tcl$TCL_VERS/unix 
  92. ../tcl$TCL_ALT_VERS/unix 
  93. ../tcl$TCL_HI_VERS/generic 
  94. ../tcl$TCL_VERS/generic 
  95. ../tcl$TCL_ALT_VERS/generic 
  96. /usr/src/local/tcl$TCL_VERS/generic 
  97. /usr/src/local/tcl$TCL_HI_VERS/generic 
  98. /usr/src/local/tcl$TCL_ALT_VERS/generic 
  99. /usr/local/src/tcl$TCL_VERS/generic 
  100. /usr/local/src/tcl$TCL_HI_VERS/generic 
  101. /usr/local/src/tcl$TCL_ALT_VERS/generic 
  102. /usr/src/local/tcl$TCL_VERS/unix 
  103. /usr/src/local/tcl$TCL_HI_VERS/unix 
  104. /usr/src/local/tcl$TCL_ALT_VERS/unix 
  105. /usr/contrib/include 
  106. /usr/local/lib/tcl$TCL_VERS 
  107. /usr/local/lib/tcl$TCL_HI_VERS 
  108. /usr/local/lib/tcl$TCL_ALT_VERS 
  109. /usr/local/include/tcl$TCL_VERS 
  110. /usr/local/include/tcl$TCL_HI_VERS 
  111. /usr/local/include/tcl$TCL_ALT_VERS 
  112. /usr/local/include 
  113. /import/tcl/include/tcl$TCL_VERS 
  114. /import/tcl/include/tcl$TCL_HI_VERS 
  115. /import/tcl/include/tcl$TCL_ALT_VERS 
  116. ../tcl$TCL_OLD_VERS/generic 
  117. ../tcl$TCL_OLD_ALT_VERS/generic 
  118. /usr/src/local/tcl$TCL_OLD_VERS/generic 
  119. /usr/src/local/tcl$TCL_OLD_ALT_VERS/generic 
  120. ../tcl$TCL_OLD_VERS/unix 
  121. ../tcl$TCL_OLD_ALT_VERS/unix 
  122. /usr/src/local/tcl$TCL_OLD_VERS/unix 
  123. /usr/src/local/tcl$TCL_OLD_ALT_VERS/unix 
  124. /usr/local/lib/tcl$TCL_OLD_VERS 
  125. /usr/local/lib/tcl$TCL_OLD_ALT_VERS 
  126. /usr/local/include/tcl$TCL_OLD_VERS 
  127. /usr/local/include/tcl$TCL_OLD_ALT_VERS 
  128. /import/tcl/include/tcl$TCL_OLD_VERS 
  129. /import/tcl/include/tcl$TCL_OLD_ALT_VERS 
  130. $prefix/include 
  131. $x_includes/tk 
  132. $x_includes 
  133. /usr/include 
  134. /usr/include/tcl$TCL_VERS/tcl-private/generic 
  135. /usr/include/tcl$TCL_HI_VERS/tcl-private/generic 
  136. /usr/include/tcl$TCL_ALT_VERS/tcl-private/generic 
  137. /usr/include/tcl-private/generic 
  138. /usr/include/tcl$TCL_VERS 
  139. /usr/include/tcl$TCL_HI_VERS 
  140. /usr/include/tcl$TCL_ALT_VERS 
  141. /usr/include/tcl"
  142. dnl /usr/include/tcl is for Debian Linux
  143. dnl /usr/include/tcl-private/generic is for FC 4
  144. TCL_LIB_PLACES_D="$d 
  145. $d/lib 
  146. $d/unix"
  147. TCL_LIB_PLACES=" 
  148. ../lib 
  149. ../tcl$TCL_VERS/unix 
  150. ../tcl$TCL_HI_VERS/unix 
  151.                 ../tcl$TCL_ALT_VERS/unix 
  152.                 /usr/src/local/tcl$TCL_VERS/unix 
  153.                 /usr/src/local/tcl$TCL_HI_VERS/unix 
  154.                 /usr/src/local/tcl$TCL_ALT_VERS/unix 
  155.                 /usr/local/src/tcl$TCL_VERS/unix 
  156.                 /usr/local/src/tcl$TCL_HI_VERS/unix 
  157.                 /usr/local/src/tcl$TCL_ALT_VERS/unix 
  158.                 /usr/contrib/lib 
  159.                 /usr/local/lib/tcl$TCL_VERS 
  160.                 /usr/local/lib/tcl$TCL_HI_VERS 
  161.                 /usr/local/lib/tcl$TCL_ALT_VERS 
  162. /usr/lib/tcl$TCL_VERS 
  163. /usr/lib/tcl$TCL_HI_VERS 
  164. /usr/lib/tcl$TCL_ALT_VERS 
  165. ../tcl$TCL_OLD_VERS/unix 
  166.                 ../tcl$TCL_OLD_ALT_VERS/unix 
  167.                 /usr/src/local/tcl$TCL_OLD_VERS/unix 
  168.                 /usr/src/local/tcl$TCL_OLD_ALT_VERS/unix 
  169.                 /usr/local/lib/tcl$TCL_OLD_VERS 
  170.                 /usr/local/lib/tcl$TCL_OLD_ALT_VERS 
  171. /usr/lib/tcl$TCL_OLD_VERS 
  172. /usr/lib/tcl$TCL_OLD_ALT_VERS 
  173.                 /usr/local/lib 
  174.                 $prefix/lib 
  175.                 $x_libs/tk 
  176.                 $x_libs 
  177.                 /usr/lib 
  178. "
  179. dnl Decide which set of .tcl library files to use
  180. NS_BEGIN_PACKAGE(tcl)
  181. NS_CHECK_HEADER_PATH(tcl.h,$TCL_H_PLACES,$d,$TCL_H_PLACES_D,V_INCLUDE_TCL,tcl)
  182. NS_CHECK_HEADER_PATH(tclInt.h,$TCL_H_PLACES,$d,$TCL_H_PLACES_D,V_INCLUDE_TCL,tcl)
  183. NS_CHECK_LIB_PATH(tcl$TCL_HI_VERS,$TCL_LIB_PLACES,$d,$TCL_LIB_PLACES_D,V_LIB_TCL,tcl)
  184. NS_CHECK_ANY_PATH(init.tcl,$TCL_TCL_PLACES,$d,$TCL_TCL_PLACES_D,V_LIBRARY_TCL,tcl)
  185. dnl find the pesky http library
  186. tcl_http_library_dir=/dev/null
  187. tcl_http_places=" 
  188. $V_LIBRARY_TCL 
  189. $V_LIBRARY_TCL/http 
  190. $V_LIBRARY_TCL/http2.4 
  191. $V_LIBRARY_TCL/http2.3 
  192. $V_LIBRARY_TCL/http2.1 
  193. $V_LIBRARY_TCL/http2.0 
  194. $V_LIBRARY_TCL/http1.0 
  195. "
  196. NS_CHECK_ANY_PATH(http.tcl,$tcl_http_places,"","",tcl_http_library_dir,tcl)
  197. AC_MSG_CHECKING(Tcl http.tcl library)
  198. if test -f $tcl_http_library_dir/http.tcl
  199. then
  200. AC_MSG_RESULT(yes)
  201. else
  202. AC_MSG_ERROR(Couldn't find http.tcl in $tcl_http_places)
  203. fi
  204. V_TCL_LIBRARY_FILES="$(TCL_BASE_LIBRARY_FILES) $tcl_http_library_dir/http.tcl"
  205. AC_SUBST(V_TCL_LIBRARY_FILES)
  206. #
  207. # check for tclsh
  208. #
  209. oldpath=$PATH
  210. # $d/unix works if $d is the 8.0 distribution
  211. # $d/bin is for the ns-allinone distribution (kind of hacky, isn't it?)
  212. PATH=../bin:../tcl$TCL_HI_VERS/unix:../tcl$TCL_VERS/unix:$d/unix:$d/bin:$PATH
  213. AC_PATH_PROGS(V_TCLSH,tclsh$TCL_VERS tclsh$TCL_HI_VERS tclsh tclsh$TCL_OLD_VERS,no)
  214. if test x"$V_TCLSH" = xno
  215. then
  216. # out of luck
  217. NS_PACKAGE_NOT_COMPLETE(tcl)
  218. fi
  219. # absolutize it
  220. V_TCLSH=`absolutize $V_TCLSH`
  221. PATH=$oldpath
  222. NS_END_PACKAGE(tcl,yes)
  223. AC_SUBST(V_LIBRARY_TCL)