From 424f02027213e8e4ed386bca4d7973022e63dac6 Mon Sep 17 00:00:00 2001 From: "K. Richard Pixley" Date: Fri, 7 Feb 1992 00:33:49 +0000 Subject: [PATCH] Fix so that "guested" configure scripts work when using -srcdir. --- configure | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 1b685fa41cf..ff75fa2c1d4 100755 --- a/configure +++ b/configure @@ -680,16 +680,22 @@ ${progname}" ${arguments} " POPDIR=${PWD} cd ${configdir} -### figure out what to do with srcdir +### figure out what to do with srcdir & guest configure case "${srcdir}" in - ".") ;; # do nothing. We're building in place. - /*) srcdiroption="-srcdir=${srcdir}/${configdir}" ;; # absolute path - *) srcdiroption="-srcdir=../${srcdir}/${configdir}" ;; # otherwise relative + ".") newsrcdir=${srcdir} ;; # no -srcdir option. We're building in place. + /*) # absolute path + newsrcdir=${srcdir}/${configdir} + srcdiroption="-srcdir=${newsrcdir}" + ;; + *) # otherwise relative + newsrcdir=../${srcdir}/${configdir} + srcdiroption="-srcdir=${newsrcdir}" + ;; esac ### The recursion line is here. - if [ -f configure ] ; then - recprog=`pwd`/configure + if [ -f ${newsrcdir}/configure ] ; then + recprog=${newsrcdir}/configure else recprog=${progname} fi -- 2.30.2