Не может найти lua.h на некоторых системах, например *BSD.
вот, есть такой configure.in:
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([bvi.c])
AC_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
dnl On SunOS4 systems you have to use the /usr/5bin/cc compiler
dnl to get the SYSV curses library:
case "$host_os" in
sunos4*)
AC_MSG_RESULT("using /usr/5bin/cc")
CC="/usr/5bin/cc"
ac_objext="o"
;;
*)
AC_PROG_CC
;;
esac
dnl Some curses specials
dnl Solaris needs for tputs 'putc(char)' instead of 'putc(int)'
case "$host_os" in
solaris*)
CPPFLAGS="${CPPFLAGS} -D_MSE_INT_H"
AC_DEFINE([NEED_PUTC_CHAR],[],[putc_char is needed])
;;
hpux9*) DEFS=${DEFS-"-DMINICURSES"}
;;
esac
CPPFLAGS="${CPPFLAGS} -Wall -pedantic"
dnl Checks for programs.
AC_PROG_INSTALL
dnl Check for typedefs
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(void *)
AC_CHECK_TYPE(size_t, unsigned int)
AC_CHECK_TYPE(off_t, int)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h termcap.h termio.h termios.h unistd.h term.h ncurses/term.h)
dnl Check if ncurses requested
_cppflags="${CPPFLAGS}"
_ldflags="${LDFLAGS}"
AC_ARG_WITH(ncurses,
[ --with-ncurses[=DIR] path to ncurses],[
if test "$withval" != "no"; then
CPPFLAGS="${CPPFLAGS} -I$withval/include -I$withval/include/ncurses"
LDFLAGS="${LDFLAGS} -L$withval/lib"
fi
])
AC_CHECK_HEADER(ncurses.h,[
AC_CHECK_LIB([ncurses], [initscr],[
AC_DEFINE([HAVE_NCURSES_H],[1],[ncurses header file existance]) LIBS="${LIBS} -lncurses" ],[
AC_CHECK_LIB([curses], [initscr],[
AC_DEFINE([HAVE_CURSES_H],[1],[curses header file existance]) LIBS="${LIBS} -lcurses"],[
AC_MSG_ERROR([bvi requires the curses library])])])],[
AC_CHECK_HEADER(curses.h,[
AC_CHECK_LIB([curses], [initscr],[
AC_DEFINE([HAVE_CURSES_H],[1],[curses header file existance]) LIBS="${LIBS} -lcurses"],[
AC_MSG_ERROR([bvi requires the curses library])])],[
AC_MSG_ERROR([bvi requires the curses library])])])
dnl Check if lua requested
AC_ARG_WITH(lua,
[ --with-lua[=DIR] path to lua],[
if test "$withval" != "no"; then
CPPFLAGS="${CPPFLAGS} -I$withval/include"
LDFLAGS="${LDFLAGS} -L$withval/lib"
fi
])
AC_CHECK_HEADER(lua5.1/lua.h,[
AC_CHECK_LIB([lua5.1], [lua_pcall],[
AC_DEFINE([HAVE_LUA_H],[1],[Lua header file existance]) LIBS="${LIBS} -llua5.1"],[
AC_MSG_ERROR([bvi requires lua])])],[
AC_CHECK_HEADER(lua.h,[
AC_CHECK_LIB([lua], [lua_pcall],[
AC_DEFINE([HAVE_LUA_H],[1],[Lua header file existance]) LIBS="${LIBS} -llua"],[
AC_MSG_ERROR([bvi requires lua])])],[
AC_MSG_ERROR([bvi requires lua])])],[
AC_MSG_ERROR([bvi requires lua])])
dnl Check if openssl requested
AC_ARG_WITH(openssl,
[ --with-openssl[=DIR] path to openssl],[
if test "$withval" != "no"; then
CPPFLAGS="${CPPFLAGS} -I$withval/include"
LDFLAGS="${LDFLAGS} -L$withval/lib"
fi
])
AC_CHECK_HEADER([openssl/evp.h],[
AC_CHECK_LIB([ssl], [SHA256_Init],[
AC_DEFINE([HAVE_OPENSSL],[1],[OpenSSL header files]) LIBS="${LIBS} -lssl"],[
AC_MSG_ERROR([bvi requires openssl])],[]
)],[
AC_MSG_ERROR([bvi requires openssl])])
dnl Checks for typedefs, structures, and compiler characteristics.
dnl AC_TYPE_SIZE_T
dnl Checks for library functions.
dnl AC_TYPE_SIGNAL
AC_CHECK_FUNCS(strdup strtol strerror memmove)
AC_PROG_INSTALL
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
/usr/local/include/lua51/lua.h /usr/local/lib/lua/5.1/liblua.so
Если поменять
AC_CHECK_HEADER(lua5.1/lua.h,
AC_CHECK_HEADER(lua51/lua.h,