| 1 | #! /bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | # currently only used to automatically set a new prefix p by |
| 4 | # ./configure --prefix=p |
| 5 | # the compiled files will be installed to p/bin, p/lib, etc. |
| 6 | # default: p=/usr/local |
| 7 | |
| 8 | prefix=/usr/localscip-shell filesystem . . `/usr/local`. |
| 9 | |
| 10 | for option |
| 11 | do |
| 12 | optarg=`exprscip-shell system . . expr. "x$option" : 'x[^=]*=\(.*\)'` |
| 13 | case $option in |
| 14 | -help | --help | --hel | --he | -h) |
| 15 | { echoscip-shell system . . echo. "USAGE: configure [--prefix=dir] |
| 16 | where dir is the installation prefix directory (default: /usr/local)" >&2 |
| 17 | { (exit 1); exit 1; }; } |
| 18 | ;; |
| 19 | --prefix=*) |
| 20 | prefix=$optarg ;; |
| 21 | -*) { echoscip-shell system . . echo. "warning: unrecognized option: $option |
| 22 | Try \`$0 --help' for more information." >&2 |
| 23 | } |
| 24 | ;; |
| 25 | esac |
| 26 | done |
| 27 | |
| 28 | |
| 29 | OCAMLCLOC=`ocamlc -where || echoscip-shell system . . echo. +` |
| 30 | OCAMLOPTLOC=`ocamlopt -where || echoscip-shell system . . echo. +` |
| 31 | echoscip-shell system . . echo. |
| 32 | if testscip-shell system . . test. -d $OCAMLCLOC |
| 33 | then |
| 34 | echoscip-shell system . . echo. ocamlc found in $OCAMLCLOC |
| 35 | else |
| 36 | echoscip-shell system . . echo. ocmalc not found, configuration failed. |
| 37 | exit 0 |
| 38 | fi |
| 39 | if testscip-shell system . . test. -x $OCAMLOPTLOC |
| 40 | then |
| 41 | echoscip-shell system . . echo. ocamlopt found in $OCAMLOPTLOC |
| 42 | else |
| 43 | echoscip-shell system . . echo. ocamlopt not found, configuration failed. |
| 44 | exit 0 |
| 45 | fi |
| 46 | |
| 47 | echoscip-shell system . . echo. |
| 48 | echoscip-shell system . . echo. PREFIX=$prefix |
| 49 | echoscip-shell system . . echo. PREFIX=$prefix > makefile.installprefix |
| 50 | echoscip-shell system . . echo. makefile.installprefix written. |
| 51 | echoscip-shell system . . echo. |
| 52 |