You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure.in 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(rdr/InStream.h)
  3. dnl dirty hack to prevent use of -g in CFLAGS and CXXFLAGS
  4. ac_cv_prog_cc_g=no
  5. ac_cv_prog_cxx_g=no
  6. dnl Checks for programs.
  7. AC_PROG_CC
  8. AC_PROG_CXX
  9. AC_PROG_RANLIB
  10. AC_PROG_MAKE_SET
  11. AC_LANG_CPLUSPLUS
  12. case "`(uname -sr) 2>/dev/null`" in
  13. "SunOS 5"*)
  14. SOLARIS=yes
  15. USE_MITSHM=yes
  16. ;;
  17. "Linux"*)
  18. LINUX=yes
  19. USE_MITSHM=yes
  20. ;;
  21. esac
  22. if test "$USE_MITSHM" = yes; then
  23. MITSHM_CPPFLAGS="-DMITSHM"
  24. fi
  25. AC_SUBST(MITSHM_CPPFLAGS)
  26. if test "$GCC" = yes; then
  27. CFLAGS="$CFLAGS -Wall"
  28. if test "$SOLARIS" = yes; then
  29. CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int"
  30. fi
  31. fi
  32. if test "$GXX" = yes; then
  33. CXXFLAGS="$CXXFLAGS -Wall"
  34. if test "$SOLARIS" = yes; then
  35. CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -Wno-implicit-int -fpermissive"
  36. fi
  37. fi
  38. AC_PATH_XTRA
  39. AC_ARG_WITH(installed-zlib,
  40. [ --with-installed-zlib use the version of zlib which is installed on the
  41. system instead of the one distributed with VNC])
  42. if test "$with_installed_zlib" = yes; then
  43. echo "using installed zlib"
  44. ZLIB_LIB=-lz
  45. else
  46. ZLIB_DIR=zlib
  47. ZLIB_INCLUDE='-I$(top_srcdir)/zlib'
  48. ZLIB_LIB='$(top_srcdir)/zlib/libz.a'
  49. echo "configuring zlib..."
  50. (cd zlib; ./configure)
  51. echo "...done configuring zlib"
  52. fi
  53. AC_SUBST(ZLIB_DIR)
  54. AC_SUBST(ZLIB_INCLUDE)
  55. AC_SUBST(ZLIB_LIB)
  56. AC_ARG_WITH(installed-jpeg,
  57. [ --with-installed-jpeg use the version of jpeg which is installed on the
  58. system instead of the one distributed with VNC])
  59. if test "$with_installed_jpeg" = yes; then
  60. echo "using installed jpeg"
  61. JPEG_LIB=-ljpeg
  62. else
  63. JPEG_DIR=jpeg
  64. JPEG_INCLUDE='-I$(top_srcdir)/jpeg'
  65. JPEG_LIB='$(top_srcdir)/jpeg/libjpeg.a'
  66. echo "configuring jpeg..."
  67. (cd jpeg; ./configure)
  68. echo "...done configuring jpeg"
  69. fi
  70. AC_SUBST(JPEG_DIR)
  71. AC_SUBST(JPEG_INCLUDE)
  72. AC_SUBST(JPEG_LIB)
  73. AC_CHECK_FUNC(vsnprintf,VSNPRINTF_DEFINE='-DHAVE_VSNPRINTF',VSNPRINTF_DEFINE=)
  74. AC_SUBST(VSNPRINTF_DEFINE)
  75. AC_MSG_CHECKING(for socklen_t)
  76. AC_TRY_COMPILE(
  77. [#include <sys/types.h>
  78. #include <sys/socket.h>],
  79. [socklen_t x;
  80. accept(0, 0, &x);],
  81. AC_MSG_RESULT(yes)
  82. SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=socklen_t',
  83. AC_MSG_RESULT(using int)
  84. SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=int')
  85. AC_SUBST(SOCKLEN_T_DEFINE)
  86. BOILERPLATE=boilerplate.mk
  87. if (sh -c "make --version" 2>/dev/null | grep GNU 2>&1 >/dev/null); then
  88. if sh -c "vncmkdepend" >/dev/null 2>&1; then
  89. BOILERPLATE="$BOILERPLATE:depend.mk"
  90. fi
  91. fi
  92. AC_OUTPUT(Makefile:Makefile.in:$BOILERPLATE \
  93. rdr/Makefile:rdr/Makefile.in:$BOILERPLATE \
  94. network/Makefile:network/Makefile.in:$BOILERPLATE \
  95. Xregion/Makefile:Xregion/Makefile.in:$BOILERPLATE \
  96. rfb/Makefile:rfb/Makefile.in:$BOILERPLATE \
  97. tx/Makefile:tx/Makefile.in:$BOILERPLATE \
  98. x0vncserver/Makefile:x0vncserver/Makefile.in:$BOILERPLATE \
  99. vncviewer_unix/Makefile:vncviewer_unix/Makefile.in:$BOILERPLATE \
  100. vncconfig_unix/Makefile:vncconfig_unix/Makefile.in:$BOILERPLATE \
  101. vncpasswd/Makefile:vncpasswd/Makefile.in:$BOILERPLATE \
  102. )