From 54b048fa0db15486726566e43751e760448c3032 Mon Sep 17 00:00:00 2001 From: Eric Platon Date: Mon, 23 Apr 2018 16:11:24 +0900 Subject: [PATCH] Fix wrong environment test that breaks clang++ builds. g++ builds require extra flags rejected by clang++. The bug is that the flags are actually added unconditionally. This commit fixes the condition. See https://github.com/tesseract-ocr/tesseract/pull/1474 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6e5673ef50..8f6bbce09e 100644 --- a/configure.ac +++ b/configure.ac @@ -135,8 +135,8 @@ fi if $avx -o $avx2 -o $sse41; then case "${host_os}" in *darwin* | *-macos10*) - if test -z "$CLANG"; then - # When using AVX, AVX2, or SSE4.1: + if test g++ = "$CXX"; then + # When using AVX, AVX2, or SSE4.1 with g++: # Must tell AS to use clang integrated assembler, # instead of the GNU based system assembler. CXXFLAGS="$CXXFLAGS -Wa,-q"