This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
A new try at getting -fstack-protector working, by adding it to the
[perl5.git] / Configure
index d36bd2f..7e88403 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -26,7 +26,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Wed May  9 18:33:46 CEST 2007 [metaconfig 3.0 PL70]
+# Generated on Mon Oct  8 10:22:27 CEST 2007 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -181,6 +181,7 @@ true)
        esac
        ;;
 esac
+test -x "${newsh}" || unset newsh
 
 : if needed set CDPATH to a harmless value that is not chatty
 : avoid bash 2.02 problems with empty CDPATH.
@@ -346,7 +347,6 @@ optimize=''
 cf_email=''
 cf_by=''
 cf_time=''
-charsize=''
 contains=''
 cpp_stuff=''
 cpplast=''
@@ -1328,7 +1328,7 @@ libswanted_uselargefiles=''
 : List of libraries we want.
 : If anyone needs extra -lxxx, put those in a hint file.
 libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun"
-libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
+libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD ssp"
 : We probably want to search /usr/shlib before most other libraries.
 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
@@ -1673,9 +1673,9 @@ Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
          -D symbol=value   symbol gets the value 'value'
        common used examples (see INSTALL for more info):
          -Duse64bitint            use 64bit integers
-         -Duse64bitall            use 64bit inttegers and pointers
+         -Duse64bitall            use 64bit integers and pointers
          -Dusethreads             use thread support
-         -Dinc_version_list=none  do not include older perl treess in @INC
+         -Dinc_version_list=none  do not include older perl trees in @INC
          -DEBUGGING=none          DEBUGGING options
          -Dcc=gcc                 choose your compiler
          -Dprefix=/opt/perl5      choose your destination
@@ -1688,16 +1688,17 @@ Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
          -U symbol=   symbol gets completely empty
        e.g.:  -Uversiononly
   -A : manipulate symbol after the platform specific hints have been applied:
-        -A symbol=value                append " "value to symbol
-        -A append:symbol=value         append value to symbol
-        -A define:symbol=value         define symbol to have value
-         -A clear:symbol               define symbol to be ''
-        -A define:symbol               define symbol to be 'define'
-        -A eval:symbol=value           define symbol to be eval of value
-        -A prepend:symbol=value        prepend value to symbol
-        -A undef:symbol                define symbol to be 'undef'
-        -A undef:symbol=               define symbol to be ''
+         -A append:symbol=value   append value to symbol
+         -A symbol=value          like append:, but with a separating space
+         -A define:symbol=value   define symbol to have value
+         -A clear:symbol          define symbol to be ''
+         -A define:symbol         define symbol to be 'define'
+         -A eval:symbol=value     define symbol to be eval of value
+         -A prepend:symbol=value  prepend value to symbol
+         -A undef:symbol          define symbol to be 'undef'
+         -A undef:symbol=         define symbol to be ''
        e.g.:  -A prepend:libswanted='cl pthread '
+              -A ccflags=-DSOME_MACRO
   -V : print version number and exit (with a zero status).
 EOM
        exit 1
@@ -2482,6 +2483,19 @@ FOO
        ;;
 esac
 
+# This question was auctioned at YAPC::Europe-2007 in Vienna
+# I never promised you could answer it. I only auctioned the question.
+cat <<FOO
+The following message is sponsored by
+
+  Dresden.pm<--The stars should be here.
+
+Dear Perl user, system administrator or package
+maintainer, the Perl community sends greetings to
+you. Do you (emblematical) greet back [Y/n]? n
+
+FOO
+
 cat <<EOS >trygcc
 $startsh
 EOS
@@ -2503,15 +2517,36 @@ EOM
         case "$cc" in
         *gcc*) trygcc=no ;;
         esac
-        case "`$cc -v -c try.c 2>&1`" in
-        *gcc*) trygcc=no ;;
-        esac
+       # Skip this test because it gives a false match on output like:
+       #    ./trygcc: line 23: cc: command not found
+        # case "`$cc -v -c try.c 2>&1`" in
+        # *gcc*) trygcc=no ;;
+        # esac
         if $test X"$trygcc" = Xyes; then
             if gcc -o try -c try.c; then
                 echo " "
                 echo "You seem to have a working gcc, though." >&4
