diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/configure b/configure index baa1b970f8e..5cb3d9b14f0 100755 --- a/configure +++ b/configure @@ -1635,7 +1635,7 @@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright (c) 1996-2011, PostgreSQL Global Development Group +Copyright (c) 1996-2012, PostgreSQL Global Development Group _ACEOF exit fi @@ -18207,6 +18207,66 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi +# On PPC, check if assembler supports LWARX instruction's mutex hint bit +case $host_cpu in + ppc*|powerpc*) + { $as_echo "$as_me:$LINENO: checking whether assembler supports lwarx hint bit" >&5 +$as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int a = 0; int *p = &a; int r; + __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p)); + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + pgac_cv_have_ppc_mutex_hint=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + pgac_cv_have_ppc_mutex_hint=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $pgac_cv_have_ppc_mutex_hint" >&5 +$as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; } + if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PPC_LWARX_MUTEX_HINT 1 +_ACEOF + + fi + ;; +esac + # Check largefile support. You might think this is a system service not a # compiler characteristic, but you'd be wrong. We must check this before # probing existence of related functions such as fseeko, since the largefile |