This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use a real compile to test for stdbool.h
[perl5.git] / Configure
index f4d9cfb..42a0a19 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -28,9 +28,7 @@
 # See Porting/pumpkin.pod for more information on metaconfig.
 #
 
-# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
-#
-# Generated on Mon Mar 29 10:12:43 CEST 2010 [metaconfig 3.5 PL0]
+# Generated on Thu Sep 22 17:10:35 CEST 2011 [metaconfig 3.5 PL0]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -731,6 +729,8 @@ d_msg_peek=''
 d_msg_proxy=''
 d_oldsock=''
 d_scm_rights=''
+d_sin6_scope_id=''
+d_sockaddr_sa_len=''
 d_socket=''
 d_sockpair=''
 sockethdr=''
@@ -748,6 +748,8 @@ d_sresuproto=''
 d_statblks=''
 d_statfs_f_flags=''
 d_statfs_s=''
+d_static_inline=''
+perl_static_inline=''
 d_fstatvfs=''
 d_statvfs=''
 d_stdio_cnt_lval=''
@@ -924,6 +926,7 @@ i_pwd=''
 i_sfio=''
 i_shadow=''
 i_socks=''
+i_stdbool=''
 i_stddef=''
 i_stdlib=''
 i_string=''
@@ -1192,6 +1195,8 @@ shsharp=''
 spitshell=''
 src=''
 ssizetype=''
+st_ino_sign=''
+st_ino_size=''
 startperl=''
 startsh=''
 stdchar=''
@@ -1310,6 +1315,18 @@ i_whoami=''
 : Extra object files, if any, needed on this platform.
 archobjs=''
 archname=''
+: Possible local include directories to search.
+: Set locincpth to "" in a hint file to defeat local include searches.
+locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
+locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+:
+: no include file wanted by default
+inclwanted=''
+
+: Enable -DEBUGGING and -DDEBUGGING from the command line
+EBUGGING=''
+DEBUGGING=''
+
 libnames=''
 : change the next line if compiling for Xenix/286 on Xenix/386
 xlibpth='/usr/lib/386 /lib/386'
@@ -1338,18 +1355,6 @@ usereentrant='undef'
 : full support for void wanted by default
 defvoidused=15
 
-: Possible local include directories to search.
-: Set locincpth to "" in a hint file to defeat local include searches.
-locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
-locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
-:
-: no include file wanted by default
-inclwanted=''
-
-: Enable -DEBUGGING and -DDEBUGGING from the command line
-EBUGGING=''
-DEBUGGING=old
-
 ccname=''
 ccversion=''
 perllibs=''
@@ -2251,7 +2256,7 @@ in the default answer, as if the default line was a set of arguments given to a
 script shell.  This means you may also use $* to repeat the whole default line,
 so you do not have to re-type everything to add something to the default.
 
-Everytime there is a substitution, you will have to confirm.  If there is an
+Every time there is a substitution, you will have to confirm.  If there is an
 error (e.g. an unmatched backtick), the default answer will remain unchanged
 and you will be prompted again.
 
@@ -2371,6 +2376,7 @@ make
 more
 nm
 nroff
+perl
 pg
 test
 uname
@@ -4068,77 +4074,6 @@ $undef$define) . ./whoa; eval "$var=\$tu";;
 *) eval "$var=$val";;
 esac'
 
