<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Thu, 2010-01-07 at 16:24 -0800, Alan Coopersmith wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Dan Nicholson wrote:
> On Thu, Jan 7, 2010 at 4:16 PM, Matt Turner <<A HREF="mailto:mattst88@gmail.com">mattst88@gmail.com</A>> wrote:
>> On Thu, Jan 7, 2010 at 3:06 PM, Gaetan Nadon <<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>> wrote:
>>> This patch to xserver configure.ac is to increase code portability to
>>> non POSIX system by using backticks rather than $() for command
>>> substitution for BUILD_DATE and BUILD_TIME.
>>>
>> What kind of systems would these be?
>
> Older Solaris was definitely the common case where it would come up.
Yes, /bin/sh on Solaris releases up to and including Solaris 10 and
Solaris Express is a pre-POSIX bourne shell that only supports `` not $().
There are POSIX shells available, but then builders always have to remember
to run /bin/bash ./configure or /bin/ksh ./configure instead of just ./configure.
OpenSolaris and future Solaris releases make /bin/sh be ksh93 instead, so
won't have this limitation, but it will be a long time before Solaris 10
and older variants die out in the wild.
</PRE>
</BLOCKQUOTE>
For my part, not having extensive platform knowledge, I noticed that all autoconf/automake scripts use backticks. I searched all configure.ac files and there were only 2 cases, one with pkg-config (which I was unknowingly spreading) and the date/time. That reassured me it was the right thing to do.<BR>
<BR>
Finally I found this in Autoconf manual:<BR>
<BR>
<BLOCKQUOTE>
Most notably, even recent releases of Solaris don't support it: <BR>
<BR>
<PRE>
$ <TT>showrev -c /bin/sh | grep version</TT>
Command version: SunOS 5.10 Generic 121005-03 Oct 2006
$ <TT>echo $(echo blah)</TT>
syntax error: `(' unexpected
</PRE>
<BR>
nor does irix 6.5's Bourne shell: <BR>
<BR>
<PRE>
$ <TT>uname -a</TT>
IRIX firebird-image 6.5 07151432 IP22
$ <TT>echo $(echo blah)</TT>
$(echo blah)
</PRE>
</BLOCKQUOTE>
<BR>
I am glad Matt asked the question, this type of detailed information is hard to find.<BR>
<BR>
Gaetan
</BODY>
</HTML>