We are failing to use the system dirname function because we are not correctly flagging that we found it. Modify opal_search_libs_core to set an "opal_have_foo" flag to indicate that we found the specified function, and then modify the have_dirname check to look for it.
cmr=v1.8.3:reviewer=jsquyres This commit was SVN r32669.
Этот коммит содержится в:
родитель
41c6058153
Коммит
ec51cbab9f
@ -1,6 +1,7 @@
|
||||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
@ -24,16 +25,22 @@ AC_DEFUN([OPAL_SEARCH_LIBS_CORE],[
|
||||
m4_ifdef([mca_component_configure_active],
|
||||
[m4_fatal([*** OPAL_SEARCH_LIBS_CORE cannot be called from a component configure.m4])])
|
||||
|
||||
OPAL_VAR_SCOPE_PUSH([LIBS_save add])
|
||||
OPAL_VAR_SCOPE_PUSH([LIBS_save add uppername])
|
||||
LIBS_save=$LIBS
|
||||
|
||||
AC_MSG_CHECKING([for $1 in lib $2])
|
||||
AC_SEARCH_LIBS([$1], [$2],
|
||||
[ # Found it! See if anything was added to LIBS
|
||||
add=`printf '%s\n' "$LIBS" | sed -e "s/$LIBS_save$//"`
|
||||
AS_IF([test -n "$add"],
|
||||
[OPAL_WRAPPER_FLAGS_ADD([LIBS], [$add])])
|
||||
uppername=m4_toupper($1)
|
||||
AC_DEFINE_UNQUOTED([OPAL_HAVE_$uppername], [1],
|
||||
[whether $1 is found and available])
|
||||
AC_MSG_RESULT([found...and set OPAL_HAVE_$uppername])
|
||||
$3],
|
||||
[$4], [$5])
|
||||
[AC_MSG_RESULT([not found])
|
||||
$4], [$5])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])dnl
|
||||
|
@ -871,7 +871,7 @@ OPAL_SEARCH_LIBS_CORE([socket], [socket])
|
||||
# Solaris has sched_yield in -lrt, usually in libc
|
||||
OPAL_SEARCH_LIBS_CORE([sched_yield], [rt])
|
||||
|
||||
# IRIX has dirname in -lgen, usually in libc
|
||||
# IRIX and CentOS have dirname in -lgen, usually in libc
|
||||
OPAL_SEARCH_LIBS_CORE([dirname], [gen])
|
||||
|
||||
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
|
||||
|
@ -12,6 +12,7 @@
|
||||
* Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -100,7 +101,7 @@ char *opal_basename(const char *filename)
|
||||
|
||||
char* opal_dirname(const char* filename)
|
||||
{
|
||||
#if defined(HAVE_DIRNAME)
|
||||
#if defined(HAVE_DIRNAME) || defined(OPAL_HAVE_DIRNAME)
|
||||
char* safe_tmp = strdup(filename), *result;
|
||||
result = strdup(dirname(safe_tmp));
|
||||
free(safe_tmp);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user