# Exported variables
_install_list="prefix share_prefix bindir includedir mandir miscdir libdir datadir"

dflt=$prefix; rep=
test "$fastread" = yes || cat <<EOT
==========================================================================
By default, gp will be installed in $dflt/bin, manual pages under
  $dflt/man, etc..., with $dflt as prefix for all installation directories.
  If you wish to have binaries under /bin but manual pages under
  /usr/local/man, that's ok: you will be prompted separately for each of the
  installation directories, the prefix being only used to set the defaults.
  (You will be prompted before the actual installation is done.)
The names of executables and libraries contain their version number $version.
  A symbolic link to gp or libpari.[a/so] will point to the most recent
  installation of GP/PARI.
EOT
echo $n "Installation prefix ? $c"
. ./myread; prefix=$ans

echo $n "...for architecture-independant files (share-prefix) ? $c"
dflt=$share_prefix; . ./myread; share_prefix=$ans

if test -z "$share_prefix"; then
  dfltman=$prefix/man/man1
  dfltall=$prefix/lib/pari
else
  dfltman=$share_prefix/man/man1
  dfltall=$share_prefix/doc/pari
fi

echo $n ..."\"gp\" executable ? $c"
dflt=${dfltbindir:-$prefix/bin}; . ./myread; bindir=$ans

echo $n ..."\"pari\" library ? $c"
dflt=${dfltlibdir:-$prefix/lib}; . ./myread; libdir=$ans

echo $n ..."include files ? $c"
dflt=${dlftincludedir:-$prefix/include/pari}; . ./myread; includedir=$ans

echo $n ..."manual pages ? $c"
dflt=${dfltmandir:-$dfltman}; . ./myread; mandir=$ans

echo $n ..."documentation, examples, and emacs macros ? $c"
dflt=${dfltmiscdir:-$dfltall}; . ./myread; miscdir=$ans

if test -z "$share_prefix"; then
  dfltdat=$miscdir/galdata
else
  dfltdat=$share_prefix/pari/galdata
fi

echo $n ..."miscellaneous data (galois resolvents) ? $c"
dflt=${dfltdatadir:-$dfltdat}; . ./myread; datadir=$ans
