3 usage
="USAGE: configure [--prefix <path>]"
4 help="Valid options are:
6 --default-architecture <architecture>
7 Set the default architecture (default: autodetected)
9 --default-format <format>
10 Set the default output format (default: elf)
13 Install to <path> (default: /usr/local)
19 # Process command line
29 --default-architecture)
31 DEFAULT_ARCHITECTURE
="$1"
42 echo "Invalid option: $1" >&2
46 echo "Invalid argument: $1" >&2
55 [ -n "$PREFIX" ] || PREFIX
=/usr
/local
56 [ -n "$BINDIR" ] || BINDIR
="\$(PREFIX)/bin"
57 [ -n "$DOCDIR" ] || DOCDIR
="\$(PREFIX)/share/doc"
58 [ -n "$MANDIR" ] || MANDIR
="\$(PREFIX)/share/man"
59 [ -n "$RUBYLIBDIR" ] || RUBYLIBDIR
="\$(PREFIX)/lib/site_ruby"
61 if [ -z "$DEFAULT_ARCHITECTURE" ]
63 # Try to automagically configure the native architecture
67 DEFAULT_ARCHITECTURE
=amd64
70 DEFAULT_ARCHITECTURE
=i386
73 [ -n "$DEFAULT_FORMAT" ] || DEFAULT_FORMAT
=elf
75 printf 'Testing for ruby...'
76 [ -n "$RUBY" ] || RUBY
=`which ruby 2>/dev/null`
83 WARNING: Ruby interpreter not found. You need a Ruby interpreter to
84 run the voodooc compiler.
89 printf 'Testing for nasm...'
90 [ -n "$NASM" ] || NASM
=`which nasm 2>/dev/null` || NASM
=`which yasm 2>/dev/null`
97 WARNING: NASM not found. You need NASM to create i386 object code.
102 printf 'Testing for rdoc...'
103 [ -n "$RDOC" ] || RDOC
=`which rdoc 2>/dev/null`
110 WARNING: rdoc not found. You need rdoc to generate API documentation
111 from the library files.
116 printf 'Testing for gem...'
117 [ -n "$GEM" ] || GEM
=`which gem 2>/dev/null`
124 WARNING: RubyGems gem command not found. You need the gem command to
130 printf 'Writing Makefile.cfg...'
131 cat <<EOF > Makefile.cfg
134 DEFAULT_ARCHITECTURE = $DEFAULT_ARCHITECTURE
135 DEFAULT_FORMAT = $DEFAULT_FORMAT
141 RUBYLIBDIR = $RUBYLIBDIR