-: Check is we will use socks
-case "$usesocks" in
-$define|true|[yY]*)    dflt='y';;
-*) dflt='n';;
-esac
-cat <<EOM
-
-Perl can be built to use the SOCKS proxy protocol library.  To do so,
-Configure must be run with -Dusesocks.  If you use SOCKS you also need
-to use the PerlIO abstraction layer, this will be implicitly selected.
-
-If this doesn't make any sense to you, just accept the default '$dflt'.
-EOM
-rp='Build Perl for SOCKS?'
-. ./myread
-case "$ans" in
-y|Y)   val="$define" ;;
-*)      val="$undef" ;;
-esac
-set usesocks
-eval $setvar
-
-case "$usesocks" in
-$define|true|[yY]*) useperlio="$define";;
-esac
-
-: Check if we want perlio
-case "$useperlio" in
-$define|true|[yY]*|'') dflt='y';;
-*) dflt='n';;
-esac
-cat <<EOM
-
-Previous version of $package used the standard IO mechanisms as
-defined in <stdio.h>.  Versions 5.003_02 and later of $package allow
-alternate IO mechanisms via the PerlIO abstraction layer, but the
-stdio mechanism is still available if needed.  The abstraction layer
-can use AT&T's sfio (if you already have sfio installed) or regular stdio.
-Using PerlIO with sfio may cause problems with some extension modules.
-
-If this doesn't make any sense to you, just accept the default '$dflt'.
-EOM
-rp='Use the PerlIO abstraction layer?'
-. ./myread
-case "$ans" in
-y|Y)
-       val="$define"
-       ;;
-*)
-       echo "Ok, doing things the stdio way."
-       val="$undef"
-       ;;
-esac
-set useperlio
-eval $setvar
-
-case "$usesocks" in
-$define|true|[yY]*)
-       case "$useperlio" in
-       $define|true|[yY]*) ;;
-       *)      cat >&4 <<EOM
-
-You are using the SOCKS proxy protocol library which means that you
-should also use the PerlIO layer.  You may be headed for trouble.
-
-EOM
-               ;;
-       esac
-       ;;
-esac
-
 : get the patchlevel
 echo " "
 echo "Getting the current patchlevel..." >&4
@@ -4160,11 +4095,6 @@ else
        perl_patchlevel=0
        $echo "(You do not have patchlevel.h.  Eek.)"
 fi
-if $test -r $rsrc/.patch ; then
-       if $test "X$perl_patchlevel" = "X" || $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
-               perl_patchlevel=`cat $rsrc/.patch`
-       fi
-fi
 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
 version_patchlevel_string="version $patchlevel subversion $subversion"
 case "$perl_patchlevel" in
@@ -4203,13 +4133,8 @@ $define|true|[yY]*)     dflt='y';;
 *)     # Catch case where user specified ithreads or 5005threads but
        # forgot -Dusethreads (A.D. 4/2002)
        case "$useithreads$use5005threads" in
-       *$define*)
-               case "$useperlio" in
-               "$define")      dflt='y' ;;
-               *)              dflt='n' ;;
-               esac
-               ;;
-       *)      dflt='n';;
+       *$define*)      dflt='y';;
+       *)              dflt='n';;
        esac
        ;;
 esac
@@ -4311,16 +4236,6 @@ EOM
     useithreads="$usethreads"
 fi
 
-if test X"$usethreads" = "X$define" -a "X$useperlio" = "Xundef"; then
-       cat >&4 <<EOF
-***
-*** To build with ithreads you must also use the PerlIO layer.
-*** Cannot continue, aborting.
-***
-EOF
-       exit 1
-fi
-
 case "$d_oldpthreads" in
 '')    : Configure tests would be welcome here.  For now, assume undef.
        val="$undef" ;;
@@ -4896,6 +4811,28 @@ case "$firstmakefile" in
 '') firstmakefile='makefile';;
 esac
 
+: Check is we will use socks
+case "$usesocks" in
+$define|true|[yY]*)    dflt='y';;
+*) dflt='n';;
+esac
+cat <<EOM
+
+Perl can be built to use the SOCKS proxy protocol library.  To do so,
+Configure must be run with -Dusesocks.  If you use SOCKS you also need
+to use the PerlIO abstraction layer, this will be implicitly selected.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+rp='Build Perl for SOCKS?'
+. ./myread
+case "$ans" in
+y|Y)   val="$define" ;;
+*)      val="$undef" ;;
+esac
+set usesocks
+eval $setvar
+
 : Check for uselongdouble support
 case "$ccflags" in
 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
@@ -6137,21 +6074,6 @@ $define)
        esac
        ;;
 esac
