bug-gnulib
[Top][All Lists]
Advanced

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

how to use AC_LIB_LINKFLAGS with a multi-library package?


From: Sam Steingold
Subject: how to use AC_LIB_LINKFLAGS with a multi-library package?
Date: Tue, 27 Nov 2007 17:48:07 -0500
User-agent: Thunderbird 2.0.0.0 (X11/20070326)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

How do I check for a package (ffcall) which consists of several
libraries (avcall and callback)?
I do not want to force the user to do pass the prefix twice:
"--with-avcall-prefix=/usr/local --with-callback-prefix=/usr/local"
I want "--with-ffcall-prefix=/usr/local" instead.

my first attempt:

AC_DEFUN([CL_FFCALL],[dnl
AC_ARG_WITH([ffcall],
AC_HELP_STRING([--with-ffcall],[use  (default is YES, if present)]),
[cl_cv_use_ffcall=$withval], [cl_cv_use_ffcall=no])
AC_CACHE_CHECK([whether to use
ffcall],[cl_cv_use_ffcall],[cl_cv_use_ffcall=yes])
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])dnl prerequisite of AC_LIB_LINKFLAGS_BODY
AC_REQUIRE([AC_LIB_RPATH])dnl prerequisite of AC_LIB_LINKFLAGS_BODY
- --->>>>>>>AC_LIB_LINKFLAGS_BODY([ffcall])dnl set LIBFFCALL et al
if test $cl_cv_use_ffcall = yes; then
AC_CACHE_CHECK([whether ffcall is present],[cl_cv_have_ffcall],[dnl
cl_cv_have_ffcall=no
AC_CHECK_HEADERS(avcall.h callback.h)
AC_SEARCH_LIBS(__builtin_avcall,avcall)
AC_SEARCH_LIBS(is_callback,callback)
if test $ac_cv_header_avcall_h = yes -a $ac_cv_header_callback_h = yes \
     -o $ac_cv_search___builtin_avcall = yes -o
$ac_cv_search_is_callback = yes
then cl_cv_have_ffcall=yes
fi
fi])])

is clearly wrong because there is no libffcall.so, one should be
checking for libavcall.so and libcallback.so instead, so
- --->>>>>>>AC_LIB_LINKFLAGS_BODY([ffcall])
should be replaced with
- --->>>>>>>AC_LIB_LINKFLAGS_BODY([avcall])
- --->>>>>>>AC_LIB_LINKFLAGS_BODY([callback])
which will add options --with-avcall-prefix and --with-callback-prefix
instead of --with-ffcall-prefix.

For a moment I thought AC_LIB_LINKFLAGS_BODY([ffcall],[avcall callback])
would do the trick, but now I doubt that: there is really no libffcall
library, so AC_LIB_LINKFLAGS_BODY will fail...

Any suggestions?

thanks.
Sam.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTJ6nPp1Qsf2qnMcRAuA8AKCDgcH9qj6Tdrt61Pf8CBhFoc22eQCeKLcC
pk7k2T5dMeIqH/xuBtaRtWQ=
=RX0E
-----END PGP SIGNATURE-----





reply via email to

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