#18047: Add libhomfly as optional package
-------------------------------------+-------------------------------------
       Reporter:  mmarco             |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  minor              |    Milestone:  sage-6.6
      Component:  packages:          |   Resolution:
  optional                           |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  f19093fbf3e30906eac13c928f935e97cdb9d8e7
  u/mmarco/libhomfly                 |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by vbraun):

 The library uses Bohm GC, but the test program does not. Hence you shoudl
 link the library to libgc, and not the test program. In other words,
 programmers using your library shouldn't have to know what your private
 library dependencies are:
 {{{
 diff --git a/lib/Makefile.am b/lib/Makefile.am
 index 5aa6416..b4341c4 100644
 --- a/lib/Makefile.am
 +++ b/lib/Makefile.am
 @@ -1,3 +1,4 @@
  lib_LTLIBRARIES = libhomfly.la
  libhomfly_la_SOURCES = bound.c  control.c  dllink.c  knot.c  model.c
 order.c  poly.c standard.h order.h bound.h  control.h  dllink.h knot.h
 model.h order.h poly.h standard.h
 +libhomfly_la_LDFLAGS = -lgc
  include_HEADERS = homfly.h
 diff --git a/test/Makefile.am b/test/Makefile.am
 index 0394f0a..b564b7e 100644
 --- a/test/Makefile.am
 +++ b/test/Makefile.am
 @@ -2,5 +2,4 @@ bin_PROGRAMS = test_example
  test_example_SOURCES = test_example.c homfly.h
  test_example_LDADD = @top_builddir@/lib/libhomfly.la
  test_example_DEPENDENCIES = @top_builddir@/lib/libhomfly.la
 -test_example_LDFLAGS = -lgc
  TESTS = test_example
 }}}
 Apart from that it looks good.

 There are some global variables and all symbols are exported, so there is
 a reasonable chance that you'll run into global state or symbol name
 colissions when you link it into Sage. It would probably be better to hide
 all symbols that you are not going to use. Possibly later when you have a
 better idea of what you actually want to call from Sage.

--
Ticket URL: <http://trac.sagemath.org/ticket/18047#comment:13>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to