X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git;a=blobdiff_plain;f=autogen.sh;h=1848e545273923bd428db10f9443ffcf4f5ab892;hp=fdc9e530c0c3ba4c47b3779b8a9e2aa5fc0391ef;hb=25f694dd10a0bcf8904eed6f11e7bfc1a3e68255;hpb=67ed9b0ddda1d91667065104bcf104037bd9f97e diff --git a/autogen.sh b/autogen.sh index fdc9e53..1848e54 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,25 +1,27 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + #name of package -test "$PKG_NAME" || PKG_NAME=Package -test "$srcdir" || srcdir=. +PKG_NAME=${PKG_NAME:-Package} # default version requirements ... -test "$REQUIRED_AUTOCONF_VERSION" || REQUIRED_AUTOCONF_VERSION=2.53 -test "$REQUIRED_AUTOMAKE_VERSION" || REQUIRED_AUTOMAKE_VERSION=1.9 -test "$REQUIRED_LIBTOOL_VERSION" || REQUIRED_LIBTOOL_VERSION=1.5 -test "$REQUIRED_GETTEXT_VERSION" || REQUIRED_GETTEXT_VERSION=0.12 -test "$REQUIRED_GLIB_GETTEXT_VERSION" || REQUIRED_GLIB_GETTEXT_VERSION=2.2.0 -test "$REQUIRED_INTLTOOL_VERSION" || REQUIRED_INTLTOOL_VERSION=0.30 -test "$REQUIRED_PKG_CONFIG_VERSION" || REQUIRED_PKG_CONFIG_VERSION=0.14.0 -test "$REQUIRED_GTK_DOC_VERSION" || REQUIRED_GTK_DOC_VERSION=1.0 -test "$REQUIRED_DOC_COMMON_VERSION" || REQUIRED_DOC_COMMON_VERSION=2.3.0 -test "$REQUIRED_GNOME_DOC_UTILS_VERSION" || REQUIRED_GNOME_DOC_UTILS_VERSION=0.4.2 +REQUIRED_AUTOCONF_VERSION=${REQUIRED_AUTOCONF_VERSION:-2.53} +REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.9} +REQUIRED_LIBTOOL_VERSION=${REQUIRED_LIBTOOL_VERSION:-1.4.3} +REQUIRED_GETTEXT_VERSION=${REQUIRED_GETTEXT_VERSION:-0.10.40} +REQUIRED_GLIB_GETTEXT_VERSION=${REQUIRED_GLIB_GETTEXT_VERSION:-2.2.0} +REQUIRED_INTLTOOL_VERSION=${REQUIRED_INTLTOOL_VERSION:-0.25} +REQUIRED_PKG_CONFIG_VERSION=${REQUIRED_PKG_CONFIG_VERSION:-0.14.0} +REQUIRED_GTK_DOC_VERSION=${REQUIRED_GTK_DOC_VERSION:-1.0} +REQUIRED_DOC_COMMON_VERSION=${REQUIRED_DOC_COMMON_VERSION:-2.3.0} +REQUIRED_GNOME_DOC_UTILS_VERSION=${REQUIRED_GNOME_DOC_UTILS_VERSION:-0.4.2} # a list of required m4 macros. Package can set an initial value -test "$REQUIRED_M4MACROS" || REQUIRED_M4MACROS= -test "$FORBIDDEN_M4MACROS" || FORBIDDEN_M4MACROS= +REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-} +FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-} # Not all echo versions allow -n, so we check what is possible. This test is # based on the one in autoconf. @@ -36,8 +38,13 @@ case `echo -n x` in esac # some terminal codes ... -boldface="`tput bold 2>/dev/null`" -normal="`tput sgr0 2>/dev/null`" +if tty < /dev/null 1>/dev/null 2>&1; then + boldface="`tput bold 2>/dev/null`" + normal="`tput sgr0 2>/dev/null`" +else + boldface= + normal= +fi printbold() { echo $ECHO_N "$boldface" $ECHO_C echo "$@" @@ -169,8 +176,7 @@ check_m4macros() { # but it contains only Automake's own macros, so we can ignore it. # Read the dirlist file, supported by Automake >= 1.7. - # If AUTOMAKE was defined, no version was detected. - if [ -z "$AUTOMAKE_VERSION" ] || compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then + if compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist` if [ -n "$cm_dirlist" ] ; then for cm_dir in $cm_dirlist; do @@ -258,6 +264,7 @@ want_intltool=false want_pkg_config=false want_gtk_doc=false want_gnome_doc_utils=false +want_maintainer_mode=false configure_files="`find $srcdir -name '{arch}' -prune -o -name '_darcs' -prune -o -name '.??*' -prune -o -name configure.ac -print -o -name configure.in -print`" for configure_ac in $configure_files; do @@ -290,6 +297,15 @@ for configure_ac in $configure_files; do want_gnome_doc_utils=true fi + # check that AM_MAINTAINER_MODE is used + if grep "^AM_MAINTAINER_MODE" $configure_ac >/dev/null; then + want_maintainer_mode=true + fi + + if grep "^YELP_HELP_INIT" $configure_ac >/dev/null; then + require_m4macro yelp.m4 + fi + # check to make sure gnome-common macros can be found ... if grep "^GNOME_COMMON_INIT" $configure_ac >/dev/null || grep "^GNOME_DEBUG_CHECK" $configure_ac >/dev/null || @@ -311,12 +327,14 @@ AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/` case $REQUIRED_AUTOMAKE_VERSION in 1.4*) automake_progs="automake-1.4" ;; - 1.5*) automake_progs="automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6 automake-1.5" ;; - 1.6*) automake_progs="automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6" ;; - 1.7*) automake_progs="automake-1.10 automake-1.9 automake-1.8 automake-1.7" ;; - 1.8*) automake_progs="automake-1.10 automake-1.9 automake-1.8" ;; - 1.9*) automake_progs="automake-1.10 automake-1.9" ;; - 1.10*) automake_progs="automake-1.10" ;; + 1.5*) automake_progs="automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6 automake-1.5" ;; + 1.6*) automake_progs="automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6" ;; + 1.7*) automake_progs="automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7" ;; + 1.8*) automake_progs="automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8" ;; + 1.9*) automake_progs="automake-1.12 automake-1.11 automake-1.10 automake-1.9" ;; + 1.10*) automake_progs="automake-1.12 automake-1.11 automake-1.10" ;; + 1.11*) automake_progs="automake-1.12 automake-1.11" ;; + 1.12*) automake_progs="automake-1.12" ;; esac version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \ "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz" @@ -468,7 +486,7 @@ for configure_ac in $configure_files; do cp -pf INSTALL INSTALL.autogen_bak fi if [ $REQUIRED_AUTOMAKE_VERSION != 1.4 ]; then - $AUTOMAKE --gnu --add-missing --force --copy || exit 1 + $AUTOMAKE --gnu --add-missing --force --copy -Wno-portability || exit 1 else $AUTOMAKE --gnu --add-missing --copy || exit 1 fi @@ -485,7 +503,11 @@ for configure_ac in $configure_files; do fi done -conf_flags="--enable-maintainer-mode" +conf_flags="" + +if $want_maintainer_mode; then + conf_flags="--enable-maintainer-mode" +fi if test x$NOCONFIGURE = x; then printbold Running $srcdir/configure $conf_flags "$@" ...