autoconf
[Top][All Lists]
Advanced

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

Re: combining tests


From: Eric Blake
Subject: Re: combining tests
Date: Fri, 28 Mar 2008 22:49:57 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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

According to Sam Steingold on 3/14/2008 9:41 AM:

Hello Sam, and sorry for the delayed reply,

| the problem is no with AC_LIB_FROMPACKAGE but with AC_LIB_LINKFLAGS,
| AC_CHECK_HEADERS, and AC_SEARCH_LIBS.
|
| my problem is that cl_cv_have_ffcall is an amalgamation of other checked
| variables.
|
| are  you suggesting that what I need is
|
| AC_DEFUN([CL_FFCALL],[dnl
| AC_ARG_WITH([ffcall],
| [AC_HELP_STRING([--with-ffcall],[use FFCALL (default is YES, if
| present)])],
| [cl_use_ffcall=$withval],[cl_use_ffcall=default])
| if test $cl_use_ffcall != no; then
| AC_LIB_FROMPACKAGE(avcall,libffcall)

I'd get in the habit of consistent quoting:
AC_LIB_FROMPACKAGE([avcall],[libffcall])

| AC_LIB_FROMPACKAGE(callback,libffcall)
| AC_LIB_LINKFLAGS([avcall])
| AC_LIB_LINKFLAGS([callback])
| AC_CHECK_HEADERS(avcall.h callback.h)
| if test "$ac_cv_header_avcall_h" = yes \
| ~     -a "$ac_cv_header_callback_h" = yes

'test cond1 -a cond2' is not portable.  Use 'test cond1 && test cond2'.

| then
| cl_save_LIBS="$LIBS"
| AC_LIB_APPENDTOVAR([LIBS], [$LIBAVCALL])
| AC_LIB_APPENDTOVAR([LIBS], [$LIBCALLBACK])
| AC_SEARCH_LIBS(__builtin_avcall)
| AC_SEARCH_LIBS(trampoline_r_data0)
| if test "$ac_cv_search___builtin_avcall" = no \
| ~     -o "$ac_cv_search_trampoline_r_data0" = no

Likewise for 'test cond1 -o cond2'.

| then LIBS=$cl_save_LIBS
| fi
| fi
| AC_CACHE_CHECK([whether libffcall is installed],[cl_cv_have_ffcall],
| [if test "$ac_cv_header_avcall_h" = yes \
| ~      -a "$ac_cv_header_callback_h" = yes \
| ~      -a "$ac_cv_search___builtin_avcall" != no \
| ~      -a "$ac_cv_search_trampoline_r_data0" != no
| 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

Yes, this approach looks like it will avoid the nested messages.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkftynQACgkQ84KuGfSFAYAUIwCgwRVIoOYz7smp3NL2zSIQx8lx
lDAAoLSOvUt9vRz2VD/4w7xz7GAmnR+G
=gPh6
-----END PGP SIGNATURE-----




reply via email to

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