diff options
author | Michael Adam <obnox@samba.org> | 2009-06-29 23:23:07 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-06-29 23:25:38 +0200 |
commit | 69af9eacb9214106b7448c59eb13a8bf0b832c91 (patch) | |
tree | 6b8b33d9426eb65925fb7e416dfaffed71ab6b56 /source3 | |
parent | 772d5dea303813514d53a42ac4114da8a9cb1c5a (diff) | |
download | samba-69af9eacb9214106b7448c59eb13a8bf0b832c91.tar.gz samba-69af9eacb9214106b7448c59eb13a8bf0b832c91.tar.bz2 samba-69af9eacb9214106b7448c59eb13a8bf0b832c91.zip |
s3:build: check for external liblua, link lua statically if using internal lib
So liblua is treated the same way as libtalloc and libtdb.
Michael
Diffstat (limited to 'source3')
-rw-r--r-- | source3/Makefile.in | 14 | ||||
-rw-r--r-- | source3/configure.in | 42 |
2 files changed, 42 insertions, 14 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index cdca9c1e5a..62d4fbea0e 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -2352,19 +2352,7 @@ bin/libbigballofmud.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBBIGBALLOFMUD_OBJ) @LIBTAL # #------------------------------------------------------------------- -LIBLUA_OBJ0 = lua-5.1.4/src/lapi.o lua-5.1.4/src/lauxlib.o \ - lua-5.1.4/src/lbaselib.o lua-5.1.4/src/lcode.o \ - lua-5.1.4/src/ldblib.o lua-5.1.4/src/ldebug.o lua-5.1.4/src/ldo.o \ - lua-5.1.4/src/ldump.o lua-5.1.4/src/lfunc.o lua-5.1.4/src/lgc.o \ - lua-5.1.4/src/linit.o lua-5.1.4/src/liolib.o lua-5.1.4/src/llex.o \ - lua-5.1.4/src/lmathlib.o lua-5.1.4/src/lmem.o \ - lua-5.1.4/src/loadlib.o lua-5.1.4/src/lobject.o \ - lua-5.1.4/src/lopcodes.o lua-5.1.4/src/loslib.o \ - lua-5.1.4/src/lparser.o lua-5.1.4/src/lstate.o \ - lua-5.1.4/src/lstring.o lua-5.1.4/src/lstrlib.o \ - lua-5.1.4/src/ltable.o lua-5.1.4/src/ltablib.o lua-5.1.4/src/ltm.o \ - lua-5.1.4/src/lundump.o lua-5.1.4/src/lvm.o \ - lua-5.1.4/src/lzio.o lua-5.1.4/src/print.o +LIBLUA_OBJ0 = @LIBLUA_OBJ0@ LIBLUA_OBJ = $(LIBLUA_OBJ0) diff --git a/source3/configure.in b/source3/configure.in index d8ca0a72a3..97d1a8bbc7 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -4775,10 +4775,50 @@ then AC_SUBST(TDBTORTURE) fi + +AC_ARG_ENABLE(external_liblua, + [AS_HELP_STRING([--enable-external-liblua], + [Enable external lua [default=auto]])], + [ enable_external_liblua=$enableval ], + [ enable_external_liblua=auto ]) + +if test "x$enable_external_liblua" != xno +then + PKG_CHECK_MODULES(LIBLUA, lua5.1 >= 5.1.4, + [ enable_external_liblua=yes ], + [ + if test x$enable_external_liblua = xyes; then + AC_MSG_ERROR([Unable to find liblua]) + else + enable_external_liblua=no + fi + ]) +fi + +AC_SUBST(LIBLUA_OBJ0) +if test "x$enable_external_liblua" = xno +then + LINK_LIBLUA=STATIC + SMB_LIBRARY(lua, 0) + LIBLUA_OBJ0="lua-5.1.4/src/lapi.o lua-5.1.4/src/lauxlib.o \ + lua-5.1.4/src/lbaselib.o lua-5.1.4/src/lcode.o \ + lua-5.1.4/src/ldblib.o lua-5.1.4/src/ldebug.o lua-5.1.4/src/ldo.o \ + lua-5.1.4/src/ldump.o lua-5.1.4/src/lfunc.o lua-5.1.4/src/lgc.o \ + lua-5.1.4/src/linit.o lua-5.1.4/src/liolib.o lua-5.1.4/src/llex.o \ + lua-5.1.4/src/lmathlib.o lua-5.1.4/src/lmem.o \ + lua-5.1.4/src/loadlib.o lua-5.1.4/src/lobject.o \ + lua-5.1.4/src/lopcodes.o lua-5.1.4/src/loslib.o \ + lua-5.1.4/src/lparser.o lua-5.1.4/src/lstate.o \ + lua-5.1.4/src/lstring.o lua-5.1.4/src/lstrlib.o \ + lua-5.1.4/src/ltable.o lua-5.1.4/src/ltablib.o lua-5.1.4/src/ltm.o \ + lua-5.1.4/src/lundump.o lua-5.1.4/src/lvm.o \ + lua-5.1.4/src/lzio.o lua-5.1.4/src/print.o" + AC_SUBST(LIBLUA_OBJ0) +fi + SMB_LIBRARY(netapi, 0) SMB_LIBRARY(smbclient, 0) SMB_LIBRARY(smbsharemodes, 0) -SMB_LIBRARY(lua, 0) SMB_LIBRARY(addns, 0, no, [undefined API]) |