]> err.no Git - mapper/commitdiff
Make gstreamer+espeak optional. Use --enable-gst to get speech support.
authorKaj-Michael Lang <milang@tal.org>
Thu, 31 Jan 2008 13:19:37 +0000 (15:19 +0200)
committerKaj-Michael Lang <milang@tal.org>
Thu, 31 Jan 2008 13:19:37 +0000 (15:19 +0200)
configure.ac
src/Makefile.am

index 0a7d43ba463ec0560b0ce1d1ce7acd4077fd24ed..4eaef797615cc07bd751637ba2a7defce1c94ef4 100644 (file)
@@ -81,6 +81,9 @@ AC_SUBST(SQLITE_CFLAGS)
 AC_ARG_ENABLE([770],AS_HELP_STRING([--enable-770],[Build for Nokia 770/N800]),
               [enable_770=$enableval], [enable_770=no])
 
+AC_ARG_ENABLE([gst],AS_HELP_STRING([--enable-gst],[Enable support for gstreamer]),
+              [enable_gst=$enableval], [enable_gst=no])
+
 AC_ARG_ENABLE([hildon],AS_HELP_STRING([--enable-hildon],[Build for Hildon]),
               [enable_hildon=$enableval], [enable_hildon=no])
 
@@ -271,7 +274,6 @@ if test "x$enable_gypsy" = "xyes" ; then
 fi
 AM_CONDITIONAL(HAVE_GYPSY, [test "$enable_gypsy" = "yes"])
 
-
 if test "x$enable_geoclue" = "xyes" ; then
  PKG_CHECK_MODULES(GEOCLUE, geoclue, HAVE_GEOCLUE=yes, HAVE_GEOCLUE=no)
  if test "x$HAVE_GEOCLUE" = "xyes"; then
@@ -282,16 +284,18 @@ if test "x$enable_geoclue" = "xyes" ; then
 fi
 AM_CONDITIONAL(HAVE_GEOCLUE, [test "$enable_geoclue" = "yes"])
 
-
-PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10, HAVE_GST=yes, HAVE_GST=no)
-if test "x$HAVE_GST" = "xyes"; then
- AC_DEFINE(WITH_GST, 1, [build with Gstreamer])
- GSTREAMER_LIBS="$GSTREAMER_LIBS -lgstapp-0.10"
- AC_SUBST(GSTREAMER_LIBS)
- AC_SUBST(GSTREAMER_CFLAGS)
-else
- AC_MSG_ERROR([Mapper requires gstreamer.])
+if test "x$enable_gst" = "xyes" ; then
+ PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10, HAVE_GST=yes, HAVE_GST=no)
+ if test "x$HAVE_GST" = "xyes"; then
+  AC_DEFINE(WITH_GST, 1, [build with Gstreamer])
+  GSTREAMER_LIBS="$GSTREAMER_LIBS -lgstapp-0.10"
+  AC_SUBST(GSTREAMER_LIBS)
+  AC_SUBST(GSTREAMER_CFLAGS)
+ else
+  AC_MSG_ERROR([Gstreamer requested but can not be found.])
+ fi
 fi
+AM_CONDITIONAL(HAVE_GST, [test "$enable_gst" = "yes"])
 
 AC_CHECK_HEADERS(bzlib.h,
     BZ2_LIBS="$BZ2_LIBS -lbz2",
@@ -310,15 +314,18 @@ AC_CHECK_HEADERS(expat.h,
        )
 AC_SUBST(EXPAT_LIBS)
 
-AC_CHECK_HEADER(espeak/speak_lib.h, HAVE_ESPEAK=yes, HAVE_ESPEAK=no)
 if test "x$HAVE_GST" = "xyes"; then
-ESPEAK_LIBS="-lespeak"
-ESPEAK_CFLAGS="-I/usr/include/espeak"
-AC_CHECK_LIB([espeak], [espeak_Initialize],
-  AC_DEFINE(WITH_ESPEAK, 1, [Defined if you have espeak])
-  AC_SUBST(ESPEAK_CFLAGS)
-  AC_SUBST(ESPEAK_LIBS)
-)
+ AC_CHECK_HEADER(espeak/speak_lib.h, HAVE_ESPEAK=yes, HAVE_ESPEAK=no)
+ if test "x$HAVE_ESPEAK" = "xyes"; then
+  ESPEAK_LIBS="-lespeak"
+  ESPEAK_CFLAGS="-I/usr/include/espeak"
+  AC_CHECK_LIB([espeak], [espeak_Initialize],
+   AC_DEFINE(WITH_ESPEAK, 1, [Defined if you have espeak])
+   AC_SUBST(ESPEAK_CFLAGS)
+   AC_SUBST(ESPEAK_LIBS))
+ else
+       AC_MSG_ERROR([Speech output requires espeak.])
+ fi
 fi
 
 # Localisation
@@ -436,3 +443,7 @@ fi
 if test x$enable_gypsy = xyes; then
 AC_MSG_NOTICE([** Gypsy D-Bus GPS support enabled])
 fi
+
+if test x$enable_gst = xyes; then
+AC_MSG_NOTICE([** Gstreamer support enabled])
+fi
index 76d06cc140ba14e0524eb12350bfd6ffcf90778b..938e023a0caa49f5c8f2b466c03d552f5538592b 100644 (file)
@@ -70,11 +70,12 @@ mapper_SOURCES = utils.c \
        config-gconf.c \
        speak.c \
        announcements.c \
-       audio-note.c \
        help.c \
        search.c \
        mapper.c
 
+# audio-note.c
+
 osm2db_CFLAGS = $(EXPAT_CFLAGS) $(SQLITE_CFLAGS) $(GLIBGTK_CFLAGS)
 osm2db_LDADD = $(EXPAT_LIBS) $(SQLITE_LIBS) $(GLIBGTK_LIBS) $(BZ2_LIBS) -lm libosmdb.la
 osm2db_SOURCES = osm.c