12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- AC_DEFUN([MHD_CHECK_ADD_CC_CFLAG],[dnl
- _MHD_CHECK_ADD_CC_XFLAG([$1],[$2],[$3],[$4],[[CFLAGS]])dnl
- ])
- AC_DEFUN([_MHD_CHECK_ADD_CC_XFLAG],[dnl
- AC_PREREQ([2.64])dnl for AS_VAR_IF, m4_ifnblank, m4_default
- AC_LANG_ASSERT([C])dnl
- m4_ifblank([$1], [m4_fatal([First macro argument must not be empty])])dnl
- m4_bmatch(_mhd_norm_expd([$1]), [\s],dnl
- [m4_fatal([First macro argument must not contain whitespaces])])dnl
- m4_bmatch(_mhd_norm_expd([$2]), [\s],dnl
- [m4_fatal([Second macro argument must not contain whitespaces])])dnl
- m4_bmatch([$1], [\$], [m4_fatal([$0: First macro argument must not contain '$'])])dnl
- m4_bmatch([$2], [\$], [m4_fatal([$0: Second macro argument must not contain '$'])])dnl
- m4_bmatch(_mhd_norm_expd([$5]), [^\(CFLAGS\|LDFLAGS\)$],[],dnl
- [m4_fatal([$0: Fifth macro argument must be either 'CFLAGS' or 'LDFLAGS; ']_mhd_norm_expd([$5])[' is not supported])])dnl
- m4_ifnblank([$2],
- [_MHD_CHECK_CC_XFLAG([$1], [$2],
- [MHD_APPEND_FLAG_TO_VAR(_mhd_norm_expd([$2]),_mhd_norm_expd([$1]))
- $3],[$4],[$5])],
- [_MHD_CHECK_CC_XFLAG([$1],_mhd_norm_expd([$5]),
- [MHD_APPEND_FLAG_TO_VAR(_mhd_norm_expd([$5]),_mhd_norm_expd([$1]))
- $3],[$4],[$5])]
- )
- ])
|