# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+###############################################################################
+# Shell compatibility
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ # Despite of this, we have managed to segfault some zsh's.
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+
###############################################################################
# Global variables
undistdefs=
# All distribution options
-options=
+doptions=
opt_template=false
opt_no_dist=false
opt_no_inherit=false
ad_fatal "Makefile: No such file or directory"
fi
- configh=`grep "^CONFIG_HEADER" Makefile | cut -d= -f2 | sed 's/^[ \t]//'`
+ configh=`grep "^CONFIG_HEADER" Makefile | cut -d= -f2 | sed 's/^[ ]*//'`
touch $am_distdir/$configh.in 1>/dev/null 2>/dev/null
files=`find $am_distdir -name Makefile\.in`
post_dist_hooks="$post_dist_hooks $podh"
pre_p_dist_hooks="$pre_p_dist_hooks $prpdh"
post_p_dist_hooks="$post_p_dist_hooks $popdh"
- options="$options $opts"
+ doptions="$doptions $opts"
- ad_handle_options "$options"
- ad_debug "options=$options"
+ ad_handle_options "$doptions"
+ ad_debug "options=$doptions"
fi
# Return to caller
distdefs=`echo $distdefs | sed s/$i//`
done
- rm -f autodist.tmp.defs autodist.pre.hooks autodist.post.hooks
- rm -f autodist.pre.dist.hooks autodist.post.dist.hooks
+ rm -f autodist.tmp.defs
# Remove duplicate distdefs
for i in $distdefs