summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrunge <runge>2007-05-27 00:16:21 +0000
committerrunge <runge>2007-05-27 00:16:21 +0000
commitdd193b133536e68121ff0afebc9ca225f32ff54b (patch)
tree674f434d3db5014467b8accd7cee8c521d0dada8
parent7fffc5d3b41565d7ff43cf582c00cee1bdf76474 (diff)
downloadlibtdevnc-dd193b133536e68121ff0afebc9ca225f32ff54b.tar.gz
libtdevnc-dd193b133536e68121ff0afebc9ca225f32ff54b.zip
configure: make more of a split between libvncserver and x11vnc pkgs.
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac135
-rw-r--r--prepare_x11vnc_dist.sh4
-rw-r--r--x11vnc/README2
5 files changed, 112 insertions, 40 deletions
diff --git a/ChangeLog b/ChangeLog
index ef2d308..3afa687 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-26 Karl Runge <runge@karlrunge.com>
+ * configure.ac, Makefile.am, x11vnc/Makefile.am: change
+ configure to make more of a split between libvncserver and
+ x11vnc packages. LibVNCServer pkg does not include x11vnc.
+
2007-04-06 Brad Hards <bradh@users.sourceforge.net>
* rfb/rfbclient.h: use 'extern "C"' to make it convenient to
include from C++.
diff --git a/Makefile.am b/Makefile.am
index 8db7f34..02af3e8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
CFLAGS=-g -Wall
-SUBDIRS=libvncserver examples contrib libvncclient x11vnc vncterm classes client_examples test
-DIST_SUBDIRS=libvncserver examples contrib libvncclient x11vnc vncterm classes client_examples test
+SUBDIRS=libvncserver examples contrib libvncclient vncterm classes client_examples test
+DIST_SUBDIRS=libvncserver examples contrib libvncclient vncterm classes client_examples test
bin_SCRIPTS = libvncserver-config
@@ -11,9 +11,9 @@ includedir=$(prefix)/include/rfb
include_HEADERS=rfb/rfb.h rfb/rfbconfig.h rfb/rfbint.h rfb/rfbproto.h \
rfb/keysym.h rfb/rfbregion.h rfb/rfbclient.h
-if HAVE_RPM
$(PACKAGE)-$(VERSION).tar.gz: dist
+if HAVE_RPM
# Rule to build RPM distribution package
rpm: $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE).spec
cp $(PACKAGE)-$(VERSION).tar.gz @RPMSOURCEDIR@
diff --git a/configure.ac b/configure.ac
index 1044987..2a3cba3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,28 @@ AC_CHECK_HEADER(thenonexistentheader.h, HAVE_THENONEXISTENTHEADER_H="true")
HAVE_X="false"
AC_PATH_XTRA
AH_TEMPLATE(HAVE_X11, [X11 build environment present])
+
+# See if we are to build x11vnc:
+AM_CONDITIONAL(HAVE_SYSTEM_LIBVNCSERVER, test ! -z $with_system_libvncserver)
+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])
@@ -95,6 +117,9 @@ AC_ARG_WITH(uinput,
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_X="false"
elif test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
@@ -102,7 +127,8 @@ elif test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
HAVE_X="false",
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
- if test $HAVE_X = "true"; then
+ # x11vnc only:
+ if test $HAVE_X = "true" -a "$build_x11vnc" = "yes"; then
X_PRELIBS="$X_PRELIBS -lXext"
AC_CHECK_LIB(Xext, XShmGetImage,
@@ -211,12 +237,39 @@ elif test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
X_LIBS="$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS"
fi
+ # end x11vnc only.
fi
AC_SUBST(X_LIBS)
AM_CONDITIONAL(HAVE_X, test $HAVE_X != "false")
-if test "$PACKAGE_NAME" = "x11vnc" -a "x$HAVE_X" = "xfalse" -a "x$with_x" != "xno"; then
+if test "x$with_system_libvncserver" = "xyes"; then
+ printf "checking for system libvncserver... "
+ if test ! -z "$with_system_libvncserver" -a "x$with_system_libvncserver" != "xyes"; then
+ SYSTEM_LIBVNCSERVER_CFLAGS="-I$with_system_libvncserver/include"
+ SYSTEM_LIBVNCSERVER_LIBS="-L$with_system_libvncserver/lib -lvncserver -lvncclient"
+ echo "using $with_system_libvncserver"
+ with_system_libvncserver=yes
+ elif libvncserver-config --version >/dev/null 2>&1; then
+ SYSTEM_LIBVNCSERVER_CFLAGS=`libvncserver-config --cflags`
+ SYSTEM_LIBVNCSERVER_LIBS=`libvncserver-config --libs`
+ with_system_libvncserver=yes
+ echo yes
+ 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
+
+# x11vnc only:
+if test "$build_x11vnc" = "yes"; then
+
+if test "x$HAVE_X" = "xfalse" -a "x$with_x" != "xno"; then
AC_MSG_ERROR([
==========================================================================
A working X window system build environment is required to build x11vnc.
@@ -233,7 +286,7 @@ or for native Mac OS X), specify the --without-x configure option.
])
fi
-if test "$PACKAGE_NAME" = "x11vnc" -a "x$HAVE_X" = "xtrue" -a "x$HAVE_XTEST" != "xtrue"; then
+if test "x$HAVE_X" = "xtrue" -a "x$HAVE_XTEST" != "xtrue"; then
AC_MSG_WARN([
==========================================================================
A working build environment for the XTEST extension was not found (libXtst).
@@ -289,7 +342,6 @@ if test "x$with_ssl" != "xno"; then
fi
AC_SUBST(SSL_LIBS)
-if test "$PACKAGE_NAME" = "x11vnc"; then
if test "x$HAVE_LIBSSL" != "xtrue"; then
AC_MSG_WARN([
==========================================================================
@@ -300,7 +352,6 @@ libssl-dev) and run configure again.
==========================================================================
])
fi
-fi
if test "x$with_v4l" != "xno"; then
AC_CHECK_HEADER(linux/videodev.h,
@@ -323,18 +374,6 @@ if test "x$with_macosx_native" != "xno"; then
AC_DEFINE(HAVE_MACOSX_NATIVE_DISPLAY)
fi
-# Checks for libraries.
-
-uname_s=`(uname -s) 2>/dev/null`
-ld_minus_R="yes"
-if test "x$uname_s" = "xHP-UX"; then
- ld_minus_R="no"
-elif test "x$uname_s" = "xOSF1"; then
- ld_minus_R="no"
-elif test "x$uname_s" = "xDarwin"; then
- ld_minus_R="no"
-fi
-
AH_TEMPLATE(HAVE_AVAHI, [Avahi/mDNS client build environment present])
AC_ARG_WITH(avahi,
[ --without-avahi disable support for Avahi/mDNS]
@@ -362,6 +401,22 @@ if test "x$with_avahi" = "xyes"; then
AC_SUBST(AVAHI_LIBS)
fi
+fi
+# end x11vnc only.
+
+# Checks for libraries.
+
+uname_s=`(uname -s) 2>/dev/null`
+ld_minus_R="yes"
+if test "x$uname_s" = "xHP-UX"; then
+ ld_minus_R="no"
+elif test "x$uname_s" = "xOSF1"; then
+ ld_minus_R="no"
+elif test "x$uname_s" = "xDarwin"; then
+ ld_minus_R="no"
+fi
+
+
AC_ARG_WITH(jpeg,
[ --without-jpeg disable support for jpeg]
[ --with-jpeg=DIR use jpeg include/library files in DIR],,)
@@ -399,7 +454,7 @@ if test "x$with_jpeg" != "xno"; then
LDFLAGS="$saved_LDFLAGS"
fi
fi
- if test "$PACKAGE_NAME" = "x11vnc"; then
+ if test "$build" = "yes"; then
if test "x$HAVE_JPEGLIB_H" != "xtrue"; then
AC_MSG_WARN([
==========================================================================
@@ -444,7 +499,7 @@ if test "x$with_zlib" != "xno" -a "x$with_libz" != "xno"; then
LDFLAGS="$saved_LDFLAGS"
fi
fi
- if test "$PACKAGE_NAME" = "x11vnc"; then
+ if test "$build_x11vnc" = "yes"; then
if test "x$HAVE_ZLIB_H" != "xtrue"; then
AC_MSG_WARN([
==========================================================================
@@ -505,7 +560,12 @@ AC_SUBST(WSOCKLIB)
# Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h pwd.h sys/wait.h utmpx.h termios.h sys/ioctl.h sys/stropts.h])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.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
@@ -548,7 +608,11 @@ if test "x$uname_s" = "xHP-UX"; then
LDFLAGS="$LDFLAGS -lsec"
fi
-AC_CHECK_FUNCS([ftime gethostbyname gethostname gettimeofday inet_ntoa memmove memset mmap mkfifo select socket strchr strcspn strdup strerror strstr setsid setpgrp getpwuid getpwnam getspnam getuid geteuid setuid setgid seteuid setegid initgroups waitpid setutxent grantpt])
+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])
+fi
# check, if shmget is in cygipc.a
AC_CHECK_LIB(cygipc,shmget)
@@ -582,19 +646,22 @@ AM_CONDITIONAL(HAVE_RPM, test "$RPMSOURCEDIR" != "NOT-FOUND")
AC_SUBST(RPMSOURCEDIR)
AC_CONFIG_FILES([Makefile
- libvncserver/Makefile
- contrib/Makefile
- x11vnc/Makefile
- x11vnc/misc/Makefile
- examples/Makefile
- vncterm/Makefile
- classes/Makefile
- classes/ssl/Makefile
- libvncclient/Makefile
- client_examples/Makefile
- test/Makefile
- LibVNCServer.spec
- libvncserver-config])
+ libvncserver/Makefile
+ contrib/Makefile
+ examples/Makefile
+ vncterm/Makefile
+ classes/Makefile
+ classes/ssl/Makefile
+ libvncclient/Makefile
+ client_examples/Makefile
+ test/Makefile
+ libvncserver-config
+ LibVNCServer.spec])
+# x11vnc only:
+if test "$build_x11vnc" = "yes"; then
+ AC_CONFIG_FILES([x11vnc/Makefile x11vnc/misc/Makefile])
+fi
+
AC_CONFIG_COMMANDS([chmod-libvncserver-config],[chmod a+x libvncserver-config])
AC_OUTPUT
chmod a+x ./libvncserver-config
diff --git a/prepare_x11vnc_dist.sh b/prepare_x11vnc_dist.sh
index 3c83215..20956a3 100644
--- a/prepare_x11vnc_dist.sh
+++ b/prepare_x11vnc_dist.sh
@@ -7,11 +7,11 @@ cd "$(dirname "$0")"
mv configure.ac configure.ac.LibVNCServer
cat configure.ac.LibVNCServer | \
-egrep -v 'AC_CONFIG_COMMANDS.*libvncserver-config' | \
+egrep -v '(AC_CONFIG_COMMANDS|chmod).*libvncserver-config' | \
+egrep -v '^[ ]*libvncserver-config$' | \
sed -e "s/LibVNCServer, [^,)]*\([(,]\)*/x11vnc, $VERSION\1/g" \
-e "s/\(contrib\|examples\|vncterm\|test\|client_examples\)\/Makefile//g" \
-e "s/LibVNCServer.spec/x11vnc.spec/g" \
- -e "s/^.*libvncserver-config//g" \
-e "s/AC_PROG_LIBTOOL/AC_PROG_RANLIB/" \
> configure.ac
diff --git a/x11vnc/README b/x11vnc/README
index e0e2645..e7d053e 100644
--- a/x11vnc/README
+++ b/x11vnc/README
@@ -1,5 +1,5 @@
-x11vnc README file Date: Sat May 26 19:09:57 EDT 2007
+x11vnc README file Date: Sat May 26 20:14:54 EDT 2007
The following information is taken from these URLs: