[Cogl] [PATCH 5/8] build: Move the compiler checks and libtool initialization up

Robert Bragg robert at sixbynine.org
Tue Sep 18 07:34:53 PDT 2012


I haven't looked into this in detail but I was having some libtool
problems trying to build the wip/standalone branch in a clean build
directory because it wasn't creating a ./libtool script. Maybe this
patch needs to be double checked. Currently I can only build the
wip/standalone branch in a build directory that was autogened +
configured on master.

kind regards,
- Robert

On Mon, Sep 17, 2012 at 8:08 PM, Damien Lespiau
<damien.lespiau at gmail.com> wrote:
> From: Damien Lespiau <damien.lespiau at intel.com>
>
> It seems logical to first look for the compiler and then run the rest of
> configure script (which will use the compiler with small snippets).
>
> Same goes for the libtool initializaton, you might as well do it not too
> far from the automake one.
>
> This also happens to be preparatory work to compile cogl with an in-tree
> copy of some glib files as the glib's configure script needs those
> checks early.
> ---
>  configure.ac |   56 +++++++++++++++++++++++++++-----------------------------
>  1 files changed, 27 insertions(+), 29 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index ca61b03..e528dce 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -132,6 +132,33 @@ dnl Export the source code release status
>  dnl ================================================================
>  AC_SUBST([COGL_RELEASE_STATUS], [cogl_release_status])
>
> +dnl ================================================================
> +dnl Compiler stuff.
> +dnl ================================================================
> +AC_PROG_CC
> +AC_PROG_CPP
> +AM_PROG_CC_C_O
> +AC_ISC_POSIX
> +AC_C_CONST
> +
> +dnl     ============================================================
> +dnl     Compiler features
> +dnl     ============================================================
> +AC_MSG_CHECKING([for _Static_assert])
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_Static_assert (1, "");],
> +                                   [(void) 0])],
> +                  [AC_DEFINE([HAVE_STATIC_ASSERT], [1],
> +                             [Whether _Static_assert can be used or not])
> +                   AC_MSG_RESULT([yes])],
> +                  [AC_MSG_RESULT([no])])
> +
> +dnl ================================================================
> +dnl Libtool stuff.
> +dnl ================================================================
> +dnl AC_PROG_LIBTOOL
> +dnl LIBTOOL="$LIBTOOL --preserve-dup-deps"
> +LT_PREREQ([2.2.6])
> +LT_INIT([disable-static])
>
>  dnl ================================================================
>  dnl See what platform we are building for
> @@ -990,35 +1017,6 @@ AM_CONDITIONAL(X11_TESTS, [test "x$SUPPORT_X11" = "xyes"])
>  AM_CONDITIONAL(SUPPORT_X11, [test "x$SUPPORT_X11" = "xyes"])
>  AM_CONDITIONAL(SUPPORT_XLIB, [test "x$SUPPORT_XLIB" = "xyes"])
>
> -
> -dnl ================================================================
> -dnl Compiler stuff.
> -dnl ================================================================
> -AC_PROG_CC
> -AC_PROG_CPP
> -AM_PROG_CC_C_O
> -AC_ISC_POSIX
> -AC_C_CONST
> -
> -dnl     ============================================================
> -dnl     Compiler features
> -dnl     ============================================================
> -AC_MSG_CHECKING([for _Static_assert])
> -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_Static_assert (1, "");],
> -                                   [(void) 0])],
> -                  [AC_DEFINE([HAVE_STATIC_ASSERT], [1],
> -                             [Whether _Static_assert can be used or not])
> -                   AC_MSG_RESULT([yes])],
> -                  [AC_MSG_RESULT([no])])
> -
> -dnl ================================================================
> -dnl Libtool stuff.
> -dnl ================================================================
> -dnl AC_PROG_LIBTOOL
> -dnl LIBTOOL="$LIBTOOL --preserve-dup-deps"
> -LT_PREREQ([2.2.6])
> -LT_INIT([disable-static])
> -
>  dnl ================================================================
>  dnl I18n stuff.
>  dnl ================================================================
> --
> 1.7.7.5
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list