diff options
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/interface-curses/Makefile.am | 8 | ||||
-rw-r--r-- | src/interface-gtk/Makefile.am | 10 |
4 files changed, 9 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac index c710191..c341183 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,7 @@ 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 @@ -87,8 +88,10 @@ case $host in ;; esac -# Emscripten uses Clang as well -AM_CONDITIONAL(CLANG, [$CXX --version | $GREP -E "clang|Emscripten" >/dev/null]) +# Detect Clang. Emscripten is based on Clang as well. +if $CXX --version | $GREP -E "clang|Emscripten" >/dev/null; then + CXXFLAGS="$CXXFLAGS -Wno-mismatched-tags" +fi AC_CHECK_PROG(DATE, date, date) if [[ x$DATE = x ]]; then @@ -198,9 +201,8 @@ AC_CACHE_CHECK([if C++ compiler supports -fsized-deallocation], if [[ x$sciteco_cv_sized_deallocation_result = xyes ]]; then AC_DEFINE(HAVE_SIZED_DEALLOCATION, 1, [C++ compiler supports -fsized-deallocation]) + CXXFLAGS="$CXXFLAGS -fsized-deallocation" fi -AM_CONDITIONAL(HAVE_SIZED_DEALLOCATION, - test "$sciteco_cv_sized_deallocation_result" = yes) # # Config options diff --git a/src/Makefile.am b/src/Makefile.am index 5ca4159..3589fdf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,12 +12,6 @@ include $(top_srcdir)/bootstrap.am include $(top_srcdir)/scintilla.am AM_CXXFLAGS = -Wall -Wno-char-subscripts -if CLANG -AM_CXXFLAGS += -Wno-mismatched-tags -endif -if HAVE_SIZED_DEALLOCATION -AM_CXXFLAGS += -fsized-deallocation -endif if STATIC_EXECUTABLES # AM_LDFLAGS are libtool flags, NOT compiler/linker flags diff --git a/src/interface-curses/Makefile.am b/src/interface-curses/Makefile.am index bd61e14..01e68ae 100644 --- a/src/interface-curses/Makefile.am +++ b/src/interface-curses/Makefile.am @@ -1,12 +1,6 @@ AM_CPPFLAGS += -I$(top_srcdir)/src -AM_CXXFLAGS = -std=c++11 -Wall -Wno-char-subscripts -if CLANG -AM_CXXFLAGS += -Wno-mismatched-tags -endif -if HAVE_SIZED_DEALLOCATION -AM_CXXFLAGS += -fsized-deallocation -endif +AM_CXXFLAGS = -Wall -Wno-char-subscripts noinst_LTLIBRARIES = libsciteco-interface.la libsciteco_interface_la_SOURCES = interface-curses.cpp interface-curses.h \ diff --git a/src/interface-gtk/Makefile.am b/src/interface-gtk/Makefile.am index aa42871..825c5d3 100644 --- a/src/interface-gtk/Makefile.am +++ b/src/interface-gtk/Makefile.am @@ -1,13 +1,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/src -AM_CFLAGS = -std=c99 -Wall -AM_CXXFLAGS = -std=c++11 -Wall -Wno-char-subscripts -if CLANG -AM_CXXFLAGS += -Wno-mismatched-tags -endif -if HAVE_SIZED_DEALLOCATION -AM_CXXFLAGS += -fsized-deallocation -endif +AM_CFLAGS = -Wall +AM_CXXFLAGS = -Wall -Wno-char-subscripts EXTRA_DIST = gtk-info-popup.gob \ gtk-canonicalized-label.gob |