]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
BuildSystem: Add NetBSD.
authorAlexander Traud <pabstraud@compuserve.com>
Thu, 8 Mar 2018 15:14:11 +0000 (16:14 +0100)
committerAlexander Traud <pabstraud@compuserve.com>
Fri, 9 Mar 2018 16:10:09 +0000 (10:10 -0600)
Headers, libraries, and rpath.

ASTERISK-27728
ASTERISK-11015
Reported by: Curt Sampson

Change-Id: I50aa5fcd095937df32a2e33307caac7e79a8b5b7

Makefile
configure
configure.ac

index 4e6072e3a12051b6ee64ba5b58d2e40a20d65ae4..2078e608de2ccd81d869764cc33ee1e7be5fb929 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -217,7 +217,9 @@ ifeq ($(AST_DEVMODE),yes)
   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
 
@@ -282,7 +284,9 @@ else
 # 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
index 2456b0ca94da59e5f1f5f62bc6c669c46177f648..0532fba2934cdeb29f7cd2108bbafd6a0e1cdddb 100755 (executable)
--- a/configure
+++ b/configure
@@ -4667,6 +4667,11 @@ case "${host_os}" in
 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
@@ -18554,6 +18559,9 @@ fi
 { $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; }
index 571987c0b721a532b472d6c7c22d6878d85b2c9d..c5e7f058bb3730838ad03e87d6636772d5e2d647 100644 (file)
@@ -62,6 +62,11 @@ case "${host_os}" in
 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
@@ -1298,6 +1303,9 @@ AC_ARG_ENABLE(rpath,
 
 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