imported from cvs-utils.
* commit: Updated from cvs-utils and tweaked for libtool.
* Makefile.am (EXTRA_DIST): Add config/mailnotify.
+2004-02-10 Gary V. Vaughan <gary@gnu.org>
+
+ * config/mailnotify: New file for mailing commit notifications,
+ imported from cvs-utils.
+ * commit: Updated from cvs-utils and tweaked for libtool.
+ * Makefile.am (EXTRA_DIST): Add config/mailnotify.
+
2004-02-06 Gary V. Vaughan <gary@gnu.org>
* bootstrap: Remove vcl.tmp, otherwise it can interfere with make.
SUBDIRS = $(BUILD_SUBDIRS)
DIST_SUBDIRS = $(BUILD_SUBDIRS)
-EXTRA_DIST = bootstrap libtoolize.in ltmain.in config/mkstamp stamp-vcl \
+EXTRA_DIST = bootstrap libtoolize.in ltmain.in \
+ config/mailnotify config/mkstamp stamp-vcl \
ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 ChangeLog.1999 \
ChangeLog.2000 ChangeLog.2001 ChangeLog.2002 ChangeLog.2003
CLEANFILES = libtool libtoolize ltmain.shT
renamed. If you have any macros in this namespace please rename them to
prevent any possible future clash with libtool supplied macros.
* New LT_PREREQ macro for specifying minimum libtool requirement.
+* New LT_INIT interface replaces AC_PROG_LIBTOOL, AC_ENABLE_SHARED,
+ AC_DISABLE_SHARED, AC_ENABLE_STATIC, AC_DISABLE_STATIC,
+ AC_ENABLE_FAST_INSTALL, AC_DISABLE_FAST_INSTALL, AC_LIBTOOL_DLOPEN,
+ AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_PIC_MODE. Use autoupdate to modernise
+ your configure.ac files after installing this release.
* The libtool script will complain if it was built from mismatched ltmain.sh
and libtool m4 macro versions.
* Like automake, libtoolize no longer installs config.guess and config.sub by
#! /bin/sh
-# commit version 0.9.2
+# commit (GNU cvs-utils) version 0.10
+# Originally by Gary V. Vaughan <gary@gnu.org>
+# Pretty much rewritten by Alexandre Oliva <aoliva@redhat.com>
-# Copyright (C) 1999, Free Software Foundation
+# Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# This script is Free Software, and it can be copied, distributed and
-# modified as defined in the GNU General Public License. A copy of
-# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
+# 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 of the License, 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, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
-# Originally by Gary V. Vaughan <gvv@techie.com>
-# Heavily modified by Alexandre Oliva <oliva@dcc.unicamp.br>
+# Usage: commit [-v] [-h] [-f] [-l] [-n] [-q] [-z N] [-C ChangeLog_file]
+# [-m msg|-F msg_file|-1] [-s addr [--from addr]] [--] [file|dir ...]
-# This scripts eases checking in changes to CVS-maintained projects
+# -C file --changelog=file extract commit message from specified ChangeLog
+# -zN --compress=N set compression level (0-9, 0=none, 9=max)
+# -n --dry-run don't commit anything
+# --fast same as --force --first
+# -F file --file=file read commit message from file
+# -1 --first extract first entry from ChangeLog, no cvs diff
+# -f --force don't check (unless *followed* by -n), and just
+# display commit message instead of running $PAGER
+# --from=addr override default from address in commit email
+# -l --local don't descend into subdirectories
+# -m msg --message=msg set commit message
+# --msg=msg same as -m
+# -q --quiet run cvs in quiet mode
+# -s addr --sendmail=addr send a commit email of the differences to ADDR
+# --signature[=file] add FILE to the end of the email (~/.signature)
+# -v --version print version information
+# -h,-? --help print short or long help message
+
+# This script eases checking in changes to CVS-maintained projects
# with ChangeLog files. It will check that there have been no
# conflicting commits in the CVS repository and print which files it
# is going to commit to stderr. A list of files to compare and to
# files in the current directory (and below, unless `-l' is given) are
# considered for check in.
-# The commit message will be extracted from the differences between
-# the local ChangeLog and the one in the repository (unless a message
-# was specified with `-m' or `-F'). An empty message is not accepted
-# (but a blank line is). If the message is acceptable, it will be
-# presented for verification (and possible edition) using the $PAGER
-# environment variable (or `more', if it is not set, or `cat', if the
-# `-f' switch is given). If $PAGER exits successfully, the modified
-# files (at that moment) are checked in, unless `-n' was specified, in
-# which case nothing is checked in.
-
-# usage: commit [-v] [-h] [-f] [-l] [-n] [-q] [-z N]
-# [-m msg|-F msg_file] [--] [file|dir ...]
-
-# -f --fast don't check (unless *followed* by -n), and just
-# --force display commit message instead of running $PAGER
-# -l --local don't descend into subdirectories
-# -m msg --message=msg set commit message
-# --msg=msg same as -m
-# -F file --file=file read commit message from file
-# -n --dry-run don't commit anything
-# -q --quiet run cvs in quiet mode
-# -zN --compress=N set compression level (0-9, 0=none, 9=max)
-# -v --version print version information
-# -h,-? --help print short or long help message
+# The commit message will be extracted from the differences between a
+# file named ChangeLog* in the commit list, or named after -C, and the
+# one in the repository (unless a message was specified with `-m' or
+# `-F'). An empty message is not accepted (but a blank line is). If
+# the message is acceptable, it will be presented for verification
+# (and possible edition) using the $PAGER environment variable (or
+# `more', if it is not set, or `cat', if the `-f' switch is given).
+# If $PAGER exits successfully, the modified files (at that moment)
+# are checked in, unless `-n' was specified, in which case nothing is
+# checked in.
+
+# Report bugs to <gary@gnu.org>
name=commit
+: ${CVS=cvs}
+: ${SHELL=/bin/sh}
+: ${MAILNOTIFY=./config/mailnotify}
cvsopt=
updateopt=
commitopt=
commit=:
update=:
log_file="${TMPDIR-/tmp}/commitlog.$$"
+signature_file=
+first=false
+sendmail_to='Libtool Commit <libtool-commit@gnu.org>'
+sendmail_from=
+
+my_sed_help='/^# Usage:/,/# Report bugs to/ {
+ s/^# //; s/^# *$//;
+ s/\$progname/'$progname'/;
+ p;
+ }; d'
+my_sed_version='/^# '$name' (GNU /,/# warranty; / {
+ s/^# //; s/^# *$//;
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
+ p;
+ }; d'
rm -f "$log_file"
trap 'rm -f "$log_file"; exit 1' 1 2 15
+set -e
+
# this just eases exit handling
main_repeat=":"
while $main_repeat; do
repeat="test $# -gt 0"
while $repeat; do
case "$1" in
- -f|--force|--fast)
+ --fast)
+ shift
+ set fnord --force --first ${1+"$@"}
+ shift
+ ;;
+ -f|--force)
update=false
PAGER=cat
shift
;;
+ --from)
+ if test $# = 1; then
+ echo "$name: missing argument for $1" >&2
+ break
+ fi
+ shift
+ sendmail_from="$1"
+ shift
+ ;;
-l|--local)
updateopt="$updateopt -l"
commitopt="$commitopt -l"
echo "$name: missing argument for $1" >&2
break
fi
- if test -f "$log_file"; then
- echo "$name: you can have at most one of -m and -F" >&2
+ if $first || test -f "$log_file"; then
+ echo "$name: you can have at most one of -m, -F and -1" >&2
break
fi
shift
shift
;;
-F|--file)
- if test -f "$log_file"; then
- echo "$name: you can have at most one of -m and -F" >&2
+ if $first || test -f "$log_file"; then
+ echo "$name: you can have at most one of -m, -F and -1" >&2
break
fi
if test $# = 1; then
fi
shift
;;
+ -1|--first)
+ if test -f "$log_File"; then
+ echo "$name: you can have at most one of -m, -F and -1" >&2
+ break
+ fi
+ first=:
+ shift
+ ;;
+ -C|--[cC]hange[lL]og)
+ if test $# = 1; then
+ echo "$name: missing argument for $1" >&2
+ break
+ fi
+ shift
+ if test ! -f "$1"; then
+ echo "$name: ChangeLog file \`$1' does not exist" >&2
+ break
+ fi
+ ChangeLog="$1"
+ shift
+ ;;
-n|--dry-run)
commit=false
update=true
cvsopt="$cvsopt -q"
shift
;;
+ -s|--sendmail)
+ if test $# = 1; then
+ echo "$name: missing argument for $1" >&2
+ break
+ fi
+ shift
+ sendmail_to="$1"
+ shift
+ ;;
+ --signature)
+ if test $# = 1; then
+ echo "$name: missing argument for $1" >&2
+ break
+ fi
+ shift
+ signature_file="$HOME/.signature"
+ case $1 in
+ -*) ;;
+ *) signature_file="$1"; shift ;;
+ esac
+ if test -f "$signature_file"; then :
+ else
+ echo "$name: \`$signature_file': file not found"
+ break
+ fi
+ ;;
-z|--compress)
if test $# = 1; then
echo "$name: missing argument for $1" >&2
shift
;;
- -m*|-F*|-z*)
+ -m*|-F*|-C*|-s*|-z*)
opt=`echo "$1" | sed '1s/^\(..\).*$/\1/;q'`
arg=`echo "$1" | sed '1s/^-[a-zA-Z0-9]//'`
shift
set -- "$opt" "$arg" ${1+"$@"}
;;
- --message=*|--msg=*|--file=*|--compress=*)
+ --message=*|--msg=*|--from=*|--file=*|--[Cc]hange[Ll]og=*|--compress=*|--sendmail=*|--signature=*)
opt=`echo "$1" | sed '1s/^\(--[^=]*\)=.*/\1/;q'`
arg=`echo "$1" | sed '1s/^--[^=]*=//'`
shift
;;
-v|--version)
- sed '/^# '$name' version /,/^# Heavily modified by/ { s/^# //; p; }; d' < $0
+ sed "$my_sed_version" < $0
exit 0
;;
-\?|-h)
exit 0
;;
--help)
- sed '/^# '$name' version /,/^[^#]/ { /^[^#]/ d; s/^# //; p; }; d' < $0
+ sed "$my_sed_help" < $0
exit 0
;;
--)
;;
esac
done
+
+if test -z "$sendmail_to"; then
+ # can't have a from address without a destination address
+ test -n "$sendmail_from" &&
+ echo "$name: can't use --from without --sendmail." >&2 && exit 1
+ # can't use a signature file without a destination address
+ test -n "$signature_file" &&
+ echo "$name: can't use --signature without --sendmail," >&2 && exit 1
+fi
+
# might have used break 2 within the previous loop, but so what
$repeat && break
$update && \
if echo "$name: checking for conflicts..." >&2
- (cvs $cvsopt -q -n update $updateopt ${1+"$@"} 2>/dev/null \
+ ($CVS $cvsopt -q -n update $updateopt ${1+"$@"} \
| while read line; do
echo "$line"
echo "$line" >&3
fi
if test ! -f "$log_file"; then
+ if test -z "$ChangeLog"; then
+ for f in ${1+"$@"}; do
+ case "$f" in
+ ChangeLog* | */ChangeLog*)
+ if test -z "$ChangeLog"; then
+ ChangeLog="$f"
+ else
+ echo "$name: multiple ChangeLog files: $ChangeLog and $f" >&2
+ break
+ fi
+ ;;
+ esac
+ done
+ fi
+
echo "$name: checking commit message..." >&2
- cvs $cvsopt diff -u ChangeLog \
- | while read line; do
+ if $first; then
+ skipping=:
+ sed 's,^,+,' < ${ChangeLog-ChangeLog} |
+ while read line; do
case "$line" in
- "--- ChangeLog"*) :;;
+ "+") if $skipping; then skipping=false; else break; fi;;
+ "+ "*)
+ echo "$name: *** Warning: lines should start with tabs, not spaces; ignoring line:" >&2
+ echo "$line" | sed 's/^.//' >&2;;
+ "+ "*)
+ $skipping || echo "$line" ;;
+ esac
+ done |
+ sed 's,^\+ ,,' > "$log_file" || break
+ else
+ $CVS $cvsopt diff -u ${ChangeLog-ChangeLog} |
+ while read line; do
+ case $line in
+ "--- "*) :;;
"-"*)
echo "$name: *** Warning: the following line in ChangeLog diff is suspicious:" >&2
echo "$line" | sed 's/^.//' >&2;;
"+") echo;;
"+ "*) echo "$line";;
esac
- done \
- | sed -e 's,\+ ,,' -e '/./p' -e '/./d' -e '1d' -e '$d' > "$log_file" \
- || break
+ done |
+ sed -e 's,\+ ,,' -e '/./p' -e '/./d' -e '1d' -e '$d' > "$log_file" \
+ || break
+ fi
# The sed script above removes "+TAB" from the beginning of a line, then
# deletes the first and/or the last line, when they happen to be empty
fi
fi
if grep '^$' < "$log_file" > /dev/null; then
- echo "$name: *** Warning: blank lines should not appear within a commit messages." >&2
+ echo "$name: *** Warning: blank lines should not appear within commit messages." >&2
echo "$name: *** They should be used to separate distinct commits." >&2
fi
sleep 1 # give the user some time for a ^C
+filelist=`cvs -nq up 2>/dev/null | grep '^[MAD] ' | sed 's/^. //'`
+
# Do not check for empty $log_file again, even though the user might have
# zeroed it out. If s/he did, it was probably intentional.
if $commit; then
- cvs $cvsopt commit $commitopt -F $log_file ${1+"$@"} || break
+ $CVS $cvsopt commit $commitopt -F $log_file ${1+"$@"} || break
fi
main_repeat=false
done
+# Send a copy of the log_file if sendmail_to was set:
+if test -n "$sendmail_to"; then
+ echo "$name: Mailing commit notification to $sendmail_to" >&2
+ test $# -gt 0 && filelist="$@"
+ test -f "$signature_file" && cat "$signature_file" >> "$log_file"
+ if test -n "$sendmail_from"; then
+ $SHELL $MAILNOTIFY -F "$sendmail_from" -s "`echo $filelist`" -f "$log_file" -m "text/plain" "$sendmail_to"
+ else
+ $SHELL $MAILNOTIFY -s "`echo $filelist`" -f "$log_file" -m "text/plain" "$sendmail_to"
+ fi
+fi
+
rm -f "$log_file"
# if main_repeat was not set to `false', we failed
--- /dev/null
+#!/bin/sh
+#
+# mailnotify (GNU cvs-utils) version 0.1
+# Written by Gary V. Vaughan <gary@gnu.org>
+
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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 of the License, 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, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
+
+# Usage: $progname [OPTION]... [--] to-address...
+#
+# -C ADDR --carbon-copy=ADDR send a carbon-copy to ADDR
+# -F ADDR --from=ADDR override default from address with ADDR
+# -f FILE --filename=FILE content of this part
+# -m TYPE --mime-type=TYPE mime-type of this part
+# -n another mime part (-f, -m) to follow
+# -o FILE --output-file=FILE output to FILE instead of sending
+# -s TEXT --subject=TEXT set subject header
+# -v --verbose run in verbose mode
+# --version print version information
+# -h,-? --help print short or long help message
+
+# Assemble a (possibly multi-part) mime message and hand it to the local
+# sendmail for onward delivery. MUAs tend to mangle patch attachments in
+# various ways: not setting the mime-type correctly, line wrapping the
+# patch itself, escaping certain values, etc. This script is designed to
+# make it easier to send a patch as a MIME attachment, though it is general
+# enough that it might be useful otherwise.
+
+# For example to send a patch as an attachment, assuming the patch itself
+# is in PATCHFILE:
+#
+# echo 'Applied to HEAD' > body
+# $progname -f body -m text/plain -n -f PATCHFILE -m text/x-patch \
+# -s 'FYI: PATCHFILE' patch-list@foo.org
+
+# You will probably find using this script in conjunction with clcommit
+# or cvsapply will save you an awful lot of typing.
+
+# Report bugs to <gary@gnu.org>
+
+: ${TMPDIR=/tmp}
+: ${HOST=`hostname`}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="sed"}
+
+# The name of this program:
+progname=`echo "$0" | $SED 's%^.*/%%'`
+PROGRAM=mailnotify
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+multipart=1
+outputfile=""
+
+exit_cmd=:
+
+sed_dirname='s,/[^/]*$,,'
+sed_basename='s,^.*/,,'
+sed_mail_address='s,^.*<\(.*\)>.*$,\1,'
+
+# func_echo arg...
+# Echo program name prefixed message.
+func_echo ()
+{
+ echo $progname: ${1+"$@"}
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ echo $progname: ${1+"$@"} 1>&2
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_error ${1+"$@"}
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "Try \`$progname --help' for more information."
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ func_error "missing argument for $1"
+ exit_cmd=exit
+}
+
+# Parse options once, thoroughly. This comes as soon as possible in
+# the script to make things like `mailnotify --version' happen quickly.
+{
+ # sed scripts:
+ my_sed_single_opt='1s/^\(..\).*$/\1/;q'
+ my_sed_single_rest='1s/^..\(.*\)$/\1/;q'
+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+ my_sed_long_arg='1s/^--[^=]*=//'
+ my_sed_help='/^# Usage:/,/# Report bugs to/ {
+ s/^# //; s/^# *$//;
+ s/\$progname/'$progname'/;
+ p;
+ }; d'
+ my_sed_version='/^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //; s/^# *$//;
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
+ p;
+ }; d'
+
+ while test $# -gt 0; do
+ opt="$1"
+ shift
+ case $opt in
+ -C|--carbon-copy) test $# -eq 0 && func_missing_arg "$opt" && break
+ cc="$1"
+ shift
+ ;;
+
+ -F|--from) test $# -eq 0 && func_missing_arg "$opt" && break
+ from="$1"
+ shift
+ ;;
+
+ -f|--filename) test $# -eq 0 && func_missing_arg "$opt" && break
+ if test -f "$1"; then :; else
+ func_error "\`$1' does not exist"
+ exit_cmd=exit
+ break
+ fi
+ eval datafile$multipart=\"$1\"
+ shift
+ ;;
+
+ -m|--mime-type) test $# -eq 0 && func_missing_arg "$opt" && break
+ case $1 in
+ text/*) ;;
+ */*) func_error "only text/* mime-types supported"
+ ;;
+ *) func_error "invalid mime-type, \`$1'"
+ exit_cmd=exit
+ ;;
+ esac
+ eval ctype$multipart=\"$1\"
+ shift
+ ;;
+
+ -n) if eval test -z \"\$ctype$multipart\" ||
+ eval test -z \"\$datafile$multipart\"; then
+ func_fatal_error "One part is incomplete -- each part needs a filename and a mime-type"
+ fi
+ multipart=`expr 1 + $multipart`
+ ;;
+
+ -o|--output-file) test $# -eq 0 && func_missing_arg "$opt" && break
+ outputfile="$1"
+ shift
+ ;;
+
+ -s|--subject) test $# -eq 0 && func_missing_arg "$opt" && break
+ subject="$1"
+ shift
+ ;;
+
+ -v|--verbose) opt_verbose=: ;;
+
+ --carbon-copy=*|--from=*|--filename=*|--mime-type=*|--output-file=*|--subject=*)
+ arg=`echo "$opt" | $SED "$my_sed_long_arg"`
+ opt=`echo "$opt" | $SED "$my_sed_long_opt"`
+ set -- "$opt" "$arg" ${1+"$@"}
+ ;;
+
+ -C*|-F*|-f*|-m*|-o*|-s*)
+ arg=`echo "$opt" |$SED "$my_sed_single_rest"`
+ opt=`echo "$opt" |$SED "$my_sed_single_opt"`
+ set -- "$opt" "$arg" ${1+"$@"}
+ ;;
+
+ -n*|-v*)
+ rest=`echo "$opt" |$SED "$my_sed_single_rest"`
+ opt=`echo "$opt" |$SED "$my_sed_single_opt"`
+ set -- "$opt" "-$rest" ${1+"$@"}
+ ;;
+
+ --version) $SED "$my_sed_version" < $0; exit $EXIT_SUCCESS ;;
+ --help) $SED "$my_sed_help" < $0; exit $EXIT_SUCCESS ;;
+ --) break ;;
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+ *) set -- "$opt" ${1+"$@"}; break ;;
+ esac
+ done
+
+ test $# -gt 0 ||
+ func_fatal_help "no destination address"
+
+ if test -z "$outputfile"; then
+ if test -z "$subject" ||
+ eval test -z \"\$ctype$multipart\" ||
+ eval test -z \"\$datafile$multipart\"; then
+ func_fatal_error "if output is not directed to a file -s, -f, and -m are all required"
+ fi
+ else
+ eval test -n \"\$datafile$multipart\" ||
+ func_fatal_error "-f is required."
+ eval test -n \"\$ctype$multipart\" ||
+ func_fatal_error "with output directed to a file, -m is required"
+ fi
+ eval test -f \"\$datafile$multipart\" ||
+ eval func_fatal_error \"\$datafile$multipart: file not found\"
+}
+
+
+# func_headers outfile destination
+# Generate common headers to OUTFILE, where DESTINATION is a comma
+# separated list of fully qualified destination addresses.
+func_headers ()
+{
+ my_outfile="$1"
+ my_destination="$2"
+ my_sed_version_no='/^# '$PROGRAM' (GNU / { s/^# .*version //; p; }; d'
+
+ {
+ echo "User-Agent: $PROGRAM/`$SED \"$my_sed_version_no\" < $0`"
+ echo "MIME-Version: 1.0"
+ test -n "$from" && echo "From: $from"
+ echo "To: $my_destination"
+ test -n "$cc" && echo "CC: $cc"
+ test -n "$subject" && echo "Subject: $subject"
+ } > "$my_outfile"
+}
+
+
+# func_single_content outfile
+# Send the only message part as a single mime mail part.
+func_single_content ()
+{
+ my_outfile="$1"
+
+ cat >> "$my_outfile" <<EOF
+Content-Type: $ctype1
+Content-Transfer-Encoding: 7bit
+
+`cat $datafile1`
+EOF
+}
+
+
+# func_multipart_content outfile
+# Send the various message parts to OUTFILE as a multipart mime mail.
+func_multipart_content ()
+{
+ my_outfile="$1"
+ boundary="Boundary-${HOST}-$$-`date | tr ' :' -`"
+ cat <<EOF >> "$my_outfile"
+Content-Type: Multipart/Mixed;
+ boundary="$boundary"
+
+This is a multimedia message in MIME format. If you are reading
+this prefix, your mail reader does not understand MIME. You may
+wish to look into upgrading to a mime-aware mail reader.
+EOF
+ i=0
+ while test $i -lt $multipart
+ do
+ i=`expr 1 + $i`
+ {
+ echo ""
+ echo "--$boundary"
+ eval echo \"Content-Type: \$ctype$i\"
+ echo "Content-Transfer-Encoding: 7bit"
+ echo ""
+ eval cat \"\$datafile$i\"
+ } >> "$my_outfile"
+ done
+ {
+ echo ""
+ echo "--${boundary}--"
+ echo ""
+ } >> "$my_outfile"
+}
+
+
+# func_sendmail infile destination [from]
+# Send the message in INFILE to the space delimited list of destination
+# addresses in DESTINATION. If FROM is given, it is the address the
+# mail purports to be from.
+# BEWARE: Many MTAs will refuse mail where FROM does not match the actual
+# sending domain.
+func_sendmail ()
+{
+ my_infile="$1"
+ my_destination="$2"
+ my_from="$3"
+
+ from_name=`echo "$my_from" | sed 's, *<.*> *$,,;s,",,g'`
+ from_addr=`echo "$my_from" | sed "$sed_mail_address"`
+
+ func_verbose "Delivering mail, please wait..."
+ if test -n "$from_name"; then
+ sendmail -F "$from_name" -f "$from_addr" $my_destination < "$my_infile"
+ elif test -n "$from_addr"; then
+ sendmail -f "$from_addr" $my_destination < "$my_infile"
+ else
+ sendmail $my_destination < "$my_infile"
+ fi
+ if test $? -eq 0; then
+ func_verbose "...succeeded."
+ rm $my_infile
+ else
+ func_fatal_error "Mail delivery failed, draft mail is in $my_infile"
+ fi
+}
+
+
+
+## ----- ##
+## main. ##
+## ----- ##
+
+{
+ fname="${TMPDIR}/$PROGRAM$RANDOM-$RANDOM.$$"
+ trap 'rm -f "$fname"; exit 1' 1 2 15
+
+ destination=""
+ for to;
+ do
+ case $destination in
+ "") destination="$to" ;;
+ *) destination="$destination, $to" ;;
+ esac
+ done
+
+ func_headers "$fname" "$destination"
+ if test $multipart -gt 1; then
+ func_multipart_content "$fname"
+ else
+ func_single_content "$fname"
+ fi
+
+ if test -z "$outputfile"; then
+ destination=""
+ for to; do
+ to_addr=`echo "$to" | sed "$sed_mail_address"`
+ test -n "$to_addr" || to_addr="$to"
+ destination="$destination $to_addr"
+ done
+ func_sendmail "$fname" "$destination" "$from"
+ else
+ mv $fname $outputfile || exit $EXIT_FAILURE
+ fi
+}
+
+exit $EXIT_SUCCESS
## ----------------------- ##
AC_CONFIG_FILES([config/ltmain.sh:./ltmain.in])
AC_CONFIG_FILES([libtoolize], [chmod a+x libtoolize])
-AC_LIBTOOL_DLOPEN
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
+LT_INIT([dlopen win32-dll])
AC_LIB_LTDL
if test -z "$macro_version"; then
cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this AC_PROG_LIBTOOL comes from an older release.
+$progname: definition of this LT_INIT comes from an older release.
$progname: You should recreate aclocal.m4 with macro's from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
else
cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this AC_PROG_LIBTOOL comes from $PACKAGE $macro_version.
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: You should recreate aclocal.m4 with macro's from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
else
cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition used by this AC_PROG_LIBTOOL comes from revision
+$progname: but the definition used by this LT_INIT comes from revision
$progname: $macro_revision.
$progname: You should recreate aclocal.m4 with macro's from revision $package_revision
$progname: of $PACKAGE $VERSION and run autoconf again.
if test -z "$macro_version"; then
cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this AC_PROG_LIBTOOL comes from an older release.
+$progname: definition of this LT_INIT comes from an older release.
$progname: You should recreate aclocal.m4 with macro's from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
else
cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this AC_PROG_LIBTOOL comes from $PACKAGE $macro_version.
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: You should recreate aclocal.m4 with macro's from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
else
cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition used by this AC_PROG_LIBTOOL comes from revision
+$progname: but the definition used by this LT_INIT comes from revision
$progname: $macro_revision.
$progname: You should recreate aclocal.m4 with macro's from revision $package_revision
$progname: of $PACKAGE $VERSION and run autoconf again.
[$2])])
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-]) # AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+# LT_INIT([OPTIONS])
+# --------------------------
+AC_DEFUN_ONCE([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
AC_REQUIRE([_LT_PROG_LTMAIN])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+AC_BEFORE([$0], [AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0], [AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0], [AC_LIBTOOL_GCJ])dnl
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ltmain"
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
+# Set options
+_LT_SET_OPTIONS([$1])dnl
+_LT_SETUP])# LT_INIT
-# _LT_PROG_LTMAIN
-# ---------------
-# In libtool itself `ltmain.sh' is in the build tree, but everything else
-# ships it in the source tree, for completeness, if we find a copy in the
-# build tree use that before falling back to auxdir.
-#
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-AC_DEFUN([_LT_PROG_LTMAIN],
-[_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-case $ac_aux_dir in
- $srcdir) ltmain=./ltmain.sh ;;
- $srcdir/*) ltmain=`expr "$ac_aux_dir" : "$srcdir/\(.*\)"`/ltmain.sh ;;
-esac
-test -f "$ltmain" || ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
+# Old names:
+AU_DEFUN([AC_PROG_LIBTOOL], [LT_INIT])
+AU_DEFUN([AM_PROG_LIBTOOL], [LT_INIT])
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.58)dnl We use AC_INCLUDES_DEFAULT
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW)$])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# _LT_SETUP
+# ---------
+m4_define([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
_LT_DECL([], [host_alias], [0], [The host system])dnl
_LT_DECL([], [host], [0])dnl
-
+dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
AC_REQUIRE([AC_PROG_NM])dnl
-
+dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
test -z "$LN_S" && LN_S="ln -s"
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-
+dnl
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
AC_REQUIRE([AC_LIBTOOL_SYS_OLD_ARCHIVE])dnl
AC_REQUIRE([AC_LIBTOOL_SYS_MAX_CMD_LEN])dnl
AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
AC_REQUIRE([AC_OBJEXT])dnl
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
AC_REQUIRE([AC_EXEEXT])dnl
setopt NO_GLOB_SUBST
fi
-AC_ENABLE_SHARED
-AC_ENABLE_STATIC
-AC_ENABLE_FAST_INSTALL
AC_LIBTOOL_OBJDIR
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
;;
esac
-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
AC_ARG_ENABLE([libtool-lock],
[AC_HELP_STRING([--disable-libtool-lock],
[avoid locking (might break parallel builds)])])
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-AC_ARG_WITH([pic],
- [AC_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])
-
# Use C for the default configuration in the libtool script
AC_LIBTOOL_LANG_C_CONFIG
_LT_AC_TAG_CONFIG
_LT_CONFIG_COMMANDS
-])# AC_LIBTOOL_SETUP
+])# _LT_SETUP
+# _LT_PROG_LTMAIN
+# ---------------
+# In libtool itself `ltmain.sh' is in the build tree, but everything else
+# ships it in the source tree, for completeness, if we find a copy in the
+# build tree use that before falling back to auxdir.
+#
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+AC_DEFUN([_LT_PROG_LTMAIN],
+[_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+case $ac_aux_dir in
+ $srcdir) ltmain=./ltmain.sh ;;
+ $srcdir/*) ltmain=`expr "$ac_aux_dir" : "$srcdir/\(.*\)"`/ltmain.sh ;;
+esac
+test -f "$ltmain" || ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
## ------------------------------------- ##
])# _LT_AC_TAG_CONFIG
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
-
-
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-test -z "$AS" && AS=as
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-esac
-
-_LT_DECL([], [AS], [0], [Assembler program])dnl
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
-])# AC_LIBTOOL_WIN32_DLL
-
-
-# AC_ENABLE_SHARED([DEFAULT])
-# ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[m4_define([AC_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
- [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-
- _LT_DECL([build_libtool_libs], [enable_shared], [0],
- [Whether or not to build shared libraries])
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-#- set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
-
-
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[m4_define([AC_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
- [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-
- _LT_DECL([build_old_libs], [enable_static], [0],
- [Whether or not to build static libraries])
-])# AC_ENABLE_STATIC
-
-
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
-
-
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[m4_define([AC_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
- [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-
- _LT_DECL([fast_install], [enable_fast_install], [0],
- [Whether or not to optimize for fast installation])
-])# AC_ENABLE_FAST_INSTALL
-
-
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
-
-
-# AC_LIBTOOL_PICMODE([MODE])
-# --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=m4_if($#, 1, $1, default)
-])# AC_LIBTOOL_PICMODE
-
-
# AC_PATH_TOOL_PREFIX
# -------------------
# find a file program which can recognise shared library
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
])# AC_PROG_LD
+# Old name:
+AU_DEFUN([AM_PROG_LD], [AC_PROG_LD])
+
# AC_PROG_LD_GNU
# --------------
_LT_DECL([], [NM], [1], [A BSD-compatible nm program])dnl
])# AC_PROG_NM
+# Old name:
+AU_DEFUN([AM_PROG_NM], [AC_PROG_NM])
+
# AC_CHECK_LIBM
# -------------
[AC_CHECK_TOOL(RC, windres, no)
])
-# old names
-AU_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AU_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AU_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-# This is just to silence aclocal about the macro not being used
-m4_if([AC_DISABLE_FAST_INSTALL])
-
# LT_AC_PROG_EGREP
# ----------------
--- /dev/null
+# Helper functions for option handling. -*- Autoconf -*-
+# Written by Gary V. Vaughan <gary@gnu.org>
+
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# 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.
+
+# serial 1
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(NAME)
+# -----------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Other NAMEs are saved as a flag.
+m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1]))])
+
+
+# _LT_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1]), [$2], [$3])])
+
+
+# _LT_UNLESS_OPTIONS(OPTIONS, IF-NOT-SET)
+# ---------------------------------------
+# Execute IF-NOT-SET if all OPTIONS are not set.
+m4_define([_LT_UNLESS_OPTIONS],
+[AC_FOREACH([_LT_Option], [$1],
+ [m4_ifdef(_LT_MANGLE_OPTION(_LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$2
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+# If any OPTION has a handler macro declared with LT_OPTION_DEFINE,
+# despatch to that macro; otherwise complain about the unknown option
+# and exit.
+m4_define([_LT_SET_OPTIONS],
+[AC_FOREACH([_LT_Option], [$1],
+ [_LT_SET_OPTION(_LT_Option)
+ m4_ifdef(_LT_MANGLE_DEFUN(_LT_Option),
+ _LT_MANGLE_DEFUN(_LT_Option),
+ [m4_fatal([Unknown option `]_LT_Option[' to LT][_INIT_LIBTOOL])])
+ ])dnl
+dnl
+dnl Simply set some default values (i.e off) if boolean options were not
+dnl specified:
+_LT_UNLESS_OPTIONS([dlopen], enable_dlopen=no)
+_LT_UNLESS_OPTIONS([win32-dll], enable_win32_dll=no)
+dnl
+dnl If no reference was made to various pairs of opposing options, then
+dnl we run the default mode handler for the pair. For example, if neither
+dnl `shared' nor `disable-shared' was passed, we enable building of shared
+dnl archives by default:
+_LT_UNLESS_OPTIONS([shared disable-shared], [_LT_ENABLE_SHARED])
+_LT_UNLESS_OPTIONS([static disable-static], [_LT_ENABLE_STATIC])
+_LT_UNLESS_OPTIONS([pic-only no-pic], [_LT_WITH_PIC])
+_LT_UNLESS_OPTIONS([fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+])# _LT_SET_OPTIONS
+
+
+## ----------------------------------------- ##
+## Macros to handle LT_INIT_LIBTOOL options. ##
+## ----------------------------------------- ##
+
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(NAME, CODE)
+# ----------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1]), [$2])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([dlopen], [enable_dlopen=yes])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[_LT_SET_OPTION([win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT_LIBTOOL options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `shared' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED],
+[_LT_SET_OPTION([shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `shared' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([disable-shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-shared' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_DISABLE_SHARED],
+[_LT_SET_OPTION([disable-shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-shared' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT_LIBTOOL options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `static' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC],
+[_LT_SET_OPTION([static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `static' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([disable-static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-static' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_DISABLE_STATIC],
+[_LT_SET_OPTION([disable-static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-static' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT_LIBTOOL options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT_LIBTOOL options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AC_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_if($#, 1, $1, default)
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PIC_MODE],
+[_LT_SET_OPTION([pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_LIBTOOL_INIT's first parameter.])
+])
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
-#
+#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant.
#
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
-#
+#
# So we provide this file, which has a silly filename so it's always
# included after everything else. This provides aclocal with the
# AU_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist.
-#
+#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, but still refer to it,
# remember to add it here.
-m4_ifdef([AC_LIBTOOL_CONFIG], [], [AU_DEFUN([AC_LIBTOOL_CONFIG])])dnl
-m4_ifdef([AC_LIBTOOL_LINKER_OPTION], [], [AU_DEFUN([AC_LIBTOOL_LINKER_OPTION])])dnl
-m4_ifdef([AC_PROG_EGREP], [], [AU_DEFUN([AC_PROG_EGREP])])dnl
-m4_ifdef([_LT_AC_LANG_C_CONFIG], [], [AU_DEFUN([_LT_AC_LANG_C_CONFIG])])dnl
-m4_ifdef([_LT_AC_LANG_GCJ_CONFIG], [], [AU_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])dnl
-m4_ifdef([_LT_AC_LANG_RC_CONFIG], [], [AU_DEFUN([_LT_AC_LANG_RC_CONFIG])])dnl
-m4_ifdef([_LT_AC_PROG_ECHO_BACKSLASH], [], [AU_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])dnl
-m4_ifdef([_LT_AC_SHELL_INIT], [], [AU_DEFUN([_LT_AC_SHELL_INIT])])dnl
-m4_ifdef([_LT_AC_SYS_LIBPATH_AIX], [], [AU_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])dnl
-m4_ifdef([_LT_AC_TAGVAR], [], [AU_DEFUN([_LT_AC_TAGVAR])])dnl
+m4_ifdef([AC_LIBTOOL_CONFIG],, [AU_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifdef([AC_LIBTOOL_LINKER_OPTION],, [AU_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifdef([AC_LIBTOOL_SETUP],, [AU_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifdef([AC_PROG_EGREP],, [AU_DEFUN([AC_PROG_EGREP])])
+m4_ifdef([_AC_PROG_LIBTOOL],, [AU_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifdef([_LT_AC_LANG_C_CONFIG],, [AU_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifdef([_LT_AC_LANG_GCJ_CONFIG],, [AU_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifdef([_LT_AC_LANG_RC_CONFIG],, [AU_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifdef([_LT_AC_PROG_ECHO_BACKSLASH],, [AU_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifdef([_LT_AC_SHELL_INIT],, [AU_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifdef([_LT_AC_SYS_LIBPATH_AIX],, [AU_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifdef([_LT_PROG_LTMAIN],, [AU_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifdef([_LT_AC_TAGVAR],, [AU_DEFUN([_LT_AC_TAGVAR])])
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA
-AC_PREREQ(2.54)
+AC_PREREQ(2.59a)
## ------------------------ ##
## Autoconf initialisation. ##
## Libtool initialisation. ##
## ----------------------- ##
AC_LIBTOOL_TAGS([])
-AC_PROG_LIBTOOL
+LT_INIT
AC_SUBST([LIBTOOL_DEPS])