AM_CONDITIONAL defines an Automake condition.
You want AC_DEFINE, which emits something into config.h.
문제
I have the following code in my configure.ac
:
AC_SEARCH_LIBS([backtrace], [execinfo], [], [
AC_MSG_ERROR([unable to find the backtrace() function])
])
I want to change this so a macro is defind in config.h if backtrace
is available. I've tried
AC_SEARCH_LIBS([backtrace], [execinfo], [
AM_CONDITIONAL(HAVE_BACKTRACE, true)
], [
AM_CONDITIONAL(HAVE_BACKTRACE, true)
])
Note that I've intentionally used true in both places, so that I'm sure the macro is being set either way -- and it's not being set, so I'm most probably doing it the wrong way. What's the proper way to do this?
해결책
AM_CONDITIONAL defines an Automake condition.
You want AC_DEFINE, which emits something into config.h.