--- configure.orig	2009-12-19 18:38:39.000000000 +0100
+++ configure	2009-12-19 20:31:22.000000000 +0100
@@ -8,6 +8,9 @@
 
 # Configuration script for the Autopsy Forensic Browser
 #
+# This configuration file has been adapted to comply with
+# MacPorts port installation system.
+#
 # Brian Carrier [carrier@sleuthkit.org]
 #
 # Copyright (c) 2003-2008 by Brian Carrier.  All rights reserved
@@ -67,7 +70,6 @@
       else      
         echo "perl found: ${d}perl (version $ver)";
         echo "#!${d}perl -wT" > ./config.tmp;
-        echo "#!${d}perl" > ./config2.tmp;
         perlexe="${d}perl";
         found=1; 
         break; 
@@ -79,28 +81,7 @@
 # If it wasn't found, then prompt for it.
 if (test $found -eq 0) then
   echo 'ERROR: perl not found or the incorrect version found';
-  while (test 1 -eq 1) 
-    do echo 'Enter location of perl executable:';
-    read perlexe;
-    if (test -x "$perlexe") then
-      if (test -n "`$perlexe -v 2> /dev/null | awk '/This is perl/ {print $0}'`")       then
-        ver=`$perlexe -e 'print $];'`;
-        if (`$perlexe -e 'exit( $] >= 5.008);'`) then 
-          echo "This version of Perl is too old, 5.8.0 or older needed";
-        else      
-          echo "Correct version found";
-          echo "#!${perlexe} -wT" > ./config.tmp;
-          echo "#!${perlexe}" > ./config2.tmp;
-          found=1; 
-          break; 
-        fi;
-      else
-        echo "Perl found, but is not working.  Try another";
-      fi;
-    else
-      echo "file not found";
-    fi
-  done
+  exit 1;
 fi
 
 # Check if this version of Perl supports large files
@@ -109,9 +90,7 @@
   echo '    NOTE: It appears that your Perl does not support large files.';
   echo '    You therefore will not be able to analyze images larger than 2GB.';
   echo '    Download the source version from www.cpan.org and compile a new version.';
-  echo "  [Press Enter to Continue]";
-  read foo;
-  echo ''
+  exit1;
 fi;
 
 # Get current working directory for lib
@@ -120,24 +99,16 @@
 
 # Write autopsy
 if (test -f ./autopsy) then
-  echo "autopsy already exists, overwrite? (y/n):";
-  read rep;
-  if (test "$rep" = "y") then
-    cat ./config.tmp base/autopsy.base > ./autopsy
-    cat ./config2.tmp base/make-live-cd.base > ./make-live-cd
-  else 
-    echo '  original version was kept';
-  fi
+  echo "autopsy already exists, backup to autopsy.old";
+  mv ./autopsy ./autopsy.old
+  cat ./config.tmp base/autopsy.base > ./autopsy
 else
   cat ./config.tmp base/autopsy.base > ./autopsy
-  cat ./config2.tmp base/make-live-cd.base > ./make-live-cd
 fi
 chmod 0755 ./autopsy
-chmod 0755 ./make-live-cd
 
 # cleanup
 rm -f ./config.tmp
-rm -f ./config2.tmp
 
 
 #############################################################################
@@ -146,41 +117,11 @@
 
 
 conf='conf.pl'
-
 if (test -f $conf) then
-  echo "A configuration file already exists, overwrite? (y/n):";
-  read rep;
-  if (test "$rep" = "n") then
-    exit 0;
-  fi
+  echo "A configuration file already exists, backup to $conf.old";
+  mv $conf $conf.old
 fi
 
-# echo ''
-# echo '---------------------------------------------------------------'
-# echo ''
-# echo 'Autopsy can use the configuration file from a previous installation'
-# echo ''
-# echo 'Would you like to use a previous configuration file (y/n) [n]'
-# read rep;
-# if (test "$rep" = "y") then
-
-#  echo 'Enter the directory of the previous installation (or cancel):'
-#  while (test 1 -eq 1) 
-#    do read prevdir;
-#    if (test "$prevdir" = "cancel") then
-#		break;
-#	fi;
-#    if (test -f "${prevdir}/conf.pl") then
-#		/bin/cp "${prevdir}/conf.pl" .
-#		echo '  Configuration file copied from $prevdir';
-
-#		# Check the config status
-#		exit 0;
-#	fi;
-#    echo 'Configuration file not found, try again (or 'cancel' to stop):'
-#  done;
-#fi;
-
 
 # First add the variables that are static
 #
@@ -240,16 +181,7 @@
 # Prompt if not found
 if (test $found -eq 0) then
   echo 'ERROR: grep utility not found';
-  echo 'Enter location of executable:';
-  while (test 1 -eq 1) 
-    do read grepexe;
-    if (test -x "$grepexe") then
-	  echo \$GREP_EXE = \'$grepexe\'\; >> $conf; 
-      break;
-    else
-      echo 'grep was not found (try again):';
-    fi;
-  done
+  exit 1;
 fi
 
 
@@ -269,16 +201,7 @@
 # Prompt if not found
 if (test $found -eq 0) then
   echo 'ERROR: file utility not found';
-  echo 'Enter location of executable:';
-  while (test 1 -eq 1) 
-    do read fileexe;
-    if (test -x "$fileexe") then
-	  echo \$FILE_EXE = \'$filexe\'\; >> $conf; 
-      break;
-    else
-      echo 'file was not found (try again):';
-    fi;
-  done
+  exit 1;
 fi
 
 #
@@ -302,16 +225,7 @@
 # Prompt if not found
 if (test $found -eq 0) then
   echo 'ERROR: md5/md5sum utility not found';
-  echo 'Enter location of executable:';
-  while (test 1 -eq 1) 
-    do read md5exe;
-    if (test -x "$md5exe") then
-	  echo \$MD5_EXE = \'$md5exe\'\; >> $conf; 
-      break;
-    else
-      echo 'md5 was not found (try again):';
-    fi;
-  done
+  exit 1;
 fi
 
 
@@ -373,25 +287,7 @@
 if (test $found -eq 0) then
   echo 'Sleuth Kit tools were not found in the standard install locations.'
   echo 'If you have not installed them, do so now and configure autopsy again.'
-  echo 'If you have installed them in a non-standard location, then'
-  echo '  enter the "bin" directory now:'
-
-  while (test 1 -eq 1) 
-    do read tskdir;
-    if ((test -x ${tskdir}/fls) && (test -x ${tskdir}/ffind) && (test -x ${tskdir}/blkstat) && \
-          (test -x ${tskdir}/blkls) && (test -x ${tskdir}/blkcat) && \
-          (test -x ${tskdir}/mmls) && (test -x ${tskdir}/mmstat) && \
-          (test -x ${tskdir}/fsstat) && (test -x ${tskdir}/img_stat) && \
-          (test -x ${tskdir}/istat) && (test -x ${tskdir}/ifind) && \
-          (test -x ${tskdir}/icat) && (test -x ${tskdir}/ils) && \
-          (test -x ${tskdir}/srch_strings) && \
-          (test -x ${tskdir}/mactime) && (test -x ${tskdir}/sorter)) then
-      echo \$TSKDIR = \'${tskdir}\'\; >> $conf;
-      break;
-    else
-      echo 'TSK tools were not found or incomplete (try again):';
-    fi;
-  done
+  exit 1;
 fi;
 
 # Test for latest version
@@ -405,9 +301,6 @@
 elif (test "$ver" '<' "$curtskver") then 
 	echo '';
     echo "*** NOTE: A more recent version ($curtskver) of The Sleuth Kit Exists ***"
-	echo "  [Press Enter to Continue]";
-	read foo;
-
 else
 	echo '  Required version found';
 fi
@@ -422,43 +315,7 @@
 echo 'hash values of known good and bad files.'
 echo '         http://www.nsrl.nist.gov'
 echo ''
-echo 'Have you purchased or downloaded a copy of the NSRL (y/n) [n]'
-read rep;
-if (test "$rep" = "y") then
-
-  echo 'Enter the directory where you installed it:'
-  while (test 1 -eq 1) 
-    do read nsrldir;
-    if (test "$nsrldir" = "cancel") then
-        echo \$NSRLDB = \'\'\; >> $conf;
-		break;
-	fi;
-    if (test -f "${nsrldir}/NSRLFile.txt") then
-      echo '  NSRL database was found (NSRLFile.txt)';
-      echo \$NSRLDB = \'${nsrldir}/NSRLFile.txt\'\; >> $conf;
-
-	  if (test -f "${nsrldir}/NSRLFile.txt-md5.idx") then
-		echo '  NSRL Index file found (NSRLFile.txt-md5.idx)';
-      else
-        echo '  NSRL Index file not found, do you want it created? (y/n) [n]:'
-        read rep;
-        if (test "$rep" = "y") then
-          echo ''
-          echo '-------------- begin hfind output --------------'
-          "${tskdir}/hfind" -i nsrl-md5 "${nsrldir}/NSRLFile.txt";
-          echo '--------------- end hfind output ---------------'
-          echo ''
-		fi;
-	  fi;
-      break;
-    else
-      echo 'The NSRL was not found (the directory should have NSRLFile.txt in it)';
-	  echo 'Enter a new directory (or cancel to stop):';
-    fi;
-  done
-else
-  echo \$NSRLDB = \'\'\; >> $conf;
-fi;
+echo \$NSRLDB = \'\'\; >> $conf;
 
 #############################################################################
 # EVIDENCE LOCKER
@@ -470,8 +327,7 @@
 echo 'Autopsy saves configuration files, audit logs, and output to the'
 echo 'Evidence Locker directory.'
 echo ''
-echo 'Enter the directory that you want to use for the Evidence Locker:';
-read locker;
+locker='MP_AUTOPSY_LOCKER'
 if (test -d "${locker}") then
   echo "  $locker already exists"
 else
