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

通讯编程

开发平台:

Visual C++

  1. dnl autoconf rules to find X11 includes and libraries
  2. dnl $Header: /cvsroot/otcl-tclcl/conf/configure.in.x11,v 1.3 2006/09/28 05:25:04 tom_henderson Exp $ (LBL)
  3. xlibdirs="
  4. /usr/openwin/lib 
  5. /usr/X11R6/lib64 
  6. /usr/X11R6/lib 
  7. /usr/lib/X11R6 
  8. /usr/X11R5/lib 
  9. /usr/lib/X11R5 
  10. /usr/X11R4/lib 
  11. /usr/lib/X11R4 
  12. /usr/local/lib 
  13. /usr/X386/lib 
  14. /usr/X11/lib 
  15. /usr/unsupported/lib 
  16. /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib 
  17. /import/X11R4/usr/lib"
  18. xincdirs="
  19. /usr/openwin/include 
  20. /usr/X11R6/include 
  21. /usr/include/X11R6 
  22. /usr/X11R5/include 
  23. /usr/include/X11R5 
  24. /usr/X11R4/include 
  25. /usr/include/X11R4 
  26. /usr/local/include 
  27. /usr/X386/include 
  28. /usr/X11/include 
  29. /usr/lpp/X11/include 
  30. /usr/unsupported/include 
  31. /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include 
  32. /import/X11R4/include"
  33. echo "checking for X11 header files"
  34. if test "$x_includes" = NONE ; then
  35. AC_TEST_CPP([#include <X11/Intrinsic.h>],x_includes="",x_includes=NONE)
  36. if test "$x_includes" = NONE ; then
  37.         for i in $xincdirs ; do
  38. if test -r $i/X11/Intrinsic.h; then
  39. x_includes=$i
  40. break
  41. fi
  42.         done
  43. if test "$x_includes" = NONE ; then
  44. echo "can't find X includes"
  45.         exit 1
  46. fi
  47. fi
  48. fi
  49. if test -n "$x_includes" ; then 
  50. V_INCLUDE_X11=-I$x_includes
  51. AC_SUBST(V_INCLUDE_X11)
  52. fi
  53. echo "checking for X11 library archive"
  54. if test "$x_libraries" = NONE ; then
  55. AC_CHECK_LIB(X11, XOpenDisplay, x_libraries="", x_libraries=NONE)
  56. if test "$x_libraries" = NONE ; then
  57. for i in $xlibdirs ; do
  58. if test -r $i/libX11.a -o -r $i/libX11.so; then
  59. x_libraries=$i
  60. break
  61. fi
  62.         done
  63. if test "$x_libraries" = NONE ; then
  64. echo "can't find X library"
  65. exit 1
  66. fi
  67. fi
  68. fi
  69. V_LIB_X11=-lX11
  70. if test -n "$V_SHM" ; then
  71. if test -z "$x_libraries" ; then
  72. AC_CHECK_LIB(Xext, XShmAttach, V_Xext="-lXext", V_Xext=NONE, -lX11)
  73. else
  74. echo "checking for libXext.a"
  75. if test -f $x_libraries/libXext.a -o -f $x_libraries/libXext.so; then
  76. V_Xext="-lXext"
  77. else
  78. echo "warning: compiling without -lXext"
  79. fi
  80. fi
  81. if test "$V_Xext" = NONE ; then
  82. echo "warning: compiling without -lXext"
  83. else
  84. V_LIB_X11="$V_Xext $V_LIB_X11"
  85. fi
  86. fi
  87. if test -n "$x_libraries" ; then
  88. V_LIB_X11="-L$x_libraries $V_LIB_X11"
  89. if test $solaris ; then
  90. V_LIB_X11="-R$x_libraries $V_LIB_X11"
  91. fi
  92. fi
  93. AC_SUBST(V_LIB_X11)