Defining Symbols - Autoconf

— Macro: AC_DEFINE_UNQUOTED (variable, value, [description])
— Macro: AC_DEFINE_UNQUOTED (variable)

Like AC_DEFINE, but three shell expansions are performed—once—on variable and value: variable expansion (‘$’), command substitution (‘`’), and backslash escaping (‘\’), as if in an unquoted here-document. Single and double quote characters in the value have no special meaning. Use this macro instead of AC_DEFINE when variable or value is a shell variable. Examples:

AC_DEFINE_UNQUOTED([config_machfile], ["$machfile"],
            [Configuration machine file.])
          AC_DEFINE_UNQUOTED([GETGROUPS_T], [$ac_cv_type_getgroups],
            [getgroups return type.])
          AC_DEFINE_UNQUOTED([$ac_tr_hdr], [1],
            [Translated header name.])

用 AC_DEFINE_UNQUOTED 來定義 C 裡面的 macro,它可以將 shell 變數直接展開。

也就是說,可以直接吃 AC_ARG_WITH 得到得 $withval 變數;而不是用 AC_DEFINE。