diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2013-02-25 16:44:55 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2013-02-25 16:44:55 +0000 |
| commit | c9bdccbf1af01154047c479ad21bb711fa79d181 (patch) | |
| tree | ddc7c38a2b0c1e9cec6ee5b7f83ddcd2365d0c7b | |
| parent | Fix for font-family scrolling in text-tool tool-controls (bug 1122553). (diff) | |
| download | inkscape-c9bdccbf1af01154047c479ad21bb711fa79d181.tar.gz inkscape-c9bdccbf1af01154047c479ad21bb711fa79d181.zip | |
Update autotools usage:
Merge from ~jjardon/inkscape/autotools:
- configure.ac: Use aux directory to store generated files
- configure.ac: Use all the fields of AC_INIT
- configure.ac: Use new libtool syntax
- configure.ac: Replace deprecated autoconf macros
- Honor aclocal flags in the correct place
- Use upstream gettext instead the glib one
- autogen.sh: Use autoreconf instead custom script
Additional changes:
- Use -e bash option in autogen.sh to stop script if
autotools aren't available
- configure.ac: Run AC_CONFIG_* before AC_CANONICAL_HOST
Fixed bugs:
- https://launchpad.net/bugs/992047
- https://launchpad.net/bugs/168915
- https://launchpad.net/bugs/169099
- https://launchpad.net/bugs/1094576
- https://launchpad.net/bugs/628716
(bzr r12150)
| -rw-r--r-- | Makefile.am | 2 | ||||
| -rwxr-xr-x | autogen.sh | 194 | ||||
| -rw-r--r-- | configure.ac | 55 |
3 files changed, 47 insertions, 204 deletions
diff --git a/Makefile.am b/Makefile.am index 6d6b2a168..66035791a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,8 @@ AUTOMAKE_OPTIONS = foreign +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + SUBDIRS = src doc share po Graphicsdir = $(datadir)/applications diff --git a/autogen.sh b/autogen.sh index 5e9822c2c..081a5e904 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # This script does all the magic calls to automake/autoconf and # friends that are needed to configure a cvs checkout. As described in @@ -9,188 +9,26 @@ # tools and you shouldn't use this script. Just call ./configure # directly. +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. -PROJECT="Inkscape" -TEST_TYPE=-f -FILE=inkscape.spec.in +olddir=`pwd` +cd $srcdir -AUTOCONF_REQUIRED_VERSION=2.52 -AUTOMAKE_REQUIRED_VERSION=1.10 -GLIB_REQUIRED_VERSION=2.0.0 -INTLTOOL_REQUIRED_VERSION=0.17 - -srcdir=`dirname "$0"` -test -z "$srcdir" && srcdir=. -ORIGDIR=`pwd` -cd "$srcdir" - -./tools-version.sh - -check_version () -{ -MAJOR1=`echo "$1" | cut -d"." -f1`; -MINOR1=`echo "$1" | cut -s -d"." -f2`; -MAJOR2=`echo "$2" | cut -d"." -f1`; -MINOR2=`echo "$2" | cut -d"." -f2;` -test -z "$MINOR1" && MINOR1="0"; - -if [ "$MAJOR1" -gt "$MAJOR2" ] || [ "$MAJOR1" -eq "$MAJOR2" -a "$MINOR1" -ge "$MINOR2" ]; then - echo "yes (version $1)" - else - echo "Too old (found version $1)!" - DIE=1 - fi -} - -attempt_command () { - IGNORE=$1 - shift - - echo "Running $@ ..." - ERR="`$@ 2>&1`" - errcode=$? - if [ "x$IGNORE" = "x" ]; then - ERR=`echo "$ERR"` - else - ERR=`echo "$ERR" | egrep -v "$IGNORE"` - fi - if [ "x$ERR" != "x" ]; then - echo "$ERR" | awk '{print " " $0}' - fi - if [ $errcode -gt 0 ]; then - echo "Please fix the error conditions and try again." +AUTORECONF=`which autoreconf` +if test -z $AUTORECONF; then + echo "*** No autoreconf found, please install it ***" exit 1 - fi -} - -echo -echo "I am testing that you have the required versions of autoconf," -echo "automake, glib-gettextize and intltoolize. This test is not foolproof and" -echo "if anything goes wrong, there may be guidance in the file HACKING.txt" -echo - -DIE=0 - -echo -n "checking for autoconf >= $AUTOCONF_REQUIRED_VERSION ... " -if (autoconf --version) < /dev/null > /dev/null 2>&1; then - VER=`autoconf --version \ - | grep -iw autoconf | sed -n 's/.* \([0-9.]*\)[-a-z0-9]*$/\1/p'` - check_version "$VER" "$AUTOCONF_REQUIRED_VERSION" -else - echo - echo " You must have autoconf installed to compile $PROJECT." - echo " Download the appropriate package for your distribution," - echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1; -fi - -echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... " -# Prefer earlier versions just so that the earliest supported version gets test coverage by developers. -if (automake-1.11 --version) < /dev/null > /dev/null 2>&1; then - AUTOMAKE=automake-1.11 - ACLOCAL=aclocal-1.11 -elif (automake-1.10 --version) < /dev/null > /dev/null 2>&1; then - AUTOMAKE=automake-1.10 - ACLOCAL=aclocal-1.10 -elif (automake --version) < /dev/null > /dev/null 2>&1; then - # Leave unversioned automake for a last resort: it may be a version earlier - # than what we require. - # (In particular, it might mean automake 1.4: that version didn't default to - # installing a versioned name.) - AUTOMAKE=automake - ACLOCAL=aclocal -else - echo - echo " You must have automake 1.10 or newer installed to compile $PROJECT." - DIE=1 -fi -if test x$AUTOMAKE != x; then - VER=`$AUTOMAKE --version \ - | grep automake | sed -n 's/.* \([0-9.]*\)[-a-z0-9]*$/\1/p'` - check_version "$VER" "$AUTOMAKE_REQUIRED_VERSION" -fi - -echo -n "checking for glib-gettextize >= $GLIB_REQUIRED_VERSION ... " -if (glib-gettextize --version) < /dev/null > /dev/null 2>&1; then - VER=`glib-gettextize --version \ - | grep glib-gettextize | sed -n 's/.* \([0-9.]*\)/\1/p'` - check_version "$VER" "$GLIB_REQUIRED_VERSION" -else - echo - echo " You must have glib-gettextize installed to compile $PROJECT." - echo " glib-gettextize is part of glib-2.0, so you should already" - echo " have it. Make sure it is in your PATH." - DIE=1 fi -echo -n "checking for intltool >= $INTLTOOL_REQUIRED_VERSION ... " -if (intltoolize --version) < /dev/null > /dev/null 2>&1; then - VER=`intltoolize --version \ - | grep intltoolize | sed -n 's/.* \([0-9.]*\)/\1/p'` - check_version "$VER" "$INTLTOOL_REQUIRED_VERSION" -else - echo - echo " You must have intltool installed to compile $PROJECT." - echo " Get the latest version from" - echo " ftp://ftp.gnome.org/pub/GNOME/sources/intltool/" - DIE=1 -fi - -if test "$DIE" -eq 1; then - echo - echo "Please install/upgrade the missing tools and call me again." - echo - exit 1 -fi - - -test $TEST_TYPE $FILE || { - echo - echo "You must run this script in the top-level $PROJECT directory." - echo - exit 1 -} - - -if test -z "$ACLOCAL_FLAGS"; then - - acdir=`$ACLOCAL --print-ac-dir` - m4list="glib-2.0.m4 glib-gettext.m4 gtk-2.0.m4 intltool.m4 pkg.m4 libtool.m4" - - for file in $m4list - do - if [ ! -f "$acdir/$file" ]; then - echo - echo "WARNING: aclocal's directory is $acdir, but..." - echo " no file $acdir/$file" - echo " You may see fatal macro warnings below." - echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS " - echo " environment variable to \"-I /some/dir\", or install" - echo " $acdir/$file." - echo - fi - done +INTLTOOLIZE=`which intltoolize` +if test -z $INTLTOOLIZE; then + echo "*** No intltoolize found, please install the intltool package ***" + exit 1 fi -echo "" - -attempt_command 'underquoted definition of|[\)\#]Extending' \ - $ACLOCAL $ACLOCAL_FLAGS - -# optionally feature autoheader -(autoheader --version) < /dev/null > /dev/null 2>&1 && { - attempt_command '' autoheader -} - -# use glibtoolize if it is available (darwin) -(glibtoolize --version) < /dev/null > /dev/null 2>&1 && LIBTOOLIZE=glibtoolize || LIBTOOLIZE=libtoolize - -attempt_command '' $LIBTOOLIZE -attempt_command '' $AUTOMAKE --copy --force --add-missing -attempt_command '' autoconf -attempt_command '^(Please add the files| codeset| progtest|from the|or directly|You will also|ftp://ftp.gnu.org|$)' \ - glib-gettextize --copy --force -attempt_command '' intltoolize --copy --force --automake +autopoint --force +AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose -echo "" -echo "Done! Please run './configure' now." +cd $olddir +test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" diff --git a/configure.ac b/configure.ac index 8262b2d78..3e9e53212 100644 --- a/configure.ac +++ b/configure.ac @@ -1,16 +1,24 @@ dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.53) +AC_PREREQ([2.64]) # Always use 0.xx+devel instead of 0.xxdevel for the version, e.g. 0.46+devel. # Rationale: (i) placate simple version comparison software such as # `dpkg --compare-versions'. (ii) We don't always know what the next # version is going to be called until about the time we release it # (whereas we always know what the previous version was called). -AC_INIT(inkscape, 0.48+devel) +AC_INIT([inkscape], + [0.48+devel], + [http://bugs.launchpad.net/inkscape/+filebug], + [inkscape], + [http://inkscape.org/]) -AC_CANONICAL_HOST +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([src/main.cpp]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CANONICAL_HOST + AM_INIT_AUTOMAKE([dist-zip dist-bzip2 tar-pax]) AC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [ @@ -21,16 +29,14 @@ AC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build config export CC CXX ]) -AM_CONFIG_HEADER(config.h) - AC_LANG(C++) -AC_ISC_POSIX AC_PROG_CXX -AM_PROG_CC_STDC +AC_PROG_CC AM_PROG_AS AC_PROG_RANLIB -AC_PROG_INTLTOOL(0.22) -AC_PROG_LIBTOOL +# Initialize libtool +LT_PREREQ([2.2]) +LT_INIT AC_HEADER_STDC INK_BZR_SNAPSHOT_BUILD @@ -43,7 +49,7 @@ dnl deprecated features in external libraries and code that dnl triggers compiler warnings. dnl ********************************************************* AC_ARG_ENABLE(strict-build, - [AC_HELP_STRING([--enable-strict-build], [Enable strict build configuration [default=yes]. Usage of most deprecated symbols is forbidden by default. Set the argument to "high" to introduce very strict checking that will cause the build to fail on many systems.])], + [AS_HELP_STRING([--enable-strict-build], [Enable strict build configuration [[default=yes]]. Usage of most deprecated symbols is forbidden by default. Set the argument to "high" to introduce very strict checking that will cause the build to fail on many systems.])], [enable_strict_build=$enableval], [enable_strict_build=yes]) @@ -56,7 +62,6 @@ else fi dnl These next few lines are needed only while libcroco is in our source tree. -AC_PROG_CC AM_PROG_CC_C_O if test "$GCC" = "yes"; then # Enable some warnings from gcc. @@ -126,9 +131,6 @@ if test "$GCC" = "yes"; then # C++-specific flags are defined further below. Look for CXXFLAGS... fi -dnl Honor aclocal flags -ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" - dnl Verify our GCC version if test "x$GXX" = "xyes"; then AC_MSG_CHECKING([GNU compiler version]) @@ -194,12 +196,14 @@ fi dnl ****************************** dnl Gettext stuff dnl ****************************** +IT_PROG_INTLTOOL([0.40.0]) + +AM_GNU_GETTEXT_VERSION([0.17]) +AM_GNU_GETTEXT([external]) + GETTEXT_PACKAGE="AC_PACKAGE_NAME" AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used]) -dnl Add the languages which your application supports here. -ALL_LINGUAS="am ar az be bg bn bn_BD br ca ca@valencia cs da de dz el en_AU en_CA en_GB en_US@piglatin eo es_MX es et eu fa fi fr ga gl he hr hu hy id it ja km ko lt lv mk mn nb ne nl nn pa pl pt_BR pt ro ru rw sk sl sq sr@latin sr sv te_IN th tr uk vi zh_CN zh_TW" -AM_GLIB_GNU_GETTEXT AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "x$PKG_CONFIG" = "xno"; then @@ -390,7 +394,7 @@ dnl gnome vfs checking dnl ****************************** AC_ARG_WITH(gnome-vfs, - AC_HELP_STRING([--with-gnome-vfs], [use gnome vfs for loading files]), + AS_HELP_STRING([--with-gnome-vfs],[use gnome vfs for loading files]), [with_gnome_vfs=$withval], [with_gnome_vfs=auto]) if test "x$with_gnome_vfs" = "xno"; then @@ -424,7 +428,7 @@ dnl libinkjar checking dnl ****************************** AC_ARG_WITH(inkjar, - AC_HELP_STRING([--without-inkjar], [disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes]) + AS_HELP_STRING([--without-inkjar],[disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes]) if test "x$with_ij" = "xyes"; then AC_DEFINE(WITH_INKJAR, 1, [enable openoffice files (SVG jars)]) @@ -442,7 +446,7 @@ dnl ****************************** AC_MSG_CHECKING(for Perl development environment) AC_ARG_WITH(perl, - AC_HELP_STRING([--with-perl], [use Perl for embedded scripting (EXPERIMENTAL)]), + AS_HELP_STRING([--with-perl],[use Perl for embedded scripting (EXPERIMENTAL)]), [with_perl=$withval], [with_perl=skipped]) if test "x$with_perl" = "xyes"; then @@ -485,7 +489,7 @@ dnl ****************************** AC_MSG_CHECKING(for Python development environment) AC_ARG_WITH(python, - AC_HELP_STRING([--with-python], [use Python for embedded scripting (EXPERIMENTAL)]), + AS_HELP_STRING([--with-python],[use Python for embedded scripting (EXPERIMENTAL)]), [with_python=$withval], [with_python=skipped]) if test "x$with_python" = "xyes"; then @@ -528,7 +532,7 @@ dnl LittleCms checking dnl ****************************** AC_ARG_ENABLE(lcms, - AC_HELP_STRING([--enable-lcms], [enable LittleCms for color management]), + AS_HELP_STRING([--enable-lcms],[enable LittleCms for color management]), [enable_lcms=$enableval], [enable_lcms=yes]) if test "x$enable_lcms" = "xno"; then @@ -566,7 +570,7 @@ dnl Libpoppler checking dnl ****************************** AC_ARG_ENABLE(poppler-cairo, - AC_HELP_STRING([--enable-poppler-cairo], [Enable libpoppler-cairo for rendering PDF preview]), + AS_HELP_STRING([--enable-poppler-cairo],[Enable libpoppler-cairo for rendering PDF preview]), [enable_poppler_cairo=$enableval], [enable_poppler_cairo=yes]) POPPLER_CFLAGS="" @@ -810,7 +814,7 @@ dnl ********************************* dnl Allow experimental GTK+3 build dnl ********************************* AC_ARG_ENABLE(gtk3-experimental, - AC_HELP_STRING([--enable-gtk3-experimental], [enable compilation with GTK+3 (EXPERIMENTAL!)]), + AS_HELP_STRING([--enable-gtk3-experimental], [enable compilation with GTK+3 (EXPERIMENTAL!)]), [enable_gtk3=$enableval], [enable_gtk3=no]) with_gtkmm_3_0="no" @@ -1093,7 +1097,6 @@ AC_HEADER_STAT AC_HEADER_TIME AC_STRUCT_TM AC_TYPE_MODE_T -AC_TYPE_SIGNAL dnl Work around broken gcc 3.3 (seen on OSX) where "ENABLE_NLS" isn't dnl set correctly because the gettext function isn't noticed. @@ -1136,7 +1139,7 @@ dnl ****************************** dnl libinkscape dnl ****************************** dnl -dnl AC_ARG_ENABLE(libinkscape, AC_HELP_STRING([--enable-libinkscape], [Compile dynamic library (experimental)]), [splib=$enableval], [splib=no]) +dnl AC_ARG_ENABLE(libinkscape, AS_HELP_STRING([--enable-libinkscape],[Compile dynamic library (experimental)]), [splib=$enableval], [splib=no]) dnl dnl AM_CONDITIONAL(ENABLE_LIBINKSCAPE, test "x$splib" != "xno") dnl |
