Aegisub/m4macros/ac_agi.m4
Amar Takhar 28a6ceab78 Add a new (custom) macro AC_AGI_COMPILE to help with writing tests that use the
headers+libraries into runnable programs.  Hopefully this will solve all the
-dev package situations on Linux.

Originally committed to SVN as r2113.
2008-03-22 19:43:23 +00:00

14 lines
377 B
Text

AC_DEFUN([AC_AGI_COMPILE],[
aegisub_save_LDFLAGS="$LDFLAGS"
aegisub_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$3"
LDFLAGS="$4"
AC_CACHE_CHECK(
[wether $1 works], [agi_with_$2],
[AC_COMPILE_IFELSE([$5],
[eval agi_with_$2="yes"],
[eval agi_with_$2="no"])
])
CPPFLAGS="$aegisub_save_CPPFLAGS"
LDFLAGS="$aegisub_save_LDFLAGS"
])