bug-gnulib
[Top][All Lists]
Advanced

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

Re: new module 'libffcall'


From: Sam Steingold
Subject: Re: new module 'libffcall'
Date: Mon, 28 Jul 2008 16:35:07 -0400
User-agent: Thunderbird 2.0.0.14 (X11/20080506)

[A private ping elicited a response]

Hi Bruno

>>  http://article.gmane.org/gmane.comp.lib.gnulib.bugs:14103
>
> Sorry I didn't have time to formulate a detailed response.
> In one sentence, my main objection against this patch
> is that while clisp needs only avcall + callback from libffcall,
> other packages might want to use vacall or trampoline;
> this is not reflected in the autoconf macros that you posted.

aha - so what we need is a macro
gl_FFCALL(libs)
which will take one argument - a list of sublibs to check and clisp will do gl_FFCALL([avcall],[callback]) and others will list the libraries they want.
right?

to do this, I need to iterate through the macro arguments in m4, not in shell:

m4_define([avcall_func],[__builtin_avcall])
m4_define([callback_func],[__vacall_r])
m4_define([trampoline_func],[alloc_trampoline])
m4_define([vacall_func],[__vacall])

m4_define([check_ffcall_libs],[
 m4_ifelse($1,[],return(?!))
  AC_LIB_FROMPACKAGE($1,libffcall)
  AC_LIB_LINKFLAGS($1)
  AC_CHECK_HEADERS($1.h)
  AC_SEARCH_LIBS($1_func)
m4_define([ffcall_test],ffcall_test [ -a "$ac_cv_header_]$1[_h" = yes -a "$ac_cv_search_]$1_func[" != no])
  check_ffcall_libs(shift(@*))])

AC_DEFINE([gl_FFCALL],[
check_ffcall_libs($*)
AC_CACHE_CHECK([whether libffcall is installed],[cl_cv_have_ffcall],
[if test ffcall_test
then cl_cv_have_ffcall=yes
else cl_cv_have_ffcall=no
fi])
if test $cl_use_ffcall = yes -a $cl_cv_have_ffcall = no; then
  if [ "$ac_cv_build" = "$ac_cv_host" ]; then host_arg="";
  else host_arg=" --host=$ac_cv_host";
  fi
  FFCALL=ffcall-1.8
  AC_MSG_ERROR([despite --with-ffcall, FFCALL was not found
 Either call configure without --with-ffcall or do
  mkdir tools; cd tools; prefix=`pwd`/${ac_cv_host}
  wget http://ftp.gnu.org/pub/gnu/ffcall/${FFCALL}.tar.gz
  tar xfz ${FFCALL}.tar.gz
  cd ${FFCALL}
./configure$host_arg --prefix=\${prefix} && make && make check && make install
  cd ../..
  ./configure --with-libffcall-prefix=\${prefix} [$]*])
fi
fi;])])




reply via email to

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