LIBUSB -legacy only- Poll

Michael Dickens michaelld at
Tue Aug 31 08:32:33 PDT 2010

Hi Bradley -

On Aug 31, 2010, at 11:00 AM, Bradley Giesbrecht wrote:

  Wouldn't adding your desired flags to the front of
  configure.env, configure.pre_args or where ever else needed

I suppose I could change the compiler from "gcc" to "gcc
-L${prefix}/lib/libusb-legacy -L${prefix}/lib", but that seems
like an awkward solution for such a problem.  I cannot think of
another environment variable change that would provide the
desired result; there are no configure flags that would be of
help; setting USB_CFLAGS and so forth will not work because of
the ordering the's.  GNU Radio uses the GNU Autotools
for the build system, which provides a "buffer" between the
calling environment and the build environment.  Whatever the GR
configure script finds for paths are then used by the's, specifically as they are programmed, without
regard to the ordering in the calling environment.  So, even if I
set LDFLAGS (or whatever) to be ordered
"${prefix}/lib/libusb-legacy ${prefix}/lib", that ordering would
be modified in the's as they are programmed, and
hence not necessarily be what I wanted.

For the case of GNU Radio's build system, I would need to modify
the's to change the ordering.  And, then,
I/we/MacPorts would need to make similar modifications for any
other project that uses this library (not that there are any of
which I know, but hypothetically there might be).  So, a more
robust solution is to rename the library & force the other
projects to rebuild to find that new library.  In this case, I
see it as a reasonable solution because:

(1) libusb-legacy is already installed in non-standard locations.

(2) libusb-legacy is not in significant use any longer; all
(soon) ports use the 'compat' library instead.

(3) nobody has submitted tickets with issues due to (1), I would
guess primarily because of (2).

(4) external-to-MacPorts projects should be using the PKGCONFIG
files to determine the CFLAGS, LDFLAGS, and so forth for LIBUSB
(whatever version); I would hope that in this day and age,
hard-wiring paths is no longer the norm.

I hope this (most than) answers your question. - MLD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list