pthread_create in libc
authorTimur Bakeyev <mc@bat.ru>
Tue, 16 Mar 1999 22:07:28 +0000 (22:07 +0000)
committerTimur I. Bakeyev <timur@src.gnome.org>
Tue, 16 Mar 1999 22:07:28 +0000 (22:07 +0000)
1999-03-16  Timur Bakeyev  <mc@bat.ru>

* configure.in: Fix problem with pthread_create in libc, as running
"gcc test.c -l " is not legal.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
configure.in

index 2d55846674aae86ecec3d137d9eca8455a17a608..debaa6a9a0634f8c25c00adc941242880fd14af1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-03-16  Timur Bakeyev  <mc@bat.ru>
+
+       * configure.in: Fix problem with pthread_create in libc, as running
+       "gcc test.c -l " is not legal.
+
 1999-03-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * tests/type-test.c: Added a test for the
index 2d55846674aae86ecec3d137d9eca8455a17a608..debaa6a9a0634f8c25c00adc941242880fd14af1 100644 (file)
@@ -1,3 +1,8 @@
+1999-03-16  Timur Bakeyev  <mc@bat.ru>
+
+       * configure.in: Fix problem with pthread_create in libc, as running
+       "gcc test.c -l " is not legal.
+
 1999-03-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * tests/type-test.c: Added a test for the
index 2d55846674aae86ecec3d137d9eca8455a17a608..debaa6a9a0634f8c25c00adc941242880fd14af1 100644 (file)
@@ -1,3 +1,8 @@
+1999-03-16  Timur Bakeyev  <mc@bat.ru>
+
+       * configure.in: Fix problem with pthread_create in libc, as running
+       "gcc test.c -l " is not legal.
+
 1999-03-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * tests/type-test.c: Added a test for the
index 2d55846674aae86ecec3d137d9eca8455a17a608..debaa6a9a0634f8c25c00adc941242880fd14af1 100644 (file)
@@ -1,3 +1,8 @@
+1999-03-16  Timur Bakeyev  <mc@bat.ru>
+
+       * configure.in: Fix problem with pthread_create in libc, as running
+       "gcc test.c -l " is not legal.
+
 1999-03-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * tests/type-test.c: Added a test for the
index 2d55846674aae86ecec3d137d9eca8455a17a608..debaa6a9a0634f8c25c00adc941242880fd14af1 100644 (file)
@@ -1,3 +1,8 @@
+1999-03-16  Timur Bakeyev  <mc@bat.ru>
+
+       * configure.in: Fix problem with pthread_create in libc, as running
+       "gcc test.c -l " is not legal.
+
 1999-03-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * tests/type-test.c: Added a test for the
index 2d55846674aae86ecec3d137d9eca8455a17a608..debaa6a9a0634f8c25c00adc941242880fd14af1 100644 (file)
@@ -1,3 +1,8 @@
+1999-03-16  Timur Bakeyev  <mc@bat.ru>
+
+       * configure.in: Fix problem with pthread_create in libc, as running
+       "gcc test.c -l " is not legal.
+
 1999-03-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * tests/type-test.c: Added a test for the
index 2d55846674aae86ecec3d137d9eca8455a17a608..debaa6a9a0634f8c25c00adc941242880fd14af1 100644 (file)
@@ -1,3 +1,8 @@
+1999-03-16  Timur Bakeyev  <mc@bat.ru>
+
+       * configure.in: Fix problem with pthread_create in libc, as running
+       "gcc test.c -l " is not legal.
+
 1999-03-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * tests/type-test.c: Added a test for the
index 2d55846674aae86ecec3d137d9eca8455a17a608..debaa6a9a0634f8c25c00adc941242880fd14af1 100644 (file)
@@ -1,3 +1,8 @@
+1999-03-16  Timur Bakeyev  <mc@bat.ru>
+
+       * configure.in: Fix problem with pthread_create in libc, as running
+       "gcc test.c -l " is not legal.
+
 1999-03-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * tests/type-test.c: Added a test for the
index edfc8eadb249c5a1303c75f3f6202fbab47cffa6..d765d2e0ec6e88194e852d64cf4df48d09392af1 100644 (file)
@@ -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.h>],
                                [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