Skip to content

Commit 6ab23da

Browse files
committed
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.
1 parent e0dece1 commit 6ab23da

File tree

3 files changed

+76
-94
lines changed

3 files changed

+76
-94
lines changed

config/python.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Autoconf macros for configuring the build of Python extension modules
33
#
4-
# $PostgreSQL: pgsql/config/python.m4,v 1.13 2005/10/13 20:40:04 momjian Exp $
4+
# $PostgreSQL: pgsql/config/python.m4,v 1.14 2006/10/16 17:24:54 petere Exp $
55
#
66

77
# PGAC_PATH_PYTHON
@@ -84,8 +84,8 @@ pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_na
8484
if test "$pythreads" = "1"; then
8585
AC_MSG_RESULT(yes)
8686
case $host_os in
87-
openbsd*|freebsd4*)
88-
AC_MSG_ERROR([*** Threaded Python not supported on this platform ***])
87+
openbsd*|freebsd*)
88+
AC_MSG_ERROR([threaded Python not supported on this platform])
8989
;;
9090
esac
9191
else

configure

Lines changed: 49 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -5010,9 +5010,9 @@ if test "$pythreads" = "1"; then
50105010
echo "$as_me:$LINENO: result: yes" >&5
50115011
echo "${ECHO_T}yes" >&6
50125012
case $host_os in
5013-
openbsd*|freebsd4*)
5014-
{ { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
5015-
echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
5013+
openbsd*|freebsd*)
5014+
{ { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
5015+
echo "$as_me: error: threaded Python not supported on this platform" >&2;}
50165016
{ (exit 1); exit 1; }; }
50175017
;;
50185018
esac
@@ -16796,27 +16796,21 @@ PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEM
1679616796
# Let's see who fails, perhaps AIX. 2004-04-23
1679716797
if test "$PTHREAD_CC" != "$CC"; then
1679816798
{ { echo "$as_me:$LINENO: error:
16799-
PostgreSQL does not support platforms that require a special
16800-
compiler binary for thread-safety.
16801-
" >&5
16799+
PostgreSQL does not support platforms that require a special compiler
16800+
for thread safety." >&5
1680216801
echo "$as_me: error:
16803-
PostgreSQL does not support platforms that require a special
16804-
compiler binary for thread-safety.
16805-
" >&2;}
16802+
PostgreSQL does not support platforms that require a special compiler
16803+
for thread safety." >&2;}
1680616804
{ (exit 1); exit 1; }; }
1680716805
fi
1680816806

1680916807
if test "$THREAD_SUPPORT" = no; then
16810-
{ { echo "$as_me:$LINENO: error:
16811-
Cannot enable threads on your platform.
16812-
Your platform is known to not support thread-safe programs.
16813-
For details, compile and run src/bin/pg_thread_test.
16814-
" >&5
16815-
echo "$as_me: error:
16816-
Cannot enable threads on your platform.
16817-
Your platform is known to not support thread-safe programs.
16818-
For details, compile and run src/bin/pg_thread_test.
16819-
" >&2;}
16808+
{ { echo "$as_me:$LINENO: error: cannot enable threads on this platform
16809+
This platform is known to not support thread-safe programs. For details,
16810+
compile and run src/bin/pg_thread_test." >&5
16811+
echo "$as_me: error: cannot enable threads on this platform
16812+
This platform is known to not support thread-safe programs. For details,
16813+
compile and run src/bin/pg_thread_test." >&2;}
1682016814
{ (exit 1); exit 1; }; }
1682116815
fi
1682216816

@@ -17521,13 +17515,13 @@ sed 's/^/| /' conftest.$ac_ext >&5
1752117515
echo "$as_me:$LINENO: result: failed" >&5
1752217516
echo "${ECHO_T}failed" >&6
1752317517
{ { echo "$as_me:$LINENO: error:
17524-
*** Could not execute a simple test program. This may be a problem
17525-
*** related to locating shared libraries. Check the file 'config.log'
17526-
*** for the exact reason." >&5
17518+
Could not execute a simple test program. This may be a problem
17519+
related to locating shared libraries. Check the file 'config.log'
17520+
for the exact reason." >&5
1752717521
echo "$as_me: error:
17528-
*** Could not execute a simple test program. This may be a problem
17529-
*** related to locating shared libraries. Check the file 'config.log'
17530-
*** for the exact reason." >&2;}
17522+
Could not execute a simple test program. This may be a problem
17523+
related to locating shared libraries. Check the file 'config.log'
17524+
for the exact reason." >&2;}
1753117525
{ (exit 1); exit 1; }; }
1753217526
fi
1753317527
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
2137121365

2137221366
if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
2137321367
{ { echo "$as_me:$LINENO: error:
21374-
*** Thread-safety requires POSIX signals, which are not supported by your
21375-
*** operating system.
21376-
" >&5
21368+
Thread-safety requires POSIX signals, which are not supported by this
21369+
operating system." >&5
2137721370
echo "$as_me: error:
21378-
*** Thread-safety requires POSIX signals, which are not supported by your
21379-
*** operating system.
21380-
" >&2;}
21371+
Thread-safety requires POSIX signals, which are not supported by this
21372+
operating system." >&2;}
2138121373
{ (exit 1); exit 1; }; }
2138221374
fi
2138321375
fi
@@ -22840,19 +22832,17 @@ if test x"$template" != x"win32"
2284022832
then
2284122833
{ echo "$as_me:$LINENO: WARNING:
2284222834
*** Skipping thread test program. --enable-thread-safety-force was used.
22843-
*** Run the program in src/test/thread on the your machine and add
22844-
proper locking function calls to your applications to guarantee thread
22845-
safety.
22835+
*** Run the program in src/test/thread on the your machine and add proper
22836+
*** locking function calls to your applications to guarantee thread safety.
2284622837
" >&5
2284722838
echo "$as_me: WARNING:
2284822839
*** Skipping thread test program. --enable-thread-safety-force was used.
22849-
*** Run the program in src/test/thread on the your machine and add
22850-
proper locking function calls to your applications to guarantee thread
22851-
safety.
22840+
*** Run the program in src/test/thread on the your machine and add proper
22841+
*** locking function calls to your applications to guarantee thread safety.
2285222842
" >&2;}
2285322843
else
22854-
{ echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22855-
echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22844+
{ echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
22845+
echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
2285622846
fi
2285722847
elif test "$enable_thread_safety" = yes; then
2285822848
if test x"$template" != x"win32"
@@ -22905,33 +22895,31 @@ sed 's/^/| /' conftest.$ac_ext >&5
2290522895
( exit $ac_status )
2290622896
echo "$as_me:$LINENO: result: no" >&5
2290722897
echo "${ECHO_T}no" >&6
22908-
{ { echo "$as_me:$LINENO: error:
22909-
*** Thread test program failed. Your platform is not thread-safe.
22910-
*** Check the file 'config.log'for the exact reason.
22911-
***
22912-
*** You can use the configure option --enable-thread-safety-force
22913-
*** to force threads to be enabled. However, you must then run
22914-
*** the program in src/test/thread and add locking function calls
22915-
*** to your applications to guarantee thread safety.
22916-
" >&5
22917-
echo "$as_me: error:
22918-
*** Thread test program failed. Your platform is not thread-safe.
22919-
*** Check the file 'config.log'for the exact reason.
22920-
***
22921-
*** You can use the configure option --enable-thread-safety-force
22922-
*** to force threads to be enabled. However, you must then run
22923-
*** the program in src/test/thread and add locking function calls
22924-
*** to your applications to guarantee thread safety.
22925-
" >&2;}
22898+
{ { echo "$as_me:$LINENO: error: thread test program failed
22899+
This platform is not thread-safe. Check the file 'config.log'for the
22900+
exact reason.
22901+
22902+
You can use the configure option --enable-thread-safety-force to force
22903+
threads to be enabled. But you must then run the program in
22904+
src/test/thread and add locking function calls to your applications to
22905+
guarantee thread safety." >&5
22906+
echo "$as_me: error: thread test program failed
22907+
This platform is not thread-safe. Check the file 'config.log'for the
22908+
exact reason.
22909+
22910+
You can use the configure option --enable-thread-safety-force to force
22911+
threads to be enabled. But you must then run the program in
22912+
src/test/thread and add locking function calls to your applications to
22913+
guarantee thread safety." >&2;}
2292622914
{ (exit 1); exit 1; }; }
2292722915
fi
2292822916
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2292922917
fi
2293022918
CFLAGS="$_CFLAGS"
2293122919
LIBS="$_LIBS"
2293222920
else
22933-
{ echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22934-
echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22921+
{ echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
22922+
echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
2293522923
fi
2293622924
fi
2293722925

@@ -24476,8 +24464,8 @@ echo "$as_me: executing $ac_dest commands" >&6;}
2447624464
for FILE in $CONFIG_LINKS
2447724465
do
2447824466
# test -e works for symlinks in the MinGW console
24479-
test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24480-
echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24467+
test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
24468+
echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
2448124469
done
2448224470
;;
2448324471
esac

configure.in

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.482 2006/10/07 19:25:28 tgl Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.483 2006/10/16 17:24:54 petere Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1069,17 +1069,14 @@ PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEM
10691069
# Let's see who fails, perhaps AIX. 2004-04-23
10701070
if test "$PTHREAD_CC" != "$CC"; then
10711071
AC_MSG_ERROR([
1072-
PostgreSQL does not support platforms that require a special
1073-
compiler binary for thread-safety.
1074-
])
1072+
PostgreSQL does not support platforms that require a special compiler
1073+
for thread safety.])
10751074
fi
10761075

10771076
if test "$THREAD_SUPPORT" = no; then
1078-
AC_MSG_ERROR([
1079-
Cannot enable threads on your platform.
1080-
Your platform is known to not support thread-safe programs.
1081-
For details, compile and run src/bin/pg_thread_test.
1082-
])
1077+
AC_MSG_ERROR([cannot enable threads on this platform
1078+
This platform is known to not support thread-safe programs. For details,
1079+
compile and run src/bin/pg_thread_test.])
10831080
fi
10841081

10851082
# Check for *_r functions
@@ -1144,9 +1141,9 @@ AC_TRY_RUN([int main() { return 0; }],
11441141
[AC_MSG_RESULT(ok)],
11451142
[AC_MSG_RESULT(failed)
11461143
AC_MSG_ERROR([[
1147-
*** Could not execute a simple test program. This may be a problem
1148-
*** related to locating shared libraries. Check the file 'config.log'
1149-
*** for the exact reason.]])],
1144+
Could not execute a simple test program. This may be a problem
1145+
related to locating shared libraries. Check the file 'config.log'
1146+
for the exact reason.]])],
11501147
[AC_MSG_RESULT([cross-compiling])])
11511148

11521149
# --------------------
@@ -1282,9 +1279,8 @@ then
12821279
PGAC_FUNC_POSIX_SIGNALS
12831280
if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
12841281
AC_MSG_ERROR([
1285-
*** Thread-safety requires POSIX signals, which are not supported by your
1286-
*** operating system.
1287-
])
1282+
Thread-safety requires POSIX signals, which are not supported by this
1283+
operating system.])
12881284
fi
12891285
fi
12901286

@@ -1365,12 +1361,11 @@ if test x"$template" != x"win32"
13651361
then
13661362
AC_MSG_WARN([
13671363
*** Skipping thread test program. --enable-thread-safety-force was used.
1368-
*** Run the program in src/test/thread on the your machine and add
1369-
proper locking function calls to your applications to guarantee thread
1370-
safety.
1364+
*** Run the program in src/test/thread on the your machine and add proper
1365+
*** locking function calls to your applications to guarantee thread safety.
13711366
])
13721367
else
1373-
AC_MSG_WARN([*** Skipping thread test on Win32])
1368+
AC_MSG_WARN([*** skipping thread test on Win32])
13741369
fi
13751370
elif test "$enable_thread_safety" = yes; then
13761371
if test x"$template" != x"win32"
@@ -1384,15 +1379,14 @@ LIBS="$LIBS $PTHREAD_LIBS"
13841379
AC_TRY_RUN([#include "$srcdir/src/test/thread/thread_test.c"],
13851380
[AC_MSG_RESULT(yes)],
13861381
[AC_MSG_RESULT(no)
1387-
AC_MSG_ERROR([
1388-
*** Thread test program failed. Your platform is not thread-safe.
1389-
*** Check the file 'config.log'for the exact reason.
1390-
***
1391-
*** You can use the configure option --enable-thread-safety-force
1392-
*** to force threads to be enabled. However, you must then run
1393-
*** the program in src/test/thread and add locking function calls
1394-
*** to your applications to guarantee thread safety.
1395-
])],
1382+
AC_MSG_ERROR([thread test program failed
1383+
This platform is not thread-safe. Check the file 'config.log'for the
1384+
exact reason.
1385+
1386+
You can use the configure option --enable-thread-safety-force to force
1387+
threads to be enabled. But you must then run the program in
1388+
src/test/thread and add locking function calls to your applications to
1389+
guarantee thread safety.])],
13961390
[AC_MSG_RESULT(maybe)
13971391
AC_MSG_WARN([
13981392
*** Skipping thread test program because of cross-compile build.
@@ -1401,7 +1395,7 @@ AC_TRY_RUN([#include "$srcdir/src/test/thread/thread_test.c"],
14011395
CFLAGS="$_CFLAGS"
14021396
LIBS="$_LIBS"
14031397
else
1404-
AC_MSG_WARN([*** Skipping thread test on Win32])
1398+
AC_MSG_WARN([*** skipping thread test on Win32])
14051399
fi
14061400
fi
14071401

@@ -1442,7 +1436,7 @@ AC_CONFIG_COMMANDS([check_win32_symlinks],[
14421436
for FILE in $CONFIG_LINKS
14431437
do
14441438
# test -e works for symlinks in the MinGW console
1445-
test -e `expr "$FILE" : '\([[^:]]*\)'` || AC_MSG_WARN([*** link for $FILE - please fix by hand])
1439+
test -e `expr "$FILE" : '\([[^:]]*\)'` || AC_MSG_WARN([*** link for $FILE -- please fix by hand])
14461440
done
14471441
])
14481442
fi

0 commit comments

Comments
 (0)