wmusic: Modernize autotools files

This commit is contained in:
Doug Torrance 2018-06-22 16:20:55 -04:00 committed by Carlos R. Mafra
parent 12843a05f5
commit a28f29d147
7 changed files with 13 additions and 121 deletions

5
wmusic/Makefile.am Normal file
View file

@ -0,0 +1,5 @@
bin_PROGRAMS = wmusic
wmusic_SOURCES = src/wmusic.c src/wmusic-digits.xpm src/wmusic-master.xpm
AM_CFLAGS = $(X11_CFLAGS) $(DOCKAPP_CFLAGS)
LIBS += $(X11_LIBS) $(DOCKAPP_LIBS)

View file

@ -1,20 +0,0 @@
RCSS = Makefile.in configure.in README
all: wmusic
wmusic:
cd src && ${MAKE} wmusic
clean:
rm -f *~ *.o core wmusic.spec
cd src && ${MAKE} clean
distclean: clean
rm -f config.status config.log Makefile config.cache
cd src && ${MAKE} distclean
install:
cd src && ${MAKE} install
uninstall:
cd src && ${MAKE} uninstall

8
wmusic/configure.ac Normal file
View file

@ -0,0 +1,8 @@
AC_INIT([wmusic], [1.5.0], [wmaker-dev@googlegroups.com])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_SRCDIR([configure.ac])
AC_PROG_CC
PKG_CHECK_MODULES([X11], [x11])
PKG_CHECK_MODULES([DOCKAPP], [dockapp])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View file

@ -1,63 +0,0 @@
dnl configure.in for wmusic
AC_PREREQ(2.12)
AC_INIT(src/wmusic.c)
VERSION=1.5.0
PACKAGE=wmusic
echo
echo "Configuring package: $PACKAGE-$VERSION"
echo
AC_PROG_CC
AC_PROG_INSTALL
AC_CONFIG_HEADER(src/config.h:src/config.h.in)
AC_PATH_X
dnl AC_CHECK_LIB(dockapp, DAProcessActionRects, ,
dnl echo
dnl echo "Error: libdockapp was not found"
dnl echo
dnl exit 1)
AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,[
AC_DEFINE(XF86VIDMODE,1,[XF86VidMode extension is present])
VM_LIBS="-lXxf86vm"],,-L$x_libraries -lXext)
AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,[
AC_DEFINE(XF86DGA,1,[XF86DGA extension is present])
DGA_LIBS="-lXxf86dga"],,-L$x_libraries -lXext)
AC_PATH_PROG(PATH_XMMSCONFIG,xmms-config, no,
$PATH:/usr/X11R6/bin:/usr/local/bin)
if test $PATH_XMMSCONFIG = "no"; then
echo
echo "It appears as if Xmms (X Multimedia System - http://www.xmms.org)"
echo "is not installed on your computer."
echo
echo "If you have Xmms, make sure xmms-config is in your \$PATH"
echo
exit
fi
AC_PATH_PROG(PATH_GTKCONFIG,gtk-config, no,
$PATH:/usr/X11R6/bin:/usr/local/bin)
if test $PATH_GTKCONFIG = "no"; then
echo
echo "It appears as if GTK+ - http://www.gtk.org)"
echo "is not installed on your computer."
echo
echo "If you have gtk+, make sure gtk-config is in your \$PATH"
echo
exit
fi
AC_SUBST(DGA_LIBS)
AC_SUBST(VM_LIBS)
AC_SUBST(VERSION)
AC_SUBST(PACKAGE)
AC_OUTPUT(Makefile wmusic.spec src/Makefile src/version.h)

View file

@ -1,37 +0,0 @@
RCSS = wmusic.c Makefile.in config.h.in version.h.in
CC = @CC@
PREFIX = @prefix@
SRCS = wmusic.c ../libdockapp/dacallback.c ../libdockapp/dacolor.c \
../libdockapp/daevent.c ../libdockapp/damain.c \
../libdockapp/dapixmap.c ../libdockapp/darect.c
OBJS = $(SRCS:.c=.o)
CFLAGS = -Wall -g -O2 -I. -I../libdockapp `@PATH_GTKCONFIG@ --cflags` \
`@PATH_XMMSCONFIG@ --cflags` \
-DDATA_DIR=\"`@PATH_XMMSCONFIG@ --data-dir`\"
LDFLAGS = @LIBS@ -lXpm `@PATH_GTKCONFIG@ --libs` `@PATH_XMMSCONFIG@ --libs` \
@DGA_LIBS@ @VM_LIBS@
all: wmusic
install: all
if test ! -d $(PREFIX); then mkdir -p $(PREFIX); fi
if test ! -d $(PREFIX)/bin; then mkdir -p $(PREFIX)/bin; fi
@INSTALL@ -c -m 755 -s wmusic $(PREFIX)/bin
wmusic: $(OBJS) $(IFLAGS)
gcc -g -o wmusic $(OBJS) $(LDFLAGS)
uninstall: clean
rm -f $(PREFIX)/bin/wmusic
clean:
rm -f *~ *.o ../libdockapp/*~ ../libdockapp/*.o core wmusic
distclean: clean
rm -f Makefile config.h version.h

View file

View file

@ -31,7 +31,6 @@
#include <xmms/xmmsctrl.h>
#include "version.h"
#include "config.h"
#include "wmusic-master.xpm"
#include "wmusic-digits.xpm"