Hello, > On Sat, Jan 08, 2005 at 11:43:25AM +0100, Magnus Therning wrote: > > http://www.gnu.org/software/ac-archive/htmldoc/ac_define_dir.html a few minutes ago, I wrote about a problem (the mail is cited below). I noticed another one: the code doesn't handle spaces in path names correctly. So I suggest to correct the assignments too. An updated patch is attached to this mail. Have a nice day, Stepan Kasal ---- my previous mail: > This code contains the following: > > ifelse($3, , > AC_DEFINE_UNQUOTED($1, "$ac_define_dir"), > AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3)) > > First, the `$3' argument is underquoted. It is a description, so it could > easily contain a comma. Second, I see no need for the `ifelse'. > > So I propose the patch attached to this mail. > BTW: what does it mean that the macro is in the legacy section of the CVS? > > Regards, > Stepan
2005-01-10 Stepan Kasal <kasal@xxxxxx> * legacy/misc/ac_define_dir.m4: Add quoting to handle spaces in values correctly, use AC_SUBST/2, removed unnecessary `ifelse'. Index: legacy/misc/ac_define_dir.m4 =================================================================== RCS file: /cvsroot/ac-archive/ac-archive/legacy/misc/ac_define_dir.m4,v retrieving revision 1.4 diff -u -r1.4 ac_define_dir.m4 --- legacy/misc/ac_define_dir.m4 28 Oct 2003 22:50:09 -0000 1.4 +++ legacy/misc/ac_define_dir.m4 10 Jan 2005 14:49:38 -0000 @@ -20,11 +20,8 @@ AC_DEFUN([AC_DEFINE_DIR], [ test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - ac_define_dir=`eval echo [$]$2` - ac_define_dir=`eval echo [$]ac_define_dir` - $1="$ac_define_dir" - AC_SUBST($1) - ifelse($3, , - AC_DEFINE_UNQUOTED($1, "$ac_define_dir"), - AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3)) + ac_define_dir=`eval echo "\"[$]$2\""` + ac_define_dir=`eval echo "\"[$]ac_define_dir\""` + AC_SUBST($1, "$ac_define_dir") + AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3]) ])
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf