$OpenBSD: patch-system_mk,v 1.6 2005/12/04 16:26:20 pedro Exp $
--- system.mk.orig	Sat Oct 29 10:33:25 2005
+++ system.mk	Fri Dec  2 21:06:08 2005
@@ -7,7 +7,7 @@
 ## Installation paths
 ##
 
-PREFIX=/usr/local
+#PREFIX=/usr/local
 
 # Unless you are creating a package conforming to some OS's standards, you
 # probably do not want to modify the following directories:
@@ -15,15 +15,16 @@ PREFIX=/usr/local
 # Main binaries
 BINDIR=$(PREFIX)/bin
 # Configuration .lua files
-ETCDIR=$(PREFIX)/etc/ion3
+ETCDIR=$(PREFIX)/share/examples/ion3
 # Some .lua files and ion-* shell scripts
 SHAREDIR=$(PREFIX)/share/ion3
 # Manual pages
-MANDIR=$(PREFIX)/share/man
+MANDIR=$(PREFIX)/man
 # Some documents
 DOCDIR=$(PREFIX)/share/doc/ion3
+EXAMPLEDIR=$(PREFIX)/share/examples/ion3
 # Nothing at the moment
-INCDIR=$(PREFIX)/include/ion3
+INCDIR=$(PREFIX)/include
 # Nothing at the moment
 LIBDIR=$(PREFIX)/lib
 # Modules
@@ -47,7 +48,7 @@ LOCALEDIR=$(PREFIX)/share/locale
 #PRELOAD_MODULES=1
 
 # Flags to link with libdl.
-DL_LIBS=-ldl
+#DL_LIBS=-ldl
 
 
 ##
@@ -74,7 +75,7 @@ LUAC=$(LUA_DIR)/bin/luac
 ## X libraries, includes and options
 ##
 
-X11_PREFIX=/usr/X11R6
+X11_PREFIX=$(X11BASE)
 # SunOS/Solaris
 #X11_PREFIX=/usr/openwin
 
@@ -88,7 +89,7 @@ XINERAMA_LIBS=-lXinerama
 # XFree86 libraries up to 4.3.0 have a bug that will cause Ion to segfault
 # if Opera is used when i18n support is enabled. The following setting
 # should work around that situation.
-DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND
+#DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND
 
 # Use the Xutf8 routines (XFree86 extension) instead of Xmb routines in
 # an UTF8 locale given the -i18n command line option?
@@ -107,7 +108,7 @@ DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WOR
 # asprintf and vasprintf in the c library. (gnu libc has.)
 # If HAS_SYSTEM_ASPRINTF is not defined, an implementation
 # in sprintf_2.2/ is used.
-#HAS_SYSTEM_ASPRINTF=1
+HAS_SYSTEM_ASPRINTF=1
 
 
 # If you're on an archaic system (such as relatively recent *BSD releases)
@@ -116,24 +117,24 @@ DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WOR
 #DEFINES += -DCF_NO_LOCALE
 
 # On some other systems you may something like this:
-#EXTRA_LIBS += -lintl
-#EXTRA_INCLUDES +=
+EXTRA_LIBS += -L$(LOCALBASE)/lib -lintl -liconv
+EXTRA_INCLUDES += -I$(LOCALBASE)/include
 
 
 ##
 ## C compiler
 ##
 
-CC=gcc
+#CC=gcc
 
 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
 # have unused variables.
-WARN=	-W -Wimplicit -Wreturn-type -Wswitch -Wcomment \
-	-Wtrigraphs -Wformat -Wchar-subscripts \
-	-Wparentheses -pedantic -Wuninitialized
+#WARN=	-W -Wimplicit -Wreturn-type -Wswitch -Wcomment \
+#	-Wtrigraphs -Wformat -Wchar-subscripts \
+#	-Wparentheses -pedantic -Wuninitialized
 
-CFLAGS=-g -Os $(WARN) $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
-LDFLAGS=-g -Os $(EXTRA_LIBS) $(LIBS)
+CFLAGS+= $(WARN) $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
+LDFLAGS+= $(EXTRA_LIBS) $(LIBS)
 EXPORT_DYNAMIC=-Xlinker --export-dynamic
 
 # The following options are mainly for development use and can be used
