[Asterisk-code-review] BuildSystem: Avoid an extra case for OpenBSD. (asterisk[master])

George Joseph asteriskteam at digium.com
Mon Mar 19 11:15:51 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/8549 )

Change subject: BuildSystem: Avoid an extra case for OpenBSD.
......................................................................

BuildSystem: Avoid an extra case for OpenBSD.

Nine years ago with Mantis 13639 (now ASTERISK-12841) an extra case for OpenBSD
was introduced: Vorbis required Ogg to be specified manually, because the shared
library libvorbis.so did not specify its required dependency on -logg itself.

Today with OpenBSD 6.2, all libvorbis*.so declare their dependencies correctly.
Therefore, an extra case is not required anymore.

Change-Id: Ifd04e0994ce9f1e4ad29c3948a0398b91d1e97bc
---
M configure
M configure.ac
2 files changed, 1 insertion(+), 106 deletions(-)

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



diff --git a/configure b/configure
index afe61aa..7daf585 100755
--- a/configure
+++ b/configure
@@ -33282,105 +33282,6 @@
 
 
 
-if test "${OSARCH}" = "OpenBSD";
-then
-
-if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then
-   pbxlibdir=""
-   # if --with-VORBIS=DIR has been specified, use it.
-   if test "x${VORBIS_DIR}" != "x"; then
-      if test -d ${VORBIS_DIR}/lib; then
-         pbxlibdir="-L${VORBIS_DIR}/lib"
-      else
-         pbxlibdir="-L${VORBIS_DIR}"
-      fi
-   fi
-
-      ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
-      CFLAGS="${CFLAGS} "
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vorbis_info_init in -lvorbis" >&5
-$as_echo_n "checking for vorbis_info_init in -lvorbis... " >&6; }
-if ${ac_cv_lib_vorbis_vorbis_info_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lvorbis ${pbxlibdir} -lm -lvorbisenc -lvorbisfile -logg $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char vorbis_info_init ();
-int
-main ()
-{
-return vorbis_info_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_vorbis_vorbis_info_init=yes
-else
-  ac_cv_lib_vorbis_vorbis_info_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vorbis_vorbis_info_init" >&5
-$as_echo "$ac_cv_lib_vorbis_vorbis_info_init" >&6; }
-if test "x$ac_cv_lib_vorbis_vorbis_info_init" = xyes; then :
-  AST_VORBIS_FOUND=yes
-else
-  AST_VORBIS_FOUND=no
-fi
-
-      CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-
-
-   # now check for the header.
-   if test "${AST_VORBIS_FOUND}" = "yes"; then
-      VORBIS_LIB="${pbxlibdir} -lvorbis -lm -lvorbisenc -lvorbisfile -logg"
-      # if --with-VORBIS=DIR has been specified, use it.
-      if test "x${VORBIS_DIR}" != "x"; then
-         VORBIS_INCLUDE="-I${VORBIS_DIR}/include"
-      fi
-      VORBIS_INCLUDE="${VORBIS_INCLUDE} "
-
-         # check for the header
-         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
-         CPPFLAGS="${CPPFLAGS} ${VORBIS_INCLUDE}"
-         ac_fn_c_check_header_mongrel "$LINENO" "vorbis/codec.h" "ac_cv_header_vorbis_codec_h" "$ac_includes_default"
-if test "x$ac_cv_header_vorbis_codec_h" = xyes; then :
-  VORBIS_HEADER_FOUND=1
-else
-  VORBIS_HEADER_FOUND=0
-fi
-
-
-         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-
-      if test "x${VORBIS_HEADER_FOUND}" = "x0" ; then
-         VORBIS_LIB=""
-         VORBIS_INCLUDE=""
-      else
-
-         PBX_VORBIS=1
-         cat >>confdefs.h <<_ACEOF
-#define HAVE_VORBIS 1
-_ACEOF
-
-      fi
-   fi
-fi
-
-
-else
 
 if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then
    pbxlibdir=""
@@ -33477,7 +33378,6 @@
 fi
 
 
-fi
 
     if test "x${PBX_VORBIS_OPEN_CALLBACKS}" != "x1" -a "${USE_VORBIS_OPEN_CALLBACKS}" != "no"; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OV_CALLBACKS_NOCLOSE declared in vorbis/vorbisfile.h" >&5
diff --git a/configure.ac b/configure.ac
index 4b9b830..8870892 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2567,12 +2567,7 @@
 
 AST_EXT_LIB_CHECK([TONEZONE], [tonezone], [tone_zone_find], [dahdi/tonezone.h], [${tonezone_extra} ${DAHDI_INCLUDE}])
 
-if test "${OSARCH}" = "OpenBSD";
-then
-	AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc -lvorbisfile -logg])
-else
-	AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc -lvorbisfile])
-fi
+AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc -lvorbisfile])
 AST_C_DECLARE_CHECK([VORBIS_OPEN_CALLBACKS], [OV_CALLBACKS_NOCLOSE], [vorbis/vorbisfile.h])
 
 AC_LANG_PUSH(C++)

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd04e0994ce9f1e4ad29c3948a0398b91d1e97bc
Gerrit-Change-Number: 8549
Gerrit-PatchSet: 2
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/20180319/5e050581/attachment.html>


More information about the asterisk-code-review mailing list