-                rp="Would you like to use it?"
-                dflt=y
+               # Switching compilers may undo the work of hints files.
+               # The most common problem is -D_REENTRANT for threads.
+               # This heuristic catches that case, but gets false positives
+               # if -Dusethreads was not actually specified.  Better to
+               # bail out here with a useful message than fail 
+               # mysteriously later. Should we perhaps just try to
+               # re-invoke Configure -Dcc=gcc config_args ?
+               if $test -f usethreads.cbu; then
+                       $cat >&4 <<EOM 
+
+*** However, any setting of the C compiler flags (e.g. for thread support)
+*** will be lost.  It may be necessary for you to restart Configure and
+*** add -Dcc=gcc to your Configure command line.
+
+EOM
+                       rp="Would you like to go ahead and try gcc anyway?"
+                       dflt=n
+               else
+                       rp="Would you like to use it?"
+                       dflt=y
+               fi
                 if $test -f myread; then
                     . ./myread
                 else
@@ -2524,15 +2559,6 @@ EOM
                 fi  
                 case "$ans" in
                 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
-                       if $test -f usethreads.cbu; then
-                           $cat >&4 <<EOM 
-
-*** However, any setting of the C compiler flags (e.g. for thread support)
-*** has been lost.  It may be necessary to pass -Dcc=gcc to Configure
-*** (together with e.g. -Dusethreads).
-
-EOM
-                       fi;;
                 esac
             fi
         fi
@@ -3014,7 +3040,7 @@ myuname=`$uname -a 2>/dev/null`
 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
 # because the A-Z/a-z are not consecutive.
-myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's,['/],,g' | \
+myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \
        ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
 newmyuname="$myuname"
 dflt=n
@@ -4074,7 +4100,7 @@ if $test -r $rsrc/patchlevel.h;then
        api_revision=`awk '/define[     ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
        api_version=`awk '/define[      ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
        api_subversion=`awk '/define[   ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
-       perl_patchlevel=`egrep 'define PERL_PATCHNUM [0-9][0-9]|,"MAINT[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
+       perl_patchlevel=`egrep ',"(MAINT|SMOKE)[0-9][0-9]*"' $rsrc/patchlevel.h|tail -1|sed 's/[^0-9]//g'`
 else
        revision=0
        patchlevel=0
@@ -5019,6 +5045,27 @@ case "$DEBUGGING" in
 both|$define) dflt='-DDEBUGGING'
 esac
 
+: argument order is deliberate, as the flag will start with - which set could
+: think is an option
+checkccflag='check=$1; flag=$2; callback=$3;
+echo " ";
+echo "Checking if your compiler accepts $flag" 2>&1;
+echo "int main(void) { return 0; }" > gcctest.c;
+if $cc -O2 $flag -o gcctest gcctest.c && ./gcctest; then
+    echo "Yes, it does." 2>&1;
+    case "$ccflags" in
+    *$check*)
+       echo "Leaving current flags $ccflags alone." 2>&1
+       ;;
+    *) dflt="$dflt $flag";
+       eval $callback
+       ;;
+    esac
+else
+    echo "Nope, it does not, but that is ok." 2>&1;
+fi
+'
+
 : We will not override a previous value, but we might want to
 : augment a hint file
 case "$hint" in
@@ -5041,40 +5088,28 @@ default|recommended)
        case "$gccversion" in
        1*) ;;
        2.[0-8]*) ;;
-       ?*)     echo " "
-               echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
-               echo 'int main(void) { return 0; }' > gcctest.c
-               if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
-                       echo "Yes, it does." 2>&1
-                       case "$ccflags" in
-                       *strict-aliasing*)
-                               echo "Leaving current flags $ccflags alone." 2>&1
-                               ;;
-                       *) dflt="$dflt -fno-strict-aliasing" ;;
-                       esac
-               else
-                       echo "Nope, it doesn't, but that's ok." 2>&1
-               fi
+       ?*)     set strict-aliasing -fno-strict-aliasing
+               eval $checkccflag
                ;;
        esac
        # For gcc, adding -pipe speeds up compilations for some, but apparently
        # some assemblers can't read from stdin.  (It also slows down compilations
        # in other cases, but those are apparently rarer these days.)  AD 5/2004.
        case "$gccversion" in
