@@ -846,6 +846,7 @@ Optional Features:
846846 --enable-depend turn on automatic dependency tracking
847847 --enable-cassert enable assertion checks (for debugging)
848848 --enable-thread-safety make client libraries thread-safe
849+ --enable-thread-safety-force force thread-safety in spite of thread test failure
849850 --disable-largefile omit support for large files
850851
851852Optional Packages:
@@ -2937,11 +2938,7 @@ if test "${enable_thread_safety+set}" = set; then
29372938
29382939 case $enableval in
29392940 yes)
2940-
2941- cat >>confdefs.h <<\_ACEOF
2942- #define ENABLE_THREAD_SAFETY 1
2943- _ACEOF
2944-
2941+ :
29452942 ;;
29462943 no)
29472944 :
@@ -2958,6 +2955,40 @@ else
29582955
29592956fi;
29602957
2958+
2959+
2960+ # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
2961+ if test "${enable_thread_safety_force+set}" = set; then
2962+ enableval="$enable_thread_safety_force"
2963+
2964+ case $enableval in
2965+ yes)
2966+ :
2967+ ;;
2968+ no)
2969+ :
2970+ ;;
2971+ *)
2972+ { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
2973+ echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
2974+ { (exit 1); exit 1; }; }
2975+ ;;
2976+ esac
2977+
2978+ else
2979+ enable_thread_safety_force=no
2980+
2981+ fi;
2982+
2983+ if test "$enable_thread_safety" = yes -o
2984+ test "$enable_thread_safety_force" = yes; then
2985+ enable_thread_safety="yes"# for 'force'
2986+
2987+ cat >>confdefs.h <<\_ACEOF
2988+ #define ENABLE_THREAD_SAFETY 1
2989+ _ACEOF
2990+
2991+ fi
29612992echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
29622993echo "${ECHO_T}$enable_thread_safety" >&6
29632994
@@ -17941,7 +17972,20 @@ done
1794117972# We have to run the thread test near the end so we have all our symbols
1794217973# defined. Cross compiling throws a warning.
1794317974#
17944- if test "$enable_thread_safety" = yes; then
17975+ if test "$enable_thread_safety_force" = yes; then
17976+ { echo "$as_me:$LINENO: WARNING:
17977+ *** Skipping thread test program. --enable-thread-safety-force was used.
17978+ *** Run the program in src/tools/thread on the your machine and add
17979+ proper locking function calls to your applications to guarantee thread
17980+ safety.
17981+ " >&5
17982+ echo "$as_me: WARNING:
17983+ *** Skipping thread test program. --enable-thread-safety-force was used.
17984+ *** Run the program in src/tools/thread on the your machine and add
17985+ proper locking function calls to your applications to guarantee thread
17986+ safety.
17987+ " >&2;}
17988+ elif test "$enable_thread_safety" = yes; then
1794517989echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
1794617990echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
1794717991
@@ -17954,11 +17998,11 @@ if test "$cross_compiling" = yes; then
1795417998echo "${ECHO_T}maybe" >&6
1795517999 { echo "$as_me:$LINENO: WARNING:
1795618000*** Skipping thread test program because of cross-compile build.
17957- *** Run the program in src/tools/thread on the targetmatchine .
18001+ *** Run the program in src/tools/thread on the targetmachine .
1795818002" >&5
1795918003echo "$as_me: WARNING:
1796018004*** Skipping thread test program because of cross-compile build.
17961- *** Run the program in src/tools/thread on the targetmatchine .
18005+ *** Run the program in src/tools/thread on the targetmachine .
1796218006" >&2;}
1796318007else
1796418008 cat >conftest.$ac_ext <<_ACEOF
@@ -17988,10 +18032,22 @@ echo "$as_me:$LINENO: result: no" >&5
1798818032echo "${ECHO_T}no" >&6
1798918033 { { echo "$as_me:$LINENO: error:
1799018034*** Thread test program failed. Your platform is not thread-safe.
17991- *** Check the file 'config.log'for the exact reason." >&5
18035+ *** Check the file 'config.log'for the exact reason.
18036+ ***
18037+ *** You can use the configure option --enable-thread-safety-force
18038+ *** to force threads to be enabled. However, you must then run
18039+ *** the program in src/tools/thread and add locking function calls
18040+ *** to your applications to guarantee thread safety.
18041+ " >&5
1799218042echo "$as_me: error:
1799318043*** Thread test program failed. Your platform is not thread-safe.
17994- *** Check the file 'config.log'for the exact reason." >&2;}
18044+ *** Check the file 'config.log'for the exact reason.
18045+ ***
18046+ *** You can use the configure option --enable-thread-safety-force
18047+ *** to force threads to be enabled. However, you must then run
18048+ *** the program in src/tools/thread and add locking function calls
18049+ *** to your applications to guarantee thread safety.
18050+ " >&2;}
1799518051 { (exit 1); exit 1; }; }
1799618052fi
1799718053rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext