|
From: Bart V. A. <bar...@gm...> - 2008-07-29 09:20:21
|
On Tue, Jul 29, 2008 at 10:14 AM, Julian Seward <js...@ac...> wrote: > On Monday 28 July 2008 16:15, Bart Van Assche wrote: >> Some DRD regression tests link against the Qt4 library, and that is >> why there is a test for Qt4 in Valgrind's configure.in. That test >> currently uses built-in autoconf macro's like AC_TRY_COMPILE(). This >> is a rather cumbersome way to find out e.g. the path of Qt4 include >> files. Would it be OK to rewrite this test using the autoconf macro's >> provided by pkg-config, e.g. PKG_CHECK_EXISTS() ? This would add an >> extra requirement however when building Valgrind, and I'm not sure >> where to document this. > > I prefer not; we spent already a lot of time and effort getting rid of > dependencies of various kinds. > > How bad does the cumbersome code look? Is it the Qt4 checking stuff > in configure.in r8465, or some other un-committed changes you have? Writing configure tests for detecting e.g. the Qt4 package compared to using pkg-config is something like reinventing the wheel. E.g. for some distro's the Qt4 include path is /usr/include, for other distro's it is /usr/include/qt4 and maybe there exist even other choices. I don't think there even exists a clean way to find out from the configure script any path a distro could come up except by using pkg-config. Additionally, sometimes additional compiler flags have to be passed to the compiler for compiling Qt4 code. Trying to figure out these flags from the configure script would be more duplication of information already known by pkg-config. As an example, the relevant info for Qt4 is as follows: $ pkg-config --cflags QtCore -DQT_SHARED -I/usr/include/QtCore $ pkg-config --libs QtCore -lQtCore -lz -lm -lrt -lpthread -ldl Bart. |