diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-10-27 11:32:40 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-10-27 11:32:40 +0200 |
commit | 7d8e6af2df12442c1c133956b3acf3fdbc496423 (patch) | |
tree | 7f5a0c07458be2d04cbba1f86b8badc7c0ef9019 | |
parent | 8196872e3b240ef93fc17dd3c05a7d97a8015d88 (diff) |
Use pk-config to test for lua.
-rw-r--r-- | configure.in | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/configure.in b/configure.in index 6c78153..1e57226 100644 --- a/configure.in +++ b/configure.in @@ -18,6 +18,11 @@ AC_OUTPUT(lib/Makefile) AC_DEFINE_UNQUOTED(ETC, "$prefix/etc/miav", [The path to the config files]) AC_DEFINE_UNQUOTED(PIXMAPS, "$prefix/share/pixmaps", [The path to the pixmap files]) +dnl ====================== +dnl Init pkg-config +dnl ====================== +PKG_PROG_PKG_CONFIG(0.23) + AC_ARG_WITH(debug, [ --with-debug Build with debugging (-g -Wall -Werror)]) if test x$with_debug == xyes; then CXXFLAGS="$CXXFLAGS -g -Wall -Werror" @@ -127,38 +132,9 @@ dnl ====================== AC_HAVE_HEADERS(getopt.h) dnl ====================== -dnl Check for the lua library +dnl Check for lua dnl ====================== -LUADIR="/usr" - -AC_ARG_WITH(luadir, [ --with-luadir=DIR The prefix to where LUA 5.1 is installed], - LUADIR=${withval} -) - -LDFLAGS="${LDFLAGS} -L${LUADIR}/lib" -LIBS="${LIBS} -llua -lm -ldl" -CFLAGS="${CFLAGS} -I${LUADIR}/include" -CXXFLAGS="${CXXFLAGS} -I${LUADIR}/include" -CPPFLAGS="${CPPFLAGS} -I${LUADIR}/include" - -AC_SUBST(CFLAGS) -AC_SUBST(CXXFLAGS) -AC_SUBST(CPPFLAGS) -AC_SUBST(LDFLAGS) -AC_SUBST(LIBS) -AC_CHECK_HEADER(lua.h, , AC_MSG_ERROR([*** lua headers not found!])) -AC_CHECK_HEADER(lualib.h, , AC_MSG_ERROR([*** lualib header not found!])) -AC_CHECK_HEADER(lauxlib.h, , AC_MSG_ERROR([*** lauxlib header not found!])) -AC_MSG_CHECKING([for lua_open in -llua using LUADIR=${LUADIR}]) -AC_TRY_RUN([ - #include <lua.h> - - int main(int argc, char *argv[]) - { - lua_open(); - return 0; - } -],AC_MSG_RESULT([yes]), AC_MSG_ERROR([*** lib lua not found!]) ) +PKG_CHECK_MODULES(LUA, lua >= 5.1) dnl ====================== dnl Check for pthread library |