Re: [patch 26/39] libgc update for configure.in

"Aleksey Demakov" <[email protected]> Sun, 4 Feb 2007 14:12:12 +0600
Newsgroups gmane.comp.gnu.dotgnu.developer
Message-ID <[email protected]>
Hi Robert,

If you make changes to libgc it might make sense to push them
also upstream to Hans Boehm.

Regards,
Aleksey

2007/2/4, Robert Schwebel <[email protected]>:
> Cleanup configure.in in libgc/.
>
> * We replace obsolete macros by current ones, as suggested by autoupdate
>   (INCLUDES->AM_CPPFLAGS, AC_TRY_COMPILE->AC_COMPILE_IFELSE, AC_OUTPUT
>   without arguments)
>
> * add a test that checks for sed
>
> Signed-off-by: Robert Schwebel <[email protected]>
>
> ---
>
>  libgc/configure.in |   34 +++++++++++++++++++---------------
>  1 file changed, 19 insertions(+), 15 deletions(-)
>
> Index: libgc/configure.in
> ===================================================================
> --- libgc/configure.in.orig
> +++ libgc/configure.in
> @@ -17,11 +17,11 @@ dnl Process this file with autoconf to p
>  # Initialization
>  # ==============
>
> -AC_INIT(gc,6.8,[email protected])
> +AC_INIT([gc],[6.8],[[email protected]])
>      ## version must conform to [0-9]+[.][0-9]+(alpha[0-9]+)?
>  AC_CONFIG_SRCDIR(gcj_mlc.c)
>  AC_CANONICAL_TARGET
> -AC_PREREQ(2.53)
> +AC_PREREQ(2.61)
>  AC_REVISION($Revision: 1.10 $)
>  GC_SET_VERSION
>  AM_INIT_AUTOMAKE
> @@ -36,9 +36,12 @@ AM_PROG_AS
>  AC_CHECK_TOOL(AR, ar)
>  AC_CHECK_TOOL(RANLIB, ranlib, :)  # :)
>
> -AC_PROG_INSTALL
> +AC_PATH_PROGS(SED, sed,, $PATH)
> +if test -z "$SED"; then
> +  AC_MSG_ERROR([sed could not be found, please install])
> +fi
>
> -AM_MAINTAINER_MODE
> +AC_PROG_INSTALL
>
>  . [$]{srcdir}/configure.host
>
> @@ -67,7 +70,7 @@ AC_ARG_ENABLE(cplusplus,
>  [  --enable-cplusplus          install C++ support],
>  )
>
> -INCLUDES=-I${srcdir}/include
> +AM_CPPFLAGS=-I${srcdir}/include
>  THREADDLLIBS=
>  ## Libraries needed to support dynamic loading and/or threads.
>  case "$THREADS" in
> @@ -112,12 +115,12 @@ case "$THREADS" in
>       *-*-freebsd*)
>         AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
>         AC_DEFINE(GC_FREEBSD_THREADS)
> -       INCLUDES="$INCLUDES -pthread"
> +       AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
>         THREADDLLIBS=-pthread
>         ;;
>       *-*-kfreebsd*-gnu)
>         AC_DEFINE(GC_FREEBSD_THREADS)
> -       INCLUDES="$INCLUDES -pthread"
> +       AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
>         THREADDLLIBS=-pthread
>         AC_DEFINE(_REENTRANT)
>          if test "${enable_parallel_mark}" = yes; then
> @@ -158,7 +161,7 @@ case "$THREADS" in
>           # May want to enable it in other cases, too.
>           # Measurements havent yet been done.
>         fi
> -       INCLUDES="$INCLUDES -pthread"
> +       AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
>         THREADDLLIBS="-lpthread -lrt"
>         ;;
>        *)
> @@ -183,7 +186,7 @@ case "$THREADS" in
>      AC_DEFINE(GC_DGUX386_THREADS)
>      AC_DEFINE(DGUX_THREADS)
>      # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread
> -    INCLUDES="-pthread $INCLUDES"
> +    AM_CPPFLAGS="-pthread $AM_CPPFLAGS"
>      ;;
>   aix)
>      THREADS=posix
> @@ -208,11 +211,11 @@ esac
>  AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
>
>  AC_MSG_CHECKING(for xlc)
> -AC_TRY_COMPILE([],[
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
>   #ifndef __xlC__
>   # error
>   #endif
> -], [compiler_xlc=yes], [compiler_xlc=no])
> +]])],[compiler_xlc=yes],[compiler_xlc=no])
>  AC_MSG_RESULT($compiler_xlc)
>  AM_CONDITIONAL(COMPILER_XLC,test $compiler_xlc = yes)
>  if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then
> @@ -268,7 +271,7 @@ AM_CONDITIONAL(CPLUSPLUS, test "${enable
>
>  AC_SUBST(CXX)
>
> -AC_SUBST(INCLUDES)
> +AC_SUBST(AM_CPPFLAGS)
>  AC_SUBST(CXXINCLUDES)
>
>  # Configuration of shared libraries
> @@ -486,10 +489,11 @@ fi
>
>  AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
>
> -AC_OUTPUT([Makefile doc/Makefile include/Makefile],,
> -srcdir=${srcdir}
> +AC_CONFIG_FILES([Makefile doc/Makefile include/Makefile])
> +AC_CONFIG_COMMANDS([default],[],[srcdir=${srcdir}
>  host=${host}
>  CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
>  CC="${CC}"
>  DEFS="$DEFS"
> -)
> +])
> +AC_OUTPUT
>
> --
>  Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
>  Pengutronix - Linux Solutions for Science and Industry
>    Handelsregister:  Amtsgericht Hildesheim, HRA 2686
>      Hannoversche Str. 2, 31134 Hildesheim, Germany
>    Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9
>
> _______________________________________________
> Developers mailing list
> [email protected]
> http://dotgnu.org/mailman/listinfo/developers
>