I will gratefully accept a hint on the following subject.
When I want to add some libraries (e.g., rex-pcre) to Lua environment provided by luasandbox, I edit library.c. I also need to link the .so (tried .a but failed) file that contains the definition of the new function that I refer to in library.c.
Under HHVM (and therefore C++), I edited the HHVM_LINK_LIBRARIES directive in config.cmake adding /usr/lib/x86_64-linux-gnu/liblua5.1-rex-pcre.so to achieve this. But under PHP 7.1 (pure C), config.cmake is, I guess, irrelevant.
My question is: in which file of luasandbox distribution can I inject a reference to an additional library for the C linker? Or is there an altogether neater way to fo it?