aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-socket/lua-cflags.patch
blob: 57122ec0bcd597bb2b1a72cdb715a2780f0645ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/src/makefile b/src/makefile
index adf687f..c2abddc 100644
--- a/src/makefile
+++ b/src/makefile
@@ -160,6 +160,8 @@ SOCKET_macosx=usocket.o
 #------
 # Compiler and linker settings
 # for Linux
+LUAPC=lua$(LUAV)
+LUA_CFLAGS=$(shell pkg-config --cflags $(LUAPC))
 SO_linux=so
 O_linux=o
 CC_linux=gcc
@@ -167,7 +169,7 @@ DEF_linux=-DLUASOCKET_$(DEBUG) \
 	-DLUASOCKET_API='__attribute__((visibility("default")))' \
 	-DUNIX_API='__attribute__((visibility("default")))' \
 	-DMIME_API='__attribute__((visibility("default")))'
-CFLAGS_linux= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
+CFLAGS_linux= $(LUA_CFLAGS) -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
 	-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
 LDFLAGS_linux=-O -shared -fpic -o 
 LD_linux=gcc