1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Implement compiler #error if spinlock code not found, add configure flag

to bypass the error, --without-spinlocks.
This commit is contained in:
Bruce Momjian
2003-09-12 16:10:27 +00:00
parent 69a46e9ce1
commit 06e3ec7a54
5 changed files with 80 additions and 6 deletions

45
configure vendored
View File

@ -869,6 +869,7 @@ Optional Packages:
--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
@ -3493,6 +3494,36 @@ else
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
#
@ -3523,7 +3554,6 @@ else
fi;
#
# Elf
#
@ -6062,6 +6092,19 @@ fi
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