-case "$useperlio" in
-$define)
-       echo "Perlio selected." >&4
-       ;;
-*)
-       echo "Perlio not selected, using stdio." >&4
-       case "$archname" in
-        *-stdio*) echo "...and architecture name already has -stdio." >&4
-                ;;
-        *)      archname="$archname-stdio"
-                echo "...setting architecture name to $archname." >&4
-                ;;
-        esac
-       ;;
-esac
 if $test -f archname.cbu; then
        echo "Your platform has some specific hints for architecture name, using them..."
        . ./archname.cbu
@@ -7672,7 +7594,7 @@ $echo $n ".$c"
 $grep fprintf libc.tmp > libc.ptf
 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
-xxx='[ADTSIW]'
+xxx='[ADTSIWi]'
 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx  *//p'";\
        eval $xscan;\
        $contains '^fprintf$' libc.list >/dev/null 2>&1; then
@@ -8328,7 +8250,7 @@ if "$useshrplib"; then
        solaris)
                xxx="-R $shrpdir"
                ;;
-       freebsd|netbsd|openbsd|interix|dragonfly)
+       freebsd|mirbsd|netbsd|openbsd|interix|dragonfly)
                xxx="-Wl,-R$shrpdir"
                ;;
        bsdos|linux|irix*|dec_osf|gnu*)
@@ -9412,6 +9334,9 @@ EOCP
        ;;
 esac
 
+: Check if we want perlio
+useperlio="$define"
+
 : Set the vendorbin variables
 case "$vendorprefix" in
 '')    d_vendorbin="$undef"
@@ -9899,7 +9824,7 @@ done
 
 case "$d_longdbl$uselongdouble" in
 "$define$define")
-    : again, add prefered functions to our list first
+    : again, add preferred functions to our list first
     xxx_ld_list=""
     for xxx_convert in $gconvert_ld_preference; do
         case $xxx_convert in
@@ -10060,7 +9985,7 @@ eval $inlibc
 set pthread.h i_pthread
 eval $inhdr
 
-: define a fucntion to check prototypes
+: define a function to check prototypes
 $cat > protochk <<EOSH
 $startsh
 cc="$cc"
@@ -11353,6 +11278,41 @@ eval $inlibc
 
 
 echo " "
+echo "Checking the availability sa_len in the sock struct ..." >&4
+$cat >try.c <<EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+int main() {
+struct sockaddr sa;
+return (sa.sa_len);
+}
+EOF
+val="$undef"
+set try; if eval $compile; then
+       val="$define"
+fi
+set d_sockaddr_sa_len; eval $setvar
+$rm_try
+
+echo " "
+echo "Checking the availability sin6_scope_id in struct sockaddr_in6 ..." >&4
+$cat >try.c <<EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int main() {
+struct sockaddr_in6 sin6;
+return (sin6.sin6_scope_id);
+}
+EOF
+val="$undef"
+set try; if eval $compile; then
+       val="$define"
+fi
+set d_sin6_scope_id; eval $setvar
+$rm_try
+
+echo " "
 echo "Checking the availability of certain socket constants..." >&4
 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
        enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
@@ -17331,17 +17291,10 @@ $define)
        *) dflt='n';;
        esac
        echo "$package can use the sfio library, but it is experimental."
-       case "$useperlio" in
-       "$undef")
-           echo "For sfio also the PerlIO abstraction layer is needed."
-           echo "Earlier you said you wouldn't want that."
-           ;;
-       esac
        rp="You seem to have sfio available, do you want to try using it?"
        . ./myread
        case "$ans" in
-       y|Y)    echo "Ok, turning on both sfio and PerlIO, then."
-               useperlio="$define"
+       y|Y)    echo "Ok, turning on sfio then."
                val="$define"
                ;;
        *)      echo "Ok, avoiding sfio this time.  I'll use stdio instead."
@@ -17874,6 +17827,112 @@ case "$d_statfs_f_flags" in
 *)              echo "No, it doesn't." ;;
 esac
 
