3 ### WARNING: this file contains embedded tabs. Do not run untabify on this file.
6 # Copyright (C) 1988, 90, 91, 92, 93, 94 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:
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
64 package_makefile_frag=
71 program_transform_name=
72 program_transform_nameoption=
87 ### we might need to use some other shell than /bin/sh for running subshells
89 config_shell=${CONFIG_SHELL-/bin/sh}
91 NO_EDIT="This file was generated automatically by configure. Do not edit."
93 ## this is a little touchy and won't always work, but...
95 ## if the argv[0] starts with a slash then it is an absolute name that can (and
96 ## must) be used as is.
98 ## otherwise, if argv[0] has no slash in it, we can assume that it is on the
99 ## path. Since PATH might include "." we also add `pwd` to the end of PATH.
103 # if PWD already has a value, it is probably wrong.
104 if [ -n "$PWD" ]; then PWD=`pwd`; fi
106 case "${progname}" in
110 PATH=$PATH:${PWD=`pwd`} ; export PATH
119 # Break out if there are no more args
126 # Get the first arg, and shuffle
130 # Make all options have two hyphens
131 orig_option=$option # Save original for error messages
134 -*) option=-$option ;;
137 # Split out the argument for options that take them
140 optarg=`echo $option | sed -e 's/^[^=]*=//'`
142 # These options have mandatory values. Since we didn't find an = sign,
143 # the value must be in the next argument
144 --b* | --cache* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-*)
150 # Now, process the options
154 case "$build_alias" in
155 "") build_alias=$optarg ;;
156 *) echo '***' Can only configure for one build machine at a time. 1>&2
161 # Accepted for compatibility with new autoconf; ignored.
165 enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
167 disableoptions="$disableoptions $option"
175 enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
176 eval $enableopt="$optarg"
177 enableoptions="$enableoptions $option"
179 --exec-prefix* | --ex*)
181 exec_prefixoption="--exec-prefix=$optarg"
191 NOHOST) host_alias=$optarg ;;
192 *) echo '***' Can only configure for one host at a time. 1>&2
200 --norecursion | --no*)
205 prefixoption="--prefix=$optarg"
207 --program-prefix* | --program-p*)
208 program_prefix=$optarg
209 program_prefixoption="--program-prefix=$optarg"
211 --program-suffix* | --program-s*)
212 program_suffix=$optarg
213 program_suffixoption="--program-suffix=$optarg"
215 --program-transform-name* | --program-t*)
216 # Double any backslashes or dollar signs in the argument
217 program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
218 program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
223 --silent | --sil* | --quiet | --q*)
224 redirect=">/dev/null"
229 site_option="--site=$optarg"
232 # Remove trailing slashes. Otherwise, when the file name gets
233 # bolted into an object file as debug info, it has two slashes
234 # in it. Ordinarily this is ok, but emacs takes double slash
235 # to mean "forget the first part".
236 srcdir=`echo $optarg | sed -e 's:/$::'`
242 case $target_alias in
243 NOTARGET) target_alias=$optarg ;;
244 *) echo '***' Can only configure for one target at a time. 1>&2
251 tmpdiroption="--tmpdir=$optarg"
253 --verbose | --v | --verb*)
257 --version | --V | --vers*)
258 echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
267 withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
268 eval $withopt="$optarg"
269 withoptions="$withoptions $option"
272 withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
274 withoutoptions="$withoutoptions $option"
277 withoptions="$withoptions --with-x"
279 --x-i* | --x-l*) other_options="$other_options $orig_option"
282 echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
287 NOUNDEFS) undefs=$option ;;
288 *) echo '***' Can only configure for one host and one target at a time. 1>&2
296 # process host and target
298 # Do some error checking and defaulting for the host and target type.
300 # configure --host=HOST --target=TARGET UNDEFS
303 # 1. You aren't allowed to specify --host, --target, and undefs at the
305 # 2. Host defaults to undefs.
306 # 3. If undefs is not specified, then host defaults to the current host,
307 # as determined by config.guess.
308 # 4. Target defaults to undefs.
309 # 5. If undefs is not specified, then target defaults to host.
313 # Make sure that host, target & undefs aren't all specified at the
315 case $host_alias---$target_alias---$undefs in
316 NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
318 *) echo '***' Can only configure for one host and one target at a time. 1>&2
324 # Now, do defaulting for host.
329 # Neither --host option nor undefs were present.
331 guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
332 if host_alias=`${guesssys}`
334 # If the string we are going to use for
335 # the target is a prefix of the string
336 # we just guessed for the host, then
337 # assume we are running native, and force
338 # the same string for both target and host.
339 case $target_alias in
342 if expr $host_alias : $target_alias >/dev/null
344 host_alias=$target_alias
348 echo "Configuring for a ${host_alias} host." 1>&2
349 arguments="--host=$host_alias $arguments"
351 echo 'Config.guess failed to determine the host type. You need to specify one.' 1>&2
361 # Do defaulting for target. If --target option isn't present, default
362 # to undefs. If undefs isn't present, default to host.
363 case $target_alias in
367 target_alias=$host_alias
378 if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
380 echo Usage: configure [OPTIONS] [HOST]
382 echo Options: [defaults in brackets]
383 echo ' --prefix=MYDIR install into MYDIR [/usr/local]'
384 echo ' --exec-prefix=MYDIR install host-dependent files into MYDIR [/usr/local]'
385 echo ' --help print this message [normal config]'
386 echo ' --build=BUILD configure for building on BUILD [BUILD=HOST]'
387 echo ' --host=HOST configure for HOST [determined via config.guess]'
388 echo ' --norecursion configure this directory only [recurse]'
389 echo ' --program-prefix=FOO prepend FOO to installed program names [""]'
390 echo ' --program-suffix=FOO append FOO to installed program names [""]'
391 echo ' --program-transform-name=P transform installed names by sed pattern P [""]'
392 echo ' --site=SITE configure with site-specific makefile for SITE'
393 echo ' --srcdir=DIR find the sources in DIR [. or ..]'
394 echo ' --target=TARGET configure for TARGET [TARGET=HOST]'
395 echo ' --tmpdir=TMPDIR create temporary files in TMPDIR [/tmp]'
396 echo ' --nfp configure for software floating point [hard float]'
397 echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
398 echo ' --without-FOO package FOO is NOT available'
399 echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
400 echo ' --disable-FOO do not include feature FOO'
402 echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.'
404 if [ -r config.status ] ; then
411 configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
412 moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
414 # this is a hack. sun4 must always be a valid host alias or this will fail.
415 if ${configsub} sun4 >/dev/null 2>&1 ; then
418 echo '***' cannot find config.sub. 1>&2
423 if ${moveifchange} config.junk config.trash ; then
426 echo '***' cannot find move-if-change. 1>&2
429 rm -f config.junk config.trash
433 if [ -r configure.in ] ; then
436 if [ -r ${progname}.in ] ; then
437 srcdir=`echo ${progname} | sed 's:/configure$::'`
439 echo '***' "Can't find configure.in. Try using --srcdir=some_dir" 1>&2
447 ### warn about some conflicting configurations.
452 if [ -f ${srcdir}/config.status ] ; then
453 echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2
458 # default exec_prefix
459 case "${exec_prefixoption}" in
460 "") exec_prefix="\$(prefix)" ;;
464 ### break up ${srcdir}/configure.in.
465 case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
467 echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
473 case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
475 echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2
482 "") TMPDIR=/tmp ; export TMPDIR ;;
486 # keep this filename short for &%*%$*# 14 char file names
487 tmpfile=${TMPDIR}/cONf$$
488 trap "rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos; exit 1" 1 2 15
489 trap "rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos" 0
491 # split ${srcdir}/configure.in into common, per-host, per-target,
492 # and post-target parts. Post-target is optional.
493 sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com
494 sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.hst
495 if grep '^# post-target:' ${srcdir}/configure.in >/dev/null ; then
496 sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt
497 sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos
499 sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt
503 ### do common part of configure.in
507 # some sanity checks on configure.in
508 case "${srctrigger}" in
510 echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in. 1>&2
516 case "${build_alias}" in
519 result=`${configsub} ${build_alias}`
520 buildopt="--build=${build_alias}"
521 build_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
522 build_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
523 build_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
524 build=${build_cpu}-${build_vendor}-${build_os}
528 result=`${configsub} ${host_alias}`
529 host_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
530 host_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
531 host_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
532 host=${host_cpu}-${host_vendor}-${host_os}
536 result=`${configsub} ${target_alias}`
537 target_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
538 target_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
539 target_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
540 target=${target_cpu}-${target_vendor}-${target_os}
544 # Find the source files, if location was not specified.
549 if [ ! -r ${srctrigger} ] ; then
556 if [ ! -r ${srcdir}/${srctrigger} ] ; then
557 case "${srcdirdefaulted}" in
558 "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;;
559 *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;;
562 echo '***' \(At least ${srctrigger} is missing.\) 1>&2
566 # Some systems (e.g., one of the i386-aix systems the gas testers are
567 # using) don't handle "\$" correctly, so don't use it here.
568 tooldir='$(exec_prefix)'/${target_alias}
570 if [ "${host_alias}" != "${target_alias}" ] ; then
571 if [ "${program_prefixoption}" = "" ] ; then
572 if [ "${program_suffixoption}" = "" ] ; then
573 if [ "${program_transform_nameoption}" = "" ] ; then
574 program_prefix=${target_alias}- ;
580 # Merge program_prefix and program_suffix onto program_transform_name
581 # Use a double $ so that make ignores it
582 if [ "${program_suffix}" != "" ] ; then
583 program_transform_name="-e s,\$\$,${program_suffix}, ${program_transform_name}"
586 if [ "${program_prefix}" != "" ] ; then
587 program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
590 for subdir in . ${subdirs} ; do
592 # ${subdir} is relative path from . to the directory we're currently
594 # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
595 invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`
597 ### figure out what to do with srcdir
599 ".") # no -srcdir option. We're building in place.
602 makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
604 *) # otherwise relative
606 .) makesrcdir=${srcdir} ;;
607 *) makesrcdir=${invsubdir}${srcdir}/${subdir} ;;
612 if [ "${subdir}/" != "./" ] ; then
613 Makefile=${subdir}/Makefile
616 if [ ! -d ${subdir} ] ; then
617 if mkdir ${subdir} ; then
620 echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2
625 case "${removing}" in
629 *) eval echo Building in ${subdir} ${redirect} ;;
632 # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
633 # Set up the list of links to be made.
634 # ${links} is the list of link names, and ${files} is the list of names to link to.
637 configlinks="${links}"
638 if [ -r ${subdir}/config.status ] ; then
639 mv -f ${subdir}/config.status ${subdir}/config.back
641 while [ -n "${files}" ] ; do
642 # set file to car of files, files to cdr of files
643 set ${files}; file=$1; shift; files=$*
644 set ${links}; link=$1; shift; links=$*
646 if [ ! -r ${srcdir}/${file} ] ; then
647 echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
648 echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
653 # Make a symlink if possible, otherwise try a hard link
654 if ${symbolic_link} ${srcdir}/${file} ${link} >/dev/null 2>&1 ; then
657 # We need to re-remove the file because Lynx leaves a
658 # very strange directory there when it fails an NFS symlink.
659 ${remove} -r -f ${link}
660 ${hard_link} ${srcdir}/${file} ${link}
662 if [ ! -r ${link} ] ; then
663 echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
667 echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
670 # Create a .gdbinit file which runs the one in srcdir
671 # and tells GDB to look there for source files.
673 if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then
676 *) cat > ${subdir}/.gdbinit <<EOF
680 source ${makesrcdir}/.gdbinit
686 # Install a makefile, and make it set VPATH
687 # if necessary so that the sources are found.
688 # Also change its value of srcdir.
689 # NOTE: Makefile generation constitutes the majority of the time in configure. Hence, this section has
690 # been somewhat optimized and is perhaps a bit twisty.
692 # code is order so as to try to sed the smallest input files we know.
694 # the four makefile fragments MUST end up in the resulting Makefile in this order:
695 # package, target, host, and site. so do these separately because I don't trust the
696 # order of sed -e expressions.
698 if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
700 # Conditionalize for this site from "Makefile.in" (or whatever it's called) into Makefile.tem
701 rm -f ${subdir}/Makefile.tem
703 "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
705 site_makefile_frag=${srcdir}/config/ms-${site}
707 if [ -f ${site_makefile_frag} ] ; then
708 sed -e "/^####/ r ${site_makefile_frag}" ${srcdir}/${subdir}/${Makefile_in} \
709 > ${subdir}/Makefile.tem
711 cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
716 # working copy now in ${subdir}/Makefile.tem
718 # Conditionalize the makefile for this host.
720 case "${host_makefile_frag}" in
721 "") mv ${subdir}/Makefile.tem ${Makefile} ;;
723 if [ ! -f ${host_makefile_frag} ] ; then
724 host_makefile_frag=${srcdir}/${host_makefile_frag}
726 if [ -f ${host_makefile_frag} ] ; then
727 sed -e "/^####/ r ${host_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
729 echo '***' Expected host makefile fragment \"${host_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 # Conditionalize the makefile for this target.
737 rm -f ${subdir}/Makefile.tem
738 case "${target_makefile_frag}" in
739 "") mv ${Makefile} ${subdir}/Makefile.tem ;;
741 if [ ! -f ${target_makefile_frag} ] ; then
742 target_makefile_frag=${srcdir}/${target_makefile_frag}
744 if [ -f ${target_makefile_frag} ] ; then
745 sed -e "/^####/ r ${target_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
747 mv ${Makefile} ${subdir}/Makefile.tem
748 target_makefile_frag=
752 # real copy now in ${subdir}/Makefile.tem
754 # Conditionalize the makefile for this package.
756 case "${package_makefile_frag}" in
757 "") mv ${subdir}/Makefile.tem ${Makefile} ;;
759 if [ ! -f ${package_makefile_frag} ] ; then
760 package_makefile_frag=${srcdir}/${package_makefile_frag}
762 if [ -f ${package_makefile_frag} ] ; then
763 sed -e "/^####/ r ${package_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
764 rm -f ${subdir}/Makefile.tem
766 echo '***' Expected package makefile fragment \"${package_makefile_frag}\" 1>&2
767 echo '***' is missing in ${PWD=`pwd`}. 1>&2
768 mv ${subdir}/Makefile.tem ${Makefile}
771 # working copy now in ${Makefile}
773 mv ${Makefile} ${subdir}/Makefile.tem
775 # real copy now in ${subdir}/Makefile.tem
777 # prepend warning about editting, and a bunch of variables.
779 cat > ${Makefile} <<EOF
781 VPATH = ${makesrcdir}
782 links = ${configlinks}
783 host_alias = ${host_alias}
784 host_cpu = ${host_cpu}
785 host_vendor = ${host_vendor}
787 host_canonical = ${host_cpu}-${host_vendor}-${host_os}
788 target_alias = ${target_alias}
789 target_cpu = ${target_cpu}
790 target_vendor = ${target_vendor}
791 target_os = ${target_os}
792 target_canonical = ${target_cpu}-${target_vendor}-${target_os}
796 *) cat >> ${Makefile} << EOF
797 build_alias = ${build_alias}
798 build_cpu = ${build_cpu}
799 build_vendor = ${build_vendor}
800 build_os = ${build_os}
801 build_canonical = ${build_cpu}-${build_vendor}-${build_os}
805 case "${package_makefile_frag}" in
807 /*) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
808 *) echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;;
811 case "${target_makefile_frag}" in
813 /*) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
814 *) echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
817 case "${host_makefile_frag}" in
819 /*) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
820 *) echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
823 if [ "${site_makefile_frag}" != "" ] ; then
824 echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
827 # make sure that some sort of reasonable default exists for these
832 # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
833 # remove any form feeds.
834 if [ -z "${subdirs}" ]; then
835 rm -f ${subdir}/Makefile.tem2
836 sed -e "s:^SUBDIRS[ ]*=.*$:SUBDIRS = ${configdirs}:" \
837 -e "s:^NONSUBDIRS[ ]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \
838 ${subdir}/Makefile.tem > ${subdir}/Makefile.tem2
839 rm -f ${subdir}/Makefile.tem
840 mv ${subdir}/Makefile.tem2 ${subdir}/Makefile.tem
842 sed -e "s:^prefix[ ]*=.*$:prefix = ${prefix}:" \
843 -e "s:^exec_prefix[ ]*=.*$:exec_prefix = ${exec_prefix}:" \
844 -e "s:^SHELL[ ]*=.*$:SHELL = ${config_shell}:" \
845 -e "s:^srcdir[ ]*=.*$:srcdir = ${makesrcdir}:" \
847 -e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \
848 -e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \
849 -e "s:^program_transform_name[ ]*=.*$:program_transform_name = ${program_transform_name}:" \
850 -e "s:^tooldir[ ]*=.*$:tooldir = ${tooldir}:" \
851 ${subdir}/Makefile.tem >> ${Makefile}
852 # final copy now in ${Makefile}
855 echo "No Makefile.in found in ${srcdir}/${subdir}, unable to configure" 1>&2
858 rm -f ${subdir}/Makefile.tem
860 case "${host_makefile_frag}" in
862 *) using="and \"${host_makefile_frag}\"" ;;
865 case "${target_makefile_frag}" in
867 *) using="${using} and \"${target_makefile_frag}\"" ;;
870 case "${site_makefile_frag}" in
872 *) using="${using} and \"${site_makefile_frag}\"" ;;
875 newusing=`echo "${using}" | sed 's/and/using/'`
877 echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using}
881 # describe the chosen configuration in config.status.
882 # Make that file a shellscript which will reestablish
883 # the same configuration. Used in Makefiles to rebuild
886 case "${norecursion}" in
887 "") arguments="${arguments} --norecursion" ;;
891 if [ ${subdir} = . ] ; then
894 # This directory was configured as follows:
895 ${progname}" ${arguments} "
896 # ${using}" > ${subdir}/config.new
900 # This directory was configured as follows:
902 ${progname}" ${arguments} "
903 # ${using}" > ${subdir}/config.new
905 chmod a+x ${subdir}/config.new
906 if [ -r ${subdir}/config.back ] ; then
907 mv -f ${subdir}/config.back ${subdir}/config.status
909 ${moveifchange} ${subdir}/config.new ${subdir}/config.status
912 *) rm -f ${Makefile} ${subdir}/config.status ${links} ;;
916 # If there are subdirectories, then recur.
917 if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
918 for configdir in ${configdirs} ; do
920 if [ -d ${srcdir}/${configdir} ] ; then
921 eval echo Configuring ${configdir}... ${redirect}
925 if [ ! -d ./${configdir} ] ; then
926 if mkdir ./${configdir} ; then
929 echo '***' "${progname}: could not make ${PWD=`pwd`}/${configdir}" 1>&2
939 ### figure out what to do with srcdir
941 ".") newsrcdir=${srcdir} ;; # no -srcdir option. We're building in place.
943 newsrcdir=${srcdir}/${configdir}
944 srcdiroption="--srcdir=${newsrcdir}"
946 *) # otherwise relative
947 newsrcdir=../${srcdir}/${configdir}
948 srcdiroption="--srcdir=${newsrcdir}"
952 ### check for guested configure, otherwise fix possibly relative progname
953 if [ -f ${newsrcdir}/configure ] ; then
954 recprog=${newsrcdir}/configure
955 elif [ -f ${newsrcdir}/configure.in ] ; then
956 case "${progname}" in
957 /*) recprog=${progname} ;;
958 *) recprog=../${progname} ;;
961 eval echo No configuration information in ${configdir} ${redirect}
965 ### The recursion line is here.
966 if [ ! -z "${recprog}" ] ; then
967 if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
968 ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
969 ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${removing} ${other_options} ${redirect} ; then
972 echo Configure in `pwd` failed, exiting. 1>&2