Hi,
Build under OS X fails with:
CXX userinfo.o
CXX unicode.o
OBJC AppleSpeller.o
error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
I moved the '-std=c++11' from the CPPFLAGS to the CXXFLAGS and defined
OBJCFLAGS.
(patch included)
Regards,
Patrick De Visschere
diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index 81e91ca..5d7b666 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -366,8 +366,8 @@ if test x$GXX = xyes; then
clang)
dnl presumably all clang versions support c++11.
dnl the deprecated-register warning is very annoying with Qt4.x right
now.
- AM_CPPFLAGS="$AM_CPPFLAGS -std=c++11"
- AM_CXXFLAGS="$AM_CXXFLAGS -Wno-deprecated-register";;
+ AM_OBJCFLAGS="$AM_CXXFLAGS"
+ AM_CXXFLAGS="$AM_CXXFLAGS -std=c++11 -Wno-deprecated-register";;
*)
AS_CASE([$host], [*cygwin*],
[AM_CPPFLAGS="$AM_CPPFLAGS -std=gnu++11"],
diff --git a/configure.ac b/configure.ac
index 8ae7dcb..7b42065 100644
--- a/configure.ac
+++ b/configure.ac
@@ -241,6 +241,7 @@ VERSION_INFO="Configuration\n\
Special build flags: ${lyx_flags}\n\
C++ Compiler: ${CXX} ${CXX_VERSION}\n\
C++ Compiler flags: ${AM_CPPFLAGS} ${AM_CXXFLAGS}\n\
+ Obj C Compiler flags: ${AM_CPPFLAGS} ${AM_OBJCFLAGS}\n\
C++ Compiler user flags: ${CPPFLAGS} ${CXXFLAGS}\n\
Linker flags: ${AM_LDFLAGS}\n\
Linker user flags: ${LDFLAGS}\n\