From 7a60ac95efafd23f1480cd20958b281d245c0345 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 27 Jul 2015 18:56:58 -0700 Subject: [PATCH] Always use C++ for AC_AGI_COMPILE --- m4macros/ac_agi.m4 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/m4macros/ac_agi.m4 b/m4macros/ac_agi.m4 index c182ff406..e45a54767 100644 --- a/m4macros/ac_agi.m4 +++ b/m4macros/ac_agi.m4 @@ -3,12 +3,14 @@ AC_DEFUN([AC_AGI_COMPILE],[ aegisub_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $3" LIBS="$LIBS $4" - AC_CACHE_CHECK( - [whether $1 works], [agi_cv_with_$2], - [AC_RUN_IFELSE([AC_LANG_SOURCE([$5])], - [eval agi_cv_with_$2="yes"], - [eval agi_cv_with_$2="no"], - [AS_IF([test $? -ne 0], [eval agi_cv_with_$2="no"], [eval agi_cv_with_$2="yes"])])]) + AC_LANG_PUSH(C++) + AC_CACHE_CHECK( + [whether $1 works], [agi_cv_with_$2], + [AC_RUN_IFELSE([AC_LANG_SOURCE([$5])], + [eval agi_cv_with_$2="yes"], + [eval agi_cv_with_$2="no"], + [AS_IF([test $? -ne 0], [eval agi_cv_with_$2="no"], [eval agi_cv_with_$2="yes"])])]) + AC_LANG_POP(C++) CPPFLAGS="$aegisub_save_CPPFLAGS" LIBS="$aegisub_save_LIBS" ])