source: to-imperative/trunk/configure @ 770

Last change on this file since 770 was 22, checked in by pooh, 21 years ago

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1#!/bin/sh
2
3package=rfpc
4version_major=0
5version_minor=0
6version_micro=0
7version=$version_major.$version_minor.$version_micro
8
9install_dir=/usr/local
10
11help () {
12  cat <<EOF
13Usage: configure [options]
14
15Possible options are:
16  -prefix <dir>         install directory (default /usr/local)
17  -name                 shows package name
18  -version              shows package version
19EOF
20  exit 1
21}
22
23while true; do
24  if [ -z "$1" ]; then break; fi
25  case $1 in
26  -prefix)
27    shift
28    if [ -z "$1" ]; then help; fi
29    install_dir="$1"
30    ;;
31  -name)
32    echo $package
33    exit 0
34    ;;
35  -version)
36    echo $version
37    exit 0
38    ;;
39  -help|*)
40    help
41    ;;
42  esac
43  shift
44done
45
46. ./config.functions
47
48config_mk=config.mk
49subdirs_mk=subdirs.mk
50
51if [ -e "$config_mk" ] ; then
52  rm $config_mk
53fi
54
55if [ -e "$subdirs_mk" ] ; then
56  rm $subdirs_mk
57fi
58
59if [ -z "$RFP" ]; then RFP="rfp" ; fi
60if [ -z "$RFPC" ]; then RFPC="rfpc" ; fi
61
62echon "Checking for working Refal+ compiler... "
63cat <<EOF >cfgtest.rf
64Main = ;
65EOF
66if $RFP -o cfgtest cfgtest.rf >/dev/null 2>&1; then
67  echo "found"
68  rm -f cfgtest cfgtest.rf
69else
70  echo "not found"
71  rm -f cfgtest cfgtest.rf
72  exit 1
73fi
74 
75cat >>$config_mk <<EOF
76RFP=$RFP
77RFPC=$RFPC
78EOF
79
80cat >>$subdirs_mk <<EOF
81SUBDIRS+=src
82EOF
83
Note: See TracBrowser for help on using the repository browser.