speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/1] major update to configure script


From: William Hubbs
Subject: [PATCH 1/1] major update to configure script
Date: Thu, 30 Sep 2010 10:54:52 -0500

This update is based on running autoscan against our source tree,
removing some obsolete autotools macros and updating the calls to
others to use modern syntax.

Also, this update re-arranges the script in a more logical arrangement
and updates the way we check for optional components.
---
 configure.ac |  814 ++++++++++++++++++++++++++--------------------------------
 1 files changed, 358 insertions(+), 456 deletions(-)
 rewrite configure.ac (82%)

diff --git a/configure.ac b/configure.ac
dissimilarity index 82%
index 4ab324f..a4b136d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,456 +1,358 @@
-
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT([speech-dispatcher], [0.7.1-beta1], [speechd at lists.freebsoft.org])
-
-
-
-AC_LANG(C)
-
-dnl progs
-AC_PROG_CC
-
-dnl info
-AM_INIT_AUTOMAKE([foreign])
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
-
-AM_CONFIG_HEADER(config.h)
-
-# Command-line arguments.
-AC_ARG_ENABLE([python],
-       [AS_HELP_STRING([--disable-python], [do not install python bindings])],
-       [],
-       [enable_python=check])
-
-#
-# Setup GETTEXT
-#
-GETTEXT_PACKAGE=speech-dispatcher
-AC_SUBST(GETTEXT_PACKAGE)
-AM_GLIB_GNU_GETTEXT
-IT_PROG_INTLTOOL([0.40.0])
-
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS(limits.h sys/ioctl.h sys/time.h unistd.h)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_HEADER_TIME
-
-# Python support
-# Python 2.4 or greater should be acceptable.
-AS_IF([test $enable_python != "no"],
-       [AM_PATH_PYTHON([2.4],
-               [enable_python=yes],
-               [AS_IF([test $enable_python = "yes"],
-               [AC_MSG_FAILURE([python is not available])])])])
-AM_CONDITIONAL([HAVE_PYTHON], [test "$enable_python" = 'yes'])
-
-dnl Checks for library functions.
-AC_PROG_GCC_TRADITIONAL
-AC_CHECK_FUNCS(select socket)
-
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-
-AC_PROG_LIBTOOL
-
-# by Marcelo Magallon <mmagallo at efis.ucr.ac.cr>
-# Turn around -rpath problem with libtool
-# This define should be improbable enough to not conflict with anything
-case ${host} in
-  *-pc-linux-gnu)
-    AC_MSG_RESULT([Fixing libtool for -rpath problems.])
-    sed < libtool > libtool-2 \
-    's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" 
-D__LIBTOOL_IS_A_FOOL__ "/'
-    mv libtool-2 libtool
-    chmod 755 libtool
-  ;;
-esac
-
-dnl Checks for libraries.
-AC_SEARCH_LIBS([sqrt], [m], [],
-       [AC_MSG_FAILURE([Math library missing])])
-AC_SEARCH_LIBS([pthread_create], [pthread], [],
-       [AC_MSG_FAILURE([Threads library missing])])
-AC_SEARCH_LIBS([lt_dlopen], [ltdl], [],
-       [AC_MSG_FAILURE([ltdl library missing])])
-
-PKG_CHECK_MODULES(GLIB,glib-2.0,,exit)
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-
-PKG_CHECK_MODULES(GTHREAD,gthread-2.0,,exit)
-AC_SUBST(GTHREAD_CFLAGS)
-AC_SUBST(GTHREAD_LIBS)
-
-PKG_CHECK_MODULES(GMODULE,gmodule-2.0,,exit)
-AC_SUBST(GMODULE_CFLAGS)
-AC_SUBST(GMODULE_LIBS)
-
-PKG_CHECK_MODULES(DOTCONF,dotconf,,exit)
-AC_SUBST(DOTCONF_CFLAGS)
-AC_SUBST(DOTCONF_LIBS)
-
-dnl Check for libsndfile.
-PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, ac_cv_sndfile=1, ac_cv_sndfile=0)
-
-AC_DEFINE_UNQUOTED([HAVE_SNDFILE],${ac_cv_sndfile},
-        [Set to 1 if you have libsndfile.])
-
-AC_SUBST(SNDFILE_CFLAGS)
-AC_SUBST(SNDFILE_LIBS)
-
-dnl Check for Flite (currently required)
-AC_CHECK_LIB(flite,
-        flite_init, echo "",
-        echo "",
-       -lm)
-
-AC_CHECK_LIB(flite_cmulex,
-        cmu_lex_init, echo "",
-        echo "",
-       -lflite -lm)
-
-AC_CHECK_LIB(flite_usenglish,
-        usenglish_init, echo "",
-        echo "",
-       -lflite -lm)
-
-flite_basic="-lflite_cmulex -lflite_usenglish -lflite -lm";
-
-AC_CHECK_LIB(flite_cmu_us_kal16,
-       register_cmu_us_kal, 
flite_ok="true";flite_kal="-lflite_cmu_us_kal16";echo "16-bit Kal Flite voice 
found. Flite support enabled.",
-       AC_CHECK_LIB(flite_cmu_us_kal16,
-               register_cmu_us_kal16,
-               flite_ok="true";
-               flite_kal="-lflite_cmu_us_kal16";
-               echo "16-bit Kal Flite voice found. Flite support enabled.";
-               AC_DEFINE([HAVE_REGISTER_CMU_US_KAL16], 1,
-                       [Use cmu_register_us_kal16 to register the 16-bit 
voice.]),
-               AC_CHECK_LIB(flite_cmu_us_kal,
-                       register_cmu_us_kal, 
flite_ok="true";flite_kal="-lflite_cmu_us_kal";
-                       echo "8-bit Kal Flite voice found. Flite support 
enabled.",
-                       flite_ok="false"; echo "Flite libraries missing. 
Compiling without Flite support!",
-                       $flite_basic),
-               $flite_basic),
-       $flite_basic)
-
-AC_SUBST(flite_basic)
-AC_SUBST(flite_kal)
-
-AC_ARG_WITH(flite, AS_HELP_STRING(--with-flite, Compile with Festival Lite 
(Flite) support),
-                if test $withval = "no"; then
-                   echo "Forced compilation without Flite support.";
-                   flite_ok="false";
-                else
-                   if test $flite_ok = "false"; then
-                      echo "Flite support is not available. Sorry."; exit 1;
-                   fi
-                 fi
-                echo "")
-
-AM_CONDITIONAL(flite_support, test $flite_ok = "true")
-
-dnl Check for IBM TTS
-AC_CHECK_LIB(ibmeci,
-        eciStop,
-        ibmtts_ok="true";ibmtts_include="-I/opt/IBM/ibmtts/inc/"; echo 
"Compiling with IBM TTS support.",
-        ibmtts_ok="false";ibmtts_include=""; echo "*** IBM TTS ECI library 
missing. Compiling without IBM TTS support! See INSTALL.";,
-       -libmeci)
-
-AC_ARG_WITH(ibmtts, AS_HELP_STRING(--with-ibmtts, Compile with IBM TTS 
support),
-                if test $withval = "no"; then
-                   echo "Forced compilation without IBMTTS support.";
-                   ibmtts_ok="false";
-                else
-                   if test $ibmtts_ok = "false"; then
-                      echo "IBM TTS support is not available. Sorry."; exit 1;
-                   fi
-                 fi
-                echo "")
-
-AM_CONDITIONAL(ibmtts_support, test $ibmtts_ok = "true")
-
-AC_SUBST(ibmtts_include)
-
-# Additional library check added by Willie Walker to account
-# for how the SunStudio CC compiler works.
-#
-dnl check for espeak support
-if test "$GCC" = yes; then
-    EXTRA_ESPEAK_LIBS="-lpthread -lm"
-else
-    EXTRA_ESPEAK_LIBS="-lpthread -lm -lCstd -lCrun"
-fi
-AC_SUBST(EXTRA_ESPEAK_LIBS)
-
-AC_CHECK_LIB(espeak,
-espeak_Synth,
-               espeak_ok="true"; echo "Compiling with espeak support.",
-               espeak_ok="false"; echo "Espeak not found.",
-               $EXTRA_ESPEAK_LIBS)
-
-AC_ARG_WITH(espeak, AS_HELP_STRING(--with-espeak, Compile with espeak support),
-                if test $withval = "no"; then
-                   echo "Forced compilation without espeak support.";
-                   espeak_ok="false";
-                else
-                   if test $espeak_ok = "false"; then
-                      echo "Espeak support is not available. Sorry."; exit 1;
-                   fi
-                 fi
-                echo "")
-
-AM_CONDITIONAL(espeak_support, test $espeak_ok = "true")
-
-dnl check for dumbtts support
-AC_CHECK_LIB(dumbtts,
-       dumbtts_TTSInit,
-       ivona_ok="true"; echo "Compiling with Ivona support.";,
-       ivona_ok="false"; echo "Dumbtts library not found. Not installing 
Ivona.";,
-       -ldumbtts)
-
-AC_ARG_WITH(ivona, AS_HELP_STRING(--with-ivona, Compile with ivona support),
-                if test $withval = "no"; then
-                   echo "Forced compilation without ivona support.";
-                   ivona_ok="false";
-                else
-                   if test $ivona_ok = "false"; then
-                      echo "Ivona support is not available. Sorry."; exit 1;
-                   fi
-                 fi
-                echo "")
-
-AM_CONDITIONAL(ivona_support, test $ivona_ok = "true")
-
-AC_ARG_WITH([pico],
-       [AS_HELP_STRING([--with-pico], [include SVOX pico support])],
-       [],
-       [with_pico=check])
-
-# check for SVOX pico support
-AS_IF([test $with_pico != "no"],
-       [AC_CHECK_LIB([ttspico],
-               [pico_initialize],
-               [with_pico=yes],
-               [AS_IF([test $with_pico = "yes"],
-                       [AC_MSG_FAILURE([SVOX pico is not available])])])])
-
-AM_CONDITIONAL(pico_support, test $with_pico = "yes")
-
-STATIC_AUDIO_PLUGINS_LIST=""
-SPD_AUDIO_LIBS=
-
-AC_CHECK_LIB(audio,
-        AuOpenServer,
-       nas_aud="true";echo "Compiling with NAS support.";,
-        nas_aud="false";echo "*** NAS Audio library missing. Compiling without 
NAS support! See INSTALL.";,
-       -L/usr/X11R6/lib -lXau)
-
-AC_ARG_WITH(nas, AS_HELP_STRING(--with-nas, Compile with Network Audio System 
(NAS) support),
-                if test $withval = "no"; then
-                   echo "Forced compilation without NAS support.";
-                   nas_aud="false";
-                else
-                   if test $nas_aud = "false"; then
-                      echo "NAS support is not available. Sorry."; exit 1;
-                   fi
-                 fi
-                echo "")
-
-AM_CONDITIONAL(nas_support, test $nas_aud = "true")
-if test $nas_aud = "true"; then
-        STATIC_AUDIO_PLUGINS_LIST="$STATIC_AUDIO_PLUGINS_LIST nas";
-        SPD_AUDIO_LIBS="$SPD_AUDIO_LIBS -laudio -L/usr/X11R6/lib"
-fi
-
-AC_CHECK_HEADER(sys/soundcard.h, oss_aud="true";echo "Compiling with OSS 
support", oss_aud="false";echo "*** OSS missing. Compiling without OSS support! 
See INSTALL.")
-AC_ARG_WITH(oss, AS_HELP_STRING(--with-oss, Compile with OSS support),
-                if test $withval = "no"; then
-                    echo "Forced compilation without OSS support."
-                    oss_aud="false"
-                else
-                    if test $oss_aud = "false"; then
-                        echo "OSS support is not available. Sorry."
-                        exit 1
-                    fi
-                fi
-                echo "")
-AM_CONDITIONAL(oss_support, test $oss_aud = "true")
-if test $oss_aud = "true"; then
-        STATIC_AUDIO_PLUGINS_LIST="$STATIC_AUDIO_PLUGINS_LIST oss";
-fi
-
-AC_CHECK_LIB(ao,
-        ao_play,
-       libao_aud="true";echo "Compiling with libao support.";,
-        libao_aud="false";echo "*** libao library missing. Compiling without 
libao support! See INSTALL.";)
-
-AC_ARG_WITH(libao, AS_HELP_STRING(--with-libao, Compile with libao support),
-                if test $withval = "no"; then
-                   echo "Forced compilation without libao support.";
-                   libao_aud="false";
-                else
-                   if test $libao_aud = "false"; then
-                      echo "libao support is not available. Sorry."; exit 1;
-                   fi
-                 fi
-                echo "")
-
-AM_CONDITIONAL(libao_support, test $libao_aud = "true")
-if test $libao_aud = "true"; then
-        STATIC_AUDIO_PLUGINS_LIST="$STATIC_AUDIO_PLUGINS_LIST libao";
-        SPD_AUDIO_LIBS="$SPD_AUDIO_LIBS -lao"
-fi
-
-
-AC_CHECK_LIB(asound,
-        snd_pcm_open,
-       alsa_aud="true";echo "Compiling with ALSA support.";,
-        alsa_aud="false";echo "*** ALSA C API library missing. Compiling 
without ALSA support! See INSTALL.";)
-
-AC_ARG_WITH(alsa, AS_HELP_STRING(--with-alsa, Compile with ALSA support),
-                if test $withval = "no"; then
-                   echo "Forced compilation without ALSA support.";
-                   alsa_aud="false";
-                else
-                   if test $alsa_aud = "false"; then
-                      echo "ALSA support is not available. Sorry."; exit 1;
-                   fi
-                 fi
-                echo "")
-
-AM_CONDITIONAL(alsa_support, test $alsa_aud = "true")
-if test $alsa_aud = "true"; then
-        STATIC_AUDIO_PLUGINS_LIST="$STATIC_AUDIO_PLUGINS_LIST alsa";
-        SPD_AUDIO_LIBS="$SPD_AUDIO_LIBS -lasound"
-fi
-
-AC_CHECK_LIB(pulse,
-        pa_threaded_mainloop_new,
-       pulse_aud="true";echo "Compiling with PulseAudio support.";,
-        pulse_aud="false";echo "*** PulseAudio library missing. Compiling 
without PulseAudio support! See INSTALL.";,
-       -lpulse)
-
-
-
-AC_ARG_WITH(pulse, AS_HELP_STRING(--with-pulse, Compile with PulseAudio 
support),
-                if test $withval = "no"; then
-                   echo "Forced compilation without PulseAudio support.";
-                   pulse_aud="false";
-                else
-                   if test $pulse_aud = "false"; then
-                      echo "PulseAudio support is not available. Sorry."; exit 
1;
-                   fi
-                 fi
-                echo "")
-
-AM_CONDITIONAL(pulse_support, test $pulse_aud = "true")
-if test $pulse_aud = "true"; then
-        STATIC_AUDIO_PLUGINS_LIST="$STATIC_AUDIO_PLUGINS_LIST pulse";
-        SPD_AUDIO_LIBS="$SPD_AUDIO_LIBS -lpulse-simple"
-fi
-
-for name in $STATIC_AUDIO_PLUGINS_LIST; do
-        
STATIC_AUDIO_PLUGINS_GET="$STATIC_AUDIO_PLUGINS_GET${name}_plugin_get,";
-        STATIC_AUDIO_PLUGINS_EXTERN="${STATIC_AUDIO_PLUGINS_EXTERN} extern 
spd_audio_plugin_t const * ${name}_plugin_get (void); "
-done
-
-dnl used in src/audio/static_plugins.c.in
-AC_SUBST(STATIC_AUDIO_PLUGINS_EXTERN)
-AC_SUBST(STATIC_AUDIO_PLUGINS_GET)
-AC_SUBST(SPD_AUDIO_LIBS)
-
-AC_PATH_PROG([PYTHON],[python])
-
-AC_SUBST(datadir)
-
-spdconfdir='${sysconfdir}/speech-dispatcher'
-AC_SUBST(spdconfdir)
-moduleconfdir='${spdconfdir}/modules'
-AC_SUBST(moduleconfdir)
-clientconfdir='${spdconfdir}/clients'
-AC_SUBST(clientconfdir)
-
-spdconforigdir='${datadir}/speech-dispatcher/conf'
-AC_SUBST(spdconforigdir)
-moduleconforigdir='${spdconforigdir}/modules'
-AC_SUBST(moduleconforigdir)
-clientconforigdir='${spdconforigdir}/clients'
-AC_SUBST(clientconforigdir)
-spddesktopconforigdir='${spdconforigdir}/desktop'
-AC_SUBST(spddesktopconforigdir)
-
-snddatadir='${datadir}/sounds/speech-dispatcher'
-AC_SUBST(snddatadir)
-modulebindir='${libdir}/speech-dispatcher-modules'
-AC_SUBST(modulebindir)
-spdlibdir='${libdir}/speech-dispatcher'
-AC_SUBST(spdlibdir)
-spdlib2dir='${libdir}/speech-dispatcher'
-AC_SUBST(spdlib2dir)
-
-LIB_SDAUDIO_CURRENT=2 # Current main version (increment on every API change -- 
incompatible AND extensions)
-LIB_SDAUDIO_REVISION=4 # Current minor version (increment on every 
implementation change)
-LIB_SDAUDIO_AGE=0 # Number of backward compatible main versions 
(LIB_SDAUDIO_CURRENT incrementations since last incompatible)
-AC_SUBST(LIB_SDAUDIO_CURRENT)
-AC_SUBST(LIB_SDAUDIO_REVISION)
-AC_SUBST(LIB_SDAUDIO_AGE)
-
-LIB_SPD_CURRENT=5 # Current main version (increment on every API change -- 
incompatible AND extensions)
-LIB_SPD_REVISION=0 # Current minor version (increment on every implementation 
change)
-LIB_SPD_AGE=3 # Number of backward compatible main versions (LIB_SPD_CURRENT 
incrementations since last incompatible)
-AC_SUBST(LIB_SPD_CURRENT)
-AC_SUBST(LIB_SPD_REVISION)
-AC_SUBST(LIB_SPD_AGE)
-
-# Extra libraries for sockets added by Willie Walker
-# based upon how SunStudio libraries work.  Also
-# conditionally set other compiler/linker flags.
-#
-if test "$GCC" = yes; then
-    EXTRA_SOCKET_LIBS=""
-    ERROR_CFLAGS="-Wall"
-    RPATH="-rpath"
-    RDYNAMIC="-rdynamic"
-else
-    EXTRA_SOCKET_LIBS="-lsocket -lnsl"
-    ERROR_CFLAGS="-errwarn=%all -errtags=yes -erroff=E_STATEMENT_NOT_REACHED"
-    RPATH="-R"
-    RDYNAMIC=""
-fi
-AC_SUBST(EXTRA_SOCKET_LIBS)
-AC_SUBST(ERROR_CFLAGS)
-AC_SUBST(RPATH)
-AC_SUBST(RDYNAMIC)
-
-# Path of installed localization files:
-localedir=${datadir}/locale
-AC_SUBST(localedir)
-
-AC_CONFIG_FILES([Makefile
-       speech-dispatcher.pc
-       config/Makefile
-       config/clients/Makefile
-       config/modules/Makefile
-       doc/Makefile
-       include/Makefile
-       po/Makefile.in
-       src/Makefile
-       src/api/Makefile
-       src/api/c/Makefile
-       src/api/python/Makefile
-       src/api/python/speechd/Makefile
-       src/api/python/speechd_config/Makefile
-       src/clients/Makefile
-       src/clients/say/Makefile
-       src/clients/spdsend/Makefile
-       src/common/Makefile
-       src/modules/Makefile
-       src/modules/audio/Makefile
-       src/modules/audio/static_plugins.c
-       src/server/Makefile
-       src/tests/Makefile])
-AC_OUTPUT
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.65])
+AC_INIT([speech-dispatcher], [0.8-dev], [speechd at lists.freebsoft.org])
+AM_INIT_AUTOMAKE([foreign])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
+LT_PREREQ([2.2])
+LT_INIT([dlopen])
+AC_CONFIG_SRCDIR([src/server/speechd.c])
+AC_CONFIG_HEADERS([config.h])
+IT_PROG_INTLTOOL([0.40.0])
+AM_GLIB_GNU_GETTEXT
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+
+# Checks for libraries.
+AC_SEARCH_LIBS([sqrt], [m], [],
+       [AC_MSG_FAILURE([Math library missing])])
+AC_SEARCH_LIBS([pthread_create], [pthread], [],
+       [AC_MSG_FAILURE([Threads library missing])])
+AC_SEARCH_LIBS([lt_dlopen], [ltdl], [],
+       [AC_MSG_FAILURE([ltdl library missing])])
+
+PKG_CHECK_MODULES([GLIB], [glib-2.0])
+AC_SUBST([GLIB_CFLAGS])
+AC_SUBST([GLIB_LIBS])
+
+PKG_CHECK_MODULES([GTHREAD], [gthread-2.0])
+AC_SUBST([GTHREAD_CFLAGS])
+AC_SUBST([GTHREAD_LIBS])
+
+PKG_CHECK_MODULES([GMODULE], [gmodule-2.0])
+AC_SUBST([GMODULE_CFLAGS])
+AC_SUBST([GMODULE_LIBS])
+
+PKG_CHECK_MODULES([DOTCONF], [dotconf])
+AC_SUBST([DOTCONF_CFLAGS])
+AC_SUBST([DOTCONF_LIBS])
+
+PKG_CHECK_MODULES([SNDFILE], [sndfile >= 1.0.2],
+       [ac_cv_sndfile=1], [ac_cv_sndfile=0])
+AC_SUBST([SNDFILE_CFLAGS])
+AC_SUBST([SNDFILE_LIBS])
+AC_DEFINE_UNQUOTED([HAVE_SNDFILE], [${ac_cv_sndfile}],
+       [Set to 1 if you have libsndfile.])
+
+# Checks for header files.
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h limits.h netdb.h])
+AC_CHECK_HEADERS([ netinet/in.h stddef.h stdlib.h string.h sys/ioctl.h])
+AC_CHECK_HEADERS([sys/socket.h sys/time.h unistd.h wchar.h wctype.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_INLINE
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UINT32_T
+
+# Checks for library functions.
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([dup2 gethostbyname gettimeofday memmove memset mkdir])
+AC_CHECK_FUNCS([select socket strcasecmp strchr strcspn strdup])
+AC_CHECK_FUNCS([strerror strncasecmp strndup strstr strtol])
+
+# Extra libraries for sockets and espeak added by Willie Walker
+# based upon how SunStudio libraries work.  Also
+# conditionally set other compiler/linker flags.
+#
+if test "$GCC" = yes; then
+       EXTRA_SOCKET_LIBS=""
+       ERROR_CFLAGS="-Wall"
+       RPATH="-rpath"
+       RDYNAMIC="-rdynamic"
+else
+       EXTRA_ESPEAK_LIBS="-lCstd -lCrun"
+       EXTRA_SOCKET_LIBS="-lsocket -lnsl"
+       ERROR_CFLAGS="-errwarn=%all -errtags=yes 
-erroff=E_STATEMENT_NOT_REACHED"
+       RPATH="-R"
+       RDYNAMIC=""
+fi
+AC_SUBST([EXTRA_ESPEAK_LIBS])
+AC_SUBST([EXTRA_SOCKET_LIBS])
+AC_SUBST([ERROR_CFLAGS])
+AC_SUBST([RPATH])
+AC_SUBST([RDYNAMIC])
+
+# Check for python support.
+# Python 2.4 or greater should be acceptable.
+AC_ARG_ENABLE([python],
+       [AS_HELP_STRING([--disable-python], [do not install python bindings])],
+       [],
+       [enable_python=check])
+AS_IF([test $enable_python != "no"],
+       [AM_PATH_PYTHON([2.4],
+               [enable_python=yes],
+               [AS_IF([test $enable_python = "yes"],
+                       [AC_MSG_FAILURE([python is not available])])])])
+AM_CONDITIONAL([HAVE_PYTHON], [test $enable_python = "yes"])
+
+# checks for output modules
+# check for espeak support
+AC_ARG_WITH([espeak],
+       [AS_HELP_STRING([--with-espeak], [Compile with espeak support])],
+       [],
+       [with_espeak=check])
+AS_IF([test $with_espeak != "no"],
+       [AC_CHECK_LIB([espeak], [espeak_Synth],
+               [with_espeak="yes"],
+               [AS_IF([test $with_espeak = "yes"],
+                       [AC_MSG_FAILURE([espeak is not available])])],
+               [$EXTRA_ESPEAK_LIBS])])
+AM_CONDITIONAL([espeak_support], [test $with_espeak = "yes"])
+
+# check for flite support
+AC_ARG_WITH([flite],
+       [AS_HELP_STRING([--with-flite], [include Festival Lite (Flite) 
support])],
+       [],
+       [with_flite=check])
+AS_IF([test $with_flite != "no"],
+       [AC_CHECK_LIB([flite], [flite_init],
+               [flite_basic="-lflite"],
+               [AS_IF([test $with_flite = "yes"],
+                       [AC_MSG_FAILURE([libflite is not available])])],
+               [-lm])
+       AC_CHECK_LIB([flite_usenglish], [usenglish_init],
+               [flite_basic="-lflite_usenglish ${flite_basic}"],
+               [AS_IF([test $with_flite = "yes"],
+                       [AC_MSG_FAILURE([libflite_usenglish is not 
available])])],
+               [-lflite -lm])
+       AC_CHECK_LIB([flite_cmulex], [cmu_lex_init],
+               [flite_basic="-lflite_cmulex ${flite_basic}"],
+               [AS_IF([test $with_flite = "yes"],
+                       [AC_MSG_FAILURE([libflite_cmulex is not available])])],
+               [-lflite -lm])
+       AC_CHECK_LIB([flite_cmu_us_kal16], [register_cmu_us_kal16],
+               [with_flite=yes;
+               flite_kal="-lflite_cmu_us_kal16";
+               AC_DEFINE([HAVE_REGISTER_CMU_US_KAL16], [1],
+                       [Use cmu_register_us_kal16 to register the 16-bit 
voice.])],
+               [AC_CHECK_LIB([flite_cmu_us_kal16], [register_cmu_us_kal],
+                       [with_flite=yes;
+                       flite_kal="-lflite_cmu_us_kal16"],
+                       [AC_CHECK_LIB([flite_cmu_us_kal], [register_cmu_us_kal],
+                               [with_flite=yes;
+                               flite_kal="-lflite_cmu_us_kal"],
+                               [AS_IF([test $with_flite = "yes"],
+                                       [AC_MSG_FAILURE([no flite voices 
found])])],
+                               [-lflite_cmulex -lflite_usenglish -lflite 
-lm])],
+                       [-lflite_cmulex -lflite_usenglish -lflite -lm])])])
+AM_CONDITIONAL([flite_support], [test $with_flite = "yes"])
+AC_SUBST([flite_basic])
+AC_SUBST([flite_kal])
+
+# check for IBMTTS support
+AC_ARG_WITH([ibmtts],
+       [AS_HELP_STRING([--with-ibmtts], [include IBM TTS support])],
+       [],
+       [with_ibmtts=check])
+AS_IF([test $with_ibmtts != "no"],
+       [AC_CHECK_LIB([ibmeci], [eciStop],
+               [with_ibmtts=yes;
+               ibmtts_include="-I/opt/IBM/ibmtts/inc/"],
+               [AS_IF([test $with_ibmtts = "yes"],
+                       [AC_MSG_FAILURE([IBMTTS is not available])])])])
+AM_CONDITIONAL([ibmtts_support], [test $with_ibmtts = "yes"])
+AC_SUBST([ibmtts_include])
+
+# check for ivona support
+AC_ARG_WITH([ivona],
+       [AS_HELP_STRING([--with-ivona], [include ivona support])],
+       [],
+       [with_ivona=check])
+AS_IF([test $with_ivona != "no"],
+       [AC_CHECK_LIB([dumbtts], [dumbtts_TTSInit],
+               [with_ivona=yes],
+               [AS_IF([test $with_ivona = "yes"],
+                       [AC_MSG_FAILURE([ivona is not available])])])])
+AM_CONDITIONAL([ivona_support], [test $with_ivona = "yes"])
+
+# check for svox pico support
+AC_ARG_WITH([pico],
+       [AS_HELP_STRING([--with-pico], [include SVOX pico support])],
+       [],
+       [with_pico=check])
+AS_IF([test $with_pico != "no"],
+       [AC_CHECK_LIB([ttspico], [pico_initialize],
+               [with_pico=yes],
+               [AS_IF([test $with_pico = "yes"],
+                       [AC_MSG_FAILURE([SVOX pico is not available])])])])
+AM_CONDITIONAL([pico_support], [test $with_pico = "yes"])
+
+# checks for audio subsystems
+# clear static audio plugins and audio libraries lists
+STATIC_AUDIO_PLUGINS_LIST=""
+SPD_AUDIO_LIBS=
+
+# check for alsa support
+AC_ARG_WITH([alsa],
+       [AS_HELP_STRING([--with-alsa], [include ALSA support])],
+       [],
+       [with_alsa=check])
+AS_IF([test $with_alsa != "no"],
+       [PKG_CHECK_MODULES([ALSA], [alsa],
+               [with_alsa=yes;
+               STATIC_AUDIO_PLUGINS_LIST="$STATIC_AUDIO_PLUGINS_LIST alsa";
+               SPD_AUDIO_LIBS="$SPD_AUDIO_LIBS -lasound"],
+               [AS_IF([test $with_alsa = "yes"],
+                       [AC_MSG_FAILURE([ALSA is not available])])])])
+AM_CONDITIONAL([alsa_support], [test $with_alsa = "yes"])
+
+# check for libao support
+AC_ARG_WITH([libao],
+       [AS_HELP_STRING([--with-libao], [include libao support])],
+       [],
+       [with_libao=check])
+AS_IF([test $with_libao != "no"],
+       [PKG_CHECK_MODULES([LIBAO], [ao],
+               [with_libao=yes;
+               STATIC_AUDIO_PLUGINS_LIST="$STATIC_AUDIO_PLUGINS_LIST libao";
+               SPD_AUDIO_LIBS="$SPD_AUDIO_LIBS -lao"],
+               [AS_IF([test $with_libao = yes],
+                       [AC_MSG_FAILURE([libao is not available])])])])
+AM_CONDITIONAL([libao_support], [test $with_libao = "yes"])
+
+# check for NAS support
+AC_ARG_WITH([nas],
+       [AS_HELP_STRING([--with-nas], [include network audio system (nas) 
support])],
+       [],
+       [with_nas=check])
+AS_IF([test $with_nas != "no"],
+       [AC_CHECK_LIB([audio], [AuOpenServer],
+               [with_nas=yes;
+               STATIC_AUDIO_PLUGINS_LIST="$STATIC_AUDIO_PLUGINS_LIST nas";
+               SPD_AUDIO_LIBS="$SPD_AUDIO_LIBS -L/usr/X11R6/lib -lXau 
-laudio"],
+               [AS_IF([test $with_nas = "yes"],
+                       [AC_MSG_FAILURE([nas is not available])])],
+       [-L/usr/X11R6/lib -lXau])])
+AM_CONDITIONAL([nas_support], [test $with_nas = "yes"])
+
+#check for OSS support
+AC_ARG_WITH([oss],
+       [AS_HELP_STRING([--with-oss], [include oss support])],
+       [],
+       [with_oss=check])
+AS_IF([test $with_oss != "no"],
+       [AC_CHECK_HEADER([sys/soundcard.h],
+               [with_oss=yes;
+               STATIC_AUDIO_PLUGINS_LIST="$STATIC_AUDIO_PLUGINS_LIST oss"],
+               [AS_IF([test $with_oss = "yes"],
+                       [AC_MSG_FAILURE([oss is not available])])])])
+AM_CONDITIONAL([oss_support], [test $with_oss = "yes"])
+
+# check for pulseaudio support
+AC_ARG_WITH([pulse],
+       [AS_HELP_STRING([--with-pulse], [include pulseaudio support])],
+       [],
+       [with_pulse=check])
+AS_IF([test $with_pulse != "no"],
+       [PKG_CHECK_MODULES([PULSE], [libpulse-simple],
+               [with_pulse=yes;
+               STATIC_AUDIO_PLUGINS_LIST="$STATIC_AUDIO_PLUGINS_LIST pulse";
+        SPD_AUDIO_LIBS="$SPD_AUDIO_LIBS -lpulse-simple"],
+               [AS_IF([test $with_pulse = "yes"],
+                       [AC_MSG_FAILURE([pulseaudio is not available])])])])
+AM_CONDITIONAL([pulse_support], [test $with_pulse = "yes"])
+AC_SUBST([PULSE_CFLAGS])
+AC_SUBST([PULSE_LIBS])
+
+for name in $STATIC_AUDIO_PLUGINS_LIST; do
+       STATIC_AUDIO_PLUGINS_GET="$STATIC_AUDIO_PLUGINS_GET${name}_plugin_get,";
+       STATIC_AUDIO_PLUGINS_EXTERN="${STATIC_AUDIO_PLUGINS_EXTERN} extern 
spd_audio_plugin_t const * ${name}_plugin_get (void); "
+done
+
+# used in src/audio/static_plugins.c.in
+AC_SUBST([STATIC_AUDIO_PLUGINS_EXTERN])
+AC_SUBST([STATIC_AUDIO_PLUGINS_GET])
+
+AC_SUBST([SPD_AUDIO_LIBS])
+
+# current, age and revision values for shared libraries.
+LIB_SDAUDIO_CURRENT=2 # Current main version (increment on every API change -- 
incompatible AND extensions)
+LIB_SDAUDIO_REVISION=4 # Current minor version (increment on every 
implementation change)
+LIB_SDAUDIO_AGE=0 # Number of backward compatible main versions 
(LIB_SDAUDIO_CURRENT incrementations since last incompatible)
+AC_SUBST([LIB_SDAUDIO_CURRENT])
+AC_SUBST([LIB_SDAUDIO_REVISION])
+AC_SUBST([LIB_SDAUDIO_AGE])
+
+LIB_SPD_CURRENT=5 # Current main version (increment on every API change -- 
incompatible AND extensions)
+LIB_SPD_REVISION=0 # Current minor version (increment on every implementation 
change)
+LIB_SPD_AGE=3 # Number of backward compatible main versions (LIB_SPD_CURRENT 
incrementations since last incompatible)
+AC_SUBST([LIB_SPD_CURRENT])
+AC_SUBST([LIB_SPD_REVISION])
+AC_SUBST([LIB_SPD_AGE])
+
+# Setup GETTEXT
+GETTEXT_PACKAGE=speech-dispatcher
+AC_SUBST([GETTEXT_PACKAGE])
+
+# Paths for configuration files:
+spdconfdir='${sysconfdir}/speech-dispatcher'
+AC_SUBST([spdconfdir])
+clientconfdir='${spdconfdir}/clients'
+AC_SUBST([clientconfdir])
+moduleconfdir='${spdconfdir}/modules'
+AC_SUBST([moduleconfdir])
+
+# Paths for read-only copy of configuration files:
+spdconforigdir='${datadir}/speech-dispatcher/conf'
+AC_SUBST([spdconforigdir])
+clientconforigdir='${spdconforigdir}/clients'
+AC_SUBST([clientconforigdir])
+spddesktopconforigdir='${spdconforigdir}/desktop'
+AC_SUBST([spddesktopconforigdir])
+moduleconforigdir='${spdconforigdir}/modules'
+AC_SUBST([moduleconforigdir])
+
+# Path for sound files:
+snddatadir='${datadir}/sounds/speech-dispatcher'
+AC_SUBST([snddatadir])
+
+# Path for module binaries:
+modulebindir='${libdir}/speech-dispatcher-modules'
+AC_SUBST([modulebindir])
+
+# Path for speech-dispatcher libraries:
+spdlibdir='${libdir}/speech-dispatcher'
+AC_SUBST([spdlibdir])
+
+AC_CONFIG_FILES([Makefile
+                 speech-dispatcher.pc
+                 config/Makefile
+                 config/clients/Makefile
+                 config/modules/Makefile
+                 doc/Makefile
+                 include/Makefile
+                 po/Makefile.in
+                 src/Makefile
+                 src/api/Makefile
+                 src/api/c/Makefile
+                 src/api/python/Makefile
+                 src/api/python/speechd/Makefile
+                 src/api/python/speechd_config/Makefile
+                 src/clients/Makefile
+                 src/clients/say/Makefile
+                 src/clients/spdsend/Makefile
+                 src/common/Makefile
+                 src/modules/Makefile
+                 src/modules/audio/Makefile
+                 src/modules/audio/static_plugins.c
+                 src/server/Makefile
+                 src/tests/Makefile])
+AC_OUTPUT
-- 
1.7.2.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]