Commits

Bart van Strien committed c8e35d5

Made autoconf aware of llvm-lua and rename --enable-luajit to the more correct --with-luajit

Comments (0)

Files changed (1)

 AC_SEARCH_LIBS([glLoadIdentity], [GL], [], AC_MSG_ERROR([Can't LÖVE without OpenGL]))
 #AC_SEARCH_LIBS([gluOrtho2D], [GLU], [], AC_MSG_ERROR([Can't LÖVE without OpenGL Utility Library]))
 AC_SEARCH_LIBS([alSourcePlay], [openal], [], AC_MSG_ERROR([Can't LÖVE without OpenAL]))
-AC_ARG_ENABLE([luajit],
-	[  --enable-luajit Use LuaJIT instead of lua],
-	AC_SEARCH_LIBS(
-		[lua_pcall],
-		[luajit luajit-5.1],
-		AC_SUBST([INCLUDE_LUA], [-I/usr/include/luajit-2.0]),
-		AC_MSG_ERROR([Can't LÖVE without LuaJIT])
-	),
+lua=lua
+AC_ARG_WITH([luajit],
+	    [AS_HELP_STRING([--with-luajit], [Use LuaJIT instead of lua and llvm-lua])],
+	    [lua=luajit],
+	    [])
+AC_ARG_WITH([llvm-lua],
+	    [AS_HELP_STRING([--with-llvm-lua], [Use llvm-lua instead of lua and LuaJIT])],
+	    [lua=llvm-lua],
+	    [])
+
+AS_IF([test "$lua" == "lua"],
 	AC_SEARCH_LIBS(
 		[lua_pcall],
 		[lua lua5.1],
 		fi,
 		AC_MSG_ERROR([Can't LÖVE without Lua])
 	)
-)
+      )
+AS_IF([test "$lua" == "luajit"],
+	AC_SEARCH_LIBS(
+		[lua_pcall],
+		[luajit luajit-5.1],
+		AC_SUBST([INCLUDE_LUA], [-I/usr/include/luajit-2.0]),
+		AC_MSG_ERROR([Can't LÖVE without LuaJIT])
+	)
+      )
+AS_IF([test "$lua" == "llvm-lua"],
+	AC_SEARCH_LIBS(
+		[lua_pcall],
+		[llvm-lua],
+		[],
+		AC_MSG_ERROR([Can't LÖVE without llvm-lua])
+	)
+      )
+
 AC_SEARCH_LIBS([ilInit], [IL], [], AC_MSG_ERROR([Can't LÖVE without DevIL]))
 AC_SEARCH_LIBS([mng_initialize], [mng], [], AC_MSG_ERROR([DevIL needs MNG]))
 AC_SEARCH_LIBS([TIFFOpen], [tiff], [], AC_MSG_ERROR([DevIL needs TIFF]))