"Fossies" - the Fresh Open Source Software Archive

Member "scalasca-2.6/vendor/cubew/build-config/m4/ac_cube_another_cube_detection.m4" (19 Apr 2021, 3332 Bytes) of package /linux/misc/scalasca-2.6.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ##*************************************************************************##
    2 ##  CUBE        http://www.scalasca.org/                                   ##
    3 ##*************************************************************************##
    4 ##  Copyright (c) 1998-2016                                                ##
    5 ##  Forschungszentrum Juelich GmbH, Juelich Supercomputing Centre          ##
    6 ##                                                                         ##
    7 ##  Copyright (c) 2009-2015                                                ##
    8 ##  German Research School for Simulation Sciences GmbH,                   ##
    9 ##  Laboratory for Parallel Programming                                    ##
   10 ##                                                                         ##
   11 ##  This software may be modified and distributed under the terms of       ##
   12 ##  a BSD-style license.  See the COPYING file in the package base         ##
   13 ##  directory for details.                                                 ##
   14 ##*************************************************************************##
   15 
   16 
   17 
   18 AC_DEFUN([AC_SCOREP_IS_ANOTHER_CUBE_INSTALLED],
   19 [
   20 
   21 function test_cube_location
   22 {
   23 dir=$[]1
   24 if test "x$dir" = "x"; then
   25 command="cube_config.sh"
   26 else
   27 command="$dir/cube_config.sh"
   28 fi
   29 testline=`$command --name  2>&1`
   30 if test "x$testline" == "xCUBE"; then
   31    return 1
   32 fi
   33    return 0
   34 }
   35 
   36 
   37 
   38 CUBE_PRESENT=no
   39 
   40 
   41 test_cube_location
   42 result=$?
   43 if [[ $result -eq 1 ]]; then
   44    anothercube=`cube_config.sh --cube-dir `
   45    AC_MSG_WARN(=================================================================================================================)
   46    AC_MSG_WARN(Another installation of CUBE is detected (in $anothercube). Clash of distributions is possible.)
   47    AC_MSG_WARN(=================================================================================================================)
   48    ANOTHER_CUBE_PRESENT=yes
   49 else
   50 
   51     cube_env=`echo "\$CUBE_DIR"`
   52     test_cube_location $cube_env
   53     result=$?
   54     if [[ $result -eq 1 ]]; then
   55 	anothercube=`$cube_env/cube_config.sh --cube-dir `
   56 	AC_MSG_WARN(=================================================================================================================)
   57 	AC_MSG_WARN(Another installation of CUBE is detected (in $anothercube). Clash of distributions is possible.)
   58 	AC_MSG_WARN(=================================================================================================================)
   59 	ANOTHER_CUBE_PRESENT=yes
   60     fi
   61 fi
   62 
   63 test_cube_location $prefix/bin
   64 result=$?
   65 if [[ $result -eq 1 ]]; then
   66    overwritecube=`$prefix/bin/cube_config.sh --cube-dir `
   67    AC_MSG_WARN(=================================================================================================================)
   68    AC_MSG_WARN(Installation of CUBE is detected (in $overwritecube). New installation will overwrite the present one.)
   69    AC_MSG_WARN(=================================================================================================================)
   70    ANOTHER_CUBE_OVERWRITE=yes
   71 fi
   72 
   73 
   74 
   75 ])
   76 
   77 
   78 
   79 AC_DEFUN([AC_SCOREP_DETECT_MODULES_PATH],
   80 [
   81 if test "x$MODULEPATH" != "x"; then
   82     INSTALL_MODULE_FILE="yes"
   83     if test "x$CROSS_BUILD" = "xyes"; then
   84 	DEFAULT_MODULE_VERSION="$PACKAGE_VERSION-frontend"
   85     else
   86 	DEFAULT_MODULE_VERSION="$PACKAGE_VERSION"
   87     fi
   88     AC_SUBST([DEFAULT_MODULE_VERSION])
   89 fi
   90 
   91 ])