Hi Pete On 08-Aug-2014, at 3:23 am, Pete Batard <pete@xxxxxxx> wrote: > > Thanks. > I only reviewed changes to the existing files (I don't think I'll have a > chance to do more than this) and my one concern right now is with the > introduction of AC_PROG_CXX in configure.ac > ((https://github.com/libusb/libusb/pull/25/files#diff-67e997bcfdac55191033d57a16d1408aR39). Going by how AC_PROG_CXX is defined ( https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/C_002b_002b-Compiler.html ), it appeared that even if a C++ compiler is not installed, it will just continue with the configure script. And so it does. But LT_INIT runs a few tests, if AC_PROG_CXX is defined. And the configure fails. Removing this, is not an option, because libusb/Makefile.am now has cpp sources listed. If I remove AC_PROG_CXX, automake fails with an error: C++ source seen but 'CXX' is undefined, and error: am__fastdepCXX does not appear in AM_CONDITIONAL. > My expectation is that this is going to now force EVERYBODY to have a > C++ compiler installed, just to be able to compile libusb, which I don't > really expect to go that swimmingly with our existing users. > > Please bear in mind that some people may be (cross-)compiling libusb for > embedded and only have a C toolchain available. Thus, I don't think that > forcing everyone to install tools they don't actually need, for the > compilation of a platform they probably won't care much about, is the > way to go. And as I said, the assumption that "Everyone should have a > C++ compiler installed anyway" is quite a leap to take... > > My preferred option would be for you to try to duplicate what the > AC_PROG_CXX option does (I think it just tries to invoke the C++ > compiler with a test C++ program - may want to look at the configure > that's autogenerated when AC_PROG_CXX is added to find out what goes > into it) from within a Haiku specific conditional section. A way I see through this, is add a check in bootstrap.sh, and if we detect that the system is Haiku, add the corresponding lines (the cpp sources one, and AC_PROG_CXX) to configure.ac and Makefile.am. This seems better than playing with Makefile and Configure scripts, making them all the more complicated. I would like to know your views on this. > Granted, this is probably easier said than done, but I think, if we want > to keep existing libusb users happy, we may not have much of a choice. > > Regards, > > /Pete > Thanks Akshay Jaggi P.S. - I’m CC’ing this to the haiku-gsoc mailing list. Maybe someone there knows of a better way around this.