"Fossies" - the Fresh Open Source Software Archive

Member "scalasca-2.6/build-config/m4/ac_scalasca_getopt.m4" (19 Apr 2021, 2271 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 ##  SCALASCA    http://www.scalasca.org/                                   ##
    3 ##*************************************************************************##
    4 ##  Copyright (c) 1998-2013                                                ##
    5 ##  Forschungszentrum Juelich GmbH, Juelich Supercomputing Centre          ##
    6 ##                                                                         ##
    7 ##  Copyright (c) 2009-2013                                                ##
    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 AC_DEFUN([AC_SCALASCA_GETOPT],
   18 [
   19 AC_CHECK_HEADERS([getopt.h])
   20 AC_CHECK_DECLS([getopt_long_only], [], [], [
   21     AC_INCLUDES_DEFAULT
   22     #ifdef HAVE_GETOPT_H
   23     # include <getopt.h>
   24     #endif
   25 ])
   26 
   27 _AC_SCALASCA_GETOPT_LINK
   28 AS_IF([test "x${with_libiberty_lib_checks_successful}" = "xno"],
   29       [AC_SCOREP_FRONTEND_LIB([libiberty], [], [])],
   30       [AM_CONDITIONAL([HAVE_LIBIBERTY], [test 1 -eq 0])
   31        AFS_SUMMARY([libiberty support], [not required])])
   32 AS_IF([test "x${with_libiberty_lib_checks_successful}" = "xno"],
   33       [AC_MSG_ERROR([[cannot find getopt_long_only(). Please specify '--with-libiberty=<path>'.]])])
   34 ])
   35 
   36 
   37 AC_DEFUN([_AC_SCOREP_LIBIBERTY_LIB_CHECK], [
   38 LIBS="-liberty"
   39 _AC_SCALASCA_GETOPT_LINK
   40 AS_IF([test "x${with_libiberty_lib_checks_successful}" = "xyes"],
   41       [with_libiberty_libs="-liberty"],
   42       [with_libiberty_libs=""])
   43 ])
   44 
   45 
   46 AC_DEFUN([_AC_SCALASCA_GETOPT_LINK], [
   47 AC_LANG_PUSH([C++])
   48 AC_LINK_IFELSE([AC_LANG_PROGRAM(
   49                 [[extern "C" char getopt_long_only();]],
   50                 [[getopt_long_only();]])],
   51                [with_libiberty_lib_checks_successful=yes],
   52                [with_libiberty_lib_checks_successful=no])
   53 AC_LANG_POP
   54 ])