Aegisub/m4macros/ac_agi.m4
Amar Takhar 7a87d3a2ee Change AC_AGI_COMPILE to use AC_RUN_IFELSE instead of AC_COMPILE_IFELSE which
only checks if the program links correctly, this way we can make functional
programs to check for library sanity.  Also disable the GL check until amz
writes us a slice that uses gl.h/glext.h.

Originally committed to SVN as r2117.
2008-03-22 23:10:55 +00:00

14 lines
373 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_RUN_IFELSE([$5],
[eval agi_with_$2="yes"],
[eval agi_with_$2="no"])
])
CPPFLAGS="$aegisub_save_CPPFLAGS"
LDFLAGS="$aegisub_save_LDFLAGS"
])