From 5d1e3dc14e88f446bf15a40121f3fb56bf3d62bc Mon Sep 17 00:00:00 2001 From: Timur Bakeyev Date: Tue, 16 Mar 1999 22:07:28 +0000 Subject: [PATCH] pthread_create in libc 1999-03-16 Timur Bakeyev * configure.in: Fix problem with pthread_create in libc, as running "gcc test.c -l " is not legal. --- ChangeLog | 5 +++++ ChangeLog.pre-2-0 | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ configure.in | 15 +++++++++++---- 9 files changed, 51 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d55846..debaa6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-03-16 Timur Bakeyev + + * configure.in: Fix problem with pthread_create in libc, as running + "gcc test.c -l " is not legal. + 1999-03-16 Sebastian Wilhelmi * tests/type-test.c: Added a test for the diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 2d55846..debaa6a 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +1999-03-16 Timur Bakeyev + + * configure.in: Fix problem with pthread_create in libc, as running + "gcc test.c -l " is not legal. + 1999-03-16 Sebastian Wilhelmi * tests/type-test.c: Added a test for the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2d55846..debaa6a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +1999-03-16 Timur Bakeyev + + * configure.in: Fix problem with pthread_create in libc, as running + "gcc test.c -l " is not legal. + 1999-03-16 Sebastian Wilhelmi * tests/type-test.c: Added a test for the diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 2d55846..debaa6a 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +1999-03-16 Timur Bakeyev + + * configure.in: Fix problem with pthread_create in libc, as running + "gcc test.c -l " is not legal. + 1999-03-16 Sebastian Wilhelmi * tests/type-test.c: Added a test for the diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 2d55846..debaa6a 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +1999-03-16 Timur Bakeyev + + * configure.in: Fix problem with pthread_create in libc, as running + "gcc test.c -l " is not legal. + 1999-03-16 Sebastian Wilhelmi * tests/type-test.c: Added a test for the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 2d55846..debaa6a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +1999-03-16 Timur Bakeyev + + * configure.in: Fix problem with pthread_create in libc, as running + "gcc test.c -l " is not legal. + 1999-03-16 Sebastian Wilhelmi * tests/type-test.c: Added a test for the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 2d55846..debaa6a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +1999-03-16 Timur Bakeyev + + * configure.in: Fix problem with pthread_create in libc, as running + "gcc test.c -l " is not legal. + 1999-03-16 Sebastian Wilhelmi * tests/type-test.c: Added a test for the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2d55846..debaa6a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +1999-03-16 Timur Bakeyev + + * configure.in: Fix problem with pthread_create in libc, as running + "gcc test.c -l " is not legal. + 1999-03-16 Sebastian Wilhelmi * tests/type-test.c: Added a test for the diff --git a/configure.in b/configure.in index edfc8ea..d765d2e 100644 --- a/configure.in +++ b/configure.in @@ -605,14 +605,21 @@ case $have_threads in for thread_lib in "" pthread pthreads c_r thread; do # This is not AC_CHECK_LIB to also work with function # name mangling in header files. - LIBS="$glib_save_LIBS -l$thread_lib" - IN= - test x"$thread_lib" = x || IN=" in -l$thread_lib" + if test x"$thread_lib" = x; then + add_thread_lib="" + IN="" + else + add_thread_lib="-l$thread_lib" + IN=" in -l$thread_lib" + fi + + LIBS="$glib_save_LIBS $add_thread_lib" + AC_MSG_CHECKING(for pthread_create$IN) AC_TRY_LINK([#include ], [pthread_create(NULL,NULL,NULL,NULL)], [AC_MSG_RESULT(yes) - G_THREAD_LIBS="-l$thread_lib" + G_THREAD_LIBS="$add_thread_lib" break], [AC_MSG_RESULT(no)]) done -- 2.7.4