-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Vincent Torri on 12/26/2006 10:39 AM: > > Hey, > > I've written an m4 macro to check if stlport 5.1 is installed or not. > The m4 file is attached. > dnl > dnl AM_CHECK_STLPORT(platform, prefix [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) You should not need to pass platform to the macro, as it is already available as a shell variable. > dnl Test for STLport 5.0 and define STLPORT_LIBS and STLPORT_CFLAGS. > dnl > AC_DEFUN([AM_CHECK_STLPORT], The AM_* namespace is reserved for automake. You should not reuse that prefix, but invent one more appropriate for your package; perhaps STL_CHECK_STLPORT. > dnl > dnl Get the name of the library with respect > dnl to the platform and the version of STLport. > dnl > case "$1" in > *bsd* | linux* | irix* | solaris* ) Gross. Have you considered using libtool? And even if you don't use libtool, hard-coding platforms like this is not very portable, and severely limits the utility of your macro. > ;; > [[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]* | mingw32* | mks*) > if test x"${core_debug_mode}" = x"yes" ; then > if test x"${with_stlport_lib_debug_name_arg}" = x"yes" ; then > STLPORT_LIB_NAME=${with_stlport_lib_name} > else > STLPORT_LIB_NAME="libstlportg.5.1.a" This only finds a static library, but cygwin supports shared libraries (and in your case, you probably want to prefer the shared version). > dnl We check the headers, then the library. > stlport_lib_fullname=${stlport_libdir_path}/${STLPORT_LIB_NAME} > saved_CPPFLAGS="${CPPFLAGS}" > CPPFLAGS="${CPPFLAGS} -I${stlport_includedir_path}" > AC_CHECK_HEADERS( Here's where your caching occurs. Your nested invocation is remembering the results of the outer invocation, because AC_CHECK_* is given the same parameters between the two runs. I'm not sure how I would improve things, but you are right that calling your current macro in a nested manner runs afoul of caching rules. - -- Life is short - so eat dessert first! Eric Blake ebb9@xxxxxxx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD4DBQFFkd2J84KuGfSFAYARAkY2AJ9w6pX0yg3kf3S5DZmVVuwpdqyyVQCXbRN5 TcmhM5LyZ4o6/NBN960zfA== =qZRr -----END PGP SIGNATURE----- _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf