stx_libbasic3-config.sh
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 28 Aug 2017 16:16:00 +0100
branchjv
changeset 4259 4f1299274d32
parent 4198 533d77906f5b
child 4395 96eb18f215e5
permissions -rwxr-xr-x
Added (some) tests for `MessageTracer`

#!/bin/bash
#
# Simple script to (auto)create libprofiler-config.h
# based on what is available on current system
#

HEADER=stx_libbasic3-config.h
INCLUDE_DIRS="/usr/include /usr/local/include"

function out() {
    echo "$1" >> $HEADER
}

echo -n > $HEADER
out "/* Do not edit! Automatically generated at $(date) */"
out ""
for inc in $INCLUDE_DIRS; do
    if [ -r "$inc/valgrind/valgrind.h" ]; then
    	out "#if !defined(_WIN32) && !defined(_WIN64)"    	
        out "# define HAS_VALGRIND"        
        if [ -r "$inc/valgrind/callgrind.h" ]; then
            out "# define HAS_CALLGRIND"        
        fi        
        out "#endif"
    fi        
done

out ""