Commit 25df60de authored by Daniel P. Berrange's avatar Daniel P. Berrange
Browse files

Switched over to using automake/conf/libtool. Added pkgconfig data file. Added...

Switched over to using automake/conf/libtool. Added pkgconfig data file. Added linker script to control library symbols
parent c2b5d105
^src/\.deps/
^src/\.libs/
^src/libgtk_vnc_1_0_la-.*
^.*~
Makefile$
Makefile\.in$
^autom4te\.cache
^config\.log$
^config\.guess$
^config\.h$
^config\.hin$
^config\.status$
^config\.sub$
^configure$
^aclocal\.m4$
^gtk-vnc-1.0\.pc$
^stamp-h1$
^libtool$
^ltmain\.sh$
^src/vncmodule.defs.c$
^src/gtkvnc\.la$
^src/gtkvnc_la.*$
^src/libgtk-vnc-1.0\.la$
^build
GTK VNC Authors
===============
GTK VNC is written & maintained by:
Anthony Liguori <anthony-at-codemonkey-dot-ws>
Daniel Berrange <dan-at-berrange-dot-com>
John Wendell <jwendell-at-gnome-dot-org>
Patches received from:
...send patches to get your name here...
-- End
2007-06-20 Jonh Wendell <wendell@bani.com.br>
* src/gvnc.c, src/gvnc.h, src/vncdisplay.c, src/vncdisplay.h:
- Created two public get functions: get_width() and get_height()
- Created a vnc-initialized signal
- Made small changes in order to work with ultravnc, which reports rfb
3.6
[0a645e462b27] [tip]
2007-02-24 Anthony Liguori <anthony@codemonkey.ws>
* src/gvnc.c:
Make sure to flush after set_shared_memory
[96efd786ce0e]
* src/gvnc.c:
merge
[bf58a3b140e9]
2007-02-24 "Daniel P. Berrange <berrange@redhat.com>
* src/gvnc.c:
Merge heads
[40f71f58fe82]
* src/gvnc.c:
Buffer all outgoing writes until gvnc_flush() is called. Fix
signed/unsigned comparisons
[63a8d28dc00c]
2007-02-23 "Daniel P. Berrange <berrange@redhat.com>
* src/gvnc.c:
Add in missing diffie-hellman params. Fixed reading of TLS data wrt
to internal buffer
[e89673aaaa27]
2007-02-24 Anthony Liguori <anthony@codemonkey.ws>
* setup.py, src/Makefile, src/gen-vnc.defs.c, src/gvnc.c, src/gvnc.h,
src/vnc.defs, src/vncdisplay.c, src/vncdisplay.h, src/vncshmimage.c,
src/vncshmimage.h:
Add initial support for shared memory transport. It's off by
default.
[5cc6db03869a]
2007-02-23 Anthony Liguori <anthony@codemonkey.ws>
* setup.py, src/gvnc.c:
Fix python widget build and add proper support for RFB 3.3
[9315b4e9cbac]
2007-02-21 "Daniel P. Berrange <berrange@redhat.com>
* src/gvnc.c:
Support the plain no X509 certificate auth types. Remove mistaken 1
byte write. Allow use of TLS 1.0 for compatability
[6d1100a8d5b4]
* src/Makefile, src/gvnc.c:
Initial suppport for protocol 3.7/3.8 and VeNCrypt TLS
authentication
[079f2f886eef]
* src/vncdisplay.c:
Remove redundant call to resize - gvnc_set_vnc_ops triggers a resize
signal
[26f19dac4378]
2007-01-05 anthony <anthony@rhesus>
* dsextras.py, setup.py, src/Makefile:
Some updates
[e92830dedd8a]
* MANIFEST, Makefile, blt.h, blt1.h, continuation.c, continuation.h,
coroutine.c, coroutine.h, d3des.c, d3des.h, dsextras.py, gvnc.c,
gvnc.h, setup.py, src/Makefile, src/blt.h, src/blt1.h,
src/continuation.c, src/continuation.h, src/coroutine.c,
src/coroutine.h, src/d3des.c, src/d3des.h, src/gen-vnc.defs.c,
src/gvnc.c, src/gvnc.h, src/vnc.defs, src/vnc.override,
src/vncdisplay.c, src/vncdisplay.h, src/vncmodule.c, test.py, vnc-
test.c, vnc.override, vncdisplay.c, vncdisplay.h, vncmodule.c:
Reorganize repo and create a proper setup.py
[b883d2248b18]
* COPYING.lib, blt1.h, continuation.c, continuation.h, coroutine.c,
coroutine.h, gvnc.c, vncdisplay.c, vncdisplay.h, vncmodule.c:
Add licensing stuff
[19632bb439a4]
* test.py, vncdisplay.c, vncdisplay.h:
Add a proper set of signals to notify of grab change
[4226ed633da9]
2006-12-20 anthony <anthony@rhesus>
* Makefile, blt.h, blt1.h, continuation.c, continuation.h,
coroutine.c, coroutine.h, d3des.c, d3des.h, gvnc.c, gvnc.h, test.py,
vnc-test.c, vnc.override, vncdisplay.c, vncdisplay.h, vncmodule.c:
Put vnc widget into a separate repo
[ba8d726d2f0f]
MANIFEST
COPYING.lib
dsextras.py
setup.py
src/continuation.c
src/coroutine.c
src/d3des.c
src/gen-vnc.defs.c
src/gvnc.c
src/vncdisplay.c
src/vncmodule.c
src/Makefile
src/vnc.override
src/vnc.defs
src/blt1.h
src/blt.h
src/continuation.h
src/coroutine.h
src/d3des.h
src/gvnc.h
src/vncdisplay.h
SUBDIRS = src
pkgconfig_DATA = @PACKAGE@-1.0.pc
pkgconfigdir = $(libdir)/pkgconfig
EXTRA_DIST = $(PACKAGE)-1.0.pc.in $(PACKAGE).spec.in $(PACKAGE).spec
GTK VNC News
============
None yet, watch this space...
-- End
\ No newline at end of file
GTK VNC Readme
===============
gtk-vnc is a VNC viewer widget for GTK. It is built using
coroutines allowing it to be completely asynchronous while
remaining single threaded. It provides a core C library, and
bindings for Python (PyGTK)
For information about the project visit the webpages at:
http://gtk-vnc.sourceforge.net/
To contact developers use the project mailing list at:
https://lists.sourceforge.net/lists/listinfo/gtk-vnc-devel
-- End
# serial 3
# Find valid warning flags for the C Compiler. -*-Autoconf-*-
#
# Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
# Written by Jesse Thilo.
AC_DEFUN([gl_COMPILER_FLAGS],
[AC_MSG_CHECKING(whether compiler accepts $1)
AC_SUBST(COMPILER_FLAGS)
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $1"
AC_TRY_COMPILE(,
[int x;],
COMPILER_FLAGS="$COMPILER_FLAGS $1"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
CFLAGS="$ac_save_CFLAGS"
])
dnl a macro to check for ability to create python extensions
dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
dnl function also defines PYTHON_INCLUDES
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
[AC_REQUIRE([AM_PATH_PYTHON])
AC_MSG_CHECKING(for headers required to compile python extensions)
dnl deduce PYTHON_INCLUDES
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
if test "$py_prefix" != "$py_exec_prefix"; then
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
fi
AC_SUBST(PYTHON_INCLUDES)
dnl check if the headers exist:
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
AC_TRY_CPP([#include <Python.h>],dnl
[AC_MSG_RESULT(found)
$1],dnl
[AC_MSG_RESULT(not found)
$2])
CPPFLAGS="$save_CPPFLAGS"
])
#!/bin/sh
set -e
set -v
# Make things clean.
test -f Makefile && make -k distclean || :
rm -rf build
mkdir build
cd build
../autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT
make
make install
rm -f *.tar.gz
make dist
if [ -f /usr/bin/rpmbuild ]; then
if [ -n "$AUTOBUILD_COUNTER" ]; then
EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
else
NOW=`date +"%s"`
EXTRA_RELEASE=".$USER$NOW"
fi
rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean *.tar.gz
fi
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
set -e
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
THEDIR=`pwd`
cd $srcdir
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile gtk-vnc."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/autoconf"
DIE=1
}
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtool installed to compile gtk-vnc."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/libtool"
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
DIE=1
echo "You must have automake installed to compile gtk-vnc."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/automake"
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "I am going to run ./configure with --enable-warnings - if you "
echo "wish to pass any extra arguments to it, please specify them on "
echo "the $0 command line."
fi
libtoolize --copy --force
aclocal
autoheader
automake --add-missing
autoconf
# We use COPYING.LIB instead
rm -f COPYING
cd $THEDIR
$srcdir/configure --enable-warnings "$@" && {
echo
echo "Now type 'make' to compile gtk-vnc."
}
dnl Process this file with autoconf to produce a configure script.
AC_INIT([gtk-vnc], [0.0.1], [anthony@codemonkey.ws])
AC_CONFIG_SRCDIR([src/gvnc.c])
GTK_REQUIRED=2.0.0
AC_SUBST(GTK_REQUIRED)
GNUTLS_REQUIRED=1.4.0
AC_SUBST(GNUTLS_REQUIRED)
PYGTK_REQUIRED=2.0.0
PYTHON_REQUIRED=2.4
AC_CONFIG_HEADERS([config.h:config.hin])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(gtk-vnc, 0.0.1)
AC_PROG_CC_STDC
AC_PROG_LIBTOOL
AC_ARG_WITH(python,
[ --with-python build python bindings],
[case "${withval}" in
yes|no) ;;
*) AC_MSG_ERROR([bad value ${withval} for python option]) ;;
esac],[withval=yes])
WITH_PYTHON=$withval
AC_ARG_ENABLE(fatal-warnings,
[ --enable-warnings make all compiler warnings fatal (not recommended)],
[case "${enableval}" in
yes|no) ;;
*) AC_MSG_ERROR([bad value ${enableval} for fatal-warnings option]) ;;
esac],
[enableval=no])
if test "${enableval}" = yes; then
gl_COMPILER_FLAGS(-Werror)
AC_SUBST([WERROR_CFLAGS], [$COMPILER_FLAGS])
COMPILER_FLAGS=
fi
AC_ARG_ENABLE(warnings,
[ --enable-warnings turn on lots of compiler warnings (recommended)],
[case "${enableval}" in
yes|no) ;;
*) AC_MSG_ERROR([bad value ${enableval} for warnings option]) ;;
esac],
[enableval=no])
if test "${enableval}" = yes; then
gl_COMPILER_FLAGS(-W)
gl_COMPILER_FLAGS(-Wall)
gl_COMPILER_FLAGS(-Wcast-align)
gl_COMPILER_FLAGS(-Wformat)
gl_COMPILER_FLAGS(-Wwrite-strings)
AC_SUBST([WARNING_CXXFLAGS], [$COMPILER_FLAGS])
# The following warnings are not suitable for C++.
gl_COMPILER_FLAGS(-Wbad-function-cast)
gl_COMPILER_FLAGS(-Wmissing-declarations)
gl_COMPILER_FLAGS(-Wmissing-prototypes)
gl_COMPILER_FLAGS(-Wshadow)
# gl_COMPILER_FLAGS(-Wstrict-prototypes)
AC_SUBST([WARNING_CFLAGS], [$COMPILER_FLAGS])
AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.])
COMPILER_FLAGS=
fi
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED)
AC_SUBST(GNUTLS_CFLAGS)
AC_SUBST(GNUTLS_LIBS)
if test "$WITH_PYTHON" = "yes"; then
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQUIRED)
AC_SUBST(PYGTK_CFLAGS)
AC_SUBST(PYGTK_LIBS)
AM_PATH_PYTHON
AC_MSG_CHECKING([whether $PYTHON version >= $PYTHON_REQUIRED])
HAVE_PYTHON_REQUIRED=no
AM_PYTHON_CHECK_VERSION([$PYTHON], [$PYTHON_REQUIRED],
[HAVE_PYTHON_REQUIRED="yes"],
[HAVE_PYTHON_REQUIRED="no"])
AC_MSG_RESULT($HAVE_PYTHON_REQUIRED)
if test "x$HAVE_PYTHON_REQUIRED" != "xyes"
then
AC_MSG_ERROR("No suitable python found")
fi
AM_CHECK_PYTHON_HEADERS(have_python_headers=yes,have_python_headers=no)
if test "x$have_python_headers" != "xyes"
then
AC_MSG_ERROR("No python development headers found")
fi
fi
AM_CONDITIONAL(WITH_PYTHON, [test "$WITH_PYTHON" = "yes"])
AC_CONFIG_FILES(
Makefile
src/Makefile
gtk-vnc-1.0.pc
gtk-vnc.spec
)
AC_OUTPUT
#
# dsextras.py - Extra classes and utilities for distutils, adding
# pkg-config support
from distutils.command.build_ext import build_ext
from distutils.command.install_lib import install_lib
from distutils.command.install_data import install_data
from distutils.extension import Extension
import distutils.dep_util
import fnmatch
import os
import re
import string
import sys
GLOBAL_INC = []
GLOBAL_MACROS = []
def get_m4_define(varname):
"""Return the value of a m4_define variable as set in configure.in."""
pattern = re.compile("m4_define\(" + varname + "\,\s*(.+)\)")
if os.path.exists('configure.ac'):
fname = 'configure.ac'
elif os.path.exists('configure.in'):
fname = 'configure.in'
else:
raise SystemExit('could not find configure file')
for line in open(fname).readlines():
match_obj = pattern.match(line)
if match_obj:
return match_obj.group(1)
return None
def getoutput(cmd):
"""Return output (stdout or stderr) of executing cmd in a shell."""
return getstatusoutput(cmd)[1]
def getstatusoutput(cmd):
"""Return (status, output) of executing cmd in a shell."""
if sys.platform == 'win32':
pipe = os.popen(cmd, 'r')
text = pipe.read()
sts = pipe.close() or 0
if text[-1:] == '\n':
text = text[:-1]
return sts, text
else:
from commands import getstatusoutput
return getstatusoutput(cmd)
def have_pkgconfig():
"""Checks for the existence of pkg-config"""
if (sys.platform == 'win32' and
os.system('pkg-config --version > NUL') == 0):
return 1
else:
if getstatusoutput('pkg-config')[0] == 256:
return 1
def list_files(dir):
"""List all files in a dir, with filename match support:
for example: glade/*.glade will return all files in the glade directory
that matches *.glade. It also looks up the full path"""
if dir.find(os.sep) != -1:
parts = dir.split(os.sep)
dir = string.join(parts[:-1], os.sep)
pattern = parts[-1]
else:
pattern = dir
dir = '.'
dir = os.path.abspath(dir)
retval = []
for file in os.listdir(dir):
if fnmatch.fnmatch(file, pattern):
retval.append(os.path.join(dir, file))
return retval
def pkgc_version_check(name, req_version):
"""Check the existence and version number of a package:
returns 0 if not installed or too old, 1 otherwise."""
is_installed = not os.system('pkg-config --exists %s' % name)
if not is_installed:
return 0
orig_version = getoutput('pkg-config --modversion %s' % name)
version = map(int, orig_version.split('.'))
pkc_version = map(int, req_version.split('.'))
if version >= pkc_version:
return 1
return 0
class BuildExt(build_ext):
def init_extra_compile_args(self):
self.extra_compile_args = []
if sys.platform == 'win32' and \
self.compiler.compiler_type == 'mingw32':
# MSVC compatible struct packing is required.
# Note gcc2 uses -fnative-struct while gcc3
# uses -mms-bitfields. Based on the version
# the proper flag is used below.
msnative_struct = { '2' : '-fnative-struct',
'3' : '-mms-bitfields' }
gcc_version = getoutput('gcc -dumpversion')
print 'using MinGW GCC version %s with %s option' % \
(gcc_version, msnative_struct[gcc_version[0]])
self.extra_compile_args.append(msnative_struct[gcc_version[0]])
def modify_compiler(self):
if sys.platform == 'win32' and \
self.compiler.compiler_type == 'mingw32':
# Remove '-static' linker option to prevent MinGW ld
# from trying to link with MSVC import libraries.
if self.compiler.linker_so.count('-static'):
self.compiler.linker_so.remove('-static')
def build_extensions(self):
# Init self.extra_compile_args
self.init_extra_compile_args()
# Modify default compiler settings
self.modify_compiler()
# Invoke base build_extensions()
build_ext.build_extensions(self)
def build_extension(self, ext):
# Add self.extra_compile_args to ext.extra_compile_args
ext.extra_compile_args += self.extra_compile_args
# Generate eventual templates before building
if hasattr(ext, 'generate'):
ext.generate()
# Filter out 'c' and 'm' libs when compilic w/ msvc
if sys.platform == 'win32' and self.compiler.compiler_type == 'msvc':
save_libs = ext.libraries
ext.libraries = [lib for lib in ext.libraries
if lib not in ['c', 'm']]
else:
save_libs = ext.libraries
# Invoke base build_extension()
build_ext.build_extension(self, ext)
if save_libs != None and save_libs != ext.libraries:
ext.libraries = save_libs
class InstallLib(install_lib):
local_outputs = []
local_inputs = []
def set_install_dir(self, install_dir):
self.install_dir = install_dir
def get_outputs(self):
return install_lib.get_outputs(self) + self.local_outputs
def get_inputs(self):
return install_lib.get_inputs(self) + self.local_inputs
class InstallData(install_data):
local_outputs = []
local_inputs = []
template_options = {}
def prepare(self):
if os.name == "nt":
self.prefix = os.sep.join(self.install_dir.split(os.sep)[:-3])
else:
# default: os.name == "posix"
self.prefix = os.sep.join(self.install_dir.split(os.sep)[:-4])
self.exec_prefix = '${prefix}/bin'