Protect older GCCs from -Wno-invalid-source-encoding

Needed for clang, added in r23434

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23475 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
John Ralls 2013-12-02 23:46:22 +00:00
parent 7492f14606
commit d745ea99ec
2 changed files with 19 additions and 1 deletions

View File

@ -100,6 +100,23 @@ AM_GLIB_GNU_GETTEXT
AC_PROG_INSTALL
PKG_PROG_PKG_CONFIG
dnl clang wants to check file encodings, and we need to tell it not to
dnl becuase of the unicode currency symbols. But older versions of GCC
dnl don't like the warning suppression option, so we need to set it only
dnl with clang.
AC_MSG_CHECKING([if compiling with clang])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [[
#ifndef __clang__
not clang
#endif
]])],
[ac_cv_CLANG=yes], [ac_cv_CLANG=no])
AC_MSG_RESULT([$ac_cv_CLANG])
AM_CONDITIONAL([CLANG], [test "x$ac_cv_CLANG" = "xyes"])
###--------------------------------------------------------
### Optionally enable gtkmm plugin (requires c++ compiler)

View File

@ -130,8 +130,9 @@ noinst_HEADERS = \
noinst_SCRIPTS = iso-currencies-to-c
libgncmod_engine_la_LDFLAGS = -avoid-version
if CLANG
libgncmod_engine_la_CFLAGS = -Wno-invalid-source-encoding
endif
libgncmod_engine_la_LIBADD = \
../gnc-module/libgnc-module.la \
../core-utils/libgnc-core-utils.la \