[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 182f397 11/14: No -pthread flag in LDFLAGS
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 182f397 11/14: No -pthread flag in LDFLAGS |
Date: |
Sun, 17 Dec 2017 11:31:19 -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 `configure.ac', 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!
---
configure.ac | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index c1e01f0..5175b71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)])])
-CLIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
+LIBS="$PTHREAD_LIBS $LIBS"
CC="$PTHREAD_CC"
@@ -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])
AC_DEFINE_UNQUOTED([GAL_CONFIG_HAVE_WCSLIB_VERSION], [$has_wcslib_version],
[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],
[has_pthread_barrier=0])
AC_DEFINE_UNQUOTED([GAL_CONFIG_HAVE_PTHREAD_BARRIER], [$has_pthread_barrier],
- [gnuastro-commits] master 0bbdf6d 05/14: Minor corrections to optional dependencies, (continued)
- [gnuastro-commits] master 0bbdf6d 05/14: Minor corrections to optional dependencies, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 74dd74f 08/14: Match program's man page is built, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master c6a96b2 07/14: In citation, primarily was changed to initially, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 0487ba5 14/14: Initializing delta and dist arrays in match library, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 2631def 10/14: Minor edits in book's configuration options and intro, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master d7a7c37 12/14: Minor edits in book, acknowledgements updated, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master c448b38 04/14: Better explanation on GNU Libtool in book, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master f0a4d1e 01/14: In configure, current directory removed from PATH, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 104b657 06/14: Configuration warning if PATH includes current directory, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 481b53a 13/14: -Qunused-arguments now dealt with in CXXFLAGS, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 182f397 11/14: No -pthread flag in LDFLAGS,
Mohammad Akhlaghi <=
- [gnuastro-commits] master e9842b5 02/14: Webpage translations now fully incorporated, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master eef4e80 09/14: Arithmetic's binary operators don't need compiled types, Mohammad Akhlaghi, 2017/12/17