diff --git a/configure.ac b/configure.ac index 404200d2c..9f22a9734 100644 --- a/configure.ac +++ b/configure.ac @@ -1005,9 +1005,16 @@ if test -n "$luapkg" && $PKG_CONFIG $pkg_config_static "$luapkg"; then LIBS="$LUA_LIBS $LIBS_X" # Check that it is a compatible Lua version - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include ] + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#ifdef __cplusplus +extern "C" { +#endif + #include ] #include #include +#ifdef __cplusplus +} +#endif ], [[lua_State *L = luaL_newstate(); luaL_openlibs(L); lua_pushboolean(L, 1);