A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.
1 ##*************************************************************************## 2 ## CUBE http://www.scalasca.org/ ## 3 ##*************************************************************************## 4 ## Copyright (c) 2017-2018 ## 5 ## Forschungszentrum Juelich GmbH, Juelich Supercomputing Centre ## 6 ## ## 7 ## This software may be modified and distributed under the terms of ## 8 ## a BSD-style license. See the COPYING file in the package base ## 9 ## directory for details. ## 10 ##*************************************************************************## 11 12 13 AC_DEFUN([AC_CUBE_MEMORY], [ 14 15 AC_ARG_WITH(advanced-memory, [AS_HELP_STRING([--with-advanced-memory | --without-advanced-memory ] ,[ Enables advanced memory features such as usage of an external memory allocator. ])],[advmemory=$with_advanced_memory],[ advmemory="no"]) 16 AC_ARG_WITH(memory-tracking, [AS_HELP_STRING([--with-memory-tracking | --without-memory-tracking ] ,[ Enables internal memory tracking (requires --with-advanced-memory). ])],[memory_tracking=$with_memory_tracking],[ memory_tracking="no"]) 17 AC_ARG_WITH(memory-tracing, [AS_HELP_STRING([--with-memory-tracing | --without-memory-tracing ] ,[ Enables internal memory tracing (requires --with-advanced-memory), more intensive memory usage report. ])],[memory_tracing=$with_memory_tracing],[ memory_tracing="no"]) 18 ## 19 ## check function declarations 20 ## 21 22 AC_LANG_PUSH(C) 23 24 AS_IF([ test "x$memory_tracing" == "xyes" ],[ 25 AC_MSG_NOTICE([Enable internal memory tracing]) 26 AC_DEFINE(HAVE_MEMORY_TRACING, 1, [Enable internal (detailed) tracing of memory usage]) 27 advmemory="yes" # enable advanced memory 28 memory_tracking="yes" #enable memory tracking 29 ]) 30 AS_IF([ test "x$memory_tracking" == "xyes" ],[ 31 AC_MSG_NOTICE([Enable internal memory tracking]) 32 AC_DEFINE(HAVE_MEMORY_TRACKING, 1, [Enable internal tracking of memory usage]) 33 advmemory="yes" # enable advanced memory 34 ]) 35 AS_IF([ test "x$advmemory" == "xyes" ],[ 36 AC_MSG_NOTICE([Enable advanced memory handling]) 37 AC_DEFINE(HAVE_ADVANCED_MEMORY, 1, [Enable usage of external memory allocator]) 38 ]) 39 40 AC_LANG_POP(C) 41 42 ## 43 ## result 44 ## 45 46 AM_CONDITIONAL([HAVE_ADVANCED_MEMORY], [test "x${advmemory}" = "xyes"]) 47 AM_CONDITIONAL([HAVE_MEMORY_TRACKING], [test "x${memory_tracking}" = "xyes"]) 48 AM_CONDITIONAL([HAVE_MEMORY_TRACING], [test "x${memory_tracking}" = "xyes"]) 49 ])