[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-devel] [task #14157] Installed script for automatic linking us
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-devel] [task #14157] Installed script for automatic linking using Libtool |
Date: |
Fri, 16 Sep 2016 17:34:57 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0 |
URL:
<http://savannah.gnu.org/task/?14157>
Summary: Installed script for automatic linking using Libtool
Project: GNU Astronomy Utilities
Submitted by: makhlaghi
Submitted on: Sat 17 Sep 2016 02:34:55 AM JST
Should Start On: Sat 17 Sep 2016 12:00:00 AM JST
Should be Finished on: Sat 17 Sep 2016 12:00:00 AM JST
Category: Libraries
Priority: 5 - Normal
Item Group: Enhancement
Status: Postponed
Privacy: Public
Percent Complete: 30%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Effort: 0.00
_______________________________________________________
Details:
With a recent commit, the "Automatic linking script" subsection was added to
the "Libraries". A small shell function is introduced in this section for
using Libtool to automatically link with all the necessary libraries Gnuastro
depends on. The function is shown below, (to be put in `.bashrc' and after
correcting PREFIX)
function gnuastro-gcc {
libtool --mode=link gcc $1.c $2 PREFIX/lib/libgnuastro.la -o $1
}
With this shell function instead of running something like this (in the
extreme case where all libraries would be necessary):
$ gcc myprog.c -o myprog -lgnuastro -lwcs -lcfitsio -lgsl -lgslcblas -pthread
-lm
You can just run (see the subsection for a little more detailed explanation):
$ gnuastro-gcc myprog
Libtool's `libgnuastro.la' has all the necessary information for correct
linking, we (the user) doesn't have to memorize them (or look them up in the
manual).
Here, I am proposing to create this script when running `make install' and
installing it along with the rest of Gnuastro. In the installed script we can
use environment variables like `CPPFLAGS', `LDADD' or etc, along with all the
extra information that `./configure' has found (like the compiler) to allow
people to build small Gnuastro programs much more easier.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/task/?14157>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-devel] [task #14157] Installed script for automatic linking using Libtool,
Mohammad Akhlaghi <=