diff --git a/Makefile.am b/Makefile.am index 480eb50e..3dbf458b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,7 +22,11 @@ pkgconfig_DATA = speech-dispatcher.pc BUILT_SOURCES = $(top_srcdir)/.version +if LIBS_ONLY +SUBDIRS= include src +else SUBDIRS= include locale src config po +endif if ENABLE_DOC SUBDIRS += doc diff --git a/configure.ac b/configure.ac index bd18fdbe..ef4da8e6 100644 --- a/configure.ac +++ b/configure.ac @@ -43,11 +43,16 @@ LT_PREREQ([2.2]) LT_INIT([dlopen]) AC_CONFIG_SRCDIR([src/server/speechd.c]) AC_CONFIG_HEADERS([config.h]) -AM_GNU_GETTEXT_VERSION([0.19.8]) -AM_GNU_GETTEXT([external]) -if test "$ac_cv_path_MSGFMT" = ":" -then - AC_MSG_FAILURE([msgfmt missing from the gettext package]) +AC_ARG_ENABLE([libs-only], [AS_HELP_STRING([--enable-libs-only], [build only the client library])], [], [enable_libs_only=no]) +AM_CONDITIONAL([LIBS_ONLY], [test "$enable_libs_only" = "yes"]) +if test "$enable_libs_only" = "yes"; then + with_espeak=no with_espeak_ng=no with_flite=no with_ibmtts=no + with_voxin=no with_ivona=no with_pico=no with_baratinoo=no + with_kali=no with_piper=no + with_pulse=no with_alsa=no with_oss=no with_nas=no + with_libao=no with_pipewire=no + enable_python=no enable_doc=no + with_systemdsystemunitdir=no with_systemduserunitdir=no fi # Split version number @@ -75,6 +80,7 @@ AC_SEARCH_LIBS([sqrt], [m], [], [AC_MSG_FAILURE([Math library missing])]) AC_SEARCH_LIBS([pthread_create], [pthread], [], [AC_MSG_FAILURE([Threads library missing])]) +if test "$enable_libs_only" != "yes"; then AC_ARG_ENABLE([ltdl], [AS_HELP_STRING([--disable-ltdl], [do not use ltdl for modules])], [], @@ -99,6 +105,7 @@ then AC_SEARCH_LIBS([dlopen], [dl], [], [AC_MSG_FAILURE([dlopen missing])]) fi +fi if test x$enable_shared = xyes; then @@ -119,7 +126,7 @@ AM_CONDITIONAL(DARWIN_HOST, test "$darwin_host" = yes) PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.36]) AC_SUBST([GLIB_CFLAGS]) AC_SUBST([GLIB_LIBS]) - +if test "$enable_libs_only" != "yes"; then PKG_CHECK_MODULES([GTHREAD], [gthread-2.0]) AC_SUBST([GTHREAD_CFLAGS]) AC_SUBST([GTHREAD_LIBS]) @@ -135,6 +142,7 @@ AC_SUBST([DOTCONF_LIBS]) PKG_CHECK_MODULES([SNDFILE], [sndfile >= 1.0.2]) AC_SUBST([SNDFILE_CFLAGS]) AC_SUBST([SNDFILE_LIBS]) +fi PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd], [have_libsystemd=yes], [:]) diff --git a/src/Makefile.am b/src/Makefile.am index 2a9659c0..20f61525 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,7 +17,11 @@ ## Process this file with automake to produce Makefile.in +if LIBS_ONLY +SUBDIRS=api +else SUBDIRS=common server audio modules api clients tests +endif -include $(top_srcdir)/git.mk