From: Leon B. <le...@us...> - 2008-02-25 01:24:46
|
Update of /cvsroot/djvu/djvulibre-3.5 In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv16157 Modified Files: configure configure.ac Log Message: Added autoconf test for intel atomic builtins. Fixed gnuc version test in atomic.cpp. Index: configure.ac =================================================================== RCS file: /cvsroot/djvu/djvulibre-3.5/configure.ac,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** configure.ac 2 Dec 2007 13:55:56 -0000 1.91 --- configure.ac 25 Feb 2008 01:24:42 -0000 1.92 *************** *** 123,126 **** --- 123,127 ---- AC_CXX_NAMESPACES AC_CXX_MEMBER_TEMPLATES + AC_CXX_INTEL_ATOMIC_BUILTINS AC_CXX_RPO Index: configure =================================================================== RCS file: /cvsroot/djvu/djvulibre-3.5/configure,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -d -r1.125 -r1.126 *** configure 2 Dec 2007 13:55:55 -0000 1.125 --- configure 25 Feb 2008 01:24:40 -0000 1.126 *************** *** 21667,21670 **** --- 21667,21741 ---- fi + { echo "$as_me:$LINENO: checking whether the compiler supports intel atomic builtins" >&5 + echo $ECHO_N "checking whether the compiler supports intel atomic builtins... $ECHO_C" >&6; } + if test "${ac_cv_cxx_intel_atomic_builtins+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + static int volatile l; + int + main () + { + __sync_lock_test_and_set(&l,1); return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_cxx_intel_atomic_builtins=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_cxx_intel_atomic_builtins=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + fi + { echo "$as_me:$LINENO: result: $ac_cv_cxx_intel_atomic_builtins" >&5 + echo "${ECHO_T}$ac_cv_cxx_intel_atomic_builtins" >&6; } + if test "$ac_cv_cxx_intel_atomic_builtins" = yes; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_INTEL_ATOMIC_BUILTINS 1 + _ACEOF + + fi + CXXRPOFLAGS= RPO_YES='#' |