From Bugzilla Helper: User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830 Description of problem: The rpm library do not provide informations about the CFLAGS or library needed for linking. Those have been changing on a regular basis. To avoid future problems please provide a shell script rpm-config installed as part of rpm-devel providing and accepting the following flags: --libs print library linking information --cflags print pre-processor and compiler flags This is trivial to do (rpm-config.in generating rpm-config as part of rpm configure process), and will allow applications using the rpm library to Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.install 7.3, try to link rpm2html against librpm 2.install 8.0, try to link rpm2html against librpm 3.install rawhide, try to link rpm2html against librpm Actual Results: a friggin mess Expected Results: rpm-config --cflags whould return the set of gcc -I options needed to compile code dependant on librpm rpm-config --libss whould return the set of gcc link options needed to link code dependant on librpm Additional info:
Created attachment 88725 [details] an attempt for a patch providing rpm-config functionalities This doesn't work as is, using @LIBS@ directly gets too many libraries. This at least shows how this could work, might need some tuning to be made working.
this would be IMMENSELY helpful for the perl-RPM2 package. better than a separate script would be to use pkg-config. it's really easy... just drop a file in /usr/lib/pkgconfig that has the data in it. it's so trivial but would really help anyone who has to link against rpm. don't know how far pkgconfig goes back, though, so maybe a separate script would be good.