configure.ac, Makefile.am : Updated configure.ac to check for library dependencies. Added check for C++17 and C++11.
This commit is contained in:
parent
5e2bc238fa
commit
1a445015f8
@ -19,7 +19,7 @@ WS_DIR = $(HOME)/sdk/libwebsockets/build/out
|
|||||||
|
|
||||||
AM_CPPFLAGS = -D _GNU_SOURCE -I.. -I$(srcdir)/src/libcw
|
AM_CPPFLAGS = -D _GNU_SOURCE -I.. -I$(srcdir)/src/libcw
|
||||||
AM_CFLAGS = -Wno-multichar
|
AM_CFLAGS = -Wno-multichar
|
||||||
AM_CXXFLAGS = --std=c++17 -Wno-multichar
|
AM_CXXFLAGS = -Wno-multichar
|
||||||
AM_LDFLAGS =
|
AM_LDFLAGS =
|
||||||
|
|
||||||
# debug/release switches
|
# debug/release switches
|
||||||
|
39
configure.ac
39
configure.ac
@ -93,13 +93,13 @@ AC_ARG_ENABLE([websock],
|
|||||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-websock]) ;;
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-websock]) ;;
|
||||||
esac],[websock=false])
|
esac],[websock=false])
|
||||||
|
|
||||||
|
if test x"$websock" = xtrue; then
|
||||||
|
AC_CHECK_LIB([websockets],[lws_get_library_version],[AC_MSG_RESULT([The 'websockets' library was found.])],[AC_MSG_ERROR([The 'websockets' library was not found.])])
|
||||||
|
AC_DEFINE([cwWEBSOCK], 1,[Use libwebsock.])
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([cwWEBSOCK], [test x$websock = xtrue])
|
||||||
echo "websock=${websock}"
|
echo "websock=${websock}"
|
||||||
|
|
||||||
AM_CONDITIONAL([cwWEBSOCK], [test x$websock = xtrue])
|
|
||||||
|
|
||||||
if test x"$websock" = xtrue; then
|
|
||||||
AC_DEFINE([cwWEBSOCK], 1,[Use libwebsock.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Enable ALSA
|
# Enable ALSA
|
||||||
@ -112,13 +112,36 @@ AC_ARG_ENABLE([alsa],
|
|||||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-alsa]) ;;
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-alsa]) ;;
|
||||||
esac],[alsa=false])
|
esac],[alsa=false])
|
||||||
|
|
||||||
echo "alsa=${alsa}"
|
|
||||||
|
if test x"$alsa" = xtrue; then
|
||||||
|
AC_CHECK_LIB([asound],[snd_asoundlib_version],[AC_MSG_RESULT([The 'ALSA' library was found.])],[AC_MSG_ERROR([The 'ALSA' library was not found.])])
|
||||||
|
AC_DEFINE([cwALSA], 1,[Use libalsa.])
|
||||||
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL([cwALSA], [test x$alsa = xtrue])
|
AM_CONDITIONAL([cwALSA], [test x$alsa = xtrue])
|
||||||
|
|
||||||
if test x"$alsa" = xtrue; then
|
echo "alsa=${alsa}"
|
||||||
AC_DEFINE([cwALSA], 1,[Use libalsa.])
|
|
||||||
|
|
||||||
|
|
||||||
|
# check for C++17
|
||||||
|
hasCpp17=true
|
||||||
|
AX_CHECK_COMPILE_FLAG(-std=c++17, [CXXFLAGS="$CXXFLAGS -std=c++17"],[hasCpp17=false])
|
||||||
|
if test x"$hasCpp17" = xtrue; then
|
||||||
|
AC_DEFINE([cwCPP17], 1,[C++ 17 is available.])
|
||||||
|
else
|
||||||
|
|
||||||
|
# C++17 is not available check for C++11
|
||||||
|
hasCpp11=true
|
||||||
|
AX_CHECK_COMPILE_FLAG([-std=c++11], [CXXFLAGS="$CXXFLAGS -std=c++11"], [hasCpp11=false])
|
||||||
|
if test x"$hasCpp11" = xtrue; then
|
||||||
|
AC_DEFINE([cwCPP11], 1,[C++ 11 is available.])
|
||||||
fi
|
fi
|
||||||
|
echo "c++11=${hasCpp11}"
|
||||||
|
|
||||||
|
fi
|
||||||
|
echo "c++17=${hasCpp17}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user