mirror of
https://github.com/nmap/nmap.git
synced 2025-12-30 03:19:02 +00:00
liblua and libm. This is necessary for static builds of Nmap, such as RPM
builds. Before this the error that was caused looked like
SCRIPT ENGINE: error while initializing script rules:
error loading module 'bit' from file '/usr/libexec/nmap/nselib-bin/bit.so':
/usr/libexec/nmap/nselib-bin/bit.so: undefined symbol: lua_pushnumber
stack traceback:
[C]: ?
[C]: in function 'require'
/usr/share/nmap/nselib/packet.lua:12: in main chunk
[C]: in function 'require'
/usr/share/nmap/scripts/rpcinfo.nse:10: in main chunk
[C]: ?
[C]: in function 'Entry'
/usr/share/nmap/scripts/script.db:8: in main chunk
[C]: ?
[C]: ?
56 lines
1.2 KiB
Plaintext
56 lines
1.2 KiB
Plaintext
AC_PREREQ([2.13])
|
|
AC_INIT([nselib.h])
|
|
|
|
AC_PROG_CC
|
|
|
|
# we want to compile lua modules written in C - which are shared libraries
|
|
# therefore disable building static libs - we shouldn't need them
|
|
AC_DISABLE_STATIC
|
|
AC_LIBTOOL_DLOPEN
|
|
AC_PROG_LIBTOOL
|
|
AC_SUBST([LIBTOOL])
|
|
|
|
AC_SUBST([LIBTOOL_DEPS])
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
# liblua appears to need libm.
|
|
AC_CHECK_LIB([m], [pow])
|
|
|
|
# Don't bother with --without-liblua because this directory isn't even
|
|
# configured if that's the case.
|
|
AC_ARG_WITH([liblua],
|
|
AC_HELP_STRING([--with-liblua=DIR], [Use an existing (compiled) lua lib from DIR/include and DIR/lib.])
|
|
AC_HELP_STRING([--with-liblua=included], [Use the liblua version included with Nmap]),
|
|
[ case "$with_liblua" in
|
|
yes)
|
|
with_liblua=
|
|
;;
|
|
included)
|
|
with_liblua=../liblua
|
|
;;
|
|
*)
|
|
;;
|
|
esac ]
|
|
)
|
|
|
|
# If no liblua location was given search for one.
|
|
if test "x$with_liblua" = "x"; then
|
|
AC_CHECK_HEADER([lua.h],
|
|
AC_CHECK_LIB([lua], [lua_call], [system_liblua=yes]))
|
|
# If none was found use the included liblua.
|
|
if test "$system_liblua" != "yes"; then
|
|
with_liblua=../liblua
|
|
fi
|
|
fi
|
|
|
|
if test "x$with_liblua" != "x"; then
|
|
CPPFLAGS="-I$with_liblua $CPPFLAGS"
|
|
LDFLAGS="-L$with_liblua $LDFLAGS"
|
|
fi
|
|
|
|
LIBS="-llua $LIBS"
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
AC_OUTPUT
|