| 1 | # Configuration script
|
|---|
| 2 | # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
|
|---|
| 3 |
|
|---|
| 4 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 5 | # it under the terms of the GNU General Public License as published by
|
|---|
| 6 | # the Free Software Foundation; either version 2 of the License, or
|
|---|
| 7 | # (at your option) any later version.
|
|---|
| 8 | #
|
|---|
| 9 | # This program is distributed in the hope that it will be useful,
|
|---|
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | # GNU General Public License for more details.
|
|---|
| 13 | #
|
|---|
| 14 | # You should have received a copy of the GNU General Public License
|
|---|
| 15 | # along with this program; if not, write to the Free Software
|
|---|
| 16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|---|
| 17 |
|
|---|
| 18 | ### WARNING
|
|---|
| 19 | ### This script must NOT use any 8-bit chars!
|
|---|
| 20 | ### WARNING
|
|---|
| 21 |
|
|---|
| 22 | # This is an MPW Shell script that sets everything up for compilation,
|
|---|
| 23 | # mainly creating directories, and editing copies of files.
|
|---|
| 24 |
|
|---|
| 25 | Set savedir "`Directory`"
|
|---|
| 26 |
|
|---|
| 27 | #Set Echo 1
|
|---|
| 28 |
|
|---|
| 29 | Set ThisScript "{0}"
|
|---|
| 30 |
|
|---|
| 31 | Set srcroot "--------"
|
|---|
| 32 |
|
|---|
| 33 | Set srcdir ":"
|
|---|
| 34 |
|
|---|
| 35 | Set objdir ":"
|
|---|
| 36 |
|
|---|
| 37 | Set prefix "{MPW}":GNUTools:
|
|---|
| 38 |
|
|---|
| 39 | Set exec_prefix ""
|
|---|
| 40 |
|
|---|
| 41 | Set bindir ""
|
|---|
| 42 |
|
|---|
| 43 | Set host_alias "m68k-apple-mpw"
|
|---|
| 44 |
|
|---|
| 45 | Set target_alias {host_alias}
|
|---|
| 46 |
|
|---|
| 47 | Set host_cc "mpwc"
|
|---|
| 48 |
|
|---|
| 49 | Set with_gnu_ld 0
|
|---|
| 50 |
|
|---|
| 51 | Set helpoutput 0
|
|---|
| 52 |
|
|---|
| 53 | Set recurse 1
|
|---|
| 54 |
|
|---|
| 55 | Set verify 0
|
|---|
| 56 | Set verifystr ""
|
|---|
| 57 |
|
|---|
| 58 | Set enable_options ""
|
|---|
| 59 | Set disable_options ""
|
|---|
| 60 |
|
|---|
| 61 | # Parse arguments.
|
|---|
| 62 |
|
|---|
| 63 | Loop
|
|---|
| 64 | Break If {#} == 0
|
|---|
| 65 | If "{1}" =~ /--cc/
|
|---|
| 66 | Set host_cc "{2}"
|
|---|
| 67 | Shift 1
|
|---|
| 68 | Else If "{1}" =~ /--bindir/
|
|---|
| 69 | Set bindir "{2}"
|
|---|
| 70 | Shift 1
|
|---|
| 71 | Else If "{1}" =~ /--disable-?+/
|
|---|
| 72 | Set `Echo {1} | sed -e 's/--disable-/enable_/'` no
|
|---|
| 73 | Set disable_options "{disable_options} '{1}'"
|
|---|
| 74 | Else If "{1}" =~ /--enable-?+/
|
|---|
| 75 | Set `Echo {1} | sed -e 's/--enable-/enable_/'` yes
|
|---|
| 76 | Set enable_options "{enable_options} '{1}'"
|
|---|
| 77 | Else If "{1}" =~ /--exec-prefix/
|
|---|
| 78 | Set exec_prefix "{2}"
|
|---|
| 79 | Shift 1
|
|---|
| 80 | Else If "{1}" =~ /--help/
|
|---|
| 81 | Set helpoutput 1
|
|---|
| 82 | Else If "{1}" =~ /--host/
|
|---|
| 83 | Set host_alias "{2}"
|
|---|
| 84 | Shift 1
|
|---|
| 85 | Else If "{1}" =~ /--norecursion/
|
|---|
| 86 | Set recurse 0
|
|---|
| 87 | Else If "{1}" =~ /--prefix/
|
|---|
| 88 | Set prefix "{2}"
|
|---|
| 89 | Shift 1
|
|---|
| 90 | Else If "{1}" =~ /--srcdir/
|
|---|
| 91 | Set srcdir "{2}"
|
|---|
| 92 | Shift 1
|
|---|
| 93 | Else If "{1}" =~ /--srcroot/
|
|---|
| 94 | Set srcroot "{2}"
|
|---|
| 95 | Shift 1
|
|---|
| 96 | Else If "{1}" =~ /--target/
|
|---|
| 97 | Set target_alias "{2}"
|
|---|
| 98 | Shift 1
|
|---|
| 99 | Else If "{1}" =~ /-v/
|
|---|
| 100 | Set verify 1
|
|---|
| 101 | Set verifystr "-v"
|
|---|
| 102 | Else If "{1}" =~ /--with-gnu-ld/
|
|---|
| 103 | Set with_gnu_ld 1
|
|---|
| 104 | Else
|
|---|
| 105 | Echo -n 'mpw-configure: Unrecognized option: "'
|
|---|
| 106 | Echo -n "{1}"
|
|---|
| 107 | Echo '"; use --help for usage.'
|
|---|
| 108 | Exit 1
|
|---|
| 109 | End If
|
|---|
| 110 | Shift 1
|
|---|
| 111 | End Loop
|
|---|
| 112 |
|
|---|
| 113 | If {helpoutput} == 1
|
|---|
| 114 | Echo "Usage: mpw-configure [OPTIONS]"
|
|---|
| 115 | Echo ""
|
|---|
| 116 | Echo "Options: [defaults in brackets]"
|
|---|
| 117 | Echo "--bindir DIR directory for binaries []"
|
|---|
| 118 | Echo "--cc CC use C compiler CC [mpwc]"
|
|---|
| 119 | Echo "--disable-FOO do not include feature FOO"
|
|---|
| 120 | Echo "--enable-FOO include feature FOO"
|
|---|
| 121 | Echo "--exec-prefix DIR install host-dependent files into DIR []"
|
|---|
| 122 | Echo "--help print this message"
|
|---|
| 123 | Echo "--host HOST configure for HOST [m68k-apple-mpw]"
|
|---|
| 124 | Echo "--norecursion configure this directory only [recurse]"
|
|---|
|
|---|