mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-09 09:19:09 +02:00
convert to autotools
This commit is contained in:
parent
d1630432ba
commit
056dcf70fe
14 changed files with 99 additions and 82 deletions
13
.gitignore
vendored
13
.gitignore
vendored
|
|
@ -1,3 +1,14 @@
|
|||
.deps
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.*
|
||||
configure
|
||||
depcomp
|
||||
espeakup
|
||||
*.d
|
||||
install-sh
|
||||
Makefile
|
||||
Makefile.in
|
||||
missing
|
||||
stamp-h1
|
||||
*.o
|
||||
*.swp
|
||||
|
|
|
|||
47
Makefile
47
Makefile
|
|
@ -1,47 +0,0 @@
|
|||
INSTALL ?= install
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
BINDIR ?= $(PREFIX)/bin
|
||||
MANDIR ?= $(PREFIX)/share/man
|
||||
|
||||
AUDIO ?= portaudio
|
||||
|
||||
alsa_SRCS = alsa.c
|
||||
portaudio_SRCS = portaudio.c
|
||||
|
||||
SRCS = $($(AUDIO)_SRCS) \
|
||||
cli.c \
|
||||
espeak.c \
|
||||
espeakup.c \
|
||||
queue.c \
|
||||
signal.c \
|
||||
softsynth.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
DEPFLAGS = -MMD
|
||||
WARNFLAGS = -Wall
|
||||
ifeq ($(AUDIO),alsa)
|
||||
SOUNDLIB = -lasound
|
||||
endif
|
||||
LDLIBS = -lespeak $(SOUNDLIB)
|
||||
|
||||
all: espeakup
|
||||
|
||||
install: espeakup
|
||||
$(INSTALL) -d $(DESTDIR)$(BINDIR)
|
||||
$(INSTALL) -d $(DESTDIR)$(MANDIR)/man8
|
||||
$(INSTALL) -m 755 $< $(DESTDIR)$(BINDIR)
|
||||
$(INSTALL) -m 644 espeakup.8 $(DESTDIR)$(MANDIR)/man8
|
||||
|
||||
espeakup: $(OBJS)
|
||||
|
||||
clean:
|
||||
$(RM) *.d *.o
|
||||
|
||||
distclean: clean
|
||||
$(RM) espeakup
|
||||
|
||||
%.o: %.c
|
||||
$(COMPILE.c) $(DEPFLAGS) $(WARNFLAGS) $(OUTPUT_OPTION) $<
|
||||
|
||||
-include $(SRCS:.c=.d)
|
||||
10
Makefile.am
Normal file
10
Makefile.am
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
bin_PROGRAMS = espeakup
|
||||
espeakup_SOURCES = espeakup.c espeakup.h cli.c espeak.c queue.c queue.h signal.c softsynth.c
|
||||
|
||||
if ALSA
|
||||
espeakup_SOURCES += alsa.c
|
||||
else
|
||||
espeakup_SOURCES += portaudio.c
|
||||
endif
|
||||
|
||||
dist_man8_MANS = espeakup.8
|
||||
4
alsa.c
4
alsa.c
|
|
@ -22,6 +22,10 @@
|
|||
* Description: Produce audio by calling the ALSA library directly.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
|
|
|||
10
cli.c
10
cli.c
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -24,9 +28,6 @@
|
|||
|
||||
#include "espeakup.h"
|
||||
|
||||
/* program version */
|
||||
extern const char *Version;
|
||||
|
||||
/* default voice */
|
||||
extern char *defaultVoice;
|
||||
|
||||
|
|
@ -53,10 +54,11 @@ static void show_help()
|
|||
|
||||
static void show_version(void)
|
||||
{
|
||||
printf("espeakup %s\n", Version);
|
||||
printf("%s\n", PACKAGE_STRING);
|
||||
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");
|
||||
printf("Please report bugs to %s\n", PACKAGE_BUGREPORT);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
43
configure.ac
Normal file
43
configure.ac
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# -*- 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])
|
||||
AC_CONFIG_SRCDIR([espeakup.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
# process command line options
|
||||
AC_ARG_WITH([alsa],
|
||||
[AS_HELP_STRING([--with-alsa],[build with ALSA support])],
|
||||
[],
|
||||
[with_alsa=no])
|
||||
AM_CONDITIONAL([ALSA], [test x$with_alsa = xyes])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# Checks for libraries.
|
||||
if test x$with_alsa = xyes; then
|
||||
AC_SEARCH_LIBS([snd_pcm_open], [asound])
|
||||
fi
|
||||
AC_SEARCH_LIBS([espeak_Synth], [espeak])
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([fcntl.h limits.h stddef.h stdlib.h string.h unistd.h espeak/speak_lib.h])
|
||||
if test x$with_alsa = xyes; then
|
||||
AC_CHECK_HEADERS([alsa/asoundlib.h])
|
||||
fi
|
||||
|
||||
# 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
|
||||
4
espeak.c
4
espeak.c
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -26,9 +30,6 @@
|
|||
|
||||
#include "espeakup.h"
|
||||
|
||||
/* program version */
|
||||
const char *Version = "0.71";
|
||||
|
||||
/* path to our pid file */
|
||||
const char *pidPath = "/var/run/espeakup.pid";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "espeakup.h"
|
||||
|
||||
void select_audio_mode(void)
|
||||
|
|
|
|||
4
queue.c
4
queue.c
|
|
@ -21,6 +21,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
4
signal.c
4
signal.c
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
22
tarball
22
tarball
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Makes a tarball release
|
||||
|
||||
VER=$(./version)
|
||||
PREFIX=espeakup-${VER}
|
||||
REL=${1:-v${VER}}
|
||||
|
||||
if [ "$REL" != "v${VER}" ]; then
|
||||
TIMESTAMP=`git show $REL --pretty=format:%ai |head -1`
|
||||
PATCHLEVEL=`date --utc -d "$TIMESTAMP" +_p%Y%m%d%H%M`
|
||||
fi
|
||||
|
||||
TARFILE=${PREFIX}${PATCHLEVEL}.tar
|
||||
|
||||
git archive --format=tar --prefix=${PREFIX}/ $REL > ${TARFILE}
|
||||
tar f ${TARFILE} --delete ${PREFIX}/.gitignore --delete ${PREFIX}/tarball
|
||||
mkdir ${PREFIX}
|
||||
git log ${REL} > ${PREFIX}/ChangeLog
|
||||
tar rf ${TARFILE} ${PREFIX}
|
||||
rm -rf ${PREFIX}
|
||||
bzip2 ${TARFILE}
|
||||
echo "Produced ${TARFILE}.bz2"
|
||||
5
version
5
version
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
ver=$(grep "const char.*Version" espeakup.c)
|
||||
ver=${ver%\"*}
|
||||
ver=${ver#*\"}
|
||||
echo ${ver}
|
||||
Loading…
Add table
Add a link
Reference in a new issue