autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iterating over arguments


From: Sam Steingold
Subject: Re: iterating over arguments
Date: Mon, 14 Sep 2009 11:49:03 -0400
User-agent: Thunderbird 2.0.0.22 (X11/20090625)

Eric Blake wrote:
Also, if you are requiring newer autoconf

how "newer"?
2.59?
2.62?

m4_define([_CL_CLISP_REQUIRE_FEATURE_1],
[_CL_CLISP_REQUIRE_FEATURE_2([$1], m4_toupper([$1]))])
m4_define([_CL_CLISP_REQUIRE_FEATURE_2],
[AC_CACHE_CHECK([for $2 in CLISP], [cl_cv_clisp_$1],
  [CLISP_SET([cl_cv_clisp_$1], [[#+$1 "yes" #-$1 "no"]])])
test $cl_cv_clisp_$1 = no && AC_MSG_ERROR([$2 is missing in CLISP])])
AC_DEFUN([CL_LISP_REQUIRE_FEATURE],
[m4_map_args_w([$1], [_CL_CLISP_REQUIRE_FEATURE_1(], [)], [
])

I don't understand this code (why is there a line break in the m4_map_args_w invocation?)
but this patch the cvs head:


Index: src/m4/clisp.m4
===================================================================
RCS file: /cvsroot/clisp/clisp/src/m4/clisp.m4,v
retrieving revision 1.13
diff -u -w -p -F^(def -r1.13 clisp.m4
--- src/m4/clisp.m4     13 Sep 2009 05:18:19 -0000      1.13
+++ src/m4/clisp.m4     14 Sep 2009 15:34:17 -0000
@@ -13,6 +13,13 @@ AC_PREREQ(2.13)
 dnl set variable $1 to the result of evaluating in clisp of $2
AC_DEFUN([CLISP_SET],[$1=`$cl_cv_clisp -q -norc -x '$2' 2>/dev/null | sed -e 's/^"//' -e 's/"$//'`])

+m4_define([_CL_CLISP_REQUIRE_FEATURE_1],
+[_CL_CLISP_REQUIRE_FEATURE_2([$1], m4_toupper([$1]))])
+m4_define([_CL_CLISP_REQUIRE_FEATURE_2],
+[AC_CACHE_CHECK([for $2 in CLISP], [cl_cv_clisp_$1],
+ [CLISP_SET([cl_cv_clisp_$1], [[#+$1 "yes" #-$1 "no"]])])
+test $cl_cv_clisp_$1 = no && AC_MSG_ERROR([no $2 in CLISP])])
+
 dnl check for a clisp installation
 dnl use --with-clisp=path if your clisp is not in the PATH
 dnl if you want to link with the full linking set,
@@ -65,7 +72,9 @@ if test "$cl_use_clisp" != "no"; then
        cl_cv_have_clisp=yes])
   fi
 fi
-m4_foreach_w([cl_feat], [$1],
-[AC_CACHE_CHECK([for cl_feat in CLISP], [cl_cv_clisp_]cl_feat,
- [CLISP_SET([cl_cv_clisp_]cl_feat,[[#+]]cl_feat[[ "yes" #-]]cl_feat[[ "no"]])])
-test $cl_cv_clisp_]cl_feat[ = no && AC_MSG_ERROR([no ]cl_feat[ in CLISP])])])
+m4_map_args_w([$1], [_CL_CLISP_REQUIRE_FEATURE_1(], [)], [
+])])
==========================================================

results in this error:
==========================================================
$ make -f Makefile.devel check-configures AUTOCONF='autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2' cd src && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src cd modules/berkeley-db && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:
cd modules/clx/new-clx && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:
cd modules/dirkey && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:
cd modules/fastcgi && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:9:CL_CLISP:ffi
cd modules/i18n && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:11:CL_CLISP:
cd modules/oracle && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:16:CL_CLISP:ffi
cd modules/pari && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:ffi
cd modules/pcre && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:
cd modules/dbus && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:ffi
cd modules/postgresql && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:ffi
cd modules/rawsock && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:11:CL_CLISP:
cd modules/readline && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:11:CL_CLISP:ffi
cd modules/regexp && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:
cd modules/syscalls && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:
cd modules/wildcard && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:ffi
cd modules/zlib && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2
 --include=/home/sds/src/clisp/current/src
configure.in:12:CL_CLISP:ffi
cd modules/gtk2 && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:11:CL_CLISP:ffi
cd modules/gdbm && autoconf --trace=CL_CLISP --trace=_CL_CLISP_REQUIRE_FEATURE_2 --include=/home/sds/src/clisp/current/src
configure.in:13:CL_CLISP:
cd src && autoheader --include=/home/sds/src/clisp/current/src
cd modules/berkeley-db && autoheader --include=/home/sds/src/clisp/current/src
cd modules/clx/new-clx && autoheader --include=/home/sds/src/clisp/current/src
cd modules/dirkey && autoheader --include=/home/sds/src/clisp/current/src
cd modules/fastcgi && autoheader --include=/home/sds/src/clisp/current/src
cd modules/i18n && autoheader --include=/home/sds/src/clisp/current/src
cd modules/oracle && autoheader --include=/home/sds/src/clisp/current/src
cd modules/pari && autoheader --include=/home/sds/src/clisp/current/src
cd modules/pcre && autoheader --include=/home/sds/src/clisp/current/src
cd modules/dbus && autoheader --include=/home/sds/src/clisp/current/src
cd modules/postgresql && autoheader --include=/home/sds/src/clisp/current/src
cd modules/rawsock && autoheader --include=/home/sds/src/clisp/current/src
cd modules/readline && autoheader --include=/home/sds/src/clisp/current/src
cd modules/regexp && autoheader --include=/home/sds/src/clisp/current/src
cd modules/syscalls && autoheader --include=/home/sds/src/clisp/current/src
cd modules/wildcard && autoheader --include=/home/sds/src/clisp/current/src
cd modules/zlib && autoheader --include=/home/sds/src/clisp/current/src
cd modules/gtk2 && autoheader --include=/home/sds/src/clisp/current/src
cd modules/gdbm && autoheader --include=/home/sds/src/clisp/current/src
cd modules/regexp/gllib && cd .. && \
(test -f aclocal.m4 || ln -s /home/sds/src/clisp/current/src/aclocal.m4 .) && \
        ln -s /home/sds/src/clisp/current/src '$cl_cv_clisp_libdir' && \
        automake gllib/Makefile && \
        rm -f '$cl_cv_clisp_libdir' && \
        (test -L aclocal.m4 && rm -f aclocal.m4 || true)
Use of uninitialized value $macro in exists at /usr/bin/automake line 4831, <GEN0> line 40. Use of uninitialized value $macro in concatenation (.) or string at /usr/bin/automake line 4831, <GEN0> line 40.
automake: ####################
automake: ## Internal Error ##
automake: ####################
automake: unrequested trace `'
automake: Please contact <address@hidden>.
 at /usr/share/automake-1.10/Automake/Channels.pm line 570
Automake::Channels::msg('automake', '', 'unrequested trace `\'') called at /usr/share/automake-1.10/Automake/ChannelDefs.pm line 191 Automake::ChannelDefs::prog_error('unrequested trace `\'') called at /usr/bin/automake line 4831 Automake::scan_autoconf_traces('configure.in') called at /usr/bin/automake line 5054
        Automake::scan_autoconf_files() called at /usr/bin/automake line 7834
make: *** [modules/regexp/gllib/Makefile.in] Error 9
==========================================================

without the --trace arguments, I get this:

cd modules/berkeley-db && autoconf --include=/home/sds/src/clisp/current/src
configure:1981: error: possibly undefined macro: m4_map_args_w
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
make: *** [modules/berkeley-db/configure] Error 1

on processing the first configure.in which calls CL_CLISP.


Thanks!

Sam.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]