[Asterisk-code-review] menuselect: Add DragonFly BSD. (asterisk[master])

Jenkins2 asteriskteam at digium.com
Wed Apr 25 13:31:44 CDT 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/8839 )

Change subject: menuselect: Add DragonFly BSD.
......................................................................

menuselect: Add DragonFly BSD.

In DragonFly BSD, added libraries from ports are placed into /usr/local.
Therefore, this directory must be added for the preprocessor, compiler, and
linker.

Beside that, the script ./configure was updated:
* OSARCH list was outdated and not used, removed.
* AC_CANONICAL_BUILD was not used.
* _REENTRANT, this feature test macro is obsolete.

ASTERISK-27820

Change-Id: I186d88d99cfa4de6569888e12ac97bd2f441c422
---
M menuselect/Makefile
M menuselect/autoconfig.h.in
M menuselect/configure
M menuselect/configure.ac
4 files changed, 26 insertions(+), 59 deletions(-)

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



diff --git a/menuselect/Makefile b/menuselect/Makefile
index c2c9373..d949efd 100644
--- a/menuselect/Makefile
+++ b/menuselect/Makefile
@@ -24,6 +24,14 @@
 OBJS:=menuselect.o strcompat.o
 CFLAGS+=-g -D_GNU_SOURCE -Wall
 
+ifneq ($(findstring dragonfly,$(OSARCH)),)
+  CFLAGS += -isystem /usr/local/include
+else ifneq ($(findstring netbsd,$(OSARCH)),)
+  CFLAGS += -isystem /usr/pkg/include
+else ifneq ($(findstring bsd,$(OSARCH)),)
+  CFLAGS += -isystem /usr/local/include
+endif
+
 ifeq ($(MENUSELECT_DEBUG),yes)
   CFLAGS += -DMENUSELECT_DEBUG
 endif
diff --git a/menuselect/autoconfig.h.in b/menuselect/autoconfig.h.in
index 3e1e189..f174551 100644
--- a/menuselect/autoconfig.h.in
+++ b/menuselect/autoconfig.h.in
@@ -3,10 +3,6 @@
 #ifndef MENUSELECT_AUTOCONFIG_H
 #define MENUSELECT_AUTOCONFIG_H
 
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-
 
 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
    systems. This function is required for `alloca.c' support on those systems.
diff --git a/menuselect/configure b/menuselect/configure
index a0aa109..7cbe477 100755
--- a/menuselect/configure
+++ b/menuselect/configure
@@ -2320,33 +2320,18 @@
 HOST_OS=${host_os}
 
 
-PBX_WINARCH=0
 case "${host_os}" in
-     freebsd*)
-     OSARCH=FreeBSD
+     *dragonfly*)
+     CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
+     LDFLAGS="${LDFLAGS} -L/usr/local/lib"
      ;;
-     netbsd*)
-     OSARCH=NetBSD
+     *netbsd*)
+     CPPFLAGS="${CPPFLAGS} -I/usr/pkg/include"
+     LDFLAGS="${LDFLAGS} -L/usr/pkg/lib"
      ;;
-     openbsd*)
-     OSARCH=OpenBSD
-     ;;
-     solaris*)
-     OSARCH=SunOS
-     ;;
-     mingw32)
-     OSARCH=mingw32
-     PBX_WINARCH=1
-     ;;
-     cygwin)
-     OSARCH=cygwin
-     PBX_WINARCH=1
-     ;;
-     linux-gnueabi)
-     OSARCH=linux-gnu
-     ;;
-     *)
-     OSARCH=${host_os}
+     *bsd*)
+     CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
+     LDFLAGS="${LDFLAGS} -L/usr/local/lib"
      ;;
 esac
 
diff --git a/menuselect/configure.ac b/menuselect/configure.ac
index 2dd4ed6..4a2d0ac 100644
--- a/menuselect/configure.ac
+++ b/menuselect/configure.ac
@@ -1,5 +1,3 @@
-# Process this file with autoconf to produce a configure script.
-
 AC_PREREQ(2.59)
 
 m4_define([MENUSELECT_VERSION],
@@ -16,49 +14,29 @@
 
 AC_COPYRIGHT("Menuselect")
 
-AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 
 HOST_OS=${host_os}
 AC_SUBST(HOST_OS)
 
-PBX_WINARCH=0
 case "${host_os}" in
-     freebsd*)
-     OSARCH=FreeBSD
+     *dragonfly*)
+     CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
+     LDFLAGS="${LDFLAGS} -L/usr/local/lib"
      ;;
-     netbsd*)
-     OSARCH=NetBSD
+     *netbsd*)
+     CPPFLAGS="${CPPFLAGS} -I/usr/pkg/include"
+     LDFLAGS="${LDFLAGS} -L/usr/pkg/lib"
      ;;
-     openbsd*)
-     OSARCH=OpenBSD
-     ;;
-     solaris*)
-     OSARCH=SunOS
-     ;;
-     mingw32)
-     OSARCH=mingw32
-     PBX_WINARCH=1
-     ;;
-     cygwin)
-     OSARCH=cygwin
-     PBX_WINARCH=1
-     ;;
-     linux-gnueabi)
-     OSARCH=linux-gnu
-     ;;
-     *)
-     OSARCH=${host_os}
+     *bsd*)
+     CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
+     LDFLAGS="${LDFLAGS} -L/usr/local/lib"
      ;;
 esac
 
 AH_TOP(
 #ifndef MENUSELECT_AUTOCONFIG_H
 #define MENUSELECT_AUTOCONFIG_H
-
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
 )
 
 AH_BOTTOM([#endif])

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I186d88d99cfa4de6569888e12ac97bd2f441c422
Gerrit-Change-Number: 8839
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: 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/20180425/99d39450/attachment-0001.html>


More information about the asterisk-code-review mailing list