Permalink
Browse files

Switched to autotools-based build system

  • Loading branch information...
1 parent c811caa commit b6de1ecc190023dda8b49bbdef2e49be6a006fac @dottedmag committed Mar 18, 2008
Showing with 69 additions and 14 deletions.
  1. +4 −0 ChangeLog
  2. +5 −0 INSTALL
  3. +32 −11 Makefile.am
  4. 0 NEWS
  5. +12 −0 README
  6. +3 −0 bootstrap.sh
  7. +13 −3 configure.ac
View
@@ -0,0 +1,4 @@
+2008-03-18
+
+- autotools-based build instead of Imake-based
+- lawyerese.c is now generated from COPYING.*
View
@@ -0,0 +1,5 @@
+Just build/install x2x as any other autotools-based program.
+
+Configuration options:
+
+ --with-win32 - enables win32 support
View
@@ -1,24 +1,45 @@
#
# Copyright (c) 2008 Mikhail Gusarov <dottedmag@dottedmag.net>
#
-
-bin_PROGRAMS = x2x
+# BSD-3
+#
AM_CFLAGS = $(X11_CFLAGS) -Wall
-AM_LIBS = $(X11_LIBS)
+AM_LDFLAGS = $(X11_LIBS)
+
+bin_PROGRAMS = x2x
x2x_SOURCES = lawyerese.c x2x.c
-lawyerese.c: COPYING.win32 COPYING
+if WIN32
+
+AM_CFLAGS += -DWIN_2_X
+AM_LDFLAGS += -luser32 -lgdi32 # Ugly hack
+x2x_SOURCES += keymap.c winmsg.c x2xwin.rc
+
+%.o: %.rc
+ windres $^ -o $@
+
+x2xwin.o: resource.h nocursor.cur
+
+endif
+
+
+# -- creating lawyerese.c --
+
+if WIN32
+COPYING_FILES = COPYING.win32
+else
+COPYING_FILES =
+endif
+COPYING_FILES += COPYING
+
+lawyerese.c: $(COPYING_FILES)
echo 'char *lawyerese =' > $@.tmp && \
sed -e 's|.*|"\0\\n"|g' $^ >> $@.tmp && \
echo ";" >> $@.tmp && \
mv $@.tmp $@ || rm -f $@.tmp
-# if cygwin
-# x2x_SOURCES += keymap.c winmsg.c
-# x2x_OBJS += x2xwin.res
-# x2x_LDADD += -luser32 -lgdi32
-# x2x_CFLAGS += -DWIN_2_X
-# x2x resources: x2xwin.rc, nocursor.cur, resource.h...
-# endif
+CLEANFILES = lawyerese.c
+
+# -- --
View
No changes.
View
@@ -0,0 +1,12 @@
+== x2x ==
+
+x2x allows the keyboard, mouse on one X display to be used to control another X
+display. It also shares X clipboards between the displays.
+
+When built/run on Cygwin may be run on Windows desktop to control X display.
+
+== License ==
+
+x2x is under MIT/BSD license.
+
+Windows support includes code under GPL2 or later.
View
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+autoreconf -fisv
View
@@ -1,6 +1,8 @@
dnl
dnl Copyright (c) 2008 Mikhail Gusarov <dottedmag@dottedmag.net>
dnl
+dnl BSD-3
+dnl
AC_PREREQ([2.57])
AC_INIT(x2x,[1.30],[http://x2x.dottedmag.net/newticket],x2x)
@@ -12,12 +14,20 @@ AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_INSTALL
-PKG_CHECK_MODULES(X11, xext x11)
+PKG_CHECK_MODULES(X11, xext xtst x11)
+
+XORG_MANPAGE_SECTIONS
+XORG_RELEASE_VERSION
+
+AC_ARG_ENABLE([win32],
+ AS_HELP_STRING(
+ [--enable-win32],
+ [enable Win32 support (-fromwin option). Disabled by default]))
AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_LIBS)
+AC_SUBST(enable_win32)
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
+AM_CONDITIONAL(WIN32, [test x$enable_win32 = xyes])
AC_OUTPUT([Makefile])

0 comments on commit b6de1ec

Please sign in to comment.