$NetBSD: patch-ac,v 1.5 2014/04/29 20:07:28 wiz Exp $

Prepare @PREFIX@ for substituting the correct one in from the pkgsrc Makefile.

Solaris portability fix.

--- texk/web2c/luatexdir/lua52/luaconf.h.orig	2013-04-05 10:58:37.000000000 +0000
+++ texk/web2c/luatexdir/lua52/luaconf.h
@@ -102,7 +102,7 @@
 #else			/* }{ */
 
 #define LUA_VDIR	LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
-#define LUA_ROOT	"/usr/local/"
+#define LUA_ROOT	"@PREFIX@"
 #define LUA_LDIR	LUA_ROOT "share/lua/" LUA_VDIR
 #define LUA_CDIR	LUA_ROOT "lib/lua/" LUA_VDIR
 #define LUA_PATH_DEFAULT  \
@@ -177,7 +177,7 @@
 ** default definition.
 */
 #if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
-    defined(__ELF__)		/* { */
+    defined(__ELF__) && !defined(__sun)		/* { */
 #define LUAI_FUNC	__attribute__((visibility("hidden"))) extern
 #define LUAI_DDEC	LUAI_FUNC
 #define LUAI_DDEF	/* empty */
