source: trunk/binutils/mpw-configure@ 2494

Last change on this file since 2494 was 10, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 14.3 KB
Line 
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
25Set savedir "`Directory`"
26
27#Set Echo 1
28
29Set ThisScript "{0}"
30
31Set srcroot "--------"
32
33Set srcdir ":"
34
35Set objdir ":"
36
37Set prefix "{MPW}":GNUTools:
38
39Set exec_prefix ""
40
41Set bindir ""
42
43Set host_alias "m68k-apple-mpw"
44
45Set target_alias {host_alias}
46
47Set host_cc "mpwc"
48
49Set with_gnu_ld 0
50
51Set helpoutput 0
52
53Set recurse 1
54
55Set verify 0
56Set verifystr ""
57
58Set enable_options ""
59Set disable_options ""
60
61# Parse arguments.
62
63Loop
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
111End Loop
112
113If {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]"