GNOME Bugzilla – Bug 652981
${INTROSPECTION_GIRDIR/$datadir/\$(datadir)}: bad substitution
Last modified: 2011-06-22 15:23:36 UTC
The "bash-style" substitution as used by m4/introspection.m4 is assuming that configure is run by bash (or compatible) shells. This isn't always the case and for example on OpenBSD it's run by ksh. Running configure on FreeBSD/OpenBSD and probably others results in: ./configure[3240]: ${INTROSPECTION_GIRDIR/$datadir/\$(datadir)}: bad substitution To make this more portable, sed could be used to do the substitution instead.
Created attachment 190252 [details] [review] Use sed instead of bash for substitutions
Review of attachment 190252 [details] [review]: Note that the canonical introspection.m4 lives in gobject-introspection/m4, and this bug is fixed there. Just copy in the new version?
Uhm..if you're referring to this file: http://git.gnome.org/browse/gobject-introspection/log/m4/introspection.m4 It's not been touched in quite a while and the difference between that file and the introspection.m4 from libgtop is: --- introspection.m4 Wed Jun 15 10:19:51 2011 +++ /usr/obj/ports/libgtop2-2.28.3/libgtop-2.28.3/m4/introspection.m4 Mon Mar 14 23:08:03 2011 @@ -58,7 +58,9 @@ INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` + INTROSPECTION_GIRDIR=${INTROSPECTION_GIRDIR/$datadir/\$(datadir)} INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" + INTROSPECTION_TYPELIBDIR=${INTROSPECTION_TYPELIBDIR/$libdir/\$(libdir)} INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` Which are the substitution lines.
(In reply to comment #3) > Uhm..if you're referring to this file: > http://git.gnome.org/browse/gobject-introspection/log/m4/introspection.m4 > > It's not been touched in quite a while and the difference between that file and > the introspection.m4 from libgtop is: > > Which are the substitution lines. Makes sense; just saying that if you have other issues in the future with that file, look for fixes first in g-i. Feel free to commit the updated version to libgtop.
Will do (look at g-i first and commit my diff), thanks.
Committed.