GNOME Bugzilla – Bug 736710
remove unnecessary executions of libtool from configure
Last modified: 2017-08-22 08:02:04 UTC
We require libtool 2.2, and from the libtool 1.9b: 2004-08-29 change log: * libtool script is now created by config.status. Instead of interrogating './libtool' from configure.ac after calling AC_PROG_LIBTOOL, use the variable names directly. We seem to have 3 of those ./libtool invocations in configure.ac.
Created attachment 286248 [details] [review] remove unnecessary ./libtool calls export_dynamic_flag_spec often contains ${wl}, so needs the eval objdir is defined anyway shrext_cmds seems to be eval'd very often...
Created attachment 287864 [details] [review] remove unnessary executions of libtool from configure Remove one more line - shrext_cmds is already defined (by libtool) inside configure.ac. (Just a reminder, the interesting case is darwin: $cat foo shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' module=yes eval std_shrext=$shrext_cmds echo "darwin yes: $std_shrext" module=no eval std_shrext=$shrext_cmds echo "darwin no: $std_shrext" shrext_cmds=".so" module=yes eval std_shrext=$shrext_cmds echo "unix: $std_shrext" $ sh foo darwin yes: .so darwin no: .dylib unix: .so )
ping? (Two years on)
Review of attachment 287864 [details] [review]: I'd like to see some explanation of why you're making this change. You're saying it helps something on Darwin? Just a one liner would be ok. The change itself looks OK to me.
I'm making the change to not make unnecessary execs of external programs from within a script, and simply to use "modern" libtool as intended. The mention of Darwin, is just to say that it is the more complicated case, but the change is still correct. (Patch has been in pkgsrc.org for 2 years, and no complaints from Darwin users or anyone else for the matter.) I happen to want to use a libtool which isn't ./libtool, but libtool from $PATH, which is a personal (pkgsrc.org) motivation for reducing the number of calls. Thanks for the review.
But this is autoconf we're talking about here, execution of external binaries happens...(goes to look at generated configure script)...actually, not as much as I thought, I guess autoconf goes to some effort to use shell builtins.
Review of attachment 287864 [details] [review]: OK. Can you fold your rationale into the commit message too for posterity? (I trust git more than the centralized relational database backing bugzilla)
My turn to drop the ball. Finally committed (now that you're changing to meson I patch configure.ac). https://git.gnome.org/browse/glib/commit/?id=2237bb451df037467c0dda400d290dc050f95df9