[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_SEARCH_LIBS optimization
From: |
Noah Misch |
Subject: |
Re: AC_SEARCH_LIBS optimization |
Date: |
Tue, 6 Sep 2005 14:53:54 -0700 |
User-agent: |
Mutt/1.5.6i |
On Tue, Sep 06, 2005 at 05:34:17PM +0200, Stepan Kasal wrote:
> Moreover, I converted the code to use AS_VAR_* macros, so that it
> allows more general application.
AS_VAR_* macros only improve generality where their first argument may or may
not bear a variable reference or command substitution. This ambiguity only
arises when the first argument contains an M4 argument substitution.
> + AC_LINK_IFELSE([], [AS_VAR_SET(ac_Search, [$ac_res])])
> + AS_VAR_SET_IF(ac_Search, [break])dnl
Here and throughout your patch, the first argument is constant, so these uses do
not improve the code.
> --- tests/semantics.at 14 May 2005 07:00:40 -0000 1.50
> +++ tests/semantics.at 6 Sep 2005 15:19:52 -0000
> @@ -83,7 +83,13 @@
> case "$ac_cv_search_cos" in
> -loser|-lust) AC_MSG_ERROR([jeez, $ac_cv_search_cos must be a cool
> library!]) ;;
> esac
> +])
>
> +
> +# AC_SEARCH_LIBS (none needed)
> +# ----------------------------
> +AT_CHECK_MACRO([AC_SEARCH_LIBS (none needed)],
> +[
> AC_SEARCH_LIBS(printf, oser c ust,,
> [AC_MSG_ERROR([cannot find `printf'])])
>
> @@ -91,7 +97,6 @@
> -loser|-lust) AC_MSG_ERROR([jeez, $ac_cv_search_printf must be a cool
> library!]) ;;
> -lc) AC_MSG_ERROR([huh, you need to give -lc?])
> esac
> -
> ])
This chunk just splits the old test case into two test cases, right?