[cheese] Drop use of gnome-autogen.sh
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] Drop use of gnome-autogen.sh
- Date: Mon, 16 Feb 2015 21:43:57 +0000 (UTC)
commit bd01f899790a81596bca7dda6fb6ae3f3783fec3
Author: David King <amigadave amigadave com>
Date: Wed Jan 28 09:47:51 2015 +0000
Drop use of gnome-autogen.sh
https://wiki.gnome.org/Projects/GnomeCommon/Migration
autogen.sh | 45 ++++++++++++++++++++++++++++++++++++---------
configure.ac | 5 +++++
m4/ax_require_defined.m4 | 37 +++++++++++++++++++++++++++++++++++++
3 files changed, 78 insertions(+), 9 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 109dcff..f14e826 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,15 +4,42 @@
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
-(test -f $srcdir/src/cheese-main.vala) || {
- echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
- echo " top-level Cheese directory"
- exit 1
+(test -f $srcdir/configure.ac) || {
+ echo "**Error**: Directory "\`$srcdir\'" does not look like the top-level project directory"
+ exit 1
}
-which gnome-autogen.sh || {
- echo "You need to install gnome-common"
- exit 1
-}
+PKG_NAME=`autoconf --trace "AC_INIT:$1" "$srcdir/configure.ac"`
+
+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
+
+# if the AC_CONFIG_MACRO_DIR() macro is used, create that directory
+# This is a automake bug fixed in automake 1.13.2
+# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13514
+m4dir=`autoconf --trace 'AC_CONFIG_MACRO_DIR:$1'`
+if [ -n "$m4dir" ]; then
+ mkdir -p $m4dir
+fi
+
+set -x
+
+gtkdocize --copy || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install -Wno-portability || exit 1
+
+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
-. gnome-autogen.sh
+set +x
diff --git a/configure.ac b/configure.ac
index 2fa9baf..d5d33c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,7 @@ AC_SUBST([LIBCHEESE_GTK_LT_VERSION], [24:19:1])
#*******************************************************************************
AC_SUBST([GETTEXT_PACKAGE], [$PACKAGE_TARNAME])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [GETTEXT package name])
+AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL])
IT_PROG_INTLTOOL([0.50.0])
#*******************************************************************************
@@ -173,9 +174,11 @@ AS_IF([test "x$GLIB_MKENUMS" = "x"],
[AC_SUBST([GLIB_MKENUMS])
AC_MSG_RESULT([$GLIB_MKENUMS])])
+AX_REQUIRE_DEFINED([GOBJECT_INTROSPECTION_CHECK])
GOBJECT_INTROSPECTION_CHECK([0.6.7])
# API documentation
+AX_REQUIRE_DEFINED([GTK_DOC_CHECK])
GTK_DOC_CHECK([1.14], [--flavour no-tmpl])
# Manpage, generated with gtk-doc and xsltproc from DocBook XML.
@@ -201,9 +204,11 @@ AS_IF([test "x$enable_man" != "xno"],
AM_CONDITIONAL([ENABLE_MAN], [test "x$have_manutils" = "xyes"])
# Mallard help
+AX_REQUIRE_DEFINED([YELP_HELP_INIT])
YELP_HELP_INIT
# AppData
+AX_REQUIRE_DEFINED([APPSTREAM_XML])
APPSTREAM_XML
GLIB_GSETTINGS
diff --git a/m4/ax_require_defined.m4 b/m4/ax_require_defined.m4
new file mode 100644
index 0000000..cae1111
--- /dev/null
+++ b/m4/ax_require_defined.m4
@@ -0,0 +1,37 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_REQUIRE_DEFINED(MACRO)
+#
+# DESCRIPTION
+#
+# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
+# been defined and thus are available for use. This avoids random issues
+# where a macro isn't expanded. Instead the configure script emits a
+# non-fatal:
+#
+# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
+#
+# It's like AC_REQUIRE except it doesn't expand the required macro.
+#
+# Here's an example:
+#
+# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
+#
+# LICENSE
+#
+# Copyright (c) 2014 Mike Frysinger <vapier gentoo org>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
+ m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
+])dnl AX_REQUIRE_DEFINED
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]