forked from e16/e16
1
0
Fork 0

Fix obscure m4 problem

The line

  define(ec_c_compile_cpp, ifelse([$1], [cpp], [yes], [no]))

potentially caused weird problems later in configure.ac.
Using m4_define instead cured that.
So let's do define() -> m4_define() elsewhere too.
This commit is contained in:
Kim Woelders 2020-05-05 20:09:20 +02:00
parent 258d174ffa
commit 33a0c3e595
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ AC_DEFUN([EC_C_VISIBILITY],
[
AC_REQUIRE([AC_PROG_CC])
define(ec_c_vis_default, ifelse([$1], [no], [no], [yes]))
m4_define([ec_c_vis_default], ifelse([$1], [no], [no], [yes]))
CFLAGS_VISIBILITY=
HAVE_VISIBILITY=0

View File

@ -9,7 +9,7 @@ dnl Usage: EC_C_WARNINGS([LANG])
dnl Set LANG to 'cpp' when compiling for C++
AC_DEFUN([EC_C_WARNINGS], [
define(ec_c_compile_cpp, ifelse([$1], [cpp], [yes], [no]))
m4_define([ec_c_compile_cpp], ifelse([$1], [cpp], [yes], [no]))
AC_ARG_ENABLE(werror,
[AS_HELP_STRING([--enable-werror],
@ -20,7 +20,7 @@ AC_DEFUN([EC_C_WARNINGS], [
CFLAGS_WARNINGS="-W -Wall -Waggregate-return -Wcast-align -Wpointer-arith -Wshadow -Wwrite-strings"
ifelse(ec_c_compile_cpp, no, [
CFLAGS_WARNINGS="$CFLAGS_WARNINGS -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes"
],)
])
if test "x$enable_werror" = "xyes"; then
CFLAGS_WARNINGS="$CFLAGS_WARNINGS -Werror"