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.ac 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_PREREQ([2.57])
  3. AC_INIT([tigervnc], [0.0.90], [http://www.tigervnc.org])
  4. AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
  5. AC_SUBST([COMMON_DIR], ['$(top_srcdir)/../common'])
  6. AC_CONFIG_SUBDIRS([../common])
  7. dnl Checks for programs.
  8. AC_PROG_CC
  9. AC_PROG_CXX
  10. AC_PROG_LIBTOOL
  11. AC_LANG([C++])
  12. AM_GNU_GETTEXT([external])
  13. AM_GNU_GETTEXT_VERSION([0.14.6])
  14. case "`(uname -sr) 2>/dev/null`" in
  15. "SunOS 5"*)
  16. SOLARIS=yes
  17. USE_MITSHM=yes
  18. USE_SUN_OVL=yes
  19. ;;
  20. "IRIX 6"*)
  21. LDFLAGS="-L/usr/lib32 $LDFLAGS"
  22. USE_MITSHM=yes
  23. USE_READDISPLAY=yes
  24. ;;
  25. "LynxOS 2"*)
  26. SJLJ_EXCEPTIONS=yes
  27. ;;
  28. esac
  29. dnl FIXME: Check for MIT-SHM properly, add a corresponding --with option.
  30. if test "$USE_MITSHM" = yes; then
  31. MITSHM_DEFINE="-DHAVE_MITSHM"
  32. fi
  33. AC_SUBST(MITSHM_DEFINE)
  34. if test "$GCC" = yes; then
  35. CFLAGS="$CFLAGS -Wall"
  36. if test "$SOLARIS" = yes; then
  37. CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int"
  38. fi
  39. fi
  40. if test "$GXX" = yes; then
  41. CXXFLAGS="$CXXFLAGS -Wall"
  42. if test "$SOLARIS" = yes; then
  43. CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -fpermissive"
  44. fi
  45. if test "$SJLJ_EXCEPTIONS" = yes; then
  46. CXXFLAGS="$CXXFLAGS -fsjlj-exceptions"
  47. fi
  48. fi
  49. AC_PATH_XTRA
  50. AC_ARG_ENABLE(vncconfig,
  51. [ --enable-vncconfig build the vncconfig utility (assumed by default),
  52. use --disable-vncconfig to skip building vncconfig])
  53. if test "$enable_vncconfig" = no; then
  54. echo "vncconfig utility will not be built"
  55. VNCCONFIG_DIR=
  56. else
  57. VNCCONFIG_DIR='vncconfig'
  58. fi
  59. AC_SUBST(VNCCONFIG_DIR)
  60. dnl Check for the XTest X11 extension library.
  61. AC_CHECK_LIB(Xtst,XTestGrabControl,USE_XTEST=yes,USE_XTEST=,
  62. ["$X_LIBS" -lXext -lX11])
  63. if test "$USE_XTEST" = yes; then
  64. XTEST_DEFINE='-DHAVE_XTEST'
  65. XTEST_LIB=-lXtst
  66. else
  67. echo Warning: No XTest extension, building x0vncserver view-only
  68. XTEST_DEFINE=
  69. XTEST_LIB=
  70. fi
  71. AC_SUBST(XTEST_DEFINE)
  72. AC_SUBST(XTEST_LIB)
  73. dnl Support for READDISPLAY (Irix) and SUN_OVL (Solaris) extensions
  74. dnl FIXME: Implement corresponding --with options.
  75. if test "$USE_READDISPLAY" = yes; then
  76. READDISPLAY_DEFINE='-DHAVE_READDISPLAY'
  77. elif test "$USE_SUN_OVL" = yes; then
  78. READDISPLAY_DEFINE='-DHAVE_SUN_OVL'
  79. else
  80. READDISPLAY_DEFINE=
  81. fi
  82. AC_SUBST(READDISPLAY_DEFINE)
  83. dnl Under Lynx/OS 2.3, we have to link with -lbsd to resolve
  84. dnl gethostbyname, inet_addr, htons etc. Check if it's necessary.
  85. dnl NOTE: Did not want to use AC_SEARCH_LIBS which would add
  86. dnl -lbsd to LIBS. We set INET_LIB instead.
  87. AC_LANG_SAVE
  88. AC_LANG_C
  89. AC_CHECK_FUNC(gethostbyname,INET_LIB_REQ=,INET_LIB_REQ=yes)
  90. if test "$INET_LIB_REQ" = yes; then
  91. AC_CHECK_LIB(bsd,gethostbyname,INET_LIB=-lbsd,INET_LIB=)
  92. fi
  93. AC_LANG_RESTORE
  94. AC_SUBST(INET_LIB)
  95. AC_OUTPUT(Makefile
  96. tx/Makefile
  97. x0vncserver/Makefile
  98. vncviewer/Makefile
  99. vncconfig/Makefile
  100. vncpasswd/Makefile
  101. po/Makefile.in
  102. )