After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 131270 - pkg-config-ification patch (alsa, esd, shout2, ogg, speex, ...)
pkg-config-ification patch (alsa, esd, shout2, ogg, speex, ...)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: High normal
: 0.8.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-01-12 21:18 UTC by Stephane Loeuillet
Modified: 2005-08-15 01:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
CFLAGS ... detecting via pkg-config autoconf macros (724 bytes, patch)
2004-01-12 21:19 UTC, Stephane Loeuillet
none Details | Review
use pkg-config for shout2, freetype2, esound, alsa (2.40 KB, patch)
2004-03-06 11:06 UTC, Stephane Loeuillet
none Details | Review
pkg-config patch for : ogg, alsa, esd, speex, ... (2.87 KB, patch)
2004-03-06 11:42 UTC, Stephane Loeuillet
none Details | Review
same but now with fallbacks to old detection method (3.18 KB, patch)
2004-03-10 13:31 UTC, Stephane Loeuillet
none Details | Review
same, less a typo on FT2 detection (missing []) (3.19 KB, patch)
2004-03-10 13:41 UTC, Stephane Loeuillet
none Details | Review

Description Stephane Loeuillet 2004-01-12 21:18:27 UTC
when compiling with --enable-experimental, it  would force --enable-shout2
and --enable-tarkin but none of them have requirement auto-detection

here is a diff which adds auto-detection of shout2 presence using pkg-config

(i don't have tarkin so can't do this part)
Comment 1 Stephane Loeuillet 2004-01-12 21:19:12 UTC
Created attachment 23280 [details] [review]
CFLAGS ... detecting via pkg-config autoconf macros
Comment 2 Stephane Loeuillet 2004-01-12 22:07:15 UTC
pkg-config should also be used for at least :

alsa, libpng, freetype2, ogg, vorbis, vorbisenc, vorbisfile

and i suppose some files in m4/ subdir need to be simply removed
(ffmpeg files as we use a CVS snapshot)

Comment 3 alexander.winston 2004-01-14 00:42:23 UTC
Upgrading the priority level to high and adding the PATCH keyword.
Comment 4 Thomas Vander Stichele 2004-02-24 15:10:41 UTC
Stephane,

can you add a patch for all those other libs too please ? Then I can
commit them.

thanks
Thomas
Comment 5 Stephane Loeuillet 2004-03-06 11:04:14 UTC
first, sorry for the late answer

it seems libpng detection already uses pkg-config.
'shout2'
'freetype2' detectection used AC_CHECK_FT2 from freetype2.m4
'ogg' detection used XIPH_PATH_OGG from ogg.m4
'alsa' used AM_PATH_ALSA
'esound' used AM_PATH_ESD

'audiofile' and mad/id3tag use a bastard detection routine using first
pkg-config then audiofile-config/lib+header check as a fall-back.
(really needed or is a clean-up prefered ?)

more to come


checking for freetype2 >= 2.0.9... yes
checking FT2_CFLAGS... -I/usr/include/freetype2
checking FT2_LIBS... -lfreetype -lz

checking for ogg >= 1.0... yes
checking OGG_CFLAGS...
checking OGG_LIBS... -logg

checking for alsa >= 0.9.1... yes
checking ALSA_CFLAGS... -I/usr/include/alsa
checking ALSA_LIBS... -lasound -lm -ldl -lpthread

checking for esound >= 0.2.12... yes
checking ESD_CFLAGS...
checking ESD_LIBS... -lesd -laudiofile -lm

checking for shout >= 2.0... Package shout was not found in the
pkg-config search path.
Perhaps you should add the directory containing `shout.pc'
to the PKG_CONFIG_PATH environment variable
No package 'shout' found
configure: *** These plugins will not be built: shout2send

(i don't have it installed anymore)

perhaps after this patch the following m4/ files should go away :
freetype2, ogg, gst-alsa, esd, gst-shout2.
libdv.m4 seems unused

some detection only used one variable (XXX_CFLAGS) to store both
CFLAGS and LIBS, as pkg-config separate them, some Makefile.in would
need some love after this patch. (OGG is an example of such a beast)
Comment 6 Stephane Loeuillet 2004-03-06 11:06:59 UTC
Created attachment 25254 [details] [review]
use pkg-config for shout2, freetype2, esound, alsa
Comment 7 Stephane Loeuillet 2004-03-06 11:14:25 UTC
03/06/04 06:06 patch also changes ogg to use pkg-config (forgot it in
the comment)

---------------

next version would only enable speex plug-in compilation if speex
1.0.x is present (as it won't compile against 1.1.x because of an API
change)
see #135921
(it would also convert speex detection to pkg-config)

---------------

with current patch, take care of freetype2 version as they use 3
different versionning scheme (2.0.x, 9.4.x, 6.3.x). i don't really
know which one to use.
Comment 8 Stephane Loeuillet 2004-03-06 11:20:42 UTC
libpng & snapshot both detects the presence of libpng

first using pkg-config, second the old way (with an harcoded
LIBPNG_LIBS, which is bad)

anything to clean up there ?!
Comment 9 Stephane Loeuillet 2004-03-06 11:42:22 UTC
Created attachment 25255 [details] [review]
pkg-config patch for :  ogg, alsa, esd, speex, ...
Comment 10 Stephane Loeuillet 2004-03-10 13:31:30 UTC
Created attachment 25454 [details] [review]
same but now with fallbacks to old detection method
Comment 11 Stephane Loeuillet 2004-03-10 13:41:37 UTC
Created attachment 25457 [details] [review]
same, less a typo on FT2 detection (missing [])
Comment 12 Thomas Vander Stichele 2004-03-10 17:21:08 UTC
thanks, commited to cvs, closing.