Browse Source

espeak-ng requires a C11 compiler, so document and check this

master
Reece H. Dunn 9 years ago
parent
commit
ca5f651d1d
2 changed files with 50 additions and 4 deletions
  1. 3
    2
      README.md
  2. 47
    2
      configure.ac

+ 3
- 2
README.md View File



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;
3. wxWidgets development libraries (needed to build and run espeakedit
2. a functional c compiler that supports C11;
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
configure.ac View File

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 ================================================================


Source code location: ${srcdir} Source code location: ${srcdir}


Compiler: ${CXX}
Compiler flags: ${CXXFLAGS}
C11 Compiler: ${CC}
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}

Loading…
Cancel
Save