version="$Revision$"
x11=default
+### we might need to use some other shell than /bin/sh for running subshells
+#
+config_shell=${CONFIG_SHELL-}
+
NO_EDIT="This file was generated automatically by configure. Do not edit."
## this is a little touchy and won't always work, but...
fatal=yes
;;
esac
+ elif [ -n "${next_host}" ] ; then
+ next_host=
+ case "${host_alias}" in
+ "")
+ host_alias="${arg}"
+ ;;
+ *)
+ echo '***' Can only configure for one host at a time. 1>&2
+ fatal=yes
+ ;;
+ esac
elif [ -n "${next_tmpdir}" ] ; then
next_tmpdir=
tmpdiroption="--tmpdir=${arg}"
;;
esac
;;
+ -host=* | --host | --hos | --ho)
+ case "${host_alias}" in
+ "")
+ next_host=yes
+ ;;
+ *)
+ echo '***' Can only configure for one host at a time. 1>&2
+ fatal=yes
+ ;;
+ esac
+ ;;
-nfp | --nf*)
floating_point=no
;;
echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
fi
+ # make sure that some sort of reasonable default exists for these
+ # two variables
+ CXX=${CXX-"g++ -O"}
+ CC=${CC-cc}
+
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
# remove any form feeds.
if [ -z "${subdirs}" ]; then
fi
sed -e "s:^prefix[ ]*=.*$:prefix = ${prefix}:" \
-e "s:^exec_prefix[ ]*=.*$:exec_prefix = ${exec_prefix}:" \
+ -e "/^CC[ ]*=/{
+ b chkcc
+ :contcc
+ N
+ :chkcc
+ s/\\\\$//
+ t contcc
+ s/^CC[ ]*=.*$/CC = ${CC}/
+ }" \
+ -e "/^CXX[ ]*=/{
+ b chkcxx
+ :contcxx
+ N
+ :chkcxx
+ s/\\\\$//
+ t contcxx
+ s/^CXX[ ]*=.*$/CXX = ${CXX}/
+ }" \
-e "s:^srcdir[ ]*=.*$:srcdir = ${makesrcdir}:" \
-e "s/\f//" \
-e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \
### check for guested configure, otherwise fix possibly relative progname
if [ -f ${newsrcdir}/configure ] ; then
recprog=${newsrcdir}/configure
- else
+ elif [ -f ${newsrcdir}/configure.in ] ; then
case "${progname}" in
/*) recprog=${progname} ;;
*) recprog=../${progname} ;;
esac
+ else
+ eval echo No configuration information in ${configdir} ${redirect}
+ recprog=
fi
### The recursion line is here.
- if eval ${recprog} ${verbose} --host=${host_alias} --target=${target_alias} \
- ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
- ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${removing} ${redirect} ; then
- true
- else
- exit 1
- fi
+ if [ ! -z "${recprog}" ] ; then
+ if eval ${config_shell} ${recprog} ${verbose} --host=${host_alias} --target=${target_alias} \
+ ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
+ ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${removing} ${redirect} ; then
+ true
+ else
+ exit 1
+ fi
+ fi
cd ${POPDIR}
fi