home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / glibc-1.06 / configure < prev    next >
Encoding:
Text File  |  1993-05-22  |  16.8 KB  |  649 lines

  1. #! /bin/sh
  2.  
  3. # Configuration script for the GNU C Library.
  4. # DO NOT EDIT!  This script is generated from configure.in; edit that instead.
  5.  
  6. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  7. # This file is part of the GNU C Library.
  8.  
  9. # The GNU C Library is free software; you can redistribute it and/or
  10. # modify it under the terms of the GNU Library General Public License as
  11. # published by the Free Software Foundation; either version 2 of the
  12. # License, or (at your option) any later version.
  13.  
  14. # The GNU C Library is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17. # Library General Public License for more details.
  18.  
  19. # You should have received a copy of the GNU Library General Public
  20. # License along with the GNU C Library; see the file COPYING.LIB.  If
  21. # not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  22. # Cambridge, MA 02139, USA.
  23.  
  24. #
  25. #    Configure the GNU C Library.
  26. #
  27.  
  28. prog="`basename $0`"
  29.  
  30. # All the standard GNU configure options are accepted but only
  31. # --nfp, --with-gnu-ld, and --with-gnu-as are meaningful.
  32. nfp=
  33. gnu_ld=
  34. gnu_as=
  35. version=
  36. release=
  37. prefix=
  38. exec_prefix=
  39. verbose=
  40.  
  41. lose=
  42. for arg in $*; do
  43.   if [ x$next != x ]; then
  44.     eval "$next = \$arg"
  45.     next=
  46.   else
  47.     case $arg in
  48.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  49.     srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
  50.     ;;
  51.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  52.     next=srcdir
  53.     ;;
  54.      -target | --target | --targe | --targ | --tar | --ta | --t)
  55.     next=target
  56.     ;;
  57.      -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  58.     target=`echo $arg | sed 's/-*t[a-z]*=//'`
  59.     ;; 
  60.  
  61.      -with-gnu-ld | --with-gnu-ld | --with-gnu-l)
  62.     gnu_ld=--with-gnu-ld
  63.     ;;
  64.  
  65.      -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a)
  66.         gnu_as=--with-gnu-as
  67.     ;;
  68.  
  69.      -nfp | --nfp | --nf | --n)
  70.     nfp=--nfp
  71.     ;;
  72.  
  73.      -with-* | --with-*)
  74.        ;; # ignored
  75.  
  76.      -x | --x)
  77.        ;; # ignored
  78.  
  79.      -os-release=* | -os-releas=* | -os-relea=* | -os-rele=* | -os-rel=* \
  80.      | -os-re=* | -os-r=* | --os-release=* | --os-releas=* | --os-relea=* \
  81.      | --os-rele=* | --os-rel=* | --os-re=* | --os-r=*)
  82.        release=`echo $arg | sed 's/-*os-r[a-z]*=//'`
  83.        ;;
  84.      -os-release | -os-releas | -os-relea | -os-rele | -os-rel \
  85.      | -os-re | -os-r | --os-release | --os-releas | --os-relea \
  86.      | --os-rele | --os-rel | --os-re | --os-r)
  87.        next=release
  88.        ;;
  89.  
  90.      -os-version=* | -os-versio=* | -os-versi=* | -os-vers=* | -os-ver=* \
  91.      | -os-ver=* | -os-ve=* | -os-v=* | --os-version=* | --os-versio=* \
  92.      | --os-versi=* | --os-vers=* | --os-ver=* | --os-ver=* | --os-ve=* \
  93.      | --os-v=*)
  94.        version=`echo $arg | sed 's/-*os-v[a-z]*=//'`
  95.        ;;
  96.      -os-version | -os-versio | -os-versi | -os-vers | -os-ver \
  97.      | -os-ver | -os-ve | -os-v |--os-version | --os-versio \
  98.      | --os-versi | --os-vers | --os-ver | --os-ver | --os-ve | --os-v)
  99.        next=version
  100.        ;;
  101.  
  102.      # For backward compatibility, also recognize exact --exec_prefix.
  103.      -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  104.     exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'`
  105.     ;;
  106.      -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  107.     next=exec_prefix
  108.     ;;
  109.  
  110.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  111.     prefix=`echo $arg | sed 's/[-a-z_]*=//'`
  112.     ;;
  113.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  114.     next=prefix
  115.     ;;
  116.  
  117.      -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
  118.        # Autoconf-generated code below will test this.
  119.        verbose=yes
  120.        ;;
  121.  
  122.      -*)
  123.     echo "Invalid option \`$arg'" 1>&2
  124.     lose=yes
  125.     ;;
  126.      *)
  127.     if [ ! "$target" ]; then
  128.       target=$arg
  129.     else
  130.       lose=yes
  131.     fi
  132.     ;;
  133.     esac
  134.   fi
  135. done
  136.  
  137. # NEXT will be set iff we have seen an option that wants an arg, but no arg.
  138. if [ "$next" ]; then
  139.   echo "$0: the \`--${next}' option requires an argument" >&2
  140.   lose=yes
  141. fi
  142.  
  143.  
  144. trap 'rm -f conftest* core; exit 1' 1 3 15
  145.  
  146. # Needed for some versions of `tr' so that character classes in `[]' work.
  147. if test "${LANG+set}" = "set" ; then
  148.    LANG=C
  149. fi
  150.  
  151. rm -f conftest*
  152. compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  153.  
  154. # A filename unique to this package, relative to the directory that
  155. # configure is in, which we can look for to find out if srcdir is correct.
  156. unique_file=features.h
  157.  
  158. # Find the source files, if location was not specified.
  159. if test -z "$srcdir"; then
  160.   srcdirdefaulted=yes
  161.   # Try the directory containing this script, then `..'.
  162.   prog=$0
  163.   confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  164.   test "X$confdir" = "X$prog" && confdir=.
  165.   srcdir=$confdir
  166.   if test ! -r $srcdir/$unique_file; then
  167.     srcdir=..
  168.   fi
  169. fi
  170. if test ! -r $srcdir/$unique_file; then
  171.   if test x$srcdirdefaulted = xyes; then
  172.     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  173.   else
  174.     echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  175.   fi
  176.   exit 1
  177. fi
  178. # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  179. # But we can't avoid them for `..', to make subdirectories work.
  180. case $srcdir in
  181.   .|/*|~*) ;;
  182.   *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  183. esac
  184.  
  185.  
  186.  
  187. if [ ! "$target" ]; then
  188.   echo 'No target given.  Trying to guess target...'
  189.   target=`$srcdir/config.guess`
  190. fi
  191.  
  192. if [ "$lose" = yes -o ! "$target" ]; then
  193.   echo "\
  194. Usage: $prog [--srcdir=DIR] [--prefix=DIR] [--exec-prefix=DIR]
  195.          [--nfp] [--with-gnu-ld] [--with-gnu-as] TARGET" >&2
  196.   if [ -r config.status ]; then
  197.     cat config.status >&2
  198.   fi
  199.   exit 1
  200. fi
  201.  
  202. # Canonicalize the configuration name.
  203. config=`$srcdir/config.sub $target`
  204. if [ ! "$config" ]; then
  205.   # config.sub has written an error message.
  206.   exit 1
  207. fi
  208.  
  209. sysdep_dir=$srcdir/sysdeps
  210.  
  211. # machine-vendor-os
  212. eval "`echo $config | \
  213.        sed 's/^\(.*\)-\(.*\)-\(.*\)$/machine=\1 vendor=\2 os=\3/'`"
  214.  
  215. # Make sco3.2v4 become sco3.2.4.
  216. os="`echo $os | sed 's/\([0-9]\)v\([0-9]\)/\1.\2/g'`"
  217.  
  218. case "$os" in
  219. gnu*)
  220.   os=mach/hurd ;;
  221. sunos* | ultrix* | newsos* | dynix* | bsd*)
  222.   base_os=unix/bsd ;;
  223. linux* | sysv* | isc* | esix* | sco* | minix*)
  224.   base_os=unix/sysv ;;
  225. solaris[2-9]*)
  226.   base_os=unix/sysv/sysv4 ;;
  227. esac
  228.  
  229. case "$os" in
  230. gnu* | linux*)
  231.   gnu_ld=--with-gnu-ld
  232.   gnu_as=--with-gnu-as
  233. esac
  234.  
  235. # For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.
  236. tail=$os
  237. ostry=$os
  238. while o=`echo $tail | sed 's/\.[^.]*$//'`; [ $o != $tail ]; do
  239.   ostry="$ostry /$o"
  240.   tail=$o
  241. done  
  242. o=`echo $tail | sed 's/[0-9]*$//'`
  243. if [ $o != $tail ]; then
  244.   ostry="$ostry /$o"
  245. fi
  246.  
  247. # For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
  248. base=
  249. tail=$base_os
  250. while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; [ "$b" ]; do
  251.   set $b
  252.   base="$base /$1"
  253.   tail="$2"
  254. done
  255.  
  256. # Find what sysdep directories exist.
  257. sysnames=
  258. for b in $base ''; do
  259.   for v in /$vendor ''; do
  260.     for o in /$ostry ''; do
  261.       for m in /$machine ''; do
  262.         if [ -d $sysdep_dir$b$v$o$m ]; then
  263.           sysnames="$sysnames $b$v$o$m"
  264.       [ "$o" -o "$b" ] && os_used=t
  265.       [ "$m" ] && machine_used=t
  266.     fi
  267.       done
  268.     done
  269.   done
  270. done
  271.  
  272. if [ ! "$os_used" -a "$os" != none ]; then
  273.   echo Operating system $os is not supported. >&2
  274.   exit 1
  275. fi
  276. if [ ! "$machine_used" -a "$machine" != none ]; then
  277.   echo The $machine is not supported. >&2
  278.   exit 1
  279. fi
  280.  
  281. # We have now validated the configuration.
  282.  
  283. PWD=`pwd`
  284. echo Configuring the GNU C library in $PWD
  285. echo on `(hostname || uname -n) 2>/dev/null | sed 1q` for ${config}.
  286.  
  287. # Remove the leading slashes.
  288. sysnames="`echo $sysnames | sed -e 's@^/@@' -e 's@ /@ @g'`"
  289.  
  290. # Prepend the machine's FPU directory unless --nfp.
  291. if [ ! "$nfp" -a -d $sysdep_dir/$machine/fpu ]; then
  292.   sysnames="${machine}/fpu $sysnames"
  293. fi
  294.  
  295. # Expand the list of system names into a full list of directories
  296. # from each element's parent name and Implies file (if present).
  297. set $sysnames
  298. while [ $# -gt 0 ]; do
  299.   name=$1
  300.   shift
  301.  
  302.   if [ -f $sysdep_dir/$name/Implies ]; then
  303.     # Collect more names from the `Implies' file (removing comments).
  304.     implied="`sed 's/#.*$//' < $sysdep_dir/$name/Implies`"
  305.   else
  306.     implied=
  307.   fi
  308.  
  309.   # Add NAME to the list of names.
  310.   names="$names $name"
  311.  
  312.   # Find the parent of NAME, using the empty string if it has none.
  313.   parent="`echo $name | sed -n -e '/\//!q' -e 's=/[^/]*$==p'`"
  314.  
  315.   # Append the names implied by NAME, and NAME's parent (if it has one),
  316.   # to the list of names to be processed (the argument list).
  317.   sysnames="`echo $* $implied $parent`"
  318.   if [ "$sysnames" != "" ]; then
  319.     set $sysnames
  320.   fi
  321. done
  322.  
  323. # Add the default directories.
  324. names="$names generic stub"
  325.  
  326. # Now uniquize the list.
  327. seen=
  328. sysnames=
  329. for name in $names; do
  330.   if echo "$seen" | fgrep -x $name >/dev/null; then
  331.     # Already in the list.
  332.     true;
  333.   else
  334.     # A new one.
  335.     if [ "$seen" = "" ]; then
  336.       seen="$name" sysnames="$name"
  337.     else
  338.       seen="$seen
  339. $name"
  340.       sysnames="$sysnames $name"
  341.     fi
  342.   fi
  343. done
  344.  
  345. echo Using system-dependent files from directories:
  346. for dir in $sysnames; do echo "    $dir"; done
  347.  
  348. # This will get text that should go into config.make.
  349. config_vars=
  350.  
  351. # Make sure to not get the incompatible SysV /etc/install and
  352. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  353. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  354. # or the AFS install, which mishandles nonexistent args, or
  355. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  356. # `staff'.  On most BSDish systems install is in /usr/bin, not /usr/ucb
  357. # anyway.  Sigh.
  358. if test "z${INSTALL}" = "z" ; then
  359.   echo checking for install
  360.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  361.   for dir in $PATH; do
  362.     test -z "$dir" && dir=.
  363.     case $dir in
  364.     /etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  365.     *)
  366.       if test -f $dir/installbsd; then
  367.     INSTALL="$dir/installbsd -c" # OSF1
  368.     INSTALL_PROGRAM='$(INSTALL)'
  369.     INSTALL_DATA='$(INSTALL) -m 644'
  370.     break
  371.       fi
  372.       if test -f $dir/install; then
  373.     if grep dspmsg $dir/install >/dev/null 2>&1; then
  374.       : # AIX
  375.     else
  376.       INSTALL="$dir/install -c"
  377.       INSTALL_PROGRAM='$(INSTALL)'
  378.       INSTALL_DATA='$(INSTALL) -m 644'
  379.       break
  380.     fi
  381.       fi
  382.       ;;
  383.     esac
  384.   done
  385.   IFS="$saveifs"
  386. fi
  387. INSTALL=${INSTALL-cp}
  388. INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
  389. INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
  390.  
  391. if test -z "$RANLIB"; then
  392.   # Extract the first word of `ranlib', so it can be a program name with args.
  393.   set dummy ranlib; word=$2
  394.   echo checking for $word
  395.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  396.   for dir in $PATH; do
  397.     test -z "$dir" && dir=.
  398.     if test -f $dir/$word; then
  399.       RANLIB="ranlib"
  400.       break
  401.     fi
  402.   done
  403.   IFS="$saveifs"
  404. fi
  405. test -z "$RANLIB" && RANLIB=":"
  406. test -n "$RANLIB" -a -n "$verbose" && echo "    setting RANLIB to $RANLIB"
  407.  
  408.  
  409. if test -z "$CC"; then
  410.   # Extract the first word of `gcc', so it can be a program name with args.
  411.   set dummy gcc; word=$2
  412.   echo checking for $word
  413.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  414.   for dir in $PATH; do
  415.     test -z "$dir" && dir=.
  416.     if test -f $dir/$word; then
  417.       CC="gcc"
  418.       break
  419.     fi
  420.   done
  421.   IFS="$saveifs"
  422. fi
  423. test -z "$CC" && CC="cc"
  424. test -n "$CC" -a -n "$verbose" && echo "    setting CC to $CC"
  425.  
  426. # Find out if we are using GNU C, under whatever name.
  427. cat > conftest.c <<EOF
  428. #ifdef __GNUC__
  429.   yes
  430. #endif
  431. EOF
  432. ${CC-cc} -E conftest.c > conftest.out 2>&1
  433. if egrep yes conftest.out >/dev/null 2>&1; then
  434.   GCC=1 # For later tests.
  435. fi
  436. rm -f conftest*
  437.  
  438. echo checking how to run the C preprocessor
  439. if test -z "$CPP"; then
  440.   CPP='${CC-cc} -E'
  441.   cat > conftest.c <<EOF
  442. #include <stdio.h>
  443. EOF
  444. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  445. if test -z "$err"; then
  446.   :
  447. else
  448.   CPP=/lib/cpp
  449. fi
  450. rm -f conftest*
  451. fi
  452.  
  453.  
  454. echo checking for signed size_t type
  455. echo '#include <stddef.h>
  456. FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c
  457. eval "$CPP conftest.c 2>/dev/null" \
  458. | grep '^FOOBAR.*unsigned.*FOOBAR$' >/dev/null \
  459. || {
  460. test -n "$verbose" && \
  461. echo '    defining' __SIZE_TYPE__ to be 'unsigned'
  462. DEFS="$DEFS -D__SIZE_TYPE__=unsigned"
  463. }
  464.  
  465. rm -f conftest*
  466.  
  467. echo '#include <stdarg.h>' > conftest.c
  468. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  469. if egrep "__gnuc_va_list" conftest.out >/dev/null 2>&1; then
  470.   config_vars="$config_vars
  471. stdarg.h = # The installed <stdarg.h> defines __gnuc_va_list."
  472. fi
  473. rm -f conftest*
  474.  
  475.  
  476.  
  477. # Iterate over all the sysdep directories we will use, running their
  478. # configure fragments, and looking for a uname implementation.
  479. uname=
  480. for dir in $sysnames; do
  481.   if test -r $sysdep_dir/$dir/configure; then
  482.     echo running configure fragment for $dir
  483.     . $sysdep_dir/$dir/configure
  484.   fi
  485.   test ! "$uname" && \
  486.   test -r $sysdep_dir/$dir/uname.c -o -r $sysdep_dir/$dir/uname.S && uname=$dir
  487. done
  488.  
  489. # If we will use the generic uname implementation, we must figure out what
  490. # it will say by examining the system, and write the results in config-name.h.
  491. if [ "$uname" = generic ]; then
  492.  
  493.   echo trying to guess OS release and version for uname
  494.  
  495.   kernel_release=
  496.   kernel_version=
  497.  
  498.   if [ ! "$release" -o ! "$version" ]; then
  499.     if [ -r /vmunix ]; then
  500.       kernel_id=`strings /vmunix | grep UNIX`
  501.     elif [ -r /dynix ]; then
  502.       kernel_id=`strings /dynix | grep DYNIX`
  503.     else
  504.       kernel_id=
  505.     fi
  506.     if [ "$kernel_id" ]; then
  507.       kernel_release=`echo "$kernel_id" | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`
  508.       kernel_version=`echo "$kernel_id" | sed 's/^[^#]*#\([0-9]*\).*$/\1/'`
  509.     fi
  510.   fi
  511.  
  512.   sysname=`echo $os | sed 's/[0-9.]*$//'`
  513.   if [ $sysname != $os ]; then
  514.     config_release=`echo $os | sed s/$sysname//`
  515.   fi
  516.  
  517.   if [ "$release" ]; then
  518.     # All is well.
  519.     true
  520.   elif [ x`echo "$config_release" | sed "s/^$kernel_release//"` \
  521.      != x$config_release ]; then
  522.     # The configuration release is a substring of the kernel release.
  523.     release=$kernel_release
  524.   elif [ x$config_release != x ]; then
  525.     release=$config_release
  526.   elif [ x$kernel_release != x ]; then
  527.     release=$kernel_release
  528.   else
  529.     cat <<END
  530. I don't know what release of $sysname you are using.  Please enter the
  531. release number now.  This information is used only for the \`uname' function,
  532. so it is not critical.
  533. END
  534.     read release
  535.     if [ ! "$release" ]; then
  536.       release=unknown
  537.     fi
  538.   fi
  539.  
  540.   if [ "$version" ]; then
  541.     # All is well.
  542.     true
  543.   elif [ ! "$kernel_version" ]; then
  544.     cat <<END
  545. I don't know what version of $sysname $release you are using.  Please enter
  546. the version number now.  This information is used only for the uname
  547. function, so it is not critical.
  548. END
  549.     read version
  550.     if [ ! "$version" ]; then
  551.       version=unknown
  552.     fi
  553.   else
  554.     version=$kernel_version
  555.   fi
  556.  
  557.   cat > config-name.h <<END
  558. /* This file was generated automatically by configure.  Do not edit.
  559.    This is used by the generic uname function.  */
  560. #define UNAME_SYSNAME "${sysname}"
  561. #define UNAME_RELEASE "${release}"
  562. #define UNAME_VERSION "${version}"
  563. #define UNAME_MACHINE "${machine}-${vendor}"
  564. END
  565.  
  566.   system_name="$sysname $release version $version on $vendor $machine"
  567. else
  568.   # Not generic uname.  We don't need config-name.h at all.
  569.   system_name=$config
  570. fi
  571.  
  572. if [ "$gnu_ld" ]; then
  573.   DEFS="$DEFS -DHAVE_GNU_LD"
  574. fi
  575. if [ "$gnu_as" ]; then
  576.   DEFS="$DEFS -DHAVE_GNU_AS"
  577. fi
  578.  
  579. (
  580.   echo '# This file was generated automatically by configure.  Do not edit.'
  581.   echo '# Put configuration parameters in configparms instead.'
  582.   echo "config-machine = ${machine}"
  583.   echo "config-vendor = ${vendor}"
  584.   echo "config-os = ${os}"
  585.   echo "config-sysdirs = ${sysnames}"
  586.   if [ "$prefix" ]; then
  587.     echo "prefix = ${prefix}"
  588.   fi
  589.   if [ "$exec_prefix" ]; then
  590.     echo "exec_prefix = ${exec_prefix}"
  591.   fi
  592.   echo "config-defines = ${DEFS}"
  593.   for var in INSTALL INSTALL_PROGRAM INSTALL_DATA RANLIB; do
  594.     eval "echo \"${var} = \${$var}\""
  595.   done
  596.   echo "$config_vars"
  597. ) > config.make
  598. echo "Wrote config.make in $PWD."
  599.  
  600. switches=
  601. if [ "$gnu_as" ]; then
  602.   switches="$switches --with-gnu-as"
  603. fi
  604. if [ "$gnu_ld" ]; then
  605.   switches="$switches --with-gnu-ld"
  606. fi
  607. if [ "$exec_prefix" ]; then
  608.   switches="$switches --exec_prefix=$exec_prefix"
  609. fi
  610. if [ "$prefix" ]; then
  611.   switches="$switches --prefix=$prefix"
  612. fi
  613. if [ "$release" ]; then
  614.   switches="$switches --os-release='$release'"
  615. fi
  616. if [ "$version" ]; then
  617.   switches="$switches --os-version='$version'"
  618. fi
  619.  
  620. if [ $srcdir != . ]; then
  621.   if [ $srcdir = .. ]; then
  622.     cwd=`pwd`
  623.     objdir=`basename $cwd`
  624.   else
  625.     objdir=`pwd`
  626.   fi
  627.   cat > Makefile <<END
  628. # This file was generated automatically by configure.  Do not edit.
  629. srcdir = $srcdir
  630.  
  631. all .DEFAULT:
  632.     \$(MAKE) -C \$(srcdir) ARCH=$objdir \$@
  633. END
  634.  
  635. echo "Wrote Makefile in $PWD."
  636. fi
  637.  
  638. cat > config.status <<END
  639. #!/bin/sh
  640. # This file was generated automatically by configure.  Do not edit.
  641. # The GNU C library was configured in $PWD for
  642. # $system_name as follows:
  643. $0 $config --srcdir=$srcdir $switches
  644. END
  645. chmod a+x config.status
  646. echo "Wrote config.status in $PWD."
  647.  
  648. exit 0
  649.