diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2018-06-11 05:10:19 +0600 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2018-06-11 05:10:19 +0600 |
commit | 524bc3960e6a6e5645ce904e20f72479e24e0a23 (patch) | |
tree | 4147b687b1de89d41a2bd2a5fd02620a64e75a77 /configure.ac | |
parent | df6c898e8e56886488951bc51967089003768b12 (diff) | |
download | sciteco-524bc3960e6a6e5645ce904e20f72479e24e0a23.tar.gz |
improved Emscripten support: fixed configure-checks, generate *.js and detect EMCurses
* Emscripten can be used (theoretically) to build a host-only platform-independant version
of SciTECO (running under node.js instead of the browser).
* I ported netbsd-curses with Emscripten for that purpose. Therefore, adaptions for running
in the browser are restricted to EMcurses now.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 032ab10..dd4854d 100644 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,6 @@ AX_CXX_COMPILE_STDCXX(11, noext, mandatory) AC_PROG_CC AC_PROG_CC_C99 AC_PROG_SED -AC_PROG_GREP AC_PROG_INSTALL # Mainly because of Scintilla, which depends on @@ -88,10 +87,18 @@ case $host in ;; esac -# Detect Clang. Emscripten is based on Clang as well. -if $CXX --version | $GREP -E "clang|Emscripten" >/dev/null; then +# Detect Clang (including Emscripten). +# A particular warning does not cooperate well with our use +# of the BSD data structures. +AC_CHECK_DECL(__clang__, [ CXXFLAGS="$CXXFLAGS -Wno-mismatched-tags" -fi +]) + +# Changing the EXEEXT on emscripten ensures that we don't +# need a special Makefile rule to generate Javascript files. +AC_CHECK_DECL(EMSCRIPTEN, [ + EXEEXT=.js +]) AC_CHECK_PROG(DATE, date, date) if [[ x$DATE = x ]]; then @@ -179,7 +186,10 @@ esac # Some of this will only be found on glibc, # others on FreeBSD/jemalloc. AC_CHECK_HEADERS([malloc.h malloc_np.h]) -AC_CHECK_FUNCS([malloc_trim malloc_usable_size]) +AC_CHECK_FUNCS([malloc_trim malloc_usable_size], [ + # Sometimes the declaration is missing. + AC_CHECK_DECLS([malloc_trim]) +]) # # Config options |