--- luasocket-2.0.2/config	2007-10-14 21:21:05.000000000 -0700
+++ luasocket-2.0.2/config	2009-07-17 22:12:41.000000000 -0700
@@ -18,6 +18,7 @@
 #LUAINC=-I/usr/local/include/lua50
 #LUAINC=-I/usr/local/include/lua5.1
 #LUAINC=-Ilua-5.1.1/src
+LUAINC=-I/usr/local/include
 
 #------
 # Compat-5.1 directory
@@ -30,8 +31,8 @@
 #
 #INSTALL_TOP_SHARE=/usr/local/share/lua/5.0
 #INSTALL_TOP_LIB=/usr/local/lib/lua/5.0
-INSTALL_TOP_SHARE=/usr/local/share/lua/5.1
-INSTALL_TOP_LIB=/usr/local/lib/lua/5.1
+INSTALL_TOP_SHARE=/var/tmp/luasocket-2.0.2/share/lua/5.1
+INSTALL_TOP_LIB=/var/tmp/luasocket-2.0.2/lib/lua/5.1
 
 INSTALL_DATA=cp
 INSTALL_EXEC=cp
@@ -49,11 +50,11 @@
 #------
 # Compiler and linker settings
 # for Linux
-CC=gcc
+CC=$AVR32/bin/avr32-linux-gcc
 DEF=-DLUASOCKET_DEBUG 
 CFLAGS= $(LUAINC) $(DEF) -pedantic -Wall -O2 -fpic
 LDFLAGS=-O -shared -fpic
-LD=gcc 
+LD=$AVR32/bin/avr32-linux-gcc
 
 #------
 # End of makefile configuration


--- luasocket-2.0.2/makefile	2007-10-14 21:21:05.000000000 -0700
+++ luasocket-2.0.2/makefile	2009-07-17 22:13:50.000000000 -0700
@@ -39,12 +39,11 @@
 	cd src; $(INSTALL_DATA) $(TO_TOP_SHARE) $(INSTALL_TOP_SHARE)
 	cd src; mkdir -p $(INSTALL_SOCKET_SHARE)
 	cd src; $(INSTALL_DATA) $(TO_SOCKET_SHARE) $(INSTALL_SOCKET_SHARE)
-	cd src; mkdir -p $(INSTALL_SOCKET_LIB)
-	cd src; $(INSTALL_EXEC) $(SOCKET_SO) $(INSTALL_SOCKET_LIB)/core.$(EXT)
+	cd src; mkdir -p $(INSTALL_TOP_LIB)
+	cd src; $(INSTALL_EXEC) $(SOCKET_SO) $(INSTALL_SOCKET_LIB)core.$(EXT)
 	#cd src; mkdir -p $(INSTALL_MIME_SHARE)
 	#cd src; $(INSTALL_DATA) $(TO_MIME_SHARE) $(INSTALL_MIME_SHARE)
-	cd src; mkdir -p $(INSTALL_MIME_LIB)
-	cd src; $(INSTALL_EXEC) $(MIME_SO) $(INSTALL_MIME_LIB)/core.$(EXT)
+	cd src; $(INSTALL_EXEC) $(MIME_SO) $(INSTALL_MIME_LIB)core.$(EXT)
 
 #------
 # End of makefile


--- luasocket-2.0.2/src/luasocket.c	2007-10-14 21:21:05.000000000 -0700
+++ luasocket-2.0.2/src/luasocket.c	2009-07-17 22:08:08.000000000 -0700
@@ -110,7 +110,7 @@
 /*-------------------------------------------------------------------------*\
 * Initializes all library modules.
 \*-------------------------------------------------------------------------*/
-LUASOCKET_API int luaopen_socket_core(lua_State *L) {
+LUASOCKET_API int luaopen_socketcore(lua_State *L) {
     int i;
     base_open(L);
     for (i = 0; mod[i].name; i++) mod[i].func(L);


--- luasocket-2.0.2/src/luasocket.h	2007-10-14 21:21:05.000000000 -0700
+++ luasocket-2.0.2/src/luasocket.h	2009-07-17 22:08:54.000000000 -0700
@@ -27,6 +27,6 @@
 /*-------------------------------------------------------------------------*\
 * Initializes the library.
 \*-------------------------------------------------------------------------*/
-LUASOCKET_API int luaopen_socket_core(lua_State *L);
+LUASOCKET_API int luaopen_socketcore(lua_State *L);
 
 #endif /* LUASOCKET_H */


--- luasocket-2.0.2/src/mime.c	2007-10-14 21:21:05.000000000 -0700
+++ luasocket-2.0.2/src/mime.c	2009-07-17 22:08:27.000000000 -0700
@@ -81,7 +81,7 @@
 /*-------------------------------------------------------------------------*\
 * Initializes module
 \*-------------------------------------------------------------------------*/
-MIME_API int luaopen_mime_core(lua_State *L)
+MIME_API int luaopen_mimecore(lua_State *L)
 {
     luaL_openlib(L, "mime", func, 0);
     /* make version string available to scripts */


--- luasocket-2.0.2/src/mime.h	2007-10-14 21:21:05.000000000 -0700
+++ luasocket-2.0.2/src/mime.h	2009-07-17 22:08:43.000000000 -0700
@@ -26,6 +26,6 @@
 #define MIME_API extern
 #endif
 
-MIME_API int luaopen_mime_core(lua_State *L);
+MIME_API int luaopen_mimecore(lua_State *L);
 
 #endif /* MIME_H */


--- luasocket-2.0.2/src/mime.lua	2007-10-14 21:21:05.000000000 -0700
+++ luasocket-2.0.2/src/mime.lua	2009-07-17 22:09:09.000000000 -0700
@@ -10,7 +10,7 @@
 -----------------------------------------------------------------------------
 local base = _G
 local ltn12 = require("ltn12")
-local mime = require("mime.core")
+local mime = require("mimecore")
 local io = require("io")
 local string = require("string")
 module("mime")


--- luasocket-2.0.2/src/socket.lua	2007-10-14 21:21:05.000000000 -0700
+++ luasocket-2.0.2/src/socket.lua	2009-07-17 22:09:24.000000000 -0700
@@ -10,7 +10,7 @@
 local base = _G
 local string = require("string")
 local math = require("math")
-local socket = require("socket.core")
+local socket = require("socketcore")
 module("socket")
 
 -----------------------------------------------------------------------------