--- /dev/null
+AC_INIT(navit, 0.0.1)
+AM_INIT_AUTOMAKE
+AM_CONFIG_HEADER(config.h)
+AM_MAINTAINER_MODE
+
+AC_PROG_CC
+
+pkg_modules="glib-2.0 gtk+-2.0 ORBit-2.0"
+PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
+AC_SUBST(PACKAGE_CFLAGS)
+AC_SUBST(PACKAGE_LIBS)
+AC_CHECK_HEADER(libspeechd.h, AC_DEFINE([HAVE_LIBSPEECHD],[],Define to 1 if you have the <libspeechd.h> header file.), AC_MSG_WARN([*** no libspeechd.h -- Speech output disabled]))
+
+
+AC_CONFIG_SUBDIRS(src/fib-1.0)
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+src/gui/Makefile
+src/gui/gtk/Makefile
+src/graphics/Makefile
+src/graphics/gtk_drawing_area/Makefile
+])
/* speechd simple client program
- * CVS revision: $Id: speech.c,v 1.1 2005-12-02 10:41:56 martin-s Exp $
+ * CVS revision: $Id: speech.c,v 1.2 2005-12-02 12:32:47 martin-s Exp $
* Author: Tomas Cerha <cerha@brailcom.cz> */
#include <sys/types.h>
#include <stdlib.h>
#include <glib.h>
#include <stdarg.h>
-
+#include "config.h"
+#ifdef HAVE_LIBSPEECHD
#include <libspeechd.h>
+#endif
#include "speech.h"
struct speech {
struct speech *
speech_new(void) {
+#ifdef HAVE_LIBSPEECHD
struct speech *this;
int sockfd;
this->sockfd=sockfd;
}
return this;
+#else
+ return NULL;
+#endif
}
int
speech_say(struct speech *this, char *text) {
+#ifdef HAVE_LIBSPEECHD
int err;
err = spd_sayf(this->sockfd, 2, text);
if (err != 1)
return 1;
+#endif
return 0;
}
int
speech_sayf(struct speech *this, char *format, ...) {
+#ifdef HAVE_LIBSPEECHD
char buffer[8192];
va_list ap;
va_start(ap,format);
vsnprintf(buffer, 8192, format, ap);
return speech_say(this, buffer);
+#else
+ return 0;
+#endif
}
int
speech_destroy(struct speech *this) {
+#ifdef HAVE_LIBSPEECHD
spd_close(this->sockfd);
g_free(this);
+#endif
return 0;
}