Makefile.am,configure.ac,main.cpp : Added use of cwWEB in autoconfig.
This commit is contained in:
parent
1a445015f8
commit
22caf3d448
12
Makefile.am
12
Makefile.am
@ -45,6 +45,18 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
if cwWEB
|
||||
FFT_DIR = $(HOME)/src/fftw-3.3.8/build
|
||||
FFT_DIR_D = $(FFT_DIR)/d
|
||||
FFT_DIR_S = $(FFT_DIR)/s
|
||||
|
||||
AM_CXXFLAGS += --std=c++11
|
||||
AM_CPPFLAGS += -I$(FFT_DIR)/include -I$(FFT_DIR_D)/include -I$(FFT_DIR_S)/include
|
||||
AM_LDFLAGS += -L$(FFT_DIR)/lib -L$(FFT_DIR_D)/lib -L$(FFT_DIR_S)/lib
|
||||
else
|
||||
AM_CXXFLAGS += --std=c++17
|
||||
endif
|
||||
|
||||
include src/libcw/Makefile.am
|
||||
|
||||
libcw_la_SOURCES = $(libcwSRC) $(libcwHDR)
|
||||
|
45
configure.ac
45
configure.ac
@ -125,24 +125,43 @@ echo "alsa=${alsa}"
|
||||
|
||||
|
||||
# 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
|
||||
# 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.])
|
||||
# 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
|
||||
# echo "c++11=${hasCpp11}"
|
||||
|
||||
#fi
|
||||
#echo "c++17=${hasCpp17}"
|
||||
|
||||
#
|
||||
# Enable ALSA
|
||||
#
|
||||
|
||||
AC_ARG_ENABLE([web],
|
||||
[ --enable-web Include WEB dependencies],
|
||||
[case "${enableval}" in
|
||||
yes) web=true ;;
|
||||
no) web=false ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-web]) ;;
|
||||
esac],[web=false])
|
||||
|
||||
|
||||
if test x"$web" = xtrue; then
|
||||
AC_DEFINE([cwWEB], 1,[Use libweb.])
|
||||
fi
|
||||
echo "c++11=${hasCpp11}"
|
||||
|
||||
fi
|
||||
echo "c++17=${hasCpp17}"
|
||||
|
||||
AM_CONDITIONAL([cwWEB], [test x$web = xtrue])
|
||||
|
||||
echo "web=${web}"
|
||||
|
||||
|
||||
# AC_ARG_ENABLE([add_lib],
|
||||
|
@ -51,8 +51,11 @@
|
||||
#include "cwIoTest.h"
|
||||
#endif
|
||||
|
||||
#if defined(cwWeb)
|
||||
#include "cwDataSets.h"
|
||||
#include "cwSvg.h"
|
||||
#endif
|
||||
|
||||
#include "cwAudioFile.h"
|
||||
#include "cwAudioFileOps.h"
|
||||
|
||||
@ -542,6 +545,15 @@ cw::rc_t sockMgrTest( const cw::object_t* cfg, const cw::object_t* args, int arg
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if defined(cwWEB)
|
||||
cw::rc_t _no_c11() { return cwLogError(cw::kResourceNotAvailableRC,"C++11 functionality not included in this build."); }
|
||||
|
||||
cw::rc_t mnistTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return _no_c11(); }
|
||||
cw::rc_t datasetTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return _no_c11(); }
|
||||
cw::rc_t svgTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return _no_c11(); }
|
||||
|
||||
#else
|
||||
|
||||
cw::rc_t mnistTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] )
|
||||
{
|
||||
char* inDir = requiredExistingDir( args, "inDir");
|
||||
@ -564,6 +576,7 @@ cw::rc_t svgTest( const cw::object_t* cfg, const cw::object_t* args, int argc,
|
||||
cw::mem::release(cssFn);
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
cw::rc_t dirEntryTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user