summaryrefslogtreecommitdiff
path: root/navit
diff options
context:
space:
mode:
Diffstat (limited to 'navit')
-rw-r--r--navit/AUTHORS0
-rw-r--r--navit/ChangeLog0
-rw-r--r--navit/Makefile.am1
-rw-r--r--navit/NEWS0
-rw-r--r--navit/README0
-rwxr-xr-xnavit/autogen.sh2
-rw-r--r--navit/configure.in24
-rw-r--r--navit/src/speech.c18
8 files changed, 43 insertions, 2 deletions
diff --git a/navit/AUTHORS b/navit/AUTHORS
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/navit/AUTHORS
diff --git a/navit/ChangeLog b/navit/ChangeLog
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/navit/ChangeLog
diff --git a/navit/Makefile.am b/navit/Makefile.am
new file mode 100644
index 000000000..1bfdcf486
--- /dev/null
+++ b/navit/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS=src
diff --git a/navit/NEWS b/navit/NEWS
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/navit/NEWS
diff --git a/navit/README b/navit/README
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/navit/README
diff --git a/navit/autogen.sh b/navit/autogen.sh
new file mode 100755
index 000000000..fd0be89ce
--- /dev/null
+++ b/navit/autogen.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+autoreconf --force --install -I config -I m4
diff --git a/navit/configure.in b/navit/configure.in
new file mode 100644
index 000000000..300497d9d
--- /dev/null
+++ b/navit/configure.in
@@ -0,0 +1,24 @@
+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
+])
diff --git a/navit/src/speech.c b/navit/src/speech.c
index c913629c5..8823e1550 100644
--- a/navit/src/speech.c
+++ b/navit/src/speech.c
@@ -1,5 +1,5 @@
/* 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>
@@ -11,8 +11,10 @@
#include <stdlib.h>
#include <glib.h>
#include <stdarg.h>
-
+#include "config.h"
+#ifdef HAVE_LIBSPEECHD
#include <libspeechd.h>
+#endif
#include "speech.h"
struct speech {
@@ -21,6 +23,7 @@ struct speech {
struct speech *
speech_new(void) {
+#ifdef HAVE_LIBSPEECHD
struct speech *this;
int sockfd;
@@ -32,30 +35,41 @@ speech_new(void) {
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;
}