[Commit] Xcursor Makefile.am,NONE,1.1 autogen.sh,NONE,1.1 configure.ac,NONE,1.1 Xcursor.h,1.4,1.5 file.c,1.2,1.3 xcursor.pc.in,1.1,1.2 Imakefile,1.3,NONE

Keith Packard commit@keithp.com
Tue, 06 May 2003 10:49:10 -0700


Committed by: keithp

Update of /local/src/CVS/Xcursor
In directory home.keithp.com:/tmp/cvs-serv14196

Modified Files:
	Xcursor.h file.c xcursor.pc.in 
Added Files:
	Makefile.am autogen.sh configure.ac 
Removed Files:
	Imakefile 
Log Message:
Convert Xcursor to autotools


--- NEW FILE: Makefile.am ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: autogen.sh ---
#! /bin/sh
#
# $Id: autogen.sh,v 1.1 2003/05/06 17:49:08 keithp Exp $
#
# runs autotools to create ./configure and friends
#

PROJECT=Xrender

srcdir=`dirname "$0"`
test -z $srcdir && srcdir=.

origdir=`pwd`
cd "$srcdir"

if test -z "$AUTOGEN_SUBDIR_MODE" && test -z "$*"
then
  echo "I am going to run ./configure with no arguments - if you wish "
  echo "to pass any to it, please specify them on the $0 command line."
fi

# Use the versioned executables if available.
aclocal=aclocal-1.7
automake=automake-1.7
$aclocal  --version </dev/null >/dev/null 2>&1 || aclocal=aclocal
$automake --version </dev/null >/dev/null 2>&1 || automake=automake

# require libtool >= 1.5
libtool_version=`libtool --version | head -1 | awk '{print $4}'`
libtool_major=`echo $libtool_version | awk -F . '{print $1}'`
libtool_minor=`echo $libtool_version | awk -F . '{print $2}'`
if [ $libtool_major -lt 1 ] || [ $libtool_major -eq 1 -a $libtool_minor -lt 5 ]
then
    echo "libtool 1.5 or later is required. You have $libtool_version."
    exit 1
fi

rm -f config.guess config.sub depcomp install-sh missing mkinstalldirs
rm -f config.cache acconfig.h
rm -rf autom4te.cache

set_option=':'
test -n "${BASH_VERSION+set}" && set_option='set'

$set_option -x

$aclocal $ACLOCAL_FLAGS                  || exit 1
libtoolize --force --copy                || exit 1
autoheader                               || exit 1
$automake --foreign --add-missing --copy || exit 1
autoconf                                 || exit 1
cd "$origdir"                            || exit 1

if test -z "$AUTOGEN_SUBDIR_MODE"
then
  "$srcdir/configure" "$@" || exit 1
  $set_option +x
fi

exit 0


--- NEW FILE: configure.ac ---
(This appears to be a binary file; contents omitted.)

Index: Xcursor.h
===================================================================
RCS file: /local/src/CVS/Xcursor/Xcursor.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Xcursor.h	26 Jan 2003 03:22:42 -0000	1.4
+++ Xcursor.h	6 May 2003 17:49:08 -0000	1.5
@@ -69,9 +69,26 @@
 
 #define XCURSOR_MAGIC	0x72756358  /* "Xcur" LSBFirst */
 
-#define XCURSOR_MAJOR		1
-#define XCURSOR_MINOR		0
-#define XCURSOR_VERSION		((XCURSOR_MAJOR << 16) | (XCURSOR_MINOR))
+/*
+ * Current Xcursor version number.  This same number
+ * must appear in the Xcursor configure.ac file. Yes,
+ * it'a a pain to synchronize version numbers like this.
+ */
+
+#define XCURSOR_LIB_MAJOR	1
+#define XCURSOR_LIB_MINOR	0
+#define XCURSOR_LIB_REVISION	1
+#define XCURSOR_LIB_VERSION	((XCURSOR_LIB_MAJOR * 10000) + \
+				 (XCURSOR_LIB_MINOR * 100) + \
+				 (XCURSOR_LIB_REVISION))
+
+/*
+ * This version number is stored in cursor files; changes to the
+ * file format require updating this version number
+ */
+#define XCURSOR_FILE_MAJOR	1
+#define XCURSOR_FILE_MINOR	0
+#define XCURSOR_FILE_VERSION	((XCURSOR_FILE_MAJOR << 16) | (XCURSOR_FILE_MINOR))
 #define XCURSOR_FILE_HEADER_LEN	(4 * 4)
 #define XCURSOR_FILE_TOC_LEN	(3 * 4)
 

Index: file.c
===================================================================
RCS file: /local/src/CVS/Xcursor/file.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- file.c	18 Sep 2002 17:11:42 -0000	1.2
+++ file.c	6 May 2003 17:49:08 -0000	1.3
@@ -185,7 +185,7 @@
 	return 0;
     fileHeader->magic = XCURSOR_MAGIC;
     fileHeader->header = XCURSOR_FILE_HEADER_LEN;
-    fileHeader->version = XCURSOR_VERSION;
+    fileHeader->version = XCURSOR_FILE_VERSION;
     fileHeader->ntoc = ntoc;
     fileHeader->tocs = (XcursorFileToc *) (fileHeader + 1);
     return fileHeader;

Index: xcursor.pc.in
===================================================================
RCS file: /local/src/CVS/Xcursor/xcursor.pc.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xcursor.pc.in	29 Aug 2002 04:40:34 -0000	1.1
+++ xcursor.pc.in	6 May 2003 17:49:08 -0000	1.2
@@ -2,10 +2,14 @@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
+xrenderlibs=@XRENDER_LIBS@
+xrendercflags=@XRENDER_CFLAGS@
+xlibs=@X_LIBS@
+xcflags=@X_CFLAGS@
 
 Name: Xcursor
-Description: X Cursor library
-Version: @PACKAGE_VERSION@
-Requires:
-Libs: -L${libdir} -lXcursor
-Cflags: -I${includedir}
+Description: X Cursor Library
+Version: @VERSION@
+Requires: xrender
+Cflags: -I${includedir} ${xrendercflags} ${xcflags}
+Libs: -L${libdir} -lXcursor ${xrenderlibs} ${xlibs}

--- Imakefile DELETED ---