aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1995-06-21 20:57:03 +0000
committerKen Raeburn <raeburn@cygnus>1995-06-21 20:57:03 +0000
commit6109825c73b46d6b4156566eb9e9cd878a25770e (patch)
treee7c8dc04d983487c93dbbd07b47017ab2fa10f63 /configure
parent1684136b2116637663f9b54bf0ad4d223e517a6c (diff)
downloadfsf-binutils-gdb-6109825c73b46d6b4156566eb9e9cd878a25770e.zip
fsf-binutils-gdb-6109825c73b46d6b4156566eb9e9cd878a25770e.tar.gz
fsf-binutils-gdb-6109825c73b46d6b4156566eb9e9cd878a25770e.tar.bz2
Handle autoconfiscated directories by running the correct configure script.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure49
1 files changed, 44 insertions, 5 deletions
diff --git a/configure b/configure
index e7087c1..ccfcdc9 100755
--- a/configure
+++ b/configure
@@ -53,6 +53,8 @@ Makefile=Makefile
Makefile_in=Makefile.in
arguments=$*
build_alias=
+cache_file=
+cache_file_option=
configdirs=
exec_prefix=
exec_prefixoption=
@@ -162,10 +164,7 @@ do
esac
;;
--cache*)
- case "$option" in
- *=*) other_options="${other_options} ${option}" ;;
- *) other_options="${other_options} ${option}=${optarg}" ;;
- esac
+ cache_file=$optarg
;;
--disable-*)
enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
@@ -471,6 +470,34 @@ esac
case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
"")
echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
+ # Check for a directory that's been converted to use autoconf since
+ # it was last configured.
+ if grep AC_OUTPUT ${srcdir}/configure.in >/dev/null ; then
+ echo '***' Hmm, looks like this directory has been autoconfiscated. 1>&2
+ if [ -r ${srcdir}/configure ] ; then
+ echo '***' Running the local configure script. 1>&2
+ case "${cache_file}" in
+ "") cache_file_option= ;;
+ *) cache_file_option="--cache-file=${cache_file}" ;;
+ esac
+ srcdiroption="--srcdir=${srcdir}"
+ case "${build_alias}" in
+ "") buildopt= ;;
+ *) buildopt="--build=${build_alias}" ;;
+ esac
+ eval exec ${config_shell} ${srcdir}/configure ${verbose} \
+ ${buildopt} --host=${host_alias} --target=${target_alias} \
+ ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
+ ${srcdiroption} \
+ ${program_prefixoption} ${program_suffixoption} \
+ ${program_transform_nameoption} ${site_option} \
+ ${withoptions} ${withoutoptions} \
+ ${enableoptions} ${disableoptions} \
+ ${cache_file_option} ${removing} ${other_options} ${redirect}
+ else
+ echo '***' There is no configure script present though. 1>&2
+ fi
+ fi
exit 1
;;
*) ;;
@@ -974,6 +1001,18 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
;;
esac
+ # Handle --cache-file=../XXX
+ case "${cache_file}" in
+ "") # empty
+ ;;
+ /*) # absolute path
+ cache_file_option="--cache-file=${cache_file}"
+ ;;
+ *) # relative path
+ cache_file_option="--cache-file=../${cache_file}"
+ ;;
+ esac
+
### check for guested configure, otherwise fix possibly relative progname
if [ -f ${newsrcdir}/configure ] ; then
recprog=${newsrcdir}/configure
@@ -991,7 +1030,7 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
if [ ! -z "${recprog}" ] ; then
if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
- ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${removing} ${other_options} ${redirect} ; then
+ ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
true
else
echo Configure in `pwd` failed, exiting. 1>&2