Commit 538a7c38 authored by Philip Chimento's avatar Philip Chimento

build: Modernize autogen.sh

This gets rid of the dependency on the old gnome-autogen.sh and moves
instead to the suggested autogen.sh given as an example in the
gnome-common migration guide:
https://wiki.gnome.org/Projects/GnomeCommon/Migration

https://bugzilla.gnome.org/show_bug.cgi?id=772027
parent 9fb00a1b
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -n "$srcdir" || srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=.
olddir=`pwd`
cd "$srcdir"
PKG_NAME="gjs"
REQUIRED_AUTOCONF_VERSION=2.53
REQUIRED_AUTOMAKE_VERSION=1.7.2
(test -f $srcdir/configure.ac \
&& test -f $srcdir/autogen.sh) || {
(test -f configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
echo " top-level directory"
exit 1
}
DIE=0
# This is a bit complicated here since we can't use gnome-config yet.
# It'll be easier after switching to pkg-config since we can then
# use pkg-config to find the gnome-autogen.sh script.
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
gnome_autogen=
gnome_datadir=
aclocal --install || exit 1 # autoreconf will do this automatically in future
autoreconf --verbose --force --install || exit 1
ifs_save="$IFS"; IFS=":"
for dir in $PATH ; do
test -z "$dir" && dir=.
if test -f $dir/gnome-autogen.sh ; then
gnome_autogen="$dir/gnome-autogen.sh"
gnome_datadir=`echo $dir | sed -e 's,/bin$,/share,'`
break
fi
done
IFS="$ifs_save"
cd "$olddir"
if [ "$NOCONFIGURE" = "" ]; then
"$srcdir/configure" "$@" || exit 1
if test -z "$gnome_autogen" ; 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 [ "$1" = "--help" ]; then exit 0 else
echo "Now type 'make' to compile" || exit 1
fi
else
echo "Skipping configure process."
fi
GNOME_DATADIR="$gnome_datadir" USE_GNOME2_MACROS=1 . $gnome_autogen
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment