configure.in contains code to calculate PKG_CONFIG_PC_PATH (the default search path for .pc files) which is later on passed to the Makefile where it becomes a -D flag. The code in question is: [pc_path="$libdir/pkgconfig:$datadir/pkgconfig"] As you can see, it has double quotes around it. This is wrong because it will cause $libdir and $datadir to be partially expanded within the configure script itself. This in turn will prevent users from redefining libdir and datadir while running "make", like this: make libdir=/some/other/libdir datadir=/some/other/datadir It also causes problems if configure was generated with autoconf >= 2.60 without regenerating Makefile.am at the same time because a one-level expansion of ${datadir} becomes ${datarootdir} which isn't defined in old automake versions. The attached patch changes the code in question like this: [pc_path='${libdir}/pkgconfig:${datadir}/pkgconfig'] This way, the variables won't be expanded at all within configure; the expansion is purely in the Makefile, as mandated by GNU coding standards: http://www.gnu.org/software/autoconf/manual/html_node/Defining-Directories.html#Defining-Directories There result is no change in behaviour for the default case. All it does is fixing the redefinition of variables while running "make" and better compatibility with mixed autotools versions. Without the patch, the generated Makefile contains: pc_path = ${exec_prefix}/lib/pkgconfig:${datarootdir}/pkgconfig With the patch, it will contain what I expect: pc_path = ${libdir}/pkgconfig:${datadir}/pkgconfig I also allowed myself to remove a commented line in the same place. This is not necessary because it's just a comment, but the comment suggests something which never works (it will fail in a similar, but even more harmful way).
Created attachment 9205 [details] [review] Use single quotes and remove incorrect code from a comment.
2007-06-18 Tollef Fog Heen <tfheen@err.no> * configure.in: Fix expansion of default pc_path as per GNU coding standards. Thanks to Andreas Hanke for the fix. Freedesktop #10326
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.