[ 
https://issues.apache.org/jira/browse/TS-4821?focusedWorklogId=28354&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-28354
 ]

ASF GitHub Bot logged work on TS-4821:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Sep/16 20:37
            Start Date: 07/Sep/16 20:37
    Worklog Time Spent: 10m 
      Work Description: Github user jpeach commented on a diff in the pull 
request:

    https://github.com/apache/trafficserver/pull/981#discussion_r77898778
  
    --- Diff: build/hwloc.m4 ---
    @@ -0,0 +1,105 @@
    +dnl -------------------------------------------------------- -*- autoconf 
-*-
    +dnl Licensed to the Apache Software Foundation (ASF) under one or more
    +dnl contributor license agreements.  See the NOTICE file distributed with
    +dnl this work for additional information regarding copyright ownership.
    +dnl The ASF licenses this file to You under the Apache License, Version 2.0
    +dnl (the "License"); you may not use this file except in compliance with
    +dnl the License.  You may obtain a copy of the License at
    +dnl
    +dnl     http://www.apache.org/licenses/LICENSE-2.0
    +dnl
    +dnl Unless required by applicable law or agreed to in writing, software
    +dnl distributed under the License is distributed on an "AS IS" BASIS,
    +dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
    +dnl See the License for the specific language governing permissions and
    +dnl limitations under the License.
    +
    +dnl
    +dnl hwloc.m4: Trafficserver's hwloc autoconf macros
    +dnl
    +
    +dnl
    +dnl TS_CHECK_HWLOC: look for hwloc libraries and headers
    +dnl
    +AC_DEFUN([TS_CHECK_HWLOC], [
    +hwloc_path_provided=no
    +AC_ARG_WITH(hwloc, [AC_HELP_STRING([--with-hwloc=DIR],[use a specific 
hwloc library])],
    +[
    +  if test "x$withval" != "xyes" && test "x$withval" != "x"; then
    +    hwloc_base_dir="$withval"
    +    if test "$withval" != "no"; then
    +      hwloc_path_provided=yes
    +      case "$withval" in
    +      *":"*)
    +        hwloc_include="`echo $withval |sed -e 's/:.*$//'`"
    +        hwloc_ldflags="`echo $withval |sed -e 's/^.*://'`"
    +        AC_MSG_CHECKING(checking for hwloc includes in $hwloc_include libs 
in $hwloc_ldflags )
    +        ;;
    +      *)
    +        hwloc_include="$withval/include"
    +        hwloc_ldflags="$withval/lib"
    +        AC_MSG_CHECKING(checking for hwloc includes in $withval)
    +        ;;
    +      esac
    +    fi
    +  fi
    +])
    +
    +if test "x$hwloc_path_provided" = "xno"; then
    +  # Use pkg-config, because some distros (*cough* Ubuntu) put hwloc in 
unusual places.
    +  PKG_CHECK_MODULES([HWLOC], [hwloc], [
    +    SAVE_LIBS="$LIBS"
    +    LIBS="-lhwloc"
    +    AC_LANG_PUSH([C++])
    +    AC_MSG_CHECKING([for hwloc C++ linking])
    +    AC_LINK_IFELSE([
    +      AC_LANG_PROGRAM([#include <hwloc.h>],[hwloc_topology_t t; 
hwloc_topology_init(&t); hwloc_get_type_depth(t, HWLOC_OBJ_SOCKET);])],[
    +      AC_SUBST([HWLOC_CFLAGS])
    +      AC_SUBST([HWLOC_LIBS])
    +      AC_MSG_RESULT([yes])
    --- End diff --
    
    You can simplify the ``AC_LINK_IFELSE`` with ``AC_CHECK_LIB``.


Issue Time Tracking
-------------------

    Worklog Id:     (was: 28354)
    Time Spent: 1h  (was: 50m)

> Make hwloc a required dependency
> --------------------------------
>
>                 Key: TS-4821
>                 URL: https://issues.apache.org/jira/browse/TS-4821
>             Project: Traffic Server
>          Issue Type: Task
>          Components: Build
>            Reporter: Phil Sorber
>            Assignee: Phil Sorber
>             Fix For: 7.0.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> hwloc is available on every platform we support. We do a lot of dances in the 
> code to make this optional, and we should probably just require it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to