to bypass the error, --without-spinlocks.
--with-rendezvous build with Rendezvous support
--with-openssl[=DIR] build with OpenSSL support [/usr/local/ssl]
--without-readline do not use Readline
+ --without-spinlocks do not use Spinlocks
--without-zlib do not use Zlib
--with-gnu-ld assume the C compiler uses GNU ld default=no
fi;
+#
+# Spinlocks
+#
+
+
+
+# Check whether --with-spinlocks or --without-spinlocks was given.
+if test "${with_spinlocks+set}" = set; then
+ withval="$with_spinlocks"
+
+ case $withval in
+ yes)
+ :
+ ;;
+ no)
+ :
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: no argument expected for --with-spinlocks option" >&5
+echo "$as_me: error: no argument expected for --with-spinlocks option" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+else
+ with_spinlocks=yes
+
+fi;
+
+
#
# Zlib
#
fi;
-
#
# Elf
#
fi
+if test "$with_spinlocks" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SPINLOCKS 1
+_ACEOF
+
+else
+ { echo "$as_me:$LINENO: WARNING:
+*** Not using spinlocks will cause poor performance." >&5
+echo "$as_me: WARNING:
+*** Not using spinlocks will cause poor performance." >&2;}
+fi
+
if test "$with_krb4" = yes ; then
echo "$as_me:$LINENO: checking for des_encrypt in -ldes" >&5
dnl Process this file with autoconf to produce a configure script.
-dnl $Header: /cvsroot/pgsql/configure.in,v 1.286 2003/09/07 16:38:05 momjian Exp $
+dnl $Header: /cvsroot/pgsql/configure.in,v 1.287 2003/09/12 16:10:26 momjian Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
PGAC_ARG_BOOL(with, readline, yes,
[ --without-readline do not use Readline])
+#
+# Spinlocks
+#
+PGAC_ARG_BOOL(with, spinlocks, yes,
+ [ --without-spinlocks do not use Spinlocks])
+
#
# Zlib
#
PGAC_ARG_BOOL(with, zlib, yes,
[ --without-zlib do not use Zlib])
-
#
# Elf
#
Use --without-zlib to disable zlib support.])])
fi
+if test "$with_spinlocks" = yes; then
+ AC_DEFINE(HAVE_SPINLOCKS, 1, [Define to 1 if you have spinlocks.])
+else
+ AC_MSG_WARN([
+*** Not using spinlocks will cause poor performance.])
+fi
+
if test "$with_krb4" = yes ; then
AC_CHECK_LIB(des, des_encrypt, [], [AC_MSG_ERROR([library 'des' is required for Kerberos 4])])
AC_CHECK_LIB(krb, krb_sendauth, [], [AC_MSG_ERROR([library 'krb' is required for Kerberos 4])])
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.141 2003/09/11 21:42:20 momjian Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.142 2003/09/12 16:10:26 momjian Exp $ -->
<chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--without-spinlocks</option></term>
+ <listitem>
+ <para>
+ Allows source builds to succeed without CPU spinlock support.
+ Lack of spinlock support will produce poor performance.
+ This option is to be used only by platforms without
+ spinlock support.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>--enable-thread-safety</option></term>
<listitem>
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
+/* Define to 1 if you have spinlocks. */
+#undef HAVE_SPINLOCKS
+
/* Define to 1 if you have the `srandom' function. */
#undef HAVE_SRANDOM
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: s_lock.h,v 1.112 2003/08/04 02:40:15 momjian Exp $
+ * $Id: s_lock.h,v 1.113 2003/09/12 16:10:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#else /* !HAS_TEST_AND_SET */
+#else /* HAS_TEST_AND_SET */
+
+#ifdef HAVE_SPINLOCKS
+#error This platform does not support native spinlocks. To continue the compile, rerun configure using --without-spinlocks. However, performance will be poor. Please report this to pgsql-bugs@postgresql.org.
+#endif
/*
* Fake spinlock implementation using semaphores --- slow and prone