$NetBSD: patch-aa,v 1.2 2001/07/13 16:20:57 wulf Exp $

--- configure.orig	Thu Jun 21 18:10:06 2001
+++ configure	Fri Jun 29 08:15:08 2001
@@ -1,8 +1,5 @@
 #!/bin/sh
 
-BINDIR=/usr/local/bin
-LIBDIR=/usr/local/lib/camlp4
-MANDIR=/usr/local/man/man1
 OPT=.opt
 
 abort ()
@@ -83,23 +80,32 @@
     OPT=
 fi
 
-echo
-echo "The compilation process creates executable files."
-echo "Please tell me where to install them."
-askfor "Directory for executables" $BINDIR
-BINDIR=$r
-
-echo
-echo "The compilation process creates some library files."
-echo "Please tell me where to install them."
-askfor "Directory for library" $LIBDIR
-LIBDIR=$r
-
-echo
-echo "The system has some manual pages."
-echo "Please tell me where to install them."
-askfor "Directory for manual pages" $MANDIR
-MANDIR=$r
+if test ${PREFIX}; then
+      BINDIR=${PREFIX}/bin
+      LIBDIR=${PREFIX}/lib/camlp4
+      MANDIR=${PREFIX}/man/man1
+else
+      BINDIR=/usr/local/bin
+      LIBDIR=/usr/local/lib/camlp4
+      MANDIR=/usr/local/man/man1
+
+      echo
+      echo "The compilation process creates executable files."
+      echo "Please tell me where to install them."
+      askfor "Directory for executables" $BINDIR
+      BINDIR=$r
+      echo
+      echo "The compilation process creates some library files."
+      echo "Please tell me where to install them."
+      askfor "Directory for library" $LIBDIR
+      LIBDIR=$r
+
+      echo
+      echo "The system has some manual pages."
+      echo "Please tell me where to install them."
+      askfor "Directory for manual pages" $MANDIR
+      MANDIR=$r
+fi
 
 (
 echo OTOP=../ocaml_stuff
