$NetBSD: patch-ac,v 1.2 2012/08/14 11:36:25 obache Exp $

--- texk/web2c/luatexdir/lua51/luaconf.h.orig	2011-05-19 05:38:38.000000000 +0000
+++ texk/web2c/luatexdir/lua51/luaconf.h
@@ -100,7 +100,7 @@
 	".\\?.dll;"  LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
 
 #else
-#define LUA_ROOT	"/usr/local/"
+#define LUA_ROOT	"@PREFIX@/"
 #define LUA_LDIR	LUA_ROOT "share/lua/5.1/"
 #define LUA_CDIR	LUA_ROOT "lib/lua/5.1/"
 #define LUA_PATH_DEFAULT  \
@@ -189,7 +189,7 @@
 #define LUAI_DATA	/* empty */
 
 #elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
-      defined(__ELF__)
+      defined(__ELF__) && !defined(__sun__)
 #define LUAI_FUNC	__attribute__((visibility("hidden"))) extern
 #define LUAI_DATA	LUAI_FUNC
 
