Commit 0f25ea73 authored by Christian Beier's avatar Christian Beier

Remove x11vnc from autotools build system.

parent 7dfd4f3b
if WITH_X11VNC
X11VNC=x11vnc
endif
SUBDIRS=libvncserver examples libvncclient vncterm webclients client_examples test $(X11VNC)
SUBDIRS=libvncserver examples libvncclient vncterm webclients client_examples test
DIST_SUBDIRS=libvncserver examples libvncclient vncterm webclients client_examples test
EXTRA_DIST = CMakeLists.txt rfb/rfbint.h.cmake rfb/rfbconfig.h.cmake
......
......@@ -146,10 +146,6 @@ fi
AC_SUBST(SSL_LIBS)
AM_CONDITIONAL(HAVE_LIBSSL, test ! -z "$SSL_LIBS")
# Checks for X libraries
HAVE_X11="false"
AC_PATH_XTRA
AH_TEMPLATE(HAVE_X11, [X11 build environment present])
# See if we want libva support
# TODO: check if library actually exists
......@@ -165,387 +161,6 @@ AC_SUBST(VA_LIBS)
AM_CONDITIONAL(CONFIG_LIBVA, test ! -z "$VA_LIBS")
# See if we are to build x11vnc:
AH_TEMPLATE(HAVE_SYSTEM_LIBVNCSERVER, [Use the system libvncserver build environment for x11vnc.])
AC_ARG_WITH(system-libvncserver,
[ --with-system-libvncserver use installed libvncserver for x11vnc]
[ --with-system-libvncserver=DIR use libvncserver installed in DIR for x11vnc],,)
AC_ARG_WITH(x11vnc,
[ --with-x11vnc configure for building the x11vnc subdir (if present)]
[ you will need to cd to x11vnc and run 'make' etc.],,)
if test ! -z "$with_x11vnc" -a "$with_x11vnc" = "yes"; then
build_x11vnc="yes"
elif test "$PACKAGE_NAME" = "x11vnc"; then
build_x11vnc="yes"
else
build_x11vnc="no"
fi
# x11vnc only:
if test "$build_x11vnc" = "yes"; then
AH_TEMPLATE(HAVE_XSHM, [MIT-SHM extension build environment present])
AH_TEMPLATE(HAVE_XTEST, [XTEST extension build environment present])
AH_TEMPLATE(HAVE_XTESTGRABCONTROL, [XTEST extension has XTestGrabControl])
AH_TEMPLATE(HAVE_XKEYBOARD, [XKEYBOARD extension build environment present])
AH_TEMPLATE(HAVE_LIBXINERAMA, [XINERAMA extension build environment present])
AH_TEMPLATE(HAVE_LIBXRANDR, [XRANDR extension build environment present])
AH_TEMPLATE(HAVE_LIBXFIXES, [XFIXES extension build environment present])
AH_TEMPLATE(HAVE_LIBXDAMAGE, [XDAMAGE extension build environment present])
AH_TEMPLATE(HAVE_LIBXTRAP, [DEC-XTRAP extension build environment present])
AH_TEMPLATE(HAVE_RECORD, [RECORD extension build environment present])
AH_TEMPLATE(HAVE_SOLARIS_XREADSCREEN, [Solaris XReadScreen available])
AH_TEMPLATE(HAVE_IRIX_XREADDISPLAY, [IRIX XReadDisplay available])
AH_TEMPLATE(HAVE_FBPM, [FBPM extension build environment present])
AH_TEMPLATE(HAVE_DPMS, [DPMS extension build environment present])
AH_TEMPLATE(HAVE_LINUX_VIDEODEV_H, [video4linux build environment present])
AH_TEMPLATE(HAVE_LINUX_FB_H, [linux fb device build environment present])
AH_TEMPLATE(HAVE_LINUX_INPUT_H, [linux/input.h present])
AH_TEMPLATE(HAVE_LINUX_UINPUT_H, [linux uinput device build environment present])
AH_TEMPLATE(HAVE_MACOSX_NATIVE_DISPLAY, [build MacOS X native display support])
AH_TEMPLATE(HAVE_MACOSX_OPENGL_H, [MacOS X OpenGL present])
AC_ARG_WITH(xkeyboard,
[ --without-xkeyboard disable xkeyboard extension support],,)
AC_ARG_WITH(xinerama,
[ --without-xinerama disable xinerama extension support],,)
AC_ARG_WITH(xrandr,
[ --without-xrandr disable xrandr extension support],,)
AC_ARG_WITH(xfixes,
[ --without-xfixes disable xfixes extension support],,)
AC_ARG_WITH(xdamage,
[ --without-xdamage disable xdamage extension support],,)
AC_ARG_WITH(xtrap,
[ --without-xtrap disable xtrap extension support],,)
AC_ARG_WITH(xrecord,
[ --without-xrecord disable xrecord extension support],,)
AC_ARG_WITH(fbpm,
[ --without-fbpm disable fbpm extension support],,)
AC_ARG_WITH(dpms,
[ --without-dpms disable dpms extension support],,)
AC_ARG_WITH(v4l,
[ --without-v4l disable video4linux support],,)
AC_ARG_WITH(fbdev,
[ --without-fbdev disable linux fb device support],,)
AC_ARG_WITH(uinput,
[ --without-uinput disable linux uinput device support],,)
AC_ARG_WITH(macosx-native,
[ --without-macosx-native disable MacOS X native display support],,)
fi
# end x11vnc only.
if test "x$with_x" = "xno"; then
HAVE_X11="false"
elif test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
AC_CHECK_LIB(X11, XGetImage, [AC_DEFINE(HAVE_X11) HAVE_X11="true"],
HAVE_X11="false",
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
# x11vnc only:
if test $HAVE_X11 = "true" -a "$build_x11vnc" = "yes"; then
X_PRELIBS="$X_PRELIBS -lXext"
AC_CHECK_LIB(Xext, XShmGetImage,
[AC_DEFINE(HAVE_XSHM)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
AC_CHECK_LIB(Xext, XReadScreen,
[AC_DEFINE(HAVE_SOLARIS_XREADSCREEN)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
AC_CHECK_HEADER(X11/extensions/readdisplay.h,
[AC_DEFINE(HAVE_IRIX_XREADDISPLAY)], ,
[#include <X11/Xlib.h>])
if test "x$with_fbpm" != "xno"; then
AC_CHECK_LIB(Xext, FBPMForceLevel,
[AC_DEFINE(HAVE_FBPM)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
fi
if test "x$with_dpms" != "xno"; then
AC_CHECK_LIB(Xext, DPMSForceLevel,
[AC_DEFINE(HAVE_DPMS)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
fi
AC_CHECK_LIB(Xtst, XTestGrabControl,
X_PRELIBS="-lXtst $X_PRELIBS"
[AC_DEFINE(HAVE_XTESTGRABCONTROL) HAVE_XTESTGRABCONTROL="true"], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
AC_CHECK_LIB(Xtst, XTestFakeKeyEvent,
X_PRELIBS="-lXtst $X_PRELIBS"
[AC_DEFINE(HAVE_XTEST) HAVE_XTEST="true"], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
if test "x$with_xrecord" != "xno"; then
AC_CHECK_LIB(Xtst, XRecordEnableContextAsync,
X_PRELIBS="-lXtst $X_PRELIBS"
[AC_DEFINE(HAVE_RECORD)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
fi
# we use XTRAP on X11R5, or user can set X11VNC_USE_XTRAP
if test "x$with_xtrap" != "xno"; then
if test ! -z "$X11VNC_USE_XTRAP" -o -z "$HAVE_XTESTGRABCONTROL"; then
AC_CHECK_LIB(XTrap, XETrapSetGrabServer,
X_PRELIBS="$X_PRELIBS -lXTrap"
[AC_DEFINE(HAVE_LIBXTRAP)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
# tru64 uses libXETrap.so
AC_CHECK_LIB(XETrap, XETrapSetGrabServer,
X_PRELIBS="$X_PRELIBS -lXETrap"
[AC_DEFINE(HAVE_LIBXTRAP)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
fi
fi
if test "x$with_xkeyboard" != "xno"; then
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_CHECK_HEADER(X11/XKBlib.h, HAVE_XKBLIB_H="true",
HAVE_XKBLIB_H="false", [#include <X11/Xlib.h>])
CPPFLAGS="$saved_CPPFLAGS"
if test $HAVE_XKBLIB_H = "true"; then
AC_CHECK_LIB(X11, XkbSelectEvents,
[AC_DEFINE(HAVE_XKEYBOARD)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
fi
fi
if test "x$with_xinerama" != "xno"; then
AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
X_PRELIBS="$X_PRELIBS -lXinerama"
[AC_DEFINE(HAVE_LIBXINERAMA)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
fi
if test "x$with_xrandr" != "xno"; then
AC_CHECK_LIB(Xrandr, XRRSelectInput,
X_PRELIBS="$X_PRELIBS -lXrandr"
[AC_DEFINE(HAVE_LIBXRANDR) HAVE_LIBXRANDR="true"], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
fi
if test "x$with_xfixes" != "xno"; then
AC_CHECK_LIB(Xfixes, XFixesGetCursorImage,
X_PRELIBS="$X_PRELIBS -lXfixes"
[AC_DEFINE(HAVE_LIBXFIXES) HAVE_LIBXFIXES="true"], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
fi
if test "x$with_xdamage" != "xno"; then
AC_CHECK_LIB(Xdamage, XDamageQueryExtension,
X_PRELIBS="$X_PRELIBS -lXdamage"
[AC_DEFINE(HAVE_LIBXDAMAGE) HAVE_LIBXDAMAGE="true"], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
fi
if test ! -z "$HAVE_LIBXFIXES" -o ! -z "$HAVE_LIBXDAMAGE"; then
# need /usr/sfw/lib in RPATH for Solaris 10 and later
case `(uname -sr) 2>/dev/null` in
"SunOS 5"*) X_EXTRA_LIBS="$X_EXTRA_LIBS -R/usr/sfw/lib" ;;
esac
fi
if test ! -z "$HAVE_LIBXRANDR"; then
# also need /usr/X11/include for Solaris 10 10/08 and later
case `(uname -sr) 2>/dev/null` in
"SunOS 5"*) CPPFLAGS="$CPPFLAGS -I/usr/X11/include" ;;
esac
fi
X_LIBS="$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS"
fi
# end x11vnc only.
fi
AC_SUBST(X_LIBS)
AM_CONDITIONAL(HAVE_X11, test $HAVE_X11 != "false")
# x11vnc only:
if test "$build_x11vnc" = "yes"; then
if test "x$HAVE_X11" = "xfalse" -a "x$with_x" != "xno"; then
AC_MSG_ERROR([
==========================================================================
*** A working X window system build environment is required to build ***
x11vnc. Make sure any required X development packages are installed.
If they are installed in non-standard locations, one can use the
--x-includes=DIR and --x-libraries=DIR configure options or set the
CPPFLAGS and LDFLAGS environment variables to indicate where the X
window system header files and libraries may be found. On 64+32 bit
machines you may need to point to lib64 or lib32 directories to pick up
the correct word size.
If you want to build x11vnc without X support (e.g. for -rawfb use only
or for native Mac OS X), specify the --without-x configure option.
==========================================================================
])
fi
if test "x$HAVE_X11" = "xtrue" -a "x$HAVE_XTEST" != "xtrue"; then
AC_MSG_WARN([
==========================================================================
*** A working build environment for the XTEST extension was not found ***
(libXtst). An x11vnc built this way will be *ONLY BARELY USABLE*.
You will be able to move the mouse but not click or type. There can
also be deadlocks if an application grabs the X server.
It is recommended that you install the necessary development packages
for XTEST (perhaps it is named something like libxtst-dev) and run
configure again.
==========================================================================
])
sleep 5
fi
if test "x$with_v4l" != "xno"; then
AC_CHECK_HEADER(linux/videodev.h,
[AC_DEFINE(HAVE_LINUX_VIDEODEV_H)],,)
fi
if test "x$with_fbdev" != "xno"; then
AC_CHECK_HEADER(linux/fb.h,
[AC_DEFINE(HAVE_LINUX_FB_H)],,)
fi
if test "x$with_uinput" != "xno"; then
AC_CHECK_HEADER(linux/input.h,
[AC_DEFINE(HAVE_LINUX_INPUT_H) HAVE_LINUX_INPUT_H="true"],,)
if test "x$HAVE_LINUX_INPUT_H" = "xtrue"; then
AC_CHECK_HEADER(linux/uinput.h,
[AC_DEFINE(HAVE_LINUX_UINPUT_H)],, [#include <linux/input.h>])
fi
fi
if test "x$with_macosx_native" != "xno"; then
AC_DEFINE(HAVE_MACOSX_NATIVE_DISPLAY)
fi
# Check for OS X opengl header
AC_CHECK_HEADER(OpenGL/OpenGL.h,
[AC_DEFINE(HAVE_MACOSX_OPENGL_H) HAVE_MACOSX_OPENGL_H="true"],,)
AH_TEMPLATE(HAVE_AVAHI, [Avahi/mDNS client build environment present])
AC_ARG_WITH(avahi,
[ --without-avahi disable support for Avahi/mDNS]
[ --with-avahi=DIR use avahi include/library files in DIR],,)
if test "x$with_avahi" != "xno"; then
printf "checking for avahi... "
if test ! -z "$with_avahi" -a "x$with_avahi" != "xyes"; then
AVAHI_CFLAGS="-I$with_avahi/include"
AVAHI_LIBS="-L$with_avahi/lib -lavahi-common -lavahi-client"
echo "using $with_avahi"
with_avahi=yes
elif pkg-config --atleast-version=0.6.4 avahi-client >/dev/null 2>&1; then
AVAHI_CFLAGS=`pkg-config --cflags avahi-client`
AVAHI_LIBS=`pkg-config --libs avahi-client`
with_avahi=yes
echo yes
else
with_avahi=no
echo no
fi
fi
if test "x$with_avahi" = "xyes"; then
AC_DEFINE(HAVE_AVAHI)
AC_SUBST(AVAHI_CFLAGS)
AC_SUBST(AVAHI_LIBS)
fi
fi
# end x11vnc only.
# only used in x11vnc/Makefile.am but needs to always be defined:
AM_CONDITIONAL(OSX_OPENGL, test "$HAVE_MACOSX_OPENGL_H" = "true")
# Checks for libraries.
if test ! -z "$with_system_libvncserver" -a "x$with_system_libvncserver" != "xno"; then
printf "checking for system libvncserver... "
vneed="0.9.1"
if test "X$VNEED" != "X"; then
vneed=$VNEED
fi
if test "x$with_system_libvncserver" != "xyes"; then
rflag=""
if test "x$ld_minus_R" = "xno"; then
:
elif test "x$GCC" = "xyes"; then
rflag="-Xlinker -R$with_system_libvncserver/lib"
else
rflag="-R$with_system_libvncserver/lib"
fi
cmd="$with_system_libvncserver/bin/libvncserver-config"
if $cmd --version 1>/dev/null 2>&1; then
cvers=`$cmd --version 2>/dev/null`
cscore=`echo "$cvers" | tr '.' ' ' | awk '{print 10000 * $1 + 100 * $2 + $3}'`
nscore=`echo "$vneed" | tr '.' ' ' | awk '{print 10000 * $1 + 100 * $2 + $3}'`
if test $cscore -lt $nscore; then
echo "no"
with_system_libvncserver=no
AC_MSG_ERROR([
==========================================================================
*** Need libvncserver version $vneed, have version $cvers ***
You are building with a system installed libvncserver and it is not
new enough.
==========================================================================
])
else
SYSTEM_LIBVNCSERVER_CFLAGS="-I$with_system_libvncserver/include"
SYSTEM_LIBVNCSERVER_LIBS="-L$with_system_libvncserver/lib $rflag -lvncserver -lvncclient"
echo "using $with_system_libvncserver"
with_system_libvncserver=yes
fi
else
echo " *** cannot run $cmd *** " 1>&2
with_system_libvncserver=no
echo no
fi
elif libvncserver-config --version 1>/dev/null 2>&1; then
rflag=""
rprefix=`libvncserver-config --prefix`
if test "x$ld_minus_R" = "xno"; then
:
elif test "x$GCC" = "xyes"; then
rflag=" -Xlinker -R$rprefix/lib "
else
rflag=" -R$rprefix/lib "
fi
cvers=`libvncserver-config --version 2>/dev/null`
cscore=`echo "$cvers" | tr '.' ' ' | awk '{print 10000 * $1 + 100 * $2 + $3}'`
nscore=`echo "$vneed" | tr '.' ' ' | awk '{print 10000 * $1 + 100 * $2 + $3}'`
if test $cscore -lt $nscore; then
echo "no"
AC_MSG_ERROR([
==========================================================================
*** Need libvncserver version $vneed, have version $cvers ***
You are building with a system installed libvncserver and it is not
new enough.
==========================================================================
])
else
SYSTEM_LIBVNCSERVER_CFLAGS=`libvncserver-config --cflags`
SYSTEM_LIBVNCSERVER_LIBS="$rflag"`libvncserver-config --libs`
with_system_libvncserver=yes
echo yes
fi
else
with_system_libvncserver=no
echo no
fi
fi
if test "x$with_system_libvncserver" = "xyes"; then
AC_DEFINE(HAVE_SYSTEM_LIBVNCSERVER)
AC_SUBST(SYSTEM_LIBVNCSERVER_CFLAGS)
AC_SUBST(SYSTEM_LIBVNCSERVER_LIBS)
fi
AM_CONDITIONAL(HAVE_SYSTEM_LIBVNCSERVER, test "x$with_system_libvncserver" = "xyes")
AC_ARG_WITH(jpeg,
[ --without-jpeg disable support for jpeg]
......@@ -687,7 +302,6 @@ if test "x$with_png" != "xno"; then
LDFLAGS="$saved_LDFLAGS"
fi
fi
if test "$build_x11vnc" = "yes"; then
if test "x$HAVE_PNGLIB_H" != "xtrue"; then
AC_MSG_WARN([
==========================================================================
......@@ -701,7 +315,6 @@ http://www.libpng.org/pub/png/libpng.html
])
sleep 5
fi
fi
fi
AC_ARG_WITH(libz,
......@@ -734,7 +347,6 @@ if test "x$with_zlib" != "xno" -a "x$with_libz" != "xno"; then
LDFLAGS="$saved_LDFLAGS"
fi
fi
if test "$build_x11vnc" = "yes"; then
if test "x$HAVE_ZLIB_H" != "xtrue"; then
AC_MSG_WARN([
==========================================================================
......@@ -747,7 +359,6 @@ A copy of libz may be obtained from: http://www.gzip.org/zlib/
])
sleep 5
fi
fi
fi
AC_ARG_WITH(pthread,
......@@ -901,11 +512,6 @@ fi
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h endian.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/endian.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h ws2tcpip.h])
# x11vnc only:
if test "$build_x11vnc" = "yes"; then
AC_CHECK_HEADERS([pwd.h sys/wait.h utmpx.h termios.h sys/ioctl.h sys/stropts.h])
fi
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
......@@ -947,10 +553,6 @@ if test "x$uname_s" = "xHP-UX"; then
fi
AC_CHECK_FUNCS([ftime gethostbyname gethostname gettimeofday inet_ntoa memmove memset mmap mkfifo select socket strchr strcspn strdup strerror strstr])
# x11vnc only:
if test "$build_x11vnc" = "yes"; then
AC_CHECK_FUNCS([setsid setpgrp getpwuid getpwnam getspnam getuid geteuid setuid setgid seteuid setegid initgroups waitpid setutxent grantpt shmat])
fi
# check, if shmget is in cygipc.a
AC_CHECK_LIB(cygipc,shmget)
......@@ -988,7 +590,6 @@ for directory in packages OpenLinux redhat RedHat rpm RPM "" ; do
done
echo "$RPMSOURCEDIR"
AM_CONDITIONAL(HAVE_RPM, test "$RPMSOURCEDIR" != "NOT-FOUND")
AM_CONDITIONAL(WITH_X11VNC, test "$build_x11vnc" = "yes")
AC_SUBST(RPMSOURCEDIR)
AC_CONFIG_FILES([Makefile
......@@ -1006,36 +607,7 @@ AC_CONFIG_FILES([Makefile
test/Makefile
libvncserver-config
LibVNCServer.spec])
#
# x11vnc only:
#
if test "$build_x11vnc" = "yes"; then
#
# NOTE: if you are using the LibVNCServer-X.Y.Z.tar.gz source
# tarball and nevertheless want to run autoconf (i.e. aclocal,
# autoheader, automake, autoconf) AGAIN (perhaps you have a
# special target system, e.g. embedded) then you will need to
# comment out the following 'AC_CONFIG_FILES' line to avoid
# automake error messages like:
#
# configure.ac:690: required file `x11vnc/Makefile.in' not found
#
AC_CONFIG_FILES([x11vnc/Makefile x11vnc/misc/Makefile x11vnc/misc/turbovnc/Makefile])
if test ! -z "$with_system_libvncserver" -a "x$with_system_libvncserver" != "xno"; then
# need to move local tarball rfb headers aside:
hdrs="rfb.h rfbclient.h rfbproto.h rfbregion.h rfbint.h"
echo "with-system-libvncserver: moving aside headers $hdrs"
for hdr in $hdrs
do
if test -f "rfb/$hdr"; then
echo "with-system-libvncserver: moving rfb/$hdr to rfb/$hdr.ORIG"
mv rfb/$hdr rfb/$hdr.ORIG
fi
done
echo "with-system-libvncserver: *NOTE* move them back manually to start over."
fi
fi
AC_CONFIG_COMMANDS([chmod-libvncserver-config],[chmod a+x libvncserver-config])
AC_OUTPUT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment