Need some m4 wizardry to quote []s in configure.ac

Gaetan Nadon memsize at videotron.ca
Fri Mar 4 11:42:42 PST 2011


On Fri, 2011-03-04 at 10:50 -0800, Jeremy Huddleston wrote:

> How do I quote []s in m4?  I've tried escaping with \, 's, "s, ... I'm out of tricks...  I'm trying to update the poll() checks in libxcb and libXt to allow poll on darwin11, but the []s are getting stripped.  darwin[789]* is becoming darwin789*, and the \([^ ]*\) in sed is becoming \(^ *\) ...
> 

Check this out:

http://www.gnu.org/software/autoconf/manual/autoconf.html#Quadrigraphs

It is used in a few modules, I am not sure if this will solve the
problem, I am not an expert but it's worth a look.


> Here's what I want to do:
> 
> case $host_os in
>         # darwin through Snow Leopard has poll() but can't be used to poll character devices.
>         darwin[789]*|darwin10*) ;;
>         darwin*)
>                 _ac_xorg_macosx_version_min=`echo $CPPFLAGS $CFLAGS | sed 's/^.*-mmacosx-version-min=\([^ ]*\).*$/\1/'`
>                 if test x$_ac_xorg_macosx_version_min = x ; then
>                         _ac_xorg_macosx_version_min=$MACOSX_DEPLOYMENT_TARGET
>                 fi
>                 case $_ac_xorg_macosx_version_min in
>                         10.[0123456]|10.[0123456].*) ;;
>                         *)
>                                 AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
>                         ;;
>                 esac
>                 unset _ac_xorg_macosx_version_min
>                 ;;
>         *)
>                 AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
>         ;;
> esac
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110304/c090408e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110304/c090408e/attachment.pgp>


More information about the xorg-devel mailing list