stx_libbasic3-config.sh
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 24 Oct 2017 12:53:36 +0100
branchjv
changeset 4260 022b210d86b5
parent 4198 533d77906f5b
child 4395 96eb18f215e5
permissions -rwxr-xr-x
Added basic support to file out changeset in Bee Smalltalk format

#!/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 ""