[Openais] [PATCH] build: silence automake portability warnings
Steven Dake
sdake at redhat.com
Wed Jun 17 09:16:31 PDT 2009
thanks looks good
On Wed, 2009-06-17 at 12:41 +0200, Jim Meyering wrote:
> Jan Friesse wrote:
>
> > Jim,
> > OpenAIS need some love too.
> >
> > Jim Meyering wrote:
> >> Without this patch, running automake provokes this:
> >>
> >> exec/Makefile.am:66: SHARED_LIBS:%.so.$(SONAME: non-POSIX variable name
> >> exec/Makefile.am:67: SHARED_LIBS:%.so.$(SONAME: non-POSIX variable name
>
> ;-)
> Here you go:
>
> From 32306edb72832ee689b87f4804b4da0451c48b1d Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering at redhat.com>
> Date: Wed, 17 Jun 2009 12:39:57 +0200
> Subject: [PATCH 1/2] build: silence automake portability warnings
>
> * configure.ac: Enable automake's -Wno-portability option.
> We depend on GNU make.
> ---
> configure.ac | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 02bd770..5e82912 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -5,7 +5,7 @@
> AC_PREREQ([2.61])
>
> AC_INIT([openais], [trunk], [openais at lists.osdl.org])
> -AM_INIT_AUTOMAKE
> +AM_INIT_AUTOMAKE([-Wno-portability])
>
> AC_CONFIG_SRCDIR([lib/clm.c])
> AC_CONFIG_HEADER([include/config.h include/oa_config.h])
> --
> 1.6.3.2.406.gd6a466
>
>
> From 85dd8801d285fcddcfe3e8a101a39617c982e8c0 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering at redhat.com>
> Date: Wed, 17 Jun 2009 12:40:27 +0200
> Subject: [PATCH 2/2] autogen.sh: simply to a one-liner: autoreconf -i
>
> * autogen.sh: Don't use "which" or uname, or...
> ---
> autogen.sh | 127 +-----------------------------------------------------------
> 1 files changed, 1 insertions(+), 126 deletions(-)
>
> diff --git a/autogen.sh b/autogen.sh
> index d81bca8..7f0f2eb 100755
> --- a/autogen.sh
> +++ b/autogen.sh
> @@ -1,129 +1,4 @@
> #!/bin/sh
> # Run this to generate all the initial makefiles, etc.
>
> -testProgram()
> -{
> - cmd=$1
> -
> - if [ -z "$cmd" ]; then
> - return 1;
> - fi
> -
> - arch=`uname -s`
> -
> - # Make sure the which is in an if-block... on some platforms it throws exceptions
> - #
> - # The ERR trap is not executed if the failed command is part
> - # of an until or while loop, part of an if statement, part of a &&
> - # or || list.
> - if
> - which $cmd </dev/null >/dev/null 2>&1
> - then
> - :
> - else
> - return 1
> - fi
> -
> - # The GNU standard is --version
> - if
> - $cmd --version </dev/null >/dev/null 2>&1
> - then
> - return 0
> - fi
> -
> - # Maybe it suppports -V instead
> - if
> - $cmd -V </dev/null >/dev/null 2>&1
> - then
> - return 0
> - fi
> -
> - # Nope, the program seems broken
> - return 1
> -}
> -
> -arch=`uname -s`
> -# Disable the errors on FreeBSD until a fix can be found.
> -if [ ! "$arch" = "FreeBSD" ]; then
> -set -e
> -#
> -# All errors are fatal from here on out...
> -# The shell will complain and exit on any "uncaught" error code.
> -#
> -#
> -# And the trap will ensure sure some kind of error message comes out.
> -#
> -trap 'echo ""; echo "$0 exiting due to error (sorry!)." >&2' 0
> -fi
> -
> -RC=0
> -
> -gnu="ftp://ftp.gnu.org/pub/gnu"
> -
> -# Check for Autoconf
> -for command in autoconf autoconf213 autoconf253 autoconf259
> -do
> - if
> - testProgram $command == 1
> - then
> - autoconf=$command
> - autoheader=`echo "$autoconf" | sed -e 's/autoconf/autoheader/'`
> - autom4te=`echo "$autoconf" | sed -e 's/autoconf/autmo4te/'`
> - autoreconf=`echo "$autoconf" | sed -e 's/autoconf/autoreconf/'`
> - autoscan=`echo "$autoconf" | sed -e 's/autoconf/autoscan/'`
> - autoupdate=`echo "$autoconf" | sed -e 's/autoconf/autoupdate/'`
> - ifnames=`echo "$autoconf" | sed -e 's/autoconf/ifnames/'`
> - fi
> -done
> -
> -# Check for automake
> -for command in automake19 automake-1.9 automake
> -do
> - if
> - testProgram $command
> - then
> - automake=$command
> - aclocal=`echo "$automake" | sed -e 's/automake/aclocal/'`
> -
> - fi
> -done
> -
> -if [ -z $autoconf ]; then
> - echo You must have autoconf installed to compile the openais package.
> - echo Download the appropriate package for your system,
> - echo or get the source tarball at: $gnu/autoconf/
> - exit 1
> -
> -elif [ -z $automake ]; then
> - echo You must have automake installed to compile the openais package.
> - echo Download the appropriate package for your system,
> - echo or get the source tarball at: $gnu/automake/
> - exit 1
> -fi
> -
> -# Create local copies so that the incremental updates will work.
> -rm -f ./autoconf ./automake ./autoheader
> -ln -s `which $autoconf` ./autoconf
> -ln -s `which $automake` ./automake
> -ln -s `which $autoheader` ./autoheader
> -
> -printf "$autoconf:\t"
> -$autoconf --version | head -n 1
> -
> -printf "$automake:\t"
> -$automake --version | head -n 1
> -
> -echo $aclocal $ACLOCAL_FLAGS
> -$aclocal $ACLOCAL_FLAGS
> -
> -echo $autoheader
> -$autoheader
> -
> -echo $automake --add-missing --include-deps --copy
> -$automake --add-missing --include-deps --copy
> -
> -echo $autoconf
> -$autoconf
> -
> -echo Now run ./configure
> -trap '' 0
> +autoreconf -i -v && echo Now run ./configure and make
> --
> 1.6.3.2.406.gd6a466
> _______________________________________________
> Openais mailing list
> Openais at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/openais
More information about the Openais
mailing list