[svn] / ecrypt / trunk / scripts / configure  

svn: ecrypt/trunk/scripts/configure

Diff for /ecrypt/trunk/scripts/configure between version 61 and 87

version 61, Mon Aug 15 21:50:35 2005 UTC version 87, Mon Aug 22 08:26:23 2005 UTC
Line 1 
Line 1 
 #!/bin/sh  #!/bin/sh
   
 [ -z "$BASH_VERSION" ] && (which bash > /dev/null 2>&1) && exec bash $0;  [ -z "$BASH_VERSION" ] && (which bash > /dev/null 2>&1) && exec bash $0 $*;
   
 # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
   
Line 15 
Line 15 
   
 # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
   
 config="$root/config";  reports="$root/reports-$HOSTNAME";
   
 mkdir -p "$config";  mkdir -p "$reports";
 cd "$config";  cd "$reports";
   
 pid=$$;  pid=$$;
   
Line 80 
Line 80 
         echo "comp='msvc'; cc='$msvc';";          echo "comp='msvc'; cc='$msvc';";
     done      done
   
       # Unix compilers
       case $(uname) in
           HP-UX|OSF*|SunOS)
               if [ -x $(which cc 2> /dev/null) ]; then
                   echo "comp='cc'; cc='cc';";
               fi
               ;;
       esac
   
     status 1;      status 1;
 }  }
   
Line 101 
Line 110 
     fi | while read gcc; do      fi | while read gcc; do
         IFS=' ';          IFS=' ';
   
         specs=$($gcc -v 2>&1 | awk '/^Reading specs/ { print $4; exit; }');          specs=$($gcc -v 2>&1 | md5sum);
           length=$(printf "%0.3d" ${#gcc});
   
         if $gcc -dumpmachine | grep -q "mingw32"; then          if $gcc -dumpmachine | grep -q "mingw32"; then
             echo "specs='$specs'; comp='mingw'; cc='$gcc';";              echo "specs='$specs'; length='$length'; comp='mingw'; cc='$gcc';";
         else          else
             echo "specs='$specs'; comp='gcc'; cc='$gcc';";              echo "specs='$specs'; length='$length'; comp='gcc'; cc='$gcc';";
         fi          fi
     done      done
 }  }
Line 182 
Line 192 
     icc=$1;      icc=$1;
   
     version=$($icc -v 2>&1 | awk '/^Version/ { print $2; exit; }');      version=$($icc -v 2>&1 | awk '/^Version/ { print $2; exit; }');
       length=$(printf "%0.3d" ${#icc});
   
     $icc -E - < /dev/null &> /dev/null && \      $icc -E - < /dev/null &> /dev/null && \
         echo "specs='$version'; comp='icc'; cc='$icc';";          echo "specs='$version'; length='$length'; comp='icc'; cc='$icc';";
 }  }
   
 check_icc_archs ()  check_icc_archs ()
Line 213 
Line 225 
     msvc=$1;      msvc=$1;
   
     version=$($msvc 2>&1 | awk '/Version/ { print $6 ":" $8; exit; }');      version=$($msvc 2>&1 | awk '/Version/ { print $6 ":" $8; exit; }');
       length=$(printf "%0.3d" ${#msvc});
   
     [ "${version%:*}" = "Compiler" ] && \      [ "${version%:*}" = "Compiler" ] && \
         echo "specs='$version'; comp='msvc'; cc='$msvc';";          echo "specs='$version'; length='$length'; comp='msvc'; cc='$msvc';";
 }  }
   
 check_msvc_archs ()  check_msvc_archs ()
Line 242 
Line 256 
     done      done
 }  }
   
   check_msvc ()
   {
       msvc=$1;
   
       version=$($msvc 2>&1 | awk '/Version/ { print $6 ":" $8; exit; }');
       length=$(printf "%0.3d" ${#msvc});
   
       [ "${version%:*}" = "Compiler" ] && \
           echo "specs='$version'; length='$length'; comp='msvc'; cc='$msvc';";
   }
   
   check_cc ()
   {
       cc=$1;
   
       $cc -E - < /dev/null &> /dev/null && \
           echo "specs='unix cc'; length='$length'; comp='cc'; cc='$cc';";
   }
   
   check_cc_archs ()
   {
       cc=$1;
   
       case $(uname) in
           HP-UX)
               for arch in "" "+DD"{32,64}; do
                   $cc $arch conftest.c -o conftest &> /dev/null \
                       && ./conftest &> /dev/null \
                       && echo "'$arch'";
               done
               ;;
           OSF*)
               for arch in "" "-arch "{ev{4,5,56,6,67},pca56}; do
                   (IFS=' '; $cc $arch conftest.c -o conftest) &> /dev/null \
                       && ./conftest &> /dev/null \
                       && echo "'$arch'";
               done
               ;;
           SunOS)
               for arch in "" "-xarch="v{7,8{,plus}{,a},9{,a}}; do
                   $cc $arch conftest.c -o conftest &> /dev/null \
                       && ./conftest &> /dev/null \
                       && echo "'$arch'";
               done
               ;;
       esac
   }
   
   check_cc_opts ()
   {
       for opt in "" "-fast"; do
           echo "'$opt'";
       done
   }
   
 check_compilers ()  check_compilers ()
 {  {
     status 1 "checking compilers and discarding duplicates";      status 1 "checking compilers and discarding duplicates";
Line 267 
Line 336 
     status 1 "checking compiler options";      status 1 "checking compiler options";
   
     cat > conftest.c <<EOF      cat > conftest.c <<EOF
   #include <stdio.h>
 #include "../include/ecrypt-portable.h"  #include "../include/ecrypt-portable.h"
   
 int main()  int main()
Line 314 
Line 384 
   
     [ -n "$arch" ] || arch=default;      [ -n "$arch" ] || arch=default;
   
       arch=${arch//arch /};
     arch=${arch// /};      arch=${arch// /};
     arch=${arch#-};      arch=${arch#-};
       arch=${arch#+};
     arch=${arch#m*=};      arch=${arch#m*=};
       arch=${arch#xarch=};
   
     echo "$arch";      echo "$arch";
 }  }
Line 363 
Line 436 
     done      done
   
     status 1;      status 1;
   
       cp "$root/configs/shortlist" .;
 }  }
   
 config_compilers ()  config_compilers ()
Line 395 
Line 470 
                 IFS=;                  IFS=;
                 echo "$candidates" > candidates;                  echo "$candidates" > candidates;
   
                 info 0 "Please edit $config/candidates and start again.";                  info 0 "Please edit $reports/candidates and start again.";
                 exit 1;                  exit 1;
             fi              fi
         fi          fi


Generate output suitable for use with a patch program
Legend:
Removed from v.61  
changed lines
  Added in v.87

eSTREAM Project

Powered by ViewCVS 1.0-dev
(Powered by Apache)

ViewCVS and CVS Help