diff options
author | James Henstridge <james@daa.com.au> | 2003-02-18 15:09:45 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2003-02-18 15:09:45 +0000 |
commit | e4d093be993de45b46aef5201924ddda643e859a (patch) | |
tree | ca278144be0d561b0c0acfb87157fdc9bd6fda8d | |
parent | 6d8ccee455cde71467a2056530fe66f865219c0a (diff) | |
download | shared-mime-info-e4d093be993de45b46aef5201924ddda643e859a.tar.gz |
check to see if gnome-deprecated-macros.m4 ended up in aclocal.m4, and
2003-02-18 James Henstridge <james@daa.com.au>
* autogen.sh (topdir): check to see if gnome-deprecated-macros.m4
ended up in aclocal.m4, and warn if so.
* gnome-platform.m4: kill this too (with a deprecation warning).
* gnome-cxx-check.m4: move to gnome-deprecated-macros.m4
* gnome-pkgconfig.m4: remove, and add a deprecation warning in its
place.
* gnome-x-checks.m4: remove, and add an AU_DEFUN in its place
telling people not to use it.
* linger.m4: removed outright.
* gnome-common.m4: remove GNOME_GTKDOC_CHECK, deprecated in favour
of GTK_DOC_CHECK.
* gnome-gettext.m4: remove file (people should be using gettextize
or glib-gettextize).
* gnome-deprecated-macros.m4: new file to hold deprecated macros.
svn path=/trunk/; revision=2768
-rw-r--r-- | intl/.cvsignore | 4 | ||||
-rw-r--r-- | macros2/ChangeLog | 25 | ||||
-rw-r--r-- | macros2/Makefile.am | 14 | ||||
-rw-r--r-- | macros2/autogen.sh | 455 | ||||
-rw-r--r-- | macros2/gnome-common.m4 | 22 | ||||
-rw-r--r-- | macros2/gnome-cxx-check.m4 | 10 | ||||
-rw-r--r-- | macros2/gnome-deprecated-macros.m4 | 32 | ||||
-rw-r--r-- | macros2/gnome-gettext.m4 | 338 | ||||
-rw-r--r-- | macros2/gnome-pkgconfig.m4 | 44 | ||||
-rw-r--r-- | macros2/gnome-pthread-check.m4 | 16 | ||||
-rw-r--r-- | macros2/gnome-x-checks.m4 | 52 | ||||
-rw-r--r-- | macros2/linger.m4 | 28 |
12 files changed, 347 insertions, 693 deletions
diff --git a/intl/.cvsignore b/intl/.cvsignore new file mode 100644 index 00000000..954b7660 --- /dev/null +++ b/intl/.cvsignore @@ -0,0 +1,4 @@ +po2msg.sed +po2tbl.sed +Makefile +Makefile.in diff --git a/macros2/ChangeLog b/macros2/ChangeLog index 06dccdc1..27c047d9 100644 --- a/macros2/ChangeLog +++ b/macros2/ChangeLog @@ -1,3 +1,28 @@ +2003-02-18 James Henstridge <james@daa.com.au> + + * autogen.sh (topdir): check to see if gnome-deprecated-macros.m4 + ended up in aclocal.m4, and warn if so. + + * gnome-platform.m4: kill this too (with a deprecation warning). + + * gnome-cxx-check.m4: move to gnome-deprecated-macros.m4 + + * gnome-pkgconfig.m4: remove, and add a deprecation warning in its + place. + + * gnome-x-checks.m4: remove, and add an AU_DEFUN in its place + telling people not to use it. + + * linger.m4: removed outright. + + * gnome-common.m4: remove GNOME_GTKDOC_CHECK, deprecated in favour + of GTK_DOC_CHECK. + + * gnome-gettext.m4: remove file (people should be using gettextize + or glib-gettextize). + + * gnome-deprecated-macros.m4: new file to hold deprecated macros. + 2003-02-14 Kalpesh Shah <kalpesh.shah@sun.com> * check-utmp.m4: initialize UTMP structure properly. diff --git a/macros2/Makefile.am b/macros2/Makefile.am index bc5f37f8..0b067d59 100644 --- a/macros2/Makefile.am +++ b/macros2/Makefile.am @@ -1,12 +1,14 @@ ## Please update this variable if any new macros are created -GNOME2_MACROS= \ - compiler-flags.m4 curses.m4 gnome-common.m4 gnome-cxx-check.m4 \ - gnome-gettext.m4 gnome-pthread-check.m4 gnome-x-checks.m4 \ - linger.m4 check-utmp.m4 gnome-pkgconfig.m4 gnome-platform.m4 +GNOME2_MACROS = \ + compiler-flags.m4 \ + curses.m4 \ + gnome-common.m4 \ + check-utmp.m4 \ + gnome-deprecated-macros.m4 -EXTRA_DIST=$(GNOME2_MACROS) autogen.sh -MAINTAINERCLEANFILES=macros2.dep +EXTRA_DIST = $(GNOME2_MACROS) autogen.sh +MAINTAINERCLEANFILES = macros2.dep @MAINT@macros2.dep: Makefile.am @MAINT@ @echo '$$(top_srcdir)/aclocal.m4: $(GNOME2_MACROS:%=macros2/%)' > $@ diff --git a/macros2/autogen.sh b/macros2/autogen.sh index 10e1b367..48e9f56e 100644 --- a/macros2/autogen.sh +++ b/macros2/autogen.sh @@ -1,216 +1,317 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. -DIE=0 +#name of package +PACKAGE=${PACKAGE:-Package} +srcdir=${srcdir:-.} + +# default version requirements ... +REQUIRED_AUTOCONF_VERSION=${REQUIRED_AUTOCONF_VERSION:-2.53} +REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.4} +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} +# a list of required m4 macros. Package can set an initial value +REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-} + +# if GNOME2_DIR set, modify ACLOCAL_FLAGS ... if [ -n "$GNOME2_DIR" ]; then - ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS" - LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH" - PATH="$GNOME2_DIR/bin:$PATH" - export PATH - export LD_LIBRARY_PATH + ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS" + LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH" + PATH="$GNOME2_DIR/bin:$PATH" + export PATH + export LD_LIBRARY_PATH fi -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 + +# some terminal codes ... +boldface="`tput bold 2>/dev/null`" +normal="`tput sgr0 2>/dev/null`" +printbold() { + echo -n "$boldface" + echo "$@" + echo -n "$normal" +} +printerr() { + echo "$@" >&2 } -# Determine whether to use configure.in or configure.ac +# Usage: +# compare_versions MIN_VERSION ACTUAL_VERSION +# returns true if ACTUAL_VERSION >= MIN_VERSION +compare_versions() { + local min_version actual_version status save_IFS cur min + min_version=$1 + actual_version=$2 + status=0 + IFS="${IFS= }"; save_IFS="$IFS"; IFS="." + set $actual_version + for min in $min_version; do + cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes + if [ -z "$min" ]; then break; fi + if [ -z "$cur" ]; then status=1; break; fi + if [ $cur -gt $min ]; then break; fi + if [ $cur -lt $min ]; then status=1; break; fi + done + IFS="$save_IFS" + return $status +} -if [ -f $srcdir/configure.ac ]; then - CONFIGURE="$srcdir/configure.ac" -else - CONFIGURE="$srcdir/configure.in" -fi +# Usage: +# version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE +# checks to see if the package is available +version_check() { + local package variable checkprogs min_version source status checkprog actual_version + package=$1 + variable=$2 + checkprogs=$3 + min_version=$4 + source=$5 + status=1 -(grep "^AC_PROG_INTLTOOL" "$CONFIGURE" >/dev/null) && { - (intltoolize --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`intltoolize' installed to compile $PKG_NAME." - echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.10.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - } + printbold "checking for $package >= $min_version..." + for checkprog in $checkprogs; do + echo -n " testing $checkprog... " + if $checkprog --version < /dev/null > /dev/null 2>&1; then + actual_version=`$checkprog --version | head -1 | \ + sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'` + if compare_versions $min_version $actual_version; then + echo "found." + # set variable + eval "$variable=$checkprog" + status=0 + break + else + echo "too old (found version $actual_version)" + fi + else + echo "not found." + fi + done + if [ "$status" != 0 ]; then + printerr "***Error***: You must have $package >= $min_version installed" + printerr " to build $PKG_NAME. Download the appropriate package for" + printerr " from your distribution or get the source tarball at" + printerr " $source" + printerr + fi + return $status } -(grep "^AM_PROG_XML_I18N_TOOLS" "$CONFIGURE" >/dev/null) && { - (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`xml-i18n-toolize' installed to compile $PKG_NAME." - echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/xml-i18n-tools/xml-i18n-tools-0.9.tar.gz" - echo "(or a newer version of xml-i18n-tools or intltool if it is available)" - DIE=1 - } +# Usage: +# require_m4macro filename.m4 +# adds filename.m4 to the list of required macros +require_m4macro() { + case "$REQUIRED_M4MACROS" in + $1\ * | *\ $1\ * | *\ $1) ;; + *) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;; + esac } -(grep "^AM_PROG_LIBTOOL" "$CONFIGURE" >/dev/null) && { - (libtool --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME." - echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - } -} +# Usage: +# check_m4macros +# Checks that all the requested macro files are in the aclocal macro path +# Uses REQUIRED_M4MACROS and ACLOCAL variables. +check_m4macros() { + local macrodirs status macro dir macrofound + if [ -z "$REQUIRED_M4MACROS" ]; then + return 0 + fi + # construct list of macro directories + macrodirs="`$ACLOCAL --print-ac-dir`" + set - $ACLOCAL_FLAGS + while [ $# -gt 0 ]; do + if [ "$1" = "-I" ]; then + macrodirs="$macrodirs $2" + shift + fi + shift + done -if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then - if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then - GETTEXTIZE="" - else - if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then - GETTEXTIZE="glib-gettextize" - GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v1.3/glib-1.3.11.tar.gz" - else - GETTEXTIZE="gettextize" - GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" + status=0 + printbold "Checking for required M4 macros..." + # check that each macro file is in one of the macro dirs + for macro in $REQUIRED_M4MACROS; do + macrofound=false + for dir in $macrodirs; do + if [ -f "$dir/$macro" ]; then + macrofound=true + break + fi + done + if $macrofound; then + : + else + printerr " $macro not found" + status=1 + fi + done + if [ "$status" != 0 ]; then + printerr "***Error***: some autoconf macros required to build $PKG_NAME" + printerr " were not found in your aclocal path. Perhaps you need to" + printerr " adjust your ACLOCAL_PATH?" + printerr " $source" + printerr fi + return $status +} - $GETTEXTIZE --version < /dev/null > /dev/null 2>&1 - if test $? -ne 0; then - echo - echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME." - echo "Get $GETTEXTIZE_URL" - echo "(or a newer version if it is available)" - DIE=1 +want_libtool=false +want_gettext=false +want_glib_gettext=false +want_intltool=false +want_pkg_config=false +want_gtk_doc=false + +configure_files="`find $srcdir -name configure.ac -print -or -name configure.in -print`" +for configure_ac in $configure_files; do + if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null; then + want_libtool=true + fi + if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then + want_gettext=true + fi + if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then + want_glib_gettext=true + fi + if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null; then + want_intltool=true + fi + if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then + want_pkg_config=true fi - fi + if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then + want_gtk_doc=true + fi +done + +DIE=0 + +version_check autoconf AUTOCONF 'autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \ + "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz" || DIE=1 +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.7 automake-1.6 automake-1.5" ;; + 1.6*) automake_progs="automake-1.7 automake-1.6" ;; + 1.7*) automake_progs="automake-1.7" ;; +esac +version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \ + "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz" || DIE=1 +ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/` + +if $want_libtool; then + version_check libtool LIBTOOLIZE libtoolize $REQUIRED_LIBTOOL_VERSION \ + "http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz" || DIE=1 + require_m4macro libtool.m4 fi -(automake-1.4 --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`automake' installed to compile $PKG_NAME." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - NO_AUTOMAKE=yes -} +if $want_gettext; then + version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \ + "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz" || DIE=1 + require_m4macro gettext.m4 +fi +if $want_glib_gettextize; then + version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \ + "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz" || DIE=1 + require_m4macro glib-gettext.m4 +fi -# if no automake, don't bother testing for aclocal -test -n "$NO_AUTOMAKE" || (aclocal-1.4 --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: Missing \`aclocal'. The version of \`automake'" - echo "installed doesn't appear recent enough." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 -} +if $want_intltool; then + version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \ + "http://ftp.gnome.org/pub/GNOME/sources/intltool/" || DIE=1 + require_m4macro intltool.m4 +fi -if test "$DIE" -eq 1; then +if $want_pkg_config; then + version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \ + "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz" || DIE=1 + require_m4macro pkg.m4 +fi + +if $want_gtk_doc; then + version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \ + "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" || DIE=1 + require_m4macro gtk-doc.m4 +fi + +check_m4macros || DIE=1 + +if [ "$DIE" -eq 1 ]; then exit 1 fi if test -z "$*"; then - echo "**Warning**: I am going to run \`configure' with no arguments." - echo "If you wish to pass any to it, please specify them on the" - echo \`$0\'" command line." - echo + printerr "**Warning**: I am going to run \`configure' with no arguments." + printerr "If you wish to pass any to it, please specify them on the" + printerr \`$0\'" command line." + printerr fi -case $CC in -xlc ) - am_opt=--include-deps;; -esac +topdir=`pwd` +for configure_ac in $configure_files; do + dirname=`dirname $configure_ac` + basename=`basename $configure_ac` + if test -f $dirname/NO-AUTO-GEN; then + echo skipping $dirname -- flagged as no auto-gen + else + printbold "Processing $dirname" + + aclocalinclude="$ACLOCAL_FLAGS" + printbold "Running $ACLOCAL..." + $ACLOCAL $aclocalinclude || exit 1 + + if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then + printerr "*** obsolete gnome macros were used in $configure_ac" + fi -for coin in `find $srcdir -name configure.in -print -o -name configure.ac -print` -do - dr=`dirname $coin` - bn=`basename $coin` - if test -f $dr/NO-AUTO-GEN; then - echo skipping $dr -- flagged as no auto-gen - else - echo processing $dr - ( cd $dr - - aclocalinclude="$ACLOCAL_FLAGS" - - if test "$GETTEXTIZE"; then - echo "Creating $dr/aclocal.m4 ..." - test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 - echo "Running $GETTEXTIZE... Ignore non-fatal messages." - echo "no" | $GETTEXTIZE --force --copy - echo "Making $dr/aclocal.m4 writable ..." - test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 - fi - if grep "^AC_PROG_INTLTOOL" $bn >/dev/null; then - echo "Running intltoolize..." - intltoolize --copy --force --automake - fi - if grep "^AM_PROG_XML_I18N_TOOLS" $bn >/dev/null; then - echo "Running xml-i18n-toolize..." - xml-i18n-toolize --copy --force --automake - fi - if grep "^AM_PROG_LIBTOOL" $bn >/dev/null; then - if test -z "$NO_LIBTOOLIZE" ; then - echo "Running libtoolize..." - libtoolize --force --copy + if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null; then + printbold "Running $LIBTOOLIZE..." + $LIBTOOLIZE --force || exit 1 + fi + if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then + printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages." + echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1 + elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then + printbold "Running $GETTEXTIZE... Ignore non-fatal messages." + echo "no" | $GETTEXTIZE --force --copy || exit 1 + fi + if grep "^AC_PROG_INTLTOOL" $basename >/dev/null; then + printbold "Running $INTLTOOLIZE..." + $INTLTOOLIZE --force --automake || exit 1 fi - fi - - echo "Running aclocal $aclocalinclude ..." - aclocal-1.4 $aclocalinclude || { - echo - echo "**Error**: \`aclocal' failed. Please fix the warnings" - echo "(probably missing development files) and try again." - DIE=1 - } - - if test "$DIE" -eq 1; then - exit 1 - fi - - if grep "^AM_CONFIG_HEADER" $bn >/dev/null; then - echo "Running autoheader..." - autoheader || { - echo - echo "**Error**: \`autoheader' failed. Please fix the warnings" - echo "(probably missing development files) and try again." - DIE=1 - } - - if test "$DIE" -eq 1; then - exit 1 - fi - - fi - echo "Running automake --gnu $am_opt ..." - automake-1.4 --add-missing --gnu $am_opt || { - echo - echo "**Error**: \`automake' failed. Please fix the warnings" - echo "(probably missing development files) and try again." - DIE=1 - } - - if test "$DIE" -eq 1; then - exit 1 - fi - - echo "Running autoconf ..." - autoconf || { - echo - echo "**Error**: \`autoconf' failed. Please fix the warnings" - echo "(probably missing development files) and try again." - DIE=1 - } - - if test "$DIE" -eq 1; then - exit 1 - fi - ) - fi + if grep "^GTK_DOC_CHECK" $basename >/dev/null; then + printbold "Running $GTKDOCIZE..." + $GTKDOCIZE || exit 1 + fi + if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then + printbold "Running $AUTOHEADER..." + $AUTOHEADER || exit 1 + fi + + printbold "Running $AUTOMAKE..." + $AUTOMAKE --gnu --add-missing || exit 1 + + printbold "Running $AUTOCONF..." + $AUTOCONF || exit 1 + + cd $topdir + fi done -conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c +conf_flags="--enable-maintainer-mode --enable-compile-warnings" if test x$NOCONFIGURE = x; then - echo Running $srcdir/configure $conf_flags "$@" ... - $srcdir/configure $conf_flags "$@" \ - && echo Now type \`make\' to compile $PKG_NAME || exit 1 + printbold Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile $PKG_NAME || exit 1 else - echo Skipping configure process. + echo Skipping configure process. fi diff --git a/macros2/gnome-common.m4 b/macros2/gnome-common.m4 index a33d2d8d..20302d1f 100644 --- a/macros2/gnome-common.m4 +++ b/macros2/gnome-common.m4 @@ -19,28 +19,6 @@ AC_DEFUN([GNOME_COMMON_INIT], AM_CONDITIONAL(INSIDE_GNOME_DOCU, false) ]) -AC_DEFUN([GNOME_GTKDOC_CHECK], -[ - AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) - AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC) - AC_SUBST(HAVE_GTK_DOC) - - dnl Let people disable the gtk-doc stuff. - AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) - - if test x$enable_gtk_doc = xauto ; then - if test x$GTKDOC = xtrue ; then - enable_gtk_doc=yes - else - enable_gtk_doc=no - fi - fi - - dnl NOTE: We need to use a separate automake conditional for this - dnl to make this work with the tarballs. - AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) -]) - AC_DEFUN([GNOME_DEBUG_CHECK], [ AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]], enable_debug="$enableval", enable_debug=no) diff --git a/macros2/gnome-cxx-check.m4 b/macros2/gnome-cxx-check.m4 deleted file mode 100644 index 786138c5..00000000 --- a/macros2/gnome-cxx-check.m4 +++ /dev/null @@ -1,10 +0,0 @@ -dnl GNOME_CHECK_CXX(not_found_string) -AC_DEFUN(GNOME_CHECK_CXX, -[ - # see if a C++ compiler exists and works - AC_REQUIRE([AC_PROG_CXX])dnl - if test "x$ac_cv_prog_cxx_works" = xno; then - AC_MSG_WARN(ifelse([$1], , "No C++ compiler", [$1])) - fi - AM_CONDITIONAL(CXX_PRESENT, test "x$ac_cv_prog_cxx_works" != xno) -]) diff --git a/macros2/gnome-deprecated-macros.m4 b/macros2/gnome-deprecated-macros.m4 new file mode 100644 index 00000000..ac3bf5b4 --- /dev/null +++ b/macros2/gnome-deprecated-macros.m4 @@ -0,0 +1,32 @@ +-*- mode: autoconf -*- + +# GNOME_AUTOGEN_OBSOLETE +# this marker is checked for in the aclocal.m4 file to check for bad macros ... + +AU_DEFUN([AM_GNOME2_GETTEXT], [AM_GLIB_GNU_GETTEXT]) +AU_DEFUN([GNOME_GTKDOC_CHECK], [GTK_DOC_CHECK]) +AU_DEFUN([GNOME2_X_CHECKS], []) +AU_DEFUN([GNOME_PTHREAD_CHECK], []) +AU_DEFUN([GNOME_CHECK_PKGCONFIG], []) +AU_DEFUN([GNOME_REQUIRE_PKGCONFIG], []) +AU_DEFUN([GNOME_PLATFORM_GNOME_2], []) + +AU_DEFUN([GNOME_CHECK_CXX], +[ + # see if a C++ compiler exists and works + AC_REQUIRE([AC_PROG_CXX])dnl + if test "x$ac_cv_prog_cxx_works" = xno; then + AC_MSG_WARN(ifelse([$1], , "No C++ compiler", [$1])) + fi + AM_CONDITIONAL(CXX_PRESENT, test "x$ac_cv_prog_cxx_works" != xno) +]) + +# for aclocal-1.4's benefit +# AC_DEFUN([AM_GNOME2_GETTEXT], []) +# AC_DEFUN([GNOME_GTKDOC_CHECK], []) +# AC_DEFUN([GNOME2_X_CHECKS], []) +# AC_DEFUN([GNOME_PTHREAD_CHECK], []) +# AC_DEFUN([GNOME_CHECK_PKGCONFIG], []) +# AC_DEFUN([GNOME_REQUIRE_PKGCONFIG], []) +# AC_DEFUN([GNOME_PLATFORM_GNOME_2], []) +# AC_DEFUN([GNOME_CHECK_CXX], []) diff --git a/macros2/gnome-gettext.m4 b/macros2/gnome-gettext.m4 deleted file mode 100644 index 1ba7e25c..00000000 --- a/macros2/gnome-gettext.m4 +++ /dev/null @@ -1,338 +0,0 @@ -# Macro to add for using GNU gettext. -# Ulrich Drepper <drepper@cygnus.com>, 1995. -# -# Modified to never use included libintl. -# Owen Taylor <otaylor@redhat.com>, 12/15/1998 -# -# -# This file can be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 5 - -AC_DEFUN([MY_AM_GNOME_WITH_NLS], - [AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) - - BUILD_INCLUDED_LIBINTL=no - USE_INCLUDED_LIBINTL=no - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then -# AC_DEFINE(ENABLE_NLS) -# AC_MSG_CHECKING([whether included gettext is requested]) -# AC_ARG_WITH(included-gettext, -# [ --with-included-gettext use the GNU gettext library included here], -# nls_cv_force_use_gnu_gettext=$withval, -# nls_cv_force_use_gnu_gettext=no) -# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) - nls_cv_force_use_gnu_gettext="no" - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If gettext or catgets are available (in this order) we - dnl use this. Else we have to fall back to GNU NLS library. - dnl catgets is only used if permitted by option --with-catgets. - nls_cv_header_intl= - nls_cv_header_libgt= - CATOBJEXT=NONE - - AC_CHECK_HEADER(libintl.h, - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, - [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) - - if test "$gt_cv_func_gettext_libc" != "yes"; then - AC_CHECK_LIB(intl, bindtextdomain, - [AC_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_CHECK_LIB(intl, gettext, - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)], - gt_cv_func_gettext_libintl=no)]) - fi - - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then - AC_DEFINE(HAVE_GETTEXT) - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl - if test "$MSGFMT" != "no"; then - AC_CHECK_FUNCS(dcgettext) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - INSTOBJEXT=.mo - fi - fi - - # Added by Martin Baulig 12/15/98 for libc5 systems - if test "$gt_cv_func_gettext_libc" != "yes" \ - && test "$gt_cv_func_gettext_libintl" = "yes"; then - INTLLIBS=-lintl - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - fi - ]) - - if test "$CATOBJEXT" = "NONE"; then - AC_MSG_CHECKING([whether catgets can be used]) - AC_ARG_WITH(catgets, - [ --with-catgets use catgets functions if available], - nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) - AC_MSG_RESULT($nls_cv_use_catgets) - - if test "$nls_cv_use_catgets" = "yes"; then - dnl No gettext in C library. Try catgets next. - AC_CHECK_LIB(i, main) - AC_CHECK_FUNC(catgets, - [AC_DEFINE(HAVE_CATGETS) - INTLOBJS="\$(CATOBJS)" - AC_PATH_PROG(GENCAT, gencat, no)dnl -# if test "$GENCAT" != "no"; then -# AC_PATH_PROG(GMSGFMT, gmsgfmt, no) -# if test "$GMSGFMT" = "no"; then -# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) -# fi -# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) -# USE_INCLUDED_LIBINTL=yes -# CATOBJEXT=.cat -# INSTOBJEXT=.cat -# DATADIRNAME=lib -# INTLDEPS='$(top_builddir)/intl/libintl.a' -# INTLLIBS=$INTLDEPS -# LIBS=`echo $LIBS | sed -e 's/-lintl//'` -# nls_cv_header_intl=intl/libintl.h -# nls_cv_header_libgt=intl/libgettext.h -# fi - ]) - fi - fi - - if test "$CATOBJEXT" = "NONE"; then - dnl Neither gettext nor catgets in included in the C library. - dnl Fall back on GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" != "yes"; then - AC_DEFINE(ENABLE_NLS) - else - # Unset this variable since we use the non-zero value as a flag. - CATOBJEXT= -# dnl Mark actions used to generate GNU NLS library. -# INTLOBJS="\$(GETTOBJS)" -# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) -# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) -# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) -# AC_SUBST(MSGFMT) -# USE_INCLUDED_LIBINTL=yes -# CATOBJEXT=.gmo -# INSTOBJEXT=.mo -# DATADIRNAME=share -# INTLDEPS='$(top_builddir)/intl/libintl.a' -# INTLLIBS=$INTLDEPS -# LIBS=`echo $LIBS | sed -e 's/-lintl//'` -# nls_cv_header_intl=intl/libintl.h -# nls_cv_header_libgt=intl/libgettext.h - fi - - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext program is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - else - DATADIRNAME=share - nls_cv_header_intl=intl/libintl.h - nls_cv_header_libgt=intl/libgettext.h - fi - AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) - AC_OUTPUT_COMMANDS( - [case "$CONFIG_FILES" in *po/Makefile.in*) - sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile - esac]) - - -# # If this is used in GNU gettext we have to set USE_NLS to `yes' -# # because some of the sources are only built for this goal. -# if test "$PACKAGE" = gettext; then -# USE_NLS=yes -# USE_INCLUDED_LIBINTL=yes -# fi - - dnl These rules are solely for the distribution goal. While doing this - dnl we only have to keep exactly one list of the available catalogs - dnl in configure.in. - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - done - - dnl Make all variables we use known to autoconf. - AC_SUBST(BUILD_INCLUDED_LIBINTL) - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATALOGS) - AC_SUBST(CATOBJEXT) - AC_SUBST(DATADIRNAME) - AC_SUBST(GMOFILES) - AC_SUBST(INSTOBJEXT) - AC_SUBST(INTLDEPS) - AC_SUBST(INTLLIBS) - AC_SUBST(INTLOBJS) - AC_SUBST(POFILES) - AC_SUBST(POSUB) - ]) - -AC_DEFUN([AM_GNOME2_GETTEXT], - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_C_CONST])dnl - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_OFF_T])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ -unistd.h sys/param.h]) - AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ -strdup __argz_count __argz_stringify __argz_next]) - - if test "${ac_cv_func_stpcpy+set}" != "set"; then - AC_CHECK_FUNCS(stpcpy) - fi - if test "${ac_cv_func_stpcpy}" = "yes"; then - AC_DEFINE(HAVE_STPCPY) - fi - - AM_LC_MESSAGES - MY_AM_GNOME_WITH_NLS - - if test "x$CATOBJEXT" != "x"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - AC_MSG_CHECKING(for catalogs to be installed) - NEW_LINGUAS= - if test "x$LINGUAS" = "x"; then - LINGUAS=$ALL_LINGUAS - fi - for lang in $LINGUAS; do - case "$ALL_LINGUAS" in - *\ $lang\ *|$lang\ *|*\ $lang) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; - esac - done - LINGUAS=$NEW_LINGUAS - AC_MSG_RESULT($LINGUAS) - fi - - dnl Construct list of names of catalog files to be constructed. - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - dnl The reference to <locale.h> in the installed <libintl.h> file - dnl must be resolved because we cannot expect the users of this - dnl to define HAVE_LOCALE_H. - if test $ac_cv_header_locale_h = yes; then - INCLUDE_LOCALE_H="#include <locale.h>" - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header <locale.h>. Take care yourself. */" - fi - AC_SUBST(INCLUDE_LOCALE_H) - - dnl Determine which catalog format we have (if any is needed) - dnl For now we know about two different formats: - dnl Linux libc-5 and the normal X/Open format - test -d intl || mkdir intl - if test "$CATOBJEXT" = ".cat"; then - AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) - - dnl Transform the SED scripts while copying because some dumb SEDs - dnl cannot handle comments. - sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed - fi - dnl po2tbl.sed is always needed. - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ - $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed - - dnl In the intl/Makefile.in we have a special dependency which makes - dnl only sense for gettext. We comment this out for non-gettext - dnl packages. - if test "$PACKAGE" = "gettext"; then - GT_NO="#NO#" - GT_YES= - else - GT_NO= - GT_YES="#YES#" - fi - AC_SUBST(GT_NO) - AC_SUBST(GT_YES) - - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly - dnl find the mkinstalldirs script in another subdir but ($top_srcdir). - dnl Try to locate is. - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi - AC_SUBST(MKINSTALLDIRS) - - dnl *** For now the libtool support in intl/Makefile is not for real. - l= - AC_SUBST(l) - - dnl Generate list of files to be processed by xgettext which will - dnl be included in po/Makefile. - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - ]) - diff --git a/macros2/gnome-pkgconfig.m4 b/macros2/gnome-pkgconfig.m4 deleted file mode 100644 index 94a3ad55..00000000 --- a/macros2/gnome-pkgconfig.m4 +++ /dev/null @@ -1,44 +0,0 @@ -dnl -dnl GNOME_CHECK_PKGCONFIG (script-if-enabled, [failflag]) -dnl -AC_DEFUN([GNOME_CHECK_PKGCONFIG],[ - AC_PATH_PROG(PKG_CONFIG, pkg-config) - have_pkgconfig=no - if test -x "$PKG_CONFIG" ; then - have_pkgconfig=yes - else - PKG_CONFIG= - fi - AC_MSG_CHECKING(for pkg-config) - pkgconfig_required_version=0.8.0 - if test x$have_pkgconfig = xyes ; then - $PKG_CONFIG --atleast-pkgconfig-version $pkgconfig_required_version - if test $? -ne 0; then - echo "*** Your version of pkg-config is too old. You need version $pkgconfig_required_version or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - have_pkgconfig=no - fi - fi - if test x$have_pkgconfig = xyes ; then - AC_MSG_RESULT(yes) - else - PKG_CONFIG= - AC_MSG_RESULT(not found) - if test x$2 = xfail; then - AC_MSG_ERROR([ -*** You need the latest pkg-config (at least $pkgconfig_required_version). -*** Get the latest version of pkg-config from -*** http://www.freedesktop.org/software/pkgconfig.]) - fi - fi - AC_SUBST(PKG_CONFIG) - - AC_PROVIDE([GNOME_REQUIRE_PKGCONFIG]) -]) - -dnl -dnl GNOME_REQUIRE_PKGCONFIG -dnl -AC_DEFUN([GNOME_REQUIRE_PKGCONFIG],[ - GNOME_CHECK_PKGCONFIG([], fail) -]) diff --git a/macros2/gnome-pthread-check.m4 b/macros2/gnome-pthread-check.m4 deleted file mode 100644 index a4eb3b48..00000000 --- a/macros2/gnome-pthread-check.m4 +++ /dev/null @@ -1,16 +0,0 @@ -dnl -dnl And better, use gthreads instead... -dnl - -AC_DEFUN([GNOME_PTHREAD_CHECK],[ - PTHREAD_LIB="" - AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread", - [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads", - [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r", - [AC_CHECK_FUNC(pthread_create)] - )] - )] - ) - AC_SUBST(PTHREAD_LIB) - AC_PROVIDE([GNOME_PTHREAD_CHECK]) -]) diff --git a/macros2/gnome-x-checks.m4 b/macros2/gnome-x-checks.m4 deleted file mode 100644 index b2abbe43..00000000 --- a/macros2/gnome-x-checks.m4 +++ /dev/null @@ -1,52 +0,0 @@ -dnl GNOME_X_CHECKS -dnl -dnl Basic X11 related checks for X11. At the end, the following will be -dnl defined/changed: -dnl GTK_{CFLAGS,LIBS} From GTK+ -dnl CPPFLAGS Will include $X_CFLAGS -dnl GNOME_HAVE_SM `true' or `false' depending on whether session -dnl management is available. It is available if -dnl both -lSM and X11/SM/SMlib.h exist. (Some -dnl Solaris boxes have the library but not the header) -dnl XPM_LIBS -lXpm if Xpm library is present, otherwise "" -dnl -dnl The following configure cache variables are defined (but not used): -dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS} -dnl -AC_DEFUN([GNOME2_X_CHECKS], -[ - AC_REQUIRE([GNOME_REQUIRE_PKGCONFIG]) - - PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 1.3.1) - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) - - GNOME_HAVE_SM=true - case "$GTK_LIBS" in - *-lSM*) - dnl Already found it. - ;; - *) - dnl Assume that if we have -lSM then we also have -lICE. - AC_CHECK_LIB(SM, SmcSaveYourselfDone, - [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false, - $x_libs -lICE) - ;; - esac - - if test "$GNOME_HAVE_SM" = true; then - AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false) - fi - - if test "$GNOME_HAVE_SM" = true; then - AC_DEFINE(HAVE_LIBSM) - fi - - XPM_LIBS="" - AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs) - AC_SUBST(XPM_LIBS) - - AC_REQUIRE([GNOME_PTHREAD_CHECK]) - - AC_PROVIDE([GNOME2_X_CHECKS]) -]) diff --git a/macros2/linger.m4 b/macros2/linger.m4 deleted file mode 100644 index dfa7c8ae..00000000 --- a/macros2/linger.m4 +++ /dev/null @@ -1,28 +0,0 @@ -dnl -dnl Check for struct linger -dnl -AC_DEFUN(AC_STRUCT_LINGER, [ -av_struct_linger=no -AC_MSG_CHECKING(struct linger is available) -AC_TRY_RUN([ -#include <sys/types.h> -#include <sys/socket.h> - -struct linger li; - -main () -{ - li.l_onoff = 1; - li.l_linger = 120; - exit (0); -} -],[ -AC_DEFINE(HAVE_STRUCT_LINGER) -av_struct_linger=yes -],[ -av_struct_linger=no -],[ -av_struct_linger=no -]) -AC_MSG_RESULT($av_struct_linger) -]) |