At the current time, the environment is using qt3 values, as in
$ env | grep QT QTDIR=/usr/lib/qt-3.3 QTINC=/usr/lib/qt-3.3/include QTLIB=/usr/lib/qt-3.3/lib $ env | grep PATH PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/bin:/usr/bin:/home/pauljohn/bin
I also have QT4 installed, and I want programs to find those libraries and include files instead of these ones.
As far as I can tell, Centos uses the pkgconfig framework to let programs ask about the preferred libraries.
$ /usr/bin/pkg-config --variable=prefix qt-mt /usr/lib/qt-3.3
And I see the file that pkgconfig is reading here:
$ cat /usr/lib/pkgconfig/qt-mt.pc prefix=/usr/lib/qt-3.3 exec_prefix=${prefix} libdir=${prefix}/lib includedir=${prefix}/include qt_config=qt warn_on release incremental link_prl nocrosscompiler dlopen_opengl minimal-config small-config medium-config large-config full-config styles tools kernel widgets dialogs iconview workspace inputmethod network canvas table xml opengl sql styles tools kernel widgets dialogs iconview workspace network canvas table xml opengl sql release dll thread largefile stl ipv6 system-mng mng system-jpeg jpeg system-png png gif system-zlib nis cups bigcodecs x11sm xshape xinerama xcursor xrandr xrender xftfreetype xkb inputmethod dylib create_prl link_prl qt warn_on depend_includepath qmake_cache x11 x11inc create_libtool create_pc moc x11lib
I do not know for sure if the environment is accessing the pkgconfig setup to get the information it has, but I know for sure that configure scripts are using pkg-config to ask which qt should be used.
Each time I build a program, then, I have to reset QTDIR, QTLIB, QTINC, and the PATH.
I guess my question is
1. is 3.3 preferred for some reason by the Centos framework? If a program looks for "qt-mt.pc", does that mean it wishes to use qt3.3 rather than qt4?
2. aside from just hand editing that file and changing the prefix to /usr/lib/qt4, how do I change the preferred QT. The qt4-devel package gives its own set of pc files, but I can't tell how they can be used in the environment..