File tree 2 files changed +36
-1
lines changed
2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 1
1
#
2
2
# Autoconf macros for configuring the build of Python extension modules
3
3
#
4
- # $PostgreSQL: pgsql/config/python.m4,v 1.11 2004/10/11 19:32:16 tgl Exp $
4
+ # $PostgreSQL: pgsql/config/python.m4,v 1.12 2005/09/26 16:48:28 momjian Exp $
5
5
#
6
6
7
7
# PGAC_PATH_PYTHON
@@ -77,4 +77,19 @@ AC_MSG_RESULT([${python_libspec} ${python_additional_libs}])
77
77
AC_SUBST ( python_libdir ) [ ] dnl
78
78
AC_SUBST ( python_libspec ) [ ] dnl
79
79
AC_SUBST ( python_additional_libs ) [ ] dnl
80
+
81
+ # threaded python is not supported on bsd's
82
+ AC_MSG_CHECKING ( whether Python is compiled with thread support )
83
+ pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
84
+ if test "$pythreads" = "1"; then
85
+ AC_MSG_RESULT ( yes )
86
+ case $host_os in
87
+ openbsd*|freebsd*)
88
+ AC_MSG_ERROR ( [ *** Threaded Python not supported on this platform ***] )
89
+ ;;
90
+ esac
91
+ else
92
+ AC_MSG_RESULT ( no )
93
+ fi
94
+
80
95
] ) # PGAC_CHECK_PYTHON_EMBED_SETUP
Original file line number Diff line number Diff line change @@ -4743,6 +4743,26 @@ echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4743
4743
echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4744
4744
4745
4745
4746
+ # threaded python is not supported on bsd's
4747
+ echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
4748
+ echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
4749
+ pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
4750
+ if test "$pythreads" = "1"; then
4751
+ echo "$as_me:$LINENO: result: yes" >&5
4752
+ echo "${ECHO_T}yes" >&6
4753
+ case $host_os in
4754
+ openbsd*|freebsd*)
4755
+ { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
4756
+ echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
4757
+ { (exit 1); exit 1; }; }
4758
+ ;;
4759
+ esac
4760
+ else
4761
+ echo "$as_me:$LINENO: result: no" >&5
4762
+ echo "${ECHO_T}no" >&6
4763
+ fi
4764
+
4765
+
4746
4766
fi
4747
4767
4748
4768
You can’t perform that action at this time.
0 commit comments