[Pkg-wmaker-commits] [wmix] 42/44: wmix: Use autotools for build.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Fri Sep 29 10:40:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository wmix.

commit d61e1e0c00fb8df06020f6f5ccd88a6b0aba14c7
Author: Doug Torrance <dtorrance at piedmont.edu>
Date:   Thu Sep 28 23:21:44 2017 -0400

    wmix: Use autotools for build.
---
 INSTALL          |  9 +++++----
 Makefile         | 20 --------------------
 Makefile.am      |  9 +++++++++
 configure.ac     | 15 +++++++++++++++
 include/config.h |  3 ---
 5 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/INSTALL b/INSTALL
index 46f0d2d..17cc77b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,9 +1,10 @@
 Since your reading this, you are probably done with the tar zxvf part.
 
-1. make
-2. become root
-3. make install
-4. wmix
+1. ./configure
+2. make
+3. become root
+4. make install
+5. wmix
 
 pretty easy. See README for instructions on how to use the mixer and about
 some information on the programming involved. See the man page (man wmix)
diff --git a/Makefile b/Makefile
deleted file mode 100644
index d62273c..0000000
--- a/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-CC		= gcc
-CFLAGS		= -std=gnu99 -O3 -W -Wall `pkg-config --cflags alsa xrandr`
-LDFLAGS		= -L/usr/X11R6/lib
-LIBS		= -lXpm -lXext -lX11 -lm `pkg-config --libs alsa xrandr`
-OBJECTS		= misc.o config.o mixer-alsa.o mixer-oss.o ui_x.o mmkeys.o wmix.o
-
-# where to install this program (also for packaging stuff)
-PREFIX		= /usr/local
-INSTALL_BIN	= -m 755
-INSTALL_DATA	= -m 644
-
-wmix: $(OBJECTS)
-	$(CC) -o $@ $(LDFLAGS) $(OBJECTS) $(LIBS)
-
-clean:
-	rm -rf *.o wmix *~
-
-install: wmix
-	install $(INSTALL_BIN)	wmix	$(PREFIX)/bin
-	install $(INSTALL_DATA)	wmix.1x	$(PREFIX)/man/man1
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..f8f6ba2
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,9 @@
+bin_PROGRAMS = wmix
+wmix_SOURCES = misc.c config.c mixer-alsa.c mixer-oss.c ui_x.c mmkeys.c wmix.c \
+	include/common.h include/config.h include/led-off.xpm \
+	include/led-on.xpm include/master.xpm include/misc.h \
+	include/mixer-alsa.h include/mixer.h include/mixer-oss.h \
+	include/mmkeys.h include/ui_x.h
+
+dist_man_MANS = wmix.1x
+EXTRA_DIST = BUGS sample.wmixrc
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..e0d2bb4
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,15 @@
+AC_INIT([wmix], [3.2], [wmaker-dev at lists.windowmaker.org])
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_SRCDIR([wmix.c])
+
+AC_PROG_CC
+
+AC_CHECK_LIB([asound], [snd_mixer_selem_get_playback_switch])
+AC_CHECK_LIB([m], [cos])
+AC_CHECK_LIB([X11], [XOpenDisplay])
+AC_CHECK_LIB([Xext], [XShapeCombineMask])
+AC_CHECK_LIB([Xpm], [XpmCreatePixmapFromData])
+AC_CHECK_LIB([Xrandr], [XRRQueryExtension])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/include/config.h b/include/config.h
index d916fa2..edb571a 100644
--- a/include/config.h
+++ b/include/config.h
@@ -49,9 +49,6 @@ extern struct _Config {
 /* Default color for OSD */
 extern const char default_osd_color[];
 
-/* Current version of WMixer */
-#define VERSION "3.2"
-
 /* Sets the default values in the config */
 void config_init(void);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmix.git



More information about the Pkg-wmaker-commits mailing list