@@ -17876,6 +17876,65 @@ fi
17876
17876
done
17877
17877
17878
17878
17879
+ # Thread testing
17880
+
17881
+ # We have to run the thread test near the end so we have all our symbols
17882
+ # defined. Cross compiling throws a warning.
17883
+ #
17884
+ if test "$enable_thread_safety" = yes; then
17885
+ echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
17886
+ echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
17887
+
17888
+ _CFLAGS="$CFLAGS"
17889
+ _LIBS="$LIBS"
17890
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
17891
+ LIBS="$LIBS $PTHREAD_LIBS"
17892
+ if test "$cross_compiling" = yes; then
17893
+ echo "$as_me:$LINENO: result: maybe" >&5
17894
+ echo "${ECHO_T}maybe" >&6
17895
+ { echo "$as_me:$LINENO: WARNING:
17896
+ *** Skipping thread test program because of cross-compile build.
17897
+ *** Run the program in src/tools/thread on the target matchine.
17898
+ " >&5
17899
+ echo "$as_me: WARNING:
17900
+ *** Skipping thread test program because of cross-compile build.
17901
+ *** Run the program in src/tools/thread on the target matchine.
17902
+ " >&2;}
17903
+ else
17904
+ cat >conftest.$ac_ext <<_ACEOF
17905
+ #line $LINENO "configure"
17906
+ #include "confdefs.h"
17907
+ #include "src/tools/thread/thread_test.c"
17908
+ _ACEOF
17909
+ rm -f conftest$ac_exeext
17910
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17911
+ (eval $ac_link) 2>&5
17912
+ ac_status=$?
17913
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17914
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17915
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17916
+ (eval $ac_try) 2>&5
17917
+ ac_status=$?
17918
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17919
+ (exit $ac_status); }; }; then
17920
+ echo "$as_me:$LINENO: result: yes" >&5
17921
+ echo "${ECHO_T}yes" >&6
17922
+ else
17923
+ echo "$as_me: program exited with status $ac_status" >&5
17924
+ echo "$as_me: failed program was:" >&5
17925
+ cat conftest.$ac_ext >&5
17926
+ ( exit $ac_status )
17927
+ echo "$as_me:$LINENO: result: no" >&5
17928
+ echo "${ECHO_T}no" >&6
17929
+ { { echo "$as_me:$LINENO: error: Thread test program failed. Your platform is not thread-safe. See 'config.log" >&5
17930
+ echo "$as_me: error: Thread test program failed. Your platform is not thread-safe. See 'config.log" >&2;}
17931
+ { (exit 1); exit 1; }; }
17932
+ fi
17933
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17934
+ fi
17935
+ CFLAGS="$_CFLAGS"
17936
+ LIBS="$_LIBS"
17937
+ fi
17879
17938
17880
17939
# prepare build tree if outside source tree
17881
17940
# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
@@ -19112,105 +19171,3 @@ if test "$no_create" != yes; then
19112
19171
$ac_cs_success || { (exit 1); exit 1; }
19113
19172
fi
19114
19173
19115
-
19116
- # Check for gmake.
19117
- for ac_prog in gmake make
19118
- do
19119
- # Extract the first word of "$ac_prog", so it can be a program name with args.
19120
- set dummy $ac_prog; ac_word=$2
19121
- echo "$as_me:$LINENO: checking for $ac_word" >&5
19122
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19123
- if test "${ac_cv_prog_MAKE+set}" = set; then
19124
- echo $ECHO_N "(cached) $ECHO_C" >&6
19125
- else
19126
- if test -n "$MAKE"; then
19127
- ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
19128
- else
19129
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19130
- for as_dir in $PATH
19131
- do
19132
- IFS=$as_save_IFS
19133
- test -z "$as_dir" && as_dir=.
19134
- for ac_exec_ext in '' $ac_executable_extensions; do
19135
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19136
- ac_cv_prog_MAKE="$ac_prog"
19137
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19138
- break 2
19139
- fi
19140
- done
19141
- done
19142
-
19143
- fi
19144
- fi
19145
- MAKE=$ac_cv_prog_MAKE
19146
- if test -n "$MAKE"; then
19147
- echo "$as_me:$LINENO: result: $MAKE" >&5
19148
- echo "${ECHO_T}$MAKE" >&6
19149
- else
19150
- echo "$as_me:$LINENO: result: no" >&5
19151
- echo "${ECHO_T}no" >&6
19152
- fi
19153
-
19154
- test -n "$MAKE" && break
19155
- done
19156
-
19157
- if ! $MAKE -v | grep 'GNU Make' >/dev/null
19158
- then rm -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
19170
- #
19171
- # Clean, compile, run, and clean thread test directory.
19172
- # If test fails for any reason, remove Makefile.global so the user can't
19173
- # compile (to simulate a configure failure).
19174
- #
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 src/tools/thread clean >&5
19178
- then rm -f src/Makefile.global
19179
- { { echo "$as_me:$LINENO: error: Can not clean thread test directory." >&5
19180
- echo "$as_me: error: Can not clean thread test directory." >&2;}
19181
- { (exit 1); exit 1; }; }
19182
- fi
19183
- if ! $MAKE -C src/tools/thread >&5
19184
- then rm -f src/Makefile.global
19185
- { { echo "$as_me:$LINENO: error: Can not build thread test proram." >&5
19186
- echo "$as_me: error: Can not build thread test proram." >&2;}
19187
- { (exit 1); exit 1; }; }
19188
- fi
19189
- if ! src/tools/thread/thread_test >&5
19190
- then rm -f src/Makefile.global
19191
- echo "no"
19192
- echo
19193
- src/tools/thread/thread_test
19194
- echo
19195
- { { echo "$as_me:$LINENO: error: Thread test program failed. Your platform is not thread-safe." >&5
19196
- echo "$as_me: error: Thread test program failed. Your platform is not thread-safe." >&2;}
19197
- { (exit 1); exit 1; }; }
19198
- fi
19199
- if ! $MAKE -C src/tools/thread clean >&5
19200
- then rm -f src/Makefile.global
19201
- { { echo "$as_me:$LINENO: error: Can not clean thread test directory." >&5
19202
- echo "$as_me: error: Can not clean thread test directory." >&2;}
19203
- { (exit 1); exit 1; }; }
19204
- fi
19205
- echo "yes"
19206
- else
19207
- { echo "$as_me:$LINENO: WARNING:
19208
- *** Skipping thread test program because of cross-compile build.
19209
- *** Run the program in src/tools/thread on the target matchine.
19210
- " >&5
19211
- echo "$as_me: WARNING:
19212
- *** Skipping thread test program because of cross-compile build.
19213
- *** Run the program in src/tools/thread on the target matchine.
19214
- " >&2;}
19215
- fi
19216
- fi
0 commit comments