$OpenBSD: patch-system_mk,v 1.4 2004/07/09 21:16:26 naddy Exp $
--- system.mk.orig	Tue Jun  1 16:35:23 2004
+++ system.mk	Fri Jul  9 23:07:44 2004
@@ -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/ion
+ETCDIR=$(PREFIX)/share/examples/ion
 # Some .lua files and ion-* shell scripts
 SHAREDIR=$(PREFIX)/share/ion
 # Manual pages
-MANDIR=$(PREFIX)/share/man
+MANDIR=$(PREFIX)/man
 # Some documents
 DOCDIR=$(PREFIX)/share/doc/ion
+EXAMPLEDIR=$(PREFIX)/share/examples/ion
 # Nothing at the moment
-INCDIR=$(PREFIX)/include/ion
+INCDIR=$(PREFIX)/include
 # Nothing at the moment
 LIBDIR=$(PREFIX)/lib
 # Modules
@@ -56,10 +57,10 @@ LTDL_LIBS=-lltdl
 # autoconf-expecting wrapper. If you also set PRELOAD_MODULES=1 and disable
 # Xinerama support below, Ion should compile on Cygwin.
 #
-#LIBTOOLDIR=/usr/local/stow/libtool-1.5
-#LIBTOOL=$(LIBTOOLDIR)/bin/libtool
-#LTDL_INCLUDES=-I$(LIBTOOLDIR)/include
-#LTDL_LIBS=-L$(LIBTOOLDIR)/lib -lltdl
+LIBTOOLDIR=/usr/local
+LIBTOOL=$(LIBTOOLDIR)/bin/libtool
+LTDL_INCLUDES=-I$(LIBTOOLDIR)/share/libtool/libltdl
+LTDL_LIBS=-L$(LIBTOOLDIR)/lib -lltdl
 
 # Set PRELOAD_MODULES=1 if your system does not support dynamically loaded
 # modules. 
@@ -90,7 +91,7 @@ LUAC=$(LUA_DIR)/bin/luac
 ## X libraries, includes and options
 ##
 
-X11_PREFIX=/usr/X11R6
+X11_PREFIX=$(X11BASE)
 # SunOS/Solaris
 #X11_PREFIX=/usr/openwin
 
@@ -119,29 +120,29 @@ 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)
 # without even dummy multibyte/widechar support, you may have to uncomment
 # the following line:
-#DEFINES += -DCF_NO_MB_SUPPORT
+DEFINES += -DCF_NO_MB_SUPPORT
 
 
 ##
 ## 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)
 
 # The following options are mainly for development use and can be used
 # to check that the code seems to conform to some standards. Depending