-       ?*)     echo " "
-               echo "Checking if your compiler accepts -pipe" 2>&1
-               echo 'int main(void) { return 0; }' > gcctest.c
-               if $cc -pipe -o gcctest gcctest.c; then
-                       echo "Yes, it does." 2>&1
-                       case "$ccflags" in
-                       *-pipe*)
-                               echo "Leaving current flags $ccflags alone." 2>&1
-                               ;;
-                       *) dflt="$dflt -pipe" ;;
-                       esac
-               else
-                       echo "Nope, it doesn't, but that's ok." 2>&1
-               fi
+       ?*)     set pipe -pipe
+               eval $checkccflag
+               ;;
+       esac
+
+       # on x86_64 (at least) we require an extra library (libssp) in the
+       # link command line. This library is not named, so I infer that it is
+       # an implementation detail that may change. Hence the safest approach
+       # is to add the flag to the flags passed to the compiler at link time,
+       # as that way the compiler can do the right implementation dependant
+       # thing. (NWC)
+       case "$gccversion" in
+       ?*)     set stack-protector -fstack-protector 'ldflags="$ldflags -fstack-protector"'
+               eval $checkccflag
                ;;
        esac
        ;;
@@ -7576,21 +7611,20 @@ eval $inhdr
 
 echo " "
 echo "Checking for C++..." >&4
-cat >try.c <<'EOCP'
+$cat >try.c <<'EOCP'
 #include <stdio.h>
 int main(void)
 {
 #ifdef __cplusplus
-    printf("define\n");
+    return 0;
 #else
-    printf("undef\n");
+    return 1;
 #endif
-    return 0;
 }
 EOCP
 set try
-if eval $compile_ok && $run ./try >cplusplus$$; then
-       val=`$cat cplusplus$$`
+if eval $compile_ok && $run ./try; then
+       val="$define"
        echo "You are using a C++ compiler."
 else
        val="$undef"
@@ -10805,36 +10839,73 @@ if set vprintf val -f d_vprintf; eval $csym; $val; then
        echo 'vprintf() found.' >&4
        val="$define"
        $cat >try.c <<EOF
-#include <varargs.h>
+#$i_stdarg I_STDARG  /* Only one of these can be defined by i_varhrd */
+#$i_varargs I_VARARGS
+
 #$i_stdlib I_STDLIB
+#$i_unistd I_UNISTD
+
+#ifdef I_STDARG
+#  include <stdarg.h>
+#else /* I_VARARGS */
+#  include <varargs.h>
+#endif
+
+#ifdef I_UNISTD
+#  include <unistd.h>
+#endif
+
 #ifdef I_STDLIB
-#include <stdlib.h>
+#  include <stdlib.h>
 #endif
 
-int main() { xxx("foo"); }
+#include <stdio.h> /* vsprintf prototype */
+
+#ifdef I_STDARG
+void xxx(int n, ...)
+{
+    va_list args;
+    char buf[10];
+    va_start(args, n);
+    exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
+}
+int main() { xxx(1, "foo"); }
+
+#else /* I_VARARGS */
 
 xxx(va_alist)
 va_dcl
 {
-       va_list args;
-       char buf[10];
-
-       va_start(args);
-       exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
+    va_list args;
+    char buf[10];
+    va_start(args);
+    exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
 }
+int main() { xxx("foo"); }
+
+#endif
+
 EOF
        set try
-       if eval $compile && $run ./try; then
-               echo "Your vsprintf() returns (int)." >&4
-               val2="$undef"
+       if eval $compile_ok; then
+               if $run ./try; then
+                       echo "Your vsprintf() returns (int)." >&4
+                       val2="$undef"
+               else
+                       echo "Your vsprintf() returns (char*)." >&4
+                       val2="$define"
+               fi
        else
-               echo "Your vsprintf() returns (char*)." >&4
-               val2="$define"
+               echo 'I am unable to compile the vsprintf() test program.' >&4
+               # We shouldn't get here.  If we do, assume the standard signature,
+               # not the old BSD one.
+               echo 'Guessing that vsprintf() returns (int).' >&4
+               val2="$undef"
        fi
 else
        echo 'vprintf() NOT found.' >&4
-               val="$undef"
-               val2="$undef"
+       val="$undef"
+       val2="$undef"
 fi
 $rm_try
 set d_vprintf
@@ -12160,6 +12231,14 @@ esac
 set i_fcntl
 eval $setvar
 
+: see if fork exists
+set fork d_fork
+eval $inlibc
+
+: see if pipe exists
+set pipe d_pipe
+eval $inlibc
+
 : check for non-blocking I/O stuff
 case "$h_sysfile" in
 true) echo "#include <sys/file.h>" > head.c;;
@@ -12220,6 +12299,8 @@ echo " "
 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
 case "$eagain" in
 '')
+       case "$d_fork:$d_pipe" in
+       define:define)
        $cat head.c > try.c
        $cat >>try.c <<EOCP
 #include <errno.h>
@@ -12352,6 +12433,12 @@ EOCP
                echo "I can't compile the test program--assuming errno EAGAIN will do."
                eagain=EAGAIN
        fi
+       ;;
+       *)      echo "Can't figure out how to test this--assuming errno EAGAIN will do."
+               eagain=EAGAIN
+               val="$define"
+               ;;
+       esac
        set d_eofnblk
        eval $setvar
        ;;
@@ -12836,10 +12923,6 @@ echo " "
 set d_flockproto flock $i_sysfile sys/file.h
 eval $hasproto
 
-: see if fork exists
-set fork d_fork
-eval $inlibc
-
 : see if fp_class exists
 set fp_class d_fp_class
 eval $inlibc
@@ -14605,7 +14688,7 @@ EOCP
            echo "Yes, it does ($foo)" >&4
            d_libm_lib_version="$define"
        else
-           echo "No, it does not (probably harmless)\n" >&4
+           echo "No, it does not (probably harmless)" >&4
            fi
        $rm_try
        ;;
@@ -15028,40 +15111,6 @@ eval $inhdr
 set nl_langinfo d_nl_langinfo
 eval $inlibc
 
-: 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
-
 : check for volatile keyword
 echo " "
 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
@@ -15150,38 +15199,10 @@ int main() {
 }
 EOCP
 
-case "$i8type" in
-'')    case "$charsize" in
-       1)      i8type=char
-               u8type="unsigned char"
-               i8size=$charsize
-               u8size=$charsize
-               ;;
-       esac
-       ;;
-esac
-case "$i8type" in
-'')    set try -DINT8
-       if eval $compile; then
-               case "`$run ./try`" in
-               int8_t) i8type=int8_t
-                       u8type=uint8_t
-                       i8size=1
-                       u8size=1
-                       ;;
-               esac
-       fi
-       ;;
-esac
-case "$i8type" in
-'')    if $test $charsize -ge 1; then
-               i8type=char
-               u8type="unsigned char"
-               i8size=$charsize
-               u8size=$charsize
-       fi
-       ;;
-esac
+i8type=char
+u8type="unsigned char"
+i8size=1
+u8size=1
 
 case "$i16type" in
 '')    case "$shortsize" in
 set pause d_pause
 eval $inlibc
 
-: see if pipe exists
-set pipe d_pipe
-eval $inlibc
-
 : see if poll exists
 set poll d_poll
 eval $inlibc
@@ -20651,7 +20668,7 @@ IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
-Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
+LIBCATAMOUNT Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
@@ -20670,7 +20687,7 @@ pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
 pc532 pdp11 PGC PIC plexus PORTAR posix
 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
 POSIX_C_SOURCE POSIX_SOURCE POWER
-PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
+PROTOTYPES PWB pyr QNX QK_USER R3000 REENTRANT RES Rhapsody RISC6000
 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
 sony sony_news sonyrisc sparc sparclite spectrum
@@ -21048,10 +21065,12 @@ cd "$rsrc/ext"
 set X
 shift
 eval $find_extensions
-# Special case:  Add in threads/shared since it is not picked up by the
-# recursive find above (and adding in general recursive finding breaks
-# SDBM_File/sdbm).  A.D.  10/25/2001.
-known_extensions="$known_extensions threads/shared"
+# Special case:  Add in modules that nest beyond the first level.
+# Currently threads/shared and Hash/Util/FieldHash, since they are
+# not picked up by the recursive find above (and adding in general
+# recursive finding breaks SDBM_File/sdbm).
+# A.D. 20011025 (SDBM), ajgough 20071008 (FieldHash)
+known_extensions="$known_extensions threads/shared Hash/Util/FieldHash"
 set X $known_extensions
 shift
 known_extensions="$*"
