diff --git a/configure.ac b/configure.ac index 76aa6dde..b226921e 100644 --- a/configure.ac +++ b/configure.ac @@ -133,7 +133,24 @@ AS_CASE(["$host_os"], ) ) -AC_CHECK_HEADERS(execinfo.h pty.h util.h zlib.h bzlib.h libutil.h sys/ttydefaults.h x86intrin.h) +AC_CHECK_HEADERS(execinfo.h pty.h util.h zlib.h bzlib.h libutil.h sys/ttydefaults.h) + +dnl Experimental SIMD features. +AC_ARG_ENABLE([simd], + AS_HELP_STRING([--enable-simd], [Try and enable simd optimizations]), + [ + AS_CASE(["$enable_simd"], + [no], [enable_simd="no"], + [yes | ""],[enable_simd="yes"]) + ], + [] +) + +AS_IF([test "x$enable_simd" = "xyes"], [ + AC_CHECK_HEADERS(x86intrin.h) +]) + + LNAV_WITH_JEMALLOC diff --git a/release/vagrant-static/build.sh b/release/vagrant-static/build.sh index 4f6ddbd9..1674a753 100755 --- a/release/vagrant-static/build.sh +++ b/release/vagrant-static/build.sh @@ -46,7 +46,7 @@ if test x"${OS}" != x"FreeBSD"; then TARGET_FILE='/vagrant/lnav-musl.zip' ../lnav/configure \ CFLAGS='-static -no-pie -s' \ - CXXFLAGS='-static -msse4 -U__unused -no-pie -s' \ + CXXFLAGS='-static -U__unused -no-pie -s' \ LDFLAGS="-L${FAKE_ROOT}/lib" \ CPPFLAGS="-I${FAKE_ROOT}/include" \ --enable-static diff --git a/src/line_buffer.cc b/src/line_buffer.cc index e227a624..6a0241cf 100644 --- a/src/line_buffer.cc +++ b/src/line_buffer.cc @@ -655,7 +655,6 @@ Result line_buffer::load_next_line(file_range prev_line) /* ... look for the end-of-line or end-of-file. */ ssize_t utf8_end = -1; -#undef HAVE_X86INTRIN_H #ifdef HAVE_X86INTRIN_H if (!validate_utf8_fast(line_start, retval.li_file_range.fr_size, &utf8_end)) { retval.li_valid_utf = false;