From a8b19e5367738f606a051f254858dc09de2a695a Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Tue, 27 Sep 2011 12:26:38 -0700 Subject: [PATCH] OS X CFLAGS definition caused silent failure to build debug version of luasocket. The luasocket tests require LUASOCKET_DEBUG to be defined at build time, but for OS X if COMPAT was undefined, the command line looked like ... -I -DLUASOCKET_DEBUG ... so that the the macro definition was silently being treated as the argument to -I. Result is the macro was never set, and tests would never run. Fixed by moving -I to the (optional) definition of the location of compat headers. --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index bef8d72..d6085ad 100644 --- a/config +++ b/config @@ -23,7 +23,7 @@ LUAINC=-I/usr/include/lua5.1 #------ # Compat-5.1 directory # -#COMPAT=compat-5.1r5 +#COMPAT=-Icompat-5.1r5 #------ # Top of your Lua installation @@ -47,7 +47,7 @@ INSTALL_EXEC=cp # #CC=gcc #DEF= -DLUASOCKET_DEBUG -DUNIX_HAS_SUN_LEN -#CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fno-common +#CFLAGS= $(LUAINC) $(COMPAT) $(DEF) -pedantic -Wall -O2 -fno-common #LDFLAGS=-bundle -undefined dynamic_lookup #LD=export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc @@ -56,7 +56,7 @@ INSTALL_EXEC=cp # for Linux CC=gcc DEF=-DLUASOCKET_DEBUG -CFLAGS= $(LUAINC) $(DEF) -pedantic -Wall -O2 -fpic +CFLAGS= $(LUAINC) $(COMPAT) $(DEF) -pedantic -Wall -O2 -fpic LDFLAGS=-O -shared -fpic LD=gcc