3 ### WARNING: this file contains embedded tabs. Do not run untabify on this file.
6 # Copyright (C) 1988, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
22 # Please email any bugs, comments, and/or additions to this file to:
23 # configure@cygnus.com
25 # This file was written by K. Richard Pixley.
28 # Shell script to create proper links to machine-dependent files in
29 # preparation for compilation.
31 # If configure succeeds, it leaves its status in config.status.
32 # If configure fails after disturbing the status quo,
33 # config.status is removed.
36 export PATH ||
(echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh
$0 $argv; kill $$
)
45 #symbolic_link="echo ln -s"
47 # clear some things potentially inherited from environment.
50 Makefile_in
=Makefile.
in
57 floating_point
=default
63 package_makefile_frag
=
70 program_transform_name
=
71 program_transform_nameoption
=
86 ### we might need to use some other shell than /bin/sh for running subshells
88 config_shell
=${CONFIG_SHELL-/bin/sh}
90 NO_EDIT
="This file was generated automatically by configure. Do not edit."
92 ## this is a little touchy and won't always work, but...
94 ## if the argv[0] starts with a slash then it is an absolute name that can (and
95 ## must) be used as is.
97 ## otherwise, if argv[0] has no slash in it, we can assume that it is on the
98 ## path. Since PATH might include "." we also add `pwd` to the end of PATH.
102 # if PWD already has a value, it is probably wrong.
103 if [ -n "$PWD" ]; then PWD
=`pwd`; fi
105 case "${progname}" in
109 PATH
=$PATH:${PWD=`pwd`} ; export PATH
118 # Break out if there are no more args
125 # Get the first arg, and shuffle
129 # Make all options have two hyphens
130 orig_option
=$option # Save original for error messages
133 -*) option
=-$option ;;
136 # Split out the argument for options that take them
139 optarg
=`echo $option | sed -e 's/^[^=]*=//'`
141 # These options have mandatory values. Since we didn't find an = sign,
142 # the value must be in the next argument
143 --b* |
--ex* |
--ho* |
--pre* |
--program-p* |
--program-s* |
--program-t* |
--si* |
--sr* |
--ta* |
--tm*)
149 # Now, process the options
153 case "$build_alias" in
154 "") build_alias
=$optarg ;;
155 *) echo '***' Can only configure
for one build machine
at a
time.
1>&2
166 enableopt
=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
167 eval $enableopt="$optarg"
168 enableoptions
="$enableoptions $option"
170 --exec-prefix* |
--ex*)
172 exec_prefixoption
="--exec-prefix=$optarg"
182 NOHOST
) host_alias
=$optarg ;;
183 *) echo '***' Can only configure
for one
host at a
time.
1>&2
191 --norecursion |
--no*)
196 prefixoption
="--prefix=$optarg"
198 --program-prefix* |
--program-p*)
199 program_prefix
=$optarg
200 program_prefixoption
="--program-prefix=$optarg"
202 --program-suffix* |
--program-s*)
203 program_suffix
=$optarg
204 program_suffixoption
="--program-suffix=$optarg"
206 --program-transform-name* |
--program-t*)
207 # Double any backslashes or dollar signs in the argument
208 program_transform_name
="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
209 program_transform_nameoption
="--program-transform-nameoption='$optarg'"
216 site_option
="--site=$optarg"
219 # Remove trailing slashes. Otherwise, when the file name gets
220 # bolted into an object file as debug info, it has two slashes in
221 # it. Ordinarily this is ok, but emacs takes double slash to
222 # mean "forget the first part".
223 srcdir
=`echo $optarg | sed -e 's:/$::'`
229 case $target_alias in
230 NOTARGET
) target_alias
=$optarg ;;
231 *) echo '***' Can only configure
for one target
at a
time.
1>&2
238 tmpdiroption
="--tmpdir=$optarg"
240 --verbose |
--v |
--verb*)
244 --version |
--V |
--vers*)
245 echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
254 withopt
=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
255 eval $withopt="$optarg"
256 withoptions
="$withoptions $option"
259 withopt
=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
261 withoutoptions
="$withoutoptions $option"
267 echo "Unrecognized option: \"$orig_option\"".
273 NOUNDEFS
) undefs
=$option ;;
274 *) echo '***' Can only configure
for one
host and one target
at a
time.
1>&2
282 # process host and target
284 # Do some error checking and defaulting for the host and target type.
286 # configure --host=HOST --target=TARGET UNDEFS
289 # 1. You aren't allowed to specify --host, --target, and undefs at the
291 # 2. Host defaults to undefs.
292 # 3. If undefs is not specified, then host defaults to the current host,
293 # as determined by config.guess.
294 # 4. Target defaults to undefs.
295 # 5. If undefs is not specified, then target defaults to host.
299 # Make sure that host, target & undefs aren't all specified at the
301 case $host_alias---$target_alias---$undefs in
302 NOHOST---
*---* |
*---NOTARGET---* |
*---*---NOUNDEFS)
304 *) echo '***' Can only configure
for one
host and one target
at a
time.
1>&2
310 # Now, do defaulting for host.
315 # Neither --host option nor undefs were present.
317 guesssys
=`echo ${progname} | sed 's/configure$/config.guess/'`
318 if host_alias
=`${guesssys}`
320 echo "Configuring for a ${host_alias} host." 1>&2
321 arguments
="--host=$host_alias $arguments"
323 echo 'Config.guess failed to determine the host type. You need to specify one.' 1>&2
333 # Do defaulting for target. If --target option isn't present, default
334 # to undefs. If undefs isn't present, default to host.
335 case $target_alias in
339 target_alias
=$host_alias
350 if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
352 echo Usage
: configure HOST
354 echo Options
: [defaults
in brackets
]
355 echo ' --prefix=MYDIR configure for installation of host independent files into MYDIR. ["/usr/local"]'
356 echo ' --exec-prefix=MYDIR configure for installation of host dependent files into MYDIR. ["/usr/local"]'
357 echo ' --help print this message. [normal config]'
358 echo ' --build=BUILD configure for building on BUILD. [BUILD=HOST]'
359 echo ' --host=HOST configure for HOST. [determined via config.guess]'
360 echo ' --norecursion configure this directory only. [recurse]'
361 echo ' --program-prefix=FOO install programs with FOO prepended to their names. [ "" ]'
362 echo ' --program-suffix=FOO install programs with FOO appended to their names. [ "" ]'
363 echo ' --program-transform-name=FOO install programs with names transformed by sed pattern FOO. [ "" ]'
364 echo ' --site=SITE configure with site specific makefile for SITE'
365 echo ' --srcdir=DIR find the sources in DIR. ["." or ".."]'
366 echo ' --target=TARGET configure for TARGET. [TARGET = HOST]'
367 echo ' --tmpdir=TMPDIR create temporary files in TMPDIR. [ TMPDIR = "/tmp" ]'
368 echo ' --nfp configure the compilers default to soft floating point. [hard float]'
369 echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
370 echo ' --without-FOO package FOO is NOT available'
371 echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
373 echo 'Where HOST and TARGET are something like "vax", "sun3", "encore", etc.'
375 if [ -r config.status
] ; then
382 configsub
=`echo ${progname} | sed 's/configure$/config.sub/'`
383 moveifchange
=`echo ${progname} | sed 's/configure$/move-if-change/'`
385 # this is a hack. sun4 must always be a valid host alias or this will fail.
386 if ${configsub} sun4
>/dev
/null
2>&1 ; then
389 echo '***' cannot
find config.sub.
1>&2
394 if ${moveifchange} config.junk config.trash
; then
397 echo '***' cannot
find move-if-change.
1>&2
400 rm -f config.junk config.trash
404 if [ -r configure.
in ] ; then
407 if [ -r ${progname}.
in ] ; then
408 srcdir
=`echo ${progname} | sed 's:/configure$::'`
410 echo '***' "Can't find configure.in. Try using --srcdir=some_dir" 1>&2
418 ### warn about some conflicting configurations.
423 if [ -f ${srcdir}/config.status
] ; then
424 echo '***' Cannot configure here
in \"${PWD=`pwd`}\" when
\"${srcdir}\" is currently configured.
1>&2
429 # default exec_prefix
430 case "${exec_prefix}" in
431 "") exec_prefix
="\$(prefix)" ;;
435 ### break up ${srcdir}/configure.in.
436 case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
438 echo '***' ${srcdir}/configure.
in has no
\"per-host
:\" line.
1>&2
444 case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
446 echo '***' ${srcdir}/configure.
in has no
\"per-target
:\" line.
1>&2
453 "") TMPDIR
=/tmp
; export TMPDIR
;;
457 # keep this filename short for &%*%$*# 14 char file names
458 tmpfile
=${TMPDIR}/cONf$$
459 trap "rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos" 0
461 # split ${srcdir}/configure.in into common, per-host, per-target,
462 # and post-target parts. Post-target is optional.
463 sed -e '/^# per\-host:/,$d' ${srcdir}/configure.
in > ${tmpfile}.com
464 sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.
in > ${tmpfile}.hst
465 if grep '^# post-target:' ${srcdir}/configure.
in >/dev
/null
; then
466 sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.
in > ${tmpfile}.tgt
467 sed -e '1,/^# post\-target:/d' ${srcdir}/configure.
in > ${tmpfile}.pos
469 sed -e '1,/^# per\-target:/d' ${srcdir}/configure.
in > ${tmpfile}.tgt
473 ### do common part of configure.in
477 # some sanity checks on configure.in
478 case "${srctrigger}" in
480 echo '***' srctrigger not
set in ${PWD=`pwd`}/configure.
in.
1>&2
486 case "${build_alias}" in
489 result
=`${configsub} ${build_alias}`
490 buildopt
="--build=${build_alias}"
491 build_cpu
=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
492 build_vendor
=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
493 build_os
=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
494 build
=${build_cpu}-${build_vendor}-${build_os}
498 result
=`${configsub} ${host_alias}`
499 host_cpu
=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
500 host_vendor
=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
501 host_os
=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
502 host=${host_cpu}-${host_vendor}-${host_os}
506 result
=`${configsub} ${target_alias}`
507 target_cpu
=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
508 target_vendor
=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
509 target_os
=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
510 target
=${target_cpu}-${target_vendor}-${target_os}
514 # Find the source files, if location was not specified.
519 if [ ! -r ${srctrigger} ] ; then
526 if [ ! -r ${srcdir}/${srctrigger} ] ; then
527 case "${srcdirdefaulted}" in
528 "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;;
529 *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;;
532 echo '***' \
(At least
${srctrigger} is missing.\
) 1>&2
536 # Some systems (e.g., one of the i386-aix systems the gas testers are
537 # using) don't handle "\$" correctly, so don't use it here.
538 tooldir
='$(exec_prefix)'/${target_alias}
540 if [ "${host_alias}" != "${target_alias}" ] ; then
541 if [ "${program_prefixoption}" = "" ] ; then
542 if [ "${program_suffixoption}" = "" ] ; then
543 if [ "${program_transform_nameoption}" = "" ] ; then
544 program_prefix
=${target_alias}- ;
550 # Merge program_prefix and program_suffix onto program_transform_name
551 # Use a double $ so that make ignores it
552 if [ "${program_suffix}" != "" ] ; then
553 program_transform_name
="-e s,\$\$,${program_suffix}, ${program_transform_name}"
556 if [ "${program_prefix}" != "" ] ; then
557 program_transform_name
="-e s,^,${program_prefix}, ${program_transform_name}"
560 for subdir
in .
${subdirs} ; do
562 # ${subdir} is relative path from . to the directory we're currently
564 # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
565 invsubdir
=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`
567 ### figure out what to do with srcdir
569 ".") # no -srcdir option. We're building in place.
572 makesrcdir
=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
574 *) # otherwise relative
576 .
) makesrcdir
=${srcdir} ;;
577 *) makesrcdir
=${invsubdir}${srcdir}/${subdir} ;;
582 if [ "${subdir}/" != "./" ] ; then
583 Makefile
=${subdir}/Makefile
586 if [ ! -d ${subdir} ] ; then
587 if mkdir
${subdir} ; then
590 echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2
595 case "${removing}" in
599 *) eval echo Building
in ${subdir} ${redirect} ;;
602 # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
603 # Set up the list of links to be made.
604 # ${links} is the list of link names, and ${files} is the list of names to link to.
607 configlinks
="${links}"
608 if [ -r ${subdir}/config.status
] ; then
609 mv -f ${subdir}/config.status
${subdir}/config.back
611 while [ -n "${files}" ] ; do
612 # set file to car of files, files to cdr of files
613 set ${files}; file=$1; shift; files
=$
*
614 set ${links}; link
=$1; shift; links
=$
*
616 if [ ! -r ${srcdir}/${file} ] ; then
617 echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
618 echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
623 # Make a symlink if possible, otherwise try a hard link
624 ${symbolic_link} ${srcdir}/${file} ${link} 2>/dev/null || ${hard_link} ${srcdir}/${file} ${link}
626 if [ ! -r ${link} ] ; then
627 echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
631 echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
634 # Create a .gdbinit file which runs the one in srcdir
635 # and tells GDB to look there for source files.
637 if [ -r ${srcdir}/${subdir}/.gdbinit
] ; then
640 *) cat > ${subdir}/.gdbinit
<<EOF
644 source ${makesrcdir}/.gdbinit
650 # Install a makefile, and make it set VPATH
651 # if necessary so that the sources are found.
652 # Also change its value of srcdir.
653 # NOTE: Makefile generation constitutes the majority of the time in configure. Hence, this section has
654 # been somewhat optimized and is perhaps a bit twisty.
656 # code is order so as to try to sed the smallest input files we know.
658 # the four makefile fragments MUST end up in the resulting Makefile in this order:
659 # package, target, host, and site. so do these separately because I don't trust the
660 # order of sed -e expressions.
662 if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
664 # Conditionalize for this site from "Makefile.in" (or whatever it's called) into Makefile.tem
665 rm -f ${subdir}/Makefile.tem
667 "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
;;
669 site_makefile_frag
=${srcdir}/config
/ms-
${site}
671 if [ -f ${site_makefile_frag} ] ; then
672 sed -e "/^####/ r ${site_makefile_frag}" ${srcdir}/${subdir}/${Makefile_in} \
673 > ${subdir}/Makefile.tem
675 cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
680 # working copy now in ${subdir}/Makefile.tem
682 # Conditionalize the makefile for this host.
684 case "${host_makefile_frag}" in
685 "") mv ${subdir}/Makefile.tem ${Makefile} ;;
687 if [ ! -f ${host_makefile_frag} ] ; then
688 host_makefile_frag=${srcdir}/${host_makefile_frag}
690 if [ -f ${host_makefile_frag} ] ; then
691 sed -e "/^
####/ r ${host_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
693 echo '***' Expected
host makefile fragment
\"${host_makefile_frag}\" 1>&2
694 echo '***' is missing
in ${PWD=`pwd`}.
1>&2
695 mv ${subdir}/Makefile.tem
${Makefile}
698 # working copy now in ${Makefile}
700 # Conditionalize the makefile for this target.
701 rm -f ${subdir}/Makefile.tem
702 case "${target_makefile_frag}" in
703 "") mv ${Makefile} ${subdir}/Makefile.tem
;;
705 if [ ! -f ${target_makefile_frag} ] ; then
706 target_makefile_frag
=${srcdir}/${target_makefile_frag}
708 if [ -f ${target_makefile_frag} ] ; then
709 sed -e "/^####/ r ${target_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
711 mv ${Makefile} ${subdir}/Makefile.tem
712 target_makefile_frag=
716 # real copy now in ${subdir}/Makefile.tem
718 # Conditionalize the makefile for this package.
720 case "${package_makefile_frag}" in
721 "") mv ${subdir}/Makefile.tem ${Makefile} ;;
723 if [ ! -f ${package_makefile_frag} ] ; then
724 package_makefile_frag=${srcdir}/${package_makefile_frag}
726 if [ -f ${package_makefile_frag} ] ; then
727 sed -e "/^
####/ r ${package_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
729 echo '***' Expected package makefile fragment
\"${package_makefile_frag}\" 1>&2
730 echo '***' is missing
in ${PWD=`pwd`}.
1>&2
731 mv ${subdir}/Makefile.tem
${Makefile}
734 # working copy now in ${Makefile}
736 mv ${Makefile} ${subdir}/Makefile.tem
738 # real copy now in ${subdir}/Makefile.tem
740 # prepend warning about editting, and a bunch of variables.
742 cat > ${Makefile} <<EOF
744 VPATH = ${makesrcdir}
745 links = ${configlinks}
746 host_alias = ${host_alias}
747 host_cpu = ${host_cpu}
748 host_vendor = ${host_vendor}
750 host_canonical = ${host_cpu}-${host_vendor}-${host_os}
751 target_alias = ${target_alias}
752 target_cpu = ${target_cpu}
753 target_vendor = ${target_vendor}
754 target_os = ${target_os}
755 target_canonical = ${target_cpu}-${target_vendor}-${target_os}
759 *) cat >> ${Makefile} << EOF
760 build_alias = ${build_alias}
761 build_cpu = ${build_cpu}
762 build_vendor = ${build_vendor}
763 build_os = ${build_os}
764 build_canonical = ${build_cpu}-${build_vendor}-${build_os}
768 case "${package_makefile_frag}" in
770 /*) echo package_makefile_frag
= ${package_makefile_frag} >>${Makefile} ;;
771 *) echo package_makefile_frag
= ${invsubdir}${package_makefile_frag} >>${Makefile} ;;
774 case "${target_makefile_frag}" in
776 /*) echo target_makefile_frag
= ${target_makefile_frag} >>${Makefile} ;;
777 *) echo target_makefile_frag
= ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
780 case "${host_makefile_frag}" in
782 /*) echo host_makefile_frag
= ${host_makefile_frag} >>${Makefile} ;;
783 *) echo host_makefile_frag
= ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
786 if [ "${site_makefile_frag}" != "" ] ; then
787 echo site_makefile_frag
= ${invsubdir}${site_makefile_frag} >>${Makefile}
790 # make sure that some sort of reasonable default exists for these
795 # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
796 # remove any form feeds.
797 if [ -z "${subdirs}" ]; then
798 rm -f ${subdir}/Makefile.tem2
799 sed -e "s:^SUBDIRS[ ]*=.*$:SUBDIRS = ${configdirs}:" \
800 -e "s:^NONSUBDIRS[ ]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \
801 ${subdir}/Makefile.tem
> ${subdir}/Makefile.tem2
802 rm -f ${subdir}/Makefile.tem
803 mv ${subdir}/Makefile.tem2
${subdir}/Makefile.tem
805 sed -e "s:^prefix[ ]*=.*$:prefix = ${prefix}:" \
806 -e "s:^exec_prefix[ ]*=.*$:exec_prefix = ${exec_prefix}:" \
807 -e "s:^SHELL[ ]*=.*$:SHELL = ${config_shell}:" \
808 -e "s:^srcdir[ ]*=.*$:srcdir = ${makesrcdir}:" \
810 -e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \
811 -e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \
812 -e "s:^program_transform_name[ ]*=.*$:program_transform_name = ${program_transform_name}:" \
813 -e "s:^tooldir[ ]*=.*$:tooldir = ${tooldir}:" \
814 ${subdir}/Makefile.tem
>> ${Makefile}
815 # final copy now in ${Makefile}
818 echo "No Makefile.in found in ${srcdir}/${subdir}, unable to configure" 1>&2
821 rm -f ${subdir}/Makefile.tem
823 case "${host_makefile_frag}" in
825 *) using
="and \"${host_makefile_frag}\"" ;;
828 case "${target_makefile_frag}" in
830 *) using
="${using} and \"${target_makefile_frag}\"" ;;
833 case "${site_makefile_frag}" in
835 *) using
="${using} and \"${site_makefile_frag}\"" ;;
838 newusing
=`echo "${using}" | sed 's/and/using/'`
840 echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using}
844 # describe the chosen configuration in config.status.
845 # Make that file a shellscript which will reestablish
846 # the same configuration. Used in Makefiles to rebuild
849 case "${norecursion}" in
850 "") arguments="${arguments} --norecursion" ;;
854 if [ ${subdir} = . ] ; then
857 # This directory was configured as follows:
858 ${progname}" ${arguments} "
859 # ${using}" > ${subdir}/config.new
863 # This directory was configured as follows:
865 ${progname}" ${arguments} "
866 # ${using}" > ${subdir}/config.new
868 chmod a
+x
${subdir}/config.new
869 if [ -r ${subdir}/config.back
] ; then
870 mv -f ${subdir}/config.back
${subdir}/config.status
872 ${moveifchange} ${subdir}/config.new ${subdir}/config.status
875 *) rm -f ${Makefile} ${subdir}/config.status ${links} ;;
879 # If there are subdirectories, then recur.
880 if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
881 for configdir
in ${configdirs} ; do
883 if [ -d ${srcdir}/${configdir} ] ; then
884 eval echo Configuring
${configdir}...
${redirect}
888 if [ ! -d .
/${configdir} ] ; then
889 if mkdir .
/${configdir} ; then
892 echo '***' "${progname}: could not make ${PWD=`pwd`}/${configdir}" 1>&2
902 ### figure out what to do with srcdir
904 ".") newsrcdir
=${srcdir} ;; # no -srcdir option. We're building in place.
906 newsrcdir
=${srcdir}/${configdir}
907 srcdiroption
="--srcdir=${newsrcdir}"
909 *) # otherwise relative
910 newsrcdir
=..
/${srcdir}/${configdir}
911 srcdiroption
="--srcdir=${newsrcdir}"
915 ### check for guested configure, otherwise fix possibly relative progname
916 if [ -f ${newsrcdir}/configure
] ; then
917 recprog
=${newsrcdir}/configure
918 elif [ -f ${newsrcdir}/configure.
in ] ; then
919 case "${progname}" in
920 /*) recprog
=${progname} ;;
921 *) recprog
=..
/${progname} ;;
924 eval echo No configuration information
in ${configdir} ${redirect}
928 ### The recursion line is here.
929 if [ ! -z "${recprog}" ] ; then
930 if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
931 ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
932 ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${removing} ${redirect} ; then
935 echo Configure
in `pwd` failed
, exiting.
1>&2