GNOME Bugzilla – Bug 131270
pkg-config-ification patch (alsa, esd, shout2, ogg, speex, ...)
Last modified: 2005-08-15 01:57: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)
Created attachment 23280 [details] [review] CFLAGS ... detecting via pkg-config autoconf macros
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)
Upgrading the priority level to high and adding the PATCH keyword.
Stephane, can you add a patch for all those other libs too please ? Then I can commit them. thanks Thomas
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)
Created attachment 25254 [details] [review] use pkg-config for shout2, freetype2, esound, alsa
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.
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 ?!
Created attachment 25255 [details] [review] pkg-config patch for : ogg, alsa, esd, speex, ...
Created attachment 25454 [details] [review] same but now with fallbacks to old detection method
Created attachment 25457 [details] [review] same, less a typo on FT2 detection (missing [])
thanks, commited to cvs, closing.