+: see what flavor, if any, of static inline is supported
+echo " "
+echo "Checking to see if your system supports static inline..."
+$cat > try.c <<'EOCP'
+#include <stdlib.h>
+extern int f_via_a(int x);
+extern int f_via_b(int x);
+int main(int argc, char **argv)
+{
+    int y;
+
+    y = f_via_a(0);
+#ifdef USE_B
+    y = f_via_b(0);
+#endif
+    if (y == 42) {
+        return EXIT_SUCCESS;
+    }
+    else {
+        return EXIT_FAILURE;
+    }
+}
+EOCP
+$cat > a.c <<'EOCP'
+static INLINE int f(int x) {
+    int y;
+    y = x + 42;
+    return y;
+}
+
+int f_via_a(int x)
+{
+    return f(x);
+}
+EOCP
+$cat > b.c <<'EOCP'
+extern int f(int x);
+
+int f_via_b(int x)
+{
+    return f(x);
+}
+EOCP
+
+# Respect a hint (or previous) value for perl_static_inline, if there is one.
+case "$perl_static_inline" in
+'')    # Check the various possibilities, and break out on success.
+       # For gcc, prefer __inline__, which will still permit 
+       # cflags.SH to add in -ansi.
+       case "$gccversion" in
+               '') xxx="inline __inline__ __inline _inline";;
+               *)  xxx="__inline__ inline __inline _inline";;
+       esac
+       for inline in $xxx; do
+               set try -DINLINE=$inline a.c
+               if eval $compile && $run ./try; then
+                       # Now make sure there is no external linkage of static
+                       # functions
+                       set try -DINLINE=$inline -DUSE_B a.c b.c
+                       if eval $compile && $run ./try; then
+                               $echo "Your compiler supports static $inline, " >&4
+                               $echo "but it also creates an external definition," >&4
+                               $echo "so I won't use it." >&4
+                               val=$undef
+                       else
+                               $echo "Your compiler supports static $inline." >&4
+                               val=$define
+                               perl_static_inline="static $inline";
+                               break;
+                       fi
+               else
+                       $echo "Your compiler does NOT support static $inline." >&4
+                       val="$undef"
+               fi
+       done
+       ;;
+*inline*) # Some variant of inline exists.
+       echo "Keeping your $hint value of $perl_static_inline."
+       val=$define
+       ;;
+static)  # No inline capabilities
+       echo "Keeping your $hint value of $perl_static_inline."
+       val=$undef
+       ;;
+*)  # Unrecognized previous value -- blindly trust the supplied
+       # value and hope it makes sense.  Use old value for
+       # d_static_inline, if there is one.
+       echo "Keeping your $hint value of $perl_static_inline."
+       case "$d_static_inline" in
+               '') val=$define ;;
+               *)  val=$d_static_inline ;;
+       esac
+       ;;
+esac
+# Fallback to plain 'static' if nothing worked.
+case "$perl_static_inline" in
+'')
+       perl_static_inline="static"
+       val=$undef
+       ;;
+esac
+set d_static_inline
+eval $setvar
+$rm -f a.[co] b.[co]
+$rm_try
+
 : Check stream access
 $cat >&4 <<EOM
 Checking how to access stdio streams by file descriptor number...
@@ -18584,7 +18643,7 @@ EOM
        ;;
 esac
 
-: Checking 32bit aligndness
+: Checking 32bit alignedness
 $cat <<EOM
 
 Checking to see whether you can access character data unalignedly...
