[Asterisk-code-review] BuildSystem: Add NetBSD. (asterisk[13])

Joshua Colp asteriskteam at digium.com
Wed Mar 14 06:07:48 CDT 2018


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/8478 )

Change subject: BuildSystem: Add NetBSD.
......................................................................

BuildSystem: Add NetBSD.

Headers, libraries, and rpath.

ASTERISK-27728
ASTERISK-11015
Reported by: Curt Sampson

Change-Id: I50aa5fcd095937df32a2e33307caac7e79a8b5b7
---
M Makefile
M configure
M configure.ac
3 files changed, 22 insertions(+), 2 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/Makefile b/Makefile
index c0138db..2f7c5bc 100644
--- a/Makefile
+++ b/Makefile
@@ -218,7 +218,9 @@
   endif
 endif
 
-ifneq ($(findstring BSD,$(OSARCH)),)
+ifeq ($(OSARCH),NetBSD)
+  _ASTCFLAGS+=-isystem /usr/pkg/include
+else ifneq ($(findstring BSD,$(OSARCH)),)
   _ASTCFLAGS+=-isystem /usr/local/include
 endif
 
@@ -283,7 +285,9 @@
 # These are used for all but Darwin
   SOLINK=-shared
   DYLINK=$(SOLINK)
-  ifneq ($(findstring BSD,$(OSARCH)),)
+  ifeq ($(OSARCH),NetBSD)
+    _ASTLDFLAGS+=-L/usr/pkg/lib
+  else ifneq ($(findstring BSD,$(OSARCH)),)
     _ASTLDFLAGS+=-L/usr/local/lib
   endif
 endif
diff --git a/configure b/configure
index 3442d57..91c6452 100755
--- a/configure
+++ b/configure
@@ -4631,6 +4631,11 @@
 esac
 
 case "${host_os}" in
+     netbsd*)
+     ac_default_prefix=/usr/pkg
+     CPPFLAGS=-I/usr/pkg/include
+     LDFLAGS=-L/usr/pkg/lib
+     ;;
      freebsd*)
      ac_default_prefix=/usr/local
      CPPFLAGS=-I/usr/local/include
@@ -18297,6 +18302,9 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use rpath" >&5
 $as_echo_n "checking whether to use rpath... " >&6; }
 AST_RPATH=
+if test "${OSARCH}" = "NetBSD"; then
+	AST_RPATH="-Wl,-rpath,/usr/pkg/lib"
+fi
 if test "${check_rpath}" != yes; then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: skipped" >&5
 $as_echo "skipped" >&6; }
diff --git a/configure.ac b/configure.ac
index d9148c0..bd20728 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,6 +62,11 @@
 esac
 
 case "${host_os}" in
+     netbsd*)
+     ac_default_prefix=/usr/pkg
+     CPPFLAGS=-I/usr/pkg/include
+     LDFLAGS=-L/usr/pkg/lib
+     ;;
      freebsd*)
      ac_default_prefix=/usr/local
      CPPFLAGS=-I/usr/local/include
@@ -1266,6 +1271,9 @@
 
 AC_MSG_CHECKING(whether to use rpath)
 AST_RPATH=
+if test "${OSARCH}" = "NetBSD"; then
+	AST_RPATH="-Wl,-rpath,/usr/pkg/lib"
+fi
 if test "${check_rpath}" != yes; then
 	AC_MSG_RESULT(skipped)
 elif test "${prefix}" = /usr || test "${prefix}" = NONE; then

-- 
To view, visit https://gerrit.asterisk.org/8478
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I50aa5fcd095937df32a2e33307caac7e79a8b5b7
Gerrit-Change-Number: 8478
Gerrit-PatchSet: 3
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180314/32410e92/attachment.html>


More information about the asterisk-code-review mailing list