Skip to content

Commit

Permalink
configure.ac: Fix variable escaping for newer autoconf
Browse files Browse the repository at this point in the history
When using autoconf macros, one has to be careful because some
arguments as they may need additional escaping. In this
particular case, the second argument passed to
AC_DEFINE_UNQUOTED() is problematic as autoconf runs it in a
subshell resulting in 'yes' being interpreted as a name of a
variable instead of literal "yes" string. Putting quotes around
it lets shell know we want string comparison.

This problem was noticed with autoconf-2.71.

Signed-off-by: Michal Privoznik <[email protected]>
Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
  • Loading branch information
zippy2 authored and pcmoore committed Apr 3, 2023
1 parent 37889ff commit bc2e1d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ AS_IF([test "$enable_python" = yes], [
])
AM_CONDITIONAL([ENABLE_PYTHON], [test "$enable_python" = yes])
AC_DEFINE_UNQUOTED([ENABLE_PYTHON],
[$(test "$enable_python" = yes && echo 1 || echo 0)],
[$(test "$enable_python" = "yes" && echo 1 || echo 0)],
[Python bindings build flag.])

AC_CHECK_TOOL(GPERF, gperf)
Expand Down

0 comments on commit bc2e1d1

Please sign in to comment.