[PATCH 13/16] wmtv: Switch to autotools for build.

Doug Torrance <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
Also rename CREDITS and CHANGES to AUTHORS and ChangeLog, resp.
---
 wmtv/{CREDITS => AUTHORS}   |  0
 wmtv/{CHANGES => ChangeLog} |  0
 wmtv/Makefile               | 25 -------------------------
 wmtv/Makefile.am            | 10 ++++++++++
 wmtv/configure.ac           | 12 ++++++++++++
 5 files changed, 22 insertions(+), 25 deletions(-)
 rename wmtv/{CREDITS => AUTHORS} (100%)
 rename wmtv/{CHANGES => ChangeLog} (100%)
 delete mode 100644 wmtv/Makefile
 create mode 100644 wmtv/Makefile.am
 create mode 100644 wmtv/configure.ac

diff --git a/wmtv/CREDITS b/wmtv/AUTHORS
similarity index 100%
rename from wmtv/CREDITS
rename to wmtv/AUTHORS
diff --git a/wmtv/CHANGES b/wmtv/ChangeLog
similarity index 100%
rename from wmtv/CHANGES
rename to wmtv/ChangeLog
diff --git a/wmtv/Makefile b/wmtv/Makefile
deleted file mode 100644
index d585157..0000000
--- a/wmtv/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#	Makefile for wmtv
-#
-INCDIR	=	-I/usr/X11R6/include
-LIBDIR	=	-L/usr/X11R6/lib
-LIBS	=	-lXpm -lXext -lX11 -lXxf86dga -lXxf86vm -ldockapp
-OBJS	=	src/wmtv.o
-
-.c.o:
-	cc -c -O2 -Wall -D$(shell echo `uname -s`) $< -o $*.o $(INCDIR)
-
-all: wmtv
-
-wmtv: $(OBJS)
-	cc -o wmtv $^ $(LIBDIR) $(LIBS)
-
-install:: all
-	install -s -m 4755 -o root wmtv /usr/X11R6/bin
-	install -m 0644 -o root -g root wmtvrc.sample /etc/wmtvrc
-
-clean:
-	for i in $(OBJS) ; do \
-		rm -f $$i; \
-	done
-	rm -f wmtv
diff --git a/wmtv/Makefile.am b/wmtv/Makefile.am
new file mode 100644
index 0000000..05bb38b
--- /dev/null
+++ b/wmtv/Makefile.am
@@ -0,0 +1,10 @@
+bin_PROGRAMS = wmtv
+wmtv_SOURCES = src/channels.h src/wmtv.c src/wmtv-master.xpm \
+	src/wmgeneral/wmgeneral.c src/wmgeneral/wmgeneral.h
+
+AM_CFLAGS = $(x11_CFLAGS) $(xext_CFLAGS) $(xpm_CFLAGS) $(xxf86dga_CFLAGS) \
+	$(xxf86vm_CFLAGS) $(libv4l1_CFLAGS)
+LIBS += $(x11_LIBS) $(xext_LIBS) $(xpm_LIBS) $(xxf86dga_LIBS) $(xxf86vm_LIBS) \
+	$(libv4l1_LIBS)
+
+EXTRA_DIST = wmtvrc.sample
diff --git a/wmtv/configure.ac b/wmtv/configure.ac
new file mode 100644
index 0000000..4434be9
--- /dev/null
+++ b/wmtv/configure.ac
@@ -0,0 +1,12 @@
+AC_INIT([wmtv], [0.6.5], [[email protected]])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+AC_CONFIG_SRCDIR([configure.ac])
+AC_PROG_CC
+PKG_CHECK_MODULES([x11],[x11])
+PKG_CHECK_MODULES([xext],[xext])
+PKG_CHECK_MODULES([xpm],[xpm])
+PKG_CHECK_MODULES([xxf86dga],[xxf86dga])
+PKG_CHECK_MODULES([xxf86vm],[xxf86vm])
+PKG_CHECK_MODULES([libv4l1],[libv4l1])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
-- 
2.5.0


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.