1# Exported variables
2_install_list="prefix share_prefix bindir datadir includedir libdir mandir sysdatadir "
3
4dflt=$prefix; rep=
5test "$fastread" = yes || cat <<EOT
6==========================================================================
7By default, gp will be installed in $dflt/bin, manual pages under
8  $dflt/man, etc..., with $dflt as prefix for all installation directories.
9  If you wish to have binaries under /bin but manual pages under
10  /usr/local/man, that's ok: you will be prompted separately for each of the
11  installation directories, the prefix being only used to set the defaults.
12  (You will be prompted before the actual installation is done.)
13The names of executables and libraries contain their version number $version.
14  A symbolic link to gp or libpari.[a/so] will point to the most recent
15  installation of GP/PARI.
16EOT
17echo $n "Installation prefix ? $c"
18. ./myread; prefix=$ans
19
20if test -z "$share_prefix"; then
21  share_prefix=$prefix/share
22fi
23echo $n "...for architecture-independent files (share-prefix) ? $c"
24dflt=$share_prefix; . ./myread; share_prefix=$ans
25
26dfltman=$share_prefix/man/man1
27dfltdata=$share_prefix/pari
28
29echo "Installation directories for:"
30echo $n ..."executables (gp, gphelp) ? $c"
31dflt=${dfltbindir:-$prefix/bin}; . ./myread; bindir=$ans
32
33echo $n ..."libraries (libpari) ? $c"
34case $osname in
35mingw) dflt=${dfltlibdir:-$prefix/bin};;
36*) dflt=${dfltlibdir:-$prefix/lib};;
37esac; . ./myread; libdir=$ans
38
39echo $n ..."include files ? $c"
40dflt=${dfltincludedir:-$prefix/include}; . ./myread; includedir=$ans
41
42echo $n ..."manual pages ? $c"
43dflt=${dfltmandir:-$dfltman}; . ./myread; mandir=$ans
44
45echo $n ..."other system-dependent data ? $c"
46dflt=${dfltsysdatadir:-$prefix/lib/pari}; . ./myread; sysdatadir=$ans
47
48echo $n ..."other system-independent data ? $c"
49dflt=${dfltdatadir:-$dfltdata}; . ./myread; datadir=$ans
50
51for i in prefix share_prefix bindir libdir includedir mandir sysdatadir datadir ; do
52  eval "dflt=\"\$$i\""
53  case $dflt in
54       @|/*) ;;
55       *) eval "$i='$TOP/$dflt'";;
56  esac
57done
58