Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-do Lua detection #6445

Merged
merged 1 commit into from
Apr 9, 2018
Merged

Conversation

pieterlexis
Copy link
Contributor

@pieterlexis pieterlexis commented Apr 4, 2018

Detect LuaJIT first, then other implementations. Allows setting
--with-lua to a specific implementation as well (e.g. lua51). Will
produce errors appropriately.

Fixes #6423.

TODO:

  • Check build scripts for --with-luajit usage
  • Check --version outputs
  • Check for $LUAPC and $LUAJITPC uages
  • Check if m4_foreach_w works as advertised

Short description

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@pieterlexis pieterlexis changed the title Re-do Lua detection [WIP] Re-do Lua detection Apr 5, 2018
@pieterlexis pieterlexis changed the title [WIP] Re-do Lua detection Re-do Lua detection Apr 5, 2018
@pieterlexis pieterlexis requested a review from zeha April 5, 2018 07:42
AC_MSG_ERROR([Selected Lua not found])
])
], [
PKG_CHECK_MODULES([LUA], [luajit], [LUAPC=luajit], [ : ])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to define AC_DEFINE([HAVE_LUA], [1], [Define to 1 if you have lua]) in the action-if-found? Or is it done by PKG_CHECK_MODULES already?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right!

Detect LuaJIT first, then other implementations. Allows setting
`--with-lua` to a specific implementation as well (e.g. `lua51`). Will
produce errors appropriately.

Fixes PowerDNS#6423.
Copy link
Member

@rgacogne rgacogne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pieterlexis pieterlexis merged commit dbda697 into PowerDNS:master Apr 9, 2018
@pieterlexis pieterlexis deleted the with-lua-redo branch April 9, 2018 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libluajit not auto-detected
2 participants