@@ -18605,8 +18664,8 @@ $signal_t bletch(int s) { exit(4); }
 #endif
 int main() {
 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
-    U8 buf[8];
-    U32 *up;
+    volatile U8 buf[8];
+    volatile U32 *up;
     int i;
 
     if (sizeof(U32) != 4) {
@@ -18862,39 +18921,9 @@ esac
 : set the base revision
 baserev=5.0
 
-: check for length of character
-echo " "
-case "$charsize" in
-'')
-       echo "Checking to see how big your characters are (hey, you never know)..." >&4
-       $cat >try.c <<EOCP
-#include <stdio.h>
-#$i_stdlib I_STDLIB
-#ifdef I_STDLIB
-#include <stdlib.h>
-#endif
-int main()
-{
-    printf("%d\n", (int)sizeof(char));
-    exit(0);
-}
-EOCP
-       set try
-       if eval $compile_ok; then
-               dflt=`$run ./try`
-       else
-               dflt='1'
-               echo "(I can't seem to compile the test program.  Guessing...)"
-       fi
-       ;;
-*)
-       dflt="$charsize"
-       ;;
-esac
-rp="What is the size of a character (in bytes)?"
-. ./myread
-charsize="$ans"
-$rm_try
+: length of character in bytes. Is always 1, otherwise it isnt C
+: This used to be a test using sizeof
+charsize=1
 
 : Check for the number of bits in a character
 case "$charbits" in
@@ -21091,6 +21120,74 @@ EOM
 fi
 $rm_try
 
+: Check the size of st_ino
+$echo " "
+$echo "Checking the size of st_ino..." >&4
+$cat > try.c <<EOCP
+#include <sys/stat.h>
+#include <stdio.h>
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main() {
+    struct stat st;
+    printf("%d\n", (int)sizeof(st.st_ino));
+    exit(0);
+}
+EOCP
+set try
+if eval $compile_ok; then
+       val=`$run ./try`
+       case "$val" in
+       '')     st_ino_size=4
+               $echo "(I can't execute the test program--guessing $st_ino_size.)" >&4
+               ;;
+       *)      st_ino_size=$val
+               $echo "Your st_ino is $st_ino_size bytes long."
+               ;;
+       esac
+else
+       st_ino_size=4
+       $echo "(I can't compile the test program--guessing $st_ino_size.)" >&4
+fi
+$rm_try
+
+: Check if st_ino is signed
+$echo " "
+$echo "Checking the sign of st_ino..." >&4
+$cat > try.c <<EOCP
+#include <sys/stat.h>
+#include <stdio.h>
+int main() {
+       struct stat foo;
+        foo.st_ino = -1;
+       if (foo.st_ino < 0)
+               printf("-1\n");
+       else
+               printf("1\n");
+}
+EOCP
+set try
+if eval $compile; then
+       val=`$run ./try`
+       case "$val" in
+       '')     st_ino_sign=1
+               $echo "(I can't execute the test program--guessing unsigned.)" >&4
+               ;;
+       *)      st_ino_sign=$val
+               case "$st_ino_sign" in
+                1) $echo "Your st_ino is unsigned." ;;
+               -1) $echo "Your st_ino is signed."   ;;
+               esac
+               ;;
+       esac
+else
+       st_ino_sign=1
+       $echo "(I can't compile the test program--guessing unsigned.)" >&4
+fi
+$rm_try
+
 : see what type of char stdio uses.
 echo " "
 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
@@ -21668,6 +21765,35 @@ set i_termio; eval $setvar
 val=$val2; set i_sgtty; eval $setvar
 val=$val3; set i_termios; eval $setvar
 
+: see if stdbool is available
+: we want a real compile instead of Inhdr because some Solaris systems
+: have stdbool.h, but it can only be used if the compiler indicates it
+: is sufficiently c99-compliant.
+echo " "
+$cat >try.c <<EOCP
+#include <stdio.h>
+#include <stdbool.h>
+int func(bool x)
+{
+    return x ? 1 : 0;
+}
+int main(int argc, char **argv)
+{
+    return func(0);
+}
+EOCP
+set try
+if eval $compile; then
+       echo "<stdbool.h> found." >&4
+       val="$define"
+else
+       echo "<stdbool.h> NOT found." >&4
+       val="$undef"
+fi
+$rm_try
+set i_stdbool
+eval $setvar
+
 : see if stddef is available
 set stddef.h i_stddef
 eval $inhdr
@@ -21973,13 +22099,6 @@ for xxx in $known_extensions ; do
                $define) avail_ext="$avail_ext $xxx" ;;
                esac
                ;;
-       XS/APItest/KeywordRPN|xs/apitest/keywordrpn)
-               # This is just for testing.  Skip it unless we have dynamic loading.
-
-               case "$usedl" in
-               $define) avail_ext="$avail_ext $xxx" ;;
-               esac
-               ;;
        XS/Typemap|xs/typemap)
                # This is just for testing.  Skip it unless we have dynamic loading.
                case "$usedl" in
@@ -21998,7 +22117,7 @@ avail_ext="$*"
 case "$onlyextensions" in
 '') ;;
 *)  keepextensions=''
-    echo "You have requested that only certains extensions be included..." >&4
+    echo "You have requested that only certain extensions be included..." >&4
     for i in $onlyextensions; do
         case " $avail_ext " in
         *" $i "*)
@@ -22168,7 +22287,7 @@ esac
 # the appropriate Makefile.PL.
 case " $static_ext " in
        *" Encode "*) # Add the subextensions of Encode
-       cd "$rsrc/ext"
+       cd "$rsrc/cpan"
        for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
                static_ext="$static_ext Encode/$xxx"
        done
@@ -22729,8 +22848,10 @@ d_sigaction='$d_sigaction'
 d_signbit='$d_signbit'
 d_sigprocmask='$d_sigprocmask'
 d_sigsetjmp='$d_sigsetjmp'
+d_sin6_scope_id='$d_sin6_scope_id'
 d_sitearch='$d_sitearch'
 d_snprintf='$d_snprintf'
+d_sockaddr_sa_len='$d_sockaddr_sa_len'
 d_sockatmark='$d_sockatmark'
 d_sockatmarkproto='$d_sockatmarkproto'
 d_socket='$d_socket'
@@ -22746,6 +22867,7 @@ d_sresuproto='$d_sresuproto'
 d_statblks='$d_statblks'
 d_statfs_f_flags='$d_statfs_f_flags'
 d_statfs_s='$d_statfs_s'
+d_static_inline='$d_static_inline'
 d_statvfs='$d_statvfs'
 d_stdio_cnt_lval='$d_stdio_cnt_lval'
 d_stdio_ptr_lval='$d_stdio_ptr_lval'
@@ -22959,6 +23081,7 @@ i_sgtty='$i_sgtty'
 i_shadow='$i_shadow'
 i_socks='$i_socks'
 i_stdarg='$i_stdarg'
+i_stdbool='$i_stdbool'
 i_stddef='$i_stddef'
 i_stdlib='$i_stdlib'
 i_string='$i_string'
@@ -23142,6 +23265,7 @@ path_sep='$path_sep'
 perl5='$perl5'
 perl='$perl'
 perl_patchlevel='$perl_patchlevel'
+perl_static_inline='$perl_static_inline'
 perladmin='$perladmin'
 perllibs='$perllibs'
 perlpath='$perlpath'
@@ -23254,6 +23378,8 @@ srand48_r_proto='$srand48_r_proto'
 srandom_r_proto='$srandom_r_proto'
 src='$src'
 ssizetype='$ssizetype'
+st_ino_sign='$st_ino_sign'
+st_ino_size='$st_ino_size'
 startperl='$startperl'
 startsh='$startsh'
 static_ext='$static_ext'
@@ -23379,16 +23505,16 @@ if $test -f UU/config.sh; then
        $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \
                config.sh config.sh UU/oldconfig.sh |\
                $sort | $uniq -u >UU/oldsyms
-       set X `cat UU/oldsyms`
+       set X `$cat UU/oldsyms`
        shift
        case $# in
        0) ;;
        *)
-               cat <<EOM
+               $cat <<EOM
 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
 EOM
                echo ": Variables propagated from previous config.sh file." >>config.sh
-               for sym in `cat UU/oldsyms`; do
+               for sym in `$cat UU/oldsyms`; do
                        echo "    Propagating $hint variable "'$'"$sym..."
                        eval 'tmp="$'"${sym}"'"'
                        echo "$tmp" | \