Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5f433f0e
Commit
5f433f0e
authored
May 05, 2003
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #732234: Check for -Kthread.
parent
0389295d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
1 deletion
+113
-1
configure
configure
+74
-1
configure.in
configure.in
+39
-0
No files found.
configure
View file @
5f433f0e
#! /bin/sh
# From configure.in Revision: 1.40
4
.
# From configure.in Revision: 1.40
5
.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
#
...
...
@@ -3878,6 +3878,68 @@ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
echo
"
${
ECHO_T
}
$ac_cv_kpthread
"
>
&6
fi
if
test
$ac_cv_kpthread
=
no
then
# -Kthread, if available, provides the right #defines
# and linker options to make pthread_create available
# Some compilers won't report that they do not support -Kthread,
# so we need to run a program to see whether it really made the
# function available.
echo
"
$as_me
:
$LINENO
: checking whether
$CC
accepts -Kthread"
>
&5
echo
$ECHO_N
"checking whether
$CC
accepts -Kthread...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_kthread
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
ac_save_cc
=
"
$CC
"
CC
=
"
$CC
-Kthread"
if
test
"
$cross_compiling
"
=
yes
;
then
ac_cv_kthread
=
no
else
cat
>
conftest.
$ac_ext
<<
_ACEOF
#line
$LINENO
"configure"
#include "confdefs.h"
#include <pthread.h>
void* routine(void* p){return NULL;}
int main(){
pthread_t p;
if(pthread_create(&p,NULL,routine,NULL)!=0)
return 1;
(void)pthread_detach(p);
return 0;
}
_ACEOF
rm
-f
conftest
$ac_exeext
if
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_link
\"
"
)
>
&5
(
eval
$ac_link
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
ac_try
=
'./conftest$ac_exeext'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
ac_cv_kthread
=
yes
else
echo
"
$as_me
: program exited with status
$ac_status
"
>
&5
echo
"
$as_me
: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
(
exit
$ac_status
)
ac_cv_kthread
=
no
fi
rm
-f
core core.
*
*
.core conftest
$ac_exeext
conftest.
$ac_objext
conftest.
$ac_ext
fi
CC
=
"
$ac_save_cc
"
fi
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_kthread
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_kthread
"
>
&6
fi
# checks for header files
echo
"
$as_me
:
$LINENO
: checking for ANSI C header files"
>
&5
...
...
@@ -9128,6 +9190,8 @@ _ACEOF
ac_save_cc
=
"
$CC
"
if
test
"
$ac_cv_kpthread
"
=
"yes"
then
CC
=
"
$CC
-Kpthread"
elif
test
"
$ac_cv_kthread
"
=
"yes"
then
CC
=
"
$CC
-Kthread"
fi
echo
"
$as_me
:
$LINENO
: checking for pthread_t"
>
&5
echo
$ECHO_N
"checking for pthread_t...
$ECHO_C
"
>
&6
...
...
@@ -10135,6 +10199,15 @@ then
CC
=
"
$CC
-Kpthread"
cat
>>
confdefs.h
<<
\
_ACEOF
#define WITH_THREAD 1
_ACEOF
posix_threads
=
yes
THREADOBJ
=
"Python/thread.o"
elif
test
"
$ac_cv_kthread
"
=
"yes"
then
CC
=
"
$CC
-Kthread"
cat
>>
confdefs.h
<<
\
_ACEOF
#define WITH_THREAD 1
_ACEOF
posix_threads
=
yes
...
...
configure.in
View file @
5f433f0e
...
...
@@ -752,6 +752,37 @@ CC="$ac_save_cc"])
AC_MSG_RESULT($ac_cv_kpthread)
fi
if test $ac_cv_kpthread = no
then
# -Kthread, if available, provides the right #defines
# and linker options to make pthread_create available
# Some compilers won't report that they do not support -Kthread,
# so we need to run a program to see whether it really made the
# function available.
AC_MSG_CHECKING(whether $CC accepts -Kthread)
AC_CACHE_VAL(ac_cv_kthread,
[ac_save_cc="$CC"
CC="$CC -Kthread"
AC_TRY_RUN([
#include <pthread.h>
void* routine(void* p){return NULL;}
int main(){
pthread_t p;
if(pthread_create(&p,NULL,routine,NULL)!=0)
return 1;
(void)pthread_detach(p);
return 0;
}
],
ac_cv_kthread=yes,
ac_cv_kthread=no,
ac_cv_kthread=no)
CC="$ac_save_cc"])
AC_MSG_RESULT($ac_cv_kthread)
fi
dnl # check for ANSI or K&R ("traditional") preprocessor
dnl AC_MSG_CHECKING(for C preprocessor type)
dnl AC_TRY_COMPILE([
...
...
@@ -940,6 +971,8 @@ AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t,
ac_save_cc="$CC"
if test "$ac_cv_kpthread" = "yes"
then CC="$CC -Kpthread"
elif test "$ac_cv_kthread" = "yes"
then CC="$CC -Kthread"
fi
AC_MSG_CHECKING(for pthread_t)
have_pthread_t=no
...
...
@@ -1367,6 +1400,12 @@ then
AC_DEFINE(WITH_THREAD)
posix_threads=yes
THREADOBJ="Python/thread.o"
elif test "$ac_cv_kthread" = "yes"
then
CC="$CC -Kthread"
AC_DEFINE(WITH_THREAD)
posix_threads=yes
THREADOBJ="Python/thread.o"
else
if test ! -z "$with_threads" -a -d "$with_threads"
then LDFLAGS="$LDFLAGS -L$with_threads"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment