wmpager: autotoolized
authorAlexey I. Froloff <raorn@raorn.name>
Thu, 23 Aug 2012 11:42:12 +0000 (23 15:42 +0400)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 23 Aug 2012 12:58:55 +0000 (23 13:58 +0100)
wmpager/Makefile [deleted file]
wmpager/configure.ac [new file with mode: 0644]
wmpager/man/Makefile.am [new file with mode: 0644]
wmpager/man/wmpager.1x [moved from wmpager/man/man1/wmpager.1x with 100% similarity]
wmpager/src/Makefile [deleted file]
wmpager/src/Makefile.am [new file with mode: 0644]
wmpager/themes/Makefile.am [new file with mode: 0644]

diff --git a/wmpager/Makefile b/wmpager/Makefile
deleted file mode 100644 (file)
index c0089b5..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# $Id: Makefile,v 1.3 2002/08/16 17:22:26 essmann Exp $
-#
-# Copyright (c) 2001 Bruno Essmann <essmann@users.sourceforge.net>
-# All rights reserved.
-
-.SILENT:
-
-INSTALLDIR = /usr/local
-
-all: wmpager
-
-wmpager:
-       @echo "*** `pwd`: $@" ; \
-       cd src ; \
-       $(MAKE) $@
-
-clean:
-       @echo "*** `pwd`: $@" ; \
-       cd src ; \
-       $(MAKE) $@
-
-install:
-       echo "*** `pwd`: $@" ; \
-       if [ ! -f src/wmpager ] ; then \
-               $(MAKE) wmpager ; \
-       fi ; \
-       if [ -z "`id | grep 'uid=.*(root)'`" ] ; then \
-               echo "you must be root to install wmpager!" ; \
-               exit ; \
-       fi ; \
-       for i in bin/wmpager man/man1/wmpager.1x ; do \
-               if [ -f ${INSTALLDIR}/$$i ] ; then \
-                       echo "there's already a $$i in ${INSTALLDIR}" ; \
-                       echo "installation aborted." ; \
-                       exit ; \
-               fi ; \
-       done ; \
-       if [ ! -d ${INSTALLDIR}/bin ] ; then \
-               mkdir -p ${INSTALLDIR}/bin ; \
-       fi ; \
-       echo "copying wmpager to ${INSTALLDIR}/bin" ; \
-       cp src/wmpager ${INSTALLDIR}/bin/wmpager ; \
-       chmod 755 ${INSTALLDIR}/bin/wmpager ; \
-       if [ ! -d ${INSTALLDIR}/man/man1 ] ; then \
-               mkdir -p ${INSTALLDIR}/man/man1 ] ; \
-       fi ; \
-       echo "copying manual page to ${INSTALLDIR}/man/man1" ; \
-       cp man/man1/wmpager.1x ${INSTALLDIR}/man/man1/wmpager.1x ; \
-       chmod 644 ${INSTALLDIR}/man/man1/wmpager.1x ; \
-       echo "copying theme files to ${INSTALLDIR}/share/wmpager" ; \
-       if [ ! -d ${INSTALLDIR}/share/wmpager ] ; then \
-               mkdir -p ${INSTALLDIR}/share/wmpager ; \
-       fi ; \
-       cp src/buttons.xpm ${INSTALLDIR}/share/wmpager/blue.xpm ; \
-       cp themes/*.xpm ${INSTALLDIR}/share/wmpager ; \
-       chmod 644 ${INSTALLDIR}/share/wmpager/* ; \
-       echo "installation complete, make sure your have ${INSTALLDIR}/bin" ; \
-       echo "in your PATH and ${INSTALLDIR}/man in your MANPATH."
-
-uninstall:
-       echo "*** `pwd`: $@" ; \
-       if [ -z "`id | grep 'uid=.*(root)'`" ] ; then \
-               echo "you must be root to uninstall wmpager!" ; \
-               exit ; \
-       fi ; \
-       for i in bin/wmpager man/man1/wmpager.1x ; do \
-               if [ -f ${INSTALLDIR}/$$i ] ; then \
-                       echo "removing $$i from ${INSTALLDIR}" ; \
-                       rm -f ${INSTALLDIR}/$$i ; \
-               fi ; \
-       done ; \
-       if [ -d ${INSTALLDIR}/share/wmpager ] ; then \
-               echo "removing directory $$i from ${INSTALLDIR}" ; \
-               rm -rf ${INSTALLDIR}/share/wmpager ; \
-       fi ; \
-       echo "uninstallation complete."
-
diff --git a/wmpager/configure.ac b/wmpager/configure.ac
new file mode 100644 (file)
index 0000000..e96d64b
--- /dev/null
@@ -0,0 +1,31 @@
+AC_PREREQ([2.60])
+AC_INIT([wmpager], [1.2], [wmaker-dev@lists.windowmaker.org])
+AC_CONFIG_SRCDIR([src/wmpager.c])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
+AM_SILENT_RULES
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+PKG_PROG_PKG_CONFIG
+
+# Checks for libraries.
+PKG_CHECK_MODULES([X], [x11 xext xpm])
+AC_SUBST([X_CFLAGS])
+AC_SUBST([X_LIBS])
+
+# Checks for header files.
+AC_CHECK_HEADERS([stdlib.h string.h sys/time.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_CHECK_FUNCS([gettimeofday select strdup])
+
+AC_CONFIG_FILES([Makefile
+                                man/Makefile
+                 src/Makefile
+                                themes/Makefile])
+AC_OUTPUT
diff --git a/wmpager/man/Makefile.am b/wmpager/man/Makefile.am
new file mode 100644 (file)
index 0000000..5e546e8
--- /dev/null
@@ -0,0 +1,3 @@
+man1_MANS = wmpager.1x
+
+EXTRA_DIST = $(man1_MANS)
diff --git a/wmpager/src/Makefile b/wmpager/src/Makefile
deleted file mode 100644 (file)
index 4ec190d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# $Id: Makefile,v 1.2 2002/08/16 17:22:26 essmann Exp $
-#
-# Copyright (c) 2001 Bruno Essmann <essmann@users.sourceforge.net>
-# All rights reserved.
-
-.SILENT:
-
-XPMINC = /usr/X11R6/include
-XPMLIB = /usr/X11R6/lib
-
-INCLUDES = -I/usr/X11R6/include -I/usr/local/include -I/usr/include/X11R6 -I$(XPMINC)
-LIBINC = -L/usr/X11R6/lib -L/usr/include/lib -L$(XPMLIB)
-LIBS = -lm -lX11 -lXpm -lXext
-
-TARGET = wmpager
-OBJECTS = wmpager.o
-SOURCE = wmpager.c
-
-all: ${TARGET}
-
-${OBJECTS}: ${SOURCE}
-       @echo "*** `pwd`: $@" ; \
-       gcc -g -c -Wall ${INCLUDES} ${FLAGS} $< -o $*.o
-
-${TARGET}: ${OBJECTS}
-       @echo "*** `pwd`: $@" ; \
-       gcc -g -o ${TARGET} ${OBJECTS} ${LIBINC} ${LIBS}
-
-clean:
-       @echo "*** `pwd`: $@" ; \
-       for i in ${OBJECTS}; do if [ -f $$i ] ; then rm $$i; fi; done ; \
-       if [ -f ${TARGET} ] ; then rm ${TARGET}; fi
diff --git a/wmpager/src/Makefile.am b/wmpager/src/Makefile.am
new file mode 100644 (file)
index 0000000..4af9d4d
--- /dev/null
@@ -0,0 +1,4 @@
+bin_PROGRAMS = wmpager
+wmpager_SOURCES = wmpager.c buttons.xpm screen.xpm
+wmpager_CPPFLAGS = -DWMPAGER_DEFAULT_INSTALL_DIR=\"$(pkgdatadir)/\" @X_CFLAGS@
+wmpager_LDADD = @X_LIBS@
diff --git a/wmpager/themes/Makefile.am b/wmpager/themes/Makefile.am
new file mode 100644 (file)
index 0000000..ffeb4a7
--- /dev/null
@@ -0,0 +1,3 @@
+pkgdata_DATA = fire.xpm  gray.xpm  steel.xpm 
+
+EXTRA_DIST = $(pkgdata_DATA)