33 lines
1.7 KiB
Plaintext
33 lines
1.7 KiB
Plaintext
--- configure.ac.orig 2016-12-26 20:59:49.000000000 +0000
|
|
+++ configure.ac 2017-07-04 16:35:44.818612000 +0000
|
|
@@ -18,14 +18,23 @@
|
|
|
|
AC_SUBST(dunelegacydatadir)
|
|
|
|
-dnl Some flags for gcc
|
|
-CXXFLAGS="-std=c++11 -pthread -fPIC -O3 -pipe -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -DNDEBUG"
|
|
-CFLAGS="-std=c99 -pthread -fPIC -O3 -pipe -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -DNDEBUG"
|
|
-dnl Additional flags: -Wconversion -Wno-sign-conversion -Wlogical-op
|
|
+AC_MSG_CHECKING([if compiling with clang])
|
|
|
|
-dnl Some flags for clang
|
|
-dnl CXXFLAGS="-std=c++11 -O3 -pipe -pedantic -Weverything -Wno-sign-conversion -Wno-conversion -Wno-shadow -Wno-missing-noreturn -Wno-padded -Wno-packed -Wno-weak-vtables -Wno-c++11-narrowing -Wno-cast-align -Wno-unreachable-code -Wno-missing-prototypes -Wno-float-equal -Wno-global-constructors -Wno-exit-time-destructors -Wno-format-nonliteral -Wno-unused-macros -Wreserved-id-macro -Wextra -Wno-unused-parameter -Wno-narrowing"
|
|
+AC_COMPILE_IFELSE(
|
|
+[AC_LANG_PROGRAM([], [[
|
|
+#ifndef __clang__
|
|
+ not clang
|
|
+#endif
|
|
+]])],
|
|
+[CLANG=yes], [CLANG=no])
|
|
|
|
+AC_MSG_RESULT([$CLANG])
|
|
+
|
|
+if test "x$CLANG" = xyes; then
|
|
+ CXXFLAGS="-std=c++11 -O3 -pipe -pedantic -Weverything -Wno-sign-conversion -Wno-conversion -Wno-shadow -Wno-missing-noreturn -Wno-padded -Wno-packed -Wno-weak-vtables -Wno-c++11-narrowing -Wno-cast-align -Wno-unreachable-code -Wno-missing-prototypes -Wno-float-equal -Wno-global-constructors -Wno-exit-time-destructors -Wno-format-nonliteral -Wno-unused-macros -Wextra -Wno-unused-parameter"
|
|
+else
|
|
+ CXXFLAGS="-O3 -pipe -pedantic -Wall -Wextra -Wno-unused-parameter -DNDEBUG"
|
|
+fi
|
|
|
|
AC_ARG_ENABLE([debug],
|
|
[AS_HELP_STRING([--enable-debug],
|