Don't try to build lua if we don't ask for it.
This commit is contained in:
parent
713e91d59a
commit
4608cde968
|
@ -1,8 +1,12 @@
|
|||
INCLUDES=@INCLUDES@
|
||||
|
||||
lib_LTLIBRARIES = sigar.la
|
||||
lib_LTLIBRARIES=
|
||||
TESTS=
|
||||
|
||||
sigar_la_SOURCES =\
|
||||
if BUILD_LUA
|
||||
lib_LTLIBRARIES += sigar.la
|
||||
|
||||
sigar_la_SOURCES =\
|
||||
sigar.c \
|
||||
sigar-cpu.c \
|
||||
sigar-disk.c \
|
||||
|
@ -19,6 +23,11 @@ sigar_la_CPPFLAGS = ${LUA_CFLAGS}
|
|||
sigar_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version
|
||||
sigar_la_LIBADD = $(top_builddir)/src/libsigar.la
|
||||
|
||||
TESTS += \
|
||||
sigar-test.lua
|
||||
|
||||
endif
|
||||
|
||||
noinst_HEADERS = lua-sigar.h
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
|
@ -27,5 +36,3 @@ TESTS_ENVIRONMENT = \
|
|||
DYLD_LIBRARY_PATH="${top_builddir}/src/.libs/" \
|
||||
lua
|
||||
|
||||
TESTS = \
|
||||
sigar-test.lua
|
||||
|
|
|
@ -129,13 +129,15 @@ if test "$WITH_LUA" != "no"; then
|
|||
PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1, [
|
||||
AC_DEFINE([HAVE_LUA], [1], [liblua])
|
||||
AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
|
||||
])
|
||||
],[WITH_LUA=no])
|
||||
])
|
||||
|
||||
AC_SUBST(LUA_CFLAGS)
|
||||
AC_SUBST(LUA_LIBS)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([BUILD_LUA],[test "$WITH_LUA" != "no"])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
include/Makefile
|
||||
|
|
Loading…
Reference in New Issue