openbsd-ports/telephony/asterisk/patches/patch-cdr_Makefile
2004-09-26 00:38:23 +00:00

53 lines
1.9 KiB
Plaintext

$OpenBSD: patch-cdr_Makefile,v 1.1.1.1 2004/09/26 00:38:24 jolan Exp $
--- cdr/Makefile.orig Tue Aug 31 11:33:00 2004
+++ cdr/Makefile Thu Sep 23 16:44:54 2004
@@ -29,26 +29,33 @@ endif
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
#So we go lowest common available by gcc and go a step down, still a step up from
#the default as we now have a better instruction set to work with. - Belgarath
+ifneq (${OSARCH},OpenBSD)
ifeq ($(PROC),sparc64)
PROC=ultrasparc
CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
endif
+endif
#
# unixODBC stuff...
#
+ifneq (${OSARCH},OpenBSD)
MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "cdr_odbc.so"; fi)
MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "cdr_odbc.so"; fi)
+endif
#
# FreeTDS stuff...
#
+ifneq (${OSARCH},OpenBSD)
MODS+=$(shell if [ -f "/usr/include/tds.h" ]; then echo "cdr_tds.so"; fi)
MODS+=$(shell if [ -f "/usr/local/include/tds.h" ]; then echo "cdr_tds.so"; fi)
+endif
#
# PGSQL stuff... Autoconf anyone??
#
+ifneq (${OSARCH},OpenBSD)
MODS+=$(shell if [ -d /usr/local/pgsql/include ] || [ -d /usr/include/pgsql ] || [ -d /usr/local/include/pgsql ] || [ -d /opt/pgsql/include ] || [ -f /usr/include/libpq-fe.h ] ; then echo "cdr_pgsql.so"; fi)
CFLAGS+=$(shell if [ -d /usr/local/pgsql/include ]; then echo "-I/usr/local/pgsql/include"; fi)
CFLAGS+=$(shell if [ -d /usr/include/pgsql ]; then echo "-I/usr/include/pgsql"; fi)
@@ -62,11 +69,14 @@ MLFLAGS+=$(shell if [ -d /usr/local/pgsq
MLFLAGS+=$(shell if [ -d /usr/local/lib/pgsql ]; then echo "-L/usr/local/lib/pgsql"; fi)
MLFLAGS+=$(shell if [ -d /opt/pgsql/lib ]; then echo "-L/opt/pgsql/lib"; fi)
MLFLAGS+=$(shell if [ -f /usr/lib/libpq.so ]; then echo "-L/usr/lib"; fi)
+endif
#
# SQLIte stuff...
#
+ifneq (${OSARCH},OpenBSD)
MODS+=$(shell if [ -f "/usr/include/sqlite.h" ]; then echo "cdr_sqlite.so"; fi)
+endif
all: depend $(MODS)