[pitivi] Fix autogen.sh
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Fix autogen.sh
- Date: Sat, 16 Apr 2016 14:42:21 +0000 (UTC)
commit a12d917bad2ee2e49a30ecb2c57bcad562488b38
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Wed Apr 13 03:56:46 2016 +0200
Fix autogen.sh
Get rid of the common submodule as we only need AS_AC_EXPAND from there
and instead copy it to our m4 dir.
The call to autoreconf replaces the calls to libtoolize, aclocal,
autoconf and automake, as per "man autoreconf".
Fixes https://phabricator.freedesktop.org/T7382
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D906
.gitmodules | 3 --
Makefile.am | 2 +-
autogen.sh | 56 +++------------------------------------------------
common | 1 -
configure.ac | 16 ++++++--------
help/Makefile.am | 5 ++++
m4/as-ac-expand.m4 | 43 +++++++++++++++++++++++++++++++++++++++
7 files changed, 60 insertions(+), 66 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a2ee16c..9b97271 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = dist-bzip2
-SUBDIRS = bin pitivi common po tests data
+SUBDIRS = bin pitivi po tests data
ACLOCAL_AMFLAGS = -I m4
diff --git a/autogen.sh b/autogen.sh
index 3ddf2e0..69742ec 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -2,50 +2,11 @@
export PYTHON=python3
-DIE=0
package=pitivi
srcfile=pitivi/application.py
-if test ! -f common/Makefile.am;
-then
- rm -R common/
- echo "+ Setting up common submodule"
- git submodule init
-fi
-git submodule update
-
-# source helper functions
-if test ! -f common/gst-autogen.sh;
-then
- echo There is something wrong with your source tree.
- echo You are missing common/gst-autogen.sh
- exit 1
-fi
-. common/gst-autogen.sh
-
CONFIGURE_DEF_OPT=''
-autogen_options $@
-
-echo -n "+ check for build tools"
-if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
-version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autoconf-2.52" \
- "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
-version_check "automake" "$AUTOMAKE automake automake-1.7 automake-1.6 automake-1.5" \
- "ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1
-version_check "pkg-config" "" \
- "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
-version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
- "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1
-
-die_check $DIE
-
-autoconf_2_52d_check || DIE=1
-aclocal_check || DIE=1
-autoheader_check || DIE=1
-
-die_check $DIE
-
# if no arguments specified then this will be printed
if test -z "$*"; then
echo "+ checking for autogen.sh options"
@@ -55,8 +16,6 @@ if test -z "$*"; then
echo " command line."
fi
-toplevel_check $srcfile
-
build_help=true
while getopts disable-help x; do
build_help=false
@@ -70,27 +29,20 @@ if $build_help; then
fi
fi
-# This is needed to create ltmain.sh for our C bits.
-tool_run "$libtoolize" "--copy --force"
-tool_run "$aclocal" "-I common/m4 -I m4 $ACLOCAL_FLAGS"
-tool_run "$autoconf"
-tool_run "$automake" "-a -c"
+autoreconf --force --install || exit 1
-test -n "$NOCONFIGURE" && {
+if test -n "$NOCONFIGURE"; then
echo "+ skipping configure stage for package $package, as requested."
echo "+ autogen.sh done."
exit 0
-}
+fi
echo "+ running configure ... "
test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
echo
-./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
- echo " configure failed"
- exit 1
-}
+./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || exit 2
# install pre-commit hook for doing clean commits
rm -f .git/hooks/pre-commit
diff --git a/configure.ac b/configure.ac
index 4d79654..0308bda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,20 +7,21 @@ AC_PREREQ(2.52)
dnl Note for packagers: see pitivi/check.py for the dependencies
-dnl initialize autoconf
dnl when going to/from release please set the nano (fourth number) right !
dnl releases only do Wall, cvs and prerelease does Werror too
AC_INIT(Pitivi, 0.95,
https://phabricator.freedesktop.org/tag/pitivi/,
pitivi)
+dnl https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html
+LT_PREREQ([2.2.6])
LT_INIT()
-dnl initialize automake
-AM_INIT_AUTOMAKE
+dnl https://www.gnu.org/software/automake/manual/html_node/List-of-Automake-options.html
+dnl "1.6" is the minimum automake version.
+dnl "foreign" because we don't have an INSTALL file.
+AM_INIT_AUTOMAKE([1.6 foreign])
-dnl define PACKAGE_VERSION_* variables
-AS_VERSION
dnl can autoconf find the source ?
AC_CONFIG_SRCDIR([pitivi/application.py])
@@ -28,8 +29,7 @@ AC_CONFIG_SRCDIR([pitivi/application.py])
AC_SUBST_FILE(AUTHORS)
AUTHORS=$srcdir/AUTHORS
-AM_INIT_AUTOMAKE([foreign])
-AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
+AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
AC_CONFIG_MACRO_DIR([m4])
AS_AC_EXPAND(LIBDIR, $libdir)
@@ -134,8 +134,6 @@ dnl output stuff
AC_OUTPUT(
Makefile
bin/Makefile
-common/Makefile
-common/m4/Makefile
help/Makefile
pitivi/Makefile
pitivi/configure.py
diff --git a/help/Makefile.am b/help/Makefile.am
index 648d327..c6ac4b4 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -1,5 +1,10 @@
@YELP_HELP_RULES@
+# Without this, make all fails because it uses itstool which
+# is a Python2 script which can be confused by the PYTHONPATH
+# set by bin/pitivi-git-environment.sh
+PYTHONPATH = ''
+
HELP_ID = pitivi
HELP_MEDIA = \
figures/codecscontainers.jpg\
diff --git a/m4/as-ac-expand.m4 b/m4/as-ac-expand.m4
new file mode 100644
index 0000000..d6c9e33
--- /dev/null
+++ b/m4/as-ac-expand.m4
@@ -0,0 +1,43 @@
+dnl as-ac-expand.m4 0.2.0
+dnl autostars m4 macro for expanding directories using configure's prefix
+dnl thomas apestaart org
+
+dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
+dnl example
+dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
+dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
+
+AC_DEFUN([AS_AC_EXPAND],
+[
+ EXP_VAR=[$1]
+ FROM_VAR=[$2]
+
+ dnl first expand prefix and exec_prefix if necessary
+ prefix_save=$prefix
+ exec_prefix_save=$exec_prefix
+
+ dnl if no prefix given, then use /usr/local, the default prefix
+ if test "x$prefix" = "xNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ dnl if no exec_prefix given, then use prefix
+ if test "x$exec_prefix" = "xNONE"; then
+ exec_prefix=$prefix
+ fi
+
+ full_var="$FROM_VAR"
+ dnl loop until it doesn't change anymore
+ while true; do
+ new_full_var="`eval echo $full_var`"
+ if test "x$new_full_var" = "x$full_var"; then break; fi
+ full_var=$new_full_var
+ done
+
+ dnl clean up
+ full_var=$new_full_var
+ AC_SUBST([$1], "$full_var")
+
+ dnl restore prefix and exec_prefix
+ prefix=$prefix_save
+ exec_prefix=$exec_prefix_save
+])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]