Hello, On Thu, 21 Apr 2016 11:13:59 -0700, Allen Martin wrote: > Unfortunately, libcrypto++ doesn't export any CFLAGS, so > PKG_CHECK_MODULES() doesn't work: > > arm@chrome~$ pkg-config --cflags libcrypto++ > > arm@chrome~$ pkg-config --libs libcrypto++ > -lcrypto++ > arm@chrome~$ pkg-config --print-variables libcrypto++ > exec_prefix > prefix > libdir > includedir > arm@chrome~$ pkg-config --variable=includedir libcrypto++ > /usr/include Ah, crap. So obviously relying on pkg-config is not an option. > > - Second, your logic assumes that libcrypto is called libcrypto++ > > while the crux of the matter is that on some platforms it is named > > libcryptopp, on others it's called libcrypto++. Of course, this can > > be solved in the configure.ac by calling PKG_CHECK_MODULES() for > > both. > > Looking at configure.ac I think there's another assumption baked in > too. The compile test uses: > > LDFLAGS="$LDFLAGS -lcryptopp -lpthread" Yes, but no, because: configure.ac: [CRYPTOLIB="cryptopp"], configure.ac: [CRYPTOLIB="crypto++"], [...] src/Makefile.am:tegrarcm_LDADD = $(LIBUSB_LIBS) -l$(CRYPTOLIB) -lpthread So the proper -lcryptopp or -lcrypto++ is added. > Well that sucks. What about a command line option to configure to > specify the libcrypto++ include path? My issue here is that if you > have the headers in a non standard location (like $HOME/include), the > compiler probably won't know how to find them either, and the compile > check will fail at configure time. Yes, of course, and it's my use case. I'm building tegracrm in the context of a build system, as a native tool (i.e built for the build machine, not cross-compiled for the target). And for such tools, we install all host libraries in some non-standard location (since we don't run as root, obviously). The solution I proposed keeps the "autodetection" mechanism that is currently in place. > I'd like to change the -isystem to a plain -I too. I think I added > that because the source code used #include "foo.h" instead of > #include <foo.h> and I didn't want to make any source code changes > with the automake changes. Sounds like a good idea. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html