From: Kaj-Michael Lang Date: Thu, 31 Jan 2008 13:19:37 +0000 (+0200) Subject: Make gstreamer+espeak optional. Use --enable-gst to get speech support. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae9bcfd4966f49ec9c688d8c0e6ae80ca76e4a55;p=mapper Make gstreamer+espeak optional. Use --enable-gst to get speech support. --- diff --git a/configure.ac b/configure.ac index 0a7d43b..4eaef79 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index 76d06cc..938e023 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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