Skip to content

Commit

Permalink
Modfiy gcc v6.x fix for empty CXXFLAGS (See rakshasa#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
chros authored and chros committed Aug 2, 2017
1 parent 943b576 commit 1a4f6da
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ AC_CONFIG_HEADERS(config.h)
AC_PROG_CXX
AC_PROG_LIBTOOL

RAK_CHECK_CFLAGS
RAK_CHECK_CXXFLAGS
RAK_ENABLE_DEBUG
RAK_ENABLE_EXTRA_DEBUG
Expand Down
21 changes: 17 additions & 4 deletions scripts/rak_compiler.m4
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
AC_DEFUN([RAK_CHECK_CFLAGS], [
AC_MSG_CHECKING([for user-defined CFLAGS])
if test "$CFLAGS" = ""; then
unset CFLAGS
AC_MSG_RESULT([undefined])
else
AC_MSG_RESULT([user-defined "$CFLAGS"])
fi
])


AC_DEFUN([RAK_CHECK_CXXFLAGS], [
AC_MSG_CHECKING([for user-defined CXXFLAGS])
if test -n "$CXXFLAGS"; then
AC_MSG_RESULT([user-defined "$CXXFLAGS"])
if test "$CXXFLAGS" = ""; then
unset CXXFLAGS
AC_MSG_RESULT([undefined])
else
CXXFLAGS="-O2"
AC_MSG_RESULT([default "$CXXFLAGS"])
AC_MSG_RESULT([user-defined "$CXXFLAGS"])
fi
])

Expand Down

0 comments on commit 1a4f6da

Please sign in to comment.