From: <as...@us...> - 2002-09-13 15:39:29
|
Update of /cvsroot/libexif/libexif-gtk In directory usw-pr-cvs1:/tmp/cvs-serv21136 Modified Files: autogen.sh configure.in Log Message: - update autogen to match gphoto2's one - i10n fixes for configure.in Index: autogen.sh =================================================================== RCS file: /cvsroot/libexif/libexif-gtk/autogen.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- autogen.sh 8 Jul 2002 20:37:23 -0000 1.3 +++ autogen.sh 13 Sep 2002 15:39:26 -0000 1.4 @@ -1,7 +1,26 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. # This was lifted from the Gimp, and adapted slightly by -# Raph Levien . +# Raph Levien. +# Since then, it has been rewritten quite a lot by misc. people. + +# Call this file with AUTOCONF_SUFFIX and AUTOMAKE_SUFFIX set +# if you want us to call a specific version of autoconf or automake. +# E.g. if you want us to call automake-1.6 instead of automake (which +# seems to be quite advisable if your automake is not already version +# 1.6) then call this file with AUTOMAKE_SUFFIX set to "-1.6". + +# Cases which are known to work: +# 2002-07-14: Debian GNU/Linux unstable with: +# autoconf 2.53 +# automake 1.4-p5 and 1.6 (both) +# gettext 0.10.40 +# libtool 1.4.2a +# 2002-07-14: Redhat Linux 7.3 with: +# autoconf 2.53 +# automake 1.5 (not 1.4-p5) +# gettext 0.11.1 +# libtool 1.4.2 DIE=0 srcdir=`dirname $0` @@ -10,27 +29,44 @@ PROJECT=libexif-gtk -(autoconf --version) < /dev/null > /dev/null 2>&1 || { +# failure subroutine. +# syntax: do-something || fail +fail() { + status=$? + echo "Last command failed with status $status in directory $(pwd)." + echo "Aborting." + exit $status +} + +(autoconf${AUTOCONF_SUFFIX} --version) < /dev/null > /dev/null 2>&1 || { 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/" + echo "or get the source tarball at ftp://ftp.gnu.org/gnu/autoconf/" DIE=1 } (libtool --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have libtool installed to compile $PROJECT." - echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2.tar.gz" - echo "(or a newer version if it is available)" + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/gnu/libtool/" DIE=1 } -(automake --version) < /dev/null > /dev/null 2>&1 || { +(automake${AUTOMAKE_SUFFIX} --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have automake installed to compile $PROJECT." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/gnu/automake/" + DIE=1 +} + +(gettextize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have gettext installed to compile $PROJECT." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/gnu/gettext/" DIE=1 } @@ -38,32 +74,98 @@ exit 1 fi -test -f libexif-gtk/gtk-exif-browser.h || { - echo "You must run this script in the top-level libexif-gtk directory" +test -f libexif-gtk/gtk-exif-entry-version.h || { + echo "You must run this script in the top-level $PROJECT directory" exit 1 } -if test -z "$*"; then - echo "I am going to run ./configure with no arguments - if you wish " - echo "to pass any to it, please specify them on the $0 command line." -fi - - case "$CC" in *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;; esac -libtoolize -echo "Running aclocal${AUTOMAKE_SUFFIX} $ACLOCAL_FLAGS" -aclocal${AUTOMAKE_SUFFIX} $ACLOCAL_FLAGS -echo "Running autoheader" -autoheader -echo "Running automake${AUTOMAKE_SUFFIX} --add-missing --gnu $am_opt" -automake${AUTOMAKE_SUFFIX} --add-missing --gnu $am_opt -echo "Running autoconf" -autoconf -echo "Running ./configure" -./configure $@" +gettext_version=`gettextize --version 2>&1 | sed -n 's/^.*GNU gettext.* \([0-9]*\.[0-9.]*\).*$/\1/p'` +case $gettext_version in +0.11.*) + gettext_opt="$gettext_opt --intl";; +esac + +# do not change the sequence without understanding the implications +for dir in . +do +( + cd "$dir" || fail + echo "Processing ${dir} aka $(pwd)" + + # We explicitly delete files and directories which are not contained + # in the CVS repository and which are generated by the build tools + # called here. + # This makes changing build tool versions much easier, and removes + # the need for any --force parameters to the build tools which may + # do something we do want or something we do not. + + echo "Cleaning stuff generated by gettextize" + rm -f po/Makevars.template po/Makevars po/Makefile.in.in ABOUT-NLS + for file in codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 \ + lcmessage.m4 progtest.m4 + do + rm -f "m4/$file" + done + rm -rf intl/ + + echo "Running gettextize --copy $gettext_opt" + gettextize --copy $gettext_opt || fail + if test -f po/Makevars.template + then + cp po/Makevars.template po/Makevars + fi + + case $gettext_version in + 0.10.*) + grep "intl/Makefile" configure.in || + sed -e 's#^AC_OUTPUT(\[#AC_OUTPUT(\[ intl/Makefile po/Makefile.in#' \ + configure.in >configure.in.new && mv configure.in.new configure.in + esac + + echo "Cleaning stuff generated by libtoolize" + rm -f ltmain.sh config.guess config.sub + + echo "Running libtoolize --copy" + libtoolize --copy || fail + + echo "Cleaning stuff generated by aclocal" + rm -f aclocal.m4 + + echo "Running aclocal${AUTOMAKE_SUFFIX} $ACLOCAL_FLAGS" + aclocal${AUTOMAKE_SUFFIX} $ACLOCAL_FLAGS || fail + + echo "Cleaning stuff generated by autoheader" + rm -f config.h.in libgphoto2/config.h.in + + echo "Running autoheader${AUTOCONF_SUFFIX}" + autoheader${AUTOCONF_SUFFIX} || fail + + echo "Cleaning stuff generated by automake" + find . -name '*.am' -print | + while read file + do # remove all .in files with a corresponding .am file + rm -f "$(sed s/\.am$/.in/g)" + done + rm -f depcomp install-sh missing mkinstalldirs + rm -f stamp-h* libgphoto2/stamp-h* + + echo "Running automake${AUTOMAKE_SUFFIX} --add-missing --gnu $am_opt" + automake${AUTOMAKE_SUFFIX} --add-missing --gnu $am_opt || fail + + echo "Cleaning stuff generated by autoconf" + rm -f configure + rm -rf autom4te-*.cache/ + + echo "Running autoconf${AUTOCONF_SUFFIX}" + autoconf${AUTOCONF_SUFFIX} || fail + + echo "Finished in directory $(pwd)" +) || fail +done echo -echo "Now type 'make' to compile $PROJECT." +echo "$PROJECT is now ready for configuration." Index: configure.in =================================================================== RCS file: /cvsroot/libexif/libexif-gtk/configure.in,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- configure.in 25 Jul 2002 16:17:11 -0000 1.12 +++ configure.in 13 Sep 2002 15:39:26 -0000 1.13 @@ -46,7 +46,7 @@ AC_SUBST(GTK_LIBS) AC_SUBST(GTK_CFLAGS) -CFLAGS="$CFLAGS -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Werror" +CFLAGS="$CFLAGS -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith" AC_SUBST(CFLAGS) AC_OUTPUT([ @@ -55,6 +55,4 @@ libexif-gtk/libexif-gtk.pc gtk-extensions/Makefile tests/Makefile - intl/Makefile - po/Makefile.in ]) |