[PATCH] configure: add AC_LANG_SOURCE call within AC_COMPILE_IFELSE
djkurtz at chromium.org
Mon Sep 23 12:00:30 PDT 2013
On Thu, Sep 19, 2013 at 9:21 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Documentation states that AC_*_IFELSE has to use AC_LANG_SOURCE or
> friends in order to generate the source code to compile.
> AC_LINK_IFELSE already handles this, thus convert AC_COMPILE_IFELSE
> to silence the final autoconf warnings.
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Reviewed-by: Daniel Kurtz <djkurtz at chromium.org>
I've been carrying the same patch locally for a while.
> While this patch is not strictly speaking necessary for the full/correct
> build of libdrm, it cuts down the configure'n'compile warnings to five.
> With the remaining being caused due to type conversion within exynos(4)
> and freedreno/kgsl(1). I planning to leave those to someone more aware
> of the respective codebase :)
> P.S. Keep me CC'd as I'm not subscribed to the list
> configure.ac | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/configure.ac b/configure.ac
> index d2e232b..43e6954 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -111,7 +111,7 @@ AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
> CFLAGS="$CFLAGS $1"
> - AC_COMPILE_IFELSE([ ], [libdrm_cc_flag=yes], [libdrm_cc_flag=no])
> + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ])], [libdrm_cc_flag=yes], [libdrm_cc_flag=no])
> if test "x$libdrm_cc_flag" = "xyes"; then
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
More information about the dri-devel