Ver código fonte

build: add more tests to the common m4 file

legacy
Sam Hocevar 8 anos atrás
pai
commit
39c00a8f5c
2 arquivos alterados com 19 adições e 16 exclusões
  1. +19
    -0
      build/autotools/m4/lol-conf.m4
  2. +0
    -16
      configure.ac

+ 19
- 0
build/autotools/m4/lol-conf.m4 Ver arquivo

@@ -24,6 +24,14 @@ LOL_TRY_CXXFLAGS(-std=c++17, [version_flag='-std=c++17'])
AM_CXXFLAGS="${AM_CXXFLAGS} ${version_flag}"
CXXFLAGS="${CXXFLAGS} ${version_flag}"

AC_LANG_PUSH(C++)
AC_MSG_CHECKING(for C++11 enum class support)
AC_TRY_LINK([], [enum class Foo : int { Bar, Baz };],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([[C++ compiler does not support C++11 enum classes]])])
AC_LANG_POP(C++)

]) # LOL_AC_INIT


@@ -72,6 +80,17 @@ AC_TRY_LINK([], [],
AC_LANG_POP(C++)


AC_C_CONST
AC_C_INLINE

dnl
dnl Common libraries
dnl

AC_CHECK_LIB(m, sin, LIBS="${LIBS} -lm")
AC_CHECK_LIB(pthread, main, LIBS="${LIBS} -lpthread")


dnl
dnl Activate some header-only libraries
dnl


+ 0
- 16
configure.ac Ver arquivo

@@ -37,21 +37,10 @@ AC_PROG_RANLIB

LOL_AC_INIT()

AC_LANG_PUSH(C++)
AC_MSG_CHECKING(for C++11 enum class support)
AC_TRY_LINK([], [enum class Foo : int { Bar, Baz };],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([[C++ compiler does not support C++11 enum classes]])])
AC_LANG_POP(C++)

AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_LIBTOOL_CXX

AC_C_CONST
AC_C_INLINE

dnl Ensure an error is thrown if pkg-config M4 files are not found.
m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
m4_pattern_forbid([^PKG_CHECK_MODULES$])
@@ -196,10 +185,6 @@ AM_CONDITIONAL(LOL_USE_DOT, test "${DOT}" != "no")
AC_SUBST(LOL_USE_DOT)


AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")


dnl Unix-specific libutil
AC_CHECK_LIB(util, forkpty,
[UTIL_LIBS="${UTIL_LIBS} -lutil"
@@ -253,7 +238,6 @@ dnl Should we ship non-free data?
AM_CONDITIONAL(HAVE_NONFREE, true)

dnl Extra libraries we may need
AC_SUBST(MATH_LIBS)
AC_SUBST(PAM_LIBS)
AC_SUBST(UTIL_LIBS)



Carregando…
Cancelar
Salvar