From 701074fd9685ce4133672fbb35f046e76ab13422 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sat, 5 Mar 2011 20:11:21 -0600 Subject: [PATCH] go back to just using a makefile The reason I went to autotools was the multiple sound systems, but since we are now just using espeak's audio processing we can go back to a more simple build system. --- .gitignore | 12 +----------- Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ Makefile.am | 8 -------- README | 16 +++------------- cli.c | 6 +----- configure.ac | 51 --------------------------------------------------- espeak.c | 4 ---- espeakup.c | 4 ---- espeakup.h | 3 +++ queue.c | 4 ---- signal.c | 4 ---- softsynth.c | 4 ---- 12 files changed, 48 insertions(+), 108 deletions(-) create mode 100644 Makefile delete mode 100644 Makefile.am delete mode 100644 configure.ac diff --git a/.gitignore b/.gitignore index c6a1e36..7870fbc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,4 @@ -.deps -aclocal.m4 -autom4te.cache -config.* -configure -depcomp espeakup -install-sh -Makefile -Makefile.in -missing -stamp-h1 +*.d *.o *.swp diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9c156f6 --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +PREFIX = /usr/local +BINDIR = ${PREFIX}/bin +MANDIR = ${PREFIX}/share/man + +DEPFLAGS = -MMD +WARNFLAGS = -Wall +CFLAGS += ${DEPFLAGS} ${WARNFLAGS} + +LDLIBS = -lespeak -lpthread + +INSTALL = install +BINMODE = 0755 +MANMODE = 0644 + +SRCS = cli.c \ + espeak.c \ + espeakup.c \ + queue.c \ + signal.c \ + softsynth.c + +OBJS = ${SRCS:.c=.o} + +all: espeakup + +install: espeakup + ${INSTALL} -d ${DESTDIR}${BINDIR} + ${INSTALL} -m ${BINMODE} $< ${DESTDIR}${BINDIR} + ${INSTALL} -d ${DESTDIR}${MANDIR}/man8 + ${INSTALL} -m 644 espeakup.8 ${DESTDIR}${MANDIR}/man8 + +espeakup: ${OBJS} + +clean: + ${RM} *.d *.o + +distclean: clean + ${RM} espeakup + +-include ${SRCS:.c=.d} diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 3afa3ae..0000000 --- a/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -bin_PROGRAMS = espeakup -espeakup_SOURCES = espeakup.c espeakup.h cli.c espeak.c queue.c queue.h signal.c softsynth.c - -if STANDALONE -espeakup_LDFLAGS = -all-static -endif - -dist_man8_MANS = espeakup.8 diff --git a/README b/README index f3cd032..b8ed359 100644 --- a/README +++ b/README @@ -19,19 +19,9 @@ Installation The preferred way to install espeakup is using your distribution's packaging system, but if your distribution does not have a package for -espeakup yet, here are some basic instructions. - -Espeakup uses an autotools build system, so installation should be very -straight forward. - -If you are installing from git, you must have at least automake 1.11.1 -and autoconf 2.65 installed. Then, change to the repository directory -and type: - -autoreconf -i - -If this runs successfully, you will have a configure script, so run it -then run make. If that completes successfully, run make install. +espeakup yet, espeakup just uses a Makefile, so you should be able to +change to the source directory, then type make, then as root, make +install. Starting Up =========== diff --git a/cli.c b/cli.c index af8ec14..64cfd6b 100644 --- a/cli.c +++ b/cli.c @@ -17,10 +17,6 @@ * along with this program. If not, see . */ -#ifdef HAVE_CONFIG_H -#include -#endif - #include #include #include @@ -54,7 +50,7 @@ static void show_help() static void show_version(void) { - printf("%s\n", PACKAGE_STRING); + printf("ESpeakup %s\n", PACKAGE_VERSION); printf("Copyright (C) 2008 William Hubbs\n"); printf("License GPLv3+: GNU GPL version 3 or later\n"); printf("You are free to change and redistribute this software.\n"); diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 084ddb6..0000000 --- a/configure.ac +++ /dev/null @@ -1,51 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.65]) -AC_INIT([espeakup], [0.71], [w.d.hubbs@gmail.com]) -AM_INIT_AUTOMAKE([foreign]) -LT_INIT() -AC_CONFIG_SRCDIR([espeakup.c]) -AC_CONFIG_HEADERS([config.h]) - -# process command line options -AC_ARG_ENABLE([standalone], - [AS_HELP_STRING([--enable-standalone],[build a standalone executable])], - [], - [enable_standalone=no]) -AM_CONDITIONAL([STANDALONE], [test x$enable_standalone = xyes]) - -# Checks for programs. -AC_PROG_CC -AC_PROG_INSTALL - -# Checks for libraries. -AC_SEARCH_LIBS([pow], [m], [], - [AC_MSG_FAILURE([math library missing -- unable to continue.])]) -AC_SEARCH_LIBS([pthread_create], [pthread], [], - [AC_MSG_FAILURE([threads library missing -- unable to continue.])]) - -AS_IF([test x$with_alsa = xyes], - [AC_SEARCH_LIBS([snd_pcm_open], [asound], [], - [AC_MSG_FAILURE([ALSA library missing -- unable to continue.])])]) - -AC_SEARCH_LIBS([Pa_Initialize], [portaudio]) -AC_SEARCH_LIBS([espeak_Synth], [espeak], [], - [AC_MSG_FAILURE([espeak library missing -- unable to continue.])]) - -# Checks for header files. -AC_CHECK_HEADERS([fcntl.h limits.h stddef.h stdlib.h string.h unistd.h]) -AS_IF([test x$with_alsa = xyes], - [AC_CHECK_HEADERS([alsa/asoundlib.h])]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_TYPE_SSIZE_T - -# Checks for library functions. -AC_FUNC_MALLOC -AC_CHECK_FUNCS([memmove select strdup strrchr]) - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT diff --git a/espeak.c b/espeak.c index 8c0f275..5e69ac5 100644 --- a/espeak.c +++ b/espeak.c @@ -17,10 +17,6 @@ * along with this program. If not, see . */ -#ifdef HAVE_CONFIG_H -#include -#endif - #include #include #include diff --git a/espeakup.c b/espeakup.c index 38dcf4f..e059b84 100644 --- a/espeakup.c +++ b/espeakup.c @@ -17,10 +17,6 @@ * along with this program. If not, see . */ -#ifdef HAVE_CONFIG_H -#include -#endif - #include #include #include diff --git a/espeakup.h b/espeakup.h index 8680ae2..8cd318a 100644 --- a/espeakup.h +++ b/espeakup.h @@ -28,6 +28,9 @@ #include "queue.h" +#define PACKAGE_VERSION "0.80-dev" +#define PACKAGE_BUGREPORT "http://github.com/williamh/espeakup/issues" + enum command_t { CMD_SET_FREQUENCY, CMD_SET_PITCH, diff --git a/queue.c b/queue.c index 9815e48..e1827da 100644 --- a/queue.c +++ b/queue.c @@ -21,10 +21,6 @@ * along with this program. If not, see . */ -#ifdef HAVE_CONFIG_H -#include -#endif - #include #include #include diff --git a/signal.c b/signal.c index 52f3ec6..5996986 100644 --- a/signal.c +++ b/signal.c @@ -17,10 +17,6 @@ * along with this program. If not, see . */ -#ifdef HAVE_CONFIG_H -#include -#endif - #include #include #include diff --git a/softsynth.c b/softsynth.c index 4bac4f2..9747963 100644 --- a/softsynth.c +++ b/softsynth.c @@ -17,10 +17,6 @@ * along with this program. If not, see . */ -#ifdef HAVE_CONFIG_H -#include -#endif - #include #include #include