Search notes:

AC_SUBST

AC_SUBST writes a variable into the Makefile.
The following three snippets are equivalent:
AC_SUBST([VAR],[Value])
VAR=Value
AC_SUBST([VAR])
AC_SUBST([VAR])
VAR=Value

Example

configure.ac

AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])

AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])

AC_PROG_CC

AC_SUBST(VAR_TQ84, 'tq84')

AM_INIT_AUTOMAKE([foreign])

AC_OUTPUT

Makefile.am

bin_PROGRAMS     = ac_subst
ac_subst_SOURCES = main.c

main.c

#include <stdio.h>
int main() {

  printf("AC_SUBST");

}
Run
autoreconf --install
./configure
The AC_SUBST(VAR_TQ84, 'tq84') macro in configure.ac declares the variable VAR_TQ84 with value tq84 in the Makefile:
grep VAR_TQ84 Makefile

See also

AC_ARG_VAR

Index