diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2016-03-28 15:05:27 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2016-04-02 12:23:55 +0200 |
commit | f2b31e6b4b76e5025cf2a3771a4a9404de893451 (patch) | |
tree | ada5aa8fa8da7e5890d9b48580eaff04d7d5c33f | |
parent | af3ce0bc6552923d6449a233b8887da1e2072411 (diff) | |
download | tracker-f2b31e6b4b76e5025cf2a3771a4a9404de893451.tar.gz |
autogen.sh: Remove build time dependency on gnome-common
Follow the recommendations in
https://wiki.gnome.org/Projects/GnomeCommon/Migration
https://bugzilla.gnome.org/show_bug.cgi?id=763119
-rwxr-xr-x | autogen.sh | 108 |
1 files changed, 58 insertions, 50 deletions
diff --git a/autogen.sh b/autogen.sh index 380e4a020..c6e999390 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,60 +1,68 @@ #!/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="tracker" +cd $srcdir -(test -f $srcdir/configure.ac \ - && test -f $srcdir/autogen.sh) || { - 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 -fi +aclocal --install || exit 1 +gtkdocize --copy || exit 1 +intltoolize --force --copy --automake || exit 1 +autoreconf --verbose --force --install || exit 1 -# If no arguments are given, use those used with distcheck -# equally, use the JHBuild prefix if it is available otherwise fall -# back to the default (/usr/local) -if [ $# -eq 0 ] ; then - echo "Using distcheck arguments, none were supplied..." - - if test -n "$JHBUILD_PREFIX" ; then - echo "Using JHBuild prefix ('$JHBUILD_PREFIX')" - NEW_PREFIX="--prefix $JHBUILD_PREFIX --with-bash-completion-dir=$JHBUILD_PREFIX/share/bash-completion/completions" - fi - - NEW_ARGS="\ - --disable-nautilus-extension \ - --enable-unit-tests \ - --enable-functional-tests \ - --enable-gtk-doc \ - --enable-introspection \ - --disable-miner-rss \ - --disable-miner-evolution \ - --disable-miner-thunderbird \ - --disable-miner-firefox \ - --enable-poppler \ - --enable-exempi \ - --enable-libiptcdata \ - --enable-libjpeg \ - --enable-libtiff \ - --enable-libvorbis \ - --enable-libflac \ - --enable-libgsf \ - --enable-playlist \ - --enable-tracker-preferences \ - --enable-enca" - - set -- $NEW_PREFIX $NEW_ARGS -fi +cd "$olddir" +if [ "$NOCONFIGURE" = "" ]; then + # If no arguments are given, use those used with distcheck + # equally, use the JHBuild prefix if it is available otherwise fall + # back to the default (/usr/local) + if [ $# -eq 0 ] ; then + echo "Using distcheck arguments, none were supplied..." + + if test -n "$JHBUILD_PREFIX" ; then + echo "Using JHBuild prefix ('$JHBUILD_PREFIX')" + NEW_PREFIX="--prefix $JHBUILD_PREFIX --with-bash-completion-dir=$JHBUILD_PREFIX/share/bash-completion/completions" + fi + + NEW_ARGS="\ + --disable-nautilus-extension \ + --enable-unit-tests \ + --enable-functional-tests \ + --enable-gtk-doc \ + --enable-introspection \ + --disable-miner-rss \ + --disable-miner-evolution \ + --disable-miner-thunderbird \ + --disable-miner-firefox \ + --enable-poppler \ + --enable-exempi \ + --enable-libiptcdata \ + --enable-libjpeg \ + --enable-libtiff \ + --enable-libvorbis \ + --enable-libflac \ + --enable-libgsf \ + --enable-playlist \ + --enable-tracker-preferences \ + --enable-enca" -. gnome-autogen.sh + set -- $NEW_PREFIX $NEW_ARGS + fi + + $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 |