OPENBUS-3112 Correção da linkedição com iconv no MacOSX

(cherry picked from commit 681144f7)
parent 3fd71a6c
......@@ -3,6 +3,7 @@
#include "lua.h"
#include "lauxlib.h"
#include "luaiconv.h"
#include "luuid.h"
#include "lce.h"
#include "lfs.h"
......@@ -137,6 +138,7 @@ void luapreload_extralibraries(lua_State *L)
#else
luaL_findtable(L, LUA_GLOBALSINDEX, "package.preload", 1);
#endif
lua_pushcfunction(L,luaopen_iconv);lua_setfield(L,-2,"iconv");
lua_pushcfunction(L,luaopen_uuid);lua_setfield(L,-2,"uuid");
lua_pushcfunction(L,luaopen_lfs);lua_setfield(L,-2,"lfs");
lua_pushcfunction(L,luaopen_vararg);lua_setfield(L,-2,"vararg");
......
......@@ -43,8 +43,8 @@ LIBS:= \
loop \
luacothread \
luaidl \
oil \
luaiconv \
oil \
luavararg \
lfs \
luuid \
......@@ -111,21 +111,25 @@ ifeq "$(TEC_SYSNAME)" "SunOS"
LFLAGS= $(CFLAGS) -xildoff
endif
ifdef USE_STATIC
SLIB:= $(foreach libname, $(LIBS) uuid crypto, ${OPENBUS_HOME}/lib/lib$(libname).a)
ifeq "$(TEC_SYSNAME)" "SunOS"
LIBS:= rt nsl socket resolv
ifeq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
ifdef USE_STATIC
SLIB:= $(foreach libname, $(LIBS) uuid crypto, ${OPENBUS_HOME}/lib/lib$(libname).a)
ifeq "$(TEC_SYSNAME)" "SunOS"
LIBS:= rt nsl socket resolv
else
LIBS:=
endif
else
LIBS:=
endif
else
ifeq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
ifneq "$(TEC_SYSNAME)" "Darwin"
ifeq ($(findstring $(TEC_SYSNAME), MacOS, Darwin), )
LIBS+= uuid
endif
endif
endif
ifneq ($(findstring $(TEC_SYSNAME), MacOS, Darwin), )
LIBS+= iconv
endif
ifneq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
APPTYPE= console
LIBS+= wsock32 rpcrt4
......
......@@ -52,8 +52,8 @@ LIBS:= \
loop \
luacothread \
luaidl \
oil \
luaiconv \
oil \
luavararg \
lfs \
luuid \
......@@ -126,21 +126,25 @@ ifeq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
LIBS+= lualdap
endif
ifdef USE_STATIC
SLIB:= $(foreach libname, $(LIBS) uuid ldap lber ssl crypto, ${OPENBUS_HOME}/lib/lib$(libname).a)
ifeq "$(TEC_SYSNAME)" "SunOS"
LIBS:= rt nsl socket resolv
ifeq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
ifdef USE_STATIC
SLIB:= $(foreach libname, $(LIBS) uuid ldap lber ssl crypto, ${OPENBUS_HOME}/lib/lib$(libname).a)
ifeq "$(TEC_SYSNAME)" "SunOS"
LIBS:= rt nsl socket resolv
else
LIBS:=
endif
else
LIBS:=
endif
else
ifeq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
ifneq "$(TEC_SYSNAME)" "Darwin"
ifeq ($(findstring $(TEC_SYSNAME), MacOS, Darwin), )
LIBS+= uuid
endif
endif
endif
ifneq ($(findstring $(TEC_SYSNAME), MacOS, Darwin), )
LIBS+= iconv
endif
ifneq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
APPTYPE= console
LIBS+= wsock32 rpcrt4
......
......@@ -3,6 +3,7 @@
#include "lua.h"
#include "lauxlib.h"
#include "luaiconv.h"
#include "luuid.h"
#include "lce.h"
#include "lfs.h"
......@@ -34,6 +35,7 @@ void luapreload_extralibraries(lua_State *L)
#else
luaL_findtable(L, LUA_GLOBALSINDEX, "package.preload", 1);
#endif
lua_pushcfunction(L,luaopen_iconv);lua_setfield(L,-2,"iconv");
lua_pushcfunction(L,luaopen_uuid);lua_setfield(L,-2,"uuid");
lua_pushcfunction(L,luaopen_lfs);lua_setfield(L,-2,"lfs");
#ifndef _WIN32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment