Punt when trying to build with threaded Python on FreeBSD.

Also cut back on excessive use of *** to decorate configure error messages.
If it's an error message, you are sure to see it without any decoration.
This commit is contained in:
Peter Eisentraut 2006-10-16 17:24:54 +00:00
parent e0dece127d
commit 6ab23dabf5
3 changed files with 76 additions and 94 deletions

View File

@ -1,7 +1,7 @@
# #
# Autoconf macros for configuring the build of Python extension modules # Autoconf macros for configuring the build of Python extension modules
# #
# $PostgreSQL: pgsql/config/python.m4,v 1.13 2005/10/13 20:40:04 momjian Exp $ # $PostgreSQL: pgsql/config/python.m4,v 1.14 2006/10/16 17:24:54 petere Exp $
# #
# PGAC_PATH_PYTHON # PGAC_PATH_PYTHON
@ -84,8 +84,8 @@ pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_na
if test "$pythreads" = "1"; then if test "$pythreads" = "1"; then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
case $host_os in case $host_os in
openbsd*|freebsd4*) openbsd*|freebsd*)
AC_MSG_ERROR([*** Threaded Python not supported on this platform ***]) AC_MSG_ERROR([threaded Python not supported on this platform])
;; ;;
esac esac
else else

110
configure vendored
View File

@ -5010,9 +5010,9 @@ if test "$pythreads" = "1"; then
echo "$as_me:$LINENO: result: yes" >&5 echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6 echo "${ECHO_T}yes" >&6
case $host_os in case $host_os in
openbsd*|freebsd4*) openbsd*|freebsd*)
{ { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5 { { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;} echo "$as_me: error: threaded Python not supported on this platform" >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
;; ;;
esac esac
@ -16796,27 +16796,21 @@ PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEM
# Let's see who fails, perhaps AIX. 2004-04-23 # Let's see who fails, perhaps AIX. 2004-04-23
if test "$PTHREAD_CC" != "$CC"; then if test "$PTHREAD_CC" != "$CC"; then
{ { echo "$as_me:$LINENO: error: { { echo "$as_me:$LINENO: error:
PostgreSQL does not support platforms that require a special PostgreSQL does not support platforms that require a special compiler
compiler binary for thread-safety. for thread safety." >&5
" >&5
echo "$as_me: error: echo "$as_me: error:
PostgreSQL does not support platforms that require a special PostgreSQL does not support platforms that require a special compiler
compiler binary for thread-safety. for thread safety." >&2;}
" >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
if test "$THREAD_SUPPORT" = no; then if test "$THREAD_SUPPORT" = no; then
{ { echo "$as_me:$LINENO: error: { { echo "$as_me:$LINENO: error: cannot enable threads on this platform
Cannot enable threads on your platform. This platform is known to not support thread-safe programs. For details,
Your platform is known to not support thread-safe programs. compile and run src/bin/pg_thread_test." >&5
For details, compile and run src/bin/pg_thread_test. echo "$as_me: error: cannot enable threads on this platform
" >&5 This platform is known to not support thread-safe programs. For details,
echo "$as_me: error: compile and run src/bin/pg_thread_test." >&2;}
Cannot enable threads on your platform.
Your platform is known to not support thread-safe programs.
For details, compile and run src/bin/pg_thread_test.
" >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
@ -17521,13 +17515,13 @@ sed 's/^/| /' conftest.$ac_ext >&5
echo "$as_me:$LINENO: result: failed" >&5 echo "$as_me:$LINENO: result: failed" >&5
echo "${ECHO_T}failed" >&6 echo "${ECHO_T}failed" >&6
{ { echo "$as_me:$LINENO: error: { { echo "$as_me:$LINENO: error:
*** Could not execute a simple test program. This may be a problem Could not execute a simple test program. This may be a problem
*** related to locating shared libraries. Check the file 'config.log' related to locating shared libraries. Check the file 'config.log'
*** for the exact reason." >&5 for the exact reason." >&5
echo "$as_me: error: echo "$as_me: error:
*** Could not execute a simple test program. This may be a problem Could not execute a simple test program. This may be a problem
*** related to locating shared libraries. Check the file 'config.log' related to locating shared libraries. Check the file 'config.log'
*** for the exact reason." >&2;} for the exact reason." >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@ -21371,13 +21365,11 @@ HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
{ { echo "$as_me:$LINENO: error: { { echo "$as_me:$LINENO: error:
*** Thread-safety requires POSIX signals, which are not supported by your Thread-safety requires POSIX signals, which are not supported by this
*** operating system. operating system." >&5
" >&5
echo "$as_me: error: echo "$as_me: error:
*** Thread-safety requires POSIX signals, which are not supported by your Thread-safety requires POSIX signals, which are not supported by this
*** operating system. operating system." >&2;}
" >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
fi fi
@ -22840,19 +22832,17 @@ if test x"$template" != x"win32"
then then
{ echo "$as_me:$LINENO: WARNING: { echo "$as_me:$LINENO: WARNING:
*** Skipping thread test program. --enable-thread-safety-force was used. *** Skipping thread test program. --enable-thread-safety-force was used.
*** Run the program in src/test/thread on the your machine and add *** Run the program in src/test/thread on the your machine and add proper
proper locking function calls to your applications to guarantee thread *** locking function calls to your applications to guarantee thread safety.
safety.
" >&5 " >&5
echo "$as_me: WARNING: echo "$as_me: WARNING:
*** Skipping thread test program. --enable-thread-safety-force was used. *** Skipping thread test program. --enable-thread-safety-force was used.
*** Run the program in src/test/thread on the your machine and add *** Run the program in src/test/thread on the your machine and add proper
proper locking function calls to your applications to guarantee thread *** locking function calls to your applications to guarantee thread safety.
safety.
" >&2;} " >&2;}
else else
{ echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;} echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
fi fi
elif test "$enable_thread_safety" = yes; then elif test "$enable_thread_safety" = yes; then
if test x"$template" != x"win32" if test x"$template" != x"win32"
@ -22905,24 +22895,22 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status ) ( exit $ac_status )
echo "$as_me:$LINENO: result: no" >&5 echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6 echo "${ECHO_T}no" >&6
{ { echo "$as_me:$LINENO: error: { { echo "$as_me:$LINENO: error: thread test program failed
*** Thread test program failed. Your platform is not thread-safe. This platform is not thread-safe. Check the file 'config.log'for the
*** Check the file 'config.log'for the exact reason. exact reason.
***
*** You can use the configure option --enable-thread-safety-force You can use the configure option --enable-thread-safety-force to force
*** to force threads to be enabled. However, you must then run threads to be enabled. But you must then run the program in
*** the program in src/test/thread and add locking function calls src/test/thread and add locking function calls to your applications to
*** to your applications to guarantee thread safety. guarantee thread safety." >&5
" >&5 echo "$as_me: error: thread test program failed
echo "$as_me: error: This platform is not thread-safe. Check the file 'config.log'for the
*** Thread test program failed. Your platform is not thread-safe. exact reason.
*** Check the file 'config.log'for the exact reason.
*** You can use the configure option --enable-thread-safety-force to force
*** You can use the configure option --enable-thread-safety-force threads to be enabled. But you must then run the program in
*** to force threads to be enabled. However, you must then run src/test/thread and add locking function calls to your applications to
*** the program in src/test/thread and add locking function calls guarantee thread safety." >&2;}
*** to your applications to guarantee thread safety.
" >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@ -22930,8 +22918,8 @@ fi
CFLAGS="$_CFLAGS" CFLAGS="$_CFLAGS"
LIBS="$_LIBS" LIBS="$_LIBS"
else else
{ echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;} echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
fi fi
fi fi
@ -24476,8 +24464,8 @@ echo "$as_me: executing $ac_dest commands" >&6;}
for FILE in $CONFIG_LINKS for FILE in $CONFIG_LINKS
do do
# test -e works for symlinks in the MinGW console # test -e works for symlinks in the MinGW console
test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5 test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;} echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
done done
;; ;;
esac esac

View File

@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.482 2006/10/07 19:25:28 tgl Exp $ dnl $PostgreSQL: pgsql/configure.in,v 1.483 2006/10/16 17:24:54 petere Exp $
dnl dnl
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
@ -1069,17 +1069,14 @@ PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEM
# Let's see who fails, perhaps AIX. 2004-04-23 # Let's see who fails, perhaps AIX. 2004-04-23
if test "$PTHREAD_CC" != "$CC"; then if test "$PTHREAD_CC" != "$CC"; then
AC_MSG_ERROR([ AC_MSG_ERROR([
PostgreSQL does not support platforms that require a special PostgreSQL does not support platforms that require a special compiler
compiler binary for thread-safety. for thread safety.])
])
fi fi
if test "$THREAD_SUPPORT" = no; then if test "$THREAD_SUPPORT" = no; then
AC_MSG_ERROR([ AC_MSG_ERROR([cannot enable threads on this platform
Cannot enable threads on your platform. This platform is known to not support thread-safe programs. For details,
Your platform is known to not support thread-safe programs. compile and run src/bin/pg_thread_test.])
For details, compile and run src/bin/pg_thread_test.
])
fi fi
# Check for *_r functions # Check for *_r functions
@ -1144,9 +1141,9 @@ AC_TRY_RUN([int main() { return 0; }],
[AC_MSG_RESULT(ok)], [AC_MSG_RESULT(ok)],
[AC_MSG_RESULT(failed) [AC_MSG_RESULT(failed)
AC_MSG_ERROR([[ AC_MSG_ERROR([[
*** Could not execute a simple test program. This may be a problem Could not execute a simple test program. This may be a problem
*** related to locating shared libraries. Check the file 'config.log' related to locating shared libraries. Check the file 'config.log'
*** for the exact reason.]])], for the exact reason.]])],
[AC_MSG_RESULT([cross-compiling])]) [AC_MSG_RESULT([cross-compiling])])
# -------------------- # --------------------
@ -1282,9 +1279,8 @@ then
PGAC_FUNC_POSIX_SIGNALS PGAC_FUNC_POSIX_SIGNALS
if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
AC_MSG_ERROR([ AC_MSG_ERROR([
*** Thread-safety requires POSIX signals, which are not supported by your Thread-safety requires POSIX signals, which are not supported by this
*** operating system. operating system.])
])
fi fi
fi fi
@ -1365,12 +1361,11 @@ if test x"$template" != x"win32"
then then
AC_MSG_WARN([ AC_MSG_WARN([
*** Skipping thread test program. --enable-thread-safety-force was used. *** Skipping thread test program. --enable-thread-safety-force was used.
*** Run the program in src/test/thread on the your machine and add *** Run the program in src/test/thread on the your machine and add proper
proper locking function calls to your applications to guarantee thread *** locking function calls to your applications to guarantee thread safety.
safety.
]) ])
else else
AC_MSG_WARN([*** Skipping thread test on Win32]) AC_MSG_WARN([*** skipping thread test on Win32])
fi fi
elif test "$enable_thread_safety" = yes; then elif test "$enable_thread_safety" = yes; then
if test x"$template" != x"win32" if test x"$template" != x"win32"
@ -1384,15 +1379,14 @@ LIBS="$LIBS $PTHREAD_LIBS"
AC_TRY_RUN([#include "$srcdir/src/test/thread/thread_test.c"], AC_TRY_RUN([#include "$srcdir/src/test/thread/thread_test.c"],
[AC_MSG_RESULT(yes)], [AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no) [AC_MSG_RESULT(no)
AC_MSG_ERROR([ AC_MSG_ERROR([thread test program failed
*** Thread test program failed. Your platform is not thread-safe. This platform is not thread-safe. Check the file 'config.log'for the
*** Check the file 'config.log'for the exact reason. exact reason.
***
*** You can use the configure option --enable-thread-safety-force You can use the configure option --enable-thread-safety-force to force
*** to force threads to be enabled. However, you must then run threads to be enabled. But you must then run the program in
*** the program in src/test/thread and add locking function calls src/test/thread and add locking function calls to your applications to
*** to your applications to guarantee thread safety. guarantee thread safety.])],
])],
[AC_MSG_RESULT(maybe) [AC_MSG_RESULT(maybe)
AC_MSG_WARN([ AC_MSG_WARN([
*** Skipping thread test program because of cross-compile build. *** Skipping thread test program because of cross-compile build.
@ -1401,7 +1395,7 @@ AC_TRY_RUN([#include "$srcdir/src/test/thread/thread_test.c"],
CFLAGS="$_CFLAGS" CFLAGS="$_CFLAGS"
LIBS="$_LIBS" LIBS="$_LIBS"
else else
AC_MSG_WARN([*** Skipping thread test on Win32]) AC_MSG_WARN([*** skipping thread test on Win32])
fi fi
fi fi
@ -1442,7 +1436,7 @@ AC_CONFIG_COMMANDS([check_win32_symlinks],[
for FILE in $CONFIG_LINKS for FILE in $CONFIG_LINKS
do do
# test -e works for symlinks in the MinGW console # test -e works for symlinks in the MinGW console
test -e `expr "$FILE" : '\([[^:]]*\)'` || AC_MSG_WARN([*** link for $FILE - please fix by hand]) test -e `expr "$FILE" : '\([[^:]]*\)'` || AC_MSG_WARN([*** link for $FILE -- please fix by hand])
done done
]) ])
fi fi