--- config.orig	Thu Nov 24 17:29:38 2005
+++ config	Mon Aug  7 13:36:23 2006
@@ -15,42 +15,42 @@
 #------
 # Lua includes and libraries
 #
-LUAINC=-Ilua-5.0.2/include
-LUALIB=-Llua-5.0.2/lib
+LUAINC=-I$(LUA_INCDIR)
+LUALIB=-L$(LUA_LIBDIR)
 
 #------
 # Compat-5.1 directory
 #
-COMPAT=compat-5.1r4
+COMPAT=${COMPATDIR}
 
 #------
 # Top of your Lua installation
 # Relative paths will be inside the src tree
 #
-INSTALL_TOP_SHARE=share
-INSTALL_TOP_LIB=lib
+INSTALL_TOP_SHARE=${LUA_MODSHAREDIR}
+INSTALL_TOP_LIB=${LUA_MODLIBDIR}
 
-INSTALL_DATA=cp
-INSTALL_EXEC=cp
+INSTALL_DATA=${BSD_INSTALL_DATA}
+INSTALL_EXEC=${BSD_INSTALL_PROGRAM}
 
 #------
 # Compiler and linker settings
 # for Mac OS X
 #
-CC=gcc
-DEF=-DLUASOCKET_DEBUG -DUNIX_HAS_SUN_LEN
-CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fno-common
-LDFLAGS=-bundle -undefined dynamic_lookup
-LD=export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
+#CC=gcc
+#DEF=-DLUASOCKET_DEBUG -DUNIX_HAS_SUN_LEN
+#CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fno-common
+#LDFLAGS=-bundle -undefined dynamic_lookup
+#LD=export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
 
 #------
 # Compiler and linker settings
 # for Linux
-#CC=gcc
+CC?=gcc
 #DEF=-DLUASOCKET_DEBUG 
-#CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fpic
-#LDFLAGS=-O -shared
-#LD=gcc 
+CFLAGS+= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -fpic
+LDFLAGS=-O -shared
+LD=${CC}
 
 #------
 # End of makefile configuration
