diff --git a/legacy/elementary/configure.ac b/legacy/elementary/configure.ac index 01ac4450d6..6ea6a99091 100644 --- a/legacy/elementary/configure.ac +++ b/legacy/elementary/configure.ac @@ -177,6 +177,12 @@ dnl managed by evil esac AM_CONDITIONAL([BUILD_RUN], [test "x$have_socket" = "xyes"]) +m4_ifdef([v_mic], + [ + EFL_COMPILER_FLAG([-Wall]) + EFL_COMPILER_FLAG([-W]) + ]) + have_fork="no" want_quicklaunch="auto" AC_ARG_ENABLE([quick-launch], diff --git a/legacy/elementary/m4/efl_compiler_flag.m4 b/legacy/elementary/m4/efl_compiler_flag.m4 new file mode 100644 index 0000000000..25c285dbf5 --- /dev/null +++ b/legacy/elementary/m4/efl_compiler_flag.m4 @@ -0,0 +1,57 @@ +dnl Copyright (C) 2010 Vincent Torri +dnl and Albin Tonnerre +dnl That code is public domain and can be freely used or copied. + +dnl Macro that checks if a compiler flag is supported by the compiler. + +dnl Usage: EFL_COMPILER_FLAG(flag) +dnl flag is added to CFLAGS if supported. + +AC_DEFUN([EFL_COMPILER_FLAG], +[ + +CFLAGS_save="${CFLAGS}" +CFLAGS="${CFLAGS} $1" + +AC_LANG_PUSH([C]) +AC_MSG_CHECKING([whether the compiler supports $1]) + +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]])], + [have_flag="yes"], + [have_flag="no"]) +AC_MSG_RESULT([${have_flag}]) + +if test "x${have_flag}" = "xno" ; then + CFLAGS="${CFLAGS_save}" +fi +AC_LANG_POP([C]) + +]) + +dnl Macro that checks if a linker flag is supported by the compiler. + +dnl Usage: EFL_LINKER_FLAG(flag) +dnl flag is added to LDFLAGS if supported (will be passed to ld anyway). + +AC_DEFUN([EFL_LINKER_FLAG], +[ + +LDFLAGS_save="${LDFLAGS}" +LDFLAGS="${LDFLAGS} $1" + +AC_LANG_PUSH([C]) +AC_MSG_CHECKING([whether the compiler supports $1]) + +AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]])], + [have_flag="yes"], + [have_flag="no"]) +AC_MSG_RESULT([${have_flag}]) + +if test "x${have_flag}" = "xno" ; then + LDFLAGS="${LDFLAGS_save}" +fi +AC_LANG_POP([C]) + +])