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