From ad7bdfdc484b4273ca9c6808e1870d15e438825b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Thu, 28 Jul 2016 21:17:48 +0100 Subject: build: Use autoreconf instead gnome-autogen.sh --- autogen.sh | 42 +++++++++++++++++++++++++++--------------- configure.ac | 2 -- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/autogen.sh b/autogen.sh index 6222734..56b7d0a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,25 +1,37 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. +test -n "$srcdir" || srcdir=$(dirname "$0") +test -n "$srcdir" || srcdir=. -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. +olddir=$(pwd) -PKG_NAME="libgnomekbd" +cd $srcdir -(test -f $srcdir/configure.ac \ - && test -f $srcdir/autogen.sh \ - && test -d $srcdir/libgnomekbd) || { - echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" - echo " top-level $PKG_NAME directory" - exit 1 +(test -f configure.ac) || { + echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***" + exit 1 } -DIE=0 +# shellcheck disable=SC2016 +PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac) -if ! which gnome-autogen.sh ; then - echo "You need to install the gnome-common module and make" - echo "sure the gnome-autogen.sh script is in your \$PATH." - exit 1 +if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then + echo "*** WARNING: I am going to run 'configure' with no arguments." >&2 + echo "*** If you wish to pass any to it, please specify them on the" >&2 + echo "*** '$0' command line." >&2 + echo "" >&2 fi -REQUIRED_AUTOMAKE_VERSION=1.9 . gnome-autogen.sh +aclocal --install || exit 1 +autoreconf --verbose --force --install || exit 1 + +cd "$olddir" +if [ "$NOCONFIGURE" = "" ]; then + $srcdir/configure "$@" || exit 1 + + if [ "$1" = "--help" ]; then exit 0 else + echo "Now type 'make' to compile $PKG_NAME" || exit 1 + fi +else + echo "Skipping configure process." +fi diff --git a/configure.ac b/configure.ac index bdae02f..4b9e267 100644 --- a/configure.ac +++ b/configure.ac @@ -28,8 +28,6 @@ dnl *************************************************************************** GLIB_GSETTINGS -GNOME_COMPILE_WARNINGS - AC_ISC_POSIX AC_PROG_CC AC_PROG_CC_C_O -- cgit v1.2.1