Package list pipenightdreams / 14ef497
Imported Upstream version 0.9.0 Dariusz Dwornikowski 5 years ago
332 changed file(s) with 27359 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Waldemar A. Baraldi <baraldi@lacasilla.com.ar>
0 GNU GENERAL PUBLIC LICENSE
1 Version 2, June 1991
2
3 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
4 675 Mass Ave, Cambridge, MA 02139, USA
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The licenses for most software are designed to take away your
11 freedom to share and change it. By contrast, the GNU General Public
12 License is intended to guarantee your freedom to share and change free
13 software--to make sure the software is free for all its users. This
14 General Public License applies to most of the Free Software
15 Foundation's software and to any other program whose authors commit to
16 using it. (Some other Free Software Foundation software is covered by
17 the GNU Library General Public License instead.) You can apply it to
18 your programs, too.
19
20 When we speak of free software, we are referring to freedom, not
21 price. Our General Public Licenses are designed to make sure that you
22 have the freedom to distribute copies of free software (and charge for
23 this service if you wish), that you receive source code or can get it
24 if you want it, that you can change the software or use pieces of it
25 in new free programs; and that you know you can do these things.
26
27 To protect your rights, we need to make restrictions that forbid
28 anyone to deny you these rights or to ask you to surrender the rights.
29 These restrictions translate to certain responsibilities for you if you
30 distribute copies of the software, or if you modify it.
31
32 For example, if you distribute copies of such a program, whether
33 gratis or for a fee, you must give the recipients all the rights that
34 you have. You must make sure that they, too, receive or can get the
35 source code. And you must show them these terms so they know their
36 rights.
37
38 We protect your rights with two steps: (1) copyright the software, and
39 (2) offer you this license which gives you legal permission to copy,
40 distribute and/or modify the software.
41
42 Also, for each author's protection and ours, we want to make certain
43 that everyone understands that there is no warranty for this free
44 software. If the software is modified by someone else and passed on, we
45 want its recipients to know that what they have is not the original, so
46 that any problems introduced by others will not reflect on the original
47 authors' reputations.
48
49 Finally, any free program is threatened constantly by software
50 patents. We wish to avoid the danger that redistributors of a free
51 program will individually obtain patent licenses, in effect making the
52 program proprietary. To prevent this, we have made it clear that any
53 patent must be licensed for everyone's free use or not licensed at all.
54
55 The precise terms and conditions for copying, distribution and
56 modification follow.
57
58 GNU GENERAL PUBLIC LICENSE
59 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
60
61 0. This License applies to any program or other work which contains
62 a notice placed by the copyright holder saying it may be distributed
63 under the terms of this General Public License. The "Program", below,
64 refers to any such program or work, and a "work based on the Program"
65 means either the Program or any derivative work under copyright law:
66 that is to say, a work containing the Program or a portion of it,
67 either verbatim or with modifications and/or translated into another
68 language. (Hereinafter, translation is included without limitation in
69 the term "modification".) Each licensee is addressed as "you".
70
71 Activities other than copying, distribution and modification are not
72 covered by this License; they are outside its scope. The act of
73 running the Program is not restricted, and the output from the Program
74 is covered only if its contents constitute a work based on the
75 Program (independent of having been made by running the Program).
76 Whether that is true depends on what the Program does.
77
78 1. You may copy and distribute verbatim copies of the Program's
79 source code as you receive it, in any medium, provided that you
80 conspicuously and appropriately publish on each copy an appropriate
81 copyright notice and disclaimer of warranty; keep intact all the
82 notices that refer to this License and to the absence of any warranty;
83 and give any other recipients of the Program a copy of this License
84 along with the Program.
85
86 You may charge a fee for the physical act of transferring a copy, and
87 you may at your option offer warranty protection in exchange for a fee.
88
89 2. You may modify your copy or copies of the Program or any portion
90 of it, thus forming a work based on the Program, and copy and
91 distribute such modifications or work under the terms of Section 1
92 above, provided that you also meet all of these conditions:
93
94 a) You must cause the modified files to carry prominent notices
95 stating that you changed the files and the date of any change.
96
97 b) You must cause any work that you distribute or publish, that in
98 whole or in part contains or is derived from the Program or any
99 part thereof, to be licensed as a whole at no charge to all third
100 parties under the terms of this License.
101
102 c) If the modified program normally reads commands interactively
103 when run, you must cause it, when started running for such
104 interactive use in the most ordinary way, to print or display an
105 announcement including an appropriate copyright notice and a
106 notice that there is no warranty (or else, saying that you provide
107 a warranty) and that users may redistribute the program under
108 these conditions, and telling the user how to view a copy of this
109 License. (Exception: if the Program itself is interactive but
110 does not normally print such an announcement, your work based on
111 the Program is not required to print an announcement.)
112
113 These requirements apply to the modified work as a whole. If
114 identifiable sections of that work are not derived from the Program,
115 and can be reasonably considered independent and separate works in
116 themselves, then this License, and its terms, do not apply to those
117 sections when you distribute them as separate works. But when you
118 distribute the same sections as part of a whole which is a work based
119 on the Program, the distribution of the whole must be on the terms of
120 this License, whose permissions for other licensees extend to the
121 entire whole, and thus to each and every part regardless of who wrote it.
122
123 Thus, it is not the intent of this section to claim rights or contest
124 your rights to work written entirely by you; rather, the intent is to
125 exercise the right to control the distribution of derivative or
126 collective works based on the Program.
127
128 In addition, mere aggregation of another work not based on the Program
129 with the Program (or with a work based on the Program) on a volume of
130 a storage or distribution medium does not bring the other work under
131 the scope of this License.
132
133 3. You may copy and distribute the Program (or a work based on it,
134 under Section 2) in object code or executable form under the terms of
135 Sections 1 and 2 above provided that you also do one of the following:
136
137 a) Accompany it with the complete corresponding machine-readable
138 source code, which must be distributed under the terms of Sections
139 1 and 2 above on a medium customarily used for software interchange; or,
140
141 b) Accompany it with a written offer, valid for at least three
142 years, to give any third party, for a charge no more than your
143 cost of physically performing source distribution, a complete
144 machine-readable copy of the corresponding source code, to be
145 distributed under the terms of Sections 1 and 2 above on a medium
146 customarily used for software interchange; or,
147
148 c) Accompany it with the information you received as to the offer
149 to distribute corresponding source code. (This alternative is
150 allowed only for noncommercial distribution and only if you
151 received the program in object code or executable form with such
152 an offer, in accord with Subsection b above.)
153
154 The source code for a work means the preferred form of the work for
155 making modifications to it. For an executable work, complete source
156 code means all the source code for all modules it contains, plus any
157 associated interface definition files, plus the scripts used to
158 control compilation and installation of the executable. However, as a
159 special exception, the source code distributed need not include
160 anything that is normally distributed (in either source or binary
161 form) with the major components (compiler, kernel, and so on) of the
162 operating system on which the executable runs, unless that component
163 itself accompanies the executable.
164
165 If distribution of executable or object code is made by offering
166 access to copy from a designated place, then offering equivalent
167 access to copy the source code from the same place counts as
168 distribution of the source code, even though third parties are not
169 compelled to copy the source along with the object code.
170
171 4. You may not copy, modify, sublicense, or distribute the Program
172 except as expressly provided under this License. Any attempt
173 otherwise to copy, modify, sublicense or distribute the Program is
174 void, and will automatically terminate your rights under this License.
175 However, parties who have received copies, or rights, from you under
176 this License will not have their licenses terminated so long as such
177 parties remain in full compliance.
178
179 5. You are not required to accept this License, since you have not
180 signed it. However, nothing else grants you permission to modify or
181 distribute the Program or its derivative works. These actions are
182 prohibited by law if you do not accept this License. Therefore, by
183 modifying or distributing the Program (or any work based on the
184 Program), you indicate your acceptance of this License to do so, and
185 all its terms and conditions for copying, distributing or modifying
186 the Program or works based on it.
187
188 6. Each time you redistribute the Program (or any work based on the
189 Program), the recipient automatically receives a license from the
190 original licensor to copy, distribute or modify the Program subject to
191 these terms and conditions. You may not impose any further
192 restrictions on the recipients' exercise of the rights granted herein.
193 You are not responsible for enforcing compliance by third parties to
194 this License.
195
196 7. If, as a consequence of a court judgment or allegation of patent
197 infringement or for any other reason (not limited to patent issues),
198 conditions are imposed on you (whether by court order, agreement or
199 otherwise) that contradict the conditions of this License, they do not
200 excuse you from the conditions of this License. If you cannot
201 distribute so as to satisfy simultaneously your obligations under this
202 License and any other pertinent obligations, then as a consequence you
203 may not distribute the Program at all. For example, if a patent
204 license would not permit royalty-free redistribution of the Program by
205 all those who receive copies directly or indirectly through you, then
206 the only way you could satisfy both it and this License would be to
207 refrain entirely from distribution of the Program.
208
209 If any portion of this section is held invalid or unenforceable under
210 any particular circumstance, the balance of the section is intended to
211 apply and the section as a whole is intended to apply in other
212 circumstances.
213
214 It is not the purpose of this section to induce you to infringe any
215 patents or other property right claims or to contest validity of any
216 such claims; this section has the sole purpose of protecting the
217 integrity of the free software distribution system, which is
218 implemented by public license practices. Many people have made
219 generous contributions to the wide range of software distributed
220 through that system in reliance on consistent application of that
221 system; it is up to the author/donor to decide if he or she is willing
222 to distribute software through any other system and a licensee cannot
223 impose that choice.
224
225 This section is intended to make thoroughly clear what is believed to
226 be a consequence of the rest of this License.
227
228 8. If the distribution and/or use of the Program is restricted in
229 certain countries either by patents or by copyrighted interfaces, the
230 original copyright holder who places the Program under this License
231 may add an explicit geographical distribution limitation excluding
232 those countries, so that distribution is permitted only in or among
233 countries not thus excluded. In such case, this License incorporates
234 the limitation as if written in the body of this License.
235
236 9. The Free Software Foundation may publish revised and/or new versions
237 of the General Public License from time to time. Such new versions will
238 be similar in spirit to the present version, but may differ in detail to
239 address new problems or concerns.
240
241 Each version is given a distinguishing version number. If the Program
242 specifies a version number of this License which applies to it and "any
243 later version", you have the option of following the terms and conditions
244 either of that version or of any later version published by the Free
245 Software Foundation. If the Program does not specify a version number of
246 this License, you may choose any version ever published by the Free Software
247 Foundation.
248
249 10. If you wish to incorporate parts of the Program into other free
250 programs whose distribution conditions are different, write to the author
251 to ask for permission. For software which is copyrighted by the Free
252 Software Foundation, write to the Free Software Foundation; we sometimes
253 make exceptions for this. Our decision will be guided by the two goals
254 of preserving the free status of all derivatives of our free software and
255 of promoting the sharing and reuse of software generally.
256
257 NO WARRANTY
258
259 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
260 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
261 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
262 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
263 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
264 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
265 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
266 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
267 REPAIR OR CORRECTION.
268
269 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
270 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
271 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
272 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
273 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
274 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
275 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
276 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
277 POSSIBILITY OF SUCH DAMAGES.
278
279 END OF TERMS AND CONDITIONS
0 0.9.0 (10/12/2001)
1 Required pipes feature added.
2 Number of required pipes for each level defined.
3 Memory leak in hash table class eliminated.
4 Small bug in levels 20-25 background image fixed.
5 Installation prefix can now be specified (--prefix option in configure script).
6 Some compilation problems with RH are hopefully solved.
7 Manual page added.
8
9 0.8.0 (07/29/2001)
10 Background now can be a wallpaper.
11 Memory leak when loading images eliminated.
12 Almost all graphics redrawn.
13 All levels rewritten (5 levels added).
14 Score added.
15 Levels format improved.
16 Pipe block added.
17 Background tag added.
18 Some small bugs eliminated.
19 Screen updating routines improved (speed).
20 Btw, web page rewritten.
21
22 0.6.1 (02/27/2001)
23 Compilation error for 2.91.x gcc compilers fixed.
24 Some compilation difficulties under RH 7.0 fixed.
25 Very obscure memory leak in the Graphic class copy constructor fixed.
26 Clipping bug in the Graphic class fixed.
27 Splash drawing bug fixed.
28 Graphics loading and freeing improved.
29 Busy waiting event adquisition eliminated.
30
31 0.6.0 (02/07/2001) Initial public release.
0 Basic Installation
1 ==================
2
3 These are generic installation instructions.
4
5 The `configure' shell script attempts to guess correct values for
6 various system-dependent variables used during compilation. It uses
7 those values to create a `Makefile' in each directory of the package.
8 It may also create one or more `.h' files containing system-dependent
9 definitions. Finally, it creates a shell script `config.status' that
10 you can run in the future to recreate the current configuration, a file
11 `config.cache' that saves the results of its tests to speed up
12 reconfiguring, and a file `config.log' containing compiler output
13 (useful mainly for debugging `configure').
14
15 If you need to do unusual things to compile the package, please try
16 to figure out how `configure' could check whether to do them, and mail
17 diffs or instructions to the address given in the `README' so they can
18 be considered for the next release. If at some point `config.cache'
19 contains results you don't want to keep, you may remove or edit it.
20
21 The file `configure.in' is used to create `configure' by a program
22 called `autoconf'. You only need `configure.in' if you want to change
23 it or regenerate `configure' using a newer version of `autoconf'.
24
25 The simplest way to compile this package is:
26
27 1. `cd' to the directory containing the package's source code and type
28 `./configure' to configure the package for your system. If you're
29 using `csh' on an old version of System V, you might need to type
30 `sh ./configure' instead to prevent `csh' from trying to execute
31 `configure' itself.
32
33 Running `configure' takes a while. While running, it prints some
34 messages telling which features it is checking for.
35
36 2. Type `make' to compile the package.
37
38 3. Type `make install' to install the programs and any data files and
39 documentation.
40
41 4. You can remove the program binaries and object files from the
42 source code directory by typing `make clean'.
43
44 Compilers and Options
45 =====================
46
47 Some systems require unusual options for compilation or linking that
48 the `configure' script does not know about. You can give `configure'
49 initial values for variables by setting them in the environment. Using
50 a Bourne-compatible shell, you can do that on the command line like
51 this:
52 CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
53
54 Or on systems that have the `env' program, you can do it like this:
55 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
56
57 Compiling For Multiple Architectures
58 ====================================
59
60 You can compile the package for more than one kind of computer at the
61 same time, by placing the object files for each architecture in their
62 own directory. To do this, you must use a version of `make' that
63 supports the `VPATH' variable, such as GNU `make'. `cd' to the
64 directory where you want the object files and executables to go and run
65 the `configure' script. `configure' automatically checks for the
66 source code in the directory that `configure' is in and in `..'.
67
68 If you have to use a `make' that does not supports the `VPATH'
69 variable, you have to compile the package for one architecture at a time
70 in the source code directory. After you have installed the package for
71 one architecture, use `make distclean' before reconfiguring for another
72 architecture.
73
74 Installation Names
75 ==================
76
77 By default, `make install' will install the package's files in
78 `/usr/local/bin', `/usr/local/man', etc. You can specify an
79 installation prefix other than `/usr/local' by giving `configure' the
80 option `--prefix=PATH'.
81
82 You can specify separate installation prefixes for
83 architecture-specific files and architecture-independent files. If you
84 give `configure' the option `--exec-prefix=PATH', the package will use
85 PATH as the prefix for installing programs and libraries.
86 Documentation and other data files will still use the regular prefix.
87
88 If the package supports it, you can cause programs to be installed
89 with an extra prefix or suffix on their names by giving `configure' the
90 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
91
92 Optional Features
93 =================
94
95 Some packages pay attention to `--enable-FEATURE' options to
96 `configure', where FEATURE indicates an optional part of the package.
97 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
98 is something like `gnu-as' or `x' (for the X Window System). The
99 `README' should mention any `--enable-' and `--with-' options that the
100 package recognizes.
101
102 For packages that use the X Window System, `configure' can usually
103 find the X include and library files automatically, but if it doesn't,
104 you can use the `configure' options `--x-includes=DIR' and
105 `--x-libraries=DIR' to specify their locations.
106
107 Specifying the System Type
108 ==========================
109
110 There may be some features `configure' can not figure out
111 automatically, but needs to determine by the type of host the package
112 will run on. Usually `configure' can figure that out, but if it prints
113 a message saying it can not guess the host type, give it the
114 `--host=TYPE' option. TYPE can either be a short name for the system
115 type, such as `sun4', or a canonical name with three fields:
116 CPU-COMPANY-SYSTEM
117
118 See the file `config.sub' for the possible values of each field. If
119 `config.sub' isn't included in this package, then this package doesn't
120 need to know the host type.
121
122 If you are building compiler tools for cross-compiling, you can also
123 use the `--target=TYPE' option to select the type of system they will
124 produce code for and the `--build=TYPE' option to select the type of
125 system on which you are compiling the package.
126
127 Sharing Defaults
128 ================
129
130 If you want to set default values for `configure' scripts to share,
131 you can create a site shell script called `config.site' that gives
132 default values for variables like `CC', `cache_file', and `prefix'.
133 `configure' looks for `PREFIX/share/config.site' if it exists, then
134 `PREFIX/etc/config.site' if it exists. Or, you can set the
135 `CONFIG_SITE' environment variable to the location of the site script.
136 A warning: not all `configure' scripts look for a site script.
137
138 Operation Controls
139 ==================
140
141 `configure' recognizes the following options to control how it
142 operates.
143
144 `--cache-file=FILE'
145 Use and save the results of the tests in FILE instead of
146 `./config.cache'. Set FILE to `/dev/null' to disable caching, for
147 debugging `configure'.
148
149 `--help'
150 Print a summary of the options to `configure', and exit.
151
152 `--quiet'
153 `--silent'
154 `-q'
155 Do not print messages saying which checks are being made.
156
157 `--srcdir=DIR'
158 Look for the package's source code in directory DIR. Usually
159 `configure' can determine that directory automatically.
160
161 `--version'
162 Print the version of Autoconf used to generate the `configure'
163 script, and exit.
164
165 `configure' also accepts some other, not widely useful, options.
166
0 SUBDIRS = src images levels
1
2 EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README pipenightdreams.lsm autogen.sh
3
4
0 # Makefile.in generated automatically by automake 1.4 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = .
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AS = @AS@
62 CC = @CC@
63 CXX = @CXX@
64 DLLTOOL = @DLLTOOL@
65 LD = @LD@
66 LEX = @LEX@
67 LIBTOOL = @LIBTOOL@
68 LN_S = @LN_S@
69 MAKEINFO = @MAKEINFO@
70 NM = @NM@
71 OBJDUMP = @OBJDUMP@
72 PACKAGE = @PACKAGE@
73 RANLIB = @RANLIB@
74 SDL_CFLAGS = @SDL_CFLAGS@
75 SDL_CONFIG = @SDL_CONFIG@
76 SDL_LIBS = @SDL_LIBS@
77 VERSION = @VERSION@
78
79 SUBDIRS = src images levels man
80
81 EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README pipenightdreams.lsm autogen.sh
82 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
83 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
84 CONFIG_HEADER = ./src/config.h
85 CONFIG_CLEAN_FILES =
86 DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
87 Makefile.in NEWS acinclude.m4 aclocal.m4 config.guess config.sub \
88 configure configure.in install-sh missing mkinstalldirs
89
90
91 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
92
93 TAR = tar
94 GZIP_ENV = --best
95 all: all-redirect
96 .SUFFIXES:
97 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
98 cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
99
100 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
101 cd $(top_builddir) \
102 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
103
104 $(ACLOCAL_M4): configure.in acinclude.m4
105 cd $(srcdir) && $(ACLOCAL)
106
107 config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
108 $(SHELL) ./config.status --recheck
109 $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
110 cd $(srcdir) && $(AUTOCONF)
111
112 # This directory's subdirectories are mostly independent; you can cd
113 # into them and run `make' without going through this Makefile.
114 # To change the values of `make' variables: instead of editing Makefiles,
115 # (1) if the variable is set in `config.status', edit `config.status'
116 # (which will cause the Makefiles to be regenerated when you run `make');
117 # (2) otherwise, pass the desired values on the `make' command line.
118
119 @SET_MAKE@
120
121 all-recursive install-data-recursive install-exec-recursive \
122 installdirs-recursive install-recursive uninstall-recursive \
123 check-recursive installcheck-recursive info-recursive dvi-recursive:
124 @set fnord $(MAKEFLAGS); amf=$$2; \
125 dot_seen=no; \
126 target=`echo $@ | sed s/-recursive//`; \
127 list='$(SUBDIRS)'; for subdir in $$list; do \
128 echo "Making $$target in $$subdir"; \
129 if test "$$subdir" = "."; then \
130 dot_seen=yes; \
131 local_target="$$target-am"; \
132 else \
133 local_target="$$target"; \
134 fi; \
135 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
136 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
137 done; \
138 if test "$$dot_seen" = "no"; then \
139 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
140 fi; test -z "$$fail"
141
142 mostlyclean-recursive clean-recursive distclean-recursive \
143 maintainer-clean-recursive:
144 @set fnord $(MAKEFLAGS); amf=$$2; \
145 dot_seen=no; \
146 rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
147 rev="$$subdir $$rev"; \
148 test "$$subdir" = "." && dot_seen=yes; \
149 done; \
150 test "$$dot_seen" = "no" && rev=". $$rev"; \
151 target=`echo $@ | sed s/-recursive//`; \
152 for subdir in $$rev; do \
153 echo "Making $$target in $$subdir"; \
154 if test "$$subdir" = "."; then \
155 local_target="$$target-am"; \
156 else \
157 local_target="$$target"; \
158 fi; \
159 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
160 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
161 done && test -z "$$fail"
162 tags-recursive:
163 list='$(SUBDIRS)'; for subdir in $$list; do \
164 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
165 done
166
167 tags: TAGS
168
169 ID: $(HEADERS) $(SOURCES) $(LISP)
170 list='$(SOURCES) $(HEADERS)'; \
171 unique=`for i in $$list; do echo $$i; done | \
172 awk ' { files[$$0] = 1; } \
173 END { for (i in files) print i; }'`; \
174 here=`pwd` && cd $(srcdir) \
175 && mkid -f$$here/ID $$unique $(LISP)
176
177 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
178 tags=; \
179 here=`pwd`; \
180 list='$(SUBDIRS)'; for subdir in $$list; do \
181 if test "$$subdir" = .; then :; else \
182 test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
183 fi; \
184 done; \
185 list='$(SOURCES) $(HEADERS)'; \
186 unique=`for i in $$list; do echo $$i; done | \
187 awk ' { files[$$0] = 1; } \
188 END { for (i in files) print i; }'`; \
189 test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
190 || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
191
192 mostlyclean-tags:
193
194 clean-tags:
195
196 distclean-tags:
197 -rm -f TAGS ID
198
199 maintainer-clean-tags:
200
201 distdir = $(PACKAGE)-$(VERSION)
202 top_distdir = $(distdir)
203
204 # This target untars the dist file and tries a VPATH configuration. Then
205 # it guarantees that the distribution is self-contained by making another
206 # tarfile.
207 distcheck: dist
208 -rm -rf $(distdir)
209 GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
210 mkdir $(distdir)/=build
211 mkdir $(distdir)/=inst
212 dc_install_base=`cd $(distdir)/=inst && pwd`; \
213 cd $(distdir)/=build \
214 && ../configure --srcdir=.. --prefix=$$dc_install_base \
215 && $(MAKE) $(AM_MAKEFLAGS) \
216 && $(MAKE) $(AM_MAKEFLAGS) dvi \
217 && $(MAKE) $(AM_MAKEFLAGS) check \
218 && $(MAKE) $(AM_MAKEFLAGS) install \
219 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
220 && $(MAKE) $(AM_MAKEFLAGS) dist
221 -rm -rf $(distdir)
222 @banner="$(distdir).tar.gz is ready for distribution"; \
223 dashes=`echo "$$banner" | sed s/./=/g`; \
224 echo "$$dashes"; \
225 echo "$$banner"; \
226 echo "$$dashes"
227 dist: distdir
228 -chmod -R a+r $(distdir)
229 GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
230 -rm -rf $(distdir)
231 dist-all: distdir
232 -chmod -R a+r $(distdir)
233 GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
234 -rm -rf $(distdir)
235 distdir: $(DISTFILES)
236 -rm -rf $(distdir)
237 mkdir $(distdir)
238 -chmod 777 $(distdir)
239 here=`cd $(top_builddir) && pwd`; \
240 top_distdir=`cd $(distdir) && pwd`; \
241 distdir=`cd $(distdir) && pwd`; \
242 cd $(top_srcdir) \
243 && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
244 @for file in $(DISTFILES); do \
245 d=$(srcdir); \
246 if test -d $$d/$$file; then \
247 cp -pr $$d/$$file $(distdir)/$$file; \
248 else \
249 test -f $(distdir)/$$file \
250 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
251 || cp -p $$d/$$file $(distdir)/$$file || :; \
252 fi; \
253 done
254 for subdir in $(SUBDIRS); do \
255 if test "$$subdir" = .; then :; else \
256 test -d $(distdir)/$$subdir \
257 || mkdir $(distdir)/$$subdir \
258 || exit 1; \
259 chmod 777 $(distdir)/$$subdir; \
260 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
261 || exit 1; \
262 fi; \
263 done
264 info-am:
265 info: info-recursive
266 dvi-am:
267 dvi: dvi-recursive
268 check-am: all-am
269 check: check-recursive
270 installcheck-am:
271 installcheck: installcheck-recursive
272 install-exec-am:
273 install-exec: install-exec-recursive
274
275 install-data-am:
276 install-data: install-data-recursive
277
278 install-am: all-am
279 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
280 install: install-recursive
281 uninstall-am:
282 uninstall: uninstall-recursive
283 all-am: Makefile
284 all-redirect: all-recursive
285 install-strip:
286 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
287 installdirs: installdirs-recursive
288 installdirs-am:
289
290
291 mostlyclean-generic:
292
293 clean-generic:
294
295 distclean-generic:
296 -rm -f Makefile $(CONFIG_CLEAN_FILES)
297 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
298
299 maintainer-clean-generic:
300 mostlyclean-am: mostlyclean-tags mostlyclean-generic
301
302 mostlyclean: mostlyclean-recursive
303
304 clean-am: clean-tags clean-generic mostlyclean-am
305
306 clean: clean-recursive
307
308 distclean-am: distclean-tags distclean-generic clean-am
309
310 distclean: distclean-recursive
311 -rm -f config.status
312
313 maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
314 distclean-am
315 @echo "This command is intended for maintainers to use;"
316 @echo "it deletes files that may require special tools to rebuild."
317
318 maintainer-clean: maintainer-clean-recursive
319 -rm -f config.status
320
321 .PHONY: install-data-recursive uninstall-data-recursive \
322 install-exec-recursive uninstall-exec-recursive installdirs-recursive \
323 uninstalldirs-recursive all-recursive check-recursive \
324 installcheck-recursive info-recursive dvi-recursive \
325 mostlyclean-recursive distclean-recursive clean-recursive \
326 maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
327 distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
328 dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
329 install-exec install-data-am install-data install-am install \
330 uninstall-am uninstall all-redirect all-am all installdirs-am \
331 installdirs mostlyclean-generic distclean-generic clean-generic \
332 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
333
334
335 # Tell versions [3.59,3.63) of GNU make to not export all variables.
336 # Otherwise a system limit (for SysV at least) may be exceeded.
337 .NOEXPORT:
0
1 10/12/2001 New release with new features and some bugs fixed (version 0.9.0).
2 08/08/2001 Pipenightdreams appears in the Japanese Linux magazine (ASCII), page 132, as part of a Free Application Showcase.
3 07/29/2001 New release with many new features and some bugs fixed (version 0.8.0).
4 02/27/2001 New release with many bugs fixed (version 0.6.1).
5 02/07/2001 Initial public release (version 0.6.0).
0
1
2 PipeNightDreams
3 -----------------
4 Version 0.9.0
5
6 by Waldemar A. Baraldi
7 baraldi@lacasilla.com.ar
8 http:://www.libsdl.org/projects/pipenightdreams
9
10
11 This game is a pseudo-clon of an old game called PipeDream. I say pseudo-clon
12 because I don't have the original one so I've been working just with the facts
13 I remember. I've written it in my spare time during the last twelve months (as you
14 can see my spare time is not much).
15
16 Many other functionality is planned (more graphics and levels, sound,
17 multiplayer, network and AI) and I hope I'll slowly make it real.By the time I
18 encourage you (if you like the game) to draw some more graphics. It's really
19 easy to make them work, just look at the ones that I have drawn.
20
21 You can also read the sources and bring any suggestion, criticism or
22 cooperation that will be truly welcomed.
23
24 I want to thank Sam Latinga and Linus Torvalds. The first one for creating
25 SDL and for giving me this digital space and the second one for...
26 well you know...
27
28 Waldemar A. Baraldi
0 #undef GAME_PREFIX
1 #undef GAME_DATADIR
0 # Configure paths for SDL
1 # Sam Lantinga 9/21/99
2 # stolen from Manish Singh
3 # stolen back from Frank Belew
4 # stolen from Manish Singh
5 # Shamelessly stolen from Owen Taylor
6
7 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
8 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
9 dnl
10 AC_DEFUN(AM_PATH_SDL,
11 [dnl
12 dnl Get the cflags and libraries from the sdl-config script
13 dnl
14 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
15 sdl_prefix="$withval", sdl_prefix="")
16 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
17 sdl_exec_prefix="$withval", sdl_exec_prefix="")
18 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
19 , enable_sdltest=yes)
20
21 if test x$sdl_exec_prefix != x ; then
22 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
23 if test x${SDL_CONFIG+set} != xset ; then
24 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
25 fi
26 fi
27 if test x$sdl_prefix != x ; then
28 sdl_args="$sdl_args --prefix=$sdl_prefix"
29 if test x${SDL_CONFIG+set} != xset ; then
30 SDL_CONFIG=$sdl_prefix/bin/sdl-config
31 fi
32 fi
33
34 AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
35 min_sdl_version=ifelse([$1], ,0.11.0,$1)
36 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
37 no_sdl=""
38 if test "$SDL_CONFIG" = "no" ; then
39 no_sdl=yes
40 else
41 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
42 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
43
44 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
45 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
46 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
47 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
48 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
49 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
50 if test "x$enable_sdltest" = "xyes" ; then
51 ac_save_CFLAGS="$CFLAGS"
52 ac_save_LIBS="$LIBS"
53 CFLAGS="$CFLAGS $SDL_CFLAGS"
54 LIBS="$LIBS $SDL_LIBS"
55 dnl
56 dnl Now check if the installed SDL is sufficiently new. (Also sanity
57 dnl checks the results of sdl-config to some extent
58 dnl
59 rm -f conf.sdltest
60 AC_TRY_RUN([
61 #include <stdio.h>
62 #include <stdlib.h>
63 #include <string.h>
64 #include <SDL/SDL.h>
65
66 char*
67 my_strdup (char *str)
68 {
69 char *new_str;
70
71 if (str)
72 {
73 new_str = malloc ((strlen (str) + 1) * sizeof(char));
74 strcpy (new_str, str);
75 }
76 else
77 new_str = NULL;
78
79 return new_str;
80 }
81
82 int main ()
83 {
84 int major, minor, micro;
85 char *tmp_version;
86
87 system ("touch conf.sdltest");
88
89 /* HP/UX 9 (%@#!) writes to sscanf strings */
90 tmp_version = my_strdup("$min_sdl_version");
91 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
92 printf("%s, bad version string\n", "$min_sdl_version");
93 exit(1);
94 }
95
96 if (($sdl_major_version > major) ||
97 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
98 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
99 {
100 return 0;
101 }
102 else
103 {
104 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
105 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
106 printf("*** best to upgrade to the required version.\n");
107 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
108 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
109 printf("*** config.cache before re-running configure\n");
110 return 1;
111 }
112 }
113
114 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
115 CFLAGS="$ac_save_CFLAGS"
116 LIBS="$ac_save_LIBS"
117 fi
118 fi
119 if test "x$no_sdl" = x ; then
120 AC_MSG_RESULT(yes)
121 ifelse([$2], , :, [$2])
122 else
123 AC_MSG_RESULT(no)
124 if test "$SDL_CONFIG" = "no" ; then
125 echo "*** The sdl-config script installed by SDL could not be found"
126 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
127 echo "*** your path, or set the SDL_CONFIG environment variable to the"
128 echo "*** full path to sdl-config."
129 else
130 if test -f conf.sdltest ; then
131 :
132 else
133 echo "*** Could not run SDL test program, checking why..."
134 CFLAGS="$CFLAGS $SDL_CFLAGS"
135 LIBS="$LIBS $SDL_LIBS"
136 AC_TRY_LINK([
137 #include <stdio.h>
138 #include <SDL/SDL.h>
139 ], [ return 0; ],
140 [ echo "*** The test program compiled, but did not run. This usually means"
141 echo "*** that the run-time linker is not finding SDL or finding the wrong"
142 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
143 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
144 echo "*** to the installed location Also, make sure you have run ldconfig if that"
145 echo "*** is required on your system"
146 echo "***"
147 echo "*** If you have an old version installed, it is best to remove it, although"
148 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
149 [ echo "*** The test program failed to compile or link. See the file config.log for the"
150 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
151 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
152 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
153 CFLAGS="$ac_save_CFLAGS"
154 LIBS="$ac_save_LIBS"
155 fi
156 fi
157 SDL_CFLAGS=""
158 SDL_LIBS=""
159 ifelse([$3], , :, [$3])
160 fi
161 AC_SUBST(SDL_CFLAGS)
162 AC_SUBST(SDL_LIBS)
163 rm -f conf.sdltest
164 ])
165 ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
166 ## Copyright (C) 1996-1999 Free Software Foundation, Inc.
167 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
168 ##
169 ## This program is free software; you can redistribute it and/or modify
170 ## it under the terms of the GNU General Public License as published by
171 ## the Free Software Foundation; either version 2 of the License, or
172 ## (at your option) any later version.
173 ##
174 ## This program is distributed in the hope that it will be useful, but
175 ## WITHOUT ANY WARRANTY; without even the implied warranty of
176 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
177 ## General Public License for more details.
178 ##
179 ## You should have received a copy of the GNU General Public License
180 ## along with this program; if not, write to the Free Software
181 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
182 ##
183 ## As a special exception to the GNU General Public License, if you
184 ## distribute this file as part of a program that contains a
185 ## configuration script generated by Autoconf, you may include it under
186 ## the same distribution terms that you use for the rest of that program.
187
188 # serial 41 AC_PROG_LIBTOOL
189 AC_DEFUN(AC_PROG_LIBTOOL,
190 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
191
192 # Save cache, so that ltconfig can load it
193 AC_CACHE_SAVE
194
195 # Actually configure libtool. ac_aux_dir is where install-sh is found.
196 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
197 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
198 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
199 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
200 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
201 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
202 || AC_MSG_ERROR([libtool configure failed])
203
204 # Reload cache, that may have been modified by ltconfig
205 AC_CACHE_LOAD
206
207 # This can be used to rebuild libtool when needed
208 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
209
210 # Always use our own libtool.
211 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
212 AC_SUBST(LIBTOOL)dnl
213
214 # Redirect the config.log output again, so that the ltconfig log is not
215 # clobbered by the next message.
216 exec 5>>./config.log
217 ])
218
219 AC_DEFUN(AC_LIBTOOL_SETUP,
220 [AC_PREREQ(2.13)dnl
221 AC_REQUIRE([AC_ENABLE_SHARED])dnl
222 AC_REQUIRE([AC_ENABLE_STATIC])dnl
223 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
224 AC_REQUIRE([AC_CANONICAL_HOST])dnl
225 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
226 AC_REQUIRE([AC_PROG_CC])dnl
227 AC_REQUIRE([AC_PROG_LD])dnl
228 AC_REQUIRE([AC_PROG_NM])dnl
229 AC_REQUIRE([AC_PROG_LN_S])dnl
230 dnl
231
232 AC_CHECK_TOOL(RANLIB, ranlib, :)
233
234 # Check for any special flags to pass to ltconfig.
235 libtool_flags="--cache-file=$cache_file"
236 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
237 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
238 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
239 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
240 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
241 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
242 [libtool_flags="$libtool_flags --enable-dlopen"])
243 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
244 [libtool_flags="$libtool_flags --enable-win32-dll"])
245 AC_ARG_ENABLE(libtool-lock,
246 [ --disable-libtool-lock avoid locking (might break parallel builds)])
247 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
248 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
249
250 AC_ARG_WITH(pic,
251 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
252 pic_mode="$withval", pic_mode=default)
253 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
254 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
255
256 # Some flags need to be propagated to the compiler or linker for good
257 # libtool support.
258 case "$host" in
259 *-*-irix6*)
260 # Find out which ABI we are using.
261 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
262 if AC_TRY_EVAL(ac_compile); then
263 case "`/usr/bin/file conftest.o`" in
264 *32-bit*)
265 LD="${LD-ld} -32"
266 ;;
267 *N32*)
268 LD="${LD-ld} -n32"
269 ;;
270 *64-bit*)
271 LD="${LD-ld} -64"
272 ;;
273 esac
274 fi
275 rm -rf conftest*
276 ;;
277
278 *-*-sco3.2v5*)
279 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
280 SAVE_CFLAGS="$CFLAGS"
281 CFLAGS="$CFLAGS -belf"
282 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
283 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
284 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
285 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
286 CFLAGS="$SAVE_CFLAGS"
287 fi
288 ;;
289
290 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
291 [*-*-cygwin* | *-*-mingw*)
292 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
293 AC_CHECK_TOOL(AS, as, false)
294 AC_CHECK_TOOL(OBJDUMP, objdump, false)
295
296 # recent cygwin and mingw systems supply a stub DllMain which the user
297 # can override, but on older systems we have to supply one
298 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
299 [AC_TRY_LINK([DllMain (0, 0, 0);],
300 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);],
301 [lt_cv_need_dllmain=yes],[lt_cv_need_dllmain=no])])
302
303 case $host in
304 *-*-cygwin*)
305 # cygwin systems need to pass --dll to the linker, and not link
306 # crt.o which will require a WinMain@16 definition.
307 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
308 *-*-mingw*)
309 # old mingw systems require "-dll" to link a DLL, while more recent ones
310 # require "-mdll"
311 SAVE_CFLAGS="$CFLAGS"
312 CFLAGS="$CFLAGS -mdll"
313 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
314 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
315 CFLAGS="$SAVE_CFLAGS" ;;
316 esac
317 ;;
318 ])
319 esac
320 ])
321
322 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
323 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
324
325 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
326 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
327
328 # AC_ENABLE_SHARED - implement the --enable-shared flag
329 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
330 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
331 # `yes'.
332 AC_DEFUN(AC_ENABLE_SHARED, [dnl
333 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
334 AC_ARG_ENABLE(shared,
335 changequote(<<, >>)dnl
336 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
337 changequote([, ])dnl
338 [p=${PACKAGE-default}
339 case "$enableval" in
340 yes) enable_shared=yes ;;
341 no) enable_shared=no ;;
342 *)
343 enable_shared=no
344 # Look at the argument we got. We use all the common list separators.
345 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
346 for pkg in $enableval; do
347 if test "X$pkg" = "X$p"; then
348 enable_shared=yes
349 fi
350 done
351 IFS="$ac_save_ifs"
352 ;;
353 esac],
354 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
355 ])
356
357 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
358 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
359 AC_ENABLE_SHARED(no)])
360
361 # AC_ENABLE_STATIC - implement the --enable-static flag
362 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
363 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
364 # `yes'.
365 AC_DEFUN(AC_ENABLE_STATIC, [dnl
366 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
367 AC_ARG_ENABLE(static,
368 changequote(<<, >>)dnl
369 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
370 changequote([, ])dnl
371 [p=${PACKAGE-default}
372 case "$enableval" in
373 yes) enable_static=yes ;;
374 no) enable_static=no ;;
375 *)
376 enable_static=no
377 # Look at the argument we got. We use all the common list separators.
378 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
379 for pkg in $enableval; do
380 if test "X$pkg" = "X$p"; then
381 enable_static=yes
382 fi
383 done
384 IFS="$ac_save_ifs"
385 ;;
386 esac],
387 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
388 ])
389
390 # AC_DISABLE_STATIC - set the default static flag to --disable-static
391 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
392 AC_ENABLE_STATIC(no)])
393
394
395 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
396 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
397 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
398 # `yes'.
399 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
400 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
401 AC_ARG_ENABLE(fast-install,
402 changequote(<<, >>)dnl
403 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
404 changequote([, ])dnl
405 [p=${PACKAGE-default}
406 case "$enableval" in
407 yes) enable_fast_install=yes ;;
408 no) enable_fast_install=no ;;
409 *)
410 enable_fast_install=no
411 # Look at the argument we got. We use all the common list separators.
412 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
413 for pkg in $enableval; do
414 if test "X$pkg" = "X$p"; then
415 enable_fast_install=yes
416 fi
417 done
418 IFS="$ac_save_ifs"
419 ;;
420 esac],
421 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
422 ])
423
424 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
425 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
426 AC_ENABLE_FAST_INSTALL(no)])
427
428 # AC_PROG_LD - find the path to the GNU or non-GNU linker
429 AC_DEFUN(AC_PROG_LD,
430 [AC_ARG_WITH(gnu-ld,
431 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
432 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
433 AC_REQUIRE([AC_PROG_CC])dnl
434 AC_REQUIRE([AC_CANONICAL_HOST])dnl
435 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
436 ac_prog=ld
437 if test "$ac_cv_prog_gcc" = yes; then
438 # Check if gcc -print-prog-name=ld gives a path.
439 AC_MSG_CHECKING([for ld used by GCC])
440 case $host in
441 *-*-mingw*)
442 # gcc leaves a trailing carriage return which upsets mingw
443 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
444 *)
445 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
446 esac
447 case "$ac_prog" in
448 # Accept absolute paths.
449 changequote(,)dnl
450 [\\/]* | [A-Za-z]:[\\/]*)
451 re_direlt='/[^/][^/]*/\.\./'
452 changequote([,])dnl
453 # Canonicalize the path of ld
454 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
455 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
456 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
457 done
458 test -z "$LD" && LD="$ac_prog"
459 ;;
460 "")
461 # If it fails, then pretend we aren't using GCC.
462 ac_prog=ld
463 ;;
464 *)
465 # If it is relative, then search for the first ld in PATH.
466 with_gnu_ld=unknown
467 ;;
468 esac
469 elif test "$with_gnu_ld" = yes; then
470 AC_MSG_CHECKING([for GNU ld])
471 else
472 AC_MSG_CHECKING([for non-GNU ld])
473 fi
474 AC_CACHE_VAL(ac_cv_path_LD,
475 [if test -z "$LD"; then
476 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
477 for ac_dir in $PATH; do
478 test -z "$ac_dir" && ac_dir=.
479 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
480 ac_cv_path_LD="$ac_dir/$ac_prog"
481 # Check to see if the program is GNU ld. I'd rather use --version,
482 # but apparently some GNU ld's only accept -v.
483 # Break only if it was the GNU/non-GNU ld that we prefer.
484 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
485 test "$with_gnu_ld" != no && break
486 else
487 test "$with_gnu_ld" != yes && break
488 fi
489 fi
490 done
491 IFS="$ac_save_ifs"
492 else
493 ac_cv_path_LD="$LD" # Let the user override the test with a path.
494 fi])
495 LD="$ac_cv_path_LD"
496 if test -n "$LD"; then
497 AC_MSG_RESULT($LD)
498 else
499 AC_MSG_RESULT(no)
500 fi
501 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
502 AC_SUBST(LD)
503 AC_PROG_LD_GNU
504 ])
505
506 AC_DEFUN(AC_PROG_LD_GNU,
507 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
508 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
509 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
510 ac_cv_prog_gnu_ld=yes
511 else
512 ac_cv_prog_gnu_ld=no
513 fi])
514 ])
515
516 # AC_PROG_NM - find the path to a BSD-compatible name lister
517 AC_DEFUN(AC_PROG_NM,
518 [AC_MSG_CHECKING([for BSD-compatible nm])
519 AC_CACHE_VAL(ac_cv_path_NM,
520 [if test -n "$NM"; then
521 # Let the user override the test.
522 ac_cv_path_NM="$NM"
523 else
524 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
525 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
526 test -z "$ac_dir" && ac_dir=.
527 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
528 # Check to see if the nm accepts a BSD-compat flag.
529 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
530 # nm: unknown option "B" ignored
531 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
532 ac_cv_path_NM="$ac_dir/nm -B"
533 break
534 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
535 ac_cv_path_NM="$ac_dir/nm -p"
536 break
537 else
538 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
539 continue # so that we can try to find one that supports BSD flags
540 fi
541 fi
542 done
543 IFS="$ac_save_ifs"
544 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
545 fi])
546 NM="$ac_cv_path_NM"
547 AC_MSG_RESULT([$NM])
548 AC_SUBST(NM)
549 ])
550
551 # AC_CHECK_LIBM - check for math library
552 AC_DEFUN(AC_CHECK_LIBM,
553 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
554 LIBM=
555 case "$host" in
556 *-*-beos* | *-*-cygwin*)
557 # These system don't have libm
558 ;;
559 *-ncr-sysv4.3*)
560 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
561 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
562 ;;
563 *)
564 AC_CHECK_LIB(m, main, LIBM="-lm")
565 ;;
566 esac
567 ])
568
569 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
570 # the libltdl convenience library, adds --enable-ltdl-convenience to
571 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
572 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
573 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
574 # '${top_builddir}/' (note the single quotes!) if your package is not
575 # flat, and, if you're not using automake, define top_builddir as
576 # appropriate in the Makefiles.
577 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
578 case "$enable_ltdl_convenience" in
579 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
580 "") enable_ltdl_convenience=yes
581 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
582 esac
583 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
584 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
585 ])
586
587 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
588 # the libltdl installable library, and adds --enable-ltdl-install to
589 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
590 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
591 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
592 # '${top_builddir}/' (note the single quotes!) if your package is not
593 # flat, and, if you're not using automake, define top_builddir as
594 # appropriate in the Makefiles.
595 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
596 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
597 AC_CHECK_LIB(ltdl, main,
598 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
599 [if test x"$enable_ltdl_install" = xno; then
600 AC_MSG_WARN([libltdl not installed, but installation disabled])
601 else
602 enable_ltdl_install=yes
603 fi
604 ])
605 if test x"$enable_ltdl_install" = x"yes"; then
606 ac_configure_args="$ac_configure_args --enable-ltdl-install"
607 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
608 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
609 else
610 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
611 LIBLTDL="-lltdl"
612 INCLTDL=
613 fi
614 ])
615
616 dnl old names
617 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
618 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
619 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
620 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
621 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
622 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
623 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
624
625 dnl This is just to silence aclocal about the macro not being used
626 ifelse([AC_DISABLE_FAST_INSTALL])dnl
627
628
629 dnl Thanks to Ingo Ruhnke <grumbel@gmx.de>
630 AC_DEFUN(MY_EXPAND_DIR, [
631 $1=$2
632 $1=`(
633 test "x$prefix" = xNONE && prefix=${ac_default_prefix}
634 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
635 eval echo \""[$]$1"\"
636 )`
637 ])
0 dnl aclocal.m4 generated automatically by aclocal 1.4
1
2 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 dnl This program is distributed in the hope that it will be useful,
8 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 dnl PARTICULAR PURPOSE.
11
12 # Configure paths for SDL
13 # Sam Lantinga 9/21/99
14 # stolen from Manish Singh
15 # stolen back from Frank Belew
16 # stolen from Manish Singh
17 # Shamelessly stolen from Owen Taylor
18
19 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
20 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
21 dnl
22 AC_DEFUN(AM_PATH_SDL,
23 [dnl
24 dnl Get the cflags and libraries from the sdl-config script
25 dnl
26 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
27 sdl_prefix="$withval", sdl_prefix="")
28 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
29 sdl_exec_prefix="$withval", sdl_exec_prefix="")
30 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
31 , enable_sdltest=yes)
32
33 if test x$sdl_exec_prefix != x ; then
34 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
35 if test x${SDL_CONFIG+set} != xset ; then
36 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
37 fi
38 fi
39 if test x$sdl_prefix != x ; then
40 sdl_args="$sdl_args --prefix=$sdl_prefix"
41 if test x${SDL_CONFIG+set} != xset ; then
42 SDL_CONFIG=$sdl_prefix/bin/sdl-config
43 fi
44 fi
45
46 AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
47 min_sdl_version=ifelse([$1], ,0.11.0,$1)
48 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
49 no_sdl=""
50 if test "$SDL_CONFIG" = "no" ; then
51 no_sdl=yes
52 else
53 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
54 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
55
56 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
57 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
58 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
59 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
60 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
61 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
62 if test "x$enable_sdltest" = "xyes" ; then
63 ac_save_CFLAGS="$CFLAGS"
64 ac_save_LIBS="$LIBS"
65 CFLAGS="$CFLAGS $SDL_CFLAGS"
66 LIBS="$LIBS $SDL_LIBS"
67 dnl
68 dnl Now check if the installed SDL is sufficiently new. (Also sanity
69 dnl checks the results of sdl-config to some extent
70 dnl
71 rm -f conf.sdltest
72 AC_TRY_RUN([
73 #include <stdio.h>
74 #include <stdlib.h>
75 #include <string.h>
76 #include <SDL/SDL.h>
77
78 char*
79 my_strdup (char *str)
80 {
81 char *new_str;
82
83 if (str)
84 {
85 new_str = malloc ((strlen (str) + 1) * sizeof(char));
86 strcpy (new_str, str);
87 }
88 else
89 new_str = NULL;
90
91 return new_str;
92 }
93
94 int main ()
95 {
96 int major, minor, micro;
97 char *tmp_version;
98
99 system ("touch conf.sdltest");
100
101 /* HP/UX 9 (%@#!) writes to sscanf strings */
102 tmp_version = my_strdup("$min_sdl_version");
103 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
104 printf("%s, bad version string\n", "$min_sdl_version");
105 exit(1);
106 }
107
108 if (($sdl_major_version > major) ||
109 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
110 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
111 {
112 return 0;
113 }
114 else
115 {
116 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
117 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
118 printf("*** best to upgrade to the required version.\n");
119 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
120 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
121 printf("*** config.cache before re-running configure\n");
122 return 1;
123 }
124 }
125
126 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
127 CFLAGS="$ac_save_CFLAGS"
128 LIBS="$ac_save_LIBS"
129 fi
130 fi
131 if test "x$no_sdl" = x ; then
132 AC_MSG_RESULT(yes)
133 ifelse([$2], , :, [$2])
134 else
135 AC_MSG_RESULT(no)
136 if test "$SDL_CONFIG" = "no" ; then
137 echo "*** The sdl-config script installed by SDL could not be found"
138 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
139 echo "*** your path, or set the SDL_CONFIG environment variable to the"
140 echo "*** full path to sdl-config."
141 else
142 if test -f conf.sdltest ; then
143 :
144 else
145 echo "*** Could not run SDL test program, checking why..."
146 CFLAGS="$CFLAGS $SDL_CFLAGS"
147 LIBS="$LIBS $SDL_LIBS"
148 AC_TRY_LINK([
149 #include <stdio.h>
150 #include <SDL/SDL.h>
151 ], [ return 0; ],
152 [ echo "*** The test program compiled, but did not run. This usually means"
153 echo "*** that the run-time linker is not finding SDL or finding the wrong"
154 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
155 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
156 echo "*** to the installed location Also, make sure you have run ldconfig if that"
157 echo "*** is required on your system"
158 echo "***"
159 echo "*** If you have an old version installed, it is best to remove it, although"
160 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
161 [ echo "*** The test program failed to compile or link. See the file config.log for the"
162 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
163 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
164 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
165 CFLAGS="$ac_save_CFLAGS"
166 LIBS="$ac_save_LIBS"
167 fi
168 fi
169 SDL_CFLAGS=""
170 SDL_LIBS=""
171 ifelse([$3], , :, [$3])
172 fi
173 AC_SUBST(SDL_CFLAGS)
174 AC_SUBST(SDL_LIBS)
175 rm -f conf.sdltest
176 ])
177
178 # serial 41 AC_PROG_LIBTOOL
179 AC_DEFUN(AC_PROG_LIBTOOL,
180 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
181
182 # Save cache, so that ltconfig can load it
183 AC_CACHE_SAVE
184
185 # Actually configure libtool. ac_aux_dir is where install-sh is found.
186 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
187 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
188 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
189 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
190 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
191 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
192 || AC_MSG_ERROR([libtool configure failed])
193
194 # Reload cache, that may have been modified by ltconfig
195 AC_CACHE_LOAD
196
197 # This can be used to rebuild libtool when needed
198 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
199
200 # Always use our own libtool.
201 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
202 AC_SUBST(LIBTOOL)dnl
203
204 # Redirect the config.log output again, so that the ltconfig log is not
205 # clobbered by the next message.
206 exec 5>>./config.log
207 ])
208
209 AC_DEFUN(AC_LIBTOOL_SETUP,
210 [AC_PREREQ(2.13)dnl
211 AC_REQUIRE([AC_ENABLE_SHARED])dnl
212 AC_REQUIRE([AC_ENABLE_STATIC])dnl
213 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
214 AC_REQUIRE([AC_CANONICAL_HOST])dnl
215 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
216 AC_REQUIRE([AC_PROG_CC])dnl
217 AC_REQUIRE([AC_PROG_LD])dnl
218 AC_REQUIRE([AC_PROG_NM])dnl
219 AC_REQUIRE([AC_PROG_LN_S])dnl
220 dnl
221
222 AC_CHECK_TOOL(RANLIB, ranlib, :)
223
224 # Check for any special flags to pass to ltconfig.
225 libtool_flags="--cache-file=$cache_file"
226 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
227 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
228 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
229 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
230 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
231 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
232 [libtool_flags="$libtool_flags --enable-dlopen"])
233 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
234 [libtool_flags="$libtool_flags --enable-win32-dll"])
235 AC_ARG_ENABLE(libtool-lock,
236 [ --disable-libtool-lock avoid locking (might break parallel builds)])
237 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
238 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
239
240 AC_ARG_WITH(pic,
241 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
242 pic_mode="$withval", pic_mode=default)
243 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
244 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
245
246 # Some flags need to be propagated to the compiler or linker for good
247 # libtool support.
248 case "$host" in
249 *-*-irix6*)
250 # Find out which ABI we are using.
251 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
252 if AC_TRY_EVAL(ac_compile); then
253 case "`/usr/bin/file conftest.o`" in
254 *32-bit*)
255 LD="${LD-ld} -32"
256 ;;
257 *N32*)
258 LD="${LD-ld} -n32"
259 ;;
260 *64-bit*)
261 LD="${LD-ld} -64"
262 ;;
263 esac
264 fi
265 rm -rf conftest*
266 ;;
267
268 *-*-sco3.2v5*)
269 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
270 SAVE_CFLAGS="$CFLAGS"
271 CFLAGS="$CFLAGS -belf"
272 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
273 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
274 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
275 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
276 CFLAGS="$SAVE_CFLAGS"
277 fi
278 ;;
279
280 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
281 [*-*-cygwin* | *-*-mingw*)
282 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
283 AC_CHECK_TOOL(AS, as, false)
284 AC_CHECK_TOOL(OBJDUMP, objdump, false)
285
286 # recent cygwin and mingw systems supply a stub DllMain which the user
287 # can override, but on older systems we have to supply one
288 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
289 [AC_TRY_LINK([DllMain (0, 0, 0);],
290 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);],
291 [lt_cv_need_dllmain=yes],[lt_cv_need_dllmain=no])])
292
293 case $host in
294 *-*-cygwin*)
295 # cygwin systems need to pass --dll to the linker, and not link
296 # crt.o which will require a WinMain@16 definition.
297 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
298 *-*-mingw*)
299 # old mingw systems require "-dll" to link a DLL, while more recent ones
300 # require "-mdll"
301 SAVE_CFLAGS="$CFLAGS"
302 CFLAGS="$CFLAGS -mdll"
303 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
304 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
305 CFLAGS="$SAVE_CFLAGS" ;;
306 esac
307 ;;
308 ])
309 esac
310 ])
311
312 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
313 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
314
315 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
316 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
317
318 # AC_ENABLE_SHARED - implement the --enable-shared flag
319 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
320 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
321 # `yes'.
322 AC_DEFUN(AC_ENABLE_SHARED, [dnl
323 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
324 AC_ARG_ENABLE(shared,
325 changequote(<<, >>)dnl
326 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
327 changequote([, ])dnl
328 [p=${PACKAGE-default}
329 case "$enableval" in
330 yes) enable_shared=yes ;;
331 no) enable_shared=no ;;
332 *)
333 enable_shared=no
334 # Look at the argument we got. We use all the common list separators.
335 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
336 for pkg in $enableval; do
337 if test "X$pkg" = "X$p"; then
338 enable_shared=yes
339 fi
340 done
341 IFS="$ac_save_ifs"
342 ;;
343 esac],
344 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
345 ])
346
347 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
348 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
349 AC_ENABLE_SHARED(no)])
350
351 # AC_ENABLE_STATIC - implement the --enable-static flag
352 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
353 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
354 # `yes'.
355 AC_DEFUN(AC_ENABLE_STATIC, [dnl
356 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
357 AC_ARG_ENABLE(static,
358 changequote(<<, >>)dnl
359 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
360 changequote([, ])dnl
361 [p=${PACKAGE-default}
362 case "$enableval" in
363 yes) enable_static=yes ;;
364 no) enable_static=no ;;
365 *)
366 enable_static=no
367 # Look at the argument we got. We use all the common list separators.
368 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
369 for pkg in $enableval; do
370 if test "X$pkg" = "X$p"; then
371 enable_static=yes
372 fi
373 done
374 IFS="$ac_save_ifs"
375 ;;
376 esac],
377 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
378 ])
379
380 # AC_DISABLE_STATIC - set the default static flag to --disable-static
381 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
382 AC_ENABLE_STATIC(no)])
383
384
385 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
386 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
387 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
388 # `yes'.
389 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
390 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
391 AC_ARG_ENABLE(fast-install,
392 changequote(<<, >>)dnl
393 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
394 changequote([, ])dnl
395 [p=${PACKAGE-default}
396 case "$enableval" in
397 yes) enable_fast_install=yes ;;
398 no) enable_fast_install=no ;;
399 *)
400 enable_fast_install=no
401 # Look at the argument we got. We use all the common list separators.
402 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
403 for pkg in $enableval; do
404 if test "X$pkg" = "X$p"; then
405 enable_fast_install=yes
406 fi
407 done
408 IFS="$ac_save_ifs"
409 ;;
410 esac],
411 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
412 ])
413
414 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
415 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
416 AC_ENABLE_FAST_INSTALL(no)])
417
418 # AC_PROG_LD - find the path to the GNU or non-GNU linker
419 AC_DEFUN(AC_PROG_LD,
420 [AC_ARG_WITH(gnu-ld,
421 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
422 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
423 AC_REQUIRE([AC_PROG_CC])dnl
424 AC_REQUIRE([AC_CANONICAL_HOST])dnl
425 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
426 ac_prog=ld
427 if test "$ac_cv_prog_gcc" = yes; then
428 # Check if gcc -print-prog-name=ld gives a path.
429 AC_MSG_CHECKING([for ld used by GCC])
430 case $host in
431 *-*-mingw*)
432 # gcc leaves a trailing carriage return which upsets mingw
433 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
434 *)
435 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
436 esac
437 case "$ac_prog" in
438 # Accept absolute paths.
439 changequote(,)dnl
440 [\\/]* | [A-Za-z]:[\\/]*)
441 re_direlt='/[^/][^/]*/\.\./'
442 changequote([,])dnl
443 # Canonicalize the path of ld
444 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
445 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
446 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
447 done
448 test -z "$LD" && LD="$ac_prog"
449 ;;
450 "")
451 # If it fails, then pretend we aren't using GCC.
452 ac_prog=ld
453 ;;
454 *)
455 # If it is relative, then search for the first ld in PATH.
456 with_gnu_ld=unknown
457 ;;
458 esac
459 elif test "$with_gnu_ld" = yes; then
460 AC_MSG_CHECKING([for GNU ld])
461 else
462 AC_MSG_CHECKING([for non-GNU ld])
463 fi
464 AC_CACHE_VAL(ac_cv_path_LD,
465 [if test -z "$LD"; then
466 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
467 for ac_dir in $PATH; do
468 test -z "$ac_dir" && ac_dir=.
469 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
470 ac_cv_path_LD="$ac_dir/$ac_prog"
471 # Check to see if the program is GNU ld. I'd rather use --version,
472 # but apparently some GNU ld's only accept -v.
473 # Break only if it was the GNU/non-GNU ld that we prefer.
474 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
475 test "$with_gnu_ld" != no && break
476 else
477 test "$with_gnu_ld" != yes && break
478 fi
479 fi
480 done
481 IFS="$ac_save_ifs"
482 else
483 ac_cv_path_LD="$LD" # Let the user override the test with a path.
484 fi])
485 LD="$ac_cv_path_LD"
486 if test -n "$LD"; then
487 AC_MSG_RESULT($LD)
488 else
489 AC_MSG_RESULT(no)
490 fi
491 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
492 AC_SUBST(LD)
493 AC_PROG_LD_GNU
494 ])
495
496 AC_DEFUN(AC_PROG_LD_GNU,
497 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
498 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
499 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
500 ac_cv_prog_gnu_ld=yes
501 else
502 ac_cv_prog_gnu_ld=no
503 fi])
504 ])
505
506 # AC_PROG_NM - find the path to a BSD-compatible name lister
507 AC_DEFUN(AC_PROG_NM,
508 [AC_MSG_CHECKING([for BSD-compatible nm])
509 AC_CACHE_VAL(ac_cv_path_NM,
510 [if test -n "$NM"; then
511 # Let the user override the test.
512 ac_cv_path_NM="$NM"
513 else
514 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
515 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
516 test -z "$ac_dir" && ac_dir=.
517 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
518 # Check to see if the nm accepts a BSD-compat flag.
519 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
520 # nm: unknown option "B" ignored
521 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
522 ac_cv_path_NM="$ac_dir/nm -B"
523 break
524 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
525 ac_cv_path_NM="$ac_dir/nm -p"
526 break
527 else
528 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
529 continue # so that we can try to find one that supports BSD flags
530 fi
531 fi
532 done
533 IFS="$ac_save_ifs"
534 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
535 fi])
536 NM="$ac_cv_path_NM"
537 AC_MSG_RESULT([$NM])
538 AC_SUBST(NM)
539 ])
540
541 # AC_CHECK_LIBM - check for math library
542 AC_DEFUN(AC_CHECK_LIBM,
543 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
544 LIBM=
545 case "$host" in
546 *-*-beos* | *-*-cygwin*)
547 # These system don't have libm
548 ;;
549 *-ncr-sysv4.3*)
550 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
551 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
552 ;;
553 *)
554 AC_CHECK_LIB(m, main, LIBM="-lm")
555 ;;
556 esac
557 ])
558
559 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
560 # the libltdl convenience library, adds --enable-ltdl-convenience to
561 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
562 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
563 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
564 # '${top_builddir}/' (note the single quotes!) if your package is not
565 # flat, and, if you're not using automake, define top_builddir as
566 # appropriate in the Makefiles.
567 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
568 case "$enable_ltdl_convenience" in
569 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
570 "") enable_ltdl_convenience=yes
571 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
572 esac
573 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
574 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
575 ])
576
577 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
578 # the libltdl installable library, and adds --enable-ltdl-install to
579 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
580 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
581 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
582 # '${top_builddir}/' (note the single quotes!) if your package is not
583 # flat, and, if you're not using automake, define top_builddir as
584 # appropriate in the Makefiles.
585 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
586 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
587 AC_CHECK_LIB(ltdl, main,
588 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
589 [if test x"$enable_ltdl_install" = xno; then
590 AC_MSG_WARN([libltdl not installed, but installation disabled])
591 else
592 enable_ltdl_install=yes
593 fi
594 ])
595 if test x"$enable_ltdl_install" = x"yes"; then
596 ac_configure_args="$ac_configure_args --enable-ltdl-install"
597 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
598 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
599 else
600 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
601 LIBLTDL="-lltdl"
602 INCLTDL=
603 fi
604 ])
605
606 dnl old names
607 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
608 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
609 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
610 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
611 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
612 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
613 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
614
615 dnl This is just to silence aclocal about the macro not being used
616 ifelse([AC_DISABLE_FAST_INSTALL])dnl
617
618
619 dnl Thanks to Ingo Ruhnke <grumbel@gmx.de>
620 AC_DEFUN(MY_EXPAND_DIR, [
621 $1=$2
622 $1=`(
623 test "x$prefix" = xNONE && prefix=${ac_default_prefix}
624 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
625 eval echo \""[$]$1"\"
626 )`
627 ])
628
629
630 dnl AM_PROG_LEX
631 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
632 AC_DEFUN(AM_PROG_LEX,
633 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
634 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
635 AC_PROG_LEX
636 AC_DECL_YYTEXT])
637
638 # Do all the work for Automake. This macro actually does too much --
639 # some checks are only needed if your package does certain things.
640 # But this isn't really a big deal.
641
642 # serial 1
643
644 dnl Usage:
645 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
646
647 AC_DEFUN(AM_INIT_AUTOMAKE,
648 [AC_REQUIRE([AC_PROG_INSTALL])
649 PACKAGE=[$1]
650 AC_SUBST(PACKAGE)
651 VERSION=[$2]
652 AC_SUBST(VERSION)
653 dnl test to see if srcdir already configured
654 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
655 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
656 fi
657 ifelse([$3],,
658 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
659 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
660 AC_REQUIRE([AM_SANITY_CHECK])
661 AC_REQUIRE([AC_ARG_PROGRAM])
662 dnl FIXME This is truly gross.
663 missing_dir=`cd $ac_aux_dir && pwd`
664 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
665 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
666 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
667 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
668 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
669 AC_REQUIRE([AC_PROG_MAKE_SET])])
670
671 #
672 # Check to make sure that the build environment is sane.
673 #
674
675 AC_DEFUN(AM_SANITY_CHECK,
676 [AC_MSG_CHECKING([whether build environment is sane])
677 # Just in case
678 sleep 1
679 echo timestamp > conftestfile
680 # Do `set' in a subshell so we don't clobber the current shell's
681 # arguments. Must try -L first in case configure is actually a
682 # symlink; some systems play weird games with the mod time of symlinks
683 # (eg FreeBSD returns the mod time of the symlink's containing
684 # directory).
685 if (
686 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
687 if test "[$]*" = "X"; then
688 # -L didn't work.
689 set X `ls -t $srcdir/configure conftestfile`
690 fi
691 if test "[$]*" != "X $srcdir/configure conftestfile" \
692 && test "[$]*" != "X conftestfile $srcdir/configure"; then
693
694 # If neither matched, then we have a broken ls. This can happen
695 # if, for instance, CONFIG_SHELL is bash and it inherits a
696 # broken ls alias from the environment. This has actually
697 # happened. Such a system could not be considered "sane".
698 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
699 alias in your environment])
700 fi
701
702 test "[$]2" = conftestfile
703 )
704 then
705 # Ok.
706 :
707 else
708 AC_MSG_ERROR([newly created file is older than distributed files!
709 Check your system clock])
710 fi
711 rm -f conftest*
712 AC_MSG_RESULT(yes)])
713
714 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
715 dnl The program must properly implement --version.
716 AC_DEFUN(AM_MISSING_PROG,
717 [AC_MSG_CHECKING(for working $2)
718 # Run test in a subshell; some versions of sh will print an error if
719 # an executable is not found, even if stderr is redirected.
720 # Redirect stdin to placate older versions of autoconf. Sigh.
721 if ($2 --version) < /dev/null > /dev/null 2>&1; then
722 $1=$2
723 AC_MSG_RESULT(found)
724 else
725 $1="$3/missing $2"
726 AC_MSG_RESULT(missing)
727 fi
728 AC_SUBST($1)])
729
730 # Like AC_CONFIG_HEADER, but automatically create stamp file.
731
732 AC_DEFUN(AM_CONFIG_HEADER,
733 [AC_PREREQ([2.12])
734 AC_CONFIG_HEADER([$1])
735 dnl When config.status generates a header, we must update the stamp-h file.
736 dnl This file resides in the same directory as the config header
737 dnl that is generated. We must strip everything past the first ":",
738 dnl and everything past the last "/".
739 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
740 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
741 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
742 <<am_indx=1
743 for am_file in <<$1>>; do
744 case " <<$>>CONFIG_HEADERS " in
745 *" <<$>>am_file "*<<)>>
746 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
747 ;;
748 esac
749 am_indx=`expr "<<$>>am_indx" + 1`
750 done<<>>dnl>>)
751 changequote([,]))])
752
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
3 #
4 # This file is free software; you can redistribute it and/or modify it
5 # 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, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # 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 # As a special exception to the GNU General Public License, if you
19 # distribute this file as part of a program that contains a
20 # configuration script generated by Autoconf, you may include it under
21 # the same distribution terms that you use for the rest of that program.
22
23 # Written by Per Bothner <bothner@cygnus.com>.
24 # The master version of this file is at the FSF in /home/gd/gnu/lib.
25 #
26 # This script attempts to guess a canonical system name similar to
27 # config.sub. If it succeeds, it prints the system name on stdout, and
28 # exits with 0. Otherwise, it exits with 1.
29 #
30 # The plan is that this can be called by configure scripts if you
31 # don't specify an explicit system type (host/target name).
32 #
33 # Only a few systems have been added to this list; please add others
34 # (but try to keep the structure clean).
35 #
36
37 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
38 # (ghazi@noc.rutgers.edu 8/24/94.)
39 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
40 PATH=$PATH:/.attbin ; export PATH
41 fi
42
43 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
44 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
45 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
46 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
47
48 trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
49
50 # Note: order is significant - the case branches are not exclusive.
51
52 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
53 alpha:OSF1:*:*)
54 if test $UNAME_RELEASE = "V4.0"; then
55 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
56 fi
57 # A Vn.n version is a released version.
58 # A Tn.n version is a released field test version.
59 # A Xn.n version is an unreleased experimental baselevel.
60 # 1.2 uses "1.2" for uname -r.
61 cat <<EOF >dummy.s
62 .globl main
63 .ent main
64 main:
65 .frame \$30,0,\$26,0
66 .prologue 0
67 .long 0x47e03d80 # implver $0
68 lda \$2,259
69 .long 0x47e20c21 # amask $2,$1
70 srl \$1,8,\$2
71 sll \$2,2,\$2
72 sll \$0,3,\$0
73 addl \$1,\$0,\$0
74 addl \$2,\$0,\$0
75 ret \$31,(\$26),1
76 .end main
77 EOF
78 ${CC-cc} dummy.s -o dummy 2>/dev/null
79 if test "$?" = 0 ; then
80 ./dummy
81 case "$?" in
82 7)
83 UNAME_MACHINE="alpha"
84 ;;
85 15)
86 UNAME_MACHINE="alphaev5"
87 ;;
88 14)
89 UNAME_MACHINE="alphaev56"
90 ;;
91 10)
92 UNAME_MACHINE="alphapca56"
93 ;;
94 16)
95 UNAME_MACHINE="alphaev6"
96 ;;
97 esac
98 fi
99 rm -f dummy.s dummy
100 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
101 exit 0 ;;
102 21064:Windows_NT:50:3)
103 echo alpha-dec-winnt3.5
104 exit 0 ;;
105 Amiga*:UNIX_System_V:4.0:*)
106 echo m68k-cbm-sysv4
107 exit 0;;
108 amiga:NetBSD:*:*)
109 echo m68k-cbm-netbsd${UNAME_RELEASE}
110 exit 0 ;;
111 amiga:OpenBSD:*:*)
112 echo m68k-unknown-openbsd${UNAME_RELEASE}
113 exit 0 ;;
114 arc64:OpenBSD:*:*)
115 echo mips64el-unknown-openbsd${UNAME_RELEASE}
116 exit 0 ;;
117 arc:OpenBSD:*:*)
118 echo mipsel-unknown-openbsd${UNAME_RELEASE}
119 exit 0 ;;
120 hkmips:OpenBSD:*:*)
121 echo mips-unknown-openbsd${UNAME_RELEASE}
122 exit 0 ;;
123 pmax:OpenBSD:*:*)
124 echo mipsel-unknown-openbsd${UNAME_RELEASE}
125 exit 0 ;;
126 sgi:OpenBSD:*:*)
127 echo mips-unknown-openbsd${UNAME_RELEASE}
128 exit 0 ;;
129 wgrisc:OpenBSD:*:*)
130 echo mipsel-unknown-openbsd${UNAME_RELEASE}
131 exit 0 ;;
132 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
133 echo arm-acorn-riscix${UNAME_RELEASE}
134 exit 0;;
135 arm32:NetBSD:*:*)
136 echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
137 exit 0 ;;
138 SR2?01:HI-UX/MPP:*:*)
139 echo hppa1.1-hitachi-hiuxmpp
140 exit 0;;
141 Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
142 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
143 if test "`(/bin/universe) 2>/dev/null`" = att ; then
144 echo pyramid-pyramid-sysv3
145 else
146 echo pyramid-pyramid-bsd
147 fi
148 exit 0 ;;
149 NILE:*:*:dcosx)
150 echo pyramid-pyramid-svr4
151 exit 0 ;;
152 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
153 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
154 exit 0 ;;
155 i86pc:SunOS:5.*:*)
156 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
157 exit 0 ;;
158 sun4*:SunOS:6*:*)
159 # According to config.sub, this is the proper way to canonicalize
160 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
161 # it's likely to be more like Solaris than SunOS4.
162 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
163 exit 0 ;;
164 sun4*:SunOS:*:*)
165 case "`/usr/bin/arch -k`" in
166 Series*|S4*)
167 UNAME_RELEASE=`uname -v`
168 ;;
169 esac
170 # Japanese Language versions have a version number like `4.1.3-JL'.
171 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
172 exit 0 ;;
173 sun3*:SunOS:*:*)
174 echo m68k-sun-sunos${UNAME_RELEASE}
175 exit 0 ;;
176 sun*:*:4.2BSD:*)
177 UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
178 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
179 case "`/bin/arch`" in
180 sun3)
181 echo m68k-sun-sunos${UNAME_RELEASE}
182 ;;
183 sun4)
184 echo sparc-sun-sunos${UNAME_RELEASE}
185 ;;
186 esac
187 exit 0 ;;
188 aushp:SunOS:*:*)
189 echo sparc-auspex-sunos${UNAME_RELEASE}
190 exit 0 ;;
191 atari*:NetBSD:*:*)
192 echo m68k-atari-netbsd${UNAME_RELEASE}
193 exit 0 ;;
194 atari*:OpenBSD:*:*)
195 echo m68k-unknown-openbsd${UNAME_RELEASE}
196 exit 0 ;;
197 sun3*:NetBSD:*:*)
198 echo m68k-sun-netbsd${UNAME_RELEASE}
199 exit 0 ;;
200 sun3*:OpenBSD:*:*)
201 echo m68k-unknown-openbsd${UNAME_RELEASE}
202 exit 0 ;;
203 mac68k:NetBSD:*:*)
204 echo m68k-apple-netbsd${UNAME_RELEASE}
205 exit 0 ;;
206 mac68k:OpenBSD:*:*)
207 echo m68k-unknown-openbsd${UNAME_RELEASE}
208 exit 0 ;;
209 mvme68k:OpenBSD:*:*)
210 echo m68k-unknown-openbsd${UNAME_RELEASE}
211 exit 0 ;;
212 mvme88k:OpenBSD:*:*)
213 echo m88k-unknown-openbsd${UNAME_RELEASE}
214 exit 0 ;;
215 powerpc:machten:*:*)
216 echo powerpc-apple-machten${UNAME_RELEASE}
217 exit 0 ;;
218 RISC*:Mach:*:*)
219 echo mips-dec-mach_bsd4.3
220 exit 0 ;;
221 RISC*:ULTRIX:*:*)
222 echo mips-dec-ultrix${UNAME_RELEASE}
223 exit 0 ;;
224 VAX*:ULTRIX*:*:*)
225 echo vax-dec-ultrix${UNAME_RELEASE}
226 exit 0 ;;
227 2020:CLIX:*:*)
228 echo clipper-intergraph-clix${UNAME_RELEASE}
229 exit 0 ;;
230 mips:*:*:UMIPS | mips:*:*:RISCos)
231 sed 's/^ //' << EOF >dummy.c
232 int main (argc, argv) int argc; char **argv; {
233 #if defined (host_mips) && defined (MIPSEB)
234 #if defined (SYSTYPE_SYSV)
235 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
236 #endif
237 #if defined (SYSTYPE_SVR4)
238 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
239 #endif
240 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
241 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
242 #endif
243 #endif
244 exit (-1);
245 }
246 EOF
247 ${CC-cc} dummy.c -o dummy \
248 && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
249 && rm dummy.c dummy && exit 0
250 rm -f dummy.c dummy
251 echo mips-mips-riscos${UNAME_RELEASE}
252 exit 0 ;;
253 Night_Hawk:Power_UNIX:*:*)
254 echo powerpc-harris-powerunix
255 exit 0 ;;
256 m88k:CX/UX:7*:*)
257 echo m88k-harris-cxux7
258 exit 0 ;;
259 m88k:*:4*:R4*)
260 echo m88k-motorola-sysv4
261 exit 0 ;;
262 m88k:*:3*:R3*)
263 echo m88k-motorola-sysv3
264 exit 0 ;;
265 AViiON:dgux:*:*)
266 # DG/UX returns AViiON for all architectures
267 UNAME_PROCESSOR=`/usr/bin/uname -p`
268 if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
269 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
270 -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
271 echo m88k-dg-dgux${UNAME_RELEASE}
272 else
273 echo m88k-dg-dguxbcs${UNAME_RELEASE}
274 fi
275 else echo i586-dg-dgux${UNAME_RELEASE}
276 fi
277 exit 0 ;;
278 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
279 echo m88k-dolphin-sysv3
280 exit 0 ;;
281 M88*:*:R3*:*)
282 # Delta 88k system running SVR3
283 echo m88k-motorola-sysv3
284 exit 0 ;;
285 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
286 echo m88k-tektronix-sysv3
287 exit 0 ;;
288 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
289 echo m68k-tektronix-bsd
290 exit 0 ;;
291 *:IRIX*:*:*)
292 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
293 exit 0 ;;
294 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
295 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
296 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
297 i?86:AIX:*:*)
298 echo i386-ibm-aix
299 exit 0 ;;
300 *:AIX:2:3)
301 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
302 sed 's/^ //' << EOF >dummy.c
303 #include <sys/systemcfg.h>
304
305 main()
306 {
307 if (!__power_pc())
308 exit(1);
309 puts("powerpc-ibm-aix3.2.5");
310 exit(0);
311 }
312 EOF
313 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
314 rm -f dummy.c dummy
315 echo rs6000-ibm-aix3.2.5
316 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
317 echo rs6000-ibm-aix3.2.4
318 else
319 echo rs6000-ibm-aix3.2
320 fi
321 exit 0 ;;
322 *:AIX:*:4)
323 if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
324 IBM_ARCH=rs6000
325 else
326 IBM_ARCH=powerpc
327 fi
328 if [ -x /usr/bin/oslevel ] ; then
329 IBM_REV=`/usr/bin/oslevel`
330 else
331 IBM_REV=4.${UNAME_RELEASE}
332 fi
333 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
334 exit 0 ;;
335 *:AIX:*:*)
336 echo rs6000-ibm-aix
337 exit 0 ;;
338 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
339 echo romp-ibm-bsd4.4
340 exit 0 ;;
341 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
342 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
343 exit 0 ;; # report: romp-ibm BSD 4.3
344 *:BOSX:*:*)
345 echo rs6000-bull-bosx
346 exit 0 ;;
347 DPX/2?00:B.O.S.:*:*)
348 echo m68k-bull-sysv3
349 exit 0 ;;
350 9000/[34]??:4.3bsd:1.*:*)
351 echo m68k-hp-bsd
352 exit 0 ;;
353 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
354 echo m68k-hp-bsd4.4
355 exit 0 ;;
356 9000/[3478]??:HP-UX:*:*)
357 case "${UNAME_MACHINE}" in
358 9000/31? ) HP_ARCH=m68000 ;;
359 9000/[34]?? ) HP_ARCH=m68k ;;
360 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
361 9000/8?? ) HP_ARCH=hppa1.0 ;;
362 esac
363 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
364 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
365 exit 0 ;;
366 3050*:HI-UX:*:*)
367 sed 's/^ //' << EOF >dummy.c
368 #include <unistd.h>
369 int
370 main ()
371 {
372 long cpu = sysconf (_SC_CPU_VERSION);
373 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
374 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
375 results, however. */
376 if (CPU_IS_PA_RISC (cpu))
377 {
378 switch (cpu)
379 {
380 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
381 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
382 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
383 default: puts ("hppa-hitachi-hiuxwe2"); break;
384 }
385 }
386 else if (CPU_IS_HP_MC68K (cpu))
387 puts ("m68k-hitachi-hiuxwe2");
388 else puts ("unknown-hitachi-hiuxwe2");
389 exit (0);
390 }
391 EOF
392 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
393 rm -f dummy.c dummy
394 echo unknown-hitachi-hiuxwe2
395 exit 0 ;;
396 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
397 echo hppa1.1-hp-bsd
398 exit 0 ;;
399 9000/8??:4.3bsd:*:*)
400 echo hppa1.0-hp-bsd
401 exit 0 ;;
402 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
403 echo hppa1.1-hp-osf
404 exit 0 ;;
405 hp8??:OSF1:*:*)
406 echo hppa1.0-hp-osf
407 exit 0 ;;
408 i?86:OSF1:*:*)
409 if [ -x /usr/sbin/sysversion ] ; then
410 echo ${UNAME_MACHINE}-unknown-osf1mk
411 else
412 echo ${UNAME_MACHINE}-unknown-osf1
413 fi
414 exit 0 ;;
415 parisc*:Lites*:*:*)
416 echo hppa1.1-hp-lites
417 exit 0 ;;
418 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
419 echo c1-convex-bsd
420 exit 0 ;;
421 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
422 if getsysinfo -f scalar_acc
423 then echo c32-convex-bsd
424 else echo c2-convex-bsd
425 fi
426 exit 0 ;;
427 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
428 echo c34-convex-bsd
429 exit 0 ;;
430 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
431 echo c38-convex-bsd
432 exit 0 ;;
433 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
434 echo c4-convex-bsd
435 exit 0 ;;
436 CRAY*X-MP:*:*:*)
437 echo xmp-cray-unicos
438 exit 0 ;;
439 CRAY*Y-MP:*:*:*)
440 echo ymp-cray-unicos${UNAME_RELEASE}
441 exit 0 ;;
442 CRAY*[A-Z]90:*:*:*)
443 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
444 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
445 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
446 exit 0 ;;
447 CRAY*TS:*:*:*)
448 echo t90-cray-unicos${UNAME_RELEASE}
449 exit 0 ;;
450 CRAY-2:*:*:*)
451 echo cray2-cray-unicos
452 exit 0 ;;
453 F300:UNIX_System_V:*:*)
454 FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
455 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
456 echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
457 exit 0 ;;
458 F301:UNIX_System_V:*:*)
459 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
460 exit 0 ;;
461 hp3[0-9][05]:NetBSD:*:*)
462 echo m68k-hp-netbsd${UNAME_RELEASE}
463 exit 0 ;;
464 hp300:OpenBSD:*:*)
465 echo m68k-unknown-openbsd${UNAME_RELEASE}
466 exit 0 ;;
467 i?86:BSD/386:*:* | *:BSD/OS:*:*)
468 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
469 exit 0 ;;
470 *:FreeBSD:*:*)
471 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
472 exit 0 ;;
473 *:NetBSD:*:*)
474 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
475 exit 0 ;;
476 *:OpenBSD:*:*)
477 echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
478 exit 0 ;;
479 i*:CYGWIN*:*)
480 echo i386-pc-cygwin32
481 exit 0 ;;
482 i*:MINGW*:*)
483 echo i386-pc-mingw32
484 exit 0 ;;
485 p*:CYGWIN*:*)
486 echo powerpcle-unknown-cygwin32
487 exit 0 ;;
488 prep*:SunOS:5.*:*)
489 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
490 exit 0 ;;
491 *:GNU:*:*)
492 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
493 exit 0 ;;
494 *:Linux:*:*)
495 # The BFD linker knows what the default object file format is, so
496 # first see if it will tell us.
497 ld_help_string=`ld --help 2>&1`
498 ld_supported_emulations=`echo $ld_help_string \
499 | sed -ne '/supported emulations:/!d
500 s/[ ][ ]*/ /g
501 s/.*supported emulations: *//
502 s/ .*//
503 p'`
504 case "$ld_supported_emulations" in
505 i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
506 i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
507 sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
508 m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
509 elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
510 esac
511
512 if test "${UNAME_MACHINE}" = "alpha" ; then
513 sed 's/^ //' <<EOF >dummy.s
514 .globl main
515 .ent main
516 main:
517 .frame \$30,0,\$26,0
518 .prologue 0
519 .long 0x47e03d80 # implver $0
520 lda \$2,259
521 .long 0x47e20c21 # amask $2,$1
522 srl \$1,8,\$2
523 sll \$2,2,\$2
524 sll \$0,3,\$0
525 addl \$1,\$0,\$0
526 addl \$2,\$0,\$0
527 ret \$31,(\$26),1
528 .end main
529 EOF
530 LIBC=""
531 ${CC-cc} dummy.s -o dummy 2>/dev/null
532 if test "$?" = 0 ; then
533 ./dummy
534 case "$?" in
535 7)
536 UNAME_MACHINE="alpha"
537 ;;
538 15)
539 UNAME_MACHINE="alphaev5"
540 ;;
541 14)
542 UNAME_MACHINE="alphaev56"
543 ;;
544 10)
545 UNAME_MACHINE="alphapca56"
546 ;;
547 16)
548 UNAME_MACHINE="alphaev6"
549 ;;
550 esac
551
552 objdump --private-headers dummy | \
553 grep ld.so.1 > /dev/null
554 if test "$?" = 0 ; then
555 LIBC="libc1"
556 fi
557 fi
558 rm -f dummy.s dummy
559 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
560 elif test "${UNAME_MACHINE}" = "mips" ; then
561 cat >dummy.c <<EOF
562 main(argc, argv)
563 int argc;
564 char *argv[];
565 {
566 #ifdef __MIPSEB__
567 printf ("%s-unknown-linux-gnu\n", argv[1]);
568 #endif
569 #ifdef __MIPSEL__
570 printf ("%sel-unknown-linux-gnu\n", argv[1]);
571 #endif
572 return 0;
573 }
574 EOF
575 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
576 rm -f dummy.c dummy
577 else
578 # Either a pre-BFD a.out linker (linux-gnuoldld)
579 # or one that does not give us useful --help.
580 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
581 # If ld does not provide *any* "supported emulations:"
582 # that means it is gnuoldld.
583 echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
584 test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
585
586 case "${UNAME_MACHINE}" in
587 i?86)
588 VENDOR=pc;
589 ;;
590 *)
591 VENDOR=unknown;
592 ;;
593 esac
594 # Determine whether the default compiler is a.out or elf
595 cat >dummy.c <<EOF
596 #include <features.h>
597 main(argc, argv)
598 int argc;
599 char *argv[];
600 {
601 #ifdef __ELF__
602 # ifdef __GLIBC__
603 # if __GLIBC__ >= 2
604 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
605 # else
606 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
607 # endif
608 # else
609 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
610 # endif
611 #else
612 printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
613 #endif
614 return 0;
615 }
616 EOF
617 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
618 rm -f dummy.c dummy
619 fi ;;
620 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
621 # are messed up and put the nodename in both sysname and nodename.
622 i?86:DYNIX/ptx:4*:*)
623 echo i386-sequent-sysv4
624 exit 0 ;;
625 i?86:UNIX_SV:4.2MP:2.*)
626 # Unixware is an offshoot of SVR4, but it has its own version
627 # number series starting with 2...
628 # I am not positive that other SVR4 systems won't match this,
629 # I just have to hope. -- rms.
630 # Use sysv4.2uw... so that sysv4* matches it.
631 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
632 exit 0 ;;
633 i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
634 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
635 echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
636 else
637 echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
638 fi
639 exit 0 ;;
640 i?86:*:3.2:*)
641 if test -f /usr/options/cb.name; then
642 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
643 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
644 elif /bin/uname -X 2>/dev/null >/dev/null ; then
645 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
646 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
647 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
648 && UNAME_MACHINE=i586
649 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
650 else
651 echo ${UNAME_MACHINE}-pc-sysv32
652 fi
653 exit 0 ;;
654 pc:*:*:*)
655 # uname -m prints for DJGPP always 'pc', but it prints nothing about
656 # the processor, so we play safe by assuming i386.
657 echo i386-pc-msdosdjgpp
658 exit 0 ;;
659 Intel:Mach:3*:*)
660 echo i386-pc-mach3
661 exit 0 ;;
662 paragon:*:*:*)
663 echo i860-intel-osf1
664 exit 0 ;;
665 i860:*:4.*:*) # i860-SVR4
666 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
667 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
668 else # Add other i860-SVR4 vendors below as they are discovered.
669 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
670 fi
671 exit 0 ;;
672 mini*:CTIX:SYS*5:*)
673 # "miniframe"
674 echo m68010-convergent-sysv
675 exit 0 ;;
676 M68*:*:R3V[567]*:*)
677 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
678 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
679 OS_REL=''
680 test -r /etc/.relid \
681 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
682 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
683 && echo i486-ncr-sysv4.3${OS_REL} && exit 0
684 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
685 && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
686 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
687 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
688 && echo i486-ncr-sysv4 && exit 0 ;;
689 m68*:LynxOS:2.*:*)
690 echo m68k-unknown-lynxos${UNAME_RELEASE}
691 exit 0 ;;
692 mc68030:UNIX_System_V:4.*:*)
693 echo m68k-atari-sysv4
694 exit 0 ;;
695 i?86:LynxOS:2.*:*)
696 echo i386-unknown-lynxos${UNAME_RELEASE}
697 exit 0 ;;
698 TSUNAMI:LynxOS:2.*:*)
699 echo sparc-unknown-lynxos${UNAME_RELEASE}
700 exit 0 ;;
701 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
702 echo rs6000-unknown-lynxos${UNAME_RELEASE}
703 exit 0 ;;
704 SM[BE]S:UNIX_SV:*:*)
705 echo mips-dde-sysv${UNAME_RELEASE}
706 exit 0 ;;
707 RM*:SINIX-*:*:*)
708 echo mips-sni-sysv4
709 exit 0 ;;
710 *:SINIX-*:*:*)
711 if uname -p 2>/dev/null >/dev/null ; then
712 UNAME_MACHINE=`(uname -p) 2>/dev/null`
713 echo ${UNAME_MACHINE}-sni-sysv4
714 else
715 echo ns32k-sni-sysv
716 fi
717 exit 0 ;;
718 PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
719 # says <Richard.M.Bartel@ccMail.Census.GOV>
720 echo i586-unisys-sysv4
721 exit 0 ;;
722 *:UNIX_System_V:4*:FTX*)
723 # From Gerald Hewes <hewes@openmarket.com>.
724 # How about differentiating between stratus architectures? -djm
725 echo hppa1.1-stratus-sysv4
726 exit 0 ;;
727 *:*:*:FTX*)
728 # From seanf@swdc.stratus.com.
729 echo i860-stratus-sysv4
730 exit 0 ;;
731 mc68*:A/UX:*:*)
732 echo m68k-apple-aux${UNAME_RELEASE}
733 exit 0 ;;
734 news*:NEWS-OS:*:6*)
735 echo mips-sony-newsos6
736 exit 0 ;;
737 R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
738 if [ -d /usr/nec ]; then
739 echo mips-nec-sysv${UNAME_RELEASE}
740 else
741 echo mips-unknown-sysv${UNAME_RELEASE}
742 fi
743 exit 0 ;;
744 esac
745
746 #echo '(No uname command or uname output not recognized.)' 1>&2
747 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
748
749 cat >dummy.c <<EOF
750 #ifdef _SEQUENT_
751 # include <sys/types.h>
752 # include <sys/utsname.h>
753 #endif
754 main ()
755 {
756 #if defined (sony)
757 #if defined (MIPSEB)
758 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
759 I don't know.... */
760 printf ("mips-sony-bsd\n"); exit (0);
761 #else
762 #include <sys/param.h>
763 printf ("m68k-sony-newsos%s\n",
764 #ifdef NEWSOS4
765 "4"
766 #else
767 ""
768 #endif
769 ); exit (0);
770 #endif
771 #endif
772
773 #if defined (__arm) && defined (__acorn) && defined (__unix)
774 printf ("arm-acorn-riscix"); exit (0);
775 #endif
776
777 #if defined (hp300) && !defined (hpux)
778 printf ("m68k-hp-bsd\n"); exit (0);
779 #endif
780
781 #if defined (NeXT)
782 #if !defined (__ARCHITECTURE__)
783 #define __ARCHITECTURE__ "m68k"
784 #endif
785 int version;
786 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
787 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
788 exit (0);
789 #endif
790
791 #if defined (MULTIMAX) || defined (n16)
792 #if defined (UMAXV)
793 printf ("ns32k-encore-sysv\n"); exit (0);
794 #else
795 #if defined (CMU)
796 printf ("ns32k-encore-mach\n"); exit (0);
797 #else
798 printf ("ns32k-encore-bsd\n"); exit (0);
799 #endif
800 #endif
801 #endif
802
803 #if defined (__386BSD__)
804 printf ("i386-pc-bsd\n"); exit (0);
805 #endif
806
807 #if defined (sequent)
808 #if defined (i386)
809 printf ("i386-sequent-dynix\n"); exit (0);
810 #endif
811 #if defined (ns32000)
812 printf ("ns32k-sequent-dynix\n"); exit (0);
813 #endif
814 #endif
815
816 #if defined (_SEQUENT_)
817 struct utsname un;
818