$OpenBSD: patch-Makefile,v 1.23 2010/01/17 13:18:36 sthen Exp $
--- Makefile.orig	Thu Dec 10 21:02:59 2009
+++ Makefile	Fri Jan 15 16:13:10 2010
@@ -118,7 +118,7 @@ ASTTOPDIR:=$(subst $(space),\$(space),$(CURDIR))
 OVERWRITE=y
 
 # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
-DEBUG=-g3
+#DEBUG=-g3
 
 
 # Define standard directories for various platforms
@@ -180,8 +180,10 @@ HTTP_CGIDIR=/var/www/cgi-bin
 # The file /etc/asterisk.makeopts will also be included but can be overridden
 # by the file in your home directory.
 
+ifneq ($(OSARCH),OpenBSD)
 GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
 USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
+endif
 
 MOD_SUBDIR_CFLAGS=-I$(ASTTOPDIR)/include
 OTHER_SUBDIR_CFLAGS=-I$(ASTTOPDIR)/include
@@ -224,7 +226,9 @@ endif
 
 ifeq ($(findstring -save-temps,$(_ASTCFLAGS) $(ASTCFLAGS)),)
   ifeq ($(findstring -pipe,$(_ASTCFLAGS) $(ASTCFLAGS)),)
+    ifneq ($(OSARCH),OpenBSD)
     _ASTCFLAGS+=-pipe
+    endif
   endif
 endif
 
@@ -249,7 +253,9 @@ ifneq ($(findstring BSD,$(OSARCH)),)
 endif
 
 ifneq ($(PROC),ultrasparc)
+  ifneq ($(OSARCH),OpenBSD)
   _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
+  endif
 endif
 
 ifeq ($(PROC),ppc)
@@ -658,7 +664,7 @@ samples: adsi
 		echo "astrundir => $(ASTVARRUNDIR)" ; \
 		echo "astlogdir => $(ASTLOGDIR)" ; \
 		echo "" ; \
-		echo ";[options]" ; \
+		echo "[options]" ; \
 		echo ";verbose = 3" ; \
 		echo ";debug = 3" ; \
 		echo ";alwaysfork = yes ; same as -F at startup" ; \
@@ -685,15 +691,15 @@ samples: adsi
 		echo ";transmit_silence_during_record = yes ; Transmit SLINEAR silence while a channel is being recorded" ; \
 		echo ";transmit_silence = yes ; Transmit SLINEAR silence while a channel is being recorded or DTMF is being generated" ; \
 		echo ";transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of directly" ; \
-		echo ";runuser = asterisk ; The user to run as" ; \
-		echo ";rungroup = asterisk ; The group to run as" ; \
+		echo "runuser = _asterisk ; The user to run as" ; \
+		echo "rungroup = _asterisk ; The group to run as" ; \
 		echo "" ; \
 		echo "; Changing the following lines may compromise your security." ; \
-		echo ";[files]" ; \
-		echo ";astctlpermissions = 0660" ; \
-		echo ";astctlowner = root" ; \
-		echo ";astctlgroup = apache" ; \
-		echo ";astctl = asterisk.ctl" ; \
+		echo "[files]" ; \
+		echo "astctlpermissions = 0660" ; \
+		echo "astctlowner = _asterisk" ; \
+		echo "astctlgroup = wheel" ; \
+		echo "astctl = asterisk.ctl" ; \
 		echo "" ; \
 		echo "[compat]" ; \
 		echo "pbx_realtime=1.6" ; \
