-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanks a lot for your kind reply! Eric Blake wrote: | Sam Steingold <sds <at> gnu.org> writes: | | I noticed you are already trying to collapse the AC_MSG* by using | AC_CACHE_CHECK, and replacing the obsolete AC_TRY_COMPILE with | AC_COMPILE_IFELSE - good. are you watching CLISP development? :-) | AC_DEFUN([CL_CHECK],[dnl | AC_CACHE_CHECK([for $2],[$3], | [$1([AC_LANG_PROGRAM([$4],[$5])],[$3=yes], [$3=no])]) | AS_IF([test $$3 = yes], [$6], [$7]) | ]) | | AC_DEFUN([CL_COMPILE_CHECK], [CL_CHECK([AC_COMPILE_IFELSE],$@)]) | AC_DEFUN([CL_LINK_CHECK], [CL_CHECK([AC_LINK_IFELSE],$@)]) yes, this does the trick! thanks! | m4_define([CL_DEFUN_CHECKER], | [_$0([$]1, [$]2, [$]3, [$]4, [$]5, [$]6, [$1])]) interesting. the above version is shorter and easier for me (and, more importantly, those who will come after me) to understand, so I will stick with it. |> Another question - is there a way to reuse the results of AC_LANG_PROGRAM? | | cl_program_xcheck=`cat <<\EOF | AC_LANG_PROGRAM([#include <sys/socket.h> | #include <X11/Xlib.h> | #include <X11/Xauth.h>], | [XauGetAuthByAddr(AF_INET,0,"",13,"localhost:0.0",13,"localhost:0.0");]) | EOF` this expands to ~ cl_clx_XauGetAuthByAddr_program=`cat <<\EOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <sys/socket.h> #include <X11/Xlib.h> #include <X11/Xauth.h> int main () { XauGetAuthByAddr(AF_INET,0,"",13,"localhost:0.0",13,"localhost:0.0"); ~ ; ~ return 0; } EOF` which does not look right. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIPu3yPp1Qsf2qnMcRAquaAJ9BiG0Jb8Lm6Tsf6HHKkmNqhIxqhgCfdYc4 Y3pj+4BBo4/PsG94d3lW6oI= =9E0o -----END PGP SIGNATURE----- _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf