Skip to content
Permalink
Browse files

Link lua API to build.

  • Loading branch information...
vstakhov committed Jul 21, 2014
1 parent 5338f31 commit fcc4fb9134f605b1238ccf1e83f7c856ee5eba89
Showing with 27 additions and 4 deletions.
  1. +5 −1 Makefile.am
  2. +5 −2 configure.ac
  3. +1 −1 libucl.pc.in
  4. +16 −0 lua/Makefile.am
@@ -4,4 +4,8 @@ EXTRA_DIST = uthash README.md
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libucl.pc

SUBDIRS = src tests utils doc
if LUA_SUB
LUA_SUBDIR = lua
endif

SUBDIRS = src tests utils doc $(LUA_SUBDIR)
@@ -107,13 +107,15 @@ AS_IF([test "x$enable_lua" = "xyes"], [
AX_LUA_HEADERS([
AX_LUA_LIBS([
AC_DEFINE(HAVE_LUA, 1, [Define to 1 for lua support.])
AC_SUBST(LUA_FOUND)
with_lua="yes"
], [AC_MSG_ERROR([unable to find the lua libraries])
])
], [AC_MSG_ERROR([unable to find the lua header files])
])
], [AC_MSG_ERROR([unable to find the lua interpreter])])
])
], [with_lua="no"])

AM_CONDITIONAL([LUA_SUB], [test "$with_lua" = "yes"])

AS_IF([test "x$enable_urls" = "xyes"], [
AC_CHECK_HEADER([fetch.h], [
@@ -171,6 +173,7 @@ AC_LINK_IFELSE([

AC_CONFIG_FILES(Makefile \
src/Makefile \
lua/Makefile
tests/Makefile \
utils/Makefile \
doc/Makefile \
@@ -7,5 +7,5 @@ Name: LibUCL
Description: Universal configuration library
Version: @UCL_VERSION@
Libs: -L${libdir} -lucl
Libs.private: @LIBS_EXTRA@
Libs.private: @LIBS_EXTRA@ @LUA_LIB@
Cflags: -I${includedir}/
@@ -0,0 +1,16 @@
libucl_lua_common_cflags= -I$(top_srcdir)/src \
-I$(top_srcdir)/include \
-I$(top_srcdir)/uthash \
-Wall -W -Wno-unused-parameter -Wno-pointer-sign
lib_LTLIBRARIES= libucl_lua.la
libucl_lua_la_SOURCES= lua_ucl.c
libucl_lua_la_CFLAGS= $(libucl_lua_common_cflags) \
@LUA_INCLUDE@
libucl_lua_la_LDFLAGS = -version-info @SO_VERSION@
libucl_lua_la_LIBADD= @LIBFETCH_LIBS@ \
@LIBCRYPTO_LIB@ \
@LIBREGEX_LIB@ \
@CURL_LIBS@ \
@LUA_LIB@

include_HEADERS= $(top_srcdir)/include/lua_ucl.h

0 comments on commit fcc4fb9

Please sign in to comment.
You can’t perform that action at this time.