Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9cb7b76

Browse files
committed
More cleanup of thread tests.
1 parent9d8b414 commit9cb7b76

File tree

2 files changed

+71
-56
lines changed

2 files changed

+71
-56
lines changed

‎configure

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19113,12 +19113,7 @@ if test "$no_create" != yes; then
1911319113
fi
1911419114

1911519115

19116-
#
19117-
# We have to run the thread test here because it is an external program
19118-
# that has to be runable separately for cross-compiling.
19119-
#
19120-
if test "$enable_thread_safety" = yes; then
19121-
if test cross_compiling != yes; then
19116+
# Check for gmake.
1912219117
for ac_prog in gmake make
1912319118
do
1912419119
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -19159,41 +19154,54 @@ fi
1915919154
test -n "$MAKE" && break
1916019155
done
1916119156

19162-
echo "$as_me:$LINENO: checking thread safety of required library functions." >&5
19163-
echo $ECHO_N "checking thread safety of required library functions.... $ECHO_C" >&6
19157+
if ! $MAKE -v | grep 'GNU Make' >/dev/null
19158+
thenrm -f $srcdir/src/Makefile.global
19159+
echo "$as_me:$LINENO: checking Can not find GNU Make. It is required." >&5
19160+
echo $ECHO_N "checking Can not find GNU Make. It is required.... $ECHO_C" >&6
19161+
fi
19162+
19163+
# Thread testing
19164+
19165+
# We have to run the thread test here because it is an external program
19166+
# that has to be runable separately for cross-compiling.
19167+
#
19168+
if test "$enable_thread_safety" = yes; then
19169+
if test cross_compiling != yes; then
1916419170
#
1916519171
# Clean, compile, run, and clean thread test directory.
1916619172
# If test fails for any reason, remove Makefile.global so the user can't
1916719173
# compile (to simulate a configure failure).
1916819174
#
19169-
$MAKE -C $srcdir/src/tools/thread clean >&5 ||
19170-
( rm -f src/Makefile.global
19171-
{ { echo "$as_me:$LINENO: error: Can not clean thread test directory." >&5
19175+
echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
19176+
echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
19177+
if ! $MAKE -C $srcdir/src/tools/thread clean >&5
19178+
thenrm -f $srcdir/src/Makefile.global
19179+
{ { echo "$as_me:$LINENO: error: Can not clean thread test directory." >&5
1917219180
echo "$as_me: error: Can not clean thread test directory." >&2;}
19173-
{ (exit 1); exit 1; }; }) ||
19174-
exit $?
19175-
$MAKE -C $srcdir/src/tools/thread >&5 ||
19176-
(rm -f src/Makefile.global
19177-
{ { echo "$as_me:$LINENO: error: Can not build thread test proram." >&5
19181+
{ (exit 1); exit 1; }; }
19182+
fi
19183+
if !$MAKE -C $srcdir/src/tools/thread >&5
19184+
thenrm -f$srcdir/src/Makefile.global
19185+
{ { echo "$as_me:$LINENO: error: Can not build thread test proram." >&5
1917819186
echo "$as_me: error: Can not build thread test proram." >&2;}
19179-
{ (exit 1); exit 1; }; }) ||
19180-
exit $?
19181-
$srcdir/src/tools/thread/thread_test >&5 ||
19182-
(rm -f src/Makefile.global
19183-
echo "no"
19184-
echo
19185-
$srcdir/src/tools/thread/thread_test
19186-
echo
19187-
{ { echo "$as_me:$LINENO: error: Thread test program failed. Your platform is not thread-safe." >&5
19187+
{ (exit 1); exit 1; }; }
19188+
fi
19189+
if !$srcdir/src/tools/thread/thread_test >&5
19190+
thenrm -f$srcdir/src/Makefile.global
19191+
echo "no"
19192+
echo
19193+
$srcdir/src/tools/thread/thread_test
19194+
echo
19195+
{ { echo "$as_me:$LINENO: error: Thread test program failed. Your platform is not thread-safe." >&5
1918819196
echo "$as_me: error: Thread test program failed. Your platform is not thread-safe." >&2;}
19189-
{ (exit 1); exit 1; }; }) ||
19190-
exit $?
19191-
$MAKE -C $srcdir/src/tools/thread clean >&5 ||
19192-
(rm -f src/Makefile.global
19193-
{ { echo "$as_me:$LINENO: error: Can not clean thread test directory." >&5
19197+
{ (exit 1); exit 1; }; }
19198+
fi
19199+
if !$MAKE -C $srcdir/src/tools/thread clean >&5
19200+
thenrm -f$srcdir/src/Makefile.global
19201+
{ { echo "$as_me:$LINENO: error: Can not clean thread test directory." >&5
1919419202
echo "$as_me: error: Can not clean thread test directory." >&2;}
19195-
{ (exit 1); exit 1; }; }) ||
19196-
exit $?
19203+
{ (exit 1); exit 1; }; }
19204+
fi
1919719205
echo "yes"
1919819206
else
1919919207
{ echo "$as_me:$LINENO: WARNING:

‎configure.in

Lines changed: 31 additions & 24 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.334 2004/04/2604:04:42 momjian Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.335 2004/04/2613:14:48 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1215,39 +1215,46 @@ echo >src/include/stamp-h
12151215

12161216
AC_OUTPUT
12171217

1218-
#
1218+
# Check for gmake.
1219+
AC_CHECK_PROGS(MAKE, gmake make)
1220+
if ! $MAKE -v | grep 'GNU Make' >/dev/null
1221+
thenrm -f $srcdir/src/Makefile.global
1222+
AC_MSG_CHECKING([Can not find GNU Make. It is required.])
1223+
fi
1224+
1225+
# Thread testing
1226+
12191227
# We have to run the thread test here because it is an external program
12201228
# that has to be runable separately for cross-compiling.
12211229
#
12221230
if test "$enable_thread_safety" = yes; then
12231231
if test cross_compiling != yes; then
1224-
AC_CHECK_PROGS(MAKE, gmake make)
1225-
AC_MSG_CHECKING([thread safety of required library functions.])
12261232
#
12271233
# Clean, compile, run, and clean thread test directory.
12281234
# If test fails for any reason, remove Makefile.global so the user can't
12291235
# compile (to simulate a configure failure).
12301236
#
1231-
$MAKE -C $srcdir/src/tools/thread clean >&5 ||
1232-
( rm -f src/Makefile.global
1233-
AC_MSG_ERROR([Can not clean thread test directory.])) ||
1234-
exit $?
1235-
$MAKE -C $srcdir/src/tools/thread >&5 ||
1236-
( rm -f src/Makefile.global
1237-
AC_MSG_ERROR([Can not build thread test proram.])) ||
1238-
exit $?
1239-
$srcdir/src/tools/thread/thread_test >&5 ||
1240-
( rm -f src/Makefile.global
1241-
echo "no"
1242-
echo
1243-
$srcdir/src/tools/thread/thread_test
1244-
echo
1245-
AC_MSG_ERROR([Thread test program failed. Your platform is not thread-safe.])) ||
1246-
exit $?
1247-
$MAKE -C $srcdir/src/tools/thread clean >&5 ||
1248-
( rm -f src/Makefile.global
1249-
AC_MSG_ERROR([Can not clean thread test directory.])) ||
1250-
exit $?
1237+
AC_MSG_CHECKING([thread safety of required library functions])
1238+
if ! $MAKE -C $srcdir/src/tools/thread clean >&5
1239+
thenrm -f $srcdir/src/Makefile.global
1240+
AC_MSG_ERROR([Can not clean thread test directory.])
1241+
fi
1242+
if ! $MAKE -C $srcdir/src/tools/thread >&5
1243+
thenrm -f $srcdir/src/Makefile.global
1244+
AC_MSG_ERROR([Can not build thread test proram.])
1245+
fi
1246+
if ! $srcdir/src/tools/thread/thread_test >&5
1247+
thenrm -f $srcdir/src/Makefile.global
1248+
echo "no"
1249+
echo
1250+
$srcdir/src/tools/thread/thread_test
1251+
echo
1252+
AC_MSG_ERROR([Thread test program failed. Your platform is not thread-safe.])
1253+
fi
1254+
if ! $MAKE -C $srcdir/src/tools/thread clean >&5
1255+
thenrm -f $srcdir/src/Makefile.global
1256+
AC_MSG_ERROR([Can not clean thread test directory.])
1257+
fi
12511258
echo "yes"
12521259
else
12531260
AC_MSG_WARN([

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp