From f229dcd1bb67b61bfbf20bfb33e8c04968031c62 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 2 Dec 2014 10:33:06 -0800 Subject: [PATCH 1/2] configury: fix lt_dladvise_init grep test Change the CPPFLAGS to just -I$srcdir, and change the include file to check to be just opal/libltdl/ltdl.h. Do this because the CPPFLAGS are passed to the preprocessor, and the C program that is passed through the preprocessor is basically: #include Using the proper -I covers both VPATH and non-VPATH cases. --- config/opal_setup_libltdl.m4 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/config/opal_setup_libltdl.m4 b/config/opal_setup_libltdl.m4 index f1bea074f6..96244ed9ec 100644 --- a/config/opal_setup_libltdl.m4 +++ b/config/opal_setup_libltdl.m4 @@ -9,7 +9,7 @@ dnl Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. -dnl Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights dnl reserved. @@ -127,6 +127,10 @@ AC_DEFUN([OPAL_SETUP_LIBLTDL],[ AC_SUBST(LIBLTDL) AC_SUBST(LIBLTDL_SUBDIR) + AC_MSG_CHECKING([for lt_dladvise]) + AS_IF([test $OPAL_HAVE_LTDL_ADVISE -eq 1], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_DEFINE_UNQUOTED(OPAL_HAVE_LTDL_ADVISE, $OPAL_HAVE_LTDL_ADVISE, [Whether libltdl appears to have the lt_dladvise interface]) @@ -170,10 +174,8 @@ AC_DEFUN([_OPAL_SETUP_LIBLTDL_INTERNAL],[ OPAL_LIBLTDL_INTERNAL=1 CPPFLAGS_save="$CPPFLAGS" - CPPFLAGS="-I$srcdir/opal/libltdl/" - # Must specifically mention $srcdir here for VPATH builds - # (this file is in the src tree). - AC_EGREP_HEADER([lt_dladvise_init], [$srcdir/opal/libltdl/ltdl.h], + CPPFLAGS="-I$srcdir" + AC_EGREP_HEADER([lt_dladvise_init], [opal/libltdl/ltdl.h], [OPAL_HAVE_LTDL_ADVISE=1]) CPPFLAGS="$CPPFLAGS_save" From ed6c15be892d937e843fc783425f0b9044166d32 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 2 Dec 2014 10:35:54 -0800 Subject: [PATCH 2/2] configury: whitespace and shell quoting cleanup Remove extra whitespace, change foo="$bar" to foo=$bar, and change one instance of "$foo" = "1" to $foo -eq 1. --- config/opal_setup_libltdl.m4 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/config/opal_setup_libltdl.m4 b/config/opal_setup_libltdl.m4 index 96244ed9ec..712f126cfb 100644 --- a/config/opal_setup_libltdl.m4 +++ b/config/opal_setup_libltdl.m4 @@ -5,19 +5,19 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -74,9 +74,9 @@ AC_DEFUN([OPAL_SETUP_LIBLTDL],[ libltdl_location= libltdl_need_external=1 ;; - *) + *) AC_MSG_RESULT([external copy ($libltdl_location)]) - OPAL_CHECK_WITHDIR([libltdl], [$libltdl_location], + OPAL_CHECK_WITHDIR([libltdl], [$libltdl_location], [include/ltdl.h]) # If we're using an extern libltdl, then reset the # LTDLINCL that was set earlier (ie., there's no need to @@ -139,7 +139,7 @@ AC_DEFUN([OPAL_SETUP_LIBLTDL],[ AC_DEFINE_UNQUOTED(OPAL_LIBLTDL_INTERNAL, $OPAL_LIBLTDL_INTERNAL, [Whether we are using the internal libltdl or not]) - AM_CONDITIONAL(OPAL_HAVE_DLOPEN, + AM_CONDITIONAL(OPAL_HAVE_DLOPEN, [test "$OPAL_ENABLE_DLOPEN_SUPPORT" = "1"]) OPAL_VAR_SCOPE_POP([HAPPY]) ])dnl @@ -163,21 +163,21 @@ AC_DEFUN([_OPAL_SETUP_LIBLTDL_INTERNAL],[ opal_subdir_args="$opal_subdir_args --disable-static" fi - CFLAGS_save="$CFLAGS" + CFLAGS_save=$CFLAGS CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS" # VPATH support will be included by default in CONFIG_SUBDIR - OPAL_CONFIG_SUBDIR(opal/libltdl, [$opal_subdir_args], + OPAL_CONFIG_SUBDIR(opal/libltdl, [$opal_subdir_args], [HAPPY=1], [HAPPY=0]) - if test "$HAPPY" = "1"; then + if test $HAPPY -eq 1; then LIBLTDL_SUBDIR=libltdl OPAL_LIBLTDL_INTERNAL=1 - CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS_save=$CPPFLAGS CPPFLAGS="-I$srcdir" AC_EGREP_HEADER([lt_dladvise_init], [opal/libltdl/ltdl.h], [OPAL_HAVE_LTDL_ADVISE=1]) - CPPFLAGS="$CPPFLAGS_save" + CPPFLAGS=$CPPFLAGS_save # --export-dynamic allows exported symbols to be resolved via # --dlsym and friends. @@ -189,7 +189,7 @@ AC_DEFUN([_OPAL_SETUP_LIBLTDL_INTERNAL],[ AC_MSG_WARN([dynamic shared object loading, by configuring with --disable-dlopen.]) AC_MSG_ERROR([Cannot continue]) fi - CFLAGS="$CFLAGS_save" + CFLAGS=$CFLAGS_save OPAL_VAR_SCOPE_POP ])dnl