Commit 80b5de3f authored by Mike Gabriel's avatar Mike Gabriel

nxcompext: Move code into Xserver subtree, as nxcompext requires Xserver includes at build time.

Fixes ArcticaProject/nx-libs#276.
parent cae394b4
......@@ -29,7 +29,6 @@ SHELL:=/bin/bash
if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp $@; fi
if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy $@; fi
if test -d nx-X11; then \
if test -f nxcompext/Makefile; then ${MAKE} -C nxcompext $@; fi; \
if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \
if test -f nx-X11/Makefile; then ${MAKE} -C nx-X11 $@; fi; \
fi
......@@ -70,7 +69,6 @@ build-full:
# nxcomp{ext,shad}.
cd nx-X11/lib && make
cd nxcompext && autoconf && (${CONFIGURE}) && ${MAKE}
cd nxcompshad && autoconf && (${CONFIGURE}) && ${MAKE}
cd nx-X11 && ${MAKE} World
......@@ -112,8 +110,7 @@ install-full:
sed -e 's|@@NXLIBDIR@@|$(NXLIBDIR)|g' bin/nxagent.in > bin/nxagent
$(INSTALL_PROGRAM) bin/nxagent $(DESTDIR)$(BINDIR)
for d in nxcompext nxcompshad; do \
$(MAKE) -C $$d install; done
$(MAKE) -C nxcompshad install
$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/pixmaps
$(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm $(DESTDIR)$(PREFIX)/share/pixmaps
......@@ -198,7 +195,6 @@ uninstall-full:
$(RM_DIR) $(DESTDIR)$(NXLIBDIR)/share/nx/
if test -d nx-X11; then \
if test -f nxcompext/Makefile; then ${MAKE} -C nxcompext $@; fi; \
if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \
if test -f nx-X11/Makefile; then \
if test -d $(NXLIBDIR); then rm -rf $(NXLIBDIR); fi; \
......
......@@ -326,7 +326,6 @@ Depends:
${shlibs:Depends},
${misc:Depends},
libxcomp3 (= ${binary:Version}),
libxcompext3 (= ${binary:Version}),
libxcompshad3 (= ${binary:Version}),
libnx-x11-6 (= ${binary:Version}),
Recommends:
......@@ -334,8 +333,10 @@ Recommends:
xkb-data,
Breaks:
nxauth,
libxcompext3 (<< 2:3.5.99.3~),
Replaces:
nxauth,
libxcompext3,
Description: NX agent
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
......@@ -470,58 +471,6 @@ Description: nx-X11 compression library (debug package)
.
This package contains debug symbols for this library.
Package: libxcompext3
Architecture: any
Multi-Arch: same
Depends:
${shlibs:Depends},
${misc:Depends},
libnx-x11-6 (= ${binary:Version}),
Breaks: nxcompext (<=3.5.1)
Replaces: nxcompext
Description: nx-X11 protocol compression extensions library
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
This package extends the core NX library with additional features.
Package: libxcompext-dev
Provides: libxcompext3-dev
Architecture: any
Section: libdevel
Depends:
libxcompext3 (= ${binary:Version}),
${misc:Depends},
libxcomp-dev,
Breaks: nxcompext-dev (<=3.5.1),
Replaces: nxcompext-dev,
Description: nx-X11 protocol compression extensions library (development headers)
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
This package extends the core NX library with additional features.
.
This package contains the development headers for this library.
Package: libxcompext3-dbg
Architecture: any
Multi-Arch: same
Depends:
libxcompext3 (= ${binary:Version}),
${misc:Depends},
Section: debug
Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~),
Description: nx-X11 protocol compression extensions library (debug package)
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
This package extends the core NX library with additional features.
.
This package contains debug symbols for this library.
Package: libxcompshad3
Architecture: any
Multi-Arch: same
......
usr/lib/*/libXcompext.so
usr/include/*/nx/NXlib.h
usr/lib/*/pkgconfig/nxcompext.pc
usr/share/doc/libxcompext3 usr/share/doc/libxcompext3-dev
usr/lib/*/libXcompext.so.*
libXcompext.so.3 libxcompext3 #MINVER#
AlphaCompressData@Base 3.5.0.29
BitmapCompressData@Base 3.5.0.29
CleanXYImage@Base 3.5.0.29
CleanZImage@Base 3.5.0.29
ColormapCompressData@Base 3.5.0.29
CopyAndCleanImage@Base 3.5.0.29
FindLSB@Base 3.5.0.29
JpegCompressData@Base 3.5.0.29
MaskImage@Base 3.5.0.29
MaskInPlaceImage@Base 3.5.0.29
NXAbortSplit@Base 3.5.0.29
NXAllocColors@Base 3.5.0.29
NXAllocSplit@Base 3.5.0.29
NXAllocUnpack@Base 3.5.0.29
NXCacheAddImage@Base 3.5.0.29
NXCacheFindImage@Base 3.5.0.29
NXCleanImage@Base 3.5.0.29
NXCollectGrabPointer@Base 3.5.0.29
NXCollectImage@Base 3.5.0.29
NXCollectInputFocus@Base 3.5.0.29
NXCollectProperty@Base 3.5.0.29
NXCommitSplit@Base 3.5.0.29
NXCreatePackedImage@Base 3.5.0.29
NXCreatePalette16@Base 3.5.0.29
NXCreatePalette32@Base 3.5.0.29
NXDestroyPackedImage@Base 3.5.0.29
NXDisplayCongestion@Base 3.5.0.29
NXDisplayError@Base 3.5.0.29
NXDisplayFlushable@Base 3.5.0.29
NXDisplayReadable@Base 3.5.0.29
NXEncodeAlpha@Base 3.5.0.29
NXEncodeBitmap@Base 3.5.0.29
NXEncodeColormap@Base 3.5.0.29
NXEncodeColors@Base 3.5.0.29
NXEncodeJpeg@Base 3.5.0.29
NXEncodePng@Base 3.5.0.29
NXEncodeRgb@Base 3.5.0.29
NXEncodeRle@Base 3.5.0.29
NXEndSplit@Base 3.5.0.29
NXFinishSplit@Base 3.5.0.29
NXFlushDisplay@Base 3.5.0.29
NXForceDisplayError@Base 3.5.0.29
NXFreeCache@Base 3.5.0.29
NXFreeSplit@Base 3.5.0.29
NXFreeUnpack@Base 3.5.0.29
NXGetCollectGrabPointerResource@Base 3.5.0.29
NXGetCollectImageResource@Base 3.5.0.29
NXGetCollectInputFocusResource@Base 3.5.0.29
NXGetCollectPropertyResource@Base 3.5.0.29
NXGetCollectedGrabPointer@Base 3.5.0.29
NXGetCollectedImage@Base 3.5.0.29
NXGetCollectedInputFocus@Base 3.5.0.29
NXGetCollectedProperty@Base 3.5.0.29
NXGetControlParameters@Base 3.5.0.29
NXGetFontParameters@Base 3.5.0.29
NXGetShmemParameters@Base 3.5.0.29
NXGetUnpackParameters@Base 3.5.0.29
NXHandleDisplayError@Base 3.5.0.29
NXImageCache@Base 3.5.0.29
NXImageCacheHits@Base 3.5.0.29
NXImageCacheOps@Base 3.5.0.29
NXImageCacheSize@Base 3.5.0.29
NXInPlacePackImage@Base 3.5.0.29
NXInitCache@Base 3.5.0.29
NXInitDisplay@Base 3.5.0.29
NXMaskImage@Base 3.5.0.29
NXPackImage@Base 3.5.0.29
NXPutPackedImage@Base 3.5.0.29
NXResetDisplay@Base 3.5.0.29
NXSetCacheParameters@Base 3.5.0.29
NXSetDisplayBlockHandler@Base 3.5.0.29
NXSetDisplayBuffer@Base 3.5.0.29
NXSetDisplayErrorPredicate@Base 3.5.0.29
NXSetDisplayFlushHandler@Base 3.5.0.29
NXSetDisplayPolicy@Base 3.5.0.29
NXSetDisplayStatisticsHandler@Base 3.5.0.29
NXSetDisplayWriteHandler@Base 3.5.0.29
NXSetExposeParameters@Base 3.5.0.29
NXSetLostSequenceHandler@Base 3.5.0.29
NXSetUnpackAlpha@Base 3.5.0.29
NXSetUnpackAlphaCompat@Base 3.5.0.29
NXSetUnpackColormap@Base 3.5.0.29
NXSetUnpackColormapCompat@Base 3.5.0.29
NXSetUnpackGeometry@Base 3.5.0.29
NXStartSplit@Base 3.5.0.29
NXUnsetLibraryPath@Base 3.5.0.29
PackImage@Base 3.5.0.29
PngCompareColorTable@Base 3.5.0.29
PngCompressData@Base 3.5.0.29
RgbCompressData@Base 3.5.0.29
RleCompressData@Base 3.5.0.29
ZCompressData@Base 3.5.0.29
ZInitEncoder@Base 3.5.0.29
ZResetEncoder@Base 3.5.0.29
_NXInternalInitEncoders@Base 3.5.0.29
_NXInternalInitResources@Base 3.5.0.29
_NXInternalResetEncoders@Base 3.5.0.29
_NXInternalResetResources@Base 3.5.0.29
color_type@Base 3.5.0.29
info_ptr@Base 3.5.0.29
palette@Base 3.5.0.29
png_ptr@Base 3.5.0.29
......@@ -57,7 +57,6 @@ override_dh_strip:
dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg
dh_strip -plibxcomp3 --dbg-package=libxcomp3-dbg
dh_strip -plibxcompshad3 --dbg-package=libxcompshad3-dbg
dh_strip -plibxcompext3 --dbg-package=libxcompext3-dbg
dh_strip -pnxagent --dbg-package=nxagent-dbg
dh_strip -pnxproxy --dbg-package=nxproxy-dbg
......
......@@ -214,21 +214,18 @@ NXAGENTDDXDIR = hw
NXAGENTDIRS = $(STDDIRS) $(FBDIR) $(MIDAMAGEDIR) $(NXAGENTDDXDIR) $(DEPDIRS)
NX_XCOMP_HEADERS = \
../../../nxcomp/MD5.h \
../../../nxcomp/NXalert.h \
../../../nxcomp/NX.h \
../../../nxcomp/NXpack.h \
../../../nxcomp/NXproto.h \
../../../nxcomp/NXvars.h
NX_XCOMPEXT_HEADERS = \
../../../nxcompext/NXlib.h
NX_XCOMPSHAD_HEADERS = \
../../../nxcompshad/Shadow.h
NX_HEADERS = \
$(NX_XCOMP_HEADERS) \
$(NX_XCOMPEXT_HEADERS) \
$(NX_XCOMPSHAD_HEADERS)
BuildIncludes($(NX_HEADERS),nx,..)
......@@ -295,11 +292,17 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
XPMLIB = -lXpm
XMLLIB = `pkg-config --libs libxml-2.0`
PIXMANLIB = `pkg-config --libs pixman-1`
ZLIB = `pkg-config --libs zlib`
PNGLIB = `pkg-config --libs libpng`
JPEGLIB = -ljpeg
NXAGENT = hw/nxagent/LibraryTargetName(nxagent)
NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXAGENT) $(MI)
NXAGENTSYSLIBS = $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) $(XMLLIB) $(PIXMANLIB)
NXCOMPEXT = hw/nxagent/compext/LibraryTargetName(compext)
NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXCOMPEXT) $(NXAGENT) $(MI)
NXAGENTSYSLIBS = $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) $(XMLLIB)
NXCOMPEXTSYSLIBS = $(PIXMANLIB) $(ZLIB) $(PNGLIB) $(JPEGLIB)
#if HasParallelMake
MakeMutex($(NXAGENTDIRS) $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS))
MakeMutex($(NXAGENTDIRS) $(NXCOMPEXT) $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXCOMPEXTSYSLIBS) $(NXAGENTSYSLIBS))
#endif
#if ForceServerRemake
$(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS)
......@@ -314,26 +317,26 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS)
NXAGENTNXLIBS = -L/usr/sfw/lib \
-L ../../../nxcomp \
-L../../../nx-X11/exports/lib \
-L ../../../nxcompext -L ../../../nxcompshad \
-L ../../../nxcompshad \
-lrt \
-lXcomp \
-lXcompext -lXcompshad \
-lXcompshad \
-lXrender -lXfixes -lXfont -lXcomposite -lXinerama -lXdmcp \
-lNX_X11 -lXext
#elif defined(cygwinArchitecture)
NXAGENTNXLIBS = -L ../../../nxcomp \
-L../../../nx-X11/exports/lib \
-L ../../../nxcompext -L ../../../nxcompshad \
-L ../../../nxcompshad \
-lXcomp \
-lXcompext -lXcompshad \
-lXcompshad \
-lXrender -lXfixes -lXfont -lXcomposite -lXdmcp \
-lNX_X11 -lXext
#else
NXAGENTNXLIBS = -L ../../../nxcomp \
-L../../../nx-X11/exports/lib \
-L ../../../nxcompext -L ../../../nxcompshad \
-L ../../../nxcompshad \
-lXcomp \
-lXcompext -lXcompshad \
-lXcompshad \
-lXrender -lXfixes -lXfont -lXcomposite -lXinerama -lXdmcp \
-lNX_X11 -lXext
#endif
......@@ -346,7 +349,7 @@ NX_XSHADOWLIBNAME = libXcompshad.so
#endif
ServerTarget(nxagent,$(NXAGENTDIRS),$(NXAGENTOBJS), \
$(LIBCWRAPPER) $(NXAGENTLIBS) $(LOADABLEEXTS),$(NXAGENTSYSLIBS) $(NXAGENTNXLIBS))
$(LIBCWRAPPER) $(NXCOMPEXT) $(NXAGENTLIBS) $(LOADABLEEXTS),$(NXCOMPEXTSYSLIBS) $(NXAGENTSYSLIBS) $(NXAGENTNXLIBS))
/*
* Hard coded target to build a static nxagent server.
......@@ -356,8 +359,8 @@ nxagent_static: nxagent
$(MV) nxagent_static nxagent_static.bak; \
else exit 0; fi
$(CCLINK) -o nxagent_static -static $(LDOPTIONS) $(NXAGENTOBJS) \
$(LIBCWRAPPER) $(NXAGENTLIBS) $(LOADABLEEXTS) $(LDLIBS) \
$(NXAGENTSYSLIBS) $(EXTRA_LOAD_FLAGS)
$(LIBCWRAPPER) $(NXCOMPEXT) $(NXAGENTLIBS) $(LOADABLEEXTS) $(LDLIBS) \
$(NXCOMPEXTSYSLIBS) $(NXAGENTSYSLIBS) $(EXTRA_LOAD_FLAGS)
/*
* Hard coded target to build a static nxagent server except for libX11 and libXext.
......
......@@ -75,7 +75,7 @@ is" without express or implied warranty.
* NX includes and definitions.
*/
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include <nx/NXpack.h>
/*
......
......@@ -57,7 +57,7 @@
* definition of GC in Agent.h.
*/
#include <nx/NXlib.h>
#include "compext/Compext.h"
/*
* Set here the required log level.
......
......@@ -46,7 +46,7 @@
* Use asyncronous get property replies.
*/
#include <nx/NXlib.h>
#include "compext/Compext.h"
/*
* Set here the required log level.
......
......@@ -65,7 +65,7 @@ is" without express or implied warranty.
#include "windowstr.h"
#include "resource.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
/*
* Set here the required log level.
......
......@@ -42,7 +42,7 @@
#include "Dialog.h"
#include <nx/NX.h>
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include <nx/NXalert.h>
/*
......
......@@ -87,7 +87,7 @@ is" without express or implied warranty.
#include "Handlers.h"
#include <nx/NX.h>
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include NXAGENT_ICON_NAME
#include X2GOAGENT_ICON_NAME
......
......@@ -42,7 +42,7 @@
#include "Reconnect.h"
#include "GCOps.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include "mibstorest.h"
......
......@@ -102,7 +102,7 @@
#include <nx/Shadow.h>
#include "X11/include/Xrandr_nxagent.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
/*
* Set here the required log level. Please note
......
......@@ -58,7 +58,7 @@ is" without express or implied warranty.
#include "Args.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include <nx/NXalert.h>
#include <string.h>
......
......@@ -58,7 +58,7 @@ is" without express or implied warranty.
#include "Args.h"
#include "Screen.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
/*
* Set here the required log level.
......
......@@ -41,7 +41,7 @@
#include "Millis.h"
#define Window XlibWindow
#include <nx/NXlib.h>
#include "compext/Compext.h"
#undef Window
#include <nx/Shadow.h>
......@@ -992,14 +992,14 @@ void nxagentHandleCollectInputFocusEvent(int resource)
* While we don't even need window or revert_to later on, a discrepancy in
* data type sizes between the X server (Window being a 32bit ID) and
* the Xlib (Window being a 64bit ID) will lead to stack corruption here.
* Calling functions from nxcompext from nxagent sounds like a very bad idea
* Calling functions from CompExt from nxagent sounds like a very bad idea
* to begin with, but let's assume that's necessary for now and work around
* the corruption issue.
*
* Even though the NXlib header shows that the function expects a Window-sized
* Even though the CompExt header shows that the function expects a Window-sized
* parameter, it's not the Window type as defined and used within the X.Org
* Server, but an Xlib type. Hence, we'll be using the "XlibWindow" type here
* and to avoid compiler warnings, "rewrite" the NXlib.h header file via
* and to avoid compiler warnings, "rewrite" the CompExt.h header file via
* overriding the original "Window" type with the XlibWindow type, including
* the header file and undefining the macro again, essentially unshadowing
* the original type.
......
......@@ -45,7 +45,7 @@
#include "Pixels.h"
#include "Utils.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include <nx/NXpack.h>
/*
......
#include <Server.tmpl>
NULL =
SUBDIRS = compext \
$(NULL)
#ifdef OS2Architecture
SRCS1 = os2Stub.c
OBJS1 = os2Stub.o
......@@ -156,9 +160,6 @@ INCLUDES = \
$(VFBINCLUDES) \
`pkg-config --cflags-only-I libxml-2.0` \
`pkg-config --cflags-only-I pixman-1` \
`pkg-config --cflags-only-I zlib` \
`pkg-config --cflags-only-I libjpeg` \
`pkg-config --cflags-only-I libpng` \
$(NULL)
#ifdef SunArchitecture
INCLUDES = \
......@@ -180,7 +181,6 @@ INCLUDES = \
`pkg-config --cflags-only-I libxml-2.0` \
`pkg-config --cflags-only-I pixman-1` \
`pkg-config --cflags-only-I zlib` \
`pkg-config --cflags-only-I libjpeg` \
`pkg-config --cflags-only-I libpng` \
$(NULL)
#else
......@@ -197,7 +197,6 @@ INCLUDES = \
-I../../miext/damage \
-I../../miext/cw \
-I../../../../../nxcomp \
-I../../../../../nxcompext \
-I../../../../../nxcompshad \
-I../../../../extras/Mesa/include \
-I$(EXTINCSRC) -I$(XINCLUDESRC) \
......@@ -205,7 +204,6 @@ INCLUDES = \
`pkg-config --cflags-only-I libxml-2.0` \
`pkg-config --cflags-only-I pixman-1` \
`pkg-config --cflags-only-I zlib` \
`pkg-config --cflags-only-I libjpeg` \
`pkg-config --cflags-only-I libpng` \
$(NULL)
#endif
......@@ -274,3 +272,7 @@ NormalLibraryObjectRule()
NormalLibraryTarget(nxagent,$(OBJS))
DependTarget()
#define IHaveSubdirs
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
......@@ -75,7 +75,7 @@ is" without express or implied warranty.
#include "Error.h"
#include <nx/NX.h>
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include "Reconnect.h"
/*
* Set here the required log level.
......
......@@ -61,7 +61,7 @@ is" without express or implied warranty.
#include "Options.h"
#include "Error.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include <nx/Shadow.h>
......
......@@ -137,7 +137,7 @@ of the copyright holder.
#include "../../dix/events.c"
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include "Events.h"
#include "Windows.h"
......
......@@ -50,7 +50,7 @@
#include "Holder.h"
#include "Args.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include <nx/NXpack.h>
RESTYPE RT_NX_PIXMAP;
......
......@@ -54,7 +54,7 @@ is" without express or implied warranty.
#include "Events.h"
#include "Options.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
/*
* Set here the required log level.
......
......@@ -58,7 +58,7 @@
#endif
#include <nx/NX.h>
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include <nx/NXalert.h>
/*
......
......@@ -39,7 +39,7 @@
#include "Atoms.h"
#include "Trap.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
/*
* Set here the required log level.
......
......@@ -102,7 +102,7 @@ is" without express or implied warranty.
#include "Xatom.h"
#include "Xproto.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include "mibstorest.h"
......
......@@ -34,7 +34,7 @@
#include "Events.h"
#include "GCs.h"
#include <nx/NXlib.h>
#include "compext/Compext.h"
/*
......
......@@ -65,7 +65,7 @@
#include "Events.h"
#include <nx/NX.h>
#include <nx/NXlib.h>
#include "compext/Compext.h"
#include "Xatom.h"
......
......@@ -25,7 +25,7 @@
#include <zlib.h>
#include "NXlib.h"
#include "Compext.h"
#include "Alpha.h"
#include "Z.h"
......
......@@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "NXlib.h"
#include "Compext.h"
#include "Bitmap.h"
......
......@@ -28,7 +28,7 @@
#include "os.h"
#include "NXlib.h"
#include "Compext.h"
#include "Clean.h"
......@@ -237,7 +237,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
register unsigned int mask = 0xffffffff;
register int line_size;
register int i;
line_size = dst_image -> bytes_per_line >> 2;
if (dst_image -> byte_order == MSBFirst)
......
......@@ -30,7 +30,7 @@
extern "C" {
#endif
#include "Xlib.h"
#include <nx-X11/Xlib.h>
int CleanXYImage(XImage *image);
int CleanZImage(XImage *image);
......
......@@ -25,7 +25,7 @@
#include <zlib.h>
#include "NXlib.h"
#include "Compext.h"
#include "Colormap.h"
#include "Z.h"
......
......@@ -23,8 +23,8 @@
/* */
/**************************************************************************/
#ifndef Colormap_H
#define Colormap_H
#ifndef ColormapComp_H
#define ColormapComp_H
#ifdef __cplusplus
extern "C" {
......@@ -42,4 +42,4 @@ extern char *ColormapCompressData(
}
#endif
#endif /* Colormap_H */
#endif /* ColormapComp_H */
......@@ -23,14 +23,14 @@
/* */
/**************************************************************************/
#undef _XSERVER64
#include <sys/socket.h>
#ifndef __sun
#include <strings.h>
#endif
#include "NX.h"
#include "dix.h"
#include "os.h"
......@@ -41,13 +41,16 @@
#define NX_TRANS_SOCKET
#include "Xlib.h"
#include "Xutil.h"
#include "Xlibint.h"
#include <nx-X11/Xlib.h>
#include <nx-X11/Xutil.h>
#include <nx-X11/Xlibint.h>
#include "Compext.h"
#include "NXlib.h"
#include "NXproto.h"
#include "NXpack.h"
#include <nx/NX.h>
#include <nx/NXproto.h>
#include <nx/NXpack.h>
#include <nx/MD5.h>
#include "Clean.h"
#include "Mask.h"
......@@ -55,12 +58,11 @@
#include "Alpha.h"
#include "Bitmap.h"
#include "Jpeg.h"
#include "Pgn.h"
#include "Png.h"
#include "Rgb.h"
#include "Rle.h"
#include "Z.h"
#include "MD5.h"
#define PANIC
#define WARNING
......@@ -991,7 +993,7 @@ Status NXGetUnpackParameters(Display *dpy, unsigned int *entries, unsigned char
fprintf(stderr, "[%d]", i);
}
}
fprintf(stderr, ".\n");
#endif
......@@ -1259,7 +1261,7 @@ Status NXGetFontParameters(Display *dpy, unsigned int path_length, char path_dat
{
fprintf(stderr, "%c", *(path_data + i + 1));
}
fprintf(stderr, "].\n");
#endif
......@@ -1285,7 +1287,7 @@ unsigned int NXAllocSplit(Display *dpy, unsigned int resource)
fprintf(stderr, "******NXAllocSplit: Reserved resource [%u].\n",
resource);
#endif
return resource;
}
}
......@@ -1312,7 +1314,7 @@ unsigned int NXAllocSplit(Display *dpy, unsigned int resource)
}
#endif
_NXSplitResources[resource] = 1;
}
......@@ -1570,7 +1572,7 @@ unsigned int NXAllocUnpack(Display *dpy, unsigned int resource)
fprintf(stderr, "******NXAllocUnpack: Reserved resource [%u].\n",
resource);
#endif
return resource;
}
}
......@@ -1597,7 +1599,7 @@ unsigned int NXAllocUnpack(Display *dpy, unsigned int resource)
}
#endif
_NXUnpackResources[resource] = 1;
}
......@@ -2120,7 +2122,7 @@ NXPackedImage *NXPackImage(Display *dpy, XImage *src_image, unsigned int method)
#endif
/*
* Get the mask out of the method and
* Get the mask out of the method and
* check if the visual is supported by
* the color reduction algorithm.
*/
......@@ -2604,10 +2606,10 @@ int NXAllocColors(Display *dpy, Colormap colormap, unsigned int entries,
screens_in_out[i].red = rep.red;
screens_in_out[i].green = rep.green;
screens_in_out[i].blue = rep.blue;
results_in_out[i] = True;
}
else
}
else
{
results_in_out[i] = False;
......
......@@ -33,10 +33,10 @@ extern "C" {
#include <nx-X11/X.h>
#include <nx-X11/Xlib.h>
#include "NX.h"
#include "NXpack.h"
#include "NXproto.h"
#include "NXvars.h"
#include <nx/NX.h>
#include <nx/NXpack.h>
#include <nx/NXproto.h>
#include <nx/NXvars.h>
/*
* All the NX code should use these.
......@@ -44,7 +44,7 @@ extern "C" {
#define Xmalloc(size) malloc((size))
#define Xfree(ptr) free((ptr))
/*
* Maximum number of supported pack methods.
*/
......@@ -279,7 +279,7 @@ extern NXDisplayStatisticsHandler NXSetDisplayStatisticsHandler(
* an out-of-order sequence number received in the X
* protocol stream.
*/
extern NXLostSequenceHandler NXSetLostSequenceHandler(
#if NeedFunctionPrototypes
NXLostSequenceHandler /* handler */
......
NULL =
#include <Server.tmpl>
SRCS = \
Alpha.c \
Bitmap.c \
Clean.c \
Colormap.c \
Compext.c \
Jpeg.c \
Mask.c \
Png.c \
Rgb.c \
Rle.c \
Z.c \
$(NULL)
OBJS = \
Alpha.o \
Bitmap.o \
Clean.o \
Colormap.o \
Compext.o \
Jpeg.o \
Mask.o \
Png.o \
Rgb.o \
Rle.o \
Z.o \
$(NULL)
INCLUDES = -I$(SERVERSRC)/include \
-I$(XBUILDINCDIR) \
`pkg-config --cflags-only-I pixman-1` \
`pkg-config --cflags-only-I zlib` \
`pkg-config --cflags-only-I libpng` \
$(NULL)
LINTLIBS = $(SERVERSRC)/dix/llib-ldix.ln \
$(NULL)
NormalLibraryObjectRule()
NormalLibraryTarget(compext,$(OBJS))
LintLibraryTarget(compext,$(SRCS))
NormalLintTarget($(SRCS))
DependTarget()
......@@ -33,7 +33,7 @@
#include <jpeglib.h>
#include "NXlib.h"
#include "Compext.h"
#include "Mask.h"
#include "Jpeg.h"
......
......@@ -25,9 +25,9 @@
#include <stdio.h>
#include "Xlib.h"
#include <nx-X11/Xlib.h>
#include "NXpack.h"
#include <nx/NXpack.h>
#include "Mask.h"
......@@ -128,7 +128,7 @@ int MaskImage(const ColorMask *mask, XImage *src_image, XImage *dst_image)
}
else if (src_image -> bits_per_pixel == 16)
{
/*
/*
* FIXME: Masking doesn't work in 16 bpp.
*
......@@ -485,7 +485,7 @@ static int Pack24To8(unsigned int src_data_size, XImage *src_image, XImage *dst_
src_pixel = end_of_line;
end_of_line += bytes_per_line;
}
return 1;
}
......
......@@ -27,12 +27,12 @@
#include <stdlib.h>
#include <string.h>
#include "Xutil.h"
#include <nx-X11/Xutil.h>
#include "NXlib.h"
#include "Compext.h"
#include "Mask.h"
#include "Pgn.h"
#include "Png.h"
#define PANIC
#define WARNING
......
......@@ -23,8 +23,8 @@
/* */
/**************************************************************************/
#ifndef Pgn_H
#define Pgn_H
#ifndef Png_H
#define Png_H
#ifdef __cplusplus
extern "C" {
......@@ -34,7 +34,7 @@ extern "C" {
#include <nx-X11/Xlib.h>
#include <nx-X11/Xmd.h>
#include <png.h>
#include <png.h>
extern int PngCompareColorTable(
#if NeedFunctionPrototypes
......@@ -72,5 +72,5 @@ int NXCreatePalette32(
}
#endif
#endif /* Pgn_H */
#endif /* Png_H */
......@@ -25,7 +25,7 @@
#include <zlib.h>
#include "NXlib.h"
#include "Compext.h"
#include "Rgb.h"
#include "Z.h"
......
......@@ -25,7 +25,7 @@
#include <zlib.h>
#include "NXlib.h"
#include "Compext.h"
#include "Rle.h"
#include "Z.h"
......
......@@ -29,7 +29,7 @@
#include <zlib.h>
#include "NXlib.h"
#include "Compext.h"
#include "Z.h"
......
......@@ -213,39 +213,6 @@ using X applications over a network, especially a slow one.
This package contains the NX differential compression library for X11.
%package -n libXcompext-devel
Group: Development/Libraries
Summary: Development files for the NX compression extensions library
Requires: libXcompext3%{?_isa} = %{version}-%{release}
Requires: libNX_X11-devel%{?_isa} = %{version}-%{release}
Requires: nx-proto-devel%{?_isa} = %{version}-%{release}
%description -n libXcompext-devel
NX is a software suite from NoMachine which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
The NX compression extensions library's development files.
%package -n libXcompext3
Group: System Environment/Libraries
Summary: NX protocol compression extensions library
Requires: %{name}%{?_isa} >= 3.5.0.29
Obsoletes: libXcompext <= 3.5.1
Provides: libXcompext = %{version}-%{release}
Obsoletes: libXcompext%{?_isa} <= 3.5.1
Provides: libXcompext%{?_isa} = %{version}-%{release}
%description -n libXcompext3
NX is a software suite from NoMachine which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
This package provides the library to support additional features to
the core NX library.
%package -n libXcompshad-devel
Group: Development/Libraries
Summary: Development files for the NX session shadowing library
......@@ -317,6 +284,8 @@ Obsoletes: nx%{?_isa} < 3.5.0-19
Provides: nx%{?_isa} = %{version}-%{release}
Conflicts: nxauth < 3.5.99.1
Conflicts: nxauth%{?_isa} < 3.5.99.1
Conflicts: libXcompext < 3.5.99.3
Conflicts: libXcompext%{?_isa} < 3.5.99.3
%if 0%{?suse_version}
Requires: xorg-x11-fonts-core
%endif
......@@ -426,12 +395,10 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans
%post -p /sbin/ldconfig
%post -n libNX_X11-6 -p /sbin/ldconfig
%post -n libXcomp3 -p /sbin/ldconfig
%post -n libXcompext3 -p /sbin/ldconfig
%post -n libXcompshad3 -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%postun -n libNX_X11-6 -p /sbin/ldconfig
%postun -n libXcomp3 -p /sbin/ldconfig
%postun -n libXcompext3 -p /sbin/ldconfig
%postun -n libXcompshad3 -p /sbin/ldconfig
%files
......@@ -483,17 +450,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans
%doc doc/nxcomp/nxcomp-3.6-drops-compat-code-3.4.x-testing.pdf
%_libdir/libXcomp.so.3*
%files -n libXcompext-devel
%defattr(-,root,root)
%_libdir/libXcompext.so
%{_includedir}/nx/NXlib.h
%{_libdir}/pkgconfig/nxcompext.pc
%files -n libXcompext3
%defattr(-,root,root)
%doc COPYING
%_libdir/libXcompext.so.3*
%files -n libXcompshad-devel
%defattr(-,root,root)
%_libdir/libXcompshad.so
......
#/**************************************************************************/
#/* */
#/* 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) */
#/* */
#/* NXCOMPEXT, 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 want to enable really all warnings. -Wredundant-decls,
# though, gives a warning caused by pthread.h and unistd.h.
#
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ @X_CFLAGS@ @DEFS@ \
-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs
CXXINCLUDES = -I. -I../nxcomp
CXXDEFINES =
CPPFLAGS = @CPPFLAGS@
CC = @CC@
CCFLAGS = @CFLAGS@ @X_CFLAGS@ @DEFS@ \
-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs
CCINCLUDES = -I. -I../nxcomp
CCDEFINES =
LDFLAGS = @LDFLAGS@ -L../nxcomp
LIBS = @LIBS@ -lz -lNX_X11 -lXcomp
#
# Only if THREADS is defined
#
# LIBS = @LIBS@ -lz -ljpeg -lpthread -lNX_X11 -lXcomp
#
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_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LINK = cp -av
DESTDIR =
RM_FILE = rm -f
#
# This should be autodetected.
#
MAKEDEPEND = @MAKEDEPEND@
DEPENDINCLUDES = -I/usr/include/c++ -I/usr/include/g++ -I/usr/include/g++-3
.SUFFIXES: .cpp.c
.cpp.o:
$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXINCLUDES) $<
.c.o:
$(CC) -c $(CPPFLAGS) $(CCFLAGS) $(CCINCLUDES) $<
LIBRARY = Xcompext
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
LIBCYGSHARED = cyg$(LIBRARY).dll
LIBCYGARCHIVE = lib$(LIBRARY).dll.a
all: depend @ALL@
MSRC=
CSRC= NXlib.c \
Clean.c \
Mask.c \
Colormap.c \
Alpha.c \
Jpeg.c \
Pgn.c \
Bitmap.c \
Rgb.c \
Rle.c \
Z.c
CXXSRC=
MOBJ = $(MSRC:.c=.o)
COBJ = $(CSRC:.c=.o)
CXXOBJ = $(CXXSRC:.cpp=.o)
$(LIBFULL): $(CXXOBJ) $(COBJ)
$(CXX) -o $@ $(LDFLAGS) $(LIBFLAGS) $(CXXOBJ) $(COBJ) $(LIBS)
$(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)
$(LIBCYGSHARED): $(LIBARCHIVE)
$(CC) -shared -o $(LIBCYGSHARED) \
-Wl,--out-implib=$(LIBCYGARCHIVE) \
-Wl,--export-all-symbols \
-Wl,--enable-auto-import \
-Wl,--whole-archive $(LIBARCHIVE) \
-Wl,--no-whole-archive $(LIBS) \
$(LDFLAGS)
$(LIBCYGARCHIVE): $(LIBCYGSHARED)
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
./mkinstalldirs $(DESTDIR)${libdir}
./mkinstalldirs $(DESTDIR)${pkgconfigdir}
./mkinstalldirs $(DESTDIR)${includedir}/nx
./mkinstalldirs $(DESTDIR)${pkgconfigdir}
$(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir}
$(INSTALL_LINK) $(LIBLOAD) $(DESTDIR)${libdir}
$(INSTALL_LINK) $(LIBSHARED) $(DESTDIR)${libdir}
$(INSTALL_DATA) NX*.h $(DESTDIR)${includedir}/nx
$(INSTALL_DATA) nxcompext.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)${includedir}/nx/NXlib.h
$(RM_FILE) $(DESTDIR)${pkgconfigdir}/nxcompext.pc
echo "Running ldconfig tool, this may take a while..." && ldconfig || true
uninstall.man:
clean:
-rm -f *~ *.o *.bak *.orig *.rej st?????? core core.* *.out.* *.pc \
@ALL@
distclean: clean
-rm -rf autom4te.cache config.status config.log configure \
config.cache depend.status Makefile tags
../VERSION
\ No newline at end of file
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 /* NXCOMPEXT, 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(NXlib.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$CFLAGS" == "x"; then
CFLAGS="-O3"
fi
dnl Reset default linking directives.
LIBSTATIC=""
LIBSHARED=""
dnl Prefer headers and libraries from nx-X11, if present.
if test -d "../nx-X11/include" ; then
CXXFLAGS="$CXXFLAGS -I../nx-X11/exports/include -I../nx-X11/lib/X11 \
-I../nx-X11/include -I../nx-X11/programs/Xserver/include"
CFLAGS="$CFLAGS -I../nx-X11/exports/include -I../nx-X11/lib/X11 \
-I../nx-X11/include -I../nx-X11/programs/Xserver/include"
LDFLAGS="$LDFLAGS -L../nx-X11/exports/lib"
fi
X_CFLAGS=`pkg-config --cflags-only-I pixman-1`
dnl Check for programs.
AC_PROG_CXX
AC_PROG_CC
AC_LANG_CPLUSPLUS
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 add the -g flag to produce the debug symbols
--with-info enable basic log output to trace the program
--with-valgrind clean up allocated buffers to avoid valgrind warnings
--with-version use this version for produced libraries
--with-static-png enable static linking of PNG library
--with-static-jpeg enable static linking of JPEG library"
dnl Check to see if we're running under Cygwin32.
AC_DEFUN(nxproxy_CYGWIN32,
[AC_CACHE_CHECK(for Cygwin32 environment, nxproxy_cv_cygwin32,
[AC_TRY_COMPILE(,[return __CYGWIN32__;],
nxproxy_cv_cygwin32=yes, nxproxy_cv_cygwin32=no)
rm -f conftest*])
CYGWIN32=
test "$nxproxy_cv_cygwin32" = yes && CYGWIN32=yes])
dnl CygWin32 requires the stdc++ library explicitly linked.
nxproxy_CYGWIN32
if test "$CYGWIN32" = yes; then
LIBS="$LIBS -mwindows -lstdc++"
fi
dnl Check whether we're building on a AMD64.
AC_DEFUN(nxconf_AMD64,
[AC_CACHE_CHECK(for Amd64 environment, nxconf_cv_amd64,
[AC_TRY_COMPILE(,[return (__amd64__ || __x86_64__);],
nxconf_cv_amd64=yes, nxconf_cv_amd64=no)
rm -f conftest*])
AMD64=
test "$nxconf_cv_amd64" = yes && AMD64=yes])
nxconf_AMD64
dnl Check to see if we're running under Solaris.
AC_DEFUN(nxconf_SUN,
[AC_CACHE_CHECK(for SunOS 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
if test "$SUN" = yes; then
CFLAGS="$CFLAGS -I/usr/sfw/include"
fi
if test "$SUN" = yes; then
LDFLAGS="$LDFLAGS -G -h \$(LIBLOAD) -L/usr/sfw/lib"
else
LDFLAGS="$LDFLAGS -shared -Wl,-soname,\$(LIBLOAD)"
fi
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 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"
CFLAGS="$CFLAGS -I/usr/local/include"
fi
dnl Check whether --with-static-png was
dnl given and add -lpng or libpng.a to linking.
if test "${with_static_png}" = yes; then
echo -e "enabling static linking of PNG library"
if test "$CYGWIN32" = yes; then
LIBS="$LIBSTATIC -static -lpng"
else
if test -f "/usr/lib/libpng.a" ; then
LIBS="/usr/lib/libpng.a $LIBS"
else
if test -f "/usr/local/lib/libpng.a" ; then
echo -e "assuming libpng.a in /usr/local/lib"
LIBS="/usr/local/lib/libpng.a $LIBS"
else
echo -e "assuming libpng.a in default linker path"
LIBS="libpng.a $LIBS"
fi
fi
fi
else
echo -e "enabling dynamic linking of PNG library"
LIBS="-lpng $LIBS"
fi
dnl Check whether --with-static-jpeg was
dnl given and add -ljpeg or libjpeg.a to linking.
if test "${with_static_jpeg}" = yes; then
echo -e "enabling static linking of JPEG library"
if test "$CYGWIN32" = yes; then
LIBSTATIC="$LIBS -static -ljpeg"
else
if test -f "/usr/lib/libjpeg.a" ; then
LIBS="/usr/lib/libjpeg.a $LIBS"
else
if test -f "/usr/local/lib/libjpeg.a" ; then
echo -e "assuming libjpeg.a in /usr/local/lib"
LIBS="/usr/local/lib/libjpeg.a $LIBS"
else
echo -e "assuming libjpeg.a in default linker path"
LIBS="libjpeg.a $LIBS"
fi
fi
fi
else
echo -e "enabling dynamic linking of JPEG library"
LIBS="-ljpeg $LIBS"
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"
CFLAGS="-g $CFLAGS"
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"
CFLAGS="$CFLAGS -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"
CFLAGS="$CFLAGS -DVALGRIND"
else
echo -e "disabling valgrind memory checker workarounds"
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}\\\""
CFLAGS="$CFLAGS -DVERSION=\\\"${VERSION}\\\""
dnl Find makedepend somewhere.
AC_SUBST(MAKEDEPEND)
MAKEDEPEND="$(which makedepend)"
dnl Determine what to build based on the platform.
dnl Override the LIBS settings on Cygwin32 so that
dnl we always link with the exact set of libraries.
AC_SUBST(ALL)
if test "$CYGWIN32" = yes; then
ALL="\$(LIBCYGARCHIVE) \$(LIBCYGSHARED) \$(LIBARCHIVE)"
else
ALL="\$(LIBFULL) \$(LIBLOAD) \$(LIBSHARED) \$(LIBARCHIVE)"
fi
AC_OUTPUT(Makefile nxcompext.pc)
#! /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
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Last modified: 1995-03-05
# Public domain
errstatus=0
for file in ${1+"$@"} ; do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d in ${1+"$@"} ; do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
fi
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: nxcompext
Description: Extension for NX Compression Library
Version: @VERSION@
Requires: nxcomp
Requires.private: x11
Cflags: -I${includedir}
Libs: -L${libdir} -lXcompext
......@@ -102,7 +102,6 @@ if [ "x$MODE" = "xfull" ]; then
else
rm -f "bin/nxagent"
rm -Rf "nxcompshad"*
rm -Rf "nxcompext"*
rm -Rf "nx-X11"*
rm -Rf "etc"*
rm -Rf "doc/nx-X11_vs_XOrg69_patches"*
......
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