[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 182f397 2/2: No -pthread flag in LDFLAGS

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 182f397 2/2: No -pthread flag in LDFLAGS
Date: Fri, 15 Dec 2017 11:41:45 -0500 (EST)

branch: master
commit 182f397362ab927cd73970ea5f696ef40db9171c
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    No -pthread flag in LDFLAGS
    When calling the `AX_PTHREAD' macro in `', we were adding
    `PTHREAD_CFLAGS' to `LDFLAGS'. This was extra, because the `-pthread' flag
    is both for the C compiler (to tell it to prepare for multiple threads) and
    the linker. Now, when Gnuastro creates the library, it only calls
    `-pthread' twice (instead of three times before). I am still trying to find
    where the extra `-pthread' comes from!
--- | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ b/
index c1e01f0..5175b71 100644
--- a/
+++ b/
@@ -96,11 +96,11 @@ CPPFLAGS="-I\$(top_srcdir)/lib $CPPFLAGS"
 # Check for pthreads and add the appropriate compilation flags. AX_PTHREAD
-# comes from the GNU Autoconf Archive's ax_pthread.m4.
+# comes from the GNU Autoconf Archive's ax_pthread.m4, see there for the
+# documentation. Note that
 AX_PTHREAD([],[AC_MSG_ERROR([AC_PACKAGE_NAME Needs POSIX Threads (pthread)])])
@@ -225,12 +225,15 @@ AC_SEARCH_LIBS([wcspih], [wcs], [],
 # These are secondary tests for more fine-grained control in libraries that
 # have already been checked. We don't need to add them to the LIBS
 # variable, so we are using AC_CHECK_LIB for these tests.
+# If the WCS library has the `wcslib_version' function.
 AC_CHECK_LIB([wcs], [wcslib_version], [has_wcslib_version=1],
              [has_wcslib_version=0], [-lcfitsio -lm])
                    [WCSLIB comes with wcslib_version])
 AC_SUBST(HAVE_WCSLIB_VERSION, [$has_wcslib_version])
+# If the pthreads library has `pthread_barrier_wait'.
 AC_CHECK_LIB([pthread], [pthread_barrier_wait], [has_pthread_barrier=1],

reply via email to

[Prev in Thread] Current Thread [Next in Thread]