hzeller / gmrender-resurrect

Resource efficient UPnP/DLNA renderer, optimal for Raspberry Pi, CuBox or a general MediaServer. Fork of GMediaRenderer to add some features to make it usable.
GNU General Public License v2.0
841 stars 204 forks source link

include path from upnp's pkg-config ignored #167

Closed ukleinek closed 4 years ago

ukleinek commented 6 years ago

The pkg-config file of libupnp specifies for me:

$ pkg-config --cflags libupnp
-pthread -I/usr/include/upnp

In the source code the files are included using (e.g.):

#include <upnp/ithread.h>

This means that if I installed libupnp in a non-standard path the header files cannot be found.

The easy change to just drop upnp/ from all relevant includes doesn't work though because then

#include <upnp.h>

resolves to gmrender-resurrect's src/upnp.h because autoconf passes -I. to the compiler.

I think passing -I. is bad because this blurs the difference between

#include <...>

and

#include "..."

, but I guess there is little that can be done here. So I think the only way to fix this issue is to rename upnp.h.

hzeller commented 6 years ago

Suppose we renamed src/upnp.h to something else to not competing with the same name, could you see a solution ?

ukleinek commented 6 years ago

Sure, then this is easy to fix.

hzeller commented 6 years ago

Cool, can you send a pull request ?