diff -r 41300fa6a67c -r f7bc934e204c util/config.tests/unix/precomp.test --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/config.tests/unix/precomp.test Wed Mar 31 11:06:36 2010 +0300 @@ -0,0 +1,54 @@ +#!/bin/sh + +PRECOMP_SUPPORT=no +COMPILER=$1 +VERBOSE=$2 + +case "$COMPILER" in +icpc) + cat >header.h <header.cpp + cat >source.cpp </dev/null 2>&1 \ + && $COMPILER -pch-use header.pchi -include header.h -c source.cpp -o source.o >/dev/null 2>&1 \ + && PRECOMP_SUPPORT=yes + + rm -f header.h header.cpp source.cpp + rm -f header.pchi header.o source.o + ;; + +*g++*|c++) + case `"$COMPILER" -dumpversion 2>/dev/null` in + 3.*) + ;; + *) + + >precomp_header.h + if $COMPILER -x c-header precomp_header.h >/dev/null 2>&1; then + $COMPILER -x c++-header precomp_header.h && PRECOMP_SUPPORT=yes + fi + rm -f precomp_header.h precomp_header.h.gch + ;; + esac + ;; +esac + + +# done +if [ "$PRECOMP_SUPPORT" != "yes" ]; then + [ "$VERBOSE" = "yes" ] && echo "Precompiled-headers support disabled." + exit 0 +else + [ "$VERBOSE" = "yes" ] && echo "Precompiled-headers support enabled." + exit 1 +fi