mirror of
https://github.com/love2d/love-android.git
synced 2026-08-21 13:09:40 +02:00
added dependencies and build files (loosely inspired by Sebastian Dorda's love-native-android)
This commit is contained in:
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -0,0 +1,10 @@
|
||||
******************* Thu Sep 13 15:28:01 CEST 2001 ********************
|
||||
|
||||
* new option -S to play on start console only.
|
||||
* new option -c to play animationon any fb console
|
||||
* split fbmngplay to several files.
|
||||
|
||||
******************* Wed Sep 12 14:51:44 CEST 2001 ********************
|
||||
|
||||
* new option -p for dynamic positioning of the mng animation in the
|
||||
upper right corner.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
SHELL = /bin/sh
|
||||
CC = gcc
|
||||
|
||||
SOURCES = fbmngplay.c
|
||||
PROGRAMS = fbmngplay fbmngplay.static
|
||||
OBJECTS = fbmngplay.o messages.o mng.o console.o
|
||||
|
||||
LDFLAGS = -L/usr/lib
|
||||
LIBSS = /usr/lib/libmng-mini.a /usr/lib/libz.a -lm
|
||||
LIBSD = -lmng -lz -lm
|
||||
|
||||
CFLAGS = -Os -Wall -Wmissing-prototypes -Wstrict-prototypes -D_REENTRANT
|
||||
COMPILE = $(CC) $(CFLAGS)
|
||||
LINKS = $(CC) $(CFLAGS) $(LDFLAGS) -static -o $@
|
||||
LINKD = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
all: $(PROGRAMS)
|
||||
strip -s $(PROGRAMS)
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean:
|
||||
-rm -f *.o core
|
||||
clean: mostlyclean
|
||||
-rm -f fbmngplay fbmngplay.static
|
||||
|
||||
fbmngplay: $(OBJECTS)
|
||||
@rm -f fbmngplay
|
||||
$(LINKD) $(LDFLAGS) $(OBJECTS) $(LIBSD)
|
||||
fbmngplay.static: $(OBJECTS)
|
||||
@rm -f fbmngplay.static
|
||||
$(LINKS) $(LDFLAGS) $(OBJECTS) $(LIBSS)
|
||||
|
||||
.PHONY: mostlyclean clean fbmngplay fbmngplay.static all
|
||||
@@ -0,0 +1,30 @@
|
||||
* fbmngplay *
|
||||
|
||||
a simple fbcon based mng player
|
||||
|
||||
This is a simple example program, using the kernel framebuffer device
|
||||
to display mng animation decoded by the new libmng implementation.
|
||||
|
||||
This player is based on the SDL version included in the libmng package
|
||||
from Ralph Giles <giles@ashlu.bc.ca>. The code's fairly rough at this
|
||||
point, but there was no example player for *nix in the distribution.
|
||||
Patches welcome, of course.
|
||||
|
||||
On a unix-like system, the build instructions are simple:
|
||||
|
||||
(install and/or build the mng library from libmng.com)
|
||||
make
|
||||
make install
|
||||
|
||||
To use the player:
|
||||
|
||||
fbmngplay <filename>.mng <filename>.mng ...
|
||||
|
||||
To stop looping animations, press CTRL C or send a TERM or INT signal.
|
||||
|
||||
See the options with
|
||||
fbmngplay -h
|
||||
|
||||
---
|
||||
Stefan Reinauer, <stepan@suse.de>
|
||||
$Date: 2002/09/26 18:09:36 $
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
fbmngplay - fb console MNG player.
|
||||
(c) 2001 by Stefan Reinauer, <stepan :at: suse.de>
|
||||
|
||||
This program is based on mngplay, part of libmng, written and (C) by
|
||||
Ralph Giles <giles :at: ashlu.bc.ca>
|
||||
|
||||
This program my be redistributed under the terms of the
|
||||
GNU General Public Licence, version 2, or at your preference,
|
||||
any later version.
|
||||
|
||||
This file is based on getfd.c from the kbd package.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <linux/kd.h>
|
||||
#include <linux/vt.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "console.h"
|
||||
|
||||
int start_console = 0;
|
||||
|
||||
/*
|
||||
* getfd.c
|
||||
*
|
||||
* Get an fd for use with kbd/console ioctls.
|
||||
* We try several things because opening /dev/console will fail
|
||||
* if someone else used X (which does a chown on /dev/console).
|
||||
*/
|
||||
|
||||
static int
|
||||
is_a_console(const int fd) {
|
||||
char arg;
|
||||
|
||||
arg = 0;
|
||||
return (ioctl(fd, KDGKBTYPE, &arg) == 0
|
||||
&& ((arg == KB_101) || (arg == KB_84)));
|
||||
}
|
||||
|
||||
static int
|
||||
open_a_console(const char * const fnam) {
|
||||
int fd;
|
||||
|
||||
fd = open(fnam, O_RDONLY);
|
||||
if (fd < 0 && errno == EACCES)
|
||||
fd = open(fnam, O_WRONLY);
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
if (!is_a_console(fd)) {
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
||||
int getfd (const char * const nm) {
|
||||
int fd;
|
||||
|
||||
if (nm) {
|
||||
fd = open_a_console(nm);
|
||||
if (fd >= 0)
|
||||
return fd;
|
||||
} else {
|
||||
fd = open_a_console("/dev/tty");
|
||||
if (fd >= 0)
|
||||
return fd;
|
||||
|
||||
fd = open_a_console("/dev/tty0");
|
||||
if (fd >= 0)
|
||||
return fd;
|
||||
|
||||
fd = open_a_console("/dev/console");
|
||||
if (fd >= 0)
|
||||
return fd;
|
||||
|
||||
for (fd = 0; fd < 3; fd++)
|
||||
if (is_a_console(fd))
|
||||
return fd;
|
||||
}
|
||||
fprintf(stderr,
|
||||
"Couldnt get a file descriptor referring to the console\n");
|
||||
exit(1); /* total failure */
|
||||
}
|
||||
|
||||
int fd;
|
||||
int current_console(void)
|
||||
{
|
||||
struct vt_stat vtstat;
|
||||
if (ioctl(fd, VT_GETSTATE, &vtstat)) {
|
||||
fprintf(stderr,"fbmngplay: VT_GETSTATE\n");
|
||||
exit(1);
|
||||
}
|
||||
return vtstat.v_active;
|
||||
|
||||
}
|
||||
|
||||
void init_consoles(void)
|
||||
{
|
||||
// get current tty
|
||||
fd = getfd(0);
|
||||
start_console=current_console();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
fbmngplay - fb console MNG player.
|
||||
(c) 2001 by Stefan Reinauer, <stepan :at: suse.de>
|
||||
|
||||
This program is based on mngplay, part of libmng, written and (C) by
|
||||
Ralph Giles <giles :at: ashlu.bc.ca>
|
||||
|
||||
This program my be redistributed under the terms of the
|
||||
GNU General Public Licence, version 2, or at your preference,
|
||||
any later version.
|
||||
*/
|
||||
|
||||
#ifndef __CONSOLES_H
|
||||
#define __CONSOLES_H
|
||||
|
||||
extern int getfd(const char* const);
|
||||
extern void init_consoles(void);
|
||||
extern int current_console(void);
|
||||
extern int start_console;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
fbmngplay - fb console MNG player.
|
||||
(c) 2001 by Stefan Reinauer, <stepan :at: suse.de>
|
||||
|
||||
This program is based on mngplay, part of libmng, written and (C) by
|
||||
Ralph Giles <giles :at: ashlu.bc.ca>
|
||||
|
||||
This program my be redistributed under the terms of the
|
||||
GNU General Public Licence, version 2, or at your preference,
|
||||
any later version.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/fb.h>
|
||||
|
||||
#include "fbmngplay.h"
|
||||
#include "messages.h"
|
||||
#include "console.h"
|
||||
#include "mng.h"
|
||||
|
||||
volatile int run = 1;
|
||||
int verbose = 0;
|
||||
int buffered = 0;
|
||||
int dynpos = 0;
|
||||
int waitsignal = 0;
|
||||
int delta = 16;
|
||||
int sconly=0;
|
||||
|
||||
void sigint_handler(int signal);
|
||||
void sigterm_handler(int signal);
|
||||
void sigusr1_handler(int signal);
|
||||
|
||||
void sigint_handler(int signal)
|
||||
{
|
||||
run = 2;
|
||||
}
|
||||
|
||||
void sigterm_handler(int signal)
|
||||
{
|
||||
restore_area();
|
||||
run = 0;
|
||||
}
|
||||
|
||||
void sigusr1_handler(int signal)
|
||||
{
|
||||
run = 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int fbdev,c,option_index;
|
||||
unsigned int alpha;
|
||||
struct fb_var_screeninfo var;
|
||||
|
||||
/* Check which console we're running on */
|
||||
init_consoles();
|
||||
|
||||
/* allocate our stream data structure */
|
||||
mng = (mngstuff *) calloc(1, sizeof(*mng));
|
||||
if (mng == NULL) {
|
||||
fprintf(stderr, "could not allocate stream structure.\n");
|
||||
exit(0);
|
||||
}
|
||||
alpha = 100;
|
||||
mng->alpha = 100;
|
||||
mng->fbx = 15;
|
||||
mng->fby = 15;
|
||||
mng->background = NULL;
|
||||
|
||||
while (1) {
|
||||
static struct option long_options[] = {
|
||||
{"help", 0, 0, 'h'},
|
||||
{"verbose", 0, 0, 'v'},
|
||||
{"alpha", 1, 0, 'a'},
|
||||
{"buffered", 0, 0, 'b'},
|
||||
{"signal", 0, 0, 's'},
|
||||
{"delta", 0, 0, 'd'},
|
||||
{"position", 0, 0, 'p'},
|
||||
{"version", 0, 0, 'V'},
|
||||
{"start-console",0,0,'S'},
|
||||
{"console",1,0,'c'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
c = getopt_long(argc, argv, "a:x:y:bh?vsd:pVSc:",
|
||||
long_options, &option_index);
|
||||
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch (c) {
|
||||
case 'a':
|
||||
alpha = atoi(optarg);
|
||||
if (alpha > 100)
|
||||
alpha = 100;
|
||||
mng->alpha = alpha;
|
||||
break;
|
||||
case 'x':
|
||||
mng->fbx = atoi(optarg);
|
||||
break;
|
||||
case 'y':
|
||||
mng->fby = atoi(optarg);
|
||||
break;
|
||||
case 'd':
|
||||
delta = atoi(optarg);
|
||||
break;
|
||||
case '?':
|
||||
case 'h':
|
||||
usage(argv[0]);
|
||||
exit(0);
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
case 's':
|
||||
waitsignal = 1;
|
||||
break;
|
||||
case 'b':
|
||||
buffered = 1;
|
||||
break;
|
||||
case 'p':
|
||||
dynpos = 1;
|
||||
break;
|
||||
case 'V':
|
||||
version();
|
||||
exit(0);
|
||||
case 'c':
|
||||
start_console=atoi(optarg);
|
||||
case 'S':
|
||||
sconly=1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (optind >= argc) {
|
||||
printf("Which files do you want to play?\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
//init_consoles();
|
||||
|
||||
/* Initialize framebuffer */
|
||||
fbdev = open("/dev/fb0", O_RDWR);
|
||||
if (fbdev < 0) {
|
||||
fprintf(stderr, "error while opening framebuffer.\n");
|
||||
exit(fbdev);
|
||||
}
|
||||
|
||||
ioctl(fbdev, FBIOGET_VSCREENINFO, &var);
|
||||
mng->fbwidth = var.xres;
|
||||
mng->fbheight = var.yres;
|
||||
mng->fbbpp = var.bits_per_pixel;
|
||||
|
||||
mng->display =
|
||||
mmap(NULL, var.xres * var.yres * (var.bits_per_pixel >> 3),
|
||||
PROT_WRITE | PROT_READ, MAP_SHARED, fbdev, 0);
|
||||
|
||||
/* arrange to call the shutdown routine before we exit */
|
||||
atexit(&cleanup);
|
||||
|
||||
while (optind < argc) {
|
||||
// leftover arguements are filenames.
|
||||
mng->filename = argv[optind++];
|
||||
|
||||
/* set up the mng decoder for our stream */
|
||||
mng->mng = mng_initialize(mng, mngalloc, mngfree, MNG_NULL);
|
||||
if (mng->mng == MNG_NULL) {
|
||||
fprintf(stderr, "could not initialize libmng.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* set the callbacks */
|
||||
mng_setcb_errorproc(mng->mng, mngerror);
|
||||
mng_setcb_openstream(mng->mng, mngopenstream);
|
||||
mng_setcb_closestream(mng->mng, mngclosestream);
|
||||
mng_setcb_readdata(mng->mng, mngreadstream);
|
||||
mng_setcb_gettickcount(mng->mng, mnggetticks);
|
||||
mng_setcb_settimer(mng->mng, mngsettimer);
|
||||
mng_setcb_processheader(mng->mng, mngprocessheader);
|
||||
mng_setcb_getcanvasline(mng->mng, mnggetcanvasline);
|
||||
mng_setcb_refresh(mng->mng, mngrefresh);
|
||||
/* FIXME: should check for errors here */
|
||||
|
||||
signal(SIGINT, sigint_handler);
|
||||
signal(SIGTERM, sigterm_handler);
|
||||
|
||||
mng_readdisplay(mng->mng);
|
||||
|
||||
/* loop though the frames */
|
||||
while (mng->delay && run) {
|
||||
mdelay(mng->delay);
|
||||
mng->delay = 0;
|
||||
mng_display_resume(mng->mng);
|
||||
if (run == 2) {
|
||||
if (mng->alpha == 0)
|
||||
run = 0;
|
||||
mng->alpha -= delta;
|
||||
if (mng->alpha < 0)
|
||||
mng->alpha = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (waitsignal && optind < argc) {
|
||||
signal(SIGUSR1, sigusr1_handler);
|
||||
run = 1;
|
||||
while (run) {
|
||||
sleep(2);
|
||||
}
|
||||
}
|
||||
|
||||
memset(mng->copybuffer, 0,
|
||||
4 * mng->width * mng->height);
|
||||
run = 1;
|
||||
mng->alpha = alpha;
|
||||
if (optind == argc) { /* last file */
|
||||
restore_area();
|
||||
}
|
||||
}
|
||||
|
||||
/* cleanup and quit */
|
||||
return mngquit(mng->mng);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
fbmngplay - fb console MNG player.
|
||||
(c) 2001 by Stefan Reinauer, <stepan :at: suse.de>
|
||||
|
||||
This program is based on mngplay, part of libmng, written and (C) by
|
||||
Ralph Giles <giles :at: ashlu.bc.ca>
|
||||
|
||||
This program my be redistributed under the terms of the
|
||||
GNU General Public Licence, version 2, or at your preference,
|
||||
any later version.
|
||||
*/
|
||||
|
||||
#ifndef __FBMNGPLAY_H
|
||||
#define __FBMNGPLAY_H
|
||||
|
||||
#include <libmng.h>
|
||||
|
||||
#define FBMNGPLAY_VERSION "0.3"
|
||||
|
||||
/* structure for keeping track of our mng stream inside the callbacks */
|
||||
typedef struct {
|
||||
FILE *file; /* pointer to the file we're decoding */
|
||||
char *filename; /* pointer to the file's path/name */
|
||||
mng_uint32 delay; /* ticks to wait before resuming decode */
|
||||
unsigned char *display; /* pointer to display */
|
||||
unsigned char *copybuffer;
|
||||
unsigned char *background;
|
||||
mng_handle mng; /* mng handle */
|
||||
int width, height;
|
||||
int fbwidth, fbheight, fbbpp;
|
||||
int fbx, fby;
|
||||
int alpha;
|
||||
} mngstuff;
|
||||
|
||||
extern volatile int run;
|
||||
extern int verbose;
|
||||
extern int buffered;
|
||||
extern int dynpos;
|
||||
extern int waitsignal;
|
||||
extern int delta;
|
||||
extern int sconly;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
fbmngplay - fb console MNG player.
|
||||
(c) 2001 by Stefan Reinauer, <stepan :at: suse.de>
|
||||
|
||||
This program is based on mngplay, part of libmng, written and (C) by
|
||||
Ralph Giles <giles :at: ashlu.bc.ca>
|
||||
|
||||
This program my be redistributed under the terms of the
|
||||
GNU General Public Licence, version 2, or at your preference,
|
||||
any later version.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "fbmngplay.h"
|
||||
#include "messages.h"
|
||||
|
||||
void usage(char *name)
|
||||
{
|
||||
fprintf(stderr, "\nusage: %s [ -x <val> ] [ -y <val> ] [ -a <val> ] [-b] [-v]"
|
||||
" [-s] [file.mng [file.mng [...]]]\n", name);
|
||||
fprintf(stderr, "\n -x: x coordinate\n");
|
||||
fprintf(stderr, " -y: y coordinate\n");
|
||||
fprintf(stderr, " -a, --alpha: default alpha channel 1..100\n");
|
||||
fprintf(stderr, " -v, --verbose: verbose mode\n");
|
||||
fprintf(stderr, " -b, --buffered: buffered mode\n");
|
||||
fprintf(stderr, " -s, --signal: wait for SIGUSR1 between animations\n");
|
||||
fprintf(stderr, " -p, --position: dynamically select position\n");
|
||||
fprintf(stderr, " -V, --version: show version and exit\n");
|
||||
fprintf(stderr, " -?, -h, --help: print this help.\n\n");
|
||||
fprintf(stderr, " -S --start-console: only output animation on console it was started on.\n");
|
||||
}
|
||||
|
||||
void version(void)
|
||||
{
|
||||
fprintf(stderr, "fbmngplay v%s, Copyright (C) 2001 Stefan Reinauer\n",FBMNGPLAY_VERSION);
|
||||
fprintf(stderr, "fbmngplay comes with ABSOLUTELY NO WARRANTY;\n");
|
||||
fprintf(stderr,"This is free software, and you are welcome to redistribute it\n");
|
||||
fprintf(stderr,"under certain conditions; Check the GPL for details.\n");
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
fbmngplay - fb console MNG player.
|
||||
(c) 2001 by Stefan Reinauer, <stepan :at: suse.de>
|
||||
|
||||
This program is based on mngplay, part of libmng, written and (C) by
|
||||
Ralph Giles <giles :at: ashlu.bc.ca>
|
||||
|
||||
This program my be redistributed under the terms of the
|
||||
GNU General Public Licence, version 2, or at your preference,
|
||||
any later version.
|
||||
*/
|
||||
|
||||
#ifndef __MESSAGES_H
|
||||
#define __MESSAGES_H
|
||||
|
||||
extern void usage(char *name);
|
||||
extern void version(void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,398 @@
|
||||
/*
|
||||
fbmngplay - fb console MNG player.
|
||||
(c) 2001 by Stefan Reinauer, <stepan :at: suse.de>
|
||||
|
||||
This program is based on mngplay, part of libmng, written and (C) by
|
||||
Ralph Giles <giles :at: ashlu.bc.ca>
|
||||
|
||||
This program my be redistributed under the terms of the
|
||||
GNU General Public Licence, version 2, or at your preference,
|
||||
any later version.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <linux/vt.h>
|
||||
|
||||
#include "fbmngplay.h"
|
||||
#include "console.h"
|
||||
#include "mng.h"
|
||||
|
||||
mngstuff *mng;
|
||||
unsigned char *bufferstream;
|
||||
unsigned long bufferpos = 0, buffersize = 0;
|
||||
|
||||
inline void mdelay(unsigned long msec)
|
||||
{
|
||||
usleep(msec * 1000);
|
||||
}
|
||||
|
||||
/* callbacks for the mng decoder */
|
||||
|
||||
/* memory allocation; data must be zeroed */
|
||||
mng_ptr mngalloc(mng_uint32 size)
|
||||
{
|
||||
return (mng_ptr) calloc(1, size);
|
||||
}
|
||||
|
||||
/* memory deallocation */
|
||||
void mngfree(mng_ptr p, mng_uint32 size)
|
||||
{
|
||||
free(p);
|
||||
return;
|
||||
}
|
||||
|
||||
mng_bool mngopenstream(mng_handle mng)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
|
||||
/* look up our stream struct */
|
||||
mymng = (mngstuff *) mng_get_userdata(mng);
|
||||
|
||||
/* open the file */
|
||||
mymng->file = fopen(mymng->filename, "rb");
|
||||
if (mymng->file == NULL) {
|
||||
fprintf(stderr, "unable to open '%s'\n", mymng->filename);
|
||||
run = 0;
|
||||
return MNG_FALSE;
|
||||
}
|
||||
|
||||
if (buffered) {
|
||||
unsigned long len;
|
||||
fseek(mymng->file, 0, SEEK_END);
|
||||
len = ftell(mymng->file);
|
||||
rewind(mymng->file);
|
||||
bufferstream = malloc(len);
|
||||
if (!bufferstream) {
|
||||
/* Not enough memory for buffers
|
||||
* -> we go back to unbuffered mode
|
||||
*/
|
||||
printf("Reverted to non buffered mode.\n");
|
||||
buffered = 0;
|
||||
return MNG_TRUE;
|
||||
}
|
||||
buffersize = len;
|
||||
fread(bufferstream, 1, len, mymng->file);
|
||||
bufferpos = 0;
|
||||
fclose(mymng->file);
|
||||
mymng->file = NULL;
|
||||
}
|
||||
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
mng_bool mngclosestream(mng_handle mng)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
|
||||
/* look up our stream struct */
|
||||
mymng = (mngstuff *) mng_get_userdata(mng);
|
||||
|
||||
/* close the file */
|
||||
if (mymng->file)
|
||||
fclose(mymng->file);
|
||||
mymng->file = NULL; /* for safety */
|
||||
|
||||
if (bufferstream) {
|
||||
free(bufferstream);
|
||||
bufferstream = 0;
|
||||
buffersize = 0;
|
||||
bufferpos = 0;
|
||||
}
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
/* feed data to the decoder */
|
||||
mng_bool mngreadstream(mng_handle mng, mng_ptr buffer,
|
||||
mng_uint32 size, mng_uint32 * bytesread)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
|
||||
/* look up our stream struct */
|
||||
mymng = (mngstuff *) mng_get_userdata(mng);
|
||||
if (!buffered) {
|
||||
/* read the requested amount of data from the file */
|
||||
*bytesread = fread(buffer, 1, size, mymng->file);
|
||||
} else {
|
||||
*bytesread = (buffersize - bufferpos) <
|
||||
size ? (buffersize - bufferpos) : size;
|
||||
memcpy(buffer, bufferstream + bufferpos, *bytesread);
|
||||
bufferpos += (*bytesread);
|
||||
}
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
/* the header's been read. set up the display stuff */
|
||||
mng_bool mngprocessheader(mng_handle mng,
|
||||
mng_uint32 width, mng_uint32 height)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
unsigned char *copybuffer, *background;
|
||||
unsigned char *src;
|
||||
|
||||
mymng = (mngstuff *) mng_get_userdata(mng);
|
||||
mymng->width = width;
|
||||
mymng->height = height;
|
||||
|
||||
if (dynpos) {
|
||||
mymng->fbx = (mymng->fbwidth)-width-15;
|
||||
switch (mymng->fbheight) {
|
||||
case 768:
|
||||
mymng->fby = 15;
|
||||
break;
|
||||
case 1024:
|
||||
mymng->fby = 30;
|
||||
break;
|
||||
default:
|
||||
mymng->fby = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
copybuffer = (unsigned char *) malloc(width * height * 4);
|
||||
if (copybuffer == NULL) {
|
||||
fprintf(stderr, "could not allocate copy buffer.\n");
|
||||
exit(0);
|
||||
}
|
||||
mymng->copybuffer = copybuffer;
|
||||
|
||||
if (!mymng->background) {
|
||||
background =
|
||||
(unsigned char *) malloc(width * height *
|
||||
(mymng->fbbpp >> 3));
|
||||
if (background == NULL) {
|
||||
fprintf(stderr,
|
||||
"could not allocate background buffer.\n");
|
||||
exit(0);
|
||||
}
|
||||
mymng->background = background;
|
||||
|
||||
src = mymng->display + (mymng->fbwidth * mymng->fby +
|
||||
mymng->fbx) * (mymng->fbbpp >> 3);
|
||||
|
||||
while (height--) {
|
||||
memcpy(background, src,
|
||||
width * (mymng->fbbpp >> 3));
|
||||
background += width * (mymng->fbbpp >> 3);
|
||||
src += mymng->fbwidth * (mymng->fbbpp >> 3);
|
||||
}
|
||||
}
|
||||
/* tell the mng decoder about our bit-depth choice */
|
||||
/* FIXME: this works on intel. is it correct in general? */
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_BGRA8);
|
||||
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
/* return a row pointer for the decoder to fill */
|
||||
mng_ptr mnggetcanvasline(mng_handle mng, mng_uint32 line)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
mng_ptr row;
|
||||
|
||||
/* dereference our structure */
|
||||
mymng = (mngstuff *) mng_get_userdata(mng);
|
||||
|
||||
/* we assume any necessary locking has happened
|
||||
outside, in the frame level code */
|
||||
row = mymng->copybuffer + mymng->width * 4 * line;
|
||||
|
||||
return (row);
|
||||
}
|
||||
|
||||
/* timer */
|
||||
mng_uint32 mnggetticks(mng_handle mng)
|
||||
{
|
||||
mng_uint32 ticks;
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
|
||||
gettimeofday(&tv, &tz);
|
||||
ticks = (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
|
||||
|
||||
return (ticks);
|
||||
}
|
||||
|
||||
static inline void copyline(unsigned char *dest, unsigned char *src,
|
||||
unsigned char *background, mngstuff * mymng)
|
||||
{
|
||||
// BGRA8
|
||||
unsigned int i = mymng->width;
|
||||
unsigned int fr, fg, fb, br, bg, bb, r, g, b, a;
|
||||
unsigned short output, input;
|
||||
|
||||
while (i--) {
|
||||
fb = *src++;
|
||||
fg = *src++;
|
||||
fr = *src++;
|
||||
|
||||
a = *src++;
|
||||
a = a * mymng->alpha / 100;
|
||||
switch (mymng->fbbpp) {
|
||||
case 16:
|
||||
input = *((unsigned short *) background)++;
|
||||
br = (input >> 8) & 0xf8;
|
||||
bg = (input >> 3) & 0xfc;
|
||||
bb = input << 3 & 0xff;
|
||||
break;
|
||||
case 24:
|
||||
bb = *background++;
|
||||
bg = *background++;
|
||||
br = *background++;
|
||||
break;
|
||||
case 32:
|
||||
bb = *background++;
|
||||
bg = *background++;
|
||||
br = *background++;
|
||||
background++;
|
||||
break;
|
||||
default:
|
||||
br = 0;
|
||||
bg = 0;
|
||||
bb = 0;
|
||||
printf("depth not supported.\n");
|
||||
run = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
r = ((fr * a) + (br * (0x100 - a))) >> 8;
|
||||
g = ((fg * a) + (bg * (0x100 - a))) >> 8;
|
||||
b = ((fb * a) + (bb * (0x100 - a))) >> 8;
|
||||
|
||||
switch (mymng->fbbpp) {
|
||||
case 16:
|
||||
// dumb 24->16 bit conversion.
|
||||
r >>= 3;
|
||||
g >>= 2;
|
||||
b >>= 3;
|
||||
|
||||
output = (r << 11) | (g << 5) | b;
|
||||
*((unsigned short *) dest)++ = output;
|
||||
break;
|
||||
case 24:
|
||||
*dest++ = b;
|
||||
*dest++ = g;
|
||||
*dest++ = r;
|
||||
break;
|
||||
case 32:
|
||||
*dest++ = b;
|
||||
*dest++ = g;
|
||||
*dest++ = r;
|
||||
dest++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mng_bool mngrefresh(mng_handle mng, mng_uint32 x, mng_uint32 y,
|
||||
mng_uint32 w, mng_uint32 h)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
unsigned char *dest, *src, *background;
|
||||
|
||||
if (sconly && current_console()!=start_console)
|
||||
return MNG_TRUE;
|
||||
|
||||
/* dereference our structure */
|
||||
mymng = (mngstuff *) mng_get_userdata(mng);
|
||||
|
||||
dest = mymng->display + ((mymng->fby * mymng->fbwidth + mymng->fbx)
|
||||
* (mymng->fbbpp >> 3));
|
||||
src = mymng->copybuffer;
|
||||
background = mymng->background;
|
||||
/* refresh the screen with the new frame */
|
||||
while (h-- > 0) {
|
||||
copyline(dest, src, background, mymng);
|
||||
dest += mymng->fbwidth * (mymng->fbbpp >> 3);
|
||||
background += mymng->width * (mymng->fbbpp >> 3);
|
||||
src += 4 * mymng->width; // 4 bytes per pixel due to RGBA
|
||||
}
|
||||
|
||||
// remove traces
|
||||
memset(mymng->copybuffer, 0, 4 * mymng->width * mymng->height);
|
||||
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
/* interframe delay callback */
|
||||
mng_bool mngsettimer(mng_handle mng, mng_uint32 msecs)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
|
||||
/* look up our stream struct */
|
||||
mymng = (mngstuff *) mng_get_userdata(mng);
|
||||
|
||||
/* set the timer for when the decoder wants to be woken */
|
||||
mymng->delay = msecs;
|
||||
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
mng_bool mngerror(mng_handle mng, mng_int32 code, mng_int8 severity,
|
||||
mng_chunkid chunktype, mng_uint32 chunkseq,
|
||||
mng_int32 extra1, mng_int32 extra2, mng_pchar text)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
char chunk[5];
|
||||
|
||||
/* dereference our data so we can get the filename */
|
||||
mymng = (mngstuff *) mng_get_userdata(mng);
|
||||
/* pull out the chuck type as a string */
|
||||
// FIXME: does this assume unsigned char?
|
||||
chunk[0] = (char) ((chunktype >> 24) & 0xFF);
|
||||
chunk[1] = (char) ((chunktype >> 16) & 0xFF);
|
||||
chunk[2] = (char) ((chunktype >> 8) & 0xFF);
|
||||
chunk[3] = (char) ((chunktype) & 0xFF);
|
||||
chunk[4] = '\0';
|
||||
|
||||
/* output the error */
|
||||
fprintf(stderr, "error playing '%s' chunk %s (%d):\n",
|
||||
mymng->filename, chunk, chunkseq);
|
||||
fprintf(stderr, "%s\n", text);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mngquit(mng_handle mng)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
|
||||
/* dereference our data so we can free it */
|
||||
mymng = (mngstuff *) mng_get_userdata(mng);
|
||||
|
||||
/* cleanup. this will call mymngclosestream */
|
||||
mng_cleanup(&mng);
|
||||
|
||||
/* free our data */
|
||||
free(mymng);
|
||||
/* quit */
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void cleanup(void)
|
||||
{
|
||||
mngquit(mng->mng);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void restore_area(void)
|
||||
{
|
||||
int height, width;
|
||||
unsigned char *dest, *background;
|
||||
|
||||
if (sconly && current_console()!=start_console)
|
||||
return;
|
||||
|
||||
background = mng->background;
|
||||
height = mng->height;
|
||||
width = mng->width;
|
||||
dest = mng->display + (mng->fbwidth * mng->fby +
|
||||
mng->fbx) * (mng->fbbpp >> 3);
|
||||
while (height--) {
|
||||
memcpy(dest, background, width * (mng->fbbpp >> 3));
|
||||
background += width * (mng->fbbpp >> 3);
|
||||
dest += mng->fbwidth * (mng->fbbpp >> 3);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
fbmngplay - fb console MNG player.
|
||||
(c) 2001 by Stefan Reinauer, <stepan :at: suse.de>
|
||||
|
||||
This program is based on mngplay, part of libmng, written and (C) by
|
||||
Ralph Giles <giles :at: ashlu.bc.ca>
|
||||
|
||||
This program my be redistributed under the terms of the
|
||||
GNU General Public Licence, version 2, or at your preference,
|
||||
any later version.
|
||||
*/
|
||||
|
||||
#ifndef __HOOKS_H
|
||||
#define __HOOKS_H
|
||||
|
||||
#include "fbmngplay.h"
|
||||
|
||||
extern mngstuff *mng;
|
||||
|
||||
extern inline void mdelay(unsigned long msec);
|
||||
extern mng_ptr mngalloc(mng_uint32 size);
|
||||
extern void mngfree(mng_ptr p, mng_uint32 size);
|
||||
extern mng_bool mngopenstream(mng_handle mng);
|
||||
extern mng_bool mngclosestream(mng_handle mng);
|
||||
extern mng_bool mngreadstream( mng_handle mng, mng_ptr buffer, mng_uint32 size, mng_uint32 * bytesread);
|
||||
extern mng_bool mngprocessheader( mng_handle mng, mng_uint32 width, mng_uint32 height);
|
||||
extern mng_ptr mnggetcanvasline(mng_handle mng, mng_uint32 line);
|
||||
extern mng_uint32 mnggetticks(mng_handle mng);
|
||||
extern mng_bool mngrefresh(mng_handle mng, mng_uint32 x, mng_uint32 y, mng_uint32 w, mng_uint32 h);
|
||||
extern mng_bool mngsettimer(mng_handle mng, mng_uint32 msecs);
|
||||
extern mng_bool mngerror(mng_handle mng, mng_int32 code, mng_int8 severity,
|
||||
mng_chunkid chunktype, mng_uint32 chunkseq,
|
||||
mng_int32 extra1, mng_int32 extra2, mng_pchar text);
|
||||
extern int mngquit(mng_handle mng);
|
||||
extern void cleanup(void);
|
||||
extern void restore_area(void);
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
dummy
|
||||
|
||||
@@ -0,0 +1,481 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
@@ -0,0 +1,29 @@
|
||||
LIBMNG_PREFIX = /usr/local
|
||||
|
||||
CC = gcc
|
||||
|
||||
CFLAGS = -g -O2 -Wall \
|
||||
`pkg-config --cflags gtk+-2.0` \
|
||||
-I$(LIBMNG_PREFIX)/include
|
||||
|
||||
LIBS = `pkg-config --libs gtk+-2.0` \
|
||||
-L$(LIBMNG_PREFIX)/lib -lmng -ljpeg -llcms -lz
|
||||
|
||||
OBJ = dummy.o \
|
||||
gtk-mng-view.o
|
||||
|
||||
EXE_BASENAME=gmngview
|
||||
|
||||
all: $(EXE_BASENAME)
|
||||
|
||||
$(EXE_BASENAME): $(OBJ)
|
||||
$(CC) -o $(EXE_BASENAME) $(OBJ) $(LIBS)
|
||||
|
||||
#$(EXE_BASENAME)-static: $(OBJ)
|
||||
# $(CC) -static -o $(EXE_BASENAME)-static $(OBJ) $(LIBS)
|
||||
|
||||
.c.o: gtk-mng-view.h
|
||||
$(CC) -c $(CFLAGS) $<
|
||||
|
||||
clean:
|
||||
rm -f core $(EXE_BASENAME) $(EXE_BASENAME)-static $(OBJ)
|
||||
@@ -0,0 +1,38 @@
|
||||
From dummy.c:
|
||||
|
||||
/*
|
||||
* Very simple program, that has been used by us
|
||||
* (V. Babin <babin@users.sourceforge.net> and
|
||||
* S. Kondrat <valiska@users.sourceforge.net>)
|
||||
* during toying with libmng (http://www.limng.com)
|
||||
*
|
||||
* License: GPL :-))
|
||||
*
|
||||
* 7 July 2001: added key-press/button-press handling to exit viewer without
|
||||
* window-manager help; added libmng version info [Greg Roelofs]
|
||||
*/
|
||||
|
||||
From gtk-mng-view.c:
|
||||
|
||||
/* Toy widget for GTK+ for displaying MNG animations.
|
||||
*
|
||||
* Copyright (C) 2000 The Free Software Foundation
|
||||
*
|
||||
* Author(s): Volodymyr Babin <vb@dwuj.ichf.edu.pl>
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Require:
|
||||
|
||||
* gtk+ >= 1.2.0 (tested on 1.2.8)
|
||||
* libmng (tested on 0.9.2)
|
||||
|
||||
You have specify Your libmng instalation prefix
|
||||
before typing `make' in the first line of a Makefile
|
||||
in this directory. Later type `make'.
|
||||
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* Very simple program, that has been used by us
|
||||
* (V. Babin <babin :at: users.sourceforge.net> and
|
||||
* S. Kondrat <valiska :at: users.sourceforge.net>)
|
||||
* during toying with libmng (http://www.libmng.com)
|
||||
*
|
||||
* License: GPL :-))
|
||||
*
|
||||
* 7 July 2001: added key-press/button-press handling to exit viewer without
|
||||
* window-manager help; added libmng version info [Greg Roelofs]
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtk-mng-view.h"
|
||||
|
||||
#define BLOCK_SIZE 4096
|
||||
|
||||
static guint
|
||||
read_file (const gchar* file_name, guchar ** ptr)
|
||||
{
|
||||
gint fd;
|
||||
guint size = 0;
|
||||
guint bytes_read = 0;
|
||||
|
||||
if ((fd = open (file_name, O_RDONLY)) == -1)
|
||||
{
|
||||
perror (file_name);
|
||||
* ptr = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
* ptr = g_new (guchar, BLOCK_SIZE);
|
||||
while ((bytes_read = read (fd, * ptr + size, BLOCK_SIZE)))
|
||||
{
|
||||
size += bytes_read;
|
||||
* ptr = (guchar *) g_realloc (* ptr, size + BLOCK_SIZE);
|
||||
}
|
||||
close (fd);
|
||||
|
||||
* ptr = (guchar *) g_realloc (* ptr, size);
|
||||
return size;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char ** argv)
|
||||
{
|
||||
GtkMngView * mng_view;
|
||||
GtkWidget * window;
|
||||
GtkWidget * align;
|
||||
GtkWidget * frame;
|
||||
guchar * mng_data = NULL;
|
||||
guint mng_data_size;
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
g_print ("Usage: %s <file.mng>\n\n", argv[0]);
|
||||
|
||||
g_print (" Compiled with GTK+ %d.%d.%d; using GTK+ %d.%d.%d.\n",
|
||||
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION,
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
#ifdef GDK_PIXBUF_VERSION
|
||||
g_print (" Compiled with gdk-pixbuf %s; using gdk-pixbuf %s.\n",
|
||||
GDK_PIXBUF_VERSION, gdk_pixbuf_version);
|
||||
#endif
|
||||
g_print (" Compiled with libmng %s; using libmng %s.\n",
|
||||
MNG_VERSION_TEXT, mng_version_text());
|
||||
g_print (" Compiled with zlib %s; using zlib %s.\n",
|
||||
ZLIB_VERSION, zlib_version);
|
||||
#ifdef JPEG_LIB_VERSION
|
||||
{
|
||||
int major = JPEG_LIB_VERSION / 10;
|
||||
int minor = JPEG_LIB_VERSION % 10;
|
||||
char minoralpha[2];
|
||||
|
||||
if (minor)
|
||||
{
|
||||
minoralpha[0] = (char)(minor - 1 + 'a');
|
||||
minoralpha[1] = '\0';
|
||||
}
|
||||
else
|
||||
minoralpha[0] = '\0';
|
||||
g_print (" Compiled with libjpeg %d%s.\n", major, minoralpha);
|
||||
}
|
||||
#endif
|
||||
g_print ("\nPress Esc or Q, or click mouse button, to quit.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
mng_data_size = read_file (* (argv + 1), &mng_data);
|
||||
|
||||
if (mng_data == NULL)
|
||||
return 1;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gdk_rgb_init ();
|
||||
gdk_rgb_set_verbose (TRUE);
|
||||
gtk_widget_set_default_visual (gdk_rgb_get_visual ());
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_cmap ());
|
||||
|
||||
window = gtk_widget_new (GTK_TYPE_WINDOW,
|
||||
"GtkWindow::type", GTK_WINDOW_TOPLEVEL,
|
||||
"GtkWindow::title", "MNG animation",
|
||||
"GtkContainer::border_width", 5,
|
||||
NULL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
|
||||
|
||||
/* any keypress (e.g., Esc or Q) or mouse-button click will quit viewer */
|
||||
gtk_signal_connect (GTK_OBJECT (window), "key_press_event",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
|
||||
gtk_widget_add_events(window, GDK_BUTTON_PRESS_MASK);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
|
||||
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_container_add (GTK_CONTAINER (window), align);
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_container_add (GTK_CONTAINER (align), frame);
|
||||
|
||||
/* actually it */
|
||||
mng_view = GTK_MNG_VIEW (gtk_mng_view_new ());
|
||||
gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (mng_view));
|
||||
|
||||
gtk_mng_view_load_mng_from_memory (mng_view, mng_data, mng_data_size);
|
||||
g_free (mng_data);
|
||||
|
||||
/* rest in piece */
|
||||
gtk_widget_show_all (window);
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,471 @@
|
||||
/* Toy widget for GTK+ for displaying MNG animations.
|
||||
*
|
||||
* Copyright (C) 2000 The Free Software Foundation
|
||||
*
|
||||
* Author(s): Volodymyr Babin <vb :at: dwuj.ichf.edu.pl>
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <gtk/gtkmain.h>
|
||||
#include "gtk-mng-view.h"
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
/* MNG callbacks */
|
||||
|
||||
static mng_ptr
|
||||
mng_malloc_callback (mng_size_t how_many)
|
||||
{
|
||||
return (mng_ptr) g_new0 (gchar, how_many);
|
||||
}
|
||||
|
||||
static void
|
||||
mng_free_callback (mng_ptr pointer, mng_size_t number)
|
||||
{
|
||||
g_free (pointer);
|
||||
}
|
||||
|
||||
static mng_bool
|
||||
mng_open_stream_callback (mng_handle mng_h)
|
||||
{
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
static mng_bool
|
||||
mng_close_stream_callback (mng_handle mng_h)
|
||||
{
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
static mng_bool
|
||||
mng_read_data_callback (mng_handle mng_h,
|
||||
mng_ptr buffer,
|
||||
mng_uint32 bytes_requested,
|
||||
mng_uint32 * bytes_read)
|
||||
{
|
||||
guint available_mng_food;
|
||||
|
||||
GtkMngView * mng_view = GTK_MNG_VIEW (mng_get_userdata (mng_h));
|
||||
|
||||
available_mng_food = mng_view->bytes_to_eat - mng_view->bytes_eaten;
|
||||
if (available_mng_food > 0 && mng_view->mng_food != NULL)
|
||||
{
|
||||
* bytes_read = (mng_uint32) MIN ((mng_uint32) available_mng_food, bytes_requested);
|
||||
memcpy (buffer, mng_view->mng_food + mng_view->bytes_eaten, * bytes_read);
|
||||
mng_view->bytes_eaten += * bytes_read;
|
||||
return MNG_TRUE;
|
||||
}
|
||||
else
|
||||
return MNG_FALSE;
|
||||
}
|
||||
|
||||
static mng_bool
|
||||
mng_process_header_callback (mng_handle mng_h,
|
||||
mng_uint32 width,
|
||||
mng_uint32 height)
|
||||
{
|
||||
GtkMngView * mng_view;
|
||||
|
||||
mng_view = GTK_MNG_VIEW (mng_get_userdata (mng_h));
|
||||
|
||||
mng_view->width = width;
|
||||
mng_view->height = height;
|
||||
|
||||
g_free (mng_view->MNG_drawing_buffer);
|
||||
mng_view->MNG_drawing_buffer = g_new0 (guchar, 3 * width * height);
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (mng_view));
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_mng_view_animator (GtkMngView * mng_view)
|
||||
{
|
||||
mng_retcode retcode;
|
||||
|
||||
retcode = mng_display_resume (mng_view->MNG_handle);
|
||||
|
||||
if (retcode == MNG_NOERROR)
|
||||
{
|
||||
mng_view->timeout_ID = 0;
|
||||
return FALSE;
|
||||
}
|
||||
else if (retcode == MNG_NEEDTIMERWAIT)
|
||||
return FALSE;
|
||||
else
|
||||
g_warning ("mng_display_resume() return not good value");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static mng_bool
|
||||
mng_set_timer_callback (mng_handle mng_h,
|
||||
mng_uint32 delay)
|
||||
{
|
||||
GtkMngView * mng_view;
|
||||
|
||||
mng_view = GTK_MNG_VIEW (mng_get_userdata (mng_h));
|
||||
mng_view->timeout_ID = gtk_timeout_add (delay,
|
||||
(GtkFunction) gtk_mng_view_animator,
|
||||
mng_view);
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
static mng_uint32
|
||||
mng_get_tickcount_callback (mng_handle mng_h)
|
||||
{
|
||||
gdouble seconds;
|
||||
gulong microseconds;
|
||||
|
||||
GtkMngView * mng_view;
|
||||
|
||||
mng_view = GTK_MNG_VIEW (mng_get_userdata (mng_h));
|
||||
seconds = g_timer_elapsed (mng_view->timer,
|
||||
µseconds);
|
||||
|
||||
return ((mng_uint32) (seconds*1000.0 + ((gdouble) microseconds)/1000.0));
|
||||
}
|
||||
|
||||
static mng_ptr
|
||||
mng_get_canvas_line_callback (mng_handle mng_h,
|
||||
mng_uint32 line)
|
||||
{
|
||||
GtkMngView * mng_view;
|
||||
|
||||
mng_view = GTK_MNG_VIEW (mng_get_userdata (mng_h));
|
||||
return mng_view->MNG_drawing_buffer + 3 * line * mng_view->width;
|
||||
}
|
||||
|
||||
static void gtk_mng_view_paint (GtkMngView *, GdkRectangle *);
|
||||
|
||||
static mng_bool
|
||||
mng_refresh_callback (mng_handle mng_h,
|
||||
mng_uint32 x,
|
||||
mng_uint32 y,
|
||||
mng_uint32 width,
|
||||
mng_uint32 height)
|
||||
{
|
||||
GtkMngView * mng_view;
|
||||
|
||||
mng_view = GTK_MNG_VIEW (mng_get_userdata (mng_h));
|
||||
|
||||
if (GTK_WIDGET_REALIZED (mng_view))
|
||||
{
|
||||
GdkRectangle rectangle;
|
||||
|
||||
rectangle.x = x;
|
||||
rectangle.y = y;
|
||||
rectangle.width = width;
|
||||
rectangle.height = height;
|
||||
gtk_mng_view_paint (mng_view, &rectangle);
|
||||
}
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_mng_view_init_libmng (GtkMngView * mng_view)
|
||||
{
|
||||
GtkWidget * widget;
|
||||
|
||||
g_return_val_if_fail (IS_GTK_MNG_VIEW (mng_view), FALSE);
|
||||
|
||||
if (mng_view->MNG_handle)
|
||||
mng_cleanup (&mng_view->MNG_handle);
|
||||
|
||||
mng_view->MNG_handle = mng_initialize (mng_view,
|
||||
mng_malloc_callback,
|
||||
mng_free_callback,
|
||||
MNG_NULL);
|
||||
|
||||
if (mng_view->MNG_handle == MNG_NULL)
|
||||
return FALSE;
|
||||
|
||||
if (mng_setcb_openstream (mng_view->MNG_handle, mng_open_stream_callback) != MNG_NOERROR ||
|
||||
mng_setcb_closestream (mng_view->MNG_handle, mng_close_stream_callback) != MNG_NOERROR ||
|
||||
mng_setcb_readdata (mng_view->MNG_handle, mng_read_data_callback) != MNG_NOERROR ||
|
||||
mng_setcb_processheader (mng_view->MNG_handle, mng_process_header_callback) != MNG_NOERROR ||
|
||||
mng_setcb_settimer (mng_view->MNG_handle, mng_set_timer_callback) != MNG_NOERROR ||
|
||||
mng_setcb_gettickcount (mng_view->MNG_handle, mng_get_tickcount_callback) != MNG_NOERROR ||
|
||||
mng_setcb_getcanvasline (mng_view->MNG_handle, mng_get_canvas_line_callback) != MNG_NOERROR ||
|
||||
mng_setcb_refresh (mng_view->MNG_handle, mng_refresh_callback) != MNG_NOERROR)
|
||||
{
|
||||
mng_cleanup (&mng_view->MNG_handle);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mng_set_canvasstyle (mng_view->MNG_handle, MNG_CANVAS_RGB8);
|
||||
|
||||
widget = GTK_WIDGET (mng_view);
|
||||
|
||||
if (!GTK_WIDGET_REALIZED (widget))
|
||||
gtk_widget_realize (widget);
|
||||
|
||||
mng_set_bgcolor (mng_view->MNG_handle,
|
||||
widget->style->bg[GTK_STATE_NORMAL].red,
|
||||
widget->style->bg[GTK_STATE_NORMAL].green,
|
||||
widget->style->bg[GTK_STATE_NORMAL].blue);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* GTK+ widget methods */
|
||||
|
||||
static GtkWidgetClass * parent_class = NULL;
|
||||
|
||||
static void
|
||||
gtk_mng_view_finalize (GObject * obj)
|
||||
{
|
||||
GtkMngView * mng_view = GTK_MNG_VIEW (obj);
|
||||
|
||||
g_timer_destroy (mng_view->timer);
|
||||
|
||||
if (mng_view->timeout_ID)
|
||||
gtk_timeout_remove (mng_view->timeout_ID);
|
||||
|
||||
g_free (mng_view->MNG_drawing_buffer);
|
||||
|
||||
if (mng_view->MNG_handle)
|
||||
mng_cleanup (&mng_view->MNG_handle);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (obj);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mng_view_size_request (GtkWidget * widget, GtkRequisition * requisition)
|
||||
{
|
||||
GtkMngView * mng_view;
|
||||
|
||||
g_return_if_fail (IS_GTK_MNG_VIEW (widget));
|
||||
g_return_if_fail (requisition != NULL);
|
||||
|
||||
mng_view = (GtkMngView *) widget;
|
||||
|
||||
requisition->width = mng_view->width;
|
||||
requisition->height = mng_view->height;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mng_view_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
|
||||
{
|
||||
g_return_if_fail (IS_GTK_MNG_VIEW (widget));
|
||||
g_return_if_fail (allocation != NULL);
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_move_resize (widget->window,
|
||||
allocation->x,
|
||||
allocation->y,
|
||||
allocation->width,
|
||||
allocation->height);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mng_view_paint (GtkMngView * mng_view,
|
||||
GdkRectangle * area)
|
||||
{
|
||||
GtkWidget * widget;
|
||||
guint rowstride;
|
||||
guchar * buffer;
|
||||
register guchar * ptr;
|
||||
register guchar * bptr;
|
||||
|
||||
widget = GTK_WIDGET (mng_view);
|
||||
|
||||
g_assert (GTK_WIDGET_REALIZED (widget));
|
||||
|
||||
rowstride = 3 * area->width;
|
||||
buffer = g_new (guchar, rowstride * area->height);
|
||||
|
||||
|
||||
bptr = buffer;
|
||||
ptr = mng_view->MNG_drawing_buffer
|
||||
+ 3 * (area->y * mng_view->width + area->x);
|
||||
|
||||
while (bptr < buffer + rowstride * area->height)
|
||||
{
|
||||
memcpy (bptr, ptr, rowstride);
|
||||
bptr += rowstride;
|
||||
ptr += 3 * mng_view->width;
|
||||
}
|
||||
|
||||
gdk_draw_rgb_image (widget->window,
|
||||
widget->style->white_gc,
|
||||
area->x,
|
||||
area->y,
|
||||
area->width,
|
||||
area->height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
buffer,
|
||||
rowstride);
|
||||
|
||||
g_free (buffer);
|
||||
gdk_flush ();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_mng_view_expose (GtkWidget * widget, GdkEventExpose * event)
|
||||
{
|
||||
g_return_val_if_fail (IS_GTK_MNG_VIEW (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
{
|
||||
GdkRectangle dummy;
|
||||
GdkRectangle rectangle;
|
||||
GtkMngView * mng_view;
|
||||
|
||||
mng_view = GTK_MNG_VIEW (widget);
|
||||
dummy.x = dummy.y = 0;
|
||||
dummy.width = mng_view->width;
|
||||
dummy.height = mng_view->height;
|
||||
|
||||
if (gdk_rectangle_intersect (&dummy, &event->area, &rectangle))
|
||||
gtk_mng_view_paint (mng_view, &rectangle);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mng_view_realize (GtkWidget * widget)
|
||||
{
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
g_return_if_fail (IS_GTK_MNG_VIEW (widget));
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.x = widget->allocation.x;
|
||||
attributes.y = widget->allocation.y;
|
||||
attributes.width = widget->allocation.width;
|
||||
attributes.height = widget->allocation.height;
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||
attributes.event_mask = gtk_widget_get_events (widget);
|
||||
attributes.event_mask |= GDK_EXPOSURE_MASK;
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (widget->window, widget);
|
||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mng_view_init (GtkMngView * mng_view)
|
||||
{
|
||||
g_return_if_fail (IS_GTK_MNG_VIEW (mng_view));
|
||||
|
||||
GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (mng_view), GTK_NO_WINDOW);
|
||||
|
||||
mng_view->MNG_handle = NULL;
|
||||
mng_view->MNG_drawing_buffer = NULL;
|
||||
mng_view->timeout_ID = 0;
|
||||
mng_view->timer = g_timer_new ();
|
||||
g_timer_start (mng_view->timer);
|
||||
mng_view->mng_food = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mng_view_class_init (GtkMngViewClass * klass)
|
||||
{
|
||||
GObjectClass * object_class;
|
||||
GtkWidgetClass * widget_class;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
object_class->finalize = gtk_mng_view_finalize;
|
||||
|
||||
widget_class = GTK_WIDGET_CLASS (klass);
|
||||
widget_class->size_request = gtk_mng_view_size_request;
|
||||
widget_class->size_allocate = gtk_mng_view_size_allocate;
|
||||
widget_class->expose_event = gtk_mng_view_expose;
|
||||
widget_class->realize = gtk_mng_view_realize;
|
||||
}
|
||||
|
||||
GtkType
|
||||
gtk_mng_view_get_type (void)
|
||||
{
|
||||
static GtkType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
static const GtkTypeInfo type_info =
|
||||
{
|
||||
"GtkMngView",
|
||||
sizeof (GtkMngView),
|
||||
sizeof (GtkMngViewClass),
|
||||
(GtkClassInitFunc) gtk_mng_view_class_init,
|
||||
(GtkObjectInitFunc) gtk_mng_view_init,
|
||||
NULL, NULL,
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
type = gtk_type_unique (GTK_TYPE_WIDGET, &type_info);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_mng_view_new (void)
|
||||
{
|
||||
return GTK_WIDGET (gtk_type_new (GTK_MNG_VIEW_TYPE));
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_mng_view_load_mng_from_memory (GtkMngView * mng_view,
|
||||
guchar * data_to_eat,
|
||||
guint data_size)
|
||||
{
|
||||
g_return_val_if_fail (IS_GTK_MNG_VIEW (mng_view), FALSE);
|
||||
g_return_val_if_fail (data_size > 27, FALSE);
|
||||
g_return_val_if_fail (data_to_eat != NULL, FALSE);
|
||||
|
||||
if (data_to_eat[0] != 0x8a ||
|
||||
data_to_eat[1] != 'M' ||
|
||||
data_to_eat[2] != 'N' ||
|
||||
data_to_eat[3] != 'G' ||
|
||||
data_to_eat[4] != 0x0d ||
|
||||
data_to_eat[5] != 0x0a ||
|
||||
data_to_eat[6] != 0x1a ||
|
||||
data_to_eat[7] != 0x0a)
|
||||
{
|
||||
g_warning ("not mng format");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (gtk_mng_view_init_libmng (mng_view))
|
||||
{
|
||||
mng_view->bytes_to_eat = data_size;
|
||||
mng_view->bytes_eaten = 0;
|
||||
mng_view->mng_food = data_to_eat;
|
||||
|
||||
if (mng_read (mng_view->MNG_handle) != MNG_NOERROR)
|
||||
{
|
||||
g_warning ("libmng read error");
|
||||
mng_cleanup (&mng_view->MNG_handle);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
return mng_display (mng_view->MNG_handle);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("error initializing libmng");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/* Toy widget for GTK+ for displaying MNG animations.
|
||||
*
|
||||
* Copyright (C) 2000 The Free Software Foundation
|
||||
*
|
||||
* Author(s): Volodymyr Babin <vb :at: dwuj.ichf.edu.pl>
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_MNG_VIEW_H__
|
||||
#define __GTK_MNG_VIEW_H__
|
||||
|
||||
#include <libmng.h>
|
||||
#include <gtk/gtkwidget.h>
|
||||
|
||||
#define GTK_MNG_VIEW_TYPE (gtk_mng_view_get_type ())
|
||||
#define GTK_MNG_VIEW(o) (GTK_CHECK_CAST ((o), GTK_MNG_VIEW_TYPE, GtkMngView))
|
||||
#define GTK_MNG_VIEW_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), GTK_MNG_VIEW_TYPE, GtkMngViewClass))
|
||||
#define IS_GTK_MNG_VIEW(o) (GTK_CHECK_TYPE ((o), GTK_MNG_VIEW_TYPE))
|
||||
#define IS_GTK_MNG_VIEW_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), GTK_MNG_VIEW_TYPE))
|
||||
|
||||
typedef struct _GtkMngView GtkMngView;
|
||||
typedef struct _GtkMngViewClass GtkMngViewClass;
|
||||
|
||||
struct _GtkMngView
|
||||
{
|
||||
GtkWidget widget;
|
||||
/* private */
|
||||
GTimer * timer;
|
||||
guint timeout_ID;
|
||||
guint width;
|
||||
guint height;
|
||||
mng_handle MNG_handle;
|
||||
guchar * MNG_drawing_buffer;
|
||||
guchar * mng_food;
|
||||
guint bytes_to_eat;
|
||||
guint bytes_eaten;
|
||||
};
|
||||
|
||||
struct _GtkMngViewClass
|
||||
{
|
||||
GtkWidgetClass klass;
|
||||
};
|
||||
|
||||
GtkType gtk_mng_view_get_type (void);
|
||||
GtkWidget * gtk_mng_view_new (void);
|
||||
|
||||
/* returns !FALSE on success */
|
||||
gboolean gtk_mng_view_load_mng_from_memory (GtkMngView *, guchar *, guint);
|
||||
|
||||
#endif /* __GTK_MNG_VIEW_H__ */
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
mngtree
|
||||
@@ -0,0 +1,43 @@
|
||||
# makefile for mngtree test-program on Linux ELF with gcc
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
CC=gcc
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(prefix)/lib
|
||||
|
||||
JPEGLIB=/usr/lib
|
||||
|
||||
ALIGN=
|
||||
# for i386:
|
||||
#ALIGN=-malign-loops=2 -malign-functions=2
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
|
||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||
|
||||
CFLAGS=-I$(INCPATH) -Wall -O3 -funroll-loops -DMNG_USE_SO $(ALIGN) # $(WARNMORE) -g
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(LIBPATH) -Wl,-rpath,$(LIBPATH) \
|
||||
-L$(JPEGLIB) -Wl,-rpath,$(JPEGLIB) -lmng -lz -ljpeg -lm
|
||||
|
||||
OBJS = mngtree.o
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) -o $@ $*.c
|
||||
|
||||
all: mngtree
|
||||
|
||||
mngtree: mngtree.o
|
||||
$(CC) -o mngtree $(CFLAGS) mngtree.o $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o mngtree
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
mngtree.o: mngtree.c
|
||||
@@ -0,0 +1,237 @@
|
||||
/* ************************************************************************** */
|
||||
/* * * */
|
||||
/* * COPYRIGHT NOTICE: * */
|
||||
/* * * */
|
||||
/* * Copyright (c) 2000 Gerard Juyn (gerard :at: libmng.com) * */
|
||||
/* * [You may insert additional notices after this sentence if you modify * */
|
||||
/* * this source] * */
|
||||
/* * * */
|
||||
/* * For the purposes of this copyright and license, "Contributing Authors" * */
|
||||
/* * is defined as the following set of individuals: * */
|
||||
/* * * */
|
||||
/* * Gerard Juyn * */
|
||||
/* * (hopefully some more to come...) * */
|
||||
/* * * */
|
||||
/* * The MNG Library is supplied "AS IS". The Contributing Authors * */
|
||||
/* * disclaim all warranties, expressed or implied, including, without * */
|
||||
/* * limitation, the warranties of merchantability and of fitness for any * */
|
||||
/* * purpose. The Contributing Authors assume no liability for direct, * */
|
||||
/* * indirect, incidental, special, exemplary, or consequential damages, * */
|
||||
/* * which may result from the use of the MNG Library, even if advised of * */
|
||||
/* * the possibility of such damage. * */
|
||||
/* * * */
|
||||
/* * Permission is hereby granted to use, copy, modify, and distribute this * */
|
||||
/* * source code, or portions hereof, for any purpose, without fee, subject * */
|
||||
/* * to the following restrictions: * */
|
||||
/* * * */
|
||||
/* * 1. The origin of this source code must not be misrepresented; * */
|
||||
/* * you must not claim that you wrote the original software. * */
|
||||
/* * * */
|
||||
/* * 2. Altered versions must be plainly marked as such and must not be * */
|
||||
/* * misrepresented as being the original source. * */
|
||||
/* * * */
|
||||
/* * 3. This Copyright notice may not be removed or altered from any source * */
|
||||
/* * or altered source distribution. * */
|
||||
/* * * */
|
||||
/* * The Contributing Authors specifically permit, without fee, and * */
|
||||
/* * encourage the use of this source code as a component to supporting * */
|
||||
/* * the MNG and JNG file format in commercial products. If you use this * */
|
||||
/* * source code in a product, acknowledgment would be highly appreciated. * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
/* * * */
|
||||
/* * project : mngtree * */
|
||||
/* * file : mngtree.c copyright (c) 2000 G.Juyn * */
|
||||
/* * version : 1.0.1 * */
|
||||
/* * * */
|
||||
/* * purpose : main project file * */
|
||||
/* * * */
|
||||
/* * author : G.Juyn * */
|
||||
/* * web : http://www.3-t.com * */
|
||||
/* * email : mailto:info@3-t.com * */
|
||||
/* * * */
|
||||
/* * comment : mngtree simply dumps the chunk-structure of the supplied * */
|
||||
/* * first parameter to stdout (should be a xNG-file) * */
|
||||
/* * * */
|
||||
/* * changes : 0.5.2 - 06/03/2000 - G.Juyn * */
|
||||
/* * - fixed for compilation under Linux * */
|
||||
/* * 0.5.3 - 06/26/2000 - G.Juyn * */
|
||||
/* * - changed definition of userdata to mng_ptr * */
|
||||
/* * 0.5.3 - 06/28/2000 - G.Juyn * */
|
||||
/* * - changed memory allocation size parameters to mng_size_t * */
|
||||
/* * * */
|
||||
/* * 1.0.1 - 12/07/2003 - G.Juyn * */
|
||||
/* * - fixed inclusion of libmng.h (Thanks Raphael) * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "../../../libmng.h"
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
typedef struct user_struct {
|
||||
|
||||
FILE *hFile; /* file handle */
|
||||
int iIndent; /* for nice indented formatting */
|
||||
|
||||
} userdata;
|
||||
|
||||
typedef userdata * userdatap;
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
mng_ptr myalloc (mng_size_t iSize)
|
||||
{ /* duh! */
|
||||
return (mng_ptr)calloc (1, (size_t)iSize);
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
void myfree (mng_ptr pPtr, mng_size_t iSize)
|
||||
{
|
||||
free (pPtr); /* duh! */
|
||||
return;
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
mng_bool myopenstream (mng_handle hMNG)
|
||||
{
|
||||
return MNG_TRUE; /* already opened in main function */
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
mng_bool myclosestream (mng_handle hMNG)
|
||||
{
|
||||
return MNG_TRUE; /* gets closed in main function */
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
mng_bool myreaddata (mng_handle hMNG,
|
||||
mng_ptr pBuf,
|
||||
mng_uint32 iSize,
|
||||
mng_uint32 *iRead)
|
||||
{ /* get to my file handle */
|
||||
userdatap pMydata = (userdatap)mng_get_userdata (hMNG);
|
||||
/* read it */
|
||||
*iRead = fread (pBuf, 1, iSize, pMydata->hFile);
|
||||
/* iRead will indicate EOF */
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
mng_bool myiterchunk (mng_handle hMNG,
|
||||
mng_handle hChunk,
|
||||
mng_chunkid iChunktype,
|
||||
mng_uint32 iChunkseq)
|
||||
{ /* get to my file handle */
|
||||
userdatap pMydata = (userdatap)mng_get_userdata (hMNG);
|
||||
char aCh[4];
|
||||
char zIndent[80];
|
||||
int iX;
|
||||
/* decode the chunkname */
|
||||
aCh[0] = (char)((iChunktype >> 24) & 0xFF);
|
||||
aCh[1] = (char)((iChunktype >> 16) & 0xFF);
|
||||
aCh[2] = (char)((iChunktype >> 8) & 0xFF);
|
||||
aCh[3] = (char)((iChunktype ) & 0xFF);
|
||||
/* indent less ? */
|
||||
if ( (iChunktype == MNG_UINT_MEND) || (iChunktype == MNG_UINT_IEND) ||
|
||||
(iChunktype == MNG_UINT_ENDL) )
|
||||
pMydata->iIndent -= 2;
|
||||
/* this looks ugly; but I haven't
|
||||
figured out how to do it prettier */
|
||||
for (iX = 0; iX < pMydata->iIndent; iX++)
|
||||
zIndent[iX] = ' ';
|
||||
zIndent[pMydata->iIndent] = '\0';
|
||||
/* print a nicely indented line */
|
||||
printf ("%s%c%c%c%c\n", zIndent, aCh[0], aCh[1], aCh[2], aCh[3]);
|
||||
/* indent more ? */
|
||||
if ( (iChunktype == MNG_UINT_MHDR) || (iChunktype == MNG_UINT_IHDR) ||
|
||||
(iChunktype == MNG_UINT_JHDR) || (iChunktype == MNG_UINT_DHDR) ||
|
||||
(iChunktype == MNG_UINT_BASI) || (iChunktype == MNG_UINT_LOOP) )
|
||||
pMydata->iIndent += 2;
|
||||
|
||||
return MNG_TRUE; /* keep'm coming... */
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
int dumptree (char * zFilename)
|
||||
{
|
||||
userdatap pMydata;
|
||||
mng_handle hMNG;
|
||||
mng_retcode iRC;
|
||||
/* get a data buffer */
|
||||
pMydata = (userdatap)calloc (1, sizeof (userdata));
|
||||
|
||||
if (pMydata == NULL) /* oke ? */
|
||||
{
|
||||
fprintf (stderr, "Cannot allocate a data buffer.\n");
|
||||
return 1;
|
||||
}
|
||||
/* can we open the file ? */
|
||||
if ((pMydata->hFile = fopen (zFilename, "rb")) == NULL)
|
||||
{ /* error out if we can't */
|
||||
fprintf (stderr, "Cannot open input file %s.\n", zFilename);
|
||||
return 1;
|
||||
}
|
||||
/* let's initialize the library */
|
||||
hMNG = mng_initialize ((mng_ptr)pMydata, myalloc, myfree, MNG_NULL);
|
||||
|
||||
if (!hMNG) /* did that work out ? */
|
||||
{
|
||||
fprintf (stderr, "Cannot initialize libmng.\n");
|
||||
iRC = 1;
|
||||
}
|
||||
else
|
||||
{ /* setup callbacks */
|
||||
if ( ((iRC = mng_setcb_openstream (hMNG, myopenstream )) != 0) ||
|
||||
((iRC = mng_setcb_closestream (hMNG, myclosestream)) != 0) ||
|
||||
((iRC = mng_setcb_readdata (hMNG, myreaddata )) != 0) )
|
||||
fprintf (stderr, "Cannot set callbacks for libmng.\n");
|
||||
else
|
||||
{ /* read the file into memory */
|
||||
if ((iRC = mng_read (hMNG)) != 0)
|
||||
fprintf (stderr, "Cannot read the file.\n");
|
||||
else
|
||||
{
|
||||
pMydata->iIndent = 2; /* start of the indenting at a nice level */
|
||||
|
||||
printf ("Starting dump of %s.\n\n", zFilename);
|
||||
/* run through the chunk list */
|
||||
if ((iRC = mng_iterate_chunks (hMNG, 0, myiterchunk)) != 0)
|
||||
fprintf (stderr, "Cannot iterate the chunks.\n");
|
||||
|
||||
printf ("\nDone.\n");
|
||||
}
|
||||
}
|
||||
|
||||
mng_cleanup (&hMNG); /* cleanup the library */
|
||||
}
|
||||
|
||||
fclose (pMydata->hFile); /* cleanup */
|
||||
free (pMydata);
|
||||
|
||||
return iRC;
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (argc > 1) /* need that first parameter ! */
|
||||
return dumptree (argv[1]);
|
||||
else
|
||||
printf ("\nUsage: mngtree <file.mng>\n\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
@@ -0,0 +1,12 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
configure
|
||||
config.log
|
||||
config.cache
|
||||
config.status
|
||||
aclocal.m4
|
||||
install-sh
|
||||
mkinstalldirs
|
||||
missing
|
||||
.deps
|
||||
mngplay
|
||||
@@ -0,0 +1,7 @@
|
||||
Contributors to mnyplay
|
||||
|
||||
Ralph Giles <giles@ashlu.bc.ca>
|
||||
Greg Roelofs <newt@pobox.com> (minor contribs!)
|
||||
|
||||
--
|
||||
$Date: 2002/09/26 18:09:37 $
|
||||
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -0,0 +1,29 @@
|
||||
2001-07-08 Greg Roelofs <newt@pobox.com>
|
||||
- added SDL/libmng/zlib/libjpeg version info to usage screen
|
||||
- added mouse-click handling (as an alternate quit mode)
|
||||
- added completely static build
|
||||
- fixed automake setup to order options and libraries correctly on
|
||||
link line, and included resulting files (configure, Makefile.in,
|
||||
etc.) in order to match instructions in INSTALL file
|
||||
|
||||
2000-07-06 Ralph Giles <giles@ashlu.bc.ca>
|
||||
* Release 0.1
|
||||
- added error handling callback
|
||||
- added event system so you can actually quit
|
||||
(click the window closebox or type 'escape' or 'q')
|
||||
- window titles from the filename
|
||||
- added basic auto*
|
||||
|
||||
2000-07-05 Ralph Giles <giles@ashlu.bc.ca>
|
||||
* snapshot;
|
||||
- changed refresh parameters to patch libmng 0.9
|
||||
|
||||
2000-06-06 Ralph Giles <giles@ashlu.bc.ca>
|
||||
* snapshot;
|
||||
- basic playing works now with the MNGsuite tests
|
||||
|
||||
2000-06-06 Ralph Giles <giles@ashlu.bc.ca>
|
||||
* snapshot;
|
||||
- doesn't really work yet
|
||||
|
||||
# beginning =)
|
||||
@@ -0,0 +1,182 @@
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
@@ -0,0 +1,10 @@
|
||||
# process this with automake to create Makefile.in
|
||||
|
||||
bin_PROGRAMS = mngplay mngplay-static
|
||||
|
||||
mngplay_SOURCES = mngplay.c
|
||||
mngplay_static_SOURCES = mngplay.c
|
||||
|
||||
mngplay_static_LDFLAGS = -static
|
||||
|
||||
# end
|
||||
@@ -0,0 +1,534 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# process this with automake to create Makefile.in
|
||||
|
||||
SOURCES = $(mngplay_SOURCES) $(mngplay_static_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
bin_PROGRAMS = mngplay$(EXEEXT) mngplay-static$(EXEEXT)
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
|
||||
ChangeLog INSTALL depcomp install-sh missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_mngplay_OBJECTS = mngplay.$(OBJEXT)
|
||||
mngplay_OBJECTS = $(am_mngplay_OBJECTS)
|
||||
mngplay_DEPENDENCIES =
|
||||
am_mngplay_static_OBJECTS = mngplay.$(OBJEXT)
|
||||
mngplay_static_OBJECTS = $(am_mngplay_static_OBJECTS)
|
||||
mngplay_static_DEPENDENCIES =
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(mngplay_SOURCES) $(mngplay_static_SOURCES)
|
||||
DIST_SOURCES = $(mngplay_SOURCES) $(mngplay_static_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
HAS_SDL = @HAS_SDL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mngplay_LDADD = @mngplay_LDADD@
|
||||
mngplay_static_LDADD = @mngplay_static_LDADD@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
mngplay_SOURCES = mngplay.c
|
||||
mngplay_static_SOURCES = mngplay.c
|
||||
mngplay_static_LDFLAGS = -static
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
mngplay$(EXEEXT): $(mngplay_OBJECTS) $(mngplay_DEPENDENCIES)
|
||||
@rm -f mngplay$(EXEEXT)
|
||||
$(LINK) $(mngplay_LDFLAGS) $(mngplay_OBJECTS) $(mngplay_LDADD) $(LIBS)
|
||||
mngplay-static$(EXEEXT): $(mngplay_static_OBJECTS) $(mngplay_static_DEPENDENCIES)
|
||||
@rm -f mngplay-static$(EXEEXT)
|
||||
$(LINK) $(mngplay_static_LDFLAGS) $(mngplay_static_OBJECTS) $(mngplay_static_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mngplay.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-compile distclean-generic distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-info install-info-am install-man install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
|
||||
# end
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,27 @@
|
||||
* mngplay *
|
||||
|
||||
a simple SDL-based mng player
|
||||
|
||||
This is a simple example program, using the Simple Direct media Layer
|
||||
to display mng animation decoded by the new libmng implementation.
|
||||
|
||||
SDL and libmng are quite portable, but I've only tried it on x86 Linux.
|
||||
Project files for MacOS, BeOS and Win32 are welcome. The code's fairly
|
||||
rough at this point, but there was no example player for *nix in the
|
||||
distribution. Patches welcome, of course.
|
||||
|
||||
On a unix-like system, the build instructions are simple:
|
||||
|
||||
(install and/or build the SDL libraries from libsdl.org)
|
||||
(install and/or build the mng library from libmng.com)
|
||||
./configure (or ./autogen.sh if you're using the cvs source)
|
||||
make
|
||||
make install
|
||||
|
||||
To use the player:
|
||||
|
||||
mngplay <filename>.mng
|
||||
|
||||
---
|
||||
Ralph Giles <giles@ashlu.bc.ca>
|
||||
$Date: 2002/09/26 18:09:37 $
|
||||
@@ -0,0 +1,34 @@
|
||||
dnl autoconf macros for detecting libmng
|
||||
dnl add this to your aclocal or acinclude to make use of it
|
||||
dnl
|
||||
dnl (c) 2000 Ralph Giles <giles@ashlu.bc.ca>
|
||||
dnl
|
||||
|
||||
dnl A basic check: looks for libmng and its dependencies
|
||||
dnl and adds the required bits to CFLAGS and LIBS
|
||||
|
||||
# check for libmng
|
||||
AC_DEFUN(LIBMNG_CHECK, [
|
||||
dnl prerequisites first
|
||||
AC_CHECK_LIB(jpeg, jpeg_set_defaults)
|
||||
AC_CHECK_LIB(z, inflate)
|
||||
dnl now the library
|
||||
AC_CHECK_LIB(mng, mng_readdisplay, [_libmng_present=1])
|
||||
AC_CHECK_HEADER(libmng.h)
|
||||
dnl see if we need the optional link dependency
|
||||
AC_CHECK_LIB(lcms, cmsCreateRGBProfile, [
|
||||
AC_CHECK_HEADER(lcms.h)
|
||||
AC_CHECK_LIB(mng, mnglcms_initlibrary, [
|
||||
LIBS="$LIBS -llcms"
|
||||
AC_DEFINE(HAVE_LIBLCMS)
|
||||
_libmng_present=1
|
||||
])
|
||||
])
|
||||
if test $_libmng_present -eq 1; then
|
||||
LIBS="-lmng $LIBS"
|
||||
AC_DEFINE(HAVE_LIBMNG)
|
||||
fi
|
||||
_libmng_present=
|
||||
])
|
||||
|
||||
dnl end LIBMNG macros
|
||||
@@ -0,0 +1,851 @@
|
||||
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
# Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.9.6])])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||
#
|
||||
# Of course, Automake must honor this variable whenever it calls a
|
||||
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||
# depending on how configure is run. This is pretty annoying, since
|
||||
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||
# source directory, any form will work fine, but in subdirectories a
|
||||
# relative path needs to be adjusted first.
|
||||
#
|
||||
# $ac_aux_dir/missing
|
||||
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||
# $top_srcdir/$ac_aux_dir/missing
|
||||
# fails if $ac_aux_dir is absolute,
|
||||
# fails when called from a subdirectory in a VPATH build with
|
||||
# a relative $ac_aux_dir
|
||||
#
|
||||
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||
# harmless because $srcdir is `.', but things will broke when you
|
||||
# start a VPATH build or use an absolute $srcdir.
|
||||
#
|
||||
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||
# and then we would define $MISSING as
|
||||
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# This will work as long as MISSING is not called from configure, because
|
||||
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||
# However there are other variables, like CC, which are often used in
|
||||
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||
#
|
||||
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])
|
||||
AC_SUBST([$1_FALSE])
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 3
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# So let's grep whole file.
|
||||
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 12
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
# The call with PACKAGE and VERSION arguments is the old style
|
||||
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||
# and VERSION should now be passed to AC_INIT and removed from
|
||||
# the call to AM_INIT_AUTOMAKE.
|
||||
# We support both call styles for the transition. After
|
||||
# the next Automake release, Autoconf can make the AC_INIT
|
||||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.58])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
||||
test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||
AM_PROG_INSTALL_SH
|
||||
AM_PROG_INSTALL_STRIP
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$1 | $1:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||||
AC_SUBST(install_sh)])
|
||||
|
||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
[rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
|
||||
#
|
||||
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
|
||||
# created by `make install' are always world readable, even if the
|
||||
# installer happens to have an overly restrictive umask (e.g. 077).
|
||||
# This was a mistake. There are at least two reasons why we must not
|
||||
# use `-m 0755':
|
||||
# - it causes special bits like SGID to be ignored,
|
||||
# - it may be too restrictive (some setups expect 775 directories).
|
||||
#
|
||||
# Do not use -m 0755 and let people choose whatever they expect by
|
||||
# setting umask.
|
||||
#
|
||||
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
|
||||
# Some implementations (such as Solaris 8's) are not thread-safe: if a
|
||||
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
|
||||
# concurrently, both version can detect that a/ is missing, but only
|
||||
# one can create it and the other will error out. Consequently we
|
||||
# restrict ourselves to GNU make (using the --version option ensures
|
||||
# this.)
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
# We used to keeping the `.' as first argument, in order to
|
||||
# allow $(mkdir_p) to be used without argument. As in
|
||||
# $(mkdir_p) $(somedir)
|
||||
# where $(somedir) is conditionally defined. However this is wrong
|
||||
# for two reasons:
|
||||
# 1. if the package is installed by a user who cannot write `.'
|
||||
# make install will fail,
|
||||
# 2. the above comment should most certainly read
|
||||
# $(mkdir_p) $(DESTDIR)$(somedir)
|
||||
# so it does not work when $(somedir) is undefined and
|
||||
# $(DESTDIR) is not.
|
||||
# To support the latter case, we have to write
|
||||
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
|
||||
# so the `.' trick is pointless.
|
||||
mkdir_p='mkdir -p --'
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# exists.
|
||||
for d in ./-p ./--version;
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
|
||||
if test -f "$ac_aux_dir/mkinstalldirs"; then
|
||||
mkdir_p='$(mkinstalldirs)'
|
||||
else
|
||||
mkdir_p='$(install_sh) -d'
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([mkdir_p])])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# ------------------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ----------------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
|
||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||
# -------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftest.file
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftest.file`
|
||||
fi
|
||||
rm -f conftest.file
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor `install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in `make install-strip', and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using `strip' when the user
|
||||
# run `make install-strip'. However `strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the `STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||
#
|
||||
# Substitute a variable $(am__tar) that is a command
|
||||
# writing to stdout a FORMAT-tarball containing the directory
|
||||
# $tardir.
|
||||
# tardir=directory && $(am__tar) > result.tar
|
||||
#
|
||||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility.
|
||||
AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([acinclude.m4])
|
||||
@@ -0,0 +1,54 @@
|
||||
[The end of this file is the result of the following command, executed
|
||||
under tcsh:
|
||||
|
||||
(time /bin/sh autogen.sh) >>&! autogen.log &
|
||||
|
||||
If you have automake and autoconf, the following minimal set of files
|
||||
is sufficient to rerun the autogen.sh script:
|
||||
|
||||
Makefile.am
|
||||
acinclude.m4
|
||||
autogen.sh
|
||||
configure.in
|
||||
mngplay.c
|
||||
|
||||
It will then create the following files:
|
||||
|
||||
aclocal.m4
|
||||
mkinstalldirs [symbolic link to utility supplied with automake]
|
||||
missing [symbolic link to utility supplied with automake]
|
||||
install-sh [symbolic link to utility supplied with automake]
|
||||
Makefile.in
|
||||
configure
|
||||
|
||||
The following documentation files are also part of mngplay:
|
||||
|
||||
AUTHORS
|
||||
COPYING
|
||||
ChangeLog
|
||||
INSTALL
|
||||
README
|
||||
|
||||
I have replaced the symbolic links with copies of the actual utilities and
|
||||
included all files in order to match the instructions in the INSTALL file.
|
||||
Either run configure and make in the usual manner, or, if you prefer, rerun
|
||||
autogen.sh from scratch and then run configure and make.
|
||||
|
||||
Greg Roelofs, 20010708
|
||||
]
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
If you wish to pass any options to configure, please specify them on the
|
||||
`autogen.sh' command line.
|
||||
For example use --prefix= to specify the install directory.
|
||||
|
||||
processing .
|
||||
Running aclocal ...
|
||||
Running automake --foreign ...
|
||||
automake: configure.in: installing `./install-sh'
|
||||
automake: configure.in: installing `./mkinstalldirs'
|
||||
automake: configure.in: installing `./missing'
|
||||
Running autoconf ...
|
||||
Skipping configure process.
|
||||
1.370u 0.220s 0:03.32 47.8% 0+0k 0+0io 3201pf+0w
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
PKGNAME="mngplay"
|
||||
|
||||
# GRR 20010708: added this; just want to create configure script, not run it:
|
||||
NOCONFIGURE="true"
|
||||
|
||||
am_opt="--foreign"
|
||||
|
||||
DIE=0
|
||||
|
||||
# try to guess the proper treetop
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
(test -f $srcdir/configure.in \
|
||||
&& test -f $srcdir/mngplay.c) || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
echo " top-level $PKGNAME directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# check for autoconf
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`autoconf' installed to compile $PKGNAME."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
# check for automake
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`automake' installed to compile $PKGNAME."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
|
||||
echo "(or a newer version if it is available)."
|
||||
DIE=1
|
||||
NO_AUTOMAKE=yes
|
||||
}
|
||||
|
||||
|
||||
# if no automake, don't bother testing for aclocal
|
||||
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
|
||||
echo "installed doesn't appear recent enough."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
|
||||
echo "(or a newer version if it is available)."
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$*"; then
|
||||
echo
|
||||
echo "If you wish to pass any options to configure, please specify them on the"
|
||||
echo \`$0\'" command line."
|
||||
echo "For example use --prefix= to specify the install directory."
|
||||
echo
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
xlc )
|
||||
am_opt="$(am_opt) --include-deps";;
|
||||
esac
|
||||
|
||||
for coin in `find $srcdir -name configure.in -print`
|
||||
do
|
||||
dr=`dirname $coin`
|
||||
if test -f $dr/NO-AUTO-GEN; then
|
||||
echo skipping $dr -- flagged as no auto-gen
|
||||
else
|
||||
echo processing $dr
|
||||
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
|
||||
( cd $dr
|
||||
aclocalinclude="$ACLOCAL_FLAGS"
|
||||
for k in $macrodirs; do
|
||||
if test -d $k; then
|
||||
aclocalinclude="$aclocalinclude -I $k"
|
||||
##else
|
||||
## echo "**Warning**: No such directory \`$k'. Ignored."
|
||||
fi
|
||||
done
|
||||
if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
|
||||
if grep "sed.*POTFILES" configure.in >/dev/null; then
|
||||
: do nothing -- we still have an old unmodified configure.in
|
||||
else
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
fi
|
||||
if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
if grep "^AC_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --force --copy
|
||||
fi
|
||||
echo "Running aclocal $aclocalinclude ..."
|
||||
aclocal $aclocalinclude
|
||||
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader
|
||||
fi
|
||||
echo "Running automake $am_opt ..."
|
||||
automake --add-missing $am_opt
|
||||
echo "Running autoconf ..."
|
||||
autoconf
|
||||
)
|
||||
fi
|
||||
done
|
||||
|
||||
#conf_flags="--enable-maintainer-mode --enable-debug "
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@"
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
||||
|
||||
# end
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,127 @@
|
||||
# This file was generated.
|
||||
# It contains the lists of macros which have been traced.
|
||||
# It can be safely removed.
|
||||
|
||||
@request = (
|
||||
bless( [
|
||||
'0',
|
||||
1,
|
||||
[
|
||||
'/usr/local/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/usr/local/share/autoconf/autoconf/autoconf.m4f',
|
||||
'/usr/local/share/aclocal-1.9/amversion.m4',
|
||||
'/usr/local/share/aclocal-1.9/auxdir.m4',
|
||||
'/usr/local/share/aclocal-1.9/cond.m4',
|
||||
'/usr/local/share/aclocal-1.9/depend.m4',
|
||||
'/usr/local/share/aclocal-1.9/depout.m4',
|
||||
'/usr/local/share/aclocal-1.9/init.m4',
|
||||
'/usr/local/share/aclocal-1.9/install-sh.m4',
|
||||
'/usr/local/share/aclocal-1.9/lead-dot.m4',
|
||||
'/usr/local/share/aclocal-1.9/make.m4',
|
||||
'/usr/local/share/aclocal-1.9/missing.m4',
|
||||
'/usr/local/share/aclocal-1.9/mkdirp.m4',
|
||||
'/usr/local/share/aclocal-1.9/options.m4',
|
||||
'/usr/local/share/aclocal-1.9/runlog.m4',
|
||||
'/usr/local/share/aclocal-1.9/sanity.m4',
|
||||
'/usr/local/share/aclocal-1.9/strip.m4',
|
||||
'/usr/local/share/aclocal-1.9/tar.m4',
|
||||
'acinclude.m4',
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
|
||||
'_AM_SET_OPTION' => 1,
|
||||
'AC_DEFUN' => 1,
|
||||
'AM_PROG_MKDIR_P' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AM_MISSING_HAS_RUN' => 1,
|
||||
'LIBMNG_CHECK' => 1,
|
||||
'AM_MISSING_PROG' => 1,
|
||||
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AM_PROG_INSTALL_STRIP' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AM_SANITY_CHECK' => 1,
|
||||
'include' => 1,
|
||||
'_AM_PROG_TAR' => 1,
|
||||
'AM_AUX_DIR_EXPAND' => 1,
|
||||
'AM_DEP_TRACK' => 1,
|
||||
'_AM_SET_OPTIONS' => 1,
|
||||
'AM_RUN_LOG' => 1,
|
||||
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'_AM_IF_OPTION' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'_AM_MANGLE_OPTION' => 1,
|
||||
'AM_SET_LEADING_DOT' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AM_SET_DEPDIR' => 1,
|
||||
'_AM_DEPENDENCIES' => 1,
|
||||
'AM_PROG_INSTALL_SH' => 1,
|
||||
'm4_include' => 1,
|
||||
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
|
||||
'AU_DEFUN' => 1,
|
||||
'AM_MAKE_INCLUDE' => 1
|
||||
}
|
||||
], 'Autom4te::Request' ),
|
||||
bless( [
|
||||
'1',
|
||||
1,
|
||||
[
|
||||
'/usr/local/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/usr/local/share/autoconf/autoconf/autoconf.m4f',
|
||||
'aclocal.m4',
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AM_PROG_CXX_C_O' => 1,
|
||||
'AM_ENABLE_MULTILIB' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'LT_INIT' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_SUBST_TRACE' => 1
|
||||
}
|
||||
], 'Autom4te::Request' )
|
||||
);
|
||||
|
||||
@@ -0,0 +1,666 @@
|
||||
m4trace:/usr/local/share/aclocal-1.9/amversion.m4:13: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||
m4trace:/usr/local/share/aclocal-1.9/amversion.m4:19: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])])
|
||||
m4trace:/usr/local/share/aclocal-1.9/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
])
|
||||
m4trace:/usr/local/share/aclocal-1.9/cond.m4:15: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])
|
||||
AC_SUBST([$1_FALSE])
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
m4trace:/usr/local/share/aclocal-1.9/depend.m4:29: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
m4trace:/usr/local/share/aclocal-1.9/depend.m4:138: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
m4trace:/usr/local/share/aclocal-1.9/depend.m4:146: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])
|
||||
])
|
||||
m4trace:/usr/local/share/aclocal-1.9/depout.m4:14: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# So let's grep whole file.
|
||||
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])
|
||||
m4trace:/usr/local/share/aclocal-1.9/depout.m4:63: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
m4trace:/usr/local/share/aclocal-1.9/init.m4:26: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
||||
test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||
AM_PROG_INSTALL_SH
|
||||
AM_PROG_INSTALL_STRIP
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
])
|
||||
])
|
||||
m4trace:/usr/local/share/aclocal-1.9/init.m4:102: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers.
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$1 | $1:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||||
m4trace:/usr/local/share/aclocal-1.9/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||||
AC_SUBST(install_sh)])
|
||||
m4trace:/usr/local/share/aclocal-1.9/lead-dot.m4:12: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
m4trace:/usr/local/share/aclocal-1.9/make.m4:14: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
m4trace:/usr/local/share/aclocal-1.9/missing.m4:14: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
m4trace:/usr/local/share/aclocal-1.9/missing.m4:24: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
m4trace:/usr/local/share/aclocal-1.9/mkdirp.m4:30: -1- AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
# We used to keeping the `.' as first argument, in order to
|
||||
# allow $(mkdir_p) to be used without argument. As in
|
||||
# $(mkdir_p) $(somedir)
|
||||
# where $(somedir) is conditionally defined. However this is wrong
|
||||
# for two reasons:
|
||||
# 1. if the package is installed by a user who cannot write `.'
|
||||
# make install will fail,
|
||||
# 2. the above comment should most certainly read
|
||||
# $(mkdir_p) $(DESTDIR)$(somedir)
|
||||
# so it does not work when $(somedir) is undefined and
|
||||
# $(DESTDIR) is not.
|
||||
# To support the latter case, we have to write
|
||||
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
|
||||
# so the `.' trick is pointless.
|
||||
mkdir_p='mkdir -p --'
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# exists.
|
||||
for d in ./-p ./--version;
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
|
||||
if test -f "$ac_aux_dir/mkinstalldirs"; then
|
||||
mkdir_p='$(mkinstalldirs)'
|
||||
else
|
||||
mkdir_p='$(install_sh) -d'
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([mkdir_p])])
|
||||
m4trace:/usr/local/share/aclocal-1.9/options.m4:13: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
m4trace:/usr/local/share/aclocal-1.9/options.m4:19: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
m4trace:/usr/local/share/aclocal-1.9/options.m4:25: -1- AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
m4trace:/usr/local/share/aclocal-1.9/options.m4:31: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
m4trace:/usr/local/share/aclocal-1.9/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
|
||||
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
||||
(exit $ac_status); }])
|
||||
m4trace:/usr/local/share/aclocal-1.9/sanity.m4:14: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftest.file
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftest.file`
|
||||
fi
|
||||
rm -f conftest.file
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
m4trace:/usr/local/share/aclocal-1.9/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using `strip' when the user
|
||||
# run `make install-strip'. However `strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the `STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
m4trace:/usr/local/share/aclocal-1.9/tar.m4:24: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility.
|
||||
AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
])
|
||||
m4trace:acinclude.m4:11: -1- AC_DEFUN([LIBMNG_CHECK], [
|
||||
dnl prerequisites first
|
||||
AC_CHECK_LIB(jpeg, jpeg_set_defaults)
|
||||
AC_CHECK_LIB(z, inflate)
|
||||
dnl now the library
|
||||
AC_CHECK_LIB(mng, mng_readdisplay, [_libmng_present=1])
|
||||
AC_CHECK_HEADER(libmng.h)
|
||||
dnl see if we need the optional link dependency
|
||||
AC_CHECK_LIB(lcms, cmsCreateRGBProfile, [
|
||||
AC_CHECK_HEADER(lcms.h)
|
||||
AC_CHECK_LIB(mng, mnglcms_initlibrary, [
|
||||
LIBS="$LIBS -llcms"
|
||||
AC_DEFINE(HAVE_LIBLCMS)
|
||||
_libmng_present=1
|
||||
])
|
||||
])
|
||||
if test $_libmng_present -eq 1; then
|
||||
LIBS="-lmng $LIBS"
|
||||
AC_DEFINE(HAVE_LIBMNG)
|
||||
fi
|
||||
_libmng_present=
|
||||
])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^_?m4_])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^dnl$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^_?AS_])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^SHELL$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PATH_SEPARATOR$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_NAME$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_VERSION$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_STRING$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^exec_prefix$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^prefix$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^program_transform_name$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^bindir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^sbindir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^libexecdir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^datarootdir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^datadir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^sysconfdir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^sharedstatedir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^localstatedir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^includedir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^oldincludedir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^docdir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^infodir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^htmldir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^dvidir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^pdfdir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^psdir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^libdir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^localedir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^mandir$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_NAME$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_VERSION$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_STRING$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^DEFS$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^ECHO_C$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^ECHO_N$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^ECHO_T$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^LIBS$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^build_alias$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^host_alias$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^target_alias$])
|
||||
m4trace:configure.in:7: -1- AM_INIT_AUTOMAKE([mngplay], [$VERSION])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
|
||||
m4trace:configure.in:7: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
m4trace:configure.in:7: -1- AM_AUTOMAKE_VERSION([1.9.6])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^INSTALL_DATA$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^CYGPATH_W$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^PACKAGE$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^VERSION$])
|
||||
m4trace:configure.in:7: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([no-define])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^PACKAGE$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^VERSION$])
|
||||
m4trace:configure.in:7: -1- AM_SANITY_CHECK
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_HAS_RUN
|
||||
m4trace:configure.in:7: -1- AM_AUX_DIR_EXPAND
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^ACLOCAL$])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AUTOCONF], [autoconf])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AUTOCONF$])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AUTOMAKE$])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AUTOHEADER$])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^MAKEINFO$])
|
||||
m4trace:configure.in:7: -1- AM_PROG_INSTALL_SH
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^install_sh$])
|
||||
m4trace:configure.in:7: -1- AM_PROG_INSTALL_STRIP
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^STRIP$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
|
||||
m4trace:configure.in:7: -1- AM_PROG_MKDIR_P
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^mkdir_p$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AWK$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^SET_MAKE$])
|
||||
m4trace:configure.in:7: -1- AM_SET_LEADING_DOT
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^am__leading_dot$])
|
||||
m4trace:configure.in:7: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([tar-ustar])
|
||||
m4trace:configure.in:7: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([tar-pax])
|
||||
m4trace:configure.in:7: -1- _AM_PROG_TAR([v7])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AMTAR$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^am__tar$])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^am__untar$])
|
||||
m4trace:configure.in:7: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([no-dependencies])
|
||||
m4trace:configure.in:10: -1- _m4_warn([obsolete], [The macro `AC_LANG_C' is obsolete.
|
||||
You should run autoupdate.], [../../lib/autoconf/c.m4:73: AC_LANG_C is expanded from...
|
||||
configure.in:10: the top level])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CFLAGS$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^LDFLAGS$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^LIBS$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CPPFLAGS$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^ac_ct_CC$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^EXEEXT$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^OBJEXT$])
|
||||
m4trace:configure.in:13: -1- _AM_DEPENDENCIES([CC])
|
||||
m4trace:configure.in:13: -1- AM_SET_DEPDIR
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^DEPDIR$])
|
||||
m4trace:configure.in:13: -1- AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
m4trace:configure.in:13: -1- AM_MAKE_INCLUDE
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__include$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__quote$])
|
||||
m4trace:configure.in:13: -1- AM_DEP_TRACK
|
||||
m4trace:configure.in:13: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^AMDEP_TRUE$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^AMDEP_FALSE$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CCDEPMODE$])
|
||||
m4trace:configure.in:13: -1- AM_CONDITIONAL([am__fastdepCC], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^CPP$])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^CPPFLAGS$])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^CPP$])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^GREP$])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^GREP$])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^EGREP$])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^EGREP$])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^STDC_HEADERS$])
|
||||
m4trace:configure.in:19: -1- m4_pattern_allow([^HAS_SDL$])
|
||||
m4trace:configure.in:29: -1- m4_pattern_allow([^mngplay_LDADD$])
|
||||
m4trace:configure.in:30: -1- m4_pattern_allow([^mngplay_static_LDADD$])
|
||||
m4trace:configure.in:33: -1- LIBMNG_CHECK([])
|
||||
m4trace:configure.in:33: -1- m4_pattern_allow([^HAVE_LIBJPEG$])
|
||||
m4trace:configure.in:33: -1- m4_pattern_allow([^HAVE_LIBZ$])
|
||||
m4trace:configure.in:33: -1- m4_pattern_allow([^HAVE_LIBLCMS$])
|
||||
m4trace:configure.in:33: -1- m4_pattern_allow([^HAVE_LIBMNG$])
|
||||
m4trace:configure.in:35: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
|
||||
You should run autoupdate.], [])
|
||||
m4trace:configure.in:35: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.in:35: -1- m4_pattern_allow([^LTLIBOBJS$])
|
||||
m4trace:configure.in:35: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
@@ -0,0 +1,369 @@
|
||||
m4trace:aclocal.m4:851: -1- m4_include([acinclude.m4])
|
||||
m4trace:configure.in:6: -1- AC_INIT([mngplay.c])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^_?m4_])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^dnl$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^_?AS_])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([SHELL])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^SHELL$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PATH_SEPARATOR])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PATH_SEPARATOR$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_NAME])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_NAME$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_VERSION$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_STRING])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_STRING$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([exec_prefix], [NONE])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([exec_prefix])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^exec_prefix$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([prefix], [NONE])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([prefix])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^prefix$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([program_transform_name], [s,x,x,])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([program_transform_name])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^program_transform_name$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([bindir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^bindir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([sbindir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^sbindir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([libexecdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^libexecdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([datarootdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^datarootdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([datadir], ['${datarootdir}'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([datadir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^datadir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([sysconfdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^sysconfdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([sharedstatedir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^sharedstatedir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([localstatedir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^localstatedir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([includedir], ['${prefix}/include'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([includedir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^includedir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([oldincludedir], ['/usr/include'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([oldincludedir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^oldincludedir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
|
||||
['${datarootdir}/doc/${PACKAGE_TARNAME}'],
|
||||
['${datarootdir}/doc/${PACKAGE}'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([docdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^docdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([infodir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^infodir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([htmldir], ['${docdir}'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([htmldir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^htmldir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([dvidir], ['${docdir}'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([dvidir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^dvidir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([pdfdir], ['${docdir}'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([pdfdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^pdfdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([psdir], ['${docdir}'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([psdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^psdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([libdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^libdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([localedir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^localedir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([mandir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^mandir$])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_NAME$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_VERSION$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_STRING$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([DEFS])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([DEFS])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^DEFS$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([ECHO_C])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([ECHO_C])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^ECHO_C$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([ECHO_N])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([ECHO_N])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^ECHO_N$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([ECHO_T])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([ECHO_T])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^ECHO_T$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([LIBS])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^LIBS$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([build_alias])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([build_alias])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^build_alias$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([host_alias])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([host_alias])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^host_alias$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([target_alias])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([target_alias])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^target_alias$])
|
||||
m4trace:configure.in:7: -1- AM_INIT_AUTOMAKE([mngplay], [$VERSION])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
|
||||
m4trace:configure.in:7: -1- AM_AUTOMAKE_VERSION([1.9.6])
|
||||
m4trace:configure.in:7: -1- AC_REQUIRE_AUX_FILE([install-sh])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_PROGRAM])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_SCRIPT])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_DATA])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([INSTALL_DATA])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^INSTALL_DATA$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([CYGPATH_W])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CYGPATH_W])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^CYGPATH_W$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([PACKAGE], [mngplay])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([PACKAGE])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^PACKAGE$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([VERSION], [$VERSION])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([VERSION])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^VERSION$])
|
||||
m4trace:configure.in:7: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^PACKAGE$])
|
||||
m4trace:configure.in:7: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
|
||||
#undef PACKAGE])
|
||||
m4trace:configure.in:7: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^VERSION$])
|
||||
m4trace:configure.in:7: -1- AH_OUTPUT([VERSION], [/* Version number of package */
|
||||
#undef VERSION])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([ACLOCAL])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([ACLOCAL])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^ACLOCAL$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOCONF])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AUTOCONF])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AUTOCONF$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOMAKE])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AUTOMAKE])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AUTOMAKE$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOHEADER])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AUTOHEADER])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AUTOHEADER$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([MAKEINFO])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([MAKEINFO])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^MAKEINFO$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([install_sh])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([install_sh])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^install_sh$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([STRIP])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([STRIP])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^STRIP$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([mkdir_p])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([mkdir_p])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^mkdir_p$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AWK])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AWK])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AWK$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([SET_MAKE])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([SET_MAKE])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^SET_MAKE$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__leading_dot])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__leading_dot])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^am__leading_dot$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AMTAR])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AMTAR])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AMTAR$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__tar])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__tar])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^am__tar$])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__untar])
|
||||
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__untar])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^am__untar$])
|
||||
m4trace:configure.in:10: -1- _m4_warn([obsolete], [The macro `AC_LANG_C' is obsolete.
|
||||
You should run autoupdate.], [../../lib/autoconf/c.m4:73: AC_LANG_C is expanded from...
|
||||
configure.in:10: the top level])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CFLAGS])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CFLAGS])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CFLAGS$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([LDFLAGS])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([LDFLAGS])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^LDFLAGS$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([LIBS])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^LIBS$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CPPFLAGS])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CPPFLAGS$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([ac_ct_CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^ac_ct_CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([EXEEXT])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^EXEEXT$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([OBJEXT])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^OBJEXT$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([DEPDIR])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^DEPDIR$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([am__include])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([am__include])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__include$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([am__quote])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([am__quote])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__quote$])
|
||||
m4trace:configure.in:13: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([AMDEP_TRUE])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([AMDEP_TRUE])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^AMDEP_TRUE$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([AMDEP_FALSE])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([AMDEP_FALSE])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^AMDEP_FALSE$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([AMDEPBACKSLASH])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CCDEPMODE])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CCDEPMODE$])
|
||||
m4trace:configure.in:13: -1- AM_CONDITIONAL([am__fastdepCC], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([am__fastdepCC_TRUE])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([am__fastdepCC_FALSE])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
|
||||
m4trace:configure.in:16: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.in:16: -1- AC_SUBST_TRACE([CPP])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^CPP$])
|
||||
m4trace:configure.in:16: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:16: -1- AC_SUBST_TRACE([CPPFLAGS])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^CPPFLAGS$])
|
||||
m4trace:configure.in:16: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.in:16: -1- AC_SUBST_TRACE([CPP])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^CPP$])
|
||||
m4trace:configure.in:16: -1- AC_SUBST([GREP])
|
||||
m4trace:configure.in:16: -1- AC_SUBST_TRACE([GREP])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^GREP$])
|
||||
m4trace:configure.in:16: -1- AC_SUBST([GREP])
|
||||
m4trace:configure.in:16: -1- AC_SUBST_TRACE([GREP])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^GREP$])
|
||||
m4trace:configure.in:16: -1- AC_SUBST([EGREP])
|
||||
m4trace:configure.in:16: -1- AC_SUBST_TRACE([EGREP])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^EGREP$])
|
||||
m4trace:configure.in:16: -1- AC_SUBST([EGREP])
|
||||
m4trace:configure.in:16: -1- AC_SUBST_TRACE([EGREP])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^EGREP$])
|
||||
m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||
m4trace:configure.in:16: -1- m4_pattern_allow([^STDC_HEADERS$])
|
||||
m4trace:configure.in:16: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS])
|
||||
m4trace:configure.in:19: -1- AC_SUBST([HAS_SDL])
|
||||
m4trace:configure.in:19: -1- AC_SUBST_TRACE([HAS_SDL])
|
||||
m4trace:configure.in:19: -1- m4_pattern_allow([^HAS_SDL$])
|
||||
m4trace:configure.in:29: -1- AC_SUBST([mngplay_LDADD])
|
||||
m4trace:configure.in:29: -1- AC_SUBST_TRACE([mngplay_LDADD])
|
||||
m4trace:configure.in:29: -1- m4_pattern_allow([^mngplay_LDADD$])
|
||||
m4trace:configure.in:30: -1- AC_SUBST([mngplay_static_LDADD])
|
||||
m4trace:configure.in:30: -1- AC_SUBST_TRACE([mngplay_static_LDADD])
|
||||
m4trace:configure.in:30: -1- m4_pattern_allow([^mngplay_static_LDADD$])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_LIBJPEG], [/* Define to 1 if you have the `jpeg\' library (-ljpeg). */
|
||||
#undef HAVE_LIBJPEG])
|
||||
m4trace:configure.in:33: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBJPEG])
|
||||
m4trace:configure.in:33: -1- m4_pattern_allow([^HAVE_LIBJPEG$])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_LIBZ], [/* Define to 1 if you have the `z\' library (-lz). */
|
||||
#undef HAVE_LIBZ])
|
||||
m4trace:configure.in:33: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBZ])
|
||||
m4trace:configure.in:33: -1- m4_pattern_allow([^HAVE_LIBZ$])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H])
|
||||
m4trace:configure.in:33: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.in:33: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBLCMS])
|
||||
m4trace:configure.in:33: -1- m4_pattern_allow([^HAVE_LIBLCMS$])
|
||||
m4trace:configure.in:33: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBMNG])
|
||||
m4trace:configure.in:33: -1- m4_pattern_allow([^HAVE_LIBMNG$])
|
||||
m4trace:configure.in:35: -1- AC_CONFIG_FILES([Makefile])
|
||||
m4trace:configure.in:35: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
|
||||
You should run autoupdate.], [])
|
||||
m4trace:configure.in:35: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.in:35: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.in:35: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([LTLIBOBJS])
|
||||
m4trace:configure.in:35: -1- m4_pattern_allow([^LTLIBOBJS$])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([top_builddir])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([srcdir])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([abs_srcdir])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([top_srcdir])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([abs_top_srcdir])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([builddir])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([abs_builddir])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([abs_top_builddir])
|
||||
m4trace:configure.in:35: -1- AC_SUBST_TRACE([INSTALL])
|
||||
+5782
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl Version of this release
|
||||
VERSION=0.1
|
||||
|
||||
AC_INIT(mngplay.c)
|
||||
AM_INIT_AUTOMAKE(mngplay, $VERSION)
|
||||
|
||||
dnl AC_CANONICAL_SYSTEM
|
||||
AC_LANG_C
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
dnl check for Simple Direct Media Layer
|
||||
AC_CHECK_PROG(HAS_SDL, sdl-config, yes)
|
||||
if test "x$HAS_SDL" != "xyes"; then
|
||||
AC_MSG_ERROR([ SDL library not found!
|
||||
You need this for any display to happen. (rather the point)
|
||||
You can get a copy at <http://libsdl.org/>])
|
||||
fi
|
||||
CFLAGS="$CFLAGS `sdl-config --cflags`"
|
||||
|
||||
mngplay_LDADD="`sdl-config --libs`"
|
||||
mngplay_static_LDADD="`sdl-config --static-libs`"
|
||||
AC_SUBST(mngplay_LDADD)
|
||||
AC_SUBST(mngplay_static_LDADD)
|
||||
|
||||
dnl check for libmng - macro in acinclude.m4
|
||||
LIBMNG_CHECK()
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
+530
@@ -0,0 +1,530 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2005-07-09.11
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mecanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=
|
||||
chgrpcmd=
|
||||
stripcmd=
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dstarg=
|
||||
no_target_directory=
|
||||
|
||||
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
-c (ignored)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test -n "$1"; do
|
||||
case $1 in
|
||||
-c) shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t) dstarg=$2
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-T) no_target_directory=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
*) # When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
test -n "$dir_arg$dstarg" && break
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dstarg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dstarg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dstarg=$arg
|
||||
done
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test -z "$1"; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src ;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
src=
|
||||
|
||||
if test -d "$dst"; then
|
||||
mkdircmd=:
|
||||
chmodcmd=
|
||||
else
|
||||
mkdircmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dstarg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dstarg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst ;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dstarg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst/`basename "$src"`
|
||||
fi
|
||||
fi
|
||||
|
||||
# This sed command emulates the dirname command.
|
||||
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if test ! -d "$dstdir"; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=
|
||||
|
||||
while test $# -ne 0 ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
if test ! -d "$pathcomp"; then
|
||||
$mkdirprog "$pathcomp"
|
||||
# mkdir can fail with a `File exist' error in case several
|
||||
# install-sh are creating the directory concurrently. This
|
||||
# is OK.
|
||||
test -d "$pathcomp" || exit
|
||||
fi
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
$doit $mkdircmd "$dst" \
|
||||
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
|
||||
|
||||
else
|
||||
dstfile=`basename "$dst"`
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
$doit $cpprog "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| {
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
if test -f "$dstdir/$dstfile"; then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|
||||
|| {
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
}
|
||||
}
|
||||
fi || { (exit 1); exit 1; }
|
||||
done
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
{
|
||||
(exit 0); exit 0
|
||||
}
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
+360
@@ -0,0 +1,360 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2005-06-08.21
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case "$1" in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
@@ -0,0 +1,507 @@
|
||||
/*
|
||||
mngplay
|
||||
|
||||
$Date: 2003/12/07 09:45:16 $
|
||||
|
||||
Ralph Giles <giles :at: ashlu.bc.ca>
|
||||
|
||||
This program my be redistributed under the terms of the
|
||||
GNU General Public Licence, version 2, or at your preference,
|
||||
any later version.
|
||||
|
||||
(this assuming there's no problem with libmng not being GPL...)
|
||||
|
||||
|
||||
this is an SDL based mng player. the code is very rough;
|
||||
patches welcome.
|
||||
|
||||
|
||||
GRR 20010708: added SDL/libmng/zlib/libjpeg version info, mouse-click
|
||||
handling (alternate quit mode); improved automake setup
|
||||
|
||||
Raphael Assenat <raph :at: raphnet.net>
|
||||
2003/11/26: added command line options to run in alternate color depths.
|
||||
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <libmng.h>
|
||||
|
||||
#include <libgen.h> // basename
|
||||
|
||||
|
||||
#define DEFAULT_SDL_VIDEO_DEPTH 32
|
||||
|
||||
/* structure for keeping track of our mng stream inside the callbacks */
|
||||
typedef struct {
|
||||
FILE *file; /* pointer to the file we're decoding */
|
||||
char *filename; /* pointer to the file's path/name */
|
||||
SDL_Surface *surface; /* SDL display */
|
||||
mng_uint32 delay; /* ticks to wait before resuming decode */
|
||||
int sdl_video_depth; /* The depth for SDL_SetVideoMode */
|
||||
} mngstuff;
|
||||
|
||||
/* callbacks for the mng decoder */
|
||||
|
||||
/* memory allocation; data must be zeroed */
|
||||
mng_ptr mymngalloc(mng_uint32 size)
|
||||
{
|
||||
return (mng_ptr)calloc(1, size);
|
||||
}
|
||||
|
||||
/* memory deallocation */
|
||||
void mymngfree(mng_ptr p, mng_uint32 size)
|
||||
{
|
||||
free(p);
|
||||
return;
|
||||
}
|
||||
|
||||
mng_bool mymngopenstream(mng_handle mng)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
|
||||
/* look up our stream struct */
|
||||
mymng = (mngstuff*)mng_get_userdata(mng);
|
||||
|
||||
/* open the file */
|
||||
mymng->file = fopen(mymng->filename, "rb");
|
||||
if (mymng->file == NULL) {
|
||||
fprintf(stderr, "unable to open '%s'\n", mymng->filename);
|
||||
return MNG_FALSE;
|
||||
}
|
||||
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
mng_bool mymngclosestream(mng_handle mng)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
|
||||
/* look up our stream struct */
|
||||
mymng = (mngstuff*)mng_get_userdata(mng);
|
||||
|
||||
/* close the file */
|
||||
fclose(mymng->file);
|
||||
mymng->file = NULL; /* for safety */
|
||||
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
/* feed data to the decoder */
|
||||
mng_bool mymngreadstream(mng_handle mng, mng_ptr buffer,
|
||||
mng_uint32 size, mng_uint32 *bytesread)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
|
||||
/* look up our stream struct */
|
||||
mymng = (mngstuff*)mng_get_userdata(mng);
|
||||
|
||||
/* read the requested amount of data from the file */
|
||||
*bytesread = fread(buffer, 1, size, mymng->file);
|
||||
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
/* the header's been read. set up the display stuff */
|
||||
mng_bool mymngprocessheader(mng_handle mng,
|
||||
mng_uint32 width, mng_uint32 height)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
SDL_Surface *screen;
|
||||
char title[256];
|
||||
|
||||
// fprintf(stderr, "our mng is %dx%d\n", width,height);
|
||||
|
||||
/* retreive our user data */
|
||||
mymng = (mngstuff*)mng_get_userdata(mng);
|
||||
|
||||
screen = SDL_SetVideoMode(width,height, mymng->sdl_video_depth, SDL_SWSURFACE);
|
||||
if (screen == NULL) {
|
||||
fprintf(stderr, "unable to allocate %dx%d video memory: %s\n",
|
||||
width, height, SDL_GetError());
|
||||
return MNG_FALSE;
|
||||
}
|
||||
|
||||
printf("SDL Video Mode: %dx%d bpp=%d\n", width, height, mymng->sdl_video_depth);
|
||||
|
||||
/* save the surface pointer */
|
||||
mymng->surface = screen;
|
||||
|
||||
/* set a descriptive window title */
|
||||
snprintf(title, 256, "mngplay: %s", mymng->filename);
|
||||
SDL_WM_SetCaption(title, "mngplay");
|
||||
|
||||
/* in necessary, lock the drawing surface to the decoder
|
||||
can safely fill it. We'll unlock elsewhere before display */
|
||||
if (SDL_MUSTLOCK(mymng->surface)) {
|
||||
if ( SDL_LockSurface(mymng->surface) < 0 ) {
|
||||
fprintf(stderr, "could not lock display surface\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
printf("RGBA Masks: %08X %08X %08X %08X\n",
|
||||
mymng->surface->format->Rmask,
|
||||
mymng->surface->format->Gmask,
|
||||
mymng->surface->format->Bmask,
|
||||
mymng->surface->format->Amask);
|
||||
printf("RGBA Shifts: %08X %08X %08X %08X\n",
|
||||
mymng->surface->format->Rshift,
|
||||
mymng->surface->format->Gshift,
|
||||
mymng->surface->format->Bshift,
|
||||
mymng->surface->format->Ashift);
|
||||
*/
|
||||
/* Choose a canvas style which matches the SDL_Surface pixel format */
|
||||
switch(mymng->surface->format->BitsPerPixel)
|
||||
{
|
||||
case 32:
|
||||
if (mymng->surface->format->Amask==0) {
|
||||
/* No alpha (padding byte) */
|
||||
if (mymng->surface->format->Bshift==0) {
|
||||
/* Blue first */
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_BGRX8);
|
||||
} else {
|
||||
/* Red first */
|
||||
fprintf(stderr, "No matching mng canvas for sdl pixel format. Colors may be wrong.\n");
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_BGRX8);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Real alpha */
|
||||
if (mymng->surface->format->Bshift==0) {
|
||||
/* Blue first */
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_BGRA8);
|
||||
} else {
|
||||
/* Red first */
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_RGBA8);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
if (mymng->surface->format->Amask==0) {
|
||||
/* No alpha here should mean true rgb24bit */
|
||||
if (mymng->surface->format->Bshift==0) {
|
||||
/* Blue first */
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_BGR8);
|
||||
} else {
|
||||
/* Red first */
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_RGB8);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* If there is an alpha and we are in 24 bpp, this must
|
||||
* mean rgb5658 */
|
||||
if (mymng->surface->format->Bshift==0) {
|
||||
/* Blue first */
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_BGRA565);
|
||||
} else {
|
||||
/* Red first */
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_RGBA565);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
if (mymng->surface->format->Bshift==0) {
|
||||
/* Blue first */
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_BGR565);
|
||||
} else {
|
||||
/* Red first */
|
||||
mng_set_canvasstyle(mng, MNG_CANVAS_RGB565);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return MNG_FALSE;
|
||||
}
|
||||
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
/* return a row pointer for the decoder to fill */
|
||||
mng_ptr mymnggetcanvasline(mng_handle mng, mng_uint32 line)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
SDL_Surface *surface;
|
||||
mng_ptr row;
|
||||
|
||||
/* dereference our structure */
|
||||
mymng = (mngstuff*)mng_get_userdata(mng);
|
||||
|
||||
/* we assume any necessary locking has happened
|
||||
outside, in the frame level code */
|
||||
row = mymng->surface->pixels + mymng->surface->pitch*line;
|
||||
|
||||
// fprintf(stderr, " returning pointer to line %d (%p)\n", line, row);
|
||||
|
||||
return (row);
|
||||
}
|
||||
|
||||
/* timer */
|
||||
mng_uint32 mymnggetticks(mng_handle mng)
|
||||
{
|
||||
mng_uint32 ticks;
|
||||
|
||||
ticks = (mng_uint32)SDL_GetTicks();
|
||||
// fprintf(stderr, " %d\t(returning tick count)\n",ticks);
|
||||
|
||||
return(ticks);
|
||||
}
|
||||
|
||||
mng_bool mymngrefresh(mng_handle mng, mng_uint32 x, mng_uint32 y,
|
||||
mng_uint32 w, mng_uint32 h)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
SDL_Rect frame;
|
||||
|
||||
frame.x = x;
|
||||
frame.y = y;
|
||||
frame.w = w;
|
||||
frame.h = h;
|
||||
|
||||
/* dereference our structure */
|
||||
mymng = (mngstuff*)mng_get_userdata(mng);
|
||||
|
||||
/* if necessary, unlock the display */
|
||||
if (SDL_MUSTLOCK(mymng->surface)) {
|
||||
SDL_UnlockSurface(mymng->surface);
|
||||
}
|
||||
|
||||
/* refresh the screen with the new frame */
|
||||
SDL_UpdateRects(mymng->surface, 1, &frame);
|
||||
|
||||
/* in necessary, relock the drawing surface */
|
||||
if (SDL_MUSTLOCK(mymng->surface)) {
|
||||
if ( SDL_LockSurface(mymng->surface) < 0 ) {
|
||||
fprintf(stderr, "could not lock display surface\n");
|
||||
return MNG_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
/* interframe delay callback */
|
||||
mng_bool mymngsettimer(mng_handle mng, mng_uint32 msecs)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
|
||||
// fprintf(stderr," pausing for %d ms\n", msecs);
|
||||
|
||||
/* look up our stream struct */
|
||||
mymng = (mngstuff*)mng_get_userdata(mng);
|
||||
|
||||
/* set the timer for when the decoder wants to be woken */
|
||||
mymng->delay = msecs;
|
||||
|
||||
return MNG_TRUE;
|
||||
|
||||
}
|
||||
|
||||
mng_bool mymngerror(mng_handle mng, mng_int32 code, mng_int8 severity,
|
||||
mng_chunkid chunktype, mng_uint32 chunkseq,
|
||||
mng_int32 extra1, mng_int32 extra2, mng_pchar text)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
char chunk[5];
|
||||
|
||||
/* dereference our data so we can get the filename */
|
||||
mymng = (mngstuff*)mng_get_userdata(mng);
|
||||
|
||||
/* pull out the chuck type as a string */
|
||||
// FIXME: does this assume unsigned char?
|
||||
chunk[0] = (char)((chunktype >> 24) & 0xFF);
|
||||
chunk[1] = (char)((chunktype >> 16) & 0xFF);
|
||||
chunk[2] = (char)((chunktype >> 8) & 0xFF);
|
||||
chunk[3] = (char)((chunktype ) & 0xFF);
|
||||
chunk[4] = '\0';
|
||||
|
||||
/* output the error */
|
||||
fprintf(stderr, "error playing '%s' chunk %s (%d):\n",
|
||||
mymng->filename, chunk, chunkseq);
|
||||
fprintf(stderr, "%s\n", text);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int mymngquit(mng_handle mng)
|
||||
{
|
||||
mngstuff *mymng;
|
||||
|
||||
/* dereference our data so we can free it */
|
||||
mymng = (mngstuff*)mng_get_userdata(mng);
|
||||
|
||||
/* cleanup. this will call mymngclosestream */
|
||||
mng_cleanup(&mng);
|
||||
|
||||
/* free our data */
|
||||
free(mymng);
|
||||
|
||||
/* quit */
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int checkevents(mng_handle mng)
|
||||
{
|
||||
SDL_Event event;
|
||||
|
||||
/* check if there's an event pending */
|
||||
if (!SDL_PollEvent(&event)) {
|
||||
return 0; /* no events pending */
|
||||
}
|
||||
|
||||
/* we have an event; process it */
|
||||
switch (event.type) {
|
||||
case SDL_QUIT:
|
||||
mymngquit(mng); /* quit */
|
||||
break;
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
mymngquit(mng);
|
||||
break;
|
||||
case SDL_KEYUP:
|
||||
switch (event.key.keysym.sym) {
|
||||
case SDLK_ESCAPE:
|
||||
case SDLK_q:
|
||||
mymngquit(mng);
|
||||
break;
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0; /* GRR ADDED: non-void function */
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
mngstuff *mymng;
|
||||
mng_handle mng;
|
||||
SDL_Rect updaterect;
|
||||
|
||||
if (argc < 2) {
|
||||
const SDL_version *pSDLver = SDL_Linked_Version();
|
||||
|
||||
fprintf(stderr, "Usage: %s mngfile [depth]\n\n", basename(argv[0]));
|
||||
fprintf(stderr, " where 'depth' is 15,16,24 or 32\n");
|
||||
fprintf(stderr,
|
||||
" Compiled with SDL %d.%d.%d; using SDL %d.%d.%d.\n",
|
||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL,
|
||||
pSDLver->major, pSDLver->minor, pSDLver->patch);
|
||||
fprintf(stderr, " Compiled with libmng %s; using libmng %s.\n",
|
||||
MNG_VERSION_TEXT, mng_version_text());
|
||||
fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n",
|
||||
ZLIB_VERSION, zlib_version);
|
||||
#ifdef JPEG_LIB_VERSION
|
||||
{
|
||||
int major = JPEG_LIB_VERSION / 10;
|
||||
int minor = JPEG_LIB_VERSION % 10;
|
||||
char minoralpha[2];
|
||||
|
||||
if (minor) {
|
||||
minoralpha[0] = (char)(minor - 1 + 'a');
|
||||
minoralpha[1] = '\0';
|
||||
} else
|
||||
minoralpha[0] = '\0';
|
||||
fprintf(stderr, " Compiled with libjpeg %d%s.\n",
|
||||
major, minoralpha);
|
||||
}
|
||||
#endif
|
||||
fprintf(stderr,
|
||||
"\nPress Esc or Q, or click mouse button, to quit.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* allocate our stream data structure */
|
||||
mymng = (mngstuff*)calloc(1, sizeof(*mymng));
|
||||
if (mymng == NULL) {
|
||||
fprintf(stderr, "could not allocate stream structure.\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* pass the name of the file we want to play */
|
||||
mymng->filename = argv[1];
|
||||
|
||||
/* pass the color depth we wish to use */
|
||||
if (argc>=3) {
|
||||
mymng->sdl_video_depth = atoi(argv[2]);
|
||||
switch(mymng->sdl_video_depth) {
|
||||
case 15:
|
||||
case 16:
|
||||
case 24:
|
||||
case 32:
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported color depth. Choices are: 15, 16, 24 and 32\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
mymng->sdl_video_depth = DEFAULT_SDL_VIDEO_DEPTH;
|
||||
}
|
||||
|
||||
/* set up the mng decoder for our stream */
|
||||
mng = mng_initialize(mymng, mymngalloc, mymngfree, MNG_NULL);
|
||||
if (mng == MNG_NULL) {
|
||||
fprintf(stderr, "could not initialize libmng.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* set the callbacks */
|
||||
mng_setcb_errorproc(mng, mymngerror);
|
||||
mng_setcb_openstream(mng, mymngopenstream);
|
||||
mng_setcb_closestream(mng, mymngclosestream);
|
||||
mng_setcb_readdata(mng, mymngreadstream);
|
||||
mng_setcb_gettickcount(mng, mymnggetticks);
|
||||
mng_setcb_settimer(mng, mymngsettimer);
|
||||
mng_setcb_processheader(mng, mymngprocessheader);
|
||||
mng_setcb_getcanvasline(mng, mymnggetcanvasline);
|
||||
mng_setcb_refresh(mng, mymngrefresh);
|
||||
/* FIXME: should check for errors here */
|
||||
|
||||
/* initialize SDL */
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
fprintf(stderr, "%s: Unable to initialize SDL (%s)\n",
|
||||
argv[0], SDL_GetError());
|
||||
exit(1);
|
||||
}
|
||||
/* arrange to call the shutdown routine before we exit */
|
||||
atexit(SDL_Quit);
|
||||
|
||||
/* restrict event handling to the relevant bits */
|
||||
SDL_EventState(SDL_KEYDOWN, SDL_IGNORE); /* keyup only */
|
||||
SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
|
||||
// SDL_EventState(SDL_MOUSEBUTTONDOWN, SDL_IGNORE);
|
||||
// SDL_EventState(SDL_MOUSEBUTTONUP, SDL_IGNORE);
|
||||
|
||||
// fprintf(stderr, "playing mng...maybe.\n");
|
||||
|
||||
mng_readdisplay(mng);
|
||||
|
||||
/* loop though the frames */
|
||||
while (mymng->delay) {
|
||||
// fprintf(stderr, " waiting for %d ms\n", mymng->delay);
|
||||
SDL_Delay(mymng->delay);
|
||||
|
||||
/* reset the delay in case the decoder
|
||||
doesn't update it again */
|
||||
mymng->delay = 0;
|
||||
|
||||
mng_display_resume(mng);
|
||||
|
||||
/* check for user input (just quit at this point) */
|
||||
checkevents(mng);
|
||||
}
|
||||
|
||||
/* ¿hay alguno? pause before quitting */
|
||||
fprintf(stderr, "pausing before shutdown...\n");
|
||||
SDL_Delay(1000);
|
||||
|
||||
/* cleanup and quit */
|
||||
mymngquit(mng);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
PROC=athlon
|
||||
CFLAGS=-g -Wall -O2 -march=$(PROC) -mcpu=$(PROC)
|
||||
MOTIFLIB=/usr/local/lesstif/lib
|
||||
MOTIFINC=/usr/local/lesstif/include
|
||||
MNGLIB=-lmng
|
||||
LIBS=-L/usr/X11R6/lib -L$(MOTIFLIB) -lXm -lXt -lX11 $(MNGLIB) -lm
|
||||
INC=-I/usr/X11R6/include -I$(MOTIFINC)
|
||||
CC=gcc
|
||||
LDFLAGS=
|
||||
|
||||
all: clean compile
|
||||
|
||||
compile:
|
||||
$(CC) $(CFLAGS) $(INC) color.c xmngview.c -o xmngview $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f xmngview core
|
||||
|
||||
install:
|
||||
cp -a xmngview /usr/local/bin/xmngview
|
||||
@@ -0,0 +1,23 @@
|
||||
Program:
|
||||
========
|
||||
|
||||
'xmngview' displays MNG/JNG/PNG files. The program can be called
|
||||
|
||||
xmngview
|
||||
xmngview filename
|
||||
|
||||
This program is used within a plugin library for a browser:
|
||||
xmngview -wWINDOWID -bgBGPIXEL filename
|
||||
|
||||
Limitations:
|
||||
============
|
||||
needs Lesstif/Motif, i.e. '-lXm -lXt -lX11'.
|
||||
depth >= 8 (tested with 8bpp, 16bpp, 24bpp)
|
||||
perhaps INTEL only
|
||||
perhaps LINUX only
|
||||
|
||||
libmng:
|
||||
=======
|
||||
read the first lines of xmngview.c
|
||||
|
||||
szukw000, March 2003
|
||||
@@ -0,0 +1,645 @@
|
||||
/*
|
||||
* This code is mainly code I have found in
|
||||
* ida-0.14 Gerd Knorr <kraxel@bytesex.org>
|
||||
* http://bytesex.org/ida
|
||||
* Ida is a small and fast image viewer, motif-based.
|
||||
*
|
||||
* Copyright (C) 2002 Gerd Knorr <kraxel@bytesex.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include <libmng.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
|
||||
#include "xmng.h"
|
||||
|
||||
static void (*dither_line)(unsigned char *src, unsigned char *dest,
|
||||
unsigned int y, unsigned int width);
|
||||
static void dither_line_gray(unsigned char *src, unsigned char *dest,
|
||||
unsigned int y, unsigned int width);
|
||||
static void dither_line_color(unsigned char *src, unsigned char *dest,
|
||||
unsigned int y, unsigned int width);
|
||||
static void init_dither(int shades_r, int shades_g, int shades_b,
|
||||
int shades_gray);
|
||||
|
||||
static XVisualInfo *vis_info;
|
||||
|
||||
/* PseudoColor: ditherresult => colormap-entry
|
||||
*/
|
||||
static int x11_colors;
|
||||
static int x11_grays;
|
||||
static unsigned long *x11_map;
|
||||
static unsigned long x11_map_color[256];
|
||||
static unsigned long x11_map_gray[64];
|
||||
|
||||
static unsigned long x11_red;
|
||||
static unsigned long x11_green;
|
||||
static unsigned long x11_blue;
|
||||
|
||||
static int try_red[] = {4, 6, 6, 5, 4};
|
||||
static int try_green[] = {8, 6, 6, 5, 4};
|
||||
static int try_blue[] = {4, 6, 4, 5, 4};
|
||||
|
||||
/* TrueColor: r,g,b => X11-color
|
||||
*/
|
||||
static unsigned long x11_lut_red[256];
|
||||
static unsigned long x11_lut_green[256];
|
||||
static unsigned long x11_lut_blue[256];
|
||||
static unsigned long x11_lut_gray[256];
|
||||
|
||||
#define x11_black x11_map_gray[0]
|
||||
#define x11_gray x11_map_gray[47*x11_grays/64]
|
||||
#define x11_lightgray x11_map_gray[55*x11_grays/64]
|
||||
#define x11_white x11_map_gray[63*x11_grays/64]
|
||||
|
||||
static int x11_alloc_grays(Display * dpy, Colormap cmap, unsigned long *colors,
|
||||
int gray)
|
||||
{
|
||||
XColor akt_color;
|
||||
int i, upb;
|
||||
upb = gray - 1;
|
||||
|
||||
for (i = 0; i < gray; i++)
|
||||
{
|
||||
/* FIXME: original code
|
||||
akt_color.red = i * 65535 / upb;
|
||||
akt_color.green = i * 65535 / upb;
|
||||
akt_color.blue = i * 65535 / upb;
|
||||
*/
|
||||
akt_color.red = i * 255 / upb;
|
||||
akt_color.green = i * 255 / upb;
|
||||
akt_color.blue = i * 255 / upb;
|
||||
|
||||
if (!XAllocColor(dpy, cmap, &akt_color))
|
||||
{
|
||||
/* no free color cell available
|
||||
*/
|
||||
XFreeColors(dpy, cmap, colors, i, 0);
|
||||
return 1;
|
||||
}
|
||||
colors[i] = akt_color.pixel;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int x11_alloc_colorcube(Display * dpy, Colormap cmap,
|
||||
unsigned long *colors, int red, int green, int blue)
|
||||
{
|
||||
XColor akt_color;
|
||||
int i, upb_r, upb_g, upb_b;
|
||||
|
||||
upb_r = red - 1; upb_g = green - 1; upb_b = blue - 1;
|
||||
|
||||
for (i = 0; i < red * green * blue; i++)
|
||||
{
|
||||
akt_color.red = ((i / (green * blue)) % red) * 65535 / upb_r;
|
||||
akt_color.green = ((i / blue) % green) * 65535 / upb_g;
|
||||
akt_color.blue = (i % blue) * 65535 / upb_b;
|
||||
|
||||
if (!XAllocColor(dpy, cmap, &akt_color))
|
||||
{
|
||||
/* no free color cell available
|
||||
*/
|
||||
XFreeColors(dpy, cmap, colors, i, 0);
|
||||
return 1;
|
||||
}
|
||||
colors[i] = akt_color.pixel;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long x11_alloc_color(Display * dpy, Colormap cmap, int red,
|
||||
int green, int blue)
|
||||
{
|
||||
XColor akt_color;
|
||||
|
||||
akt_color.red = red;
|
||||
akt_color.green = green;
|
||||
akt_color.blue = blue;
|
||||
|
||||
XAllocColor(dpy, cmap, &akt_color);
|
||||
return akt_color.pixel;
|
||||
}
|
||||
|
||||
static void x11_create_lut(unsigned long red_mask,
|
||||
unsigned long green_mask,
|
||||
unsigned long blue_mask)
|
||||
{
|
||||
int rgb_red_bits = 0;
|
||||
int rgb_red_shift = 0;
|
||||
int rgb_green_bits = 0;
|
||||
int rgb_green_shift = 0;
|
||||
int rgb_blue_bits = 0;
|
||||
int rgb_blue_shift = 0;
|
||||
int i;
|
||||
unsigned long mask;
|
||||
|
||||
for (i = 0; i < 24; i++)
|
||||
{
|
||||
mask = (1 << i);
|
||||
if (red_mask & mask)
|
||||
rgb_red_bits++;
|
||||
else
|
||||
if (!rgb_red_bits)
|
||||
rgb_red_shift++;
|
||||
if (green_mask & mask)
|
||||
rgb_green_bits++;
|
||||
else
|
||||
if (!rgb_green_bits)
|
||||
rgb_green_shift++;
|
||||
|
||||
if (blue_mask & mask)
|
||||
rgb_blue_bits++;
|
||||
else
|
||||
if (!rgb_blue_bits)
|
||||
rgb_blue_shift++;
|
||||
}
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
x11_lut_red[i] = (i >> (8 - rgb_red_bits)) << rgb_red_shift;
|
||||
x11_lut_green[i] = (i >> (8 - rgb_green_bits)) << rgb_green_shift;
|
||||
x11_lut_blue[i] = (i >> (8 - rgb_blue_bits)) << rgb_blue_shift;
|
||||
x11_lut_gray[i] =
|
||||
x11_lut_red[i] | x11_lut_green[i] | x11_lut_blue[i];
|
||||
}
|
||||
}
|
||||
|
||||
void x11_init_color(ImageInfo *img)
|
||||
{
|
||||
Colormap cmap;
|
||||
XVisualInfo vis_template;
|
||||
int found, vis_class;
|
||||
unsigned int i;
|
||||
Display *dpy;
|
||||
|
||||
dpy = img->dpy;
|
||||
cmap = DefaultColormap(dpy, DefaultScreen(dpy));
|
||||
if (0 == x11_grays)
|
||||
x11_grays = 8;
|
||||
|
||||
/* Ask for visual type
|
||||
*/
|
||||
vis_template.screen = XDefaultScreen(dpy);
|
||||
vis_template.visualid =
|
||||
XVisualIDFromVisual(img->visual);
|
||||
vis_info =
|
||||
XGetVisualInfo(dpy, VisualIDMask | VisualScreenMask, &vis_template,
|
||||
&found);
|
||||
if (XShmQueryExtension(dpy))
|
||||
img->have_shmem = 1;
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
vis_class = vis_info->c_class;
|
||||
#else
|
||||
vis_class = vis_info->class;
|
||||
#endif
|
||||
if(vis_class == TrueColor)
|
||||
{
|
||||
img->gray = 0; /* XXX testing... */
|
||||
img->display_depth = 4;
|
||||
img->display_type = TRUECOLOR;
|
||||
|
||||
x11_create_lut(vis_info->red_mask, vis_info->green_mask,
|
||||
vis_info->blue_mask);
|
||||
x11_black = x11_alloc_color(dpy, cmap, 0, 0, 0);
|
||||
x11_gray = x11_alloc_color(dpy, cmap, 0xc000, 0xc000, 0xc000);
|
||||
x11_lightgray = x11_alloc_color(dpy, cmap, 0xe000, 0xe000, 0xe000);
|
||||
x11_white = x11_alloc_color(dpy, cmap, 0xffff, 0xffff, 0xffff);
|
||||
}
|
||||
else
|
||||
if(vis_class == PseudoColor && vis_info->depth == 8)
|
||||
{
|
||||
img->display_depth = 1;
|
||||
img->display_type = PSEUDOCOLOR;
|
||||
if (0 != x11_alloc_grays(dpy, cmap, x11_map_gray, x11_grays))
|
||||
{
|
||||
fprintf(stderr, "%s:%d:Sorry, can't allocate %d grays\n",
|
||||
__FILE__,__LINE__,x11_grays);
|
||||
Viewer_postlude();
|
||||
exit(1);
|
||||
}
|
||||
if (!img->gray)
|
||||
{
|
||||
for (i = 0; i < sizeof(try_red) / sizeof(int); i++)
|
||||
{
|
||||
if (0 == x11_alloc_colorcube
|
||||
(dpy, cmap, x11_map_color,
|
||||
try_red[i], try_green[i], try_blue[i]))
|
||||
{
|
||||
x11_colors = try_red[i] * try_green[i] * try_blue[i];
|
||||
|
||||
init_dither(try_red[i], try_green[i], try_blue[i], x11_grays);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == sizeof(try_red) / sizeof(int))
|
||||
{
|
||||
img->gray = 1;
|
||||
fputs("failed to allocate colors, using grayscaled\n", stderr);
|
||||
}
|
||||
}
|
||||
if (img->gray)
|
||||
init_dither(2, 2, 2, x11_grays);
|
||||
}
|
||||
else
|
||||
if(vis_class == StaticGray || vis_class == GrayScale)
|
||||
{
|
||||
img->display_depth = 1;
|
||||
img->display_type = PSEUDOCOLOR;
|
||||
x11_grays = 64;
|
||||
img->gray = 1;
|
||||
|
||||
init_dither(2, 2, 2, x11_grays);
|
||||
|
||||
if (0 != x11_alloc_grays(dpy, cmap, x11_map_gray, x11_grays))
|
||||
{
|
||||
fprintf(stderr, "%s:%d: Sorry, can't allocate %d grays\n",
|
||||
__FILE__,__LINE__, x11_grays);
|
||||
Viewer_postlude();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "%s:%d: Sorry, can't handle visual\n", __FILE__,__LINE__);
|
||||
Viewer_postlude();
|
||||
exit(1);
|
||||
}
|
||||
/* some common colors
|
||||
*/
|
||||
x11_red = x11_alloc_color(dpy, cmap, 65535, 0, 0);
|
||||
x11_green = x11_alloc_color(dpy, cmap, 0, 65535, 0);
|
||||
x11_blue = x11_alloc_color(dpy, cmap, 0, 0, 65535);
|
||||
|
||||
if (img->gray)
|
||||
{
|
||||
x11_map = x11_map_gray;
|
||||
|
||||
dither_line = dither_line_gray;
|
||||
}
|
||||
else
|
||||
{
|
||||
x11_map = x11_map_color;
|
||||
|
||||
dither_line = dither_line_color;
|
||||
}
|
||||
}
|
||||
|
||||
static int mitshm_bang = 0;
|
||||
|
||||
static int x11_error_dev_null(Display * dpy, XErrorEvent * event)
|
||||
{
|
||||
mitshm_bang = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
XImage *x11_create_ximage(ImageInfo *img)
|
||||
{
|
||||
XImage *ximage = NULL;
|
||||
unsigned char *data;
|
||||
XShmSegmentInfo *shminfo = NULL;
|
||||
int (*old_handler)(Display * dpy, XErrorEvent * event);
|
||||
|
||||
if (img->have_shmem)
|
||||
{
|
||||
old_handler = XSetErrorHandler(x11_error_dev_null);
|
||||
img->shm = shminfo = (XShmSegmentInfo*)malloc(sizeof(XShmSegmentInfo));
|
||||
memset(shminfo, 0, sizeof(XShmSegmentInfo));
|
||||
ximage = XShmCreateImage(img->dpy,
|
||||
img->visual,
|
||||
img->depth,
|
||||
ZPixmap, NULL,
|
||||
shminfo, img->img_width, img->img_height);
|
||||
if (ximage)
|
||||
{
|
||||
shminfo->shmid = shmget(IPC_PRIVATE,
|
||||
ximage->bytes_per_line * ximage->height,
|
||||
IPC_CREAT | 0777);
|
||||
|
||||
if (-1 == shminfo->shmid)
|
||||
{
|
||||
fprintf(stderr,"shmget(%dMB): %s\n",
|
||||
ximage->bytes_per_line * ximage->height / 1024 / 1024,
|
||||
strerror(errno));
|
||||
goto oom;
|
||||
}
|
||||
shminfo->shmaddr = (char *) shmat(shminfo->shmid, 0, 0);
|
||||
|
||||
if ((void *) -1 == shminfo->shmaddr)
|
||||
{
|
||||
perror("shmat");
|
||||
goto oom;
|
||||
}
|
||||
ximage->data = shminfo->shmaddr;
|
||||
shminfo->readOnly = False;
|
||||
|
||||
XShmAttach(img->dpy, shminfo);
|
||||
XSync(img->dpy, False);
|
||||
shmctl(shminfo->shmid, IPC_RMID, 0);
|
||||
|
||||
if (mitshm_bang)
|
||||
{
|
||||
img->have_shmem = 0;
|
||||
shmdt(shminfo->shmaddr);
|
||||
free(shminfo);
|
||||
img->shm = shminfo = NULL;
|
||||
XDestroyImage(ximage);
|
||||
ximage = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
img->have_shmem = 0;
|
||||
free(shminfo);
|
||||
img->shm = shminfo = NULL;
|
||||
}
|
||||
XSetErrorHandler(old_handler);
|
||||
}
|
||||
|
||||
if (ximage == NULL)
|
||||
{
|
||||
img->shm = NULL;
|
||||
if (NULL == (data = (unsigned char*)
|
||||
malloc(img->img_width * img->img_height * img->display_depth)))
|
||||
{
|
||||
fprintf(stderr,"Oops: out of memory\n");
|
||||
goto oom;
|
||||
}
|
||||
ximage = XCreateImage(img->dpy,
|
||||
img->visual,
|
||||
img->depth,
|
||||
ZPixmap, 0, (char*)data,
|
||||
img->img_width, img->img_height,
|
||||
8, 0);
|
||||
}
|
||||
memset(ximage->data, 0, ximage->bytes_per_line * ximage->height);
|
||||
|
||||
return ximage;
|
||||
|
||||
oom:
|
||||
if (shminfo)
|
||||
{
|
||||
if (shminfo->shmid && shminfo->shmid != -1)
|
||||
shmctl(shminfo->shmid, IPC_RMID, 0);
|
||||
free(shminfo);
|
||||
}
|
||||
if (ximage)
|
||||
XDestroyImage(ximage);
|
||||
img->shm = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void x11_destroy_ximage(ImageInfo *img)
|
||||
{
|
||||
XShmSegmentInfo *shminfo = (XShmSegmentInfo*)img->shm;
|
||||
|
||||
if (shminfo)
|
||||
{
|
||||
XShmDetach(img->dpy, shminfo);
|
||||
XDestroyImage(img->ximage);
|
||||
shmdt(shminfo->shmaddr);
|
||||
free(shminfo);
|
||||
}
|
||||
else
|
||||
XDestroyImage(img->ximage);
|
||||
}
|
||||
/*
|
||||
* ordered dither routines
|
||||
*
|
||||
* stolen from The GIMP and trimmed for speed
|
||||
*/
|
||||
#define DITHER_LEVEL 8
|
||||
|
||||
static long red_mult, green_mult;
|
||||
static long red_dither[256];
|
||||
static long green_dither[256];
|
||||
static long blue_dither[256];
|
||||
static long gray_dither[256];
|
||||
|
||||
typedef unsigned long vector[DITHER_LEVEL];
|
||||
typedef vector matrix[DITHER_LEVEL];
|
||||
|
||||
#if DITHER_LEVEL == 8
|
||||
#define DITHER_MASK 7
|
||||
static matrix origDM =
|
||||
{
|
||||
{0, 32, 8, 40, 2, 34, 10, 42},
|
||||
{48, 16, 56, 24, 50, 18, 58, 26},
|
||||
{12, 44, 4, 36, 14, 46, 6, 38},
|
||||
{60, 28, 52, 20, 62, 30, 54, 22},
|
||||
{3, 35, 11, 43, 1, 33, 9, 41},
|
||||
{51, 19, 59, 27, 49, 17, 57, 25},
|
||||
{15, 47, 7, 39, 13, 45, 5, 37},
|
||||
{63, 31, 55, 23, 61, 29, 53, 21}
|
||||
};
|
||||
static matrix DM;
|
||||
|
||||
#endif /* DITHER_LEVEL == 8 */
|
||||
|
||||
#if DITHER_LEVEL == 4
|
||||
#define DITHER_MASK 3
|
||||
static matrix origDM =
|
||||
{
|
||||
{0, 8, 2, 10},
|
||||
{12, 4, 14, 6},
|
||||
{3, 11, 1, 9},
|
||||
{15, 7, 13, 5}
|
||||
};
|
||||
static matrix DM;
|
||||
|
||||
#endif
|
||||
|
||||
static void init_dither(int shades_r, int shades_g, int shades_b,
|
||||
int shades_gray)
|
||||
{
|
||||
int i, j;
|
||||
unsigned char low_shade, high_shade;
|
||||
unsigned short index;
|
||||
float red_colors_per_shade;
|
||||
float green_colors_per_shade;
|
||||
float blue_colors_per_shade;
|
||||
float gray_colors_per_shade;
|
||||
|
||||
red_mult = shades_g * shades_b;
|
||||
green_mult = shades_b;
|
||||
|
||||
red_colors_per_shade = 256.0 / (shades_r - 1);
|
||||
green_colors_per_shade = 256.0 / (shades_g - 1);
|
||||
blue_colors_per_shade = 256.0 / (shades_b - 1);
|
||||
gray_colors_per_shade = 256.0 / (shades_gray - 1);
|
||||
|
||||
/* this avoids a shift when checking these values
|
||||
*/
|
||||
memcpy(DM, origDM, sizeof(unsigned long)*DITHER_LEVEL*DITHER_LEVEL);
|
||||
for (i = 0; i < DITHER_LEVEL; i++)
|
||||
for (j = 0; j < DITHER_LEVEL; j++)
|
||||
DM[i][j] *= 0x10000;
|
||||
|
||||
/* setup arrays containing three bytes of information for red, green, & blue
|
||||
* the arrays contain :
|
||||
* 1st byte: low end shade value
|
||||
* 2nd byte: high end shade value
|
||||
* 3rd & 4th bytes: ordered dither matrix index
|
||||
*/
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
/* setup the red information
|
||||
*/
|
||||
low_shade = (unsigned char) (i / red_colors_per_shade);
|
||||
high_shade = low_shade + 1;
|
||||
|
||||
index = (unsigned short)
|
||||
(((i - low_shade * red_colors_per_shade) / red_colors_per_shade) *
|
||||
(DITHER_LEVEL * DITHER_LEVEL + 1));
|
||||
|
||||
low_shade *= red_mult;
|
||||
high_shade *= red_mult;
|
||||
|
||||
red_dither[i] = (index << 16) + (high_shade << 8) + (low_shade);
|
||||
|
||||
/* setup the green information
|
||||
*/
|
||||
low_shade = (unsigned char) (i / green_colors_per_shade);
|
||||
high_shade = low_shade + 1;
|
||||
|
||||
index = (unsigned short)
|
||||
(((i - low_shade * green_colors_per_shade) / green_colors_per_shade) *
|
||||
(DITHER_LEVEL * DITHER_LEVEL + 1));
|
||||
|
||||
low_shade *= green_mult;
|
||||
high_shade *= green_mult;
|
||||
|
||||
green_dither[i] = (index << 16) + (high_shade << 8) + (low_shade);
|
||||
|
||||
/* setup the blue information
|
||||
*/
|
||||
low_shade = (unsigned char) (i / blue_colors_per_shade);
|
||||
high_shade = low_shade + 1;
|
||||
|
||||
index = (unsigned short)
|
||||
(((i - low_shade * blue_colors_per_shade) / blue_colors_per_shade) *
|
||||
(DITHER_LEVEL * DITHER_LEVEL + 1));
|
||||
|
||||
blue_dither[i] = (index << 16) + (high_shade << 8) + (low_shade);
|
||||
|
||||
/* setup the gray information
|
||||
*/
|
||||
low_shade = (unsigned char) (i / gray_colors_per_shade);
|
||||
high_shade = low_shade + 1;
|
||||
|
||||
index = (unsigned short)
|
||||
(((i - low_shade * gray_colors_per_shade) / gray_colors_per_shade) *
|
||||
(DITHER_LEVEL * DITHER_LEVEL + 1));
|
||||
|
||||
gray_dither[i] = (index << 16) + (high_shade << 8) + (low_shade);
|
||||
}
|
||||
}
|
||||
|
||||
static void dither_line_color(unsigned char *src, unsigned char *dest,
|
||||
unsigned int y, unsigned int width)
|
||||
{
|
||||
unsigned long a, b, dval, *ymod;
|
||||
unsigned int x;
|
||||
ymod = DM[y & DITHER_MASK];
|
||||
|
||||
for(x = 0; x < width; x++)
|
||||
{
|
||||
dval = ymod[x & DITHER_MASK];
|
||||
|
||||
b = red_dither[src[0]];
|
||||
if (dval < b)
|
||||
b >>= 8;
|
||||
|
||||
a = green_dither[src[1]];
|
||||
if (dval < a)
|
||||
a >>= 8;
|
||||
b += a;
|
||||
|
||||
a = blue_dither[src[2]];
|
||||
if (dval < a)
|
||||
a >>= 8;
|
||||
b += a;
|
||||
src += RGB_SIZE;
|
||||
*dest++ = (unsigned char)(b & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
static void dither_line_gray(unsigned char *src, unsigned char *dest,
|
||||
unsigned int y, unsigned int width)
|
||||
{
|
||||
unsigned long a, g, *ymod;
|
||||
unsigned int x;
|
||||
|
||||
ymod = DM[y & DITHER_MASK];
|
||||
|
||||
for(x = 0; x < width; x++)
|
||||
{
|
||||
g = (src[0]*3 + src[1]*6 + src[2]) / 10;
|
||||
a = gray_dither[g];
|
||||
src += RGB_SIZE;
|
||||
|
||||
if (ymod[x & DITHER_MASK] < a)
|
||||
a >>= 8;
|
||||
|
||||
*dest++ = a & 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
void viewer_renderline(ImageInfo *img, unsigned char *scanline,
|
||||
unsigned int row, unsigned int x, unsigned int width)
|
||||
{
|
||||
unsigned char *src, *dst;
|
||||
unsigned long pix;
|
||||
XImage *ximage;
|
||||
unsigned int col, max_col;
|
||||
unsigned short mng_rgb_size;
|
||||
|
||||
mng_rgb_size = img->mng_rgb_size;
|
||||
ximage = img->ximage;
|
||||
src = scanline;
|
||||
col = x;
|
||||
max_col = x + width;
|
||||
|
||||
if (img->display_type == PSEUDOCOLOR)
|
||||
{
|
||||
dst = img->dither_line;
|
||||
dither_line(src, dst, row, width);
|
||||
|
||||
while(col < max_col)
|
||||
{
|
||||
XPutPixel(ximage, col, row, x11_map[dst[0]]);
|
||||
++col;
|
||||
++dst;
|
||||
}
|
||||
return;
|
||||
}
|
||||
/* display_type == TRUECOLOR
|
||||
*/
|
||||
while(col < max_col)
|
||||
{
|
||||
pix = x11_lut_red[src[0]] | x11_lut_green[src[1]] | x11_lut_blue[src[2]];
|
||||
|
||||
XPutPixel(ximage, col, row, pix);
|
||||
|
||||
++col;
|
||||
src += RGB_SIZE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
#ifndef _XMNG_H_
|
||||
#define _XMNG_H
|
||||
#define RGB_SIZE 3
|
||||
#define CANVAS_RGB8_SIZE 3
|
||||
#define CANVAS_RGBA8_SIZE 4
|
||||
#define CANVAS_ARGB8_SIZE 4
|
||||
#define CANVAS_RGB8_A8_SIZE 4
|
||||
#define CANVAS_BGR8_SIZE 3
|
||||
#define CANVAS_BGRA8_SIZE 4
|
||||
#define CANVAS_BGRA8PM_SIZE 4
|
||||
#define CANVAS_ABGR8_SIZE 4
|
||||
|
||||
#define MNG_MAGIC "\x8aMNG\x0d\x0a\x1a\x0a"
|
||||
#define JNG_MAGIC "\x8bJNG\x0d\x0a\x1a\x0a"
|
||||
#define PNG_MAGIC "\x89PNG\x0d\x0a\x1a\x0a"
|
||||
#define PSEUDOCOLOR 1
|
||||
#define TRUECOLOR 2
|
||||
|
||||
#define MNG_TYPE 1
|
||||
#define JNG_TYPE 2
|
||||
#define PNG_TYPE 3
|
||||
|
||||
#define SPACE_X 10
|
||||
#define SPACE_Y 10
|
||||
#define BUT_ENTRY_BORDER 0
|
||||
#define FRAME_SHADOW_WIDTH 2
|
||||
#define ANY_WIDTH 4
|
||||
|
||||
#define OK MNG_NOERROR
|
||||
#define MAX_COLORBUF 64
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int frozen:1;
|
||||
unsigned int restarted:1;
|
||||
unsigned int stopped:1;
|
||||
unsigned int single_step_wanted:1;
|
||||
unsigned int single_step_served:1;
|
||||
unsigned int has_bg_color:1;
|
||||
unsigned int has_bg_pixel:1;
|
||||
unsigned int x11_init:1;
|
||||
unsigned int timer_active:1;
|
||||
|
||||
mng_handle user_handle;
|
||||
Widget canvas;
|
||||
int type;
|
||||
XtIntervalId timeout_ID;
|
||||
mng_uint32 counter;
|
||||
mng_uint32 delay;
|
||||
mng_uint32 img_width, img_height;
|
||||
mng_uint32 read_len;
|
||||
mng_uint32 read_pos;
|
||||
unsigned char *read_buf;
|
||||
unsigned char *mng_buf;
|
||||
unsigned char *dither_line;
|
||||
|
||||
Window external_win;
|
||||
Window frame_win;
|
||||
Window control_win;
|
||||
GC gc;
|
||||
Display *dpy;
|
||||
Window win;
|
||||
unsigned short mng_rgb_size;
|
||||
unsigned short mng_bytes_per_line;
|
||||
XImage *ximage;
|
||||
int src_x, src_y;
|
||||
int dst_x, dst_y;
|
||||
unsigned int frame_w, frame_h;
|
||||
|
||||
void *shm;
|
||||
int gray;
|
||||
int display_depth, display_type;
|
||||
int have_shmem;
|
||||
Pixel bg_pixel;
|
||||
unsigned short xbg_red, xbg_green, xbg_blue;
|
||||
unsigned char bg_red, bg_green, bg_blue;
|
||||
Visual *visual;
|
||||
unsigned int depth;
|
||||
/* do not free */
|
||||
struct timeval timer_start;
|
||||
struct timeval timer_end;
|
||||
|
||||
char *read_idf;
|
||||
FILE *reader;
|
||||
int *argc_ptr;
|
||||
char **argv;
|
||||
char bg_color[MAX_COLORBUF];
|
||||
} ImageInfo;
|
||||
|
||||
#define XPUTIMAGE(dpy,dr,gc,xi,a,b,c,d,w,h) \
|
||||
if (have_shmem) \
|
||||
XShmPutImage(dpy,dr,gc,xi,a,b,c,d,w,h,True); \
|
||||
else \
|
||||
XPutImage(dpy,dr,gc,xi,a,b,c,d,w,h)
|
||||
|
||||
extern void Viewer_postlude(void);
|
||||
extern XImage *x11_create_ximage(ImageInfo *data);
|
||||
extern void x11_destroy_ximage(ImageInfo *data);
|
||||
extern void x11_init_color(ImageInfo *data);
|
||||
extern void viewer_renderline(ImageInfo *data, unsigned char *scanline,
|
||||
unsigned int row, unsigned int x, unsigned int width);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user