xref: /netbsd-src/external/bsd/am-utils/dist/m4/macros/opt_amu_cflags.m4 (revision a53f50b9b44dc9467ccc9c464999b1d1c509cb0c)
1dnl ######################################################################
2dnl Which options to add to CFLAGS for compilation?
3dnl NOTE: this is only for final compiltions, not for configure tests)
4AC_DEFUN([AMU_OPT_AMU_CFLAGS],
5[AC_MSG_CHECKING(for additional C option compilation flags)
6AC_ARG_ENABLE(am-cflags,
7AC_HELP_STRING([--enable-am-cflags=ARG],
8		[compile package with ARG additional C flags]),
9[
10if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then
11  AC_MSG_ERROR(am-cflags must be supplied if option is used)
12fi
13# user supplied a cflags option to configure
14AMU_CFLAGS="$enableval"
15AC_SUBST(AMU_CFLAGS)
16AC_MSG_RESULT($enableval)
17], [
18  # default is to have no additional C flags
19  AMU_CFLAGS=""
20  AC_SUBST(AMU_CFLAGS)
21  AC_MSG_RESULT(none)
22])
23])
24dnl ======================================================================
25