1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(vncviewer/vncviewer.cxx)
dnl Configure the common directory
echo "configuring common..."
(cd ../common; ./configure $*)
echo "...done configuring common"
dnl dirty hack to prevent use of -g in CFLAGS and CXXFLAGS
ac_cv_prog_cc_g=no
ac_cv_prog_cxx_g=no
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_LANG_CPLUSPLUS
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
SOLARIS=yes
USE_MITSHM=yes
;;
"Linux"*)
LINUX=yes
USE_MITSHM=yes
;;
esac
if test "$USE_MITSHM" = yes; then
MITSHM_CPPFLAGS="-DMITSHM"
fi
AC_SUBST(MITSHM_CPPFLAGS)
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall"
if test "$SOLARIS" = yes; then
CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int"
fi
fi
if test "$GXX" = yes; then
CXXFLAGS="$CXXFLAGS -Wall"
if test "$SOLARIS" = yes; then
CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -Wno-implicit-int -fpermissive"
fi
fi
AC_PATH_XTRA
AC_ARG_WITH(installed-zlib,
[ --with-installed-zlib use the version of zlib which is installed on the
system instead of the one distributed with VNC])
if test "$with_installed_zlib" = yes; then
echo "using installed zlib"
ZLIB_LIB=-lz
else
ZLIB_DIR='$(COMMON)/zlib'
ZLIB_INCLUDE='-I$(COMMON)/zlib'
ZLIB_LIB='$(COMMON)/zlib/libz.a'
fi
AC_SUBST(ZLIB_DIR)
AC_SUBST(ZLIB_INCLUDE)
AC_SUBST(ZLIB_LIB)
AC_ARG_WITH(fb,
[ --with-fb use the new 'fb' framebuffer implementation])
if test "$with_installed_zlib" = yes; then
echo "using 'fb' framebuffer"
USE_FB=YES
else
echo "using 'mfb' and 'cfb' framebuffer"
USE_FB=NO
fi
AC_SUBST(USE_FB)
BOILERPLATE=boilerplate.mk
if (sh -c "make --version" 2>/dev/null | grep GNU 2>&1 >/dev/null); then
if sh -c "vncmkdepend" >/dev/null 2>&1; then
BOILERPLATE="$BOILERPLATE:depend.mk"
fi
fi
AC_OUTPUT(Makefile:common.mk:Makefile.in:$BOILERPLATE \
tx/Makefile:common.mk:tx/Makefile.in:$BOILERPLATE \
x0vncserver/Makefile:common.mk:x0vncserver/Makefile.in:$BOILERPLATE \
vncviewer/Makefile:common.mk:vncviewer/Makefile.in:$BOILERPLATE \
vncconfig/Makefile:common.mk:vncconfig/Makefile.in:$BOILERPLATE \
vncpasswd/Makefile:common.mk:vncpasswd/Makefile.in:$BOILERPLATE \
xc/config/cf/vnc.def \
)
|