mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-25 04:38:37 +00:00
espeak-ng requires a C11 compiler, so document and check this
This commit is contained in:
@@ -30,8 +30,9 @@ In order to build eSpeak NG, you need:
|
|||||||
|
|
||||||
1. a functional autotools system (`make`, `autoconf`, `automake`, `libtool`
|
1. a functional autotools system (`make`, `autoconf`, `automake`, `libtool`
|
||||||
and `pkg-config`);
|
and `pkg-config`);
|
||||||
2. a functional c++ compiler;
|
2. a functional c compiler that supports C11;
|
||||||
3. wxWidgets development libraries (needed to build and run espeakedit
|
3. a functional c++ compiler;
|
||||||
|
4. wxWidgets development libraries (needed to build and run espeakedit
|
||||||
to compile the phoneme data).
|
to compile the phoneme data).
|
||||||
|
|
||||||
Optionally, you need:
|
Optionally, you need:
|
||||||
|
|||||||
+47
-2
@@ -18,6 +18,48 @@ AC_PROG_CXX
|
|||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
|
dnl ================================================================
|
||||||
|
dnl C11 compiler checks.
|
||||||
|
dnl ================================================================
|
||||||
|
|
||||||
|
AC_LANG_PUSH(C)
|
||||||
|
AC_MSG_CHECKING([if $CC supports C11 without any flags])
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[// test]],
|
||||||
|
[[]])],
|
||||||
|
[AC_MSG_RESULT([yes])
|
||||||
|
have_c11_native=yes],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
have_c11_native=no])
|
||||||
|
AC_LANG_POP(C)
|
||||||
|
|
||||||
|
AC_LANG_PUSH(C)
|
||||||
|
TEMP_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -std=c11"
|
||||||
|
AC_MSG_CHECKING([if $CC supports C11 with the -std=c11 flag])
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[// test]],
|
||||||
|
[[]])],
|
||||||
|
[AC_MSG_RESULT([yes])
|
||||||
|
have_c11_c11=yes],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
have_c11_c11=no])
|
||||||
|
CFLAGS="$TEMP_CFLAGS"
|
||||||
|
AC_LANG_POP(C)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if $CC supports C11])
|
||||||
|
if test "$have_c11_c11" = yes ; then
|
||||||
|
AC_MSG_RESULT([-std=c11])
|
||||||
|
CFLAGS="$CFLAGS -std=c11"
|
||||||
|
elif test "$have_c11_native" = yes ; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
AC_MSG_ERROR([C11 is not supported by $CC.])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ================================================================
|
dnl ================================================================
|
||||||
dnl getopt checks.
|
dnl getopt checks.
|
||||||
dnl ================================================================
|
dnl ================================================================
|
||||||
@@ -248,8 +290,11 @@ AC_MSG_NOTICE([
|
|||||||
|
|
||||||
Source code location: ${srcdir}
|
Source code location: ${srcdir}
|
||||||
|
|
||||||
Compiler: ${CXX}
|
C11 Compiler: ${CC}
|
||||||
Compiler flags: ${CXXFLAGS}
|
C11 Compiler flags: ${CFLAGS}
|
||||||
|
|
||||||
|
C++ Compiler: ${CXX}
|
||||||
|
C++ Compiler flags: ${CXXFLAGS}
|
||||||
|
|
||||||
wxWidgets: ${WX_VERSION} (${WX_CONFIG})
|
wxWidgets: ${WX_VERSION} (${WX_CONFIG})
|
||||||
pulseaudio: ${have_pulseaudio}
|
pulseaudio: ${have_pulseaudio}
|
||||||
|
|||||||
Reference in New Issue
Block a user