diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | debian/copyright | 50 | ||||
-rw-r--r-- | debian/libxcompshad-dev.install | 1 | ||||
-rwxr-xr-x | debian/rules | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/Imakefile | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Imakefile | 12 | ||||
-rw-r--r-- | nxcompshad/.gitignore | 23 | ||||
-rw-r--r-- | nxcompshad/Makefile.am | 21 | ||||
-rw-r--r-- | nxcompshad/Makefile.in | 251 | ||||
-rw-r--r-- | nxcompshad/configure.ac | 53 | ||||
-rw-r--r-- | nxcompshad/configure.in | 307 | ||||
-rw-r--r-- | nxcompshad/include/Shadow.h (renamed from nxcompshad/Shadow.h) | 2 | ||||
-rwxr-xr-x | nxcompshad/install-sh | 238 | ||||
l--------- | nxcompshad/m4/nx-macros.m4 | 1 | ||||
-rw-r--r-- | nxcompshad/nxcompshad.pc.in | 2 | ||||
-rw-r--r-- | nxcompshad/src/Core.cpp (renamed from nxcompshad/Core.cpp) | 46 | ||||
-rw-r--r-- | nxcompshad/src/Core.h (renamed from nxcompshad/Core.h) | 0 | ||||
-rw-r--r-- | nxcompshad/src/Input.cpp (renamed from nxcompshad/Input.cpp) | 4 | ||||
-rw-r--r-- | nxcompshad/src/Input.h (renamed from nxcompshad/Input.h) | 0 | ||||
-rw-r--r-- | nxcompshad/src/Logger.cpp (renamed from nxcompshad/Logger.cpp) | 24 | ||||
-rw-r--r-- | nxcompshad/src/Logger.h (renamed from nxcompshad/Logger.h) | 8 | ||||
-rw-r--r-- | nxcompshad/src/Makefile.am | 45 | ||||
-rw-r--r-- | nxcompshad/src/Manager.cpp (renamed from nxcompshad/Manager.cpp) | 4 | ||||
-rw-r--r-- | nxcompshad/src/Manager.h (renamed from nxcompshad/Manager.h) | 0 | ||||
-rw-r--r-- | nxcompshad/src/Misc.h (renamed from nxcompshad/Misc.h) | 0 | ||||
-rw-r--r-- | nxcompshad/src/Poller.h (renamed from nxcompshad/Poller.h) | 0 | ||||
-rw-r--r-- | nxcompshad/src/Regions.h (renamed from nxcompshad/Regions.h) | 2 | ||||
-rw-r--r-- | nxcompshad/src/Shadow.cpp (renamed from nxcompshad/Shadow.cpp) | 6 | ||||
-rw-r--r-- | nxcompshad/src/Updater.cpp (renamed from nxcompshad/Updater.cpp) | 4 | ||||
-rw-r--r-- | nxcompshad/src/Updater.h (renamed from nxcompshad/Updater.h) | 0 | ||||
-rw-r--r-- | nxcompshad/src/Win.cpp (renamed from nxcompshad/Win.cpp) | 4 | ||||
-rw-r--r-- | nxcompshad/src/Win.h (renamed from nxcompshad/Win.h) | 0 | ||||
-rw-r--r-- | nxcompshad/src/X11.cpp (renamed from nxcompshad/X11.cpp) | 4 | ||||
-rw-r--r-- | nxcompshad/src/X11.h (renamed from nxcompshad/X11.h) | 0 | ||||
-rw-r--r-- | nxcompshad/src/X11/include/XTest_nxcompshad.h (renamed from nxcompshad/X11/include/XTest_nxcompshad.h) | 0 | ||||
-rw-r--r-- | nxcompshad/src/X11/include/Xdamage_nxcompshad.h (renamed from nxcompshad/X11/include/Xdamage_nxcompshad.h) | 0 | ||||
-rw-r--r-- | nxcompshad/src/X11/include/Xrandr_nxcompshad.h (renamed from nxcompshad/X11/include/Xrandr_nxcompshad.h) | 0 |
37 files changed, 254 insertions, 864 deletions
@@ -78,7 +78,7 @@ build-full: # nxcomp{ext,shad}. cd nx-X11/lib && make - cd nxcompshad && autoconf && (${CONFIGURE}) && ${MAKE} + cd nxcompshad && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE} ./mesa-quilt push -a diff --git a/debian/copyright b/debian/copyright index b08ec0335..d9ef896b0 100644 --- a/debian/copyright +++ b/debian/copyright @@ -80,25 +80,25 @@ Files: nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h nx-X11/programs/Xserver/hw/nxagent/compext/Rle.h nx-X11/programs/Xserver/hw/nxagent/compext/Z.c nx-X11/programs/Xserver/hw/nxagent/compext/Z.h - nxcompshad/Core.cpp - nxcompshad/Core.h - nxcompshad/Input.cpp - nxcompshad/Input.h - nxcompshad/Logger.cpp - nxcompshad/Logger.h - nxcompshad/Manager.cpp - nxcompshad/Manager.h - nxcompshad/Misc.h - nxcompshad/Poller.h - nxcompshad/Regions.h - nxcompshad/Shadow.cpp - nxcompshad/Shadow.h - nxcompshad/Updater.cpp - nxcompshad/Updater.h - nxcompshad/Win.cpp - nxcompshad/Win.h - nxcompshad/X11.cpp - nxcompshad/X11.h + nxcompshad/include/Shadow.h + nxcompshad/src/Core.cpp + nxcompshad/src/Core.h + nxcompshad/src/Input.cpp + nxcompshad/src/Input.h + nxcompshad/src/Logger.cpp + nxcompshad/src/Logger.h + nxcompshad/src/Manager.cpp + nxcompshad/src/Manager.h + nxcompshad/src/Misc.h + nxcompshad/src/Poller.h + nxcompshad/src/Regions.h + nxcompshad/src/Shadow.cpp + nxcompshad/src/Updater.cpp + nxcompshad/src/Updater.h + nxcompshad/src/Win.cpp + nxcompshad/src/Win.h + nxcompshad/src/X11.cpp + nxcompshad/src/X11.h Copyright: 2001, 2011, NoMachine (http://www.nomachine.com) 2008-2014, Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> 2011-2016, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>*/ @@ -1001,7 +1001,7 @@ Files: nx-X11/include/XWDFile.h nx-X11/programs/Xserver/record/record.c nx-X11/programs/Xserver/record/set.c nx-X11/programs/Xserver/record/set.h - nxcompshad/X11/include/XTest_nxcompshad.h + nxcompshad/src/X11/include/XTest_nxcompshad.h Copyright: 1985, 1987, 1990, 1998, The Open Group 1985, 1987, 1994, 1998, The Open Group 1985, 1987, 1998, The Open Group @@ -1452,7 +1452,7 @@ Files: nx-X11/include/extensions/composite.h nx-X11/programs/Xserver/xfixes/xfixes.h nx-X11/programs/Xserver/xfixes/xfixesint.h nx-X11/programs/Xserver/Xext/shmint.h - nxcompshad/X11/include/Xdamage_nxcompshad.h + nxcompshad/src/X11/include/Xdamage_nxcompshad.h Copyright: 1998, Keith Packard 1999, Keith Packard 2002, Keith Packard @@ -2310,7 +2310,7 @@ Copyright: 2000, Compaq Computer Corporation License: MIT~X11 Files: nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h - nxcompshad/X11/include/Xrandr_nxcompshad.h + nxcompshad/src/X11/include/Xrandr_nxcompshad.h Copyright: 2000, Compaq Computer Corporation, Inc 2002, Hewlett-Packard Company, Inc 2006, Intel Corporation @@ -2908,10 +2908,11 @@ Files: ChangeLog nxcomp/VERSION nxcomp/configure.in nxcomp/nxcomp.pc.in - nxcompshad/Makefile.in + nxcompshad/Makefile.am nxcompshad/VERSION - nxcompshad/configure.in + nxcompshad/configure.ac nxcompshad/nxcompshad.pc.in + nxcompshad/src/Makefile.am nxproxy/VERSION nxproxy/man/nxproxy.1 nxproxy/Makefile.am @@ -2951,7 +2952,6 @@ Copyright: *No copyright* License: public-domain Files: nxcomp/install-sh - nxcompshad/install-sh Copyright: 1994, X Consortium License: Expat~NoAdvert Comment: diff --git a/debian/libxcompshad-dev.install b/debian/libxcompshad-dev.install index 2010f5950..68318ee03 100644 --- a/debian/libxcompshad-dev.install +++ b/debian/libxcompshad-dev.install @@ -1,3 +1,4 @@ usr/lib/*/libXcompshad.so +usr/lib/*/libXcompshad.a usr/include/*/nx/Shadow.h usr/lib/*/pkgconfig/nxcompshad.pc diff --git a/debian/rules b/debian/rules index adfc34e5e..b59ba83a5 100755 --- a/debian/rules +++ b/debian/rules @@ -25,7 +25,7 @@ override_dh_install: # remove static libs rm debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/libXcomp.a - rm debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/libXcompshad.a + rm debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/libXcompshad.la # remove extras, GL, and other unneeded headers rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/GL/ diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile index 055cbec33..5b289fae8 100644 --- a/nx-X11/lib/X11/Imakefile +++ b/nx-X11/lib/X11/Imakefile @@ -87,7 +87,7 @@ NX_XCOMPLIBTARGET = $(NX_XCOMPLIBDIR)/$(NX_XCOMPLIBNAME) NX_REQUIREDLIBS = -L$(NX_XCOMPLIBDIR) -l$(NX_XCOMPLIBLINK) NX_XCOMPCONFIGTARGET = $(NX_XCOMPLIBDIR)/config.status -NX_XCOMPEXTLIBDIR = $(XTOP)/../nxcompext +NX_XCOMPEXTLIBDIR = $(XTOP)/../nxcompext/src/.libs NX_XCOMPEXTLIBTARGET = $(NX_XCOMPEXTLIBDIR)/$(NX_XCOMPEXTLIBNAME) NX_XCOMPEXTCONFIGTARGET = $(NX_XCOMPEXTLIBDIR)/config.status diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index c5bbbeb75..ed49313ee 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -221,8 +221,8 @@ NX_XCOMP_HEADERS = \ ../../../nxcomp/NXvars.h \ $(NULL) -NX_XCOMPSHAD_HEADERS = \ - ../../../nxcompshad/Shadow.h \ +NX_XCOMPSHAD_HEADERS = \ + ../../../nxcompshad/include/Shadow.h \ $(NULL) NX_HEADERS = \ @@ -316,7 +316,7 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L/usr/sfw/lib \ -L../../../nxcomp \ - -L../../../nxcompshad \ + -L../../../nxcompshad/src/.libs \ -lrt \ -lXcomp \ -lXcompshad \ @@ -331,7 +331,7 @@ NXAGENTNXLIBS = -L/usr/sfw/lib \ $(NULL) #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L../../../nxcomp \ - -L../../../nxcompshad \ + -L../../../nxcompshad/src/.libs \ -lXcomp \ -lXcompshad \ -lXrender \ @@ -345,7 +345,7 @@ NXAGENTNXLIBS = -L../../../nxcomp \ #elif defined(OpenBSDArchitecture) NXAGENTNXLIBS = -L../../../nxcomp \ -L../../../nx-X11/exports/lib \ - -L../../../nxcompshad \ + -L../../../nxcompshad/src/.libs \ -lkvm \ -lXcomp \ -lXcompshad \ @@ -360,7 +360,7 @@ NXAGENTNXLIBS = -L../../../nxcomp \ $(NULL) #else NXAGENTNXLIBS = -L../../../nxcomp \ - -L../../../nxcompshad \ + -L../../../nxcompshad/src/.libs \ -lXcomp \ -lXcompshad \ -lXrender \ diff --git a/nxcompshad/.gitignore b/nxcompshad/.gitignore index f083c6b27..1eefcb7bf 100644 --- a/nxcompshad/.gitignore +++ b/nxcompshad/.gitignore @@ -1,2 +1,23 @@ -nxcompshad.pc Makefile +Makefile.in +aclocal.m4 +build-aux/compile +build-aux/config.guess +build-aux/config.sub +build-aux/depcomp +build-aux/install-sh +build-aux/ltmain.sh +build-aux/missing +config.h +config.h.in +libtool +m4/libtool.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/ltversion.m4 +m4/lt~obsolete.m4 +nxcompshad.pc +src/.deps/ +src/Makefile +src/Makefile.in +stamp-h1 diff --git a/nxcompshad/Makefile.am b/nxcompshad/Makefile.am new file mode 100644 index 000000000..f3666a08a --- /dev/null +++ b/nxcompshad/Makefile.am @@ -0,0 +1,21 @@ +SUBDIRS = src + +pkgconfig_DATA = nxcompshad.pc + +MAINTAINERCLEANFILES = \ + $(srcdir)/autom4te.cache/* \ + $(srcdir)/build-aux/* \ + $(srcdir)/Makefile.in \ + $(srcdir)/src/Makefile.in \ + $(srcdir)/aclocal.m4 \ + $(srcdir)/config.h.in \ + $(srcdir)/config.h.in~ \ + $(srcdir)/configure \ + $(srcdir)/m4/libtool.m4 \ + $(srcdir)/m4/lt~obsolete.m4 \ + $(srcdir)/m4/ltoptions.m4 \ + $(srcdir)/m4/ltsugar.m4 \ + $(srcdir)/m4/ltversion.m4 \ + $(NULL) + +DISTCLEANFILES=$(MAINTAINERCLEANFILES) diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in deleted file mode 100644 index 34b785d25..000000000 --- a/nxcompshad/Makefile.in +++ /dev/null @@ -1,251 +0,0 @@ -#/**************************************************************************/ -#/* */ -#/* Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com) */ -#/* Copyright (c) 2008-2014 Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> */ -#/* Copyright (c) 2014-2016 Ulrich Sibiller <uli42@gmx.de> */ -#/* Copyright (c) 2014-2016 Mihai Moldovan <ionic@ionic.de> */ -#/* Copyright (c) 2011-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>*/ -#/* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */ -#/* */ -#/* NXCOMPSHAD, NX protocol compression and NX extensions to this software */ -#/* are copyright of the aforementioned persons and companies. */ -#/* */ -#/* Redistribution and use of the present software is allowed according */ -#/* to terms specified in the file LICENSE which comes in the source */ -#/* distribution. */ -#/* */ -#/* All rights reserved. */ -#/* */ -#/* NOTE: This software has received contributions from various other */ -#/* contributors, only the core maintainers and supporters are listed as */ -#/* copyright holders. Please contact us, if you feel you should be listed */ -#/* as copyright holder, as well. */ -#/* */ -#/**************************************************************************/ - -# -# Get values from configure script. -# - -VERSION=@VERSION@ -LIBVERSION=@LIBVERSION@ - -# -# We would really like to enable all warnings, -Wredundant-decls, -# though, gives a warning caused by pthread.h and unistd.h and -# GCC 3.4 was changed in a way that it now complains about some -# of the -W directives we used before (-Wmissing-declarations, -# -Wnested-externs, -Wstrict-prototypes and -Wmissing-prototypes). -# - -CXX = @CXX@ -CXXFLAGS = @CXXFLAGS@ @X_CFLAGS@ @DEFS@ \ - -Wall -Wpointer-arith -CXXINCLUDES = -CXXDEFINES = - -CPPFLAGS = @CPPFLAGS@ - -# -# C programs don't share the C++ flags. They should -# have their own @CCFLAGS@. -# - -CC = @CC@ -CCFLAGS = @X_CFLAGS@ @DEFS@ \ - -Wall -Wpointer-arith -CCINCLUDES = -CCDEFINES = - -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -lNX_X11 - -# -# Only if THREADS is defined. -# -# LIBS = $(LIBS) -lpthread -# - -# -# Only if you want ElectricFence. -# -# LIBS = $(LIBS) -lefence -# - -# -# Only if you want mpatrol. -# -# LIBS = $(LIBS) -lmpatrol -lbfd -liberty -# - -srcdir = @srcdir@ -prefix = @prefix@ -datarootdir = @datarootdir@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -man1dir = @mandir@/man1 -VPATH = @srcdir@ -libdir = @libdir@ -includedir = @includedir@ -pkgconfigdir = @pkgconfigdir@ - -INSTALL = @INSTALL@ -INSTALL_DIR = $(INSTALL) -d -m 0755 -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_LINK = cp -av -DESTDIR = -RM_FILE = rm -f -RM_DIR = rmdir -p --ignore-fail-on-non-empty - -# -# This should be autodetected. -# - -MAKEDEPEND = @MAKEDEPEND@ -DEPENDINCLUDES = -I/usr/include/g++ -I/usr/include/g++-3 - -.SUFFIXES: .cpp.c - -.cpp.o: - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXINCLUDES) $(CXXDEFINES) $< -.c.o: - $(CC) -c $(CPPFLAGS) $(CCFLAGS) $(CCINCLUDES) $(CCDEFINES) $< - -LIBRARY = Xcompshad - -LIBNAME = lib$(LIBRARY) -ifeq ($(shell uname),Darwin) -LIBFULL = lib$(LIBRARY).$(VERSION).dylib -LIBLOAD = lib$(LIBRARY).$(LIBVERSION).dylib -LIBSHARED = lib$(LIBRARY).dylib -COMP_VER = $(shell echo '$(VERSION)' | cut -d '.' -f 1-3) -LIBFLAGS = -install_name $(libdir)/$(LIBLOAD) -compatibility_version $(LIBVERSION) -current_version $(COMP_VER) -else -LIBFULL = lib$(LIBRARY).so.$(VERSION) -LIBLOAD = lib$(LIBRARY).so.$(LIBVERSION) -LIBSHARED = lib$(LIBRARY).so -LIBFLAGS = -endif -LIBARCHIVE = lib$(LIBRARY).a - -MSRC = Main.c - -CSRC = - -CXXSRC = Core.cpp \ - Input.cpp \ - Logger.cpp \ - Shadow.cpp \ - X11.cpp \ - Win.cpp \ - Updater.cpp \ - Manager.cpp - -MOBJ = $(MSRC:.c.cpp=.o) -COBJ = $(CSRC:.c=.o) -CXXOBJ = $(CXXSRC:.cpp=.o) - -MLIBS = -L. -lXShadow - -ifeq ($(findstring -lgdi32,$(LIBS)),-lgdi32) - -# We need a smarter way to detect windows -# platform. - -LIBDLL = cyg$(LIBRARY).dll -LIBDLLSTATIC = lib${LIBRARY}.dll.a - -all: depend $(LIBARCHIVE) $(LIBDLL) - -else - -EXTRALIBS = -lXext -lXtst -lXrandr -lXdamage - -all: depend $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) - -endif - -$(LIBFULL): $(CXXOBJ) $(COBJ) - $(CXX) -o $@ $(LDFLAGS) $(LIBFLAGS) $(CXXOBJ) $(COBJ) $(LIBS) $(EXTRALIBS) - -$(LIBLOAD): $(LIBFULL) - rm -f $(LIBLOAD) - ln -s $(LIBFULL) $(LIBLOAD) - -$(LIBSHARED): $(LIBFULL) - rm -f $(LIBSHARED) - ln -s $(LIBFULL) $(LIBSHARED) - -$(LIBARCHIVE): $(CXXOBJ) $(COBJ) - rm -f $(LIBARCHIVE) - ar clq $(LIBARCHIVE) $(CXXOBJ) $(COBJ) - ranlib $(LIBARCHIVE) - -$(LIBDLL): $(LIBARCHIVE) - $(CC) -o $@ \ - -shared \ - -Wl,--out-implib=$(LIBDLLSTATIC) \ - -Wl,--export-all-symbols \ - -Wl,--enable-auto-import \ - -Wl,--whole-archive ${LIBARCHIVE} \ - -Wl,--no-whole-archive \ - ${LIBS} - -$(PROGRAM): $(MOBJ) $(COBJ) $(CXXOBJ) $(LIBDLL) -# $(CC) $(CCFLAGS) -o $@ $(MOBJ) $(MLIBS) - -depends: depend.status - -depend: depend.status - -depend.status: - if [ -n "$(MAKEDEPEND)" ] && [ -x "$(MAKEDEPEND)" ] ; then \ - $(MAKEDEPEND) $(CXXINCLUDES) $(CCINCLUDES) \ - $(DEPENDINCLUDES) -f Makefile $(MSRC) $(CSRC) $(CXXSRC) 2>/dev/null; \ - fi - touch depend.status - -install: install.bin install.lib install.man - -install.bin: - -install.lib: all - $(INSTALL_DIR) $(DESTDIR)${libdir} - $(INSTALL_DIR) $(DESTDIR)${pkgconfigdir} - $(INSTALL_DIR) $(DESTDIR)${includedir}/nx - $(INSTALL_DIR) $(DESTDIR)${pkgconfigdir} - $(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir} - $(INSTALL_LINK) $(LIBLOAD) $(DESTDIR)${libdir} - $(INSTALL_LINK) $(LIBSHARED) $(DESTDIR)${libdir} - $(INSTALL_DATA) $(LIBARCHIVE) $(DESTDIR)${libdir} - $(INSTALL_DATA) Shadow.h $(DESTDIR)${includedir}/nx - $(INSTALL_DATA) nxcompshad.pc $(DESTDIR)${pkgconfigdir} - echo "Running ldconfig tool, this may take a while..." && ldconfig || true - -install.man: - -uninstall: uninstall.bin uninstall.lib uninstall.man - -uninstall.bin: - -uninstall.lib: - $(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL) - $(RM_FILE) $(DESTDIR)${libdir}/$(LIBLOAD) - $(RM_FILE) $(DESTDIR)${libdir}/$(LIBSHARED) - $(RM_FILE) $(DESTDIR)${libdir}/$(LIBARCHIVE) - for header in *.h; do $(RM_FILE) $(DESTDIR)${includedir}/nx/$$header; done - $(RM_DIR) $(DESTDIR)${libdir}/nx/ - $(RM_DIR) $(DESTDIR)${includedir}/nx/ - $(RM_FILE) $(DESTDIR)${pkgconfigdir}/nxcompshad.pc - echo "Running ldconfig tool, this may take a while..." && ldconfig || true - -uninstall.man: - -clean: - -rm -f *~ *.o *.gch *.bak st?????? core core.* *.out.* *.exe.stackdump *.pc \ - $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) $(LIBDLL) $(LIBDLLSTATIC) $(PROGRAM) $(PROGRAM).exe - -distclean: clean - -rm -rf config.status config.log config.cache depend.status Makefile tags autom4te.cache configure diff --git a/nxcompshad/configure.ac b/nxcompshad/configure.ac new file mode 100644 index 000000000..b3abf0efb --- /dev/null +++ b/nxcompshad/configure.ac @@ -0,0 +1,53 @@ +dnl *************************************************************************** +dnl *** configure.ac for nxcompshad *** +dnl *************************************************************************** + +m4_define([nxcompshad_version], m4_esyscmd([tr -d '\n' < VERSION])) + +# Initialize Autoconf +AC_PREREQ(2.60) + +AC_INIT([libXcompshad], [nxcompshad_version], [https://github.com/ArcticaProject/nx-libs/issues]) +AC_PROG_CXX +AC_CONFIG_SRCDIR([Makefile.am]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([build-aux]) + +AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-xz]) + +# Initialize libtool +AC_PROG_LIBTOOL + +COMPSHAD_VERSION=nxcompshad_version +AC_SUBST([COMPSHAD_VERSION]) + +LT_COMPSHAD_VERSION=[`echo $COMPSHAD_VERSION | sed -r -e 's/^([0-9]+\.[0-9]+\.[0-9]+).*$/\1/' -e 's/\./:/g'`] +AC_SUBST([LT_COMPSHAD_VERSION]) + +PKG_CHECK_MODULES(Xext, xext) +PKG_CHECK_MODULES(Xdamage, xdamage) +PKG_CHECK_MODULES(Xrandr, xrandr) +PKG_CHECK_MODULES(Xtst, xtst) + +# Upstream's pkg.m4 (since 0.27) offers this now, but define our own +# compatible version in case the local version of pkgconfig isn't new enough. +# https://bugs.freedesktop.org/show_bug.cgi?id=48743 +m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], + [AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], + [install directory for nxcompshad.pc pkg-config file])], + [],[with_pkgconfigdir='$(libdir)/pkgconfig']) + AC_SUBST([pkgconfigdir], [${with_pkgconfigdir}])]) + +AC_LANG([C++]) +NX_COMPILER_BRAND +NX_COMPILER_FLAGS + +AC_CONFIG_FILES([ +Makefile +src/Makefile +nxcompshad.pc +]) + +AC_OUTPUT diff --git a/nxcompshad/configure.in b/nxcompshad/configure.in deleted file mode 100644 index bb9286e3d..000000000 --- a/nxcompshad/configure.in +++ /dev/null @@ -1,307 +0,0 @@ -dnl /**************************************************************************/ -dnl /* */ -dnl /* Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com) */ -dnl /* Copyright (c) 2008-2014 Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> */ -dnl /* Copyright (c) 2014-2016 Ulrich Sibiller <uli42@gmx.de> */ -dnl /* Copyright (c) 2014-2016 Mihai Moldovan <ionic@ionic.de> */ -dnl /* Copyright (c) 2011-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>*/ -dnl /* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */ -dnl /* */ -dnl /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */ -dnl /* are copyright of the aforementioned persons and companies. */ -dnl /* */ -dnl /* Redistribution and use of the present software is allowed according */ -dnl /* to terms specified in the file LICENSE which comes in the source */ -dnl /* distribution. */ -dnl /* */ -dnl /* All rights reserved. */ -dnl /* */ -dnl /* NOTE: This software has received contributions from various other */ -dnl /* contributors, only the core maintainers and supporters are listed as */ -dnl /* copyright holders. Please contact us, if you feel you should be listed */ -dnl /* as copyright holder, as well. */ -dnl /* */ -dnl /**************************************************************************/ - - -dnl Process this file with autoconf to produce a configure script. - -dnl Prolog - -AC_INIT(Shadow.h) -AC_PREREQ(2.13) - -pkgconfigdir=${libdir}/pkgconfig -AC_SUBST(pkgconfigdir) - -dnl Reset default compilation flags. - -if test "x$CXXFLAGS" == "x"; then - CXXFLAGS="-O3" -fi -if test "x$CPPFLAGS" == "x"; then - CPPFLAGS="-O3" -fi - -dnl Reset default linking directives. - -LIBSTATIC="" -LIBSHARED="" - -dnl Prefer headers and libraries from nx-X11, if present. - -if test -d "../nx-X11/exports/include" ; then - CXXFLAGS="$CXXFLAGS -I../nx-X11/exports/include" - LIBS="-L../nx-X11/exports/lib" -fi - -dnl Check whether --with-ipaq was given. - -if test "${with_ipaq}" = yes; then - echo -e "enabling IPAQ configuration" - CXX="arm-linux-c++" - CC="arm-linux-gcc" - unset ac_cv_prog_armcxx - unset ac_cv_prog_armcc - unset ac_cv_prog_CXXCPP - AC_CHECK_PROG([armcxx],["$CXX"],[yes],[no],[$PATH]) - AC_CHECK_PROG([armcc],["$CC"],[yes],[no],[$PATH]) - if test $armcxx = "yes" && test $armcc = "yes" ; then - ac_cv_prog_CXX="$CXX" - ac_cv_prog_CC="$CC" - else - AC_MSG_ERROR(installation or configuration problem: I cannot find compiler for arm-linux) - fi -else - unset ac_cv_prog_CXX - unset ac_cv_prog_CC - unset ac_cv_prog_CXXCPP -fi - -dnl Check for programs. - -AC_PROG_CXX -AC_PROG_CC -AC_LANG_CPLUSPLUS - -dnl Check whether option -Wno-deprecated -dnl is needed by GCC compiler. - -AC_MSG_CHECKING([whether compiler needs -Wno-deprecated]) -gcc_version=`${CC} --version | grep 'gcc (GCC) [[3-4]].' | head -n 1` -case "${gcc_version}" in - gcc*) - AC_MSG_RESULT([yes]) - CXXFLAGS="$CXXFLAGS -Wno-deprecated" - CPPFLAGS="$CPPFLAGS -Wno-deprecated" - ;; - - *) - AC_MSG_RESULT([no]) - ;; -esac - -AC_MSG_CHECKING([whether compiler accepts -Wmissing-declarations and -Wnested-externs]) -gcc_version=`${CC} --version | grep 'gcc (GCC) [[3-4]].' | head -n 1` -case "${gcc_version}" in - gcc*) - AC_MSG_RESULT([no]) - ;; - - *) - AC_MSG_RESULT([yes]) - CXXFLAGS="$CXXFLAGS -Wmissing-declarations" - CPPFLAGS="$CPPFLAGS -Wmissing-declarations" - ;; -esac - -dnl Check for BSD compatible install. - -AC_PROG_INSTALL - -dnl Check for extra header files. - -AC_PATH_XTRA - -dnl Custom addition. - -ac_help="$ac_help - --with-symbols give -g flag to compiler to produce debug symbols - --with-info define INFO at compile time to get basic log output - --with-valgrind clean up allocated buffers to avoid valgrind warnings - --with-version use this version for produced libraries - - --with-static-jpeg enable static linking of JPEG library - --with-static-z enable static linking of Z library" - -dnl Check to see if we're running under Cygwin32. - -AC_DEFUN(nxconf_CYGWIN32, -[AC_CACHE_CHECK(for Cygwin32 environment, nxconf_cv_cygwin32, -[AC_TRY_COMPILE(,[return __CYGWIN32__;], -nxconf_cv_cygwin32=yes, nxconf_cv_cygwin32=no) -rm -f conftest*]) -CYGWIN32= -test "$nxconf_cv_cygwin32" = yes && CYGWIN32=yes]) -nxconf_CYGWIN32 - -dnl Cygwin32 requires the stdc++ library explicitly linked. - -if test "$CYGWIN32" = yes; then - LIBS="$LIBS -lstdc++ -lcygipc -lgdi32" -fi - -dnl Check for Darwin environment. - -AC_DEFUN(nxconf_DARWIN, -[AC_CACHE_CHECK(for Darwin environment, nxconf_cv_darwin, -[AC_TRY_COMPILE(,[return __APPLE__;], -nxconf_cv_darwin=yes, nxconf_cv_darwin=no) -rm -f conftest*]) -DARWIN= -test "$nxconf_cv_darwin" = yes && DARWIN=yes]) -nxconf_DARWIN - -dnl Check to see if we're running under Solaris. - -AC_DEFUN(nxconf_SUN, -[AC_CACHE_CHECK(for Solaris environment, nxconf_cv_sun, -[AC_TRY_COMPILE(,[return __sun;], -nxconf_cv_sun=yes, nxconf_cv_sun=no) -rm -f conftest*]) -SUN= -test "$nxconf_cv_sun" = yes && SUN=yes]) -nxconf_SUN - -dnl Check to see if we're running under FreeBSD. - -AC_DEFUN(nxconf_FreeBSD, -[AC_CACHE_CHECK(for FreeBSD environment, nxconf_cv_freebsd, -[AC_TRY_COMPILE(,[return __FreeBSD__;], -nxconf_cv_freebsd=yes, nxconf_cv_freebsd=no) -rm -f conftest*]) -FreeBSD= -test "$nxconf_cv_freebsd" = yes && FreeBSD=yes]) -nxconf_FreeBSD - -dnl Build PIC libraries. - -if test "$CYGWIN32" != yes -a "$DARWIN" != yes; then - CXXFLAGS="$CXXFLAGS -fPIC" - CFLAGS="$CFLAGS -fPIC" -fi - -dnl Solaris requires the socket and gcc_s libs explicitly linked. -dnl Note also that headers from default /usr/openwin/include/X11 -dnl cause a warning due to pragma in Xmd.h. - -if test "$SUN" = yes; then - LIBS="$LIBS -L/usr/sfw/lib -lsocket " - CXXFLAGS="$CXXFLAGS -I/usr/sfw/include" -fi - -dnl On FreeBSD search libraries and includes under /usr/local. - -if test "$FreeBSD" = yes; then - LIBS="$LIBS -L/usr/local/lib" - CXXFLAGS="$CXXFLAGS -I/usr/local/include" -fi - -dnl Under Darwin we don't have support for -soname option and -dnl we need the -dynamiclib flag. Under Solaris, instead, we need -dnl the options -G -h. - -if test "$DARWIN" = yes; then - LDFLAGS="$LDFLAGS -dynamiclib" -elif test "$SUN" = yes; then - LDFLAGS="$LDFLAGS -G -h \$(LIBLOAD)" -else - LDFLAGS="$LDFLAGS -Wl,-soname,\$(LIBLOAD)" -fi - -dnl Check to see if in_addr_t is defined. -dnl Could use a specific configure test. - -AC_DEFUN(nxconf_INADDRT, -[AC_CACHE_CHECK(for in_addr_t, nxconf_cv_inaddrt, -[AC_TRY_COMPILE([#include <netinet/in.h>],[in_addr_t t; t = 1; return t;], -nxconf_cv_inaddrt=yes, nxconf_cv_inaddrt=no) -rm -f conftest*]) -INADDRT= -test "$nxconf_cv_inaddrt" = yes && INADDRT=yes]) -nxconf_INADDRT - -dnl If in_addr_t is not defined use unsigned int. - -if test "$INADDRT" != yes ; then - echo -e "using unsigned int for type in_addr_t" - CXXFLAGS="$CXXFLAGS -DIN_ADDR_T=unsigned" - CPPFLAGS="$CPPFLAGS -DIN_ADDR_T=unsigned" -else - CXXFLAGS="$CXXFLAGS -DIN_ADDR_T=in_addr_t" - CPPFLAGS="$CPPFLAGS -DIN_ADDR_T=in_addr_t" -fi - -dnl Check whether --with-version was given. - -AC_SUBST(LIBVERSION) -AC_SUBST(VERSION) -if test "${with_version}" = yes; then - VERSION=${ac_option} -else - VERSION=`cat VERSION` -fi -echo -e "compiling version ${VERSION}" - -LIBVERSION=`echo ${VERSION} | cut -d '.' -f 1` - -CXXFLAGS="$CXXFLAGS -DVERSION=\\\"${VERSION}\\\"" -CPPFLAGS="$CPPFLAGS -DVERSION=\\\"${VERSION}\\\"" - -dnl Finally compose the LIB variable. - -if test "$DARWIN" = yes ; then - LIBS="$LIBS $LIBSTATIC $LIBSHARED" -elif test "$SUN" = yes ; then - LIBS="$LIBS $LIBSTATIC $LIBSHARED" -else - LIBS="$LIBS $LIBSTATIC -shared $LIBSHARED" -fi - -dnl Check whether --with-symbols or --without-symbols was -dnl given and set the required optimization level. - -if test "${with_symbols}" = yes; then - echo -e "enabling production of debug symbols" - CXXFLAGS="-g $CXXFLAGS" - CPPFLAGS="-g $CPPFLAGS" -else - echo -e "disabling production of debug symbols" -fi - -dnl Check whether --with-info or --without-info was given. - -if test "${with_info}" = yes; then - echo -e "enabling info output in the log file" - CXXFLAGS="$CXXFLAGS -DINFO" - CPPFLAGS="$CPPFLAGS -DINFO" -else - echo -e "disabling info output in the log file" -fi - -dnl Check whether --with-valgrind or --without-valgrind was given. - -if test "${with_valgrind}" = yes; then - echo -e "enabling valgrind memory checker workarounds" - CXXFLAGS="$CXXFLAGS -DVALGRIND" - CPPFLAGS="$CPPFLAGS -DVALGRIND" -else - echo -e "disabling valgrind memory checker workarounds" -fi - -dnl Find makedepend somewhere. - -AC_SUBST(MAKEDEPEND) -MAKEDEPEND="$(which makedepend)" - -AC_OUTPUT(Makefile nxcompshad.pc) diff --git a/nxcompshad/Shadow.h b/nxcompshad/include/Shadow.h index e1c57c432..c59d91eeb 100644 --- a/nxcompshad/Shadow.h +++ b/nxcompshad/include/Shadow.h @@ -65,6 +65,8 @@ typedef struct _ShadowOptions extern ShadowOptions NXShadowOptions; +extern void NXShadowResetOptions(); + extern int NXShadowCreate(void *, char *, char *, void **); extern void NXShadowDestroy(void); diff --git a/nxcompshad/install-sh b/nxcompshad/install-sh deleted file mode 100755 index 58719246f..000000000 --- a/nxcompshad/install-sh +++ /dev/null @@ -1,238 +0,0 @@ -#! /bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. -# - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/nxcompshad/m4/nx-macros.m4 b/nxcompshad/m4/nx-macros.m4 new file mode 120000 index 000000000..813e9b041 --- /dev/null +++ b/nxcompshad/m4/nx-macros.m4 @@ -0,0 +1 @@ +../../m4/nx-macros.m4
\ No newline at end of file diff --git a/nxcompshad/nxcompshad.pc.in b/nxcompshad/nxcompshad.pc.in index 80b75e3f5..b12ca3e12 100644 --- a/nxcompshad/nxcompshad.pc.in +++ b/nxcompshad/nxcompshad.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@ Name: nxcompshad Description: Shadow Session Support for NX Compression Library -Version: @VERSION@ +Version: @COMPSHAD_VERSION@ Requires: nxcomp Requires.private: x11 Cflags: -I${includedir} diff --git a/nxcompshad/Core.cpp b/nxcompshad/src/Core.cpp index 1682d343f..2b2163ea1 100644 --- a/nxcompshad/Core.cpp +++ b/nxcompshad/src/Core.cpp @@ -23,6 +23,10 @@ /* */ /**************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <string.h> #include <sys/time.h> @@ -417,64 +421,64 @@ int CorePoller::isChanged(int (*checkIfInputCallback)(void *), void *arg, int *s if (foundChanges) { - int start, last, curLine, left, right; + int start, last, curWorkLine, left, right; - for (curLine = 0; curLine < (int) height_; curLine++) + for (curWorkLine = 0; curWorkLine < (int) height_; curWorkLine++) { - if (lineStatus_[curLine] == LINE_HAS_CHANGED) + if (lineStatus_[curWorkLine] == LINE_HAS_CHANGED) { break; } } - start = curLine; - last = curLine; + start = curWorkLine; + last = curWorkLine; - left = lefts_[curLine]; - right = rights_[curLine]; - curLine++; + left = lefts_[curWorkLine]; + right = rights_[curWorkLine]; + curWorkLine++; while (1) { - for (; curLine < (int) height_; curLine++) + for (; curWorkLine < (int) height_; curWorkLine++) { - if (lineStatus_[curLine] == LINE_HAS_CHANGED) + if (lineStatus_[curWorkLine] == LINE_HAS_CHANGED) { break; } } - if (curLine == (int) height_) + if (curWorkLine == (int) height_) { break; } - if ((curLine - last > minSliceHeight_) || (last - start > maxSliceHeight_)) + if ((curWorkLine - last > minSliceHeight_) || (last - start > maxSliceHeight_)) { XRectangle rect = {left, start, right - left + 1, last - start + 1}; XUnionRectWithRegion(&rect, lastUpdatedRegion_, lastUpdatedRegion_); - start = curLine; - left = lefts_[curLine]; - right = rights_[curLine]; + start = curWorkLine; + left = lefts_[curWorkLine]; + right = rights_[curWorkLine]; } else { - if (lefts_[curLine] < left) + if (lefts_[curWorkLine] < left) { - left = lefts_[curLine]; + left = lefts_[curWorkLine]; } - if (rights_[curLine] > right) + if (rights_[curWorkLine] > right) { - right = rights_[curLine]; + right = rights_[curWorkLine]; } } - last = curLine; + last = curWorkLine; - curLine++; + curWorkLine++; } // diff --git a/nxcompshad/Core.h b/nxcompshad/src/Core.h index 91f3f1e22..91f3f1e22 100644 --- a/nxcompshad/Core.h +++ b/nxcompshad/src/Core.h diff --git a/nxcompshad/Input.cpp b/nxcompshad/src/Input.cpp index a79b30459..8de74c3c3 100644 --- a/nxcompshad/Input.cpp +++ b/nxcompshad/src/Input.cpp @@ -23,6 +23,10 @@ /* */ /**************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <string.h> #define PANIC diff --git a/nxcompshad/Input.h b/nxcompshad/src/Input.h index cbba029a9..cbba029a9 100644 --- a/nxcompshad/Input.h +++ b/nxcompshad/src/Input.h diff --git a/nxcompshad/Logger.cpp b/nxcompshad/src/Logger.cpp index f27c97c19..2f3eab65c 100644 --- a/nxcompshad/Logger.cpp +++ b/nxcompshad/src/Logger.cpp @@ -23,6 +23,10 @@ /* */ /**************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdio.h> #include <ctype.h> #include <unistd.h> @@ -37,11 +41,14 @@ Logger logger; -void Logger::user(const char *format, va_list arguments) +void Logger::user(const char *format, ...) { char string[1024]; + va_list arguments; + va_start(arguments, format); vsnprintf(string, 1024, format, arguments); + va_end(arguments); fprintf(stderr, "%s\n", string); } @@ -52,20 +59,26 @@ void Logger::error(const char *name, int error) name, error, strerror(error)); } -void Logger::warning(const char *name, const char *format, va_list arguments) +void Logger::warning(const char *name, const char *format, ...) { char string[1024]; + va_list arguments; + va_start(arguments, format); vsnprintf(string, 1024, format, arguments); + va_end(arguments); fprintf(stderr, "%s: WARNING! %s\n", name, string); } -void Logger::test(const char *name, const char *format, va_list arguments) +void Logger::test(const char *name, const char *format, ...) { char string[1024]; + va_list arguments; + va_start(arguments, format); vsnprintf(string, 1024, format, arguments); + va_end(arguments); fprintf(stderr, "%s: %s\n", name, string); } @@ -75,11 +88,14 @@ void Logger::trace(const char *name) fprintf(stderr, "%s\n", name); } -void Logger::debug(const char *name, const char *format, va_list arguments) +void Logger::debug(const char *name, const char *format, ...) { char string[1024]; + va_list arguments; + va_start(arguments, format); vsnprintf(string, 1024, format, arguments); + va_end(arguments); fprintf(stderr, "%s: %s\n", name, string); } diff --git a/nxcompshad/Logger.h b/nxcompshad/src/Logger.h index eba81f642..37b378cb2 100644 --- a/nxcompshad/Logger.h +++ b/nxcompshad/src/Logger.h @@ -43,17 +43,17 @@ class Logger { public: - void user(const char *format, va_list arguments); + void user(const char *format, ...) __attribute__((format(gnu_printf, 2, 3))); void error(const char *name, int error); - void warning(const char *name, const char *format, va_list arguments); + void warning(const char *name, const char *format, ...) __attribute__((format(gnu_printf, 3, 4))); - void test(const char *name, const char *format, va_list arguments); + void test(const char *name, const char *format, ...) __attribute__((format(gnu_printf, 3, 4))); void trace(const char *name); - void debug(const char *name, const char *format, va_list arguments); + void debug(const char *name, const char *format, ...) __attribute__((format(gnu_printf, 3, 4))); void dump(const char *name, const char *data, int size); }; diff --git a/nxcompshad/src/Makefile.am b/nxcompshad/src/Makefile.am new file mode 100644 index 000000000..c7f45ba27 --- /dev/null +++ b/nxcompshad/src/Makefile.am @@ -0,0 +1,45 @@ +NULL = + +lib_LTLIBRARIES = libXcompshad.la + +libXcompshad_la_SOURCES = \ + Core.cpp \ + Input.cpp \ + Logger.cpp \ + Manager.cpp \ + Shadow.cpp \ + Updater.cpp \ + Win.cpp \ + X11.cpp \ + $(NULL) + +libXcompshad_la_LIBADD = \ + @Xext_LIBS@ \ + @Xdamage_LIBS@ \ + @Xrandr_LIBS@ \ + @Xtst_LIBS@ \ + -L$(top_srcdir)/../nx-X11/exports/lib -lNX_X11 \ + $(NULL) + +AM_CFLAGS = \ + $(Xext_CFLAGS) \ + $(Xdamage_CFLAGS) \ + $(Xrandr_CFLAGS) \ + $(Xtst_CFLAGS) \ + $(NULL) + +AM_CXXFLAGS = \ + $(BASE_CXXFLAGS) \ + $(NULL) + +AM_CPPFLAGS = \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/../nx-X11/exports/include \ + $(NULL) + +libXcompshad_la_LDFLAGS = -version-number @LT_COMPSHAD_VERSION@ -no-undefined + +libXcompshadincludedir = $(includedir)/nx +libXcompshadinclude_HEADERS = \ + $(top_srcdir)/include/Shadow.h \ + $(NULL) diff --git a/nxcompshad/Manager.cpp b/nxcompshad/src/Manager.cpp index 3bb36c13f..6e3f6b1b0 100644 --- a/nxcompshad/Manager.cpp +++ b/nxcompshad/src/Manager.cpp @@ -23,6 +23,10 @@ /* */ /**************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <nx-X11/Xlib.h> #include <nx-X11/Xutil.h> #include <nx-X11/keysym.h> diff --git a/nxcompshad/Manager.h b/nxcompshad/src/Manager.h index 92a82cd32..92a82cd32 100644 --- a/nxcompshad/Manager.h +++ b/nxcompshad/src/Manager.h diff --git a/nxcompshad/Misc.h b/nxcompshad/src/Misc.h index 9386dc080..9386dc080 100644 --- a/nxcompshad/Misc.h +++ b/nxcompshad/src/Misc.h diff --git a/nxcompshad/Poller.h b/nxcompshad/src/Poller.h index 6236f872f..6236f872f 100644 --- a/nxcompshad/Poller.h +++ b/nxcompshad/src/Poller.h diff --git a/nxcompshad/Regions.h b/nxcompshad/src/Regions.h index 59fdcb46c..2bc24a39c 100644 --- a/nxcompshad/Regions.h +++ b/nxcompshad/src/Regions.h @@ -33,7 +33,7 @@ typedef struct { short x1, x2, y1, y2; } Box, BOX, BoxRec, *BoxPtr; -typedef struct _XRegion { +struct _XRegion { long size; long numRects; BOX *rects; diff --git a/nxcompshad/Shadow.cpp b/nxcompshad/src/Shadow.cpp index 643a5a807..c928e6ffd 100644 --- a/nxcompshad/Shadow.cpp +++ b/nxcompshad/src/Shadow.cpp @@ -23,6 +23,10 @@ /* */ /**************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <signal.h> #include <string.h> @@ -53,8 +57,6 @@ static UpdateManager *updateManager; static Poller *poller; static Input *input; -int NXShadowRemoveAllUpdaters(); - inline bool NXShadowNotInitialized() { // diff --git a/nxcompshad/Updater.cpp b/nxcompshad/src/Updater.cpp index 67f4f9628..4b677a78c 100644 --- a/nxcompshad/Updater.cpp +++ b/nxcompshad/src/Updater.cpp @@ -23,6 +23,10 @@ /* */ /**************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <nx-X11/Xlib.h> #include <nx-X11/Xutil.h> #include <nx-X11/keysym.h> diff --git a/nxcompshad/Updater.h b/nxcompshad/src/Updater.h index 10d75c0d6..10d75c0d6 100644 --- a/nxcompshad/Updater.h +++ b/nxcompshad/src/Updater.h diff --git a/nxcompshad/Win.cpp b/nxcompshad/src/Win.cpp index b3a06f415..6033f2c1b 100644 --- a/nxcompshad/Win.cpp +++ b/nxcompshad/src/Win.cpp @@ -23,6 +23,10 @@ /* */ /**************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #if defined(__CYGWIN32__) || defined(WIN32) #include <nx-X11/keysym.h> diff --git a/nxcompshad/Win.h b/nxcompshad/src/Win.h index 615f9a5f5..615f9a5f5 100644 --- a/nxcompshad/Win.h +++ b/nxcompshad/src/Win.h diff --git a/nxcompshad/X11.cpp b/nxcompshad/src/X11.cpp index d1af82281..3643df731 100644 --- a/nxcompshad/X11.cpp +++ b/nxcompshad/src/X11.cpp @@ -23,6 +23,10 @@ /* */ /**************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #if !defined(__CYGWIN32__) && !defined(WIN32) #define PANIC diff --git a/nxcompshad/X11.h b/nxcompshad/src/X11.h index 87dd31fea..87dd31fea 100644 --- a/nxcompshad/X11.h +++ b/nxcompshad/src/X11.h diff --git a/nxcompshad/X11/include/XTest_nxcompshad.h b/nxcompshad/src/X11/include/XTest_nxcompshad.h index 91a2ba40b..91a2ba40b 100644 --- a/nxcompshad/X11/include/XTest_nxcompshad.h +++ b/nxcompshad/src/X11/include/XTest_nxcompshad.h diff --git a/nxcompshad/X11/include/Xdamage_nxcompshad.h b/nxcompshad/src/X11/include/Xdamage_nxcompshad.h index cae3e1c67..cae3e1c67 100644 --- a/nxcompshad/X11/include/Xdamage_nxcompshad.h +++ b/nxcompshad/src/X11/include/Xdamage_nxcompshad.h diff --git a/nxcompshad/X11/include/Xrandr_nxcompshad.h b/nxcompshad/src/X11/include/Xrandr_nxcompshad.h index 4feb01685..4feb01685 100644 --- a/nxcompshad/X11/include/Xrandr_nxcompshad.h +++ b/nxcompshad/src/X11/include/Xrandr_nxcompshad.h |