@@ -21079,6 +21098,12 @@ for xxx in $known_extensions ; do
                $define$define) avail_ext="$avail_ext $xxx" ;;
                esac
                ;;
+       IPC/SysV|ipc/sysv)
+               : XXX Do we need a useipcsysv variable here
+               case "${d_msg}${d_sem}${d_shm}" in
+               *"${define}"*) avail_ext="$avail_ext $xxx" ;;
+               esac
+               ;;
        NDBM_File|ndbm_fil)
                case "$i_ndbm" in
                $define)
@@ -21096,24 +21121,28 @@ for xxx in $known_extensions ; do
        ODBM_File|odbm_fil)
                case "${i_dbm}${i_rpcsvcdbm}" in
                *"${define}"*)
-                   case "$osname-$use64bitint" in
-                   hpux-define)
-                       case "$libs" in
-                       *-ldbm*) avail_ext="$avail_ext $xxx" ;;
+                   case "$d_cplusplus" in
+                   define) ;; # delete as a function name will not work
+                   *)  case "$osname-$use64bitint" in
+                       hpux-define)
+                           case "$libs" in
+                           *-ldbm*) avail_ext="$avail_ext $xxx" ;;
+                           esac
+                           ;;
+                       *) avail_ext="$avail_ext $xxx" ;;
                        esac
                        ;;
-                   *) avail_ext="$avail_ext $xxx" ;;
                    esac
                    ;;
                esac
                ;;
-       POSIX|posix)
-               case "$useposix" in
+       Opcode|opcode)
+               case "$useopcode" in
                true|define|y) avail_ext="$avail_ext $xxx" ;;
                esac
                ;;
-       Opcode|opcode)
-               case "$useopcode" in
+       POSIX|posix)
+               case "$useposix" in
                true|define|y) avail_ext="$avail_ext $xxx" ;;
                esac
                ;;
@@ -21141,6 +21170,20 @@ for xxx in $known_extensions ; do
                         esac
                esac
                ;;
+       threads|threads/shared)
+               # threads and threads::shared are special cases.
+               # To stop people from asking "Perl 5.8.0 was supposed
+               # to have this new fancy threads implementation but my
+               # perl doesn't have it" and from people trying to
+               # (re)install the threads module using CPAN.pm and
+               # CPAN.pm then offering to reinstall Perl 5.8.0,
+               # the threads.pm and threads/shared.pm will always be
+               # there, croaking informatively ("you need to rebuild
+               # all of Perl with threads, sorry") when threads haven't
+               # been compiled in.
+               # --jhi
+               avail_ext="$avail_ext $xxx"
+               ;;
        Win32*)
                case "$osname" in
                cygwin) avail_ext="$avail_ext $xxx" ;;
@@ -21159,26 +21202,6 @@ for xxx in $known_extensions ; do
                $define) avail_ext="$avail_ext $xxx" ;;
                esac
                ;;
-       threads|threads/shared)
-               # threads and threads::shared are special cases.
-               # To stop people from asking "Perl 5.8.0 was supposed
-               # to have this new fancy threads implementation but my
-               # perl doesn't have it" and from people trying to
-               # (re)install the threads module using CPAN.pm and
-               # CPAN.pm then offering to reinstall Perl 5.8.0,
-               # the threads.pm and threads/shared.pm will always be
-               # there, croaking informatively ("you need to rebuild
-               # all of Perl with threads, sorry") when threads haven't
-               # been compiled in.
-               # --jhi
-               avail_ext="$avail_ext $xxx"
-               ;;
-       IPC/SysV|ipc/sysv)
-               : XXX Do we need a useipcsysv variable here
-               case "${d_msg}${d_sem}${d_shm}" in
-               *"${define}"*) avail_ext="$avail_ext $xxx" ;;
-               esac
-               ;;
        *)      avail_ext="$avail_ext $xxx"
                ;;
        esac
@@ -21534,7 +21557,6 @@ ccversion='$ccversion'
 cf_by='$cf_by'
 cf_email='$cf_email'
 cf_time='$cf_time'
-charsize='$charsize'
 chgrp='$chgrp'
 chmod='$chmod'
 chown='$chown'