From 33589a12bc472a0da2210a9bd8d0f65442a6c5b2 Mon Sep 17 00:00:00 2001 From: Greg Stein Date: Thu, 23 Aug 2001 11:27:26 +0000 Subject: [PATCH] * stop using aclocal.m4 and directly sinclude() the .m4 files into the configure script. don't "clean" it and remove it from .cvsignore. Note: to avoid problems in developer dirs, we nuke the file in buildconf.sh for now; we'll stop doing that at some future time. [idea from ASF] * look for glibtoolize, in addition to libtoolize (e.g. the MacOS X platform names it differently). [patch from ASF] * conftools/missing is not needed * use "exit 0" in buildconf.sh to help calling scripts. [patch from ASF] * minor output cleanup in "make clean" --- expat/.gitignore | 1 - expat/MANIFEST | 1 - expat/Makefile.in | 6 +- expat/buildconf.sh | 42 +++++---- expat/configure.in | 3 + expat/conftools/missing | 190 ---------------------------------------- 6 files changed, 30 insertions(+), 213 deletions(-) delete mode 100755 expat/conftools/missing diff --git a/expat/.gitignore b/expat/.gitignore index 4b01827e..34cd8876 100755 --- a/expat/.gitignore +++ b/expat/.gitignore @@ -1,5 +1,4 @@ Makefile -aclocal.m4 configure config.cache config.log diff --git a/expat/MANIFEST b/expat/MANIFEST index fdad6531..9a92b84f 100644 --- a/expat/MANIFEST +++ b/expat/MANIFEST @@ -13,7 +13,6 @@ conftools/config.sub conftools/install-sh conftools/ltconfig conftools/ltmain.sh -conftools/missing conftools/mkinstalldirs doc/reference.html doc/style.css diff --git a/expat/Makefile.in b/expat/Makefile.in index 19ead8f2..f26c3fc1 100644 --- a/expat/Makefile.in +++ b/expat/Makefile.in @@ -75,13 +75,9 @@ $(SUBDIRS): cd $@ && $(MAKE) clean: - # clean up the lib dir cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs - # clean up the xmlwf dir cd xmlwf && rm -f xmlwf *.o - # clean up the examples dir cd examples && rm -f elements outline *.o - # other random cleanup find . -name core | xargs rm -f distclean: clean @@ -90,7 +86,7 @@ distclean: clean rm -f lib/expat.h extraclean: distclean - rm -f aclocal.m4 config.h.in configure + rm -f config.h.in configure rm -f conftools/config.guess conftools/config.sub rm -f conftools/ltconfig conftools/ltmain.sh diff --git a/expat/buildconf.sh b/expat/buildconf.sh index 1f711268..e3df9919 100755 --- a/expat/buildconf.sh +++ b/expat/buildconf.sh @@ -1,27 +1,34 @@ #! /bin/sh # -# Build aclocal.m4 from libtool's libtool.m4 +# Create the libtool helper files # -ltpath=`conftools/PrintPath libtoolize` -ltpath=`dirname $ltpath` -ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4 -echo "Incorporating $ltfile into aclocal.m4 ..." -echo "dnl THIS FILE IS AUTOMATICALLY GENERATED BY buildconf.sh" > aclocal.m4 -echo "dnl edits here will be lost" >> aclocal.m4 -cat $ltfile >> aclocal.m4 - -ltfile='conftools/ac_c_bigendian_cross.m4' -echo "Incorporating $ltfile into aclocal.m4 ..." -cat $ltfile >> aclocal.m4 +echo "Copying libtool helper files ..." # -# Create the libtool helper files +# find libtoolize, or glibtoolize on MacOS X +# +libtoolize=`conftools/PrintPath glibtoolize libtoolize` +if [ "x$libtoolize" = "x" ]; then + echo "libtoolize not found in path" + exit 1 +fi + # -# Note: we always replace the files, and we copy (rather than link) them. +# --force to ensure that we replace with current files +# --copy to avoid symlinks; we want originals for the distro +# --automake to make it shut up about "things to do" # -echo "Copying libtool helper files ..." -$ltpath/libtoolize --force --copy +$libtoolize --force --copy --automake + +ltpath=`dirname $libtoolize` +ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4 +cp $ltfile conftools/libtool.m4 + +### for a little while... remove stray aclocal.m4 files from +### developers' working copies. we no longer use it. (nothing else +### will remove it, and leaving it creates big problems) +rm -f aclocal.m4 # # Generate the autoconf header template (config.h.in) and ./configure @@ -32,3 +39,6 @@ autoheader echo "Creating configure ..." ### do some work to toss config.cache? autoconf + +# exit with the right value, so any calling script can continue +exit 0 diff --git a/expat/configure.in b/expat/configure.in index 51bb34b6..33d0e8a1 100644 --- a/expat/configure.in +++ b/expat/configure.in @@ -44,6 +44,9 @@ LIBAGE=1 AC_CONFIG_HEADER(config.h) +sinclude(conftools/libtool.m4) +sinclude(conftools/ac_c_bigendian_cross.m4) + AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL diff --git a/expat/conftools/missing b/expat/conftools/missing deleted file mode 100755 index 7789652e..00000000 --- a/expat/conftools/missing +++ /dev/null @@ -1,190 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 -- 2.40.0