DirectFB-1.7.7/0000755000175000017500000000000012466665357010175 500000000000000DirectFB-1.7.7/directfb-config.in0000644000175000017500000001547112171403127013454 00000000000000#!/bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no moduledir=@MODULEDIR@ usage() { cat <[,]...] (default: none) [--graphics=[,]...] (default: none) [--system=[,]...] (default: 'fbdev') [--wm=[,]...] (default: 'default') [--font=[,]...] (default: none) [--imageprovider=[,]...] (default: none) [--videoprovider=[,]...] (default: none) [--fusionsound] [--voodoo] Example for static linking: directfb-config --libs --graphics=matrox,r200 --input=linux_input --font=ft2 --imageprovider=jpeg,png,gif EOF exit $1 } if test $# -eq 0; then usage 1 1>&2 fi lib_directfb=yes lib_avifile=no while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo_prefix=yes ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo_exec_prefix=yes ;; --version) echo @DIRECTFB_MAJOR_VERSION@.@DIRECTFB_MINOR_VERSION@.@DIRECTFB_MICRO_VERSION@ ;; --cflags) echo_cflags=yes ;; --libs) echo_libs=yes ;; directfb) lib_directfb=yes ;; avifile) lib_avifile=yes ;; --input=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /g'`; do echo_input="$echo_input $moduledir/inputdrivers/libdirectfb_$i.o" done echo_static=yes ;; --graphics=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /g'`; do echo_graphics="$echo_graphics $moduledir/gfxdrivers/libdirectfb_$i.o" done echo_static=yes ;; --font=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /g'`; do echo_font="$echo_font $moduledir/interfaces/IDirectFBFont/libidirectfbfont_$i.o" case $i in ft2) echo_font="$echo_font -lfreetype" ;; esac done echo_static=yes ;; --system=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /g'`; do echo_system="$echo_system $moduledir/systems/libdirectfb_$i.o" case $i in sdl) echo_system="$echo_system @SDL_LIBS@" ;; esac done echo_static=yes ;; --wm=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /g'`; do echo_wm="$echo_wm $moduledir/wm/libidirectfb_$i.o" case $i in unique) echo_wm="$echo_wm -luniquewm" ;; esac done echo_static=yes ;; --imageprovider=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /g'`; do echo_imageprovider="$echo_imageprovider $moduledir/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_$i.o" case $i in imlib2) echo_imageprovider="$echo_imageprovider -lImlib2 -lttf -lm -lXext -lX11" ;; jpeg) echo_imageprovider="$echo_imageprovider -ljpeg" ;; png) echo_imageprovider="$echo_imageprovider -lpng -lz -lm" ;; gif) ;; esac done echo_static=yes ;; --videoprovider=*) if test -z "$optarg"; then usage 2 1>&2 fi for i in `echo $optarg | sed 's/,/ /g'`; do echo_videoprovider="$echo_videoprovider $moduledir/interfaces/IDirectFBVideoProvider/libidirectfbvideoprovider_$i.o" case $i in libmpeg3) echo_videoprovider="$echo_videoprovider -lmpeg3" ;; swf) echo_videoprovider="$echo_videoprovider -ljpeg -lz" ;; openquicktime) echo_videoprovider="$echo_videoprovider -lopenquicktime -lz -lglib -lm" ;; esac done echo_static=yes ;; --fusionsound) echo_fusionsound="-Wl,-uIFusionSound_default -lifusionsound" echo_static=yes ;; --voodoo) echo_voodoo=yes echo_static=yes ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_prefix" = "yes"; then echo $prefix fi if test "$echo_exec_prefix" = "yes"; then echo $exec_prefix fi if test "$echo_cflags" = "yes"; then if test @INCLUDEDIR@ != /usr/include ; then cflags="-I${SYSROOT}@INCLUDEDIR@" fi echo $cflags @THREADFLAGS@ fi if test -n "$echo_static"; then echo -static if test -z "$echo_system"; then echo $moduledir/systems/libdirectfb_fbdev.o fi if test -z "$echo_wm"; then echo $moduledir/wm/libdirectfbwm_default.o fi fi if test -n "$echo_font"; then echo $echo_font fi if test -n "$echo_imageprovider"; then echo $echo_imageprovider fi if test -n "$echo_videoprovider"; then echo $echo_videoprovider fi if test -n "$echo_input"; then echo $echo_input fi if test -n "$echo_graphics"; then echo $echo_graphics fi if test -n "$echo_system"; then echo $echo_system fi if test -n "$echo_wm"; then echo $echo_wm fi if test -n "$echo_fusionsound"; then echo -L${SYSROOT}$moduledir/interfaces/IFusionSound $echo_fusionsound fi print_voodoo () { echo $moduledir/interfaces/$1/lib$2_dispatcher.o $moduledir/interfaces/$1/lib$2_requestor.o } if test -n "$echo_voodoo"; then print_voodoo IDirectFB idirectfb print_voodoo IDirectFBDataBuffer idirectfbdatabuffer print_voodoo IDirectFBDisplayLayer idirectfbdisplaylayer print_voodoo IDirectFBEventBuffer idirectfbeventbuffer print_voodoo IDirectFBFont idirectfbfont print_voodoo IDirectFBImageProvider idirectfbimageprovider print_voodoo IDirectFBInputDevice idirectfbinputdevice print_voodoo IDirectFBPalette idirectfbpalette print_voodoo IDirectFBScreen idirectfbscreen print_voodoo IDirectFBSurface idirectfbsurface print_voodoo IDirectFBWindow idirectfbwindow echo -lvoodoo fi if test "$echo_libs" = "yes"; then libs=-L${SYSROOT}@libdir@ if test "$lib_directfb" = "yes"; then libs="$libs -ldirectfb -lfusion -ldirect @THREADLIB@" if test -n "$echo_static"; then libs="$libs @DYNLIB@ @ZLIB_LIBS@" fi fi if test "$lib_avifile" = "yes"; then libs="$libs @AVIFILE_LIBS@" fi echo $libs fi DirectFB-1.7.7/README0000644000175000017500000004125112254435330010755 00000000000000DirectFB README --------------- DirectFB is a graphics library which was designed with embedded systems in mind. It offers maximum hardware accelerated performance at a minimum of resource usage and overhead. Check http://www.directfb.org/ for more and up to date infos. Supported Operating Systems --------------------------- - GNU/Linux Using SDL (without acceleration support), DirectFB also supports the following operating systems: - FreeBSD (last tested: DirectFB 0.9.21 on FreeBSD 5.2) - NetBSD (tested on NetBSD 1.6) - OpenBSD (tested on OpenBSD 3.2) (If you have problems, try ./configure --disable-mmx) Please note that SDL support is experimental and incomplete. It is intended for developers to allow development of DirectFB applications in various environments. Native (non SDL) support for the following operating systems is in progress: - Mac OS X (tested on Mac OS X 10.3.5) We do not have the resources to ensure that every release of DirectFB works on all supported platforms. If you are a user of one of the operating system listed above, and have the time to test the CVS or GIT version regularly, your help is greatly appreciated. Build Requirements ------------------ Mandatory are - libc - libpthread - libm - libdl For regenerating autofoo (./autogen.sh or autoreconf) - autoconf - automake - libtool - pkg-config Optionally, depending on the configuration you want: FBDev - Linux kernel 2.2.x or newer with working frame buffer device (check /proc/fb) for the fbdev system. SDL - libSDL (Simple Direct Media Layer) for the sdl system. X11 - libX11 (X11 client library) for the X11 system (libx11-dev and libxext-dev packages). The following libraries are optional, but important (Debian package names): Fonts - libfreetype6-dev for TrueType and other fonts Images - libjpeg-dev for Joint Picture Expert Group images - libpng-dev for Portable Network Graphics Extra - zlib1g-dev for compressed screenshot support (also needed by libpng) The multi application core also requires , see the section "Running multiple DirectFB applications" for more details. The build of the image and font providers can be disabled but we strongly suggest that you don't do this since the code examples and a lot of DirectFB applications depend on the functionality provided by them. The libmpeg3 video provider requires the libmpeg3 library which is not commonly installed. We provide this package on our web-site at http://www.directfb.org/download/contrib/. The avifile and flash video providers that used to be shipped with DirectFB have been moved to the DirectFB-extra package. We suggest you also install pkg-config available from http://www.freedesktop.org/software/pkgconfig/. It will help you to compile applications based on DirectFB. Usage Requirements ------------------ Depending on the DirectFB application you want to run, you need some or all of these: - A working frame buffer device (check the output of 'fbset -i'). - A keyboard (if it works on the console, everything should be fine). - A PS/2 or serial mouse for windowing. USB and ADB mice do also work via PS/2 emulation. Using the single application core you always need access to /dev/tty0, /dev/fb0 and the mouse device (/dev/psaux, /dev/mouse). You can either run all DirectFB applications as root or allow users to access these devices. A reasonable way to do this is to add users to the group tty (or some other group) and allow this group to read and write the files in /dev: crw-rw---- 1 root tty 29, 0 /dev/fb0 crw-rw---- 1 root tty 10, 1 /dev/psaux crw-r----- 1 root tty 4, 0 /dev/tty0 If you are using the multi application core, only the master process needs access to all of these devices. Additional processes (slaves) just need access to /dev/fb0 and: crw-rw---- 1 root fusion 29, 0 /dev/fusion/0 Note that the master creates a shared memory file, probably in '/dev/shm/fusion.0'. It's read/writeable for anyone matching the master process' user or group. Some applications from the DirectFB-examples package have additional requirements: - A video card supported by video4linux for df_video. - A joystick for df_joystick. Running multiple DirectFB applications at the same time ------------------------------------------------------- With the default build of the DirectFB library, only one DirectFB application may be running. However you have the option to use the multi application core of DirectFB which allows multiple DirectFB applications to run at the same time within a session. DirectFB applications communicate through a layer we call "Fusion". This layer was previously implemented completely in user space using semaphores and message queues. But since 0.9.15 the Fusion Kernel Device is required which implements critical parts of Fusion and thus lead to better performance and decent stability. To install this kernel module (only available for Linux yet), find the linux-fusion module in our CVS or GIT repository or on the DirectFB website. For DirectFB 1.4.x releases you should use linux-fusion 8.1.1 or newer. Compile DirectFB with multi-application core enabled: ./configure --enable-multi Make sure your Linux kernel supports tmpfs. This is explained in the kernel sources in Documentation/filesystems/tmpfs.txt. Mount a tmpfs filesystem as /dev/shm: mount tmpfs /dev/shm -ttmpfs Optionally a mount point can be specified via the "tmpfs" option, see directfbrc(5). The option has to be the same for all processes. A good way to test the multi-application core is to install the lite toolkit and DFBTerm, a DirectFB terminal (both available in the DirectFB CVS/GIT repository). You can then start DirectFB applications from dfbterm. Recommendations --------------- To take full advantage of hardware acceleration, a Matrox G200/G400/G450/G550 graphics card is recommend for this version of DirectFB. The drivers for ATI128, Voodoo 3/4/5/Banshee, NeoMagic and S3 Savage cards included with this release are work in progress and only yet support a subset of the possible accelerations. Installation ------------ 1) In the DirectFB directory type: ./configure make make install (as superuser) Use './configure --help' to get a list of possible configure options. Imported options include: --enable-multi Enables the Multi Application Core --enable-debug Enables many debug messages and assertions --enable-trace Enables run time stack trace information Debugging and especially stack trace support are a performance impact. It may be noticably slower in some areas, e.g. text drawing. You may use the options "no-debug" and "no-trace" by default, e.g. in '/etc/directfbrc', and use "--dfb:debug,trace" on the command line if needed. 2) Make sure that "/lib" is listed in your /etc/ld.so.conf. The default prefix is "/usr/local". After adding it you have to run 'ldconfig' as superuser. Alternatively, you can add the path to the environment variable LD_LIBRARY_PATH. This is useful for temporarily switching to another installed version. 3) You might want to copy fb.modes to /etc or merge it with your existing /etc/fb.modes file. The first entry will be used by default - copy other entries you may need. 4) If you want to use a serial mouse, create a link called /dev/mouse that points to serial device (e.g. /dev/ttyS0). Then add a line describing your mouse-protocol to /etc/directfbrc or ~/.directfbrc: "mouse-protocol=[ms|ms3|mouseman|mousesystems]". 5) If you are cross compiling and have installed the required libraries someplace other than /usr/local/lib be sure to add the bin directory for those libraries to the front of your 'PATH'. For instance if you configured using: --prefix=/dfb/usr/local then be sure to export PATH=/dfb/usr/local/bin:$PATH before compiling and installing. Configuring DirectFB -------------------- There are lots of things that can be configured. We try to ship DirectFB with reasonable defaults but you might have to tweak things. There are several ways to do this. You may edit the system-wide configuration file /etc/directfbrc or the user-specific $HOME/.directfbrc. There's a manual page called directfbrc(5) that documents all the settings. The same manual page also explains how DirectFB application can be configured via the command-line. Configuring the Linux frame buffer device ----------------------------------------- DirectFB's prefered way-of-working needs a Linux kernel with frame buffer support. Check the documentation in the kernel tree (/usr/src/linux/Documentation/fb/) on how to enable the frame buffer device for your graphics card. The generic VESA frame buffer device does not support mode switching and you will not get hardware acceleration. To make DirectFB work with veasfb, you should add the following lines to /etc/lilo.conf: append="video=vesa:ywrap,mtrr" 'ywrap' enables panning with wraparound. 'mtrr' enables setting caching type for the frame buffer to write-combining. vga=791 This sets the mode on startup. 791 means 1024x768@16, 788 means 800x600@16. All VESA Video Modes: Bits 640x480 800x600 1024x768 1280x1024 1600x1200 8 769 771 773 775 796 16 785 788 791 794 798 32 786 789 792 795 799 Other frame buffer devices support mode switching. DirectFB will only support modes listed in your /etc/fb.modes file. By default the first entry found is used. If you have a Matrox card you may want to try the vsync patch found in the patches directory that enables applications to "idle wait" for the vertical retrace. Using the builtin "window manager" ---------------------------------- Since DirectFB lacks a real window manager, we added a hack to the window stack to allow for basic window management. While pressing the (or Windows) key or alternatively you can do the following: - Drag your mouse to move the focused window. - Drag and press to resize the focused window. - Drag and press to change the opacity of the focused window. - Press C to close the focused window. - Press A to lower the focused window to the bottom. - Press X to cycle the focus through the windows. - Press S to raise the lowest window to the top. - Press P to enable and show the mouse cursor. - Press R to rotate the focused window by 90 degree. - Press E to focus the window currently under the mouse cursor, useful in conjunction with 'X'. - Press Escape to return from fullscreen mode to the desktop. (currently not advisable if the fullscreen app is still flipping) - Press F12 to redraw the whole window stack. You might want to use the "capslock-meta" option (see directfbrc(5)) if you don't have a key. Documentation ------------- A complete API reference documentation in HTML format is created during the build in the docs directory. You may also access the API reference as well as a concepts overview, tutorials and the FAQ online at http://www.directfb.org/documentation/. Thanks to --------- Johannes Zellner Till Adam Joachim Steiger Felix von Leitner Johannes Stezenbach Michael Natterer Holger Waechtler Kim JeongHoe Jason Gaiser W. Michael Petullo Jiri Svoboda Hallvar Helleseth Topi Kanerva Daniel Mack Ara Hacopian Mike Haertel Enno Brehm Martin Mueller Sebastian Klemke Fredrik Hallenberg Antonino Daplas Scott A McConnell Alex SONG Ville Syrjälä Brian J. Murrell Tim Janik Billy Biggs Andreas Oberritter Simon Ueng Scott Brumbaugh Sebastian Ley James Su Sarma Kolluru Oliver Schwartz Florian J.P. Delport Michel Dänzer Maurizio Monge Tim Wright Liam Girdwood Andreas Robinson Michael Hunold Brandon M. Reynolds Micha Nelissen Vadim Catana Henning Glawe Ed Millard Claudio Ciccani Tom Bridgwater Oskar Liljeblad Bryce Nichols Stefan Lucke Mws Ivan Daniluk Mark Salter Martin Lütken Sylvain Meyer Mark Adams Damian Kowalewski Jakub Bogusz Nathanael D. Noblet Ryan Burns Colin Watson Guillem Jover Jeff Bailey Andreas Jochens Daniel J Laird Marko Mäkelä Nils Magnus Larsgard Pär Degerman Michel van Noorloos Gery Shane Paul Mackerras Attilio Fiandrotti Vaclav Slavik Philip Jägenstedt sridewa Eugene Everson Mike Crowe Kieran Bingham Luis Mondesi +lemsx1 +gmail,com Keith Mok GARDET Guillaume Phil Endecott Brian Austin Keith Mok Young Hoon Special thanks to Ville Syrjala for his great work on the Matrox TV-Out support and for his several patches including fixes and enhancements for the whole library. He also did several ports like UAE or mplayer for DirectFB. Check out his site at 'http://www.sci.fi/~syrjala/'. Legal stuff ----------- (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. DirectFB-1.7.7/COPYING0000644000175000017500000006347412171403127011140 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 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. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] 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 Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these 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 other code 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. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. 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, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser 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 combine 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) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) 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. d) 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. e) 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 materials to be 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 with 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 Lesser 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 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. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 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. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! DirectFB-1.7.7/autogen.sh0000755000175000017500000000712212171403127012072 00000000000000#!/bin/sh # This script does all the magic calls to automake/autoconf and # friends that are needed to configure a cvs checkout. You need a # couple of extra development tools to run this script successfully. # # If you are compiling from a released tarball you don't need these # tools and you shouldn't use this script. Just call ./configure # directly. PROJECT="DirectFB" TEST_TYPE=-f FILE=include/directfb.h LIBTOOL_REQUIRED_VERSION=1.3.4 AUTOCONF_REQUIRED_VERSION=2.13 AUTOMAKE_REQUIRED_VERSION=1.4 srcdir=`dirname $0` test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd $srcdir make_version () { major=`echo $1 | cut -d '.' -f 1` minor=`echo $1 | cut -d '.' -f 2` micro=`echo $1 | cut -d '.' -f 3` expr $major \* 65536 + $minor \* 256 + $micro } check_version () { ver=`make_version $1.0.0` req=`make_version $2.0.0` if test $ver -ge $req; then echo "yes (version $1)" else echo "Too old (found version $1)!" DIE=1 fi } echo echo "I am testing that you have the required versions of libtool, autoconf," echo "and automake." echo DIE=0 echo -n "checking for libtool >= $LIBTOOL_REQUIRED_VERSION ... " if (libtoolize --version) < /dev/null > /dev/null 2>&1; then VER=`libtoolize --version \ | grep libtool | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"` check_version $VER $LIBTOOL_REQUIRED_VERSION else echo echo " You must have libtool installed to compile $PROJECT." echo " Install the appropriate package for your distribution," echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1; fi echo -n "checking for autoconf >= $AUTOCONF_REQUIRED_VERSION ... " if (autoconf --version) < /dev/null > /dev/null 2>&1; then VER=`autoconf --version \ | head -n1 | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"` check_version $VER $AUTOCONF_REQUIRED_VERSION else echo echo " You must have autoconf installed to compile $PROJECT." echo " Download the appropriate package for your distribution," echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1; fi echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... " if (automake --version) < /dev/null > /dev/null 2>&1; then VER=`automake --version \ | grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"` check_version $VER $AUTOMAKE_REQUIRED_VERSION else echo echo " You must have automake installed to compile $PROJECT." echo " Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.4p1.tar.gz" echo " (or a newer version if it is available)" DIE=1 fi if test "$DIE" -eq 1; then echo echo "Please install/upgrade the missing tools and call me again." echo exit 1 fi test $TEST_TYPE $FILE || { echo echo "You must run this script in the top-level $PROJECT directory." echo exit 1 } if test -z "$*"; then echo echo "I am going to run ./configure with no arguments - if you wish " echo "to pass any to it, please specify them on the $0 command line." echo fi case $CC in *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps ;; esac echo echo echo Running aclocal ... aclocal -I m4 $ACLOCAL_FLAGS echo Running libtoolize ... libtoolize --automake echo Running autoconf ... autoconf # optionally feature autoheader (autoheader --version) < /dev/null > /dev/null 2>&1 && echo Running autoheader... && autoheader echo Running automake ... automake -Wno-portability --add-missing $am_opt cd $ORIGDIR echo Running configure --enable-maintainer-mode "$@" ... $srcdir/configure --enable-maintainer-mode "$@" || exit 1 echo "Now type 'make' to compile $PROJECT." DirectFB-1.7.7/install-sh0000755000175000017500000003325512466665307012124 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false 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: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -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. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; 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 if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? 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 "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # 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: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # 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 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $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 $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 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. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: DirectFB-1.7.7/inputdrivers/0000755000175000017500000000000012466665355012731 500000000000000DirectFB-1.7.7/inputdrivers/zytronic/0000755000175000017500000000000012466665355014612 500000000000000DirectFB-1.7.7/inputdrivers/zytronic/Makefile.am0000644000175000017500000000116512171403127016545 00000000000000## Makefile.am for DirectFB/inputdrivers/zytronic INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_zytronic.la if BUILD_STATIC input_DATA = $(input_LTLIBRARIES:.la=.o) endif inputdir = $(MODULEDIR)/inputdrivers libdirectfb_zytronic_la_SOURCES = zytronic.c libdirectfb_zytronic_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_zytronic_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/zytronic/zytronic.c0000644000175000017500000005516612254435330016553 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ /* * This is a driver for a Zytronic Touchscreen. * Note that is not the standard Zytronic (microsoft-DLL controllable) touchscreen; * It uses a micro-controller similar to the one of Elo or Mutouch touchscreens. * The configuration inside directfbrc is equal to Elo/Mutouch config. * All three touchscreens are conceptualised to use 4096x4096 virtual resolutions. * * This driver has been kindly provided by Jacques Luder. * Written by Eric Wajman - Jacques Luder. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( zytronic ) // codes de retours : #define ZYT_ERR_NOT_START_OF_READ -1 // erreur si on demande un lecture de msg alors que l'on ne // reçoit pas ':' comme premier caractère (à priori ne devrait // jamais arriver...?) #define ZYT_ERR_CANT_OPEN -2 // erreur si on n'arrive pas à ouvrir le "fichier" lié au device. #define ZYT_ACK_NACK -3 // prévient que le message lu est un ack/nack // et non un vrai message #define ZYT_END_OF_CONF_FILE -4 // prévient que l'on a atteint la fin du fichier de configuration // infos utiles : #define ZYT_PAQUET_SIZE 128 // taille max d'un msg envoyé/reçu (pour la taille du tableau) #define ZYT_ENDOFMSG_CR 13 // 1er caractère de fin de message reçu #define ZYT_ENDOFMSG_LF 10 // 2ème caractère de fin de message reçu // commandes protocoles (pas toutes utilisées dans ce driver) : #define ZYT_ENABLE_CONTROLLER 201 #define ZYT_DISABLE_CONTROLLER 200 #define ZYT_XY_TOUCH_MESSAGE_MODE 210 #define ZYT_INIT_FW_RESET 72 #define ZYT_FORCE_EQUALISATION 69 #define ZYT_SET_TOUCH_THRESHOLD 100 // + valeur de Threshold voulue (entre 5 et 50) #define ZYT_REQ_FW_AND_ID 86 #define ZYT_REQ_NON_VOLATILE_SETTINGS 88 #define ZYT_RESTORE_FACTORY_DEFAULT_SETTINGS 68 #define ZYT_REQ_SHORT_STATUS_MESSAGE 71 #define ZYT_REQ_SINGLE_FRAME_OF_RAW_SENSOR_DATA 82 #define ZYT_ENABLE_CONTINUOUS_RAW_SENSOR_DATA 205 #define ZYT_DISABLE_CONTINUOUS_RAW_SENSOR_DATA 204 #define ZYT_SET_FRAME_AVERAGING 220 // + nombre de frame pour "xy averaging" voulue (1 à 9) #define ZYT_SET_GLASS_THICKNESS 230 // + valeur (ci dessous) #define ZYT_GLASS_THIN 0 #define ZYT_GLASS_MEDIUM 1 #define ZYT_GLASS_THICK 2 #define ZYT_ENABLE_CONTROLLER_ACK_NAK 203 #define ZYT_DISABLE_CONTROLLER_ACK_NAK 202 #define ZYT_STORE_DATA_BLOCK 213 // + le code à enregistrer (voir la doc du protocole...) #define ZYT_RETRIEVE_DATA_BLOCK 214 // + taile des infos à récupèrer (voir la doc du protocole...) // paramètres de notre fichier de configuration : #define ZYT_CONF_FILE "/etc/zyposConf" // le nom de notre fichier de configuration #define ZYT_CONF_DIM_DALLE_X "dimDalleX" #define ZYT_CONF_DIM_DALLE_Y "dimDalleY" #define ZYT_CONF_SEUIL "seuil" #define ZYT_CONF_EPAISSEUR "epaisseur" #define ZYT_CONF_ATTENTE_MULTI_CLIC "attenteMultiClic" #define ZYT_CONF_MODE "mode" #define ZYT_CONF_FRAME_AVERAGING "frameAveraging" #define ZYT_CONF_NB_CLIGN_TO_PRESS "nbClignToPress" #define ZYT_CONF_DEBUG "debug" // types d'action (pour ZytData->action): #define ZYT_ACTION_TOUCH 0x01 #define ZYT_ACTION_RELEASE 0x00 // les masques : #define ZYT_MASK_ACTION 0x40 #define ZYT_MASK_SYNC_MSG 0x80 typedef enum{ NO_DRAG_DROP=0, CONTINUOUS=1, } ZytMode; typedef enum{ NO_DEBUG=0, DEBUG=1, } ZytDebug; // structure du paramètrage typedef struct { unsigned short dimDalleX; unsigned short dimDalleY; unsigned short seuil; unsigned short epaisseur; unsigned int attenteMultiClic; ZytMode mode; unsigned short frameRateAveraging; unsigned short nbClignToPress; ZytDebug debug; } ZytConf_t; /* structure de data du Zytronic */ typedef struct __ZytData__ { int fd; DirectThread *thread; CoreInputDevice *device; unsigned short x; unsigned short y; unsigned char action; } ZytData; /* Global Variables */ static unsigned char packet[ZYT_PAQUET_SIZE]; static struct termios options; // pour changer les configurations du port (avec cfmakeraw) static struct termios saved_options;// pour sauvegarder l'ancienne configuration du port et la rétablir après static ZytConf_t zytConf; // fonction pour faire des mini-pauses en millisecondes : (utile? on garde) static inline void __mdelay(unsigned int msec) { struct timespec delay; delay.tv_sec = 0; delay.tv_nsec = msec * 1000000; nanosleep (&delay, NULL); } // procédure pour envoyer un paquet au controleur Zytronic, encapsulé d'une certaine manière par rapport // au protocole (pour Zytronic il y n'a rien autour du code OP_CODE lui même) static inline void ZytSendPacket(int file, unsigned char *msg, unsigned char len) { int res; res = write(file,msg,len); (void)res; } // procédure pour lire un "paquet" de données venant du controleur (un message donc) static int ZytReadMsg(int file, unsigned char *msg) { int i=0; int res; (void)res; res = read(file,&msg[0],1); if(msg[0]==':'){ // si c'est un réponse à une commande : do{ // on lit tant qu'on trouve pas les 2 caractères de fin : i++; // on commence à lire à 1 (car le 0 est déjà lu) res = read(file,&msg[i],1); }while(msg[i]!=ZYT_ENDOFMSG_LF || msg[i-1]!=ZYT_ENDOFMSG_CR); }else if(msg[0]==0xC0 || msg[0]==0x80){ // si c'est un appui ou un relachement sur la dalle : // on lit les 4 caractères pour la position du touché : for(i=1;i<5;i++){ res = read(file,&msg[i],1); } }else if(msg[0]==0x06 || msg[0]==0x15){ // si c'est un ACK/NACK on le dit if(zytConf.debug==DEBUG){ D_INFO("ZYT, reception d'un ACK/NACK (6=ACK, 21=NACK): %d\n",msg[0]); //debug } return ZYT_ACK_NACK; }else { // sinon : ce n'est pas le début d'une lecture => on a perdu des donneés précédemment ... D_INFO("ZYT_ERR_NOT_START_OF_READ\n"); // ça ne devrait PAS arriver ! return ZYT_ERR_NOT_START_OF_READ; } if(zytConf.debug==DEBUG){ D_INFO("ZYT_READ_MSG : nb octets recus= %d\n",i); // debug } return 0; } #define WORD_ASSEMBLY(b1,b2) (((b2) << 7) | (b1)) // fonction qui permet de récupèrer les informations contenues dans un "message" en mode "touch XY mode" *** static int ZytReadTouchMessage(ZytData* event){ if( ZytReadMsg(event->fd,packet) != 0 ) { return 0; // on renvoit qu'on a pas pu lire correctement } // on récupère les infos x,y et appui ou relachement: if( (packet[0] & ZYT_MASK_ACTION) == 0 ){ event->action = ZYT_ACTION_RELEASE; }else{ event->action = ZYT_ACTION_TOUCH; } event->x = (float)(4096*WORD_ASSEMBLY(packet[1], packet[2])/zytConf.dimDalleX); event->y = (float)(4096*WORD_ASSEMBLY(packet[3], packet[4])/zytConf.dimDalleY); return 1; // on dit que on a effectivement bien lu } // procédure pour écrire un paramètre dans le fichier de configuration Zytronic : static void ecrireConf(int f,char *sp, char *sv){ int res; char tmp[100]; strcpy(tmp,":"); strcat(tmp,sp); strcat(tmp,"="); strcat(tmp,sv); strcat(tmp,";\n"); res = write(f,tmp,strlen(tmp)); (void)res; } // procédure pour créer le fichier de configuration avec les valeurs par défaut static void createConfigFile(int *fdConf){ char tmp[10]; // création du fichier : *fdConf = open(ZYT_CONF_FILE,O_RDWR | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO); // mise en place des valeurs par défaut : sprintf(tmp,"%d",zytConf.dimDalleX); ecrireConf(*fdConf,ZYT_CONF_DIM_DALLE_X,tmp); sprintf(tmp,"%d",zytConf.dimDalleY); ecrireConf(*fdConf,ZYT_CONF_DIM_DALLE_Y,tmp); sprintf(tmp,"%d",zytConf.seuil); ecrireConf(*fdConf,ZYT_CONF_SEUIL,tmp); sprintf(tmp,"%d",zytConf.epaisseur); ecrireConf(*fdConf,ZYT_CONF_EPAISSEUR,tmp); sprintf(tmp,"%d",zytConf.attenteMultiClic); ecrireConf(*fdConf,ZYT_CONF_ATTENTE_MULTI_CLIC,tmp); sprintf(tmp,"%d",zytConf.mode); ecrireConf(*fdConf,ZYT_CONF_MODE,tmp); sprintf(tmp,"%d",zytConf.frameRateAveraging); ecrireConf(*fdConf,ZYT_CONF_FRAME_AVERAGING,tmp); sprintf(tmp,"%d",zytConf.nbClignToPress); ecrireConf(*fdConf,ZYT_CONF_NB_CLIGN_TO_PRESS,tmp); sprintf(tmp,"%d",zytConf.debug); ecrireConf(*fdConf,ZYT_CONF_DEBUG,tmp); D_INFO("fsync renvoi la valeur: %d\n",fsync(*fdConf)); //pour s'assurer qu'on écrit bien dans le fichier } // procédure qui retourne le prochain paramètre lu dans le fichier de configuration static int nextConf(int fdConf,char *param, char *res){ char charActuel; int i,nb=1; int result; (void)result; // note : on suppose pour l'instant qu'aucune erreur de lecture n'intervient, ni de fichier mal formaté *** ... // on cherche le début d'un paramètre de configuration (ou la fin du fichier) : while(charActuel!=':' && nb==1){ nb = read(fdConf,&charActuel,1); } if(nb==0){ // le cas échéant, on prévient que le fichier ne contient pas d'autres paramètres (fin du fichier) return ZYT_END_OF_CONF_FILE; } // on enregistre le nom du paramètre: i=0; result = read(fdConf,&charActuel,1); while(charActuel!='='){ param[i]=charActuel; result = read(fdConf,&charActuel,1); i++; } param[i]='\0'; // on enregistre la valeur de ce paramètre : i=0; result = read(fdConf,&charActuel,1); while(charActuel!=';'){ res[i]=charActuel; result = read(fdConf,&charActuel,1); i++; } res[i]='\0'; // on retourne le tout (en indiquant que tout s'est bien passé, on a pas atteint la fin du fichier) return 0; } // procédure pour "activer" le device, en l'occurence : mettre les paramètres de base qui nous intéressent nous : static void ZytActivateDevice(int fd) { int fdConf,val; char param[100],res[10]; //paramètres par défaut : (également utilisés pour créer le fichier de configuration par la suite, s'il n'existe pas) zytConf.dimDalleX = 1024; zytConf.dimDalleY = 768; zytConf.seuil = 10; zytConf.epaisseur = 1; zytConf.attenteMultiClic = 300; // par défaut on ne garde que le premier appui d'une série : la "souris" ne bougera pas entre un appui et un relachement zytConf.mode=NO_DRAG_DROP; zytConf.frameRateAveraging=3; zytConf.nbClignToPress=5; // le nombre d'appuis successifs pour comprendre un appui après un clignotement zytConf.debug=NO_DEBUG; // récupération des paramètres choisis, et création du fichier si besoin : fdConf = open(ZYT_CONF_FILE,O_RDWR); if(fdConf==-1){ D_INFO("ZYT, le fichier %s de configuration de la dalle zytronic n'existe pas, creation en cours...\n",ZYT_CONF_FILE); createConfigFile(&fdConf); D_INFO("ZYT, ...creation de %s finie.\n",ZYT_CONF_FILE); }else{ D_INFO("ZYT, le fichier %s de configuration de la dalle zytronic existe.\n",ZYT_CONF_FILE); } // puis, on charge les valeurs de configuration, en gardant les valeurs par défaut pour les paramètres non précisés : lseek(fdConf,0,SEEK_SET); // on retourne au début du fichier (au cas où on vient de le créé) while(nextConf(fdConf,param,res)!=ZYT_END_OF_CONF_FILE){ val = atoi(res); D_INFO("parametre : %s = %d\n",param,val); //debug if(strcmp(param,ZYT_CONF_DIM_DALLE_X)==0){ zytConf.dimDalleX=val; }else if(strcmp(param,ZYT_CONF_DIM_DALLE_Y)==0){ zytConf.dimDalleY=val; }else if(strcmp(param,ZYT_CONF_SEUIL)==0){ zytConf.seuil=val; }else if(strcmp(param,ZYT_CONF_EPAISSEUR)==0){ zytConf.epaisseur=val; }else if(strcmp(param,ZYT_CONF_ATTENTE_MULTI_CLIC)==0){ zytConf.attenteMultiClic=val*1000; //on passe les millisecondes en microsecondes }else if(strcmp(param,ZYT_CONF_MODE)==0){ zytConf.mode=val; }else if(strcmp(param,ZYT_CONF_FRAME_AVERAGING)==0){ zytConf.frameRateAveraging=val; }else if(strcmp(param,ZYT_CONF_NB_CLIGN_TO_PRESS)==0){ zytConf.nbClignToPress=val; }else if(strcmp(param,ZYT_CONF_DEBUG)==0){ zytConf.debug=val; }else { D_INFO("ZYT, parametre non reconnu : %s\n",param); D_INFO("ZYT, veuillez verifier le fichier de configuration %s!\n",ZYT_CONF_FILE); } } close(fdConf); // envoi des paramètres du controleur pour utilisation normale : //packet[0]=ZYT_INIT_FW_RESET; // permet de "mieux" initialiser le controleur, utile? (long : ~5sec) //ZytSendPacket(fd,packet,1); // attention, commande inutilisable telle qu'elle, car elle coupe la liaison // et donc empêche les commandes suivantes... // (ici en l'occurence tout le paramètrage qui suit...) !!! packet[0]=ZYT_RESTORE_FACTORY_DEFAULT_SETTINGS; ZytSendPacket(fd,packet,1); packet[0]=ZYT_SET_FRAME_AVERAGING + zytConf.frameRateAveraging; ZytSendPacket(fd,packet,1); packet[0]=ZYT_DISABLE_CONTINUOUS_RAW_SENSOR_DATA; ZytSendPacket(fd,packet,1); packet[0]=ZYT_SET_TOUCH_THRESHOLD + zytConf.seuil; ZytSendPacket(fd,packet,1); packet[0]=ZYT_SET_GLASS_THICKNESS + zytConf.epaisseur; ZytSendPacket(fd,packet,1); packet[0]=ZYT_ENABLE_CONTROLLER; ZytSendPacket(fd,packet,1); packet[0]=ZYT_FORCE_EQUALISATION; ZytSendPacket(fd,packet,1); packet[0]=ZYT_XY_TOUCH_MESSAGE_MODE; ZytSendPacket(fd,packet,1); } // fonction pour "ouvrir" le périphérique // (càd: ouvrir le fichier spécial qui permet de communiquer avec le controleur) static int ZytOpenDevice(char *device) { int fd; fd = open (device, O_RDWR | O_NOCTTY); // pourquoi 0_NOCTTY ? *** if ( fd == -1 ) { return ZYT_ERR_CANT_OPEN; } // on récupère l'actuelle configuration du port : tcgetattr(fd,&options); tcgetattr(fd,&saved_options); // on passe en 96000 bauds : cfsetospeed(&options,B9600); cfsetispeed(&options,B9600); // on passe en mode de fonctionnement "pur" pour pouvoir utiliser correctement le port série : cfmakeraw(&options); tcsetattr(fd,TCSANOW,&options); return fd; } // le thread qui sert à recevoir des données en continue : static void *ZytronicEventThread(DirectThread *thread, void *driver_data) { ZytData *data = (ZytData *) driver_data; int lastAction = ZYT_ACTION_RELEASE; struct timeval unT; unsigned int lastT,newT; unsigned short nbClignot=0; lastT = 0; DFBInputEvent evt; /* Read data */ while (1) { if (!ZytReadTouchMessage (data)){ // si jamais il y a eut mauvaise lecture (pas normal) continue; // on ignore le mesage mal lu } // en mode sans drag&drop, si l'action actuelle est la même que la précédente, on l'ignore: if (zytConf.mode==NO_DRAG_DROP && lastAction == data->action){ nbClignot=0; // et on dit que ça clignote pas (car c'est un appui long, pas un clignotement) continue; // permet de ne garder que le premier appui, et le relachement : } gettimeofday(&unT,NULL); newT = unT.tv_sec*1000000 + unT.tv_usec; if(zytConf.debug==DEBUG){ D_INFO("newT=%u\n",newT); D_INFO("lastT=%u\n",lastT); D_INFO("lastT+attente=%u\n",lastT+zytConf.attenteMultiClic); } // si on "appui" trop vite, sans faire un appui continu, on réenregistre la dernière action,... : if(data->action==ZYT_ACTION_TOUCH && nbClignot < zytConf.nbClignToPress && \ (lastT + zytConf.attenteMultiClic) > newT) { nbClignot++;// ..on compte combien de fois de suite on essai d'appuyer (pour voir si c'est la fin // d'un clignotement justement parce qu'on a rapprocher le doigt suffisemment) .. gettimeofday(&unT,NULL); lastT = unT.tv_sec*1000000 + unT.tv_usec; continue; // ..et on ignore cet appui (permet d'éviter le phénomène de clignotement..) } nbClignot=0; // on remet le compteur à zéro, puisque c'est ici un appui réel direct_thread_testcancel (thread); // si cette ligne fait bien ce que je pense (regarder si on n'a pas // demandé la fin du thread en cours) pourquoi est-elle là, et pas avant le "if" ? Car si le controlleur // n'envoi plus aucune information pendant un moment, le driver ne peut pas détecter de "cancel" // pendant ce laps de temps .. ? *** // Dispatch axis evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = data->x; dfb_input_dispatch (data->device, &evt); evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = data->y; dfb_input_dispatch (data->device, &evt); // Dispatch touch event switch (data->action) { case ZYT_ACTION_TOUCH: evt.type = DIET_BUTTONPRESS; break; case ZYT_ACTION_RELEASE: evt.type = DIET_BUTTONRELEASE; break; } evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch (data->device, &evt); lastAction = data->action; // on enregistre l'évènement gettimeofday(&unT,NULL); // on enregistre quand s'est produit l'évènement lastT = unT.tv_sec*1000000 + unT.tv_usec; if(zytConf.debug==DEBUG){ D_INFO("Zytronic TOUCH : x=%d y=%d action=%d\n", data->x,data->y,data->action); } direct_thread_testcancel (thread); } return NULL; } /* exported symbols */ // procédure pour dire à directFB si c'est bien ce driver qu'il faut charger : static int driver_get_available( void ) { int fd; /* we only try to open the device if it has been actually configured */ if( !dfb_config->zytronic_device ) return 0; fd = ZytOpenDevice(dfb_config->zytronic_device ); D_INFO( "Zytronic:driver_get_available %s fd %d\n", dfb_config->zytronic_device,fd ); if (fd < 0){ D_INFO( "The Zytronic driver cannot be loaded from %s\n", dfb_config->zytronic_device ); return 0; } close(fd); return 1; } // donne la description du driver : static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf(info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "Zypos" ); snprintf(info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "Zytronic" ); info->version.major = 0; info->version.minor = 5; } // "ouvre" le device et commnce à le préparer : static DFBResult driver_open_device(CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data) { int fd; ZytData *data; /* open device */ fd = ZytOpenDevice (dfb_config->zytronic_device); D_INFO("ZYT, driver_open_device %s fd %d\n", dfb_config->zytronic_device,fd); if (fd < 0) { return DFB_INIT; } ZytActivateDevice(fd); //on configure le controleur pour fonctionner en mode normal data = D_CALLOC (1, sizeof(ZytData)); data->fd = fd; data->device = device; /* fill device info structure */ snprintf(info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "Zypos"); snprintf(info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Zytronic"); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; info->desc.max_axis = DIAI_Y; info->desc.max_button = DIBI_LEFT; /* start input thread */ data->thread = direct_thread_create (DTT_INPUT, ZytronicEventThread, data, "Zytronic Input"); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry(CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry) { return DFB_UNSUPPORTED; } // "fermeture" du driver *** static void driver_close_device(void *driver_data) { ZytData *data = (ZytData *)driver_data; /* stop input thread */ direct_thread_cancel (data->thread); direct_thread_join (data->thread); direct_thread_destroy (data->thread); /* close device */ tcsetattr(data->fd,TCSANOW,&saved_options); // remise en l'état de l'ancienne configuration du port close (data->fd); /* free private data */ D_FREE (data); } DirectFB-1.7.7/inputdrivers/zytronic/Makefile.in0000644000175000017500000006443612466665313016606 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/zytronic ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)" LTLIBRARIES = $(input_LTLIBRARIES) libdirectfb_zytronic_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_zytronic_la_OBJECTS = zytronic.lo libdirectfb_zytronic_la_OBJECTS = \ $(am_libdirectfb_zytronic_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_zytronic_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_zytronic_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_zytronic_la_SOURCES) DIST_SOURCES = $(libdirectfb_zytronic_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(input_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_zytronic.la @BUILD_STATIC_TRUE@input_DATA = $(input_LTLIBRARIES:.la=.o) inputdir = $(MODULEDIR)/inputdrivers libdirectfb_zytronic_la_SOURCES = zytronic.c libdirectfb_zytronic_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_zytronic_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/zytronic/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/zytronic/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputLTLIBRARIES: $(input_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdir)"; \ } uninstall-inputLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdir)/$$f"; \ done clean-inputLTLIBRARIES: -test -z "$(input_LTLIBRARIES)" || rm -f $(input_LTLIBRARIES) @list='$(input_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_zytronic.la: $(libdirectfb_zytronic_la_OBJECTS) $(libdirectfb_zytronic_la_DEPENDENCIES) $(EXTRA_libdirectfb_zytronic_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_zytronic_la_LINK) -rpath $(inputdir) $(libdirectfb_zytronic_la_OBJECTS) $(libdirectfb_zytronic_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zytronic.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-inputDATA: $(input_DATA) @$(NORMAL_INSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdir)" || exit $$?; \ done uninstall-inputDATA: @$(NORMAL_UNINSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-inputLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-inputDATA install-inputLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-inputDATA uninstall-inputLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-inputLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-inputDATA install-inputLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-inputDATA uninstall-inputLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/sonypi/0000755000175000017500000000000012466665355014252 500000000000000DirectFB-1.7.7/inputdrivers/sonypi/sonypi.c0000644000175000017500000001630512254435330015643 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( sonypi ) #define DEVICE "/dev/sonypi" /* * declaration of private data */ typedef struct { CoreInputDevice *device; DirectThread *thread; int fd; } SonypiData; /* * Input thread reading from device. * Generates events on incoming data. */ static void* sonypiEventThread( DirectThread *thread, void *driver_data ) { SonypiData *data = (SonypiData*) driver_data; int readlen; u8 buffer[16]; /* loop until error occurs except EINTR */ while ((readlen = read( data->fd, buffer, 16 )) > 0 || errno == EINTR) { int i; DFBInputEvent evt; direct_thread_testcancel( thread ); /* process each byte */ for (i=0; idevice, &evt ); break; case SONYPI_EVENT_JOGDIAL_PRESSED: case SONYPI_EVENT_JOGDIAL_RELEASED: if (buffer[i] == SONYPI_EVENT_JOGDIAL_PRESSED) evt.type = DIET_BUTTONPRESS; else evt.type = DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; /* button is always valid */ evt.button = DIBI_MIDDLE; dfb_input_dispatch( data->device, &evt ); break; default: ; } } } if (readlen < 0) D_PERROR ("sonypi thread died\n"); return NULL; } /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available( void ) { int fd; /* Check if we are able to open device for reading */ if ((fd = open( DEVICE, O_RDONLY )) < 0) return 0; close(fd); return 1; } /* * Fill out general information about this driver. * Called once during initialization of DirectFB. */ static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf ( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "SonyPI Jogdial Driver" ); snprintf ( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "Denis Oliver Kropp" ); info->version.major = 0; info->version.minor = 1; } /* * Open the device, fill out information about it, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; SonypiData *data; /* open device */ fd = open( DEVICE, O_RDONLY); if (fd < 0) { D_PERROR( "DirectFB/sonypi: could not open device" ); return DFB_INIT; } /* set device name */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "PI Jogdial" ); /* set device vendor */ snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Sony" ); /* set one of the primary input device IDs */ info->prefered_id = DIDID_MOUSE; /* set type flags */ info->desc.type = DIDTF_MOUSE; /* set capabilities */ #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps = DICAPS_BUTTONS | DICAPS_AXES; #else info->desc.caps = DIDCAPS_BUTTONS | DIDCAPS_AXES; #endif info->desc.max_axis = DIAI_Z; info->desc.max_button = DIBI_MIDDLE; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(SonypiData) ); if (!data) { close( fd ); return D_OOM(); } data->fd = fd; data->device = device; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, sonypiEventThread, data, "Sony PI Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { SonypiData *data = (SonypiData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close file */ close( data->fd ); /* free private data */ D_FREE ( data ); } DirectFB-1.7.7/inputdrivers/sonypi/Makefile.am0000644000175000017500000000116012171403127016200 00000000000000## Makefile.am for DirectFB/inputdrivers/sonypi INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src sonypi_LTLIBRARIES = libdirectfb_sonypi.la if BUILD_STATIC sonypi_DATA = $(sonypi_LTLIBRARIES:.la=.o) endif sonypidir = $(MODULEDIR)/inputdrivers libdirectfb_sonypi_la_SOURCES = \ sonypi.c libdirectfb_sonypi_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_sonypi_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/sonypi/Makefile.in0000644000175000017500000006444112466665312016241 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/sonypi ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sonypidir)" "$(DESTDIR)$(sonypidir)" LTLIBRARIES = $(sonypi_LTLIBRARIES) libdirectfb_sonypi_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_sonypi_la_OBJECTS = sonypi.lo libdirectfb_sonypi_la_OBJECTS = $(am_libdirectfb_sonypi_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_sonypi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_sonypi_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_sonypi_la_SOURCES) DIST_SOURCES = $(libdirectfb_sonypi_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(sonypi_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src sonypi_LTLIBRARIES = libdirectfb_sonypi.la @BUILD_STATIC_TRUE@sonypi_DATA = $(sonypi_LTLIBRARIES:.la=.o) sonypidir = $(MODULEDIR)/inputdrivers libdirectfb_sonypi_la_SOURCES = \ sonypi.c libdirectfb_sonypi_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_sonypi_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/sonypi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/sonypi/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sonypiLTLIBRARIES: $(sonypi_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(sonypi_LTLIBRARIES)'; test -n "$(sonypidir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(sonypidir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sonypidir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(sonypidir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(sonypidir)"; \ } uninstall-sonypiLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(sonypi_LTLIBRARIES)'; test -n "$(sonypidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(sonypidir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(sonypidir)/$$f"; \ done clean-sonypiLTLIBRARIES: -test -z "$(sonypi_LTLIBRARIES)" || rm -f $(sonypi_LTLIBRARIES) @list='$(sonypi_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_sonypi.la: $(libdirectfb_sonypi_la_OBJECTS) $(libdirectfb_sonypi_la_DEPENDENCIES) $(EXTRA_libdirectfb_sonypi_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_sonypi_la_LINK) -rpath $(sonypidir) $(libdirectfb_sonypi_la_OBJECTS) $(libdirectfb_sonypi_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sonypi.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sonypiDATA: $(sonypi_DATA) @$(NORMAL_INSTALL) @list='$(sonypi_DATA)'; test -n "$(sonypidir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sonypidir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sonypidir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sonypidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(sonypidir)" || exit $$?; \ done uninstall-sonypiDATA: @$(NORMAL_UNINSTALL) @list='$(sonypi_DATA)'; test -n "$(sonypidir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sonypidir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(sonypidir)" "$(DESTDIR)$(sonypidir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-sonypiLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sonypiDATA install-sonypiLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sonypiDATA uninstall-sonypiLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sonypiLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sonypiDATA \ install-sonypiLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sonypiDATA \ uninstall-sonypiLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/dynapro/0000755000175000017500000000000012466665354014404 500000000000000DirectFB-1.7.7/inputdrivers/dynapro/dynapro.c0000644000175000017500000002002412171403127016117 00000000000000/* Written by Pär Degerman This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. NOTES ===== This driver is based heavily on code from two other DirectFB drivers, namely mutouch.c by Simon Ueng and elo.c by Byron Stanoszek and Brandon Reynolds, so a lot of credit should go to those people and not me. INSTRUCTIONS ============ You should change DYNAPRO_MIN_X and DYNAPRO_MIN_Y to match the orientation of your touchscreen. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( dynapro ) #define DYNAPRO_DEVICE "/dev/ttyS0" #define DYNAPRO_BAUD B9600 #define DYNAPRO_PACKET_SIZE 5 #define DYNAPRO_SCREENWIDTH 800 #define DYNAPRO_SCREENHEIGHT 600 #define DYNAPRO_MINX 800 #define DYNAPRO_MINY 600 #define DYNAPRO_CMD_TOUCH 0x81 #define DYNAPRO_CMD_UNTOUCH 0x80 typedef struct __dynaproData__ { int fd; DirectThread *thread; CoreInputDevice *device; unsigned short screen_width; unsigned short screen_height; unsigned short min_x; unsigned short min_y; unsigned short x; unsigned short y; unsigned char action; } dynaproData; /* Read a packet from touchcontroller */ static inline unsigned char *dynapro_getpck(int fd) { static unsigned char packet[DYNAPRO_PACKET_SIZE]; static unsigned int len = 0, start = 0; while(1) { if (read(fd, &packet[len++], 1) < 1) { break; } if (0 == start) { if (packet[len-1] & 0x80) { /* Packet start found */ start = 1; continue; } else { /* Continue searching for packet start */ len = 0; start = 0; continue; } } else if (len < DYNAPRO_PACKET_SIZE) { /* Continue until we have a full packet */ start = 1; continue; } /* A full packet received */ len = 0; start = 0; return packet; } return NULL; } /* Remove all input translations over tty serial controller. * * set=1: Saves current settings then turns rawmode on. * set=0: Restores controller to previous saved value. */ static void tty_rawmode(int fd, int set) { static struct termios tbuf, termios_save; if(set) { tcgetattr(fd, &termios_save); tbuf = termios_save; tbuf.c_iflag = 0; /* No input processing */ tbuf.c_oflag = 0; /* No output processing */ tbuf.c_lflag = 0; /* Disable erase/kill, signals, and echo */ /* Set baud & 1-char read mode */ tbuf.c_cflag = DYNAPRO_BAUD | CS8 | CLOCAL | CREAD; tcsetattr(fd, TCSANOW, &tbuf); } else { tcsetattr(fd, TCSANOW, &termios_save); } } /* Open file descriptor to touch device */ static int dynaproOpenDevice(char *device) { int fd; if((fd = open(device, O_RDWR|O_NOCTTY)) == -1) { D_PERROR("DirectFB/dynbapro: Error opening '%s'!\n",device); return -1; } if((flock(fd, LOCK_EX|LOCK_NB)) == -1) { D_PERROR("DirectFB/dynbapro: Error locking '%s'!\n",device); close(fd); return -1; } tty_rawmode(fd,1); return fd; } static int dynaproGetEvent(dynaproData *event) { unsigned char *ptr; unsigned int cmd, x, y; /* read packet */ if(!(ptr = dynapro_getpck(event->fd))) { return -1; } /* Get command (touch/untouch) and coordinates */ cmd = ptr[0]; x = (event->screen_width * ((ptr[3] << 8) + ptr[4])) / 0x0fff; y = (event->screen_height* ((ptr[1] << 8) + ptr[2])) / 0x0fff; if (event->min_x) x = event->min_x - x; if (event->min_y) y = event->min_y - y; event->action = cmd; event->x = x; event->y = y; return 0; } /* The main routine for dynapro */ static void *dynaproTouchEventThread(DirectThread *thread, void *driver_data) { dynaproData *data = (dynaproData *) driver_data; /* Read data */ while (1) { DFBInputEvent evt; if(dynaproGetEvent(data) == -1) { continue; } direct_thread_testcancel(thread); /* Dispatch axis */ evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = data->x; dfb_input_dispatch(data->device, &evt); evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = data->y; dfb_input_dispatch(data->device, &evt); /* Dispatch touch event */ if (DYNAPRO_CMD_UNTOUCH == data->action) evt.type = DIET_BUTTONRELEASE; else evt.type = DIET_BUTTONPRESS; evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch(data->device, &evt); direct_thread_testcancel(thread); } return NULL; } /* exported symbols */ static int driver_get_available( void ) { int fd; fd = dynaproOpenDevice(DYNAPRO_DEVICE); if (fd < 0) { return 0; } close(fd); return 1; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf(info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "dynapro" ); snprintf(info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "3M" ); info->version.major = 0; info->version.minor = 1; } static DFBResult driver_open_device(CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data) { int fd; dynaproData *data; /* open device */ fd = dynaproOpenDevice(DYNAPRO_DEVICE); if(fd < 0) { D_PERROR("DirectFB/dynapro: Error opening '"DYNAPRO_DEVICE"'!\n"); return DFB_INIT; } data = D_CALLOC(1, sizeof(dynaproData)); if (!data) { tty_rawmode(fd, 0); close(fd); return D_OOM(); } data->fd = fd; data->device = device; /* FIXME! Use settings instead? */ data->screen_width = DYNAPRO_SCREENWIDTH; data->screen_height = DYNAPRO_SCREENHEIGHT; data->min_x = DYNAPRO_MINX; data->min_y = DYNAPRO_MINY; /* fill device info structure */ snprintf(info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "dynapro"); snprintf(info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "3M"); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; info->desc.max_axis = DIAI_Y; info->desc.max_button = DIBI_LEFT; /* start input thread */ data->thread = direct_thread_create(DTT_INPUT, dynaproTouchEventThread, data, "Dynapro Touch Input"); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry(CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry) { return DFB_UNSUPPORTED; } static void driver_close_device(void *driver_data) { dynaproData *data = (dynaproData *)driver_data; /* stop input thread */ direct_thread_cancel(data->thread); direct_thread_join(data->thread); direct_thread_destroy(data->thread); /* restore termnial settings for the port */ tty_rawmode(data->fd, 0); /* close device */ close(data->fd); /* free private data */ D_FREE(data); } DirectFB-1.7.7/inputdrivers/dynapro/Makefile.am0000644000175000017500000000116012171403127016333 00000000000000## Makefile.am for DirectFB/inputdrivers/dynapro INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_dynapro.la if BUILD_STATIC input_DATA = $(input_LTLIBRARIES:.la=.o) endif inputdir = $(MODULEDIR)/inputdrivers libdirectfb_dynapro_la_SOURCES = \ dynapro.c libdirectfb_dynapro_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_dynapro_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/dynapro/Makefile.in0000644000175000017500000006440512466665312016374 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/dynapro ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)" LTLIBRARIES = $(input_LTLIBRARIES) libdirectfb_dynapro_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_dynapro_la_OBJECTS = dynapro.lo libdirectfb_dynapro_la_OBJECTS = $(am_libdirectfb_dynapro_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_dynapro_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_dynapro_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_dynapro_la_SOURCES) DIST_SOURCES = $(libdirectfb_dynapro_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(input_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_dynapro.la @BUILD_STATIC_TRUE@input_DATA = $(input_LTLIBRARIES:.la=.o) inputdir = $(MODULEDIR)/inputdrivers libdirectfb_dynapro_la_SOURCES = \ dynapro.c libdirectfb_dynapro_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_dynapro_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/dynapro/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/dynapro/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputLTLIBRARIES: $(input_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdir)"; \ } uninstall-inputLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdir)/$$f"; \ done clean-inputLTLIBRARIES: -test -z "$(input_LTLIBRARIES)" || rm -f $(input_LTLIBRARIES) @list='$(input_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_dynapro.la: $(libdirectfb_dynapro_la_OBJECTS) $(libdirectfb_dynapro_la_DEPENDENCIES) $(EXTRA_libdirectfb_dynapro_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_dynapro_la_LINK) -rpath $(inputdir) $(libdirectfb_dynapro_la_OBJECTS) $(libdirectfb_dynapro_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynapro.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-inputDATA: $(input_DATA) @$(NORMAL_INSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdir)" || exit $$?; \ done uninstall-inputDATA: @$(NORMAL_UNINSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-inputLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-inputDATA install-inputLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-inputDATA uninstall-inputLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-inputLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-inputDATA install-inputLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-inputDATA uninstall-inputLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/keyboard/0000755000175000017500000000000012466665354014530 500000000000000DirectFB-1.7.7/inputdrivers/keyboard/Makefile.am0000644000175000017500000000123712171403127016464 00000000000000## Makefile.am for DirectFB/inputdrivers/keyboard INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/systems keyboard_LTLIBRARIES = libdirectfb_keyboard.la if BUILD_STATIC keyboard_DATA = $(keyboard_LTLIBRARIES:.la=.o) endif keyboarddir = $(MODULEDIR)/inputdrivers libdirectfb_keyboard_la_SOURCES = \ keyboard.c libdirectfb_keyboard_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_keyboard_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/keyboard/Makefile.in0000644000175000017500000006473112466665312016522 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/keyboard ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(keyboarddir)" \ "$(DESTDIR)$(keyboarddir)" LTLIBRARIES = $(keyboard_LTLIBRARIES) libdirectfb_keyboard_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_keyboard_la_OBJECTS = keyboard.lo libdirectfb_keyboard_la_OBJECTS = \ $(am_libdirectfb_keyboard_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_keyboard_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_keyboard_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_keyboard_la_SOURCES) DIST_SOURCES = $(libdirectfb_keyboard_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(keyboard_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/systems keyboard_LTLIBRARIES = libdirectfb_keyboard.la @BUILD_STATIC_TRUE@keyboard_DATA = $(keyboard_LTLIBRARIES:.la=.o) keyboarddir = $(MODULEDIR)/inputdrivers libdirectfb_keyboard_la_SOURCES = \ keyboard.c libdirectfb_keyboard_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_keyboard_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/keyboard/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/keyboard/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-keyboardLTLIBRARIES: $(keyboard_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(keyboard_LTLIBRARIES)'; test -n "$(keyboarddir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(keyboarddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(keyboarddir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(keyboarddir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(keyboarddir)"; \ } uninstall-keyboardLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(keyboard_LTLIBRARIES)'; test -n "$(keyboarddir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(keyboarddir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(keyboarddir)/$$f"; \ done clean-keyboardLTLIBRARIES: -test -z "$(keyboard_LTLIBRARIES)" || rm -f $(keyboard_LTLIBRARIES) @list='$(keyboard_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_keyboard.la: $(libdirectfb_keyboard_la_OBJECTS) $(libdirectfb_keyboard_la_DEPENDENCIES) $(EXTRA_libdirectfb_keyboard_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_keyboard_la_LINK) -rpath $(keyboarddir) $(libdirectfb_keyboard_la_OBJECTS) $(libdirectfb_keyboard_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-keyboardDATA: $(keyboard_DATA) @$(NORMAL_INSTALL) @list='$(keyboard_DATA)'; test -n "$(keyboarddir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(keyboarddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(keyboarddir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(keyboarddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(keyboarddir)" || exit $$?; \ done uninstall-keyboardDATA: @$(NORMAL_UNINSTALL) @list='$(keyboard_DATA)'; test -n "$(keyboarddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(keyboarddir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(keyboarddir)" "$(DESTDIR)$(keyboarddir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-keyboardLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-keyboardDATA install-keyboardLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-keyboardDATA uninstall-keyboardLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-keyboardLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-keyboardDATA \ install-keyboardLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-keyboardDATA \ uninstall-keyboardLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/keyboard/keyboard.c0000644000175000017500000003645612254435330016412 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( keyboard ) typedef struct { CoreInputDevice *device; DirectThread *thread; struct termios old_ts; int vt_fd; } KeyboardData; static DFBInputDeviceKeySymbol keyboard_get_symbol( int code, unsigned short value, DFBInputDeviceKeymapSymbolIndex level ) { unsigned char type = KTYP(value); unsigned char index = KVAL(value); int base = (level == DIKSI_BASE); switch (type) { case KT_FN: if (index < 20) return DFB_FUNCTION_KEY( index + 1 ); break; case KT_LETTER: case KT_LATIN: switch (index) { case 0x1c: return DIKS_PRINT; case 0x7f: return DIKS_BACKSPACE; case 0xa4: return 0x20ac; /* euro currency sign */ default: return index; } break; case KT_DEAD: switch (value) { case K_DGRAVE: return DIKS_DEAD_GRAVE; case K_DACUTE: return DIKS_DEAD_ACUTE; case K_DCIRCM: return DIKS_DEAD_CIRCUMFLEX; case K_DTILDE: return DIKS_DEAD_TILDE; case K_DDIERE: return DIKS_DEAD_DIAERESIS; case K_DCEDIL: return DIKS_DEAD_CEDILLA; default: break; } break; case KT_PAD: if (index <= 9 && level != DIKSI_BASE) return DIKS_0 + index; break; case 0xe: /* special IPAQ H3600 case - AH */ switch (index) { case 0x20: return DIKS_CALENDAR; case 0x1a: return DIKS_BACK; case 0x1c: return DIKS_MEMO; case 0x21: return DIKS_POWER; } break; case 0xd: /* another special IPAQ H3600 case - AH */ switch (index) { case 0x2: return DIKS_DIRECTORY; case 0x1: return DIKS_MAIL; /* Q on older iPaqs */ } break; } switch (value) { case K_LEFT: return DIKS_CURSOR_LEFT; case K_RIGHT: return DIKS_CURSOR_RIGHT; case K_UP: return DIKS_CURSOR_UP; case K_DOWN: return DIKS_CURSOR_DOWN; case K_ENTER: return DIKS_ENTER; case K_CTRL: return DIKS_CONTROL; case K_SHIFT: return DIKS_SHIFT; case K_ALT: return DIKS_ALT; case K_ALTGR: return DIKS_ALTGR; case K_INSERT: return DIKS_INSERT; case K_REMOVE: return DIKS_DELETE; case K_FIND: return DIKS_HOME; case K_SELECT: return DIKS_END; case K_PGUP: return DIKS_PAGE_UP; case K_PGDN: return DIKS_PAGE_DOWN; case K_NUM: return DIKS_NUM_LOCK; case K_HOLD: return DIKS_SCROLL_LOCK; case K_PAUSE: return DIKS_PAUSE; case K_BREAK: return DIKS_BREAK; case K_CAPS: return DIKS_CAPS_LOCK; case K_P0: return DIKS_INSERT; case K_P1: return DIKS_END; case K_P2: return DIKS_CURSOR_DOWN; case K_P3: return DIKS_PAGE_DOWN; case K_P4: return DIKS_CURSOR_LEFT; case K_P5: return DIKS_BEGIN; case K_P6: return DIKS_CURSOR_RIGHT; case K_P7: return DIKS_HOME; case K_P8: return DIKS_CURSOR_UP; case K_P9: return DIKS_PAGE_UP; case K_PPLUS: return DIKS_PLUS_SIGN; case K_PMINUS: return DIKS_MINUS_SIGN; case K_PSTAR: return DIKS_ASTERISK; case K_PSLASH: return DIKS_SLASH; case K_PENTER: return DIKS_ENTER; case K_PCOMMA: return base ? DIKS_DELETE : DIKS_COMMA; case K_PDOT: return base ? DIKS_DELETE : DIKS_PERIOD; case K_PPARENL: return DIKS_PARENTHESIS_LEFT; case K_PPARENR: return DIKS_PARENTHESIS_RIGHT; } /* special keys not in the map, hack? */ if (code == 124) /* keypad equal key */ return DIKS_EQUALS_SIGN; if (code == 125) /* left windows key */ return DIKS_META; if (code == 126) /* right windows key */ return DIKS_META; if (code == 127) /* context menu key */ return DIKS_SUPER; return DIKS_NULL; } static DFBInputDeviceKeyIdentifier keyboard_get_identifier( int code, unsigned short value ) { unsigned char type = KTYP(value); unsigned char index = KVAL(value); if (type == KT_PAD) { if (index <= 9) return DIKI_KP_0 + index; switch (value) { case K_PSLASH: return DIKI_KP_DIV; case K_PSTAR: return DIKI_KP_MULT; case K_PMINUS: return DIKI_KP_MINUS; case K_PPLUS: return DIKI_KP_PLUS; case K_PENTER: return DIKI_KP_ENTER; case K_PCOMMA: case K_PDOT: return DIKI_KP_DECIMAL; } } /* Looks like a hack, but don't know a better way yet. */ switch (code) { case 12: return DIKI_MINUS_SIGN; case 13: return DIKI_EQUALS_SIGN; case 26: return DIKI_BRACKET_LEFT; case 27: return DIKI_BRACKET_RIGHT; case 39: return DIKI_SEMICOLON; case 40: return DIKI_QUOTE_RIGHT; case 41: return DIKI_QUOTE_LEFT; case 43: return DIKI_BACKSLASH; case 51: return DIKI_COMMA; case 52: return DIKI_PERIOD; case 53: return DIKI_SLASH; case 54: return DIKI_SHIFT_R; case 97: return DIKI_CONTROL_R; default: ; } /* special keys not in the map, hack? */ if (code == 124) /* keypad equal key */ return DIKI_KP_EQUAL; if (code == 125) /* left windows key */ return DIKI_META_L; if (code == 126) /* right windows key */ return DIKI_META_R; if (code == 127) /* context menu key */ return DIKI_SUPER_R; return DIKI_UNKNOWN; } static unsigned short keyboard_read_value( KeyboardData *data, unsigned char table, unsigned char index ) { struct kbentry entry; entry.kb_table = table; entry.kb_index = index; entry.kb_value = 0; if (ioctl( data->vt_fd, KDGKBENT, &entry )) { D_PERROR("DirectFB/keyboard: KDGKBENT (table: %d, index: %d) " "failed!\n", table, index); return 0; } return entry.kb_value; } static void keyboard_set_lights( KeyboardData *data, DFBInputDeviceLockState locks ) { ioctl( data->vt_fd, KDSKBLED, locks ); } static void* keyboardEventThread( DirectThread *thread, void *driver_data ) { int readlen; unsigned char buf[64]; KeyboardData *data = (KeyboardData*) driver_data; /* Read keyboard data */ while ((readlen = read (data->vt_fd, buf, 64)) >= 0 || errno == EINTR) { int i; direct_thread_testcancel( thread ); for (i = 0; i < readlen; i++) { DFBInputEvent evt; evt.type = ((buf[i] & 0x80) ? DIET_KEYRELEASE : DIET_KEYPRESS); evt.flags = DIEF_KEYCODE; evt.key_code = buf[i] & 0x7f; dfb_input_dispatch( data->device, &evt ); keyboard_set_lights( data, evt.locks ); } if (readlen <= 0) usleep( 200000 ); } if (readlen <= 0 && errno != EINTR) D_PERROR ("keyboard thread died\n"); return NULL; } /* driver functions */ static int driver_get_available( void ) { int fd; switch (dfb_system_type()) { case CORE_FBDEV: case CORE_DEVMEM: return 1; default: return 0; } fd = open( "/dev/tty0", O_RDWR | O_NOCTTY ); if (fd < 0) return 0; close( fd ); return 1; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "Keyboard Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 0; info->version.minor = 9; } static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; struct termios ts; KeyboardData *data; if (dfb_system_type() == CORE_FBDEV && dfb_config->vt) { FBDev *dfb_fbdev = dfb_system_data(); fd = dup( dfb_fbdev->vt->fd ); if (fd < 0) { D_PERROR( "DirectFB/Keyboard: Could not dup() file descriptor of TTY!\n" ); return DFB_INIT; } } else { fd = open( "/dev/tty0", O_RDWR | O_NOCTTY ); if (fd < 0) { D_PERROR( "DirectFB/Keyboard: Could not open() /dev/tty0!\n" ); return DFB_INIT; } } /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(KeyboardData) ); if (!data) { close( fd ); return D_OOM(); } data->device = device; data->vt_fd = fd; tcgetattr( data->vt_fd, &data->old_ts ); ts = data->old_ts; ts.c_cc[VTIME] = 0; ts.c_cc[VMIN] = 1; ts.c_lflag &= ~(ICANON|ECHO|ISIG); ts.c_iflag = 0; tcsetattr( data->vt_fd, TCSAFLUSH, &ts ); tcsetpgrp( data->vt_fd, getpgrp() ); if (dfb_system_type() == CORE_FBDEV && dfb_config->vt) { FBDev *dfb_fbdev = dfb_system_data(); dfb_fbdev->vt->flush = false; } /* fill device info structure */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "Keyboard" ); snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Unknown" ); /* claim to be the primary keyboard */ info->prefered_id = DIDID_KEYBOARD; /* classify as a keyboard able to produce key events */ info->desc.type = DIDTF_KEYBOARD; #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps = DICAPS_KEYS; #else info->desc.caps = DIDCAPS_KEYS; #endif /* enable translation of raw hardware keycodes */ info->desc.min_keycode = 0; info->desc.max_keycode = 127; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, keyboardEventThread, data, "Keyboard Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the kernel keymap. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { int code = entry->code; unsigned short value; DFBInputDeviceKeyIdentifier identifier; /* fetch the base level */ value = keyboard_read_value( driver_data, K_NORMTAB, code ); /* get the identifier for basic mapping */ identifier = keyboard_get_identifier( code, value ); /* is CapsLock effective? */ if (KTYP(value) == KT_LETTER) entry->locks |= DILS_CAPS; /* is NumLock effective? */ if (identifier >= DIKI_KP_DECIMAL && identifier <= DIKI_KP_9) entry->locks |= DILS_NUM; /* write identifier to entry */ entry->identifier = identifier; /* write base level symbol to entry */ entry->symbols[DIKSI_BASE] = keyboard_get_symbol( code, value, DIKSI_BASE ); /* fetch the shifted base level */ value = keyboard_read_value( driver_data, K_SHIFTTAB, entry->code ); /* write shifted base level symbol to entry */ entry->symbols[DIKSI_BASE_SHIFT] = keyboard_get_symbol( code, value, DIKSI_BASE_SHIFT ); /* fetch the alternative level */ value = keyboard_read_value( driver_data, K_ALTTAB, entry->code ); /* write alternative level symbol to entry */ entry->symbols[DIKSI_ALT] = keyboard_get_symbol( code, value, DIKSI_ALT ); /* fetch the shifted alternative level */ value = keyboard_read_value( driver_data, K_ALTSHIFTTAB, entry->code ); /* write shifted alternative level symbol to entry */ entry->symbols[DIKSI_ALT_SHIFT] = keyboard_get_symbol( code, value, DIKSI_ALT_SHIFT ); return DFB_OK; } static void driver_close_device( void *driver_data ) { KeyboardData *data = (KeyboardData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); if (tcsetattr( data->vt_fd, TCSAFLUSH, &data->old_ts ) < 0) D_PERROR("DirectFB/keyboard: tcsetattr for original values failed!\n"); close( data->vt_fd ); /* free private data */ D_FREE( data ); } DirectFB-1.7.7/inputdrivers/penmount/0000755000175000017500000000000012466665355014576 500000000000000DirectFB-1.7.7/inputdrivers/penmount/Makefile.am0000755000175000017500000000116412171403127016533 00000000000000## Makefile.am for DirectFB/inputdrivers/penmount INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_penmount.la if BUILD_STATIC input_DATA = $(input_LTLIBRARIES:.la=.o) endif inputdir = $(MODULEDIR)/inputdrivers libdirectfb_penmount_la_SOURCES = penmount.c libdirectfb_penmount_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_penmount_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/penmount/penmount.c0000755000175000017500000002224212171403127016510 00000000000000/* (c) Copyright 2000-2002 Fulgid Technology Co., Ltd. All rights reserved. Written by Simon Ueng Modified by Nikita Egorov This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. This driver is a re-write from the MuTouch driver. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( penmount ) #define BAUDRATE B19200 #define PeM_REPORT_SIZE 5 #define PeM_PACKET_SIZE 10 #define PeM_SCREENWIDTH 640 #define PeM_SCREENHEIGHT 480 #define PeM_MINX 0 #define PeM_MINY 0 #define PEM_PANEL_TOUCH 0x01 #define PEM_PANEL_UNTOUCH 0x00 /* Event mask */ #define PeM_PANEL_TOUCH_MASK 0x40 #define PeM_PANEL_SYNC_MASK 0x80 typedef struct __PeMData__ { int fd; DirectThread *thread; CoreInputDevice *device; unsigned short x; unsigned short y; unsigned short screen_width; unsigned short screen_height; unsigned short min_x; unsigned short min_y; unsigned char action; } PeMData; /* Global Variables */ static unsigned char packet[PeM_PACKET_SIZE]; /* touchscreen values of left/top position */ static int min_x=19,min_y=1001; /* touchscreen values of right/bottom position */ static int max_x=946,max_y=62; static inline void __mdelay(unsigned int msec){ struct timespec delay; delay.tv_sec = 0; delay.tv_nsec = msec * 1000000; nanosleep (&delay, NULL); } static inline void PeMSendPacket(int file, unsigned char *packet, unsigned char len){ write (file, packet, len); } static inline void PeMReadPacket(int file, unsigned char *packet){ int n = 0; memset (packet, 0, PeM_PACKET_SIZE); while ((n += read (file, packet+n, PeM_REPORT_SIZE-n)) != PeM_REPORT_SIZE); } static int PeMPollDevice(const char *device){ int file; struct termios options; /* Make raw I/O */ memset (&options, 0, sizeof (struct termios)); /* Open I/O port */ file = open (device, O_RDWR | O_NOCTTY); options.c_cflag = BAUDRATE | CS8 | CLOCAL | CREAD; options.c_cc[VMIN] = 1; options.c_cc[VTIME] = 0; tcflush (file, TCIFLUSH); tcsetattr (file, TCSANOW, &options); return file; } static inline int PeMInitialize(int file){ /* it's a stub */ /* I dont know how get information about PenMount device... */ return 1; } static int PeMOpenDevice(char *device){ int fd; int res; char *pos = strstr(device, ":raw"); if (pos) {// raw data max_x = min_x; max_y = min_y; *pos = 0; } fd = PeMPollDevice (device); if ((res = PeMInitialize (fd)) == 0) { close (fd); return res; } return fd; } static int convert_x(int x,PeMData *event){ if (max_x != min_x) return .5+event->screen_width*((double)x - min_x)/(max_x - min_x); else return x; } static int convert_y(int y,PeMData *event){ if (max_y != min_y) return .5+event->screen_height*((double)y - min_y)/(max_y - min_y); else return y; } #define WORD_ASSEMBLY(byte1, byte2) (((byte2) << 7) | (byte1)) static int PeMGetEvent(PeMData *event){ PeMReadPacket(event->fd, packet); /* Sync bit always must be set to 1 */ if ((*packet & PeM_PANEL_SYNC_MASK) == 0) return 0; if (*packet & PeM_PANEL_TOUCH_MASK) event->action = PEM_PANEL_TOUCH; else event->action = PEM_PANEL_UNTOUCH; event->y = convert_y( WORD_ASSEMBLY(packet[2], packet[1]),event); event->x = convert_x( WORD_ASSEMBLY(packet[4], packet[3]),event); if (event->min_x) event->x = event->min_x - event->x; if (event->min_y) event->y = event->min_y - event->y; return 1; } /* The main routine for PenMount */ static void *PenMountEventThread(DirectThread *thread, void *driver_data){ PeMData *data = (PeMData *) driver_data; /* Read data */ while (1) { DFBInputEvent evt; static int pressed = 0; if (!PeMGetEvent (data)) continue; direct_thread_testcancel (thread); /* Dispatch axis */ evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = data->x; dfb_input_dispatch (data->device, &evt); evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = data->y; dfb_input_dispatch (data->device, &evt); /* Dispatch touch event */ switch (data->action) { case PEM_PANEL_TOUCH: if (!pressed) evt.type = DIET_BUTTONPRESS; pressed = 1; break; case PEM_PANEL_UNTOUCH: if (pressed) evt.type = DIET_BUTTONRELEASE; pressed = 0; break; } evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch (data->device, &evt); direct_thread_testcancel (thread); } return NULL; } /* exported symbols */ static int driver_get_available( void ){ int fd; if (!dfb_config->penmount_device) return 0; fd = PeMOpenDevice (dfb_config->penmount_device); if (fd < 0) return 0; close(fd); return 1; } static void driver_get_info( InputDriverInfo *info ){ /* fill driver info structure */ snprintf(info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "PenMount 9509" ); snprintf(info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "AMT" ); info->version.major = 0; info->version.minor = 1; } static DFBResult driver_open_device(CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data){ int fd; PeMData *data; /* open device */ fd = PeMOpenDevice (dfb_config->penmount_device); if (fd < 0) { D_PERROR("DirectFB/PenMount: Error opening '%s'!\n", dfb_config->penmount_device); return DFB_INIT; } data = D_CALLOC (1, sizeof(PeMData)); if (!data) { close (fd); return D_OOM (); } data->fd = fd; data->device = device; /* Must define the correct resolution of screen */ data->screen_width = PeM_SCREENWIDTH; data->screen_height = PeM_SCREENHEIGHT; /* The following variable are defined to adjust the orientation of * the touchscreen. Variables are either max screen height/width or 0. */ data->min_x = PeM_MINX; data->min_y = PeM_MINY; /* fill device info structure */ snprintf(info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "PenMount 9509"); snprintf(info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "AMT"); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; #else info->desc.caps = DIDCAPS_AXES | DIDCAPS_BUTTONS; #endif info->desc.max_axis = DIAI_Y; info->desc.max_button = DIBI_LEFT; /* start input thread */ data->thread = direct_thread_create (DTT_INPUT, PenMountEventThread, data, "PenMount Input"); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry(CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry) { return DFB_UNSUPPORTED; } static void driver_close_device(void *driver_data){ PeMData *data = (PeMData *)driver_data; /* stop input thread */ direct_thread_cancel (data->thread); direct_thread_join (data->thread); direct_thread_destroy (data->thread); /* close device */ close (data->fd); /* free private data */ D_FREE (data); } DirectFB-1.7.7/inputdrivers/penmount/Makefile.in0000644000175000017500000006443612466665312016571 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/penmount ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)" LTLIBRARIES = $(input_LTLIBRARIES) libdirectfb_penmount_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_penmount_la_OBJECTS = penmount.lo libdirectfb_penmount_la_OBJECTS = \ $(am_libdirectfb_penmount_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_penmount_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_penmount_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_penmount_la_SOURCES) DIST_SOURCES = $(libdirectfb_penmount_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(input_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_penmount.la @BUILD_STATIC_TRUE@input_DATA = $(input_LTLIBRARIES:.la=.o) inputdir = $(MODULEDIR)/inputdrivers libdirectfb_penmount_la_SOURCES = penmount.c libdirectfb_penmount_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_penmount_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/penmount/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/penmount/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputLTLIBRARIES: $(input_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdir)"; \ } uninstall-inputLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdir)/$$f"; \ done clean-inputLTLIBRARIES: -test -z "$(input_LTLIBRARIES)" || rm -f $(input_LTLIBRARIES) @list='$(input_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_penmount.la: $(libdirectfb_penmount_la_OBJECTS) $(libdirectfb_penmount_la_DEPENDENCIES) $(EXTRA_libdirectfb_penmount_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_penmount_la_LINK) -rpath $(inputdir) $(libdirectfb_penmount_la_OBJECTS) $(libdirectfb_penmount_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/penmount.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-inputDATA: $(input_DATA) @$(NORMAL_INSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdir)" || exit $$?; \ done uninstall-inputDATA: @$(NORMAL_UNINSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-inputLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-inputDATA install-inputLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-inputDATA uninstall-inputLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-inputLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-inputDATA install-inputLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-inputDATA uninstall-inputLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/mutouch/0000755000175000017500000000000012466665355014415 500000000000000DirectFB-1.7.7/inputdrivers/mutouch/Makefile.am0000644000175000017500000000116212171403127016345 00000000000000## Makefile.am for DirectFB/inputdrivers/microtouch INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_mutouch.la if BUILD_STATIC input_DATA = $(input_LTLIBRARIES:.la=.o) endif inputdir = $(MODULEDIR)/inputdrivers libdirectfb_mutouch_la_SOURCES = mutouch.c libdirectfb_mutouch_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_mutouch_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/mutouch/Makefile.in0000644000175000017500000006440112466665312016400 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/mutouch ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)" LTLIBRARIES = $(input_LTLIBRARIES) libdirectfb_mutouch_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_mutouch_la_OBJECTS = mutouch.lo libdirectfb_mutouch_la_OBJECTS = $(am_libdirectfb_mutouch_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_mutouch_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_mutouch_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_mutouch_la_SOURCES) DIST_SOURCES = $(libdirectfb_mutouch_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(input_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_mutouch.la @BUILD_STATIC_TRUE@input_DATA = $(input_LTLIBRARIES:.la=.o) inputdir = $(MODULEDIR)/inputdrivers libdirectfb_mutouch_la_SOURCES = mutouch.c libdirectfb_mutouch_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_mutouch_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/mutouch/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/mutouch/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputLTLIBRARIES: $(input_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdir)"; \ } uninstall-inputLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdir)/$$f"; \ done clean-inputLTLIBRARIES: -test -z "$(input_LTLIBRARIES)" || rm -f $(input_LTLIBRARIES) @list='$(input_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_mutouch.la: $(libdirectfb_mutouch_la_OBJECTS) $(libdirectfb_mutouch_la_DEPENDENCIES) $(EXTRA_libdirectfb_mutouch_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_mutouch_la_LINK) -rpath $(inputdir) $(libdirectfb_mutouch_la_OBJECTS) $(libdirectfb_mutouch_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutouch.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-inputDATA: $(input_DATA) @$(NORMAL_INSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdir)" || exit $$?; \ done uninstall-inputDATA: @$(NORMAL_UNINSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-inputLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-inputDATA install-inputLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-inputDATA uninstall-inputLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-inputLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-inputDATA install-inputLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-inputDATA uninstall-inputLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/mutouch/mutouch.c0000644000175000017500000004142612171403127016150 00000000000000/* (c) Copyright 2000-2002 Fulgid Technology Co., Ltd. All rights reserved. Written by Simon Ueng This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. This driver is a re-write from the MuTouch driver provided in XFree86. Extended options in the MuTouch firmware are not used as it wasn't an issue during the writing of this driver. Baudrate has also been rewritting to automatically adjust to 19200 if its support else it uses 9600. Feel free to change according to your needs, but changing both MuT_MINX as well as MuT_MINY is required to adjust the orientation of the touchscreen. We've had numerous occasions where the one touchscreen was installed in a different orientation than others. Also don't forget to adjust the MuT_SCREENWIDTH and MuT_SCREENHEIGHT for the appropriate screen dimension. Not much time has been spent writing this driver therefore expect errors. Calibration process has also been omitted since there are applications to do the calibration process. Lastly, please don't email me regarding technical informations. I don't work for 3M. But if you have any new ideas on improving this driver, please don't hesitate to share it with me. */ /* * Jacques Luder j.luder@laposte.net * Baudrate adjust now realy working ! * version 0.3 10/09/2006 Jacques Luder j.luder@laposte.net * Can now work also with a keyspan USB-Serial line. * Can start OK even if someone touch the screen during probing. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( mutouch ) #define BAUDRATE B9600 #define OPTIMAL_BAUDRATE B19200 #define MAX_TIMEOUT 5 #define MuT_REPORT_SIZE 5 #define MuT_PACKET_SIZE 10 #define MuT_SCREENWIDTH 4096 #define MuT_SCREENHEIGHT 4096 #define MuT_MINX 0 #define MuT_MINY 0 #define MuT_LEAD_BYTE 0x01 #define MuT_TRAIL_BYTE 0x0d #define ERROR_NOT_SUITABLE -1110 /* The touchpanel firmware is not suitable for IMP2001 */ #define ERROR_NOT_FOUND -1111 /* Touchpanel not found */ #define ERROR_INIT -1112 /* Error occurred while initializing */ #define MUT_PANEL_TOUCH 0x01 #define MUT_PANEL_UNTOUCH 0x00 /* Commands */ #define MuT_RESET "R" #define MuT_AUTOBAUD_DISABLE "AD" #define MuT_RESTORE_DEFAULTS "RD" #define MuT_QUERY "Z" #define MuT_FORMAT_TABLET "FT" #define MuT_FORMAT_RAW "FR" #define MuT_CALIBRATE_RAW "CR" #define MuT_CALIBRATE_EXT "CX" #define MuT_OUTPUT_IDENT "OI" #define MuT_UNIT_TYPE "UT" #define MuT_FINGER_ONLY "FO" #define MuT_PEN_ONLY "PO" #define MuT_PEN_FINGER "PF" #define MuT_MODE_STREAM "MS" #define MuT_MODE_DOWN_UP "MDU" /* Command reply */ #define MuT_OK '0' #define MuT_ERROR '1' /* Offsets in status byte of touch and motion reports */ #define MuT_WHICH_DEVICE 0x20 #define MuT_CONTACT 0x40 /* Identity and friends */ #define MuT_SMT3_IDENT "Q1" #define MuT_THRU_GLASS_IDENT "T1" /* Event mask */ #define MuT_PANEL_TOUCH_MASK 0x40 #define MuT_PANEL_SYNC_MASK 0x80 typedef struct __MuTData__ { int fd; DirectThread *thread; CoreInputDevice *device; unsigned short x; unsigned short y; unsigned short screen_width; unsigned short screen_height; unsigned short min_x; unsigned short min_y; unsigned char action; } MuTData; /* Global Variables */ static unsigned char packet[MuT_PACKET_SIZE]; static inline void __mdelay(unsigned int msec) { struct timespec delay; delay.tv_sec = 0; delay.tv_nsec = msec * 1000000; nanosleep (&delay, NULL); } static inline void MuTSendPacket(int file, char *packet, unsigned char len) { int res; unsigned char tmp_packet[MuT_PACKET_SIZE]; direct_memcpy (&tmp_packet[1], packet, len); *tmp_packet = MuT_LEAD_BYTE; tmp_packet[len + 1] = MuT_TRAIL_BYTE; res = write (file, tmp_packet, len + 2); (void)res; } static inline void MuTReadPacket(int file, unsigned char *packet) { int n = 0; int res; while ( n < MuT_REPORT_SIZE ) { res = read( file, &packet[n], 1 ); (void)res; if ( (packet[0] & MuT_PANEL_SYNC_MASK) != 0) { n++; } } } static int MuTSetToOptimalCTRL(int file, unsigned long baud) { unsigned char packet[3]={0,0,0}; struct termios options; struct termios save_options; /* * We are now in a mode who "works" but may be not the good one ! * So we will make a test if a "good" mode works fine ... */ tcgetattr(file, &options); tcgetattr(file, &save_options); // Save mode who works. /* * Send a command to change to suitable mode. */ switch (baud) { case B19200: MuTSendPacket (file, "PN811", 5); break; case B9600: MuTSendPacket (file, "PN812", 5); break; } // Note answer from driver will be lost ! there is no way to catch it with some // USB-Serial device. we have only to wait ! __mdelay (20); /* * We can't work on CS7 mode messages format are not the same ! */ options.c_cflag = CS8 | CLOCAL | CREAD; /* * POSIX says speed is ONLY here ! */ cfsetospeed( &options, baud); cfsetispeed( &options, 0); // Same as output. tcsetattr (file, TCSANOW, &options); __mdelay (100); tcflush (file, TCIFLUSH); /* * With some USB-Serial device flush may occurs after sending message and answer from driver * may be lost ! ... so we wait ! */ __mdelay (100); switch (baud) { case B19200: MuTSendPacket (file, "PN811", 5); break; case B9600: MuTSendPacket (file, "PN812", 5); break; } /* * note if someone touch screen, we have also to strip "touch" message by testing MuT_LEAD_BYTE. */ __mdelay (100); int n = 0; while ( n <3 ) { if (read( file, &packet[n], 1 ) <=0) break; if ( packet[n] == MuT_LEAD_BYTE ) { // new start n = 0; packet[0] = MuT_LEAD_BYTE; } if ( (n==1) && (packet[1] != MuT_OK)) { n = 0; packet[0]= 0; } if ( (n==2) && (packet[2] != MuT_TRAIL_BYTE) ) { n = 0; packet[0]= 0; } if ( packet[0] == MuT_LEAD_BYTE) n++; } if ( n == 3 ) { /* Unset O_NONBLOCK */ int flags; flags = fcntl( file, F_GETFL ); flags &= ~O_NONBLOCK; fcntl( file, F_SETFL, flags ); /* Unset VTIME */ options.c_cc[VMIN] = 1; options.c_cc[VTIME] = 0; tcsetattr (file, TCSANOW, &options); __mdelay (100); return 1; // OK } // KO return to old termios options. tcsetattr (file, TCSANOW, &save_options); __mdelay (100); return 0; } static int MuTPollDevice(char *device) { int file; struct termios options; unsigned char i, m; unsigned char packet[MuT_PACKET_SIZE]; unsigned long baud[2] = {B9600, B19200}; unsigned long misc[2] = {CS8, CS7 | CSTOPB}; file = open (device, O_RDWR | O_NOCTTY); /* Set O_NONBLOCK */ int flags; flags = fcntl( file, F_GETFL ); flags |= O_NONBLOCK; fcntl( file, F_SETFL, flags ); /* Make raw I/O */ memset (&options, 0, sizeof (struct termios)); /* cfmakeraw(&options) */ options.c_cc[VMIN] = 0; options.c_cc[VTIME] = 10; /* loop through the bauds */ for (i = 0; i < 2; i++) { /* loop through the misc configs */ for (m = 0; m < 2; m++) { options.c_cflag = misc[m] | CLOCAL | CREAD; /* * POSIX */ cfsetospeed( &options, baud[i]); cfsetispeed( &options, 0); tcsetattr (file, TCSANOW, &options); /* wait for some USB-Serial device */ __mdelay (100); tcflush (file, TCIFLUSH); __mdelay (100); MuTSendPacket (file, MuT_QUERY, strlen (MuT_QUERY)); /* we are in O_NONBLOCK need wait before read */ __mdelay (100); int n = 0; while ( n <3 ) { if (read( file, &packet[n], 1 ) <=0) break; if ( packet[n] == MuT_LEAD_BYTE ) { // new start n = 0; packet[0] = MuT_LEAD_BYTE; } if ( (n==1) && (packet[1] != MuT_OK)) { // false start n = 0; packet[0]= 0; } if ( (n==2) && (packet[2] != MuT_TRAIL_BYTE) ) { // false start n = 0; packet[0]= 0; } if ( packet[0] == MuT_LEAD_BYTE) n++; } if ( n == 3 ) { if (MuTSetToOptimalCTRL (file, B19200)) { return file; } else if (MuTSetToOptimalCTRL (file, B9600)) { return file; } else return ERROR_NOT_SUITABLE; } } } close(file); return ERROR_NOT_FOUND; } static int MuTInitCmd(int file, char *cmd) { unsigned char timeout = 0; unsigned char packet[MuT_PACKET_SIZE]; do { MuTSendPacket (file, cmd, strlen (cmd)); /* * Strip out 'touch" message */ int n = 0; while ( n <3 ) { if (read( file, &packet[n], 1 ) <=0) break; if ( packet[0] == MuT_LEAD_BYTE) n++; } timeout++; if (timeout >= MAX_TIMEOUT) return ERROR_INIT; } while (packet[1] != MuT_OK); return 1; } static inline int MuTInitialize(int file) { if (!MuTInitCmd (file, MuT_RESET)) return 0; if (!MuTInitCmd (file, MuT_FINGER_ONLY)) return 0; if (!MuTInitCmd (file, MuT_MODE_DOWN_UP)) return 0; if (!MuTInitCmd (file, MuT_FORMAT_TABLET)) return 0; return 1; } static int MuTOpenDevice(char *device) { int fd; int res; fd = MuTPollDevice (device); if ((res = MuTInitialize (fd)) == 0) { close (fd); return res; } return fd; } #define WORD_ASSEMBLY(byte1, byte2) (((byte2) << 7) | (byte1)) static int MuTGetEvent(MuTData *event) { MuTReadPacket(event->fd, packet); /* Sync bit always must be set to 1 */ if ((*packet & MuT_PANEL_SYNC_MASK) == 0) return 0; if (*packet & MuT_PANEL_TOUCH_MASK) event->action = MUT_PANEL_TOUCH; else event->action = MUT_PANEL_UNTOUCH; event->x = (event->screen_width * WORD_ASSEMBLY(packet[1], packet[2])) / 16383; event->y = (event->screen_height * WORD_ASSEMBLY(packet[3], packet[4])) / 16383; if (event->min_x) event->x = event->min_x - event->x; if (event->min_y) event->y = event->min_y - event->y; return 1; } /* The main routine for MuTouch */ static void *MuTouchEventThread(DirectThread *thread, void *driver_data) { MuTData *data = (MuTData *) driver_data; /* Read data */ while (1) { DFBInputEvent evt; if (!MuTGetEvent (data)) continue; direct_thread_testcancel (thread); /* Dispatch axis */ evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = data->x; dfb_input_dispatch (data->device, &evt); evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = data->y; dfb_input_dispatch (data->device, &evt); /* Dispatch touch event */ switch (data->action) { case MUT_PANEL_TOUCH: evt.type = DIET_BUTTONPRESS; break; case MUT_PANEL_UNTOUCH: evt.type = DIET_BUTTONRELEASE; break; } evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch (data->device, &evt); direct_thread_testcancel (thread); } return NULL; } /* exported symbols */ static int driver_get_available( void ) { int fd; if (!dfb_config->mut_device) return 0; fd = MuTOpenDevice (dfb_config->mut_device); if (fd < 0) return 0; close(fd); return 1; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf(info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "MuTouch" ); snprintf(info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "Microtouch" ); info->version.major = 0; info->version.minor = 3; } static DFBResult driver_open_device(CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data) { int fd; MuTData *data; /* open device */ fd = MuTOpenDevice (dfb_config->mut_device); D_INFO("MuTouch:driver_open_device %s fd %d\n", dfb_config->mut_device,fd); if (fd < 0) { return DFB_INIT; } data = D_CALLOC (1, sizeof(MuTData)); if (!data) { close (fd); return D_OOM (); } data->fd = fd; data->device = device; /* Must define the correct resolution of screen */ data->screen_width = MuT_SCREENWIDTH; data->screen_height = MuT_SCREENHEIGHT; /* The following variable are defined to adjust the orientation of * the touchscreen. Variables are either max screen height/width or 0. */ data->min_x = MuT_MINX; data->min_y = MuT_MINY; /* fill device info structure */ snprintf(info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "MuTouch"); snprintf(info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Microtouch"); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; #else info->desc.caps = DIDCAPS_AXES | DIDCAPS_BUTTONS; #endif info->desc.max_axis = DIAI_Y; info->desc.max_button = DIBI_LEFT; /* start input thread */ data->thread = direct_thread_create (DTT_INPUT, MuTouchEventThread, data, "MuTouch Input"); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry(CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry) { return DFB_UNSUPPORTED; } static void driver_close_device(void *driver_data) { MuTData *data = (MuTData *)driver_data; /* stop input thread */ direct_thread_cancel (data->thread); direct_thread_join (data->thread); direct_thread_destroy (data->thread); /* close device */ close (data->fd); /* free private data */ D_FREE (data); } DirectFB-1.7.7/inputdrivers/dreamboxremote/0000755000175000017500000000000012466665354015745 500000000000000DirectFB-1.7.7/inputdrivers/dreamboxremote/Makefile.am0000644000175000017500000000130012171403127017670 00000000000000## Makefile.am for DirectFB/inputdrivers/dreamboxremote INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src dreamboxremote_LTLIBRARIES = libdirectfb_dreamboxremote.la if BUILD_STATIC dreamboxremote_DATA = $(dreamboxremote_LTLIBRARIES:.la=.o) endif dreamboxremotedir = $(MODULEDIR)/inputdrivers libdirectfb_dreamboxremote_la_SOURCES = \ dreamboxremote.c libdirectfb_dreamboxremote_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_dreamboxremote_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/dreamboxremote/Makefile.in0000644000175000017500000006561112466665312017735 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/dreamboxremote ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(dreamboxremotedir)" \ "$(DESTDIR)$(dreamboxremotedir)" LTLIBRARIES = $(dreamboxremote_LTLIBRARIES) libdirectfb_dreamboxremote_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_dreamboxremote_la_OBJECTS = dreamboxremote.lo libdirectfb_dreamboxremote_la_OBJECTS = \ $(am_libdirectfb_dreamboxremote_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_dreamboxremote_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) \ $(libdirectfb_dreamboxremote_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_dreamboxremote_la_SOURCES) DIST_SOURCES = $(libdirectfb_dreamboxremote_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dreamboxremote_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src dreamboxremote_LTLIBRARIES = libdirectfb_dreamboxremote.la @BUILD_STATIC_TRUE@dreamboxremote_DATA = $(dreamboxremote_LTLIBRARIES:.la=.o) dreamboxremotedir = $(MODULEDIR)/inputdrivers libdirectfb_dreamboxremote_la_SOURCES = \ dreamboxremote.c libdirectfb_dreamboxremote_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_dreamboxremote_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/dreamboxremote/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/dreamboxremote/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-dreamboxremoteLTLIBRARIES: $(dreamboxremote_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(dreamboxremote_LTLIBRARIES)'; test -n "$(dreamboxremotedir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(dreamboxremotedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dreamboxremotedir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dreamboxremotedir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dreamboxremotedir)"; \ } uninstall-dreamboxremoteLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(dreamboxremote_LTLIBRARIES)'; test -n "$(dreamboxremotedir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dreamboxremotedir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dreamboxremotedir)/$$f"; \ done clean-dreamboxremoteLTLIBRARIES: -test -z "$(dreamboxremote_LTLIBRARIES)" || rm -f $(dreamboxremote_LTLIBRARIES) @list='$(dreamboxremote_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_dreamboxremote.la: $(libdirectfb_dreamboxremote_la_OBJECTS) $(libdirectfb_dreamboxremote_la_DEPENDENCIES) $(EXTRA_libdirectfb_dreamboxremote_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_dreamboxremote_la_LINK) -rpath $(dreamboxremotedir) $(libdirectfb_dreamboxremote_la_OBJECTS) $(libdirectfb_dreamboxremote_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dreamboxremote.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dreamboxremoteDATA: $(dreamboxremote_DATA) @$(NORMAL_INSTALL) @list='$(dreamboxremote_DATA)'; test -n "$(dreamboxremotedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dreamboxremotedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dreamboxremotedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dreamboxremotedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dreamboxremotedir)" || exit $$?; \ done uninstall-dreamboxremoteDATA: @$(NORMAL_UNINSTALL) @list='$(dreamboxremote_DATA)'; test -n "$(dreamboxremotedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dreamboxremotedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(dreamboxremotedir)" "$(DESTDIR)$(dreamboxremotedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-dreamboxremoteLTLIBRARIES clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dreamboxremoteDATA \ install-dreamboxremoteLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dreamboxremoteDATA \ uninstall-dreamboxremoteLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-dreamboxremoteLTLIBRARIES clean-generic clean-libtool \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dreamboxremoteDATA \ install-dreamboxremoteLTLIBRARIES install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-dreamboxremoteDATA \ uninstall-dreamboxremoteLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/dreamboxremote/dreamboxremote.c0000644000175000017500000002063012254435330021027 00000000000000/* (c) Copyright 2005 Marcel Siegert All rights reserved. Written by Marcel Siegert Mainly based on dbox2remote: (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( dreamboxremote ) #define DEVICE "/dev/rawir2" typedef struct { DFBInputDeviceKeySymbol key; u16 rccode; } KeyCode; static KeyCode keycodes_remote[] = { { DIKS_0, 0x0000 }, { DIKS_1, 0x0001 }, { DIKS_2, 0x0002 }, { DIKS_3, 0x0003 }, { DIKS_4, 0x0004 }, { DIKS_5, 0x0005 }, { DIKS_6, 0x0006 }, { DIKS_7, 0x0007 }, { DIKS_8, 0x0008 }, { DIKS_9, 0x0009 }, { DIKS_VOLUME_UP, 0x000a }, { DIKS_VOLUME_DOWN, 0x000b }, { DIKS_SELECT, 0x000c }, // DM500 Mute // TODO find appropriate DIKS codes /* { DIKS_TV??, 0x000c }, // TV { DIKS_, 0x000d }, // bouquet up { DIKS_, 0x000e }, // bouquet down { DIKS_, 0x000f }, // power on/off standby */ { DIKS_MENU, 0x0020 }, // DREAM { DIKS_CURSOR_UP, 0x0021 }, { DIKS_CURSOR_DOWN, 0x0022 }, { DIKS_CURSOR_LEFT, 0x0023 }, { DIKS_CURSOR_RIGHT, 0x0024 }, { DIKS_OK, 0x0025 }, // TODO find appropriate DIKS codes // { DIKS_, 0x0026 }, // audio // { DIKS_, 0x0027 }, // video { DIKS_INFO, 0x0028 }, { DIKS_RED, 0x0040 }, { DIKS_GREEN, 0x0041 }, { DIKS_YELLOW, 0x0042 }, { DIKS_BLUE, 0x0043 }, { DIKS_MUTE, 0x0044 }, // TODO find appropriate DIKS codes // { DIKS_, 0x0045 }, // text // { DIKS_, 0x0050 }, // forward // { DIKS_, 0x0051 }, // back { DIKS_HOME, 0x0052 }, // lame { DIKS_SLOW, 0x0054 }, // dm500 lame // { DIKS_, 0x0053 }, // text // { DIKS_, 0x0054 }, // help { DIKS_NULL, 0xFFFF } }; /* * declaration of private data */ typedef struct { CoreInputDevice *device; DirectThread *thread; int fd; } DreamboxremoteData; /* * helper function for translating rccode */ static DFBInputDeviceKeySymbol dreamboxremote_parse_rccode( u16 rccode ) { KeyCode *keycode; static u16 rccodeOld = 0; keycode = keycodes_remote; /* 0x00ff indicates key was released so reset rccodeOld and do nothing */ if ( rccode == 0x00ff ) { rccodeOld = 0; return DIKS_NULL; } /* check for a new keycode the drivers return msb clear if a key is pressed - msb set if pressed ignore key down - otherwise 2 events are generated for one press */ rccode &= 0x7fff; if (rccodeOld != rccode ) { rccodeOld = rccode; return DIKS_NULL; } while (keycode->key != DIKS_NULL) { if (keycode->rccode == rccode) { return keycode->key; } keycode++; } return DIKS_NULL; } /* * Input thread reading from device. * Generates events on incoming data. */ static void* dreamboxremoteEventThread( DirectThread *thread, void *driver_data ) { DreamboxremoteData *data = (DreamboxremoteData*) driver_data; int readlen; u16 rccode; DFBInputEvent evt; while ((readlen = read( data->fd, &rccode, 2 )) == 2) { direct_thread_testcancel( thread ); /* translate rccode to DirectFB keycode */ evt.key_symbol = dreamboxremote_parse_rccode( rccode ); if (evt.key_symbol != DIKS_NULL) { /* set event type and dispatch*/ evt.type = DIET_KEYPRESS; evt.flags = DIEF_KEYSYMBOL; dfb_input_dispatch( data->device, &evt ); /* set event type and dispatch*/ evt.type = DIET_KEYRELEASE; evt.flags = DIEF_KEYSYMBOL; dfb_input_dispatch( data->device, &evt ); } } if (readlen <= 0 && errno != EINTR) D_PERROR ("dreamboxremote thread died\n"); return NULL; } /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available( void ) { /* Check if we are able to read from device */ if (access( DEVICE, R_OK )) return 0; return 1; } /* * Fill out general information about this driver. * Called once during initialization of DirectFB. */ static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf ( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "dreambox remote" ); snprintf ( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "mws" ); info->version.major = 0; info->version.minor = 1; } /* * Open the device, fill out information about it, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; DreamboxremoteData *data; /* open device */ fd = open( DEVICE, O_RDONLY); if (fd < 0) { D_PERROR( "DirectFB/dreamboxremote: could not open device" ); return DFB_INIT; } /* apply voodoo */ //ioctl( fd, RC_IOCTL_BCODES, 0 ); /* set device name */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "dreambox remote control" ); /* set device vendor */ snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "DM7000/DM56XX/DM500" ); /* set one of the primary input device IDs */ info->prefered_id = DIDID_REMOTE; /* set type flags */ info->desc.type = DIDTF_REMOTE; /* set capabilities */ info->desc.caps = DICAPS_KEYS; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(DreamboxremoteData) ); if (!data) { close( fd ); return D_OOM(); } data->fd = fd; data->device = device; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, dreamboxremoteEventThread, data, "DreamBox Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { DreamboxremoteData *data = (DreamboxremoteData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close file */ close( data->fd ); /* free private data */ D_FREE ( data ); } DirectFB-1.7.7/inputdrivers/tslib/0000755000175000017500000000000012466665355014046 500000000000000DirectFB-1.7.7/inputdrivers/tslib/Makefile.am0000644000175000017500000000124312171403127015776 00000000000000## Makefile.am for DirectFB/inputdrivers/tslib INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src tslib_LTLIBRARIES = libdirectfb_tslib.la if BUILD_STATIC tslib_DATA = $(tslib_LTLIBRARIES:.la=.o) endif tslibdir = $(MODULEDIR)/inputdrivers libdirectfb_tslib_la_SOURCES = \ tslib.c libdirectfb_tslib_la_CFLAGS = \ $(TSLIB_CFLAGS) libdirectfb_tslib_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_tslib_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la \ $(TSLIB_LIBS) include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/tslib/tslib.c0000644000175000017500000001707112254435330015234 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Shane Volpe , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( tslib ) typedef struct { CoreInputDevice *device; DirectThread *thread; struct tsdev *ts; } tslibData; #define MAX_TSLIB_DEVICES 16 static int num_devices = 0; static char *device_names[MAX_TSLIB_DEVICES]; static void * tslibEventThread( DirectThread *thread, void *driver_data ) { tslibData *data = (tslibData *) driver_data; struct ts_sample ts_event; int readlen; int old_x = -1; int old_y = -1; unsigned int old_pressure = 0; while ((readlen = ts_read( data->ts, &ts_event, 1 )) >= 0) { DFBInputEvent evt; direct_thread_testcancel( thread ); if (readlen < 1) continue; if (ts_event.pressure) { if (ts_event.x != old_x) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = ts_event.x; dfb_input_dispatch( data->device, &evt ); old_x = ts_event.x; } if (ts_event.y != old_y) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = ts_event.y; dfb_input_dispatch( data->device, &evt ); old_y = ts_event.y; } } if (!ts_event.pressure != !old_pressure) { evt.type = ts_event.pressure ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch( data->device, &evt ); old_pressure = ts_event.pressure; } } if (readlen < 0) D_ERROR( "tslib Input thread died\n" ); return NULL; } static bool check_device( const char *device ) { struct tsdev *ts; ts = ts_open( device, 0 ); if (!ts) return false; if (ts_config( ts )) { ts_close( ts ); return false; } ts_close( ts ); return true; } /* exported symbols */ static int driver_get_available(void) { int i; char *tsdev; /* Use the devices specified in the configuration. */ if (fusion_vector_has_elements( &dfb_config->tslib_devices )) { const char *device; fusion_vector_foreach (device, i, dfb_config->tslib_devices) { if (num_devices >= MAX_TSLIB_DEVICES) break; if (check_device( device )) device_names[num_devices++] = D_STRDUP( device ); } return num_devices; } /* Check for environment variable. */ tsdev = getenv( "TSLIB_TSDEVICE" ); if (tsdev && check_device( tsdev )) device_names[num_devices++] = D_STRDUP( tsdev ); /* Try to guess some (more) devices. */ for (i = 0; i < MAX_TSLIB_DEVICES; i++) { char buf[32]; if (num_devices >= MAX_TSLIB_DEVICES) break; snprintf( buf, 32, "/dev/input/tslib%d", i ); /* Already handled above. */ if (tsdev && !strcmp( tsdev, buf )) continue; if (check_device( buf )) device_names[num_devices++] = D_STRDUP( buf ); } return num_devices; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "tslib Input Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "tslib" ); info->version.major = 0; info->version.minor = 1; } static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { tslibData *data; struct tsdev *ts; /* open device */ ts = ts_open( device_names[number], 0 ); if (!ts) { D_ERROR( "DirectFB/tslib: Error opening `%s'!\n", device_names[number] ); return DFB_INIT; } /* configure device */ if (ts_config( ts )) { D_ERROR( "DirectFB/tslib: Error configuring `%s'!\n", device_names[number] ); ts_close( ts ); return DFB_INIT; } /* fill device info structure */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "tslib touchscreen %d", number ); snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "tslib" ); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; info->desc.max_axis = DIAI_Y; info->desc.max_button = DIBI_LEFT; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(tslibData) ); if (!data) { ts_close( ts ); return D_OOM(); } data->ts = ts; data->device = device; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, tslibEventThread, data, "tslib Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } static void driver_close_device( void *driver_data ) { tslibData *data = (tslibData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close device */ ts_close( data->ts ); /* free private data */ D_FREE( data ); } DirectFB-1.7.7/inputdrivers/tslib/Makefile.in0000644000175000017500000006671112466665312016037 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/tslib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(tslibdir)" "$(DESTDIR)$(tslibdir)" LTLIBRARIES = $(tslib_LTLIBRARIES) am__DEPENDENCIES_1 = libdirectfb_tslib_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la $(am__DEPENDENCIES_1) am_libdirectfb_tslib_la_OBJECTS = libdirectfb_tslib_la-tslib.lo libdirectfb_tslib_la_OBJECTS = $(am_libdirectfb_tslib_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_tslib_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libdirectfb_tslib_la_CFLAGS) $(CFLAGS) \ $(libdirectfb_tslib_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_tslib_la_SOURCES) DIST_SOURCES = $(libdirectfb_tslib_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(tslib_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src tslib_LTLIBRARIES = libdirectfb_tslib.la @BUILD_STATIC_TRUE@tslib_DATA = $(tslib_LTLIBRARIES:.la=.o) tslibdir = $(MODULEDIR)/inputdrivers libdirectfb_tslib_la_SOURCES = \ tslib.c libdirectfb_tslib_la_CFLAGS = \ $(TSLIB_CFLAGS) libdirectfb_tslib_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_tslib_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la \ $(TSLIB_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/tslib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/tslib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-tslibLTLIBRARIES: $(tslib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(tslib_LTLIBRARIES)'; test -n "$(tslibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(tslibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(tslibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(tslibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(tslibdir)"; \ } uninstall-tslibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(tslib_LTLIBRARIES)'; test -n "$(tslibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(tslibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(tslibdir)/$$f"; \ done clean-tslibLTLIBRARIES: -test -z "$(tslib_LTLIBRARIES)" || rm -f $(tslib_LTLIBRARIES) @list='$(tslib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_tslib.la: $(libdirectfb_tslib_la_OBJECTS) $(libdirectfb_tslib_la_DEPENDENCIES) $(EXTRA_libdirectfb_tslib_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_tslib_la_LINK) -rpath $(tslibdir) $(libdirectfb_tslib_la_OBJECTS) $(libdirectfb_tslib_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdirectfb_tslib_la-tslib.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libdirectfb_tslib_la-tslib.lo: tslib.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdirectfb_tslib_la_CFLAGS) $(CFLAGS) -MT libdirectfb_tslib_la-tslib.lo -MD -MP -MF $(DEPDIR)/libdirectfb_tslib_la-tslib.Tpo -c -o libdirectfb_tslib_la-tslib.lo `test -f 'tslib.c' || echo '$(srcdir)/'`tslib.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdirectfb_tslib_la-tslib.Tpo $(DEPDIR)/libdirectfb_tslib_la-tslib.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tslib.c' object='libdirectfb_tslib_la-tslib.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdirectfb_tslib_la_CFLAGS) $(CFLAGS) -c -o libdirectfb_tslib_la-tslib.lo `test -f 'tslib.c' || echo '$(srcdir)/'`tslib.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-tslibDATA: $(tslib_DATA) @$(NORMAL_INSTALL) @list='$(tslib_DATA)'; test -n "$(tslibdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(tslibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(tslibdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tslibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(tslibdir)" || exit $$?; \ done uninstall-tslibDATA: @$(NORMAL_UNINSTALL) @list='$(tslib_DATA)'; test -n "$(tslibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(tslibdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(tslibdir)" "$(DESTDIR)$(tslibdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-tslibLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-tslibDATA install-tslibLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-tslibDATA uninstall-tslibLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-tslibLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip install-tslibDATA \ install-tslibLTLIBRARIES installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-tslibDATA uninstall-tslibLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/ucb1x00_ts/0000755000175000017500000000000012466665355014621 500000000000000DirectFB-1.7.7/inputdrivers/ucb1x00_ts/Makefile.am0000644000175000017500000000120412171403127016546 00000000000000## Makefile.am for DirectFB/inputdrivers/ucb1x00_ts INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_ucb1x00_ts.la if BUILD_STATIC input_DATA = $(input_LTLIBRARIES:.la=.o) endif inputdir = $(MODULEDIR)/inputdrivers libdirectfb_ucb1x00_ts_la_SOURCES = \ ucb1x00_ts.c libdirectfb_ucb1x00_ts_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_ucb1x00_ts_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/ucb1x00_ts/Makefile.in0000644000175000017500000006452412466665313016613 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/ucb1x00_ts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)" LTLIBRARIES = $(input_LTLIBRARIES) libdirectfb_ucb1x00_ts_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_ucb1x00_ts_la_OBJECTS = ucb1x00_ts.lo libdirectfb_ucb1x00_ts_la_OBJECTS = \ $(am_libdirectfb_ucb1x00_ts_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_ucb1x00_ts_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_ucb1x00_ts_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_ucb1x00_ts_la_SOURCES) DIST_SOURCES = $(libdirectfb_ucb1x00_ts_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(input_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_ucb1x00_ts.la @BUILD_STATIC_TRUE@input_DATA = $(input_LTLIBRARIES:.la=.o) inputdir = $(MODULEDIR)/inputdrivers libdirectfb_ucb1x00_ts_la_SOURCES = \ ucb1x00_ts.c libdirectfb_ucb1x00_ts_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_ucb1x00_ts_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/ucb1x00_ts/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/ucb1x00_ts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputLTLIBRARIES: $(input_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdir)"; \ } uninstall-inputLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdir)/$$f"; \ done clean-inputLTLIBRARIES: -test -z "$(input_LTLIBRARIES)" || rm -f $(input_LTLIBRARIES) @list='$(input_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_ucb1x00_ts.la: $(libdirectfb_ucb1x00_ts_la_OBJECTS) $(libdirectfb_ucb1x00_ts_la_DEPENDENCIES) $(EXTRA_libdirectfb_ucb1x00_ts_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_ucb1x00_ts_la_LINK) -rpath $(inputdir) $(libdirectfb_ucb1x00_ts_la_OBJECTS) $(libdirectfb_ucb1x00_ts_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ucb1x00_ts.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-inputDATA: $(input_DATA) @$(NORMAL_INSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdir)" || exit $$?; \ done uninstall-inputDATA: @$(NORMAL_UNINSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-inputLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-inputDATA install-inputLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-inputDATA uninstall-inputLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-inputLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-inputDATA install-inputLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-inputDATA uninstall-inputLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/ucb1x00_ts/ucb1x00_ts.c0000644000175000017500000002344312254435330016562 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define FIX_PRECISION 8 #define inttofix(A) ((A) << FIX_PRECISION) #define fixtoint(A) ((A) >> FIX_PRECISION) #define fixmult(A, B) (((A) * (B)) >> FIX_PRECISION) #define fixdiv(A, B) (((A) << FIX_PRECISION) / (B)) DFB_INPUT_DRIVER( ucb1x00_ts ) typedef struct { CoreInputDevice *device; DirectThread *thread; int fd; } ucb1x00TSData; /* I copied this from the kernel driver since there is no include file */ typedef struct { u16 pressure; u16 x; u16 y; u16 pad; struct timeval stamp; } TS_EVENT; static struct { int xmin; int xmax; int ymin; int ymax; int xswap; int yswap; int zthresh; int jthresh; int numevents; int xres; int yres; } config = { 50, 930, 50, 930, 1, 1, 50, 5, 8, 640, 480}; /* needed for event filter */ static TS_EVENT *event_buffer = NULL; static int avg_events(int which, int count) { int i, sum = 0; for(i = 0; i < count; i++) sum += which ? event_buffer[i].x : event_buffer[i].y; return(sum / count); } static void filter_event(TS_EVENT *ts_event) { int dx, dy; static int lastx = 0, lasty = 0; static int lastb = 0; static int evcnt = 0; static int event_index = 0; /* Increment the buffer index and the count of items in the buffer. */ if(++evcnt > config.numevents) evcnt = config.numevents; if(++event_index == config.numevents) event_index = 0; /* If the pen has just been pressed down, reset the counters. */ if(ts_event->pressure > config.zthresh) { if(!lastb) { lastb = 1; evcnt = 1; event_index = 0; } } else lastb = 0; /* Store this event in the circular buffer. */ direct_memcpy(&event_buffer[event_index], ts_event, sizeof(TS_EVENT)); /* Don't try to average and filter if we only have one reading. */ if(evcnt > 1) { /* Average the closest values */ ts_event->y = avg_events(0, evcnt); ts_event->x = avg_events(1, evcnt); /* Ignore movements which are below the minimum threshold */ dx = ts_event->x - lastx; if(dx < 0) dx = -dx; if(dx < config.jthresh) ts_event->x = lastx; dy = ts_event->y - lasty; if(dy < 0) dy = -dy; if(dy < config.jthresh) ts_event->y = lasty; } /* Remember the values we are returning. */ lastx = ts_event->x; lasty = ts_event->y; } static void scale_point( TS_EVENT *ts_event ) { int x = ts_event->x; int y = ts_event->y; /* Clip any values outside the expected range. */ if(x > config.xmax) x = config.xmax; if(x < config.xmin) x = config.xmin; if(y > config.ymax) y = config.ymax; if(y < config.ymin) y = config.ymin; /* ((x - config.xmin) / (config.xmax - config.xmin)) * config.xres */ x = fixtoint(fixmult(fixdiv(inttofix(x - config.xmin), inttofix(config.xmax - config.xmin)), inttofix(config.xres))); /* ((y - config.ymin) / (config.ymax - config.ymin)) * config.yres */ y = fixtoint(fixmult(fixdiv(inttofix(y - config.ymin), inttofix(config.ymax - config.ymin)), inttofix(config.yres))); /* Swap the X and/or Y axes if necessary.*/ ts_event->x = config.xswap ? (config.xres - x) : x; ts_event->y = config.yswap ? (config.yres - y) : y; } static void * ucb1x00tsEventThread( DirectThread *thread, void *driver_data ) { ucb1x00TSData *data = (ucb1x00TSData*) driver_data; TS_EVENT ts_event; int readlen; unsigned short old_x = -1; unsigned short old_y = -1; unsigned short old_pressure = 0; while ((readlen = read(data->fd, &ts_event, sizeof(TS_EVENT))) > 0 || errno == EINTR) { DFBInputEvent evt; direct_thread_testcancel( thread ); if (readlen < 1) continue; filter_event( &ts_event ); scale_point( &ts_event ); ts_event.pressure = (ts_event.pressure > config.zthresh ); if (ts_event.pressure) { if (ts_event.x != old_x) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = ts_event.x; dfb_input_dispatch( data->device, &evt ); old_x = ts_event.x; } if (ts_event.y != old_y) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = ts_event.y; dfb_input_dispatch( data->device, &evt ); old_y = ts_event.y; } } if ((ts_event.pressure && !old_pressure) || (!ts_event.pressure && old_pressure)) { evt.type = (ts_event.pressure ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE); evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch( data->device, &evt ); old_pressure = ts_event.pressure; } } if (readlen <= 0) D_PERROR ("ucb1x00 Touchscreen thread died\n"); return NULL; } /* exported symbols */ static int driver_get_available( void ) { int fd; fd = open( "/dev/ucb1x00-ts", O_RDONLY | O_NOCTTY ); if (fd < 0) return 0; close( fd ); return 1; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "ucb1x00 Touchscreen Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "fischlustig" ); info->version.major = 0; info->version.minor = 4; } static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; ucb1x00TSData *data; /* open device */ fd = open( "/dev/ucb1x00-ts", O_RDONLY | O_NOCTTY ); if (fd < 0) { D_PERROR( "DirectFB/ucb1x00: Error opening `/dev/ucb1x00-ts'!\n" ); return DFB_INIT; } /* fill device info structure */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "ucb1x00 Touchscreen" ); snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Unknown" ); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; info->desc.max_axis = DIAI_Y; info->desc.max_button = DIBI_LEFT; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(ucb1x00TSData) ); if (!data) { close( fd ); return D_OOM(); } data->fd = fd; data->device = device; event_buffer = malloc( sizeof( TS_EVENT) * config.numevents ); /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, ucb1x00tsEventThread, data, "UCB TS Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } static void driver_close_device( void *driver_data ) { ucb1x00TSData *data = (ucb1x00TSData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close device */ if (close( data->fd ) < 0) D_PERROR( "DirectFB/ucb1x00: Error closing `/dev/ucb1x00-ts'!\n" ); if (event_buffer) free( event_buffer ); /* free private data */ D_FREE( data ); } DirectFB-1.7.7/inputdrivers/dbox2remote/0000755000175000017500000000000012466665354015162 500000000000000DirectFB-1.7.7/inputdrivers/dbox2remote/Makefile.am0000644000175000017500000000124212171403127017112 00000000000000## Makefile.am for DirectFB/inputdrivers/dbox2remote INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src dbox2remote_LTLIBRARIES = libdirectfb_dbox2remote.la if BUILD_STATIC dbox2remote_DATA = $(dbox2remote_LTLIBRARIES:.la=.o) endif dbox2remotedir = $(MODULEDIR)/inputdrivers libdirectfb_dbox2remote_la_SOURCES = \ dbox2remote.c libdirectfb_dbox2remote_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_dbox2remote_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/dbox2remote/Makefile.in0000644000175000017500000006524512466665311017154 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/dbox2remote ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(dbox2remotedir)" \ "$(DESTDIR)$(dbox2remotedir)" LTLIBRARIES = $(dbox2remote_LTLIBRARIES) libdirectfb_dbox2remote_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_dbox2remote_la_OBJECTS = dbox2remote.lo libdirectfb_dbox2remote_la_OBJECTS = \ $(am_libdirectfb_dbox2remote_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_dbox2remote_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_dbox2remote_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_dbox2remote_la_SOURCES) DIST_SOURCES = $(libdirectfb_dbox2remote_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dbox2remote_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src dbox2remote_LTLIBRARIES = libdirectfb_dbox2remote.la @BUILD_STATIC_TRUE@dbox2remote_DATA = $(dbox2remote_LTLIBRARIES:.la=.o) dbox2remotedir = $(MODULEDIR)/inputdrivers libdirectfb_dbox2remote_la_SOURCES = \ dbox2remote.c libdirectfb_dbox2remote_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_dbox2remote_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/dbox2remote/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/dbox2remote/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-dbox2remoteLTLIBRARIES: $(dbox2remote_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(dbox2remote_LTLIBRARIES)'; test -n "$(dbox2remotedir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(dbox2remotedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dbox2remotedir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dbox2remotedir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dbox2remotedir)"; \ } uninstall-dbox2remoteLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(dbox2remote_LTLIBRARIES)'; test -n "$(dbox2remotedir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dbox2remotedir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dbox2remotedir)/$$f"; \ done clean-dbox2remoteLTLIBRARIES: -test -z "$(dbox2remote_LTLIBRARIES)" || rm -f $(dbox2remote_LTLIBRARIES) @list='$(dbox2remote_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_dbox2remote.la: $(libdirectfb_dbox2remote_la_OBJECTS) $(libdirectfb_dbox2remote_la_DEPENDENCIES) $(EXTRA_libdirectfb_dbox2remote_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_dbox2remote_la_LINK) -rpath $(dbox2remotedir) $(libdirectfb_dbox2remote_la_OBJECTS) $(libdirectfb_dbox2remote_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbox2remote.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dbox2remoteDATA: $(dbox2remote_DATA) @$(NORMAL_INSTALL) @list='$(dbox2remote_DATA)'; test -n "$(dbox2remotedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dbox2remotedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dbox2remotedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbox2remotedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dbox2remotedir)" || exit $$?; \ done uninstall-dbox2remoteDATA: @$(NORMAL_UNINSTALL) @list='$(dbox2remote_DATA)'; test -n "$(dbox2remotedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dbox2remotedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(dbox2remotedir)" "$(DESTDIR)$(dbox2remotedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-dbox2remoteLTLIBRARIES clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dbox2remoteDATA \ install-dbox2remoteLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dbox2remoteDATA \ uninstall-dbox2remoteLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-dbox2remoteLTLIBRARIES clean-generic clean-libtool \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dbox2remoteDATA \ install-dbox2remoteLTLIBRARIES install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-dbox2remoteDATA \ uninstall-dbox2remoteLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/dbox2remote/dbox2remote.c0000644000175000017500000002134412254435330017464 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( dbox2remote ) #define DEVICE "/dev/dbox/rc0" typedef struct { DFBInputDeviceKeySymbol key; u16 rccode; } KeyCode; /* REMOTE_NEW is the one with _fewer_ buttons */ static KeyCode keycodes_new_remote[] = { { DIKS_0, 0x0000 }, { DIKS_1, 0x0001 }, { DIKS_2, 0x0002 }, { DIKS_3, 0x0003 }, { DIKS_4, 0x0004 }, { DIKS_5, 0x0005 }, { DIKS_6, 0x0006 }, { DIKS_7, 0x0007 }, { DIKS_8, 0x0008 }, { DIKS_9, 0x0009 }, { DIKS_CURSOR_LEFT, 0x000b }, { DIKS_CURSOR_RIGHT, 0x000a }, { DIKS_CURSOR_UP, 0x000c }, { DIKS_CURSOR_DOWN, 0x000d }, /* FIXME: add support for right-up, right-down, left-down, left-up, they occur, too */ { DIKS_RED, 0x0013 }, { DIKS_GREEN, 0x0011 }, { DIKS_YELLOW, 0x0012 }, { DIKS_BLUE, 0x0014 }, { DIKS_OK, 0x000e }, { DIKS_HOME, 0x001F }, { DIKS_VENDOR, 0x0018 }, /* "d-box" key */ { DIKS_POWER, 0x0010 }, { DIKS_PAGE_DOWN, 0x0053 }, /* dbox1 only */ { DIKS_PAGE_UP, 0x0054 }, /* dbox1 only */ { DIKS_VOLUME_UP, 0x0015 }, { DIKS_VOLUME_DOWN, 0x0016 }, { DIKS_MUTE, 0x000f }, { DIKS_INFO, 0x0017 }, { DIKS_NULL, 0xFFFF } }; static KeyCode keycodes_old_remote[] = { { DIKS_0, 0x5c00 }, { DIKS_1, 0x5c01 }, { DIKS_2, 0x5c02 }, { DIKS_3, 0x5c03 }, { DIKS_4, 0x5c04 }, { DIKS_5, 0x5c05 }, { DIKS_6, 0x5c06 }, { DIKS_7, 0x5c07 }, { DIKS_8, 0x5c08 }, { DIKS_9, 0x5c09 }, { DIKS_CURSOR_LEFT, 0x5c2f }, { DIKS_CURSOR_RIGHT, 0x5c2e }, { DIKS_CURSOR_UP, 0x5c0e }, { DIKS_CURSOR_DOWN, 0x5c0f }, { DIKS_RED, 0x5c2D }, { DIKS_GREEN, 0x5c55 }, { DIKS_YELLOW, 0x5c52 }, { DIKS_BLUE, 0x5c3b }, { DIKS_OK, 0x5c30 }, { DIKS_HOME, 0x5c20 }, /* radio key */ { DIKS_VENDOR, 0x5c27 }, /* TV key */ { DIKS_POWER, 0x5c0c }, { DIKS_PAGE_DOWN, 0x5c53 }, /* dbox1 only */ { DIKS_PAGE_UP, 0x5c54 }, /* dbox1 only */ { DIKS_VOLUME_UP, 0x5c16 }, { DIKS_VOLUME_DOWN, 0x5c17 }, { DIKS_MUTE, 0x5c28 }, { DIKS_INFO, 0x5c82 }, { DIKS_NULL, 0xFFFF } }; /* * declaration of private data */ typedef struct { CoreInputDevice *device; DirectThread *thread; int fd; } Dbox2remoteData; /* * helper function for translating rccode */ static DFBInputDeviceKeySymbol dbox2remote_parse_rccode( u16 rccode ) { KeyCode *keycode; if ((rccode & 0xff00) == 0x5c00) { keycode = keycodes_old_remote; } else { keycode = keycodes_new_remote; rccode &= 0x003f; } while (keycode->key != DIKS_NULL) { if (keycode->rccode == rccode) { return keycode->key; } keycode++; } return DIKS_NULL; } /* * Input thread reading from device. * Generates events on incoming data. */ static void* dbox2remoteEventThread( DirectThread *thread, void *driver_data ) { Dbox2remoteData *data = (Dbox2remoteData*) driver_data; int readlen; u16 rccode; DFBInputEvent evt; while ((readlen = read( data->fd, &rccode, 2 )) == 2) { direct_thread_testcancel( thread ); /* translate rccode to DirectFB keycode */ evt.key_symbol = dbox2remote_parse_rccode( rccode ); if (evt.key_symbol != DIKS_NULL) { /* set event type and dispatch*/ evt.type = DIET_KEYPRESS; evt.flags = DIEF_KEYSYMBOL; dfb_input_dispatch( data->device, &evt ); /* set event type and dispatch*/ evt.type = DIET_KEYRELEASE; evt.flags = DIEF_KEYSYMBOL; dfb_input_dispatch( data->device, &evt ); } } if (readlen <= 0 && errno != EINTR) D_PERROR ("dbox2remote thread died\n"); return NULL; } /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available( void ) { /* Check if we are able to read from device */ if (access( DEVICE, R_OK )) return 0; return 1; } /* * Fill out general information about this driver. * Called once during initialization of DirectFB. */ static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf ( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "dbox2 remote" ); snprintf ( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "fischlustig" ); info->version.major = 0; info->version.minor = 9; } /* * Open the device, fill out information about it, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; Dbox2remoteData *data; /* open device */ fd = open( DEVICE, O_RDONLY); if (fd < 0) { D_PERROR( "DirectFB/dbox2remote: could not open device" ); return DFB_INIT; } /* apply voodoo */ ioctl( fd, RC_IOCTL_BCODES, 0 ); /* set device name */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "dbox2 remote control" ); /* set device vendor */ snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "nokia/sagem/philips" ); /* set one of the primary input device IDs */ info->prefered_id = DIDID_REMOTE; /* set type flags */ info->desc.type = DIDTF_REMOTE; /* set capabilities */ info->desc.caps = DICAPS_KEYS; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(Dbox2remoteData) ); if (!data) { close( fd ); return D_OOM(); } data->fd = fd; data->device = device; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, dbox2remoteEventThread, data, "DBOX2 Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { Dbox2remoteData *data = (Dbox2remoteData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close file */ close( data->fd ); /* free private data */ D_FREE ( data ); } DirectFB-1.7.7/inputdrivers/serialmouse/0000755000175000017500000000000012466665355015261 500000000000000DirectFB-1.7.7/inputdrivers/serialmouse/serialmouse.c0000644000175000017500000004253512254435330017665 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( serialmouse ) #define MIDDLE 0x08 typedef enum { PROTOCOL_MS, /* two buttons MS protocol */ PROTOCOL_MS3, /* MS with ugly 3-button extension */ PROTOCOL_MOUSEMAN, /* referred to as MS + Logitech extension in mouse(4) */ PROTOCOL_MOUSESYSTEMS, /* most commonly used serial mouse protocol nowadays */ LAST_PROTOCOL } MouseProtocol; static const char *protocol_names[LAST_PROTOCOL] = { "MS", "MS3", "MouseMan", "MouseSystems" }; typedef struct { CoreInputDevice *device; DirectThread *thread; int fd; MouseProtocol protocol; DFBInputEvent x_motion; DFBInputEvent y_motion; } SerialMouseData; static inline void mouse_motion_initialize( SerialMouseData *data ) { data->x_motion.type = data->y_motion.type = DIET_AXISMOTION; data->x_motion.axisrel = data->y_motion.axisrel = 0; data->x_motion.axis = DIAI_X; data->y_motion.axis = DIAI_Y; } static inline void mouse_motion_compress( SerialMouseData *data, int dx, int dy ) { data->x_motion.axisrel += dx; data->y_motion.axisrel += dy; } static inline void mouse_motion_realize( SerialMouseData *data ) { if (data->x_motion.axisrel) { data->x_motion.flags = DIEF_AXISREL; dfb_input_dispatch( data->device, &data->x_motion ); data->x_motion.axisrel = 0; } if (data->y_motion.axisrel) { data->y_motion.flags = DIEF_AXISREL; dfb_input_dispatch( data->device, &data->y_motion ); data->y_motion.axisrel = 0; } } static void mouse_setspeed( SerialMouseData *data ) { int res; struct termios tty; tcgetattr (data->fd, &tty); tty.c_iflag = IGNBRK | IGNPAR; tty.c_oflag = 0; tty.c_lflag = 0; tty.c_line = 0; tty.c_cc[VTIME] = 0; tty.c_cc[VMIN] = 1; tty.c_cflag = CREAD|CLOCAL|HUPCL|B1200; tty.c_cflag |= ((data->protocol == PROTOCOL_MOUSESYSTEMS) ? CS8|CSTOPB : CS7); tcsetattr (data->fd, TCSAFLUSH, &tty); res = write (data->fd, "*n", 2); (void)res; } /* the main routine for MS mice (plus extensions) */ static void* mouseEventThread_ms( DirectThread *thread, void *driver_data ) { SerialMouseData *data = (SerialMouseData*) driver_data; DFBInputEvent evt; unsigned char buf[256]; unsigned char packet[4]; unsigned char pos = 0; unsigned char last_buttons = 0; int dx, dy; int buttons; int readlen; int i; mouse_motion_initialize( data ); /* Read data */ while ((readlen = read( data->fd, buf, 256 )) >= 0 || errno == EINTR) { direct_thread_testcancel( thread ); for (i = 0; i < readlen; i++) { if (pos == 0 && !(buf[i] & 0x40)) continue; /* We did not reset the position in the mouse event handler since a forth byte may follow. We check for it now and reset the position if this is a start byte. */ if (pos == 3 && buf[i] & 0x40) pos = 0; packet[pos++] = buf[i]; switch (pos) { case 3: if (data->protocol != PROTOCOL_MOUSEMAN) pos = 0; buttons = packet[0] & 0x30; dx = (signed char) (((packet[0] & 0x03) << 6) | (packet[1] & 0x3f)); dy = (signed char) (((packet[0] & 0x0C) << 4) | (packet[2] & 0x3f)); mouse_motion_compress( data, dx, dy ); if (data->protocol == PROTOCOL_MS3) { if (!dx && !dy && buttons == (last_buttons & ~MIDDLE)) buttons = last_buttons ^ MIDDLE; /* toggle */ else buttons |= last_buttons & MIDDLE; /* preserve */ } if (!dfb_config->mouse_motion_compression) mouse_motion_realize( data ); if (last_buttons != buttons) { unsigned char changed_buttons = last_buttons ^ buttons; /* make sure the compressed motion event is dispatched before any button change */ mouse_motion_realize( data ); if (changed_buttons & 0x20) { evt.type = (buttons & 0x20) ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch( data->device, &evt ); } if (changed_buttons & 0x10) { evt.type = (buttons & 0x10) ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; evt.button = DIBI_RIGHT; dfb_input_dispatch( data->device, &evt ); } if (changed_buttons & MIDDLE) { evt.type = (buttons & MIDDLE) ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; evt.button = DIBI_MIDDLE; dfb_input_dispatch( data->device, &evt ); } last_buttons = buttons; } break; case 4: pos = 0; evt.type = (packet[3] & 0x20) ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; /* button is always valid */ evt.button = DIBI_MIDDLE; dfb_input_dispatch( data->device, &evt ); break; default: break; } } /* make sure the compressed motion event is dispatched, necessary if the last packet was a motion event */ if (readlen > 0) mouse_motion_realize( data ); direct_thread_testcancel( thread ); } D_PERROR ("serial mouse thread died\n"); return NULL; } /* the main routine for MouseSystems */ static void* mouseEventThread_mousesystems( DirectThread *thread, void *driver_data ) { SerialMouseData *data = (SerialMouseData*) driver_data; unsigned char buf[256]; unsigned char packet[5]; unsigned char pos = 0; unsigned char last_buttons = 0; int i; int readlen; mouse_motion_initialize( data ); /* Read data */ while ((readlen = read( data->fd, buf, 256 )) >= 0 || errno == EINTR) { direct_thread_testcancel( thread ); for (i = 0; i < readlen; i++) { if (pos == 0 && (buf[i] & 0xf8) != 0x80) continue; packet[pos++] = buf[i]; if (pos == 5) { int dx, dy; int buttons; pos = 0; buttons= (~packet[0]) & 0x07; dx = (signed char) (packet[1]) + (signed char)(packet[3]); dy = - ((signed char) (packet[2]) + (signed char)(packet[4])); mouse_motion_compress( data, dx, dy ); if (!dfb_config->mouse_motion_compression) mouse_motion_realize( data ); if (last_buttons != buttons) { DFBInputEvent evt; unsigned char changed_buttons = last_buttons ^ buttons; /* make sure the compressed motion event is dispatched before any button change */ mouse_motion_realize( data ); if (changed_buttons & 0x04) { evt.type = (buttons & 0x04) ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; /* button is always valid */ evt.button = DIBI_LEFT; dfb_input_dispatch( data->device, &evt ); } if (changed_buttons & 0x01) { evt.type = (buttons & 0x01) ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; /* button is always valid */ evt.button = DIBI_MIDDLE; dfb_input_dispatch( data->device, &evt ); } if (changed_buttons & 0x02) { evt.type = (buttons & 0x02) ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; /* button is always valid */ evt.button = DIBI_RIGHT; dfb_input_dispatch( data->device, &evt ); } last_buttons = buttons; } } } /* make sure the compressed motion event is dispatched, necessary if the last packet was a motion event */ if (readlen > 0) mouse_motion_realize( data ); direct_thread_testcancel( thread ); } D_PERROR ("serial mouse thread died\n"); return NULL; } static MouseProtocol mouse_get_protocol( void ) { MouseProtocol protocol; if (!dfb_config->mouse_protocol) return LAST_PROTOCOL; for (protocol = 0; protocol < LAST_PROTOCOL; protocol++) { if (strcasecmp (dfb_config->mouse_protocol, protocol_names[protocol]) == 0) break; } return protocol; } /* exported symbols */ static int driver_get_available( void ) { struct serial_struct serial_info; struct timeval timeout; MouseProtocol protocol; fd_set set; int fd; char buf[8]; int readlen; int lines; int flags; if (dfb_system_type() != CORE_FBDEV) return 0; protocol = mouse_get_protocol(); if (protocol == LAST_PROTOCOL) return 0; /* initialize source device name to read from */ /* initialize flags to open device with */ flags = O_NONBLOCK; D_INFO( "DirectFB/SerialMouse: mouse detection on device '%s'...", dfb_config->mouse_source ); /* open device to read from */ fd = open( dfb_config->mouse_source, flags ); if (fd < 0) { D_INFO( "DirectFB/SerialMouse: could not open device '%s'!\n", dfb_config->mouse_source ); return 0; } /* test if this is a serial device */ if (dfb_config->mouse_gpm_source) { /* test whether a there is really a GPM driver active */ /* availibity of device name is enough */ goto success; } else { if (ioctl( fd, TIOCGSERIAL, &serial_info )) goto error; /* test if there's a mouse connected by lowering and raising RTS */ if (ioctl( fd, TIOCMGET, &lines )) goto error; lines ^= TIOCM_RTS; if (ioctl( fd, TIOCMSET, &lines )) goto error; usleep (1000); lines |= TIOCM_RTS; if (ioctl( fd, TIOCMSET, &lines )) goto error; /* wait for the mouse to send 0x4D */ FD_ZERO (&set); FD_SET (fd, &set); timeout.tv_sec = 0; timeout.tv_usec = 50000; while (select (fd+1, &set, NULL, NULL, &timeout) < 0 && errno == EINTR); if (FD_ISSET (fd, &set) && (readlen = read (fd, buf, 8) > 0)) { int i; for (i=0; iname, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "Serial Mouse Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 0; info->version.minor = 2; } static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; int flags; MouseProtocol protocol; SerialMouseData *data; protocol = mouse_get_protocol(); if (protocol == LAST_PROTOCOL) /* shouldn't happen */ return DFB_BUG; /* open device */ flags = O_NONBLOCK | (dfb_config->mouse_gpm_source ? O_RDONLY : O_RDWR); fd = open( dfb_config->mouse_source, flags ); if (fd < 0) { D_PERROR( "DirectFB/SerialMouse: Error opening '%s'!\n", dfb_config->mouse_source ); return DFB_INIT; } /* reset the O_NONBLOCK flag */ fcntl (fd, F_SETFL, fcntl (fd, F_GETFL) & ~O_NONBLOCK); /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(SerialMouseData) ); if (!data) { close( fd ); return D_OOM(); } data->fd = fd; data->device = device; data->protocol = protocol; mouse_setspeed( data ); /* fill device info structure */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "Serial Mouse (%s)", protocol_names[protocol] ); snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Unknown" ); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; #else info->desc.caps = DIDCAPS_AXES | DIDCAPS_BUTTONS; #endif info->desc.max_axis = DIAI_Y; info->desc.max_button = (protocol > PROTOCOL_MS) ? DIBI_MIDDLE : DIBI_RIGHT; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, protocol == PROTOCOL_MOUSESYSTEMS ? mouseEventThread_mousesystems : mouseEventThread_ms, data, "SerMouse Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } static void driver_close_device( void *driver_data ) { SerialMouseData *data = (SerialMouseData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close device */ close( data->fd ); /* free private data */ D_FREE( data ); } DirectFB-1.7.7/inputdrivers/serialmouse/Makefile.am0000644000175000017500000000123712171403127017214 00000000000000## Makefile.am for DirectFB/inputdrivers/serialmouse INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src serialmouse_LTLIBRARIES = libdirectfb_serialmouse.la if BUILD_STATIC serialmouse_DATA = $(serialmouse_LTLIBRARIES:.la=.o) endif serialmousedir = $(MODULEDIR)/inputdrivers libdirectfb_serialmouse_la_SOURCES = serialmouse.c libdirectfb_serialmouse_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_serialmouse_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/serialmouse/Makefile.in0000644000175000017500000006524112466665312017247 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/serialmouse ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(serialmousedir)" \ "$(DESTDIR)$(serialmousedir)" LTLIBRARIES = $(serialmouse_LTLIBRARIES) libdirectfb_serialmouse_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_serialmouse_la_OBJECTS = serialmouse.lo libdirectfb_serialmouse_la_OBJECTS = \ $(am_libdirectfb_serialmouse_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_serialmouse_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_serialmouse_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_serialmouse_la_SOURCES) DIST_SOURCES = $(libdirectfb_serialmouse_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(serialmouse_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src serialmouse_LTLIBRARIES = libdirectfb_serialmouse.la @BUILD_STATIC_TRUE@serialmouse_DATA = $(serialmouse_LTLIBRARIES:.la=.o) serialmousedir = $(MODULEDIR)/inputdrivers libdirectfb_serialmouse_la_SOURCES = serialmouse.c libdirectfb_serialmouse_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_serialmouse_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/serialmouse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/serialmouse/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-serialmouseLTLIBRARIES: $(serialmouse_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(serialmouse_LTLIBRARIES)'; test -n "$(serialmousedir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(serialmousedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(serialmousedir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(serialmousedir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(serialmousedir)"; \ } uninstall-serialmouseLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(serialmouse_LTLIBRARIES)'; test -n "$(serialmousedir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(serialmousedir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(serialmousedir)/$$f"; \ done clean-serialmouseLTLIBRARIES: -test -z "$(serialmouse_LTLIBRARIES)" || rm -f $(serialmouse_LTLIBRARIES) @list='$(serialmouse_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_serialmouse.la: $(libdirectfb_serialmouse_la_OBJECTS) $(libdirectfb_serialmouse_la_DEPENDENCIES) $(EXTRA_libdirectfb_serialmouse_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_serialmouse_la_LINK) -rpath $(serialmousedir) $(libdirectfb_serialmouse_la_OBJECTS) $(libdirectfb_serialmouse_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serialmouse.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-serialmouseDATA: $(serialmouse_DATA) @$(NORMAL_INSTALL) @list='$(serialmouse_DATA)'; test -n "$(serialmousedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(serialmousedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(serialmousedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(serialmousedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(serialmousedir)" || exit $$?; \ done uninstall-serialmouseDATA: @$(NORMAL_UNINSTALL) @list='$(serialmouse_DATA)'; test -n "$(serialmousedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(serialmousedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(serialmousedir)" "$(DESTDIR)$(serialmousedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-serialmouseLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-serialmouseDATA \ install-serialmouseLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-serialmouseDATA \ uninstall-serialmouseLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-serialmouseLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-serialmouseDATA \ install-serialmouseLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-serialmouseDATA \ uninstall-serialmouseLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/gunze/0000755000175000017500000000000012466665354014060 500000000000000DirectFB-1.7.7/inputdrivers/gunze/Makefile.am0000644000175000017500000000114512171403127016012 00000000000000## Makefile.am for DirectFB/inputdrivers/gunze INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_gunze.la if BUILD_STATIC input_DATA = $(input_LTLIBRARIES:.la=.o) endif inputdir = $(MODULEDIR)/inputdrivers libdirectfb_gunze_la_SOURCES = \ gunze.c libdirectfb_gunze_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_gunze_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/gunze/Makefile.in0000644000175000017500000006432312466665312016047 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/gunze ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)" LTLIBRARIES = $(input_LTLIBRARIES) libdirectfb_gunze_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_gunze_la_OBJECTS = gunze.lo libdirectfb_gunze_la_OBJECTS = $(am_libdirectfb_gunze_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_gunze_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_gunze_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_gunze_la_SOURCES) DIST_SOURCES = $(libdirectfb_gunze_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(input_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_gunze.la @BUILD_STATIC_TRUE@input_DATA = $(input_LTLIBRARIES:.la=.o) inputdir = $(MODULEDIR)/inputdrivers libdirectfb_gunze_la_SOURCES = \ gunze.c libdirectfb_gunze_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_gunze_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/gunze/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/gunze/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputLTLIBRARIES: $(input_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdir)"; \ } uninstall-inputLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdir)/$$f"; \ done clean-inputLTLIBRARIES: -test -z "$(input_LTLIBRARIES)" || rm -f $(input_LTLIBRARIES) @list='$(input_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_gunze.la: $(libdirectfb_gunze_la_OBJECTS) $(libdirectfb_gunze_la_DEPENDENCIES) $(EXTRA_libdirectfb_gunze_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_gunze_la_LINK) -rpath $(inputdir) $(libdirectfb_gunze_la_OBJECTS) $(libdirectfb_gunze_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gunze.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-inputDATA: $(input_DATA) @$(NORMAL_INSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdir)" || exit $$?; \ done uninstall-inputDATA: @$(NORMAL_UNINSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-inputLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-inputDATA install-inputLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-inputDATA uninstall-inputLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-inputLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-inputDATA install-inputLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-inputDATA uninstall-inputLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/gunze/gunze.c0000644000175000017500000004477412171403127015271 00000000000000/* (c) Copyright 2005 Gnat Solutions, Inc. All rights reserved. Written by Nathanael D. Noblet This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. This driver is a re-write from the gunze driver provided in XFree86. Using the MuTouch driver as a skeleton. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( gunze ) #define BUFFER_SIZE 64 /* size of reception buffer */ #define GUNZE_MAXPHYSCOORD 1023 #define GUNZE_MAXCOORD (64*1024-1) /* oversampled, synthetic value */ #define FLAG_TAPPING 1 #define FLAG_WAS_UP 2 #define BAUDRATE B9600 #define GunzeT_PACKET_SIZE 10 #define GunzeT_SCREENWIDTH 1024 #define GunzeT_SCREENHEIGHT 768 #define GunzeT_MINX 0 #define GunzeT_MINY 0 #define GunzeT_DEFAULT_DEVICE "/dev/ttyS0" #define GUNZE_PANEL_TOUCH T #define GUNZE_PANEL_UNTOUCH R #define GUNZE_SERIAL_DLEN 11 #define GUNZE_PS2_DLEN 3 #define GUNZE_SECTION_NAME "gunze" #define GUNZE_DEFAULT_CFGFILE "/etc/gunzets.calib" #define SYSCALL(call) while(((call) == -1) && (errno == EINTR)) /* * Serial protocol (11 b): <4-bytes-for-X> , <4-bytes-for-Y> 0x0d */ typedef struct __GunzeTData__ { const char *gunDevice; /* device file name */ DirectThread *thread; CoreInputDevice *device; unsigned int x; unsigned int y; unsigned int screen_width; unsigned int screen_height; int flags; /* various flags */ int gunType; /* TYPE_SERIAL, etc */ int gunBaud; /* 9600 or 19200 */ int gunDlen; /* data length (3 or 11) */ int gunPrevX; /* previous X position */ int gunPrevY; /* previous Y position */ int gunSmooth; /* how smooth the motion is */ int gunTapping; /* move-and-tap (or press-only) not implemented */ int gunPrevButtonState; /* previous button state */ int gunBytes; /* number of bytes read */ unsigned char gunData[16]; /* data read on the device */ int gunCalib[4]; /* calibration data */ char *gunConfig; /* filename for configuration */ int fd; } GunzeTData; enum devicetypeitems { TYPE_UNKNOWN = 0, TYPE_SERIAL = 1, TYPE_PS2, TYPE_USB }; static int GunzeReadCalib(GunzeTData *priv) { int i=1; int err = 1; FILE *f; priv->gunCalib[0]=priv->gunCalib[1]=priv->gunCalib[2]=priv->gunCalib[3]=0; f = fopen(priv->gunConfig, "r"); if (f) { char s[80]; fgets(s, 80, f); /* discard the comment */ if (fscanf(f, "%d %d %d %d", priv->gunCalib, priv->gunCalib+1, priv->gunCalib+2, priv->gunCalib+3) == 4) { D_PERROR("DirectFB/gunze: Calibration invalid 0 i:%d gunCalib[0]:%d \n",i,priv->gunCalib[0]); err = 0; } for (i=0; i<4; i++) { if (priv->gunCalib[i] & ~1023) { D_PERROR("DirectFB/gunze: Calibration invalid 0 i:%d gunCalib[i]:%d \n",i,priv->gunCalib[i]); err++; } if (abs(priv->gunCalib[0] - priv->gunCalib[2]) < 100) { D_PERROR("DirectFB/gunze: Calibration invalid 1 0:%d 2:%d abs(%d)\n",priv->gunCalib[0],priv->gunCalib[2],abs(priv->gunCalib[0] - priv->gunCalib[2])); err++; } if (abs(priv->gunCalib[1] - priv->gunCalib[3]) < 100) { D_PERROR("DirectFB/gunze: Calibration invalid 2 1:%d 3:%d abs(%d)\n",priv->gunCalib[1],priv->gunCalib[3],abs(priv->gunCalib[1] - priv->gunCalib[3])); err++; } fclose(f); } } if (err) { D_PERROR("DirectFB/gunze: Calibration data absent or invalid, using defaults\n"); priv->gunCalib[0] = priv->gunCalib[1] = 128; /* 1/8 */ priv->gunCalib[2] = priv->gunCalib[3] = 896; /* 7/8 */ } return 0; } static int GunzeSetToOptimalCTRL(int file) { struct termios newtio; int err; SYSCALL(err = tcgetattr(file, &newtio)); if (err == -1) { D_PERROR("DirectFB/gunze: Gunze touch screen tcgetattr failed\n"); return 0; } memset(&newtio,0, sizeof(newtio)); /* clear struct for new port settings */ /* BAUDRATE: Set bps rate. You could also use cfsetispeed and cfsetospeed. CRTSCTS : output hardware flow control (only used if the cable has all necessary lines. See sect. 7 of Serial-HOWTO) CS8 : 8n1 (8bit,no parity,1 stopbit) CLOCAL : local connection, no modem contol CREAD : enable receiving characters */ newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD; /* IGNPAR : ignore bytes with parity errors ICRNL : map CR to NL (otherwise a CR input on the other computer will not terminate input) otherwise make device raw (no other input processing) */ newtio.c_iflag = IGNPAR | ICRNL; /* Raw output */ newtio.c_oflag = 0; /* ICANON : enable canonical input disable all echo functionality, and don't send signals to calling program */ newtio.c_lflag = ICANON; /* initialize all control characters default values can be found in /usr/include/termios.h, and are given in the comments, but we don't need them here */ newtio.c_cc[VINTR] = 0; /* Ctrl-c */ newtio.c_cc[VQUIT] = 0; /* Ctrl-\ */ newtio.c_cc[VERASE] = 0; /* del */ newtio.c_cc[VKILL] = 0; /* @ */ newtio.c_cc[VEOF] = 4; /* Ctrl-d */ newtio.c_cc[VTIME] = 0; /* inter-character timer unused */ newtio.c_cc[VMIN] = 1; /* blocking read until 1 character arrives */ newtio.c_cc[VSWTC] = 0; /* '\0' */ newtio.c_cc[VSTART] = 0; /* Ctrl-q */ newtio.c_cc[VSTOP] = 0; /* Ctrl-s */ newtio.c_cc[VSUSP] = 0; /* Ctrl-z */ newtio.c_cc[VEOL] = 0; /* '\0' */ newtio.c_cc[VREPRINT] = 0; /* Ctrl-r */ newtio.c_cc[VDISCARD] = 0; /* Ctrl-u */ newtio.c_cc[VWERASE] = 0; /* Ctrl-w */ newtio.c_cc[VLNEXT] = 0; /* Ctrl-v */ newtio.c_cc[VEOL2] = 0; /* '\0' */ /* now clean the modem line and activate the settings for the port */ tcflush(file, TCIFLUSH); err = tcsetattr(file, TCSANOW, &newtio); if (err == -1) { D_PERROR("DirectFB/gunze: Gunze touch screen tcsetattr TCSANOW failed\n"); return 0; } return 1; } static int GunzeOpenDevice(const char *device) { int fd; int res; /* opens device */ SYSCALL(fd = open(device, O_RDWR | O_NOCTTY)); if (fd == -1) { D_PERROR("DirectFB/gunze: Error opening device %s\n",device); return fd; } /* setup termios settings for communication */ if((res = GunzeSetToOptimalCTRL(fd)) == 0) { close(fd); return res; } return fd; } /* The main routine for GunzeTouch */ static void *GunzeTouchEventThread(DirectThread *thread, void *driver_data) { GunzeTData *priv = (GunzeTData *) driver_data; unsigned char *pkt = priv->gunData; int len, loop; int x =0; int y =0; int button =0; int *calib = priv->gunCalib; unsigned char buffer[BUFFER_SIZE]; while ((len = read( priv->fd, buffer, BUFFER_SIZE)) >= 0 || errno == EINTR) { if (len <= 0) { D_PERROR("DirectFB/gunze: error reading Gunze touch screen device %d %d\n",errno,priv->fd); perror(NULL); return NULL; } for(loop=0; loopgunBytes == 0) { int error = 0; if (priv->gunDlen == GUNZE_SERIAL_DLEN) { /* First byte is 'R' (0x52) or 'T' (0x54) */ if ((buffer[loop] != 'R') && (buffer[loop] != 'T')) error = 1; } /* PS/2 / USB Unsupported for now (basically I don't have one, and didn't test adding support will be trivial else { if ( !(buffer[loop] & 0x80) || (len > loop+1 && !(buffer[loop+1] & 0x80)) || (len > loop+2 && (buffer[loop+2] & 0x80))) error = 1; } */ if (error) { D_PERROR("DirectFB/gunze: GunzeReadInput: bad first byte 0x%x %c\n",buffer[loop],buffer[loop]); continue; } } pkt[priv->gunBytes++] = buffer[loop]; /* Hack: sometimes a serial packet gets corrupted. If so, drop it */ if (buffer[loop] == 0x0d && priv->gunBytes != priv->gunDlen && priv->gunDlen == GUNZE_SERIAL_DLEN) { pkt[priv->gunBytes-1] = '\0'; D_PERROR("DirectFB/gunze: Bad packet \"%s\" dropping it\n", pkt); priv->gunBytes = 0; continue; } /* if whole packet collected, decode it */ if (priv->gunBytes == priv->gunDlen) { DFBInputEvent evt; priv->gunBytes = 0; if (priv->gunDlen == GUNZE_SERIAL_DLEN) { /* if T button == true */ button = (pkt[0] == 'T'); x = atoi((char *)pkt+1); y = atoi((char *)pkt+6); } /* USB version which I haven't added support for else { button = (pkt[2] & 0x40); x = ((pkt[0] & 0x7f) << 3) | ((pkt[1] & 0x70) >> 4); y = ((pkt[1] & 0x0f) << 6) | ((pkt[2] & 0x3f)); } */ if (x>1023 || x<0 || y>1023 || y<0) { D_PERROR("DirectFB/gunze: Bad packet \"%s\" -> %i,%i\n", pkt, x, y); priv->gunBytes = 0; continue; } /* Ok, now that we have raw data, turn it to real data according to calibration, smoothness, tapping and debouncing calibrate and rescale (by multiplying by 64) I don't fully understand this, came from xf86Gunze.c x = 64*128 + 64*768 * (x - calib[0])/(calib[2]-calib[0]); y = 64*128 + 64*768 * (y - calib[1])/(calib[3]-calib[1]); */ x = 8192 + 49152 * (x - calib[0])/(calib[2]-calib[0]); y = 8192 + 49152 * (y - calib[1])/(calib[3]-calib[1]); y = GUNZE_MAXCOORD - y; /* smooth it down, unless first touch */ if (!(priv->flags & FLAG_WAS_UP)) { x = (priv->gunPrevX * priv->gunSmooth + x)/(priv->gunSmooth+1); y = (priv->gunPrevY * priv->gunSmooth + y)/(priv->gunSmooth+1); } /* convert gunze x/y to screen dimensions */ x = x * priv->screen_width / (GUNZE_MAXCOORD); y = y * priv->screen_height / (GUNZE_MAXCOORD); if (x < 0) x = 0; if (y < 0) y = 0; if (x > priv->screen_width) x = priv->screen_width; if (y > priv->screen_height) y = priv->screen_height; if (!button) priv->flags |= FLAG_WAS_UP; else priv->flags &= ~FLAG_WAS_UP; /* Now send events */ /* only post new x/y if different from previous tap */ if ( (priv->gunPrevX != x) || (priv->gunPrevY != y) ) { direct_thread_testcancel (thread); /* Dispatch axis */ evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = x; dfb_input_dispatch (priv->device, &evt); evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = y; dfb_input_dispatch (priv->device, &evt); direct_thread_testcancel (thread); /*printf("dispatched motion x %d y %d\n",x,y);*/ } /* post button state change at x/y */ if (priv->gunPrevButtonState != button) { direct_thread_testcancel (thread); /* Dispatch axis */ evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = x; dfb_input_dispatch (priv->device, &evt); evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = y; dfb_input_dispatch (priv->device, &evt); /* Dispatch touch event */ evt.type = (button) ? DIET_BUTTONPRESS:DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch (priv->device, &evt); direct_thread_testcancel (thread); /* printf("dispatched button x %d y %d\n",x,y); */ } /* remember data */ priv->gunPrevButtonState = button; priv->gunPrevX = x; priv->gunPrevY = y; } } } return NULL; } /* exported symbols */ static int driver_get_available( void ) { int fd; /* if (!dfb_config->gunze_device){ D_PERROR("DirectFB/GunzeTouch: Missing Gunze device file using default %s!\n",GunzeT_DEFAULT_DEVICE); fflush(NULL); }*/ /* if (!dfb_config->gunze_device) return 0; */ /* TODO gotta clean this up... seems odd to open & close it like this... */ //fd = GunzeOpenDevice (dfb_config->gunze_device); fd = GunzeOpenDevice(GunzeT_DEFAULT_DEVICE); if (fd < 0) return 0; close(fd); return 1; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf(info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH,"gunze" ); snprintf(info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH,"Gunze" ); info->version.major = 0; info->version.minor = 1; } static DFBResult driver_open_device(CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data) { int fd; GunzeTData *data = NULL; const char *devname = GunzeT_DEFAULT_DEVICE; // if (!dfb_config->gunze_device) // D_PERROR("DirectFB/GunzeTouch: Missing Gunze device file using default %s!\n",GunzeT_DEFAULT_DEVICE); /* open device */ fd = GunzeOpenDevice (devname); if (fd < 0) { D_PERROR("DirectFB/GunzeTouch: Error opening '%s'!\n", devname); return DFB_INIT; } data = D_CALLOC (1, sizeof(GunzeTData)); if (!data) { close (fd); return D_OOM (); } data->fd = fd; data->device = device; data->gunDevice= devname; /* hard coded... */ data->gunType = TYPE_SERIAL; data->gunDlen = GUNZE_SERIAL_DLEN; /* Must define the correct resolution of screen */ data->screen_width = GunzeT_SCREENWIDTH; data->screen_height = GunzeT_SCREENHEIGHT; data->gunConfig = GUNZE_DEFAULT_CFGFILE;//(!dfb_config->gunze_calibration_file)?GUNZE_DEFAULT_CFGFILE:dfb_config->gunze_calibration_file; /* The following variable are defined to adjust the orientation of * the touchscreen. Variables are either max screen height/width or 0. * don't know how to use this as it was taken from mutouch likely not needed... data->min_x = GunzeT_MINX; data->min_y = GunzeT_MINY; */ /* grab calibration data */ GunzeReadCalib(data); /* fill device info structure */ snprintf(info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH,"gunze"); snprintf(info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH,"Gunze"); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; info->desc.max_axis = DIAI_Y; info->desc.max_button = DIBI_LEFT; /* start input thread */ data->thread = direct_thread_create (DTT_INPUT, GunzeTouchEventThread, data, "GunzeTouch Input"); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry(CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry) { return DFB_UNSUPPORTED; } static void driver_close_device(void *driver_data) { GunzeTData *data = (GunzeTData *)driver_data; /* stop input thread */ direct_thread_cancel (data->thread); direct_thread_join (data->thread); direct_thread_destroy (data->thread); /* close device */ close (data->fd); /* free private data */ D_FREE (data); } DirectFB-1.7.7/inputdrivers/Makefile.am0000644000175000017500000000277112254435330014673 00000000000000## Makefile.am for DirectFB/inputdrivers if DBOX2REMOTE DBOX2REMOTE_DIR = dbox2remote endif if ENABLE_DIVINE DIVINE_DIR = divine endif if DREAMBOXREMOTE DREAMBOXREMOTE_DIR = dreamboxremote endif if DYNAPRO_INPUT DYNAPRO_INPUT_DIR = dynapro endif if ELO_INPUT ELO_INPUT_DIR = elo endif if GUNZE_INPUT GUNZE_INPUT_DIR = gunze endif if H3600_TS H3600_TS_DIR = h3600_ts endif if INPUT_HUB INPUT_HUB_DIR = input_hub endif if JOYSTICK_INPUT JOYSTICK_INPUT_DIR = joystick endif if KEYBOARD_INPUT KEYBOARD_INPUT_DIR = keyboard endif if LINUX_INPUT LINUX_INPUT_DIR = linux_input endif if LIRC_INPUT LIRC_INPUT_DIR = lirc endif if MUTOUCH_TS MUTOUCH_TS_DIR = mutouch endif if ZYTRONIC_TS ZYTRONIC_TS_DIR = zytronic endif if PENMOUNT_TS PENMOUNT_TS_DIR = penmount endif if PS2MOUSE_INPUT PS2MOUSE_INPUT_DIR = ps2mouse endif if SERIAL_MOUSE_INPUT SERIALMOUSE_INPUT_DIR = serialmouse endif if SONYPI SONYPI_DIR = sonypi endif if TSLIB TSLIB_DIR = tslib endif if UCB1X00_TS UCB1X00_TS_DIR = ucb1x00_ts endif if WM97XX_TS WM97XX_TS_DIR = wm97xx_ts endif SUBDIRS = \ $(DBOX2REMOTE_DIR) \ $(DIVINE_DIR) \ $(DREAMBOXREMOTE_DIR) \ $(DYNAPRO_INPUT_DIR) \ $(ELO_INPUT_DIR) \ $(GUNZE_INPUT_DIR) \ $(H3600_TS_DIR) \ $(INPUT_HUB_DIR) \ $(JOYSTICK_INPUT_DIR) \ $(KEYBOARD_INPUT_DIR) \ $(LINUX_INPUT_DIR) \ $(LIRC_INPUT_DIR) \ $(MUTOUCH_TS_DIR) \ $(ZYTRONIC_TS_DIR) \ $(PENMOUNT_TS_DIR) \ $(PS2MOUSE_INPUT_DIR) \ $(SERIALMOUSE_INPUT_DIR) \ $(SONYPI_DIR) \ $(TSLIB_DIR) \ $(UCB1X00_TS_DIR) \ $(WM97XX_TS_DIR) DirectFB-1.7.7/inputdrivers/h3600_ts/0000755000175000017500000000000012466665354014176 500000000000000DirectFB-1.7.7/inputdrivers/h3600_ts/h3600_ts.c0000644000175000017500000001451212254435330015513 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( h3600_ts ) typedef struct { CoreInputDevice *device; DirectThread *thread; int fd; } H3600TSData; static void * h3600tsEventThread( DirectThread *thread, void *driver_data ) { H3600TSData *data = (H3600TSData*) driver_data; TS_EVENT ts_event; int readlen; unsigned short old_x = -1; unsigned short old_y = -1; unsigned short old_pressure = 0; while ((readlen = read(data->fd, &ts_event, sizeof(TS_EVENT))) > 0 || errno == EINTR) { DFBInputEvent evt; direct_thread_testcancel( thread ); if (readlen < 1) continue; if (ts_event.pressure) { if (ts_event.x != old_x) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = ts_event.x; dfb_input_dispatch( data->device, &evt ); old_x = ts_event.x; } if (ts_event.y != old_y) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = ts_event.y; dfb_input_dispatch( data->device, &evt ); old_y = ts_event.y; } } if ((ts_event.pressure && !old_pressure) || (!ts_event.pressure && old_pressure)) { evt.type = (ts_event.pressure ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE); evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch( data->device, &evt ); old_pressure = ts_event.pressure; } } if (readlen <= 0) D_PERROR ("H3600 Touchscreen thread died\n"); return NULL; } /* exported symbols */ static int driver_get_available( void ) { int fd; fd = open( dfb_config->h3600_device ? : "/dev/ts", O_RDONLY | O_NOCTTY ); if (fd < 0) return 0; close( fd ); return 1; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "H3600 Touchscreen Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 0; info->version.minor = 2; } static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; H3600TSData *data; /* open device */ fd = open( dfb_config->h3600_device ? : "/dev/ts", O_RDONLY | O_NOCTTY ); if (fd < 0) { D_PERROR( "DirectFB/H3600: Error opening `%s'!\n", dfb_config->h3600_device ? : "/dev/ts" ); return DFB_INIT; } /* fill device info structure */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "H3600 Touchscreen" ); snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Unknown" ); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; info->desc.max_axis = DIAI_Y; info->desc.max_button = DIBI_LEFT; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(H3600TSData) ); if (!data) { close( fd ); return D_OOM(); } data->fd = fd; data->device = device; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, h3600tsEventThread, data, "H3600 TS Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } static void driver_close_device( void *driver_data ) { H3600TSData *data = (H3600TSData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close device */ if (close( data->fd ) < 0) D_PERROR( "DirectFB/H3600: Error closing `%s'!\n", dfb_config->h3600_device ? : "/dev/ts" ); /* free private data */ D_FREE( data ); } DirectFB-1.7.7/inputdrivers/h3600_ts/Makefile.am0000644000175000017500000000117012171403127016126 00000000000000## Makefile.am for DirectFB/inputdrivers/h3600_ts INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_h3600_ts.la if BUILD_STATIC input_DATA = $(input_LTLIBRARIES:.la=.o) endif inputdir = $(MODULEDIR)/inputdrivers libdirectfb_h3600_ts_la_SOURCES = \ h3600_ts.c libdirectfb_h3600_ts_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_h3600_ts_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/h3600_ts/Makefile.in0000644000175000017500000006444212466665312016167 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/h3600_ts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)" LTLIBRARIES = $(input_LTLIBRARIES) libdirectfb_h3600_ts_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_h3600_ts_la_OBJECTS = h3600_ts.lo libdirectfb_h3600_ts_la_OBJECTS = \ $(am_libdirectfb_h3600_ts_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_h3600_ts_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_h3600_ts_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_h3600_ts_la_SOURCES) DIST_SOURCES = $(libdirectfb_h3600_ts_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(input_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_h3600_ts.la @BUILD_STATIC_TRUE@input_DATA = $(input_LTLIBRARIES:.la=.o) inputdir = $(MODULEDIR)/inputdrivers libdirectfb_h3600_ts_la_SOURCES = \ h3600_ts.c libdirectfb_h3600_ts_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_h3600_ts_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/h3600_ts/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/h3600_ts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputLTLIBRARIES: $(input_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdir)"; \ } uninstall-inputLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdir)/$$f"; \ done clean-inputLTLIBRARIES: -test -z "$(input_LTLIBRARIES)" || rm -f $(input_LTLIBRARIES) @list='$(input_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_h3600_ts.la: $(libdirectfb_h3600_ts_la_OBJECTS) $(libdirectfb_h3600_ts_la_DEPENDENCIES) $(EXTRA_libdirectfb_h3600_ts_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_h3600_ts_la_LINK) -rpath $(inputdir) $(libdirectfb_h3600_ts_la_OBJECTS) $(libdirectfb_h3600_ts_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h3600_ts.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-inputDATA: $(input_DATA) @$(NORMAL_INSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdir)" || exit $$?; \ done uninstall-inputDATA: @$(NORMAL_UNINSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-inputLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-inputDATA install-inputLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-inputDATA uninstall-inputLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-inputLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-inputDATA install-inputLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-inputDATA uninstall-inputLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/lirc/0000755000175000017500000000000012466665355013662 500000000000000DirectFB-1.7.7/inputdrivers/lirc/lirc.c0000644000175000017500000002356712254435330014673 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( lirc ) static DirectFBKeySymbolNames(keynames); static bool keynames_sorted = false; typedef struct { CoreInputDevice *device; DirectThread *thread; int fd; } LircData; static int keynames_compare (const void *key, const void *base) { return strcmp ((const char *) key, ((const struct DFBKeySymbolName *) base)->name); } static int keynames_sort_compare (const void *d1, const void *d2) { return strcmp (((const struct DFBKeySymbolName *) d1)->name, ((const struct DFBKeySymbolName *) d2)->name); } static DFBInputDeviceKeySymbol lirc_parse_line(const char *line) { struct DFBKeySymbolName *symbol_name; char *s, *name; if (!keynames_sorted) { qsort ( keynames, D_ARRAY_SIZE( keynames ), sizeof(keynames[0]), (__compar_fn_t) keynames_sort_compare ); keynames_sorted = true; } s = strchr( line, ' ' ); if (!s || !s[1]) return DIKS_NULL; s = strchr( ++s, ' ' ); if (!s|| !s[1]) return DIKS_NULL; name = ++s; s = strchr( name, ' ' ); if (s) *s = '\0'; switch (strlen( name )) { case 0: return DIKS_NULL; case 1: return (DFBInputDeviceKeySymbol) name[0]; default: symbol_name = bsearch( name, keynames, D_ARRAY_SIZE( keynames ), sizeof(keynames[0]), (__compar_fn_t) keynames_compare ); if (symbol_name) return symbol_name->symbol; break; } return DIKS_NULL; } static void* lircEventThread( DirectThread *thread, void *driver_data ) { int repeats = 0; DFBInputDeviceKeySymbol last = DIKS_NULL; LircData *data = (LircData*) driver_data; while (true) { struct timeval tv; fd_set set; int result; int readlen; char buf[128]; DFBInputEvent evt; DFBInputDeviceKeySymbol symbol; FD_ZERO(&set); FD_SET(data->fd,&set); tv.tv_sec = 0; tv.tv_usec = 200000; result = select (data->fd+1, &set, NULL, NULL, &tv); switch (result) { case -1: /* error */ if (errno == EINTR) continue; D_PERROR("DirectFB/LIRC: select() failed\n"); return NULL; case 0: /* timeout, release last key */ if (last != DIKS_NULL) { evt.flags = DIEF_KEYSYMBOL; evt.type = DIET_KEYRELEASE; evt.key_symbol = last; dfb_input_dispatch( data->device, &evt ); last = DIKS_NULL; } continue; default: /* data arrived */ break; } direct_thread_testcancel( thread ); /* read data */ readlen = read( data->fd, buf, 128 ); if (readlen < 1) continue; /* get new key */ symbol = lirc_parse_line( buf ); if (symbol == DIKS_NULL) continue; /* repeated key? */ if (symbol == last) { /* swallow the first three repeats */ if (++repeats < 4) continue; } else { /* reset repeat counter */ repeats = 0; /* release previous key if not released yet */ if (last != DIKS_NULL) { evt.flags = DIEF_KEYSYMBOL; evt.type = DIET_KEYRELEASE; evt.key_symbol = last; dfb_input_dispatch( data->device, &evt ); } } /* send the press event */ evt.flags = DIEF_KEYSYMBOL; evt.type = DIET_KEYPRESS; evt.key_symbol = symbol; dfb_input_dispatch( data->device, &evt ); /* remember last key */ last = symbol; } return NULL; } /* exported symbols */ static int driver_get_available( void ) { int fd; struct sockaddr_un addr; addr.sun_family = AF_UNIX; direct_snputs( addr.sun_path, "/dev/lircd", sizeof(addr.sun_path) ); fd = socket( PF_UNIX, SOCK_STREAM, 0 ); if (fd < 0) return 0; if (connect( fd, (struct sockaddr*)&addr, sizeof(addr) ) < 0) { /* * for LIRC version >= 0.8.6 the Unix socket is no more created * under /dev/lircd but under /var/run/lirc/lircd */ direct_snputs( addr.sun_path, "/var/run/lirc/lircd", sizeof(addr.sun_path) ); if (connect( fd, (struct sockaddr*)&addr, sizeof(addr) ) < 0) { close( fd ); return 0; } } close( fd ); return 1; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "LIRC Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 0; info->version.minor = 2; } static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; LircData *data; struct sockaddr_un sa; /* create socket */ sa.sun_family = AF_UNIX; direct_snputs( sa.sun_path, "/dev/lircd", sizeof(sa.sun_path) ); fd = socket( PF_UNIX, SOCK_STREAM, 0 ); if (fd < 0) { D_PERROR( "DirectFB/LIRC: socket" ); return DFB_INIT; } /* initiate connection */ if (connect( fd, (struct sockaddr*)&sa, sizeof(sa) ) < 0) { /* * try "/var/run/lirc/lircd" */ direct_snputs( sa.sun_path, "/var/run/lirc/lircd", sizeof(sa.sun_path) ); if (connect( fd, (struct sockaddr*)&sa, sizeof(sa) ) < 0) { D_PERROR( "DirectFB/LIRC: connect" ); close( fd ); return DFB_INIT; } } /* fill driver info structure */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "LIRC Device" ); snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Unknown" ); info->prefered_id = DIDID_REMOTE; info->desc.type = DIDTF_REMOTE; #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps = DICAPS_KEYS; #else info->desc.caps = DIDCAPS_KEYS; #endif /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(LircData) ); if (!data) { close( fd ); return D_OOM(); } data->fd = fd; data->device = device; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, lircEventThread, data, "LiRC Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } static void driver_close_device( void *driver_data ) { LircData *data = (LircData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close socket */ close( data->fd ); /* free private data */ D_FREE( data ); } DirectFB-1.7.7/inputdrivers/lirc/Makefile.am0000644000175000017500000000113412171403127015611 00000000000000## Makefile.am for DirectFB/inputdrivers/lirc INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src lirc_LTLIBRARIES = libdirectfb_lirc.la if BUILD_STATIC lirc_DATA = $(lirc_LTLIBRARIES:.la=.o) endif lircdir = $(MODULEDIR)/inputdrivers libdirectfb_lirc_la_SOURCES = \ lirc.c libdirectfb_lirc_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_lirc_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/lirc/Makefile.in0000644000175000017500000006421012466665312015643 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/lirc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(lircdir)" "$(DESTDIR)$(lircdir)" LTLIBRARIES = $(lirc_LTLIBRARIES) libdirectfb_lirc_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_lirc_la_OBJECTS = lirc.lo libdirectfb_lirc_la_OBJECTS = $(am_libdirectfb_lirc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_lirc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_lirc_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_lirc_la_SOURCES) DIST_SOURCES = $(libdirectfb_lirc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(lirc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src lirc_LTLIBRARIES = libdirectfb_lirc.la @BUILD_STATIC_TRUE@lirc_DATA = $(lirc_LTLIBRARIES:.la=.o) lircdir = $(MODULEDIR)/inputdrivers libdirectfb_lirc_la_SOURCES = \ lirc.c libdirectfb_lirc_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_lirc_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/lirc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/lirc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-lircLTLIBRARIES: $(lirc_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lirc_LTLIBRARIES)'; test -n "$(lircdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(lircdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(lircdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(lircdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(lircdir)"; \ } uninstall-lircLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lirc_LTLIBRARIES)'; test -n "$(lircdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(lircdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(lircdir)/$$f"; \ done clean-lircLTLIBRARIES: -test -z "$(lirc_LTLIBRARIES)" || rm -f $(lirc_LTLIBRARIES) @list='$(lirc_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_lirc.la: $(libdirectfb_lirc_la_OBJECTS) $(libdirectfb_lirc_la_DEPENDENCIES) $(EXTRA_libdirectfb_lirc_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_lirc_la_LINK) -rpath $(lircdir) $(libdirectfb_lirc_la_OBJECTS) $(libdirectfb_lirc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lirc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-lircDATA: $(lirc_DATA) @$(NORMAL_INSTALL) @list='$(lirc_DATA)'; test -n "$(lircdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(lircdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(lircdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(lircdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(lircdir)" || exit $$?; \ done uninstall-lircDATA: @$(NORMAL_UNINSTALL) @list='$(lirc_DATA)'; test -n "$(lircdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(lircdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(lircdir)" "$(DESTDIR)$(lircdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-lircLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-lircDATA install-lircLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-lircDATA uninstall-lircLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-lircLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-lircDATA install-lircLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-lircDATA uninstall-lircLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/joystick/0000755000175000017500000000000012466665354014567 500000000000000DirectFB-1.7.7/inputdrivers/joystick/joystick.c0000644000175000017500000001666312254435330016506 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) typedef unsigned long kernel_ulong_t; #define BITS_PER_LONG (sizeof(long)*8) #endif #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( joystick ) typedef struct { CoreInputDevice *device; DirectThread *thread; int fd; } JoystickData; static void joystick_handle_event( JoystickData *data, struct js_event jse ) { DFBInputEvent event; switch (jse.type) { case JS_EVENT_BUTTON: event.type = (jse.value ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE); event.flags = DIEF_NONE; /* button is always valid */ event.button = jse.number; break; case JS_EVENT_AXIS: event.type = DIET_AXISMOTION; event.flags = DIEF_AXISABS; event.axis = jse.number; event.axisabs = jse.value; break; case JS_EVENT_INIT: case JS_EVENT_INIT | JS_EVENT_BUTTON: case JS_EVENT_INIT | JS_EVENT_AXIS: D_ONCE( "Joystick sends JS_EVENT_INIT events, " \ "make sure it has been calibrated using 'jscal -c'\n"); return; break; default: D_PERROR ("unknown joystick event type\n"); return; } dfb_input_dispatch( data->device, &event ); } static void* joystickEventThread( DirectThread *thread, void *driver_data ) { int len; struct js_event jse; JoystickData *data = driver_data; while ((len = read( data->fd, &jse, sizeof(struct js_event) )) > 0 || errno == EINTR) { direct_thread_testcancel( thread ); if (len != sizeof(struct js_event)) continue; joystick_handle_event( data, jse ); } if (len <= 0 && errno != EINTR) D_PERROR ("joystick thread died\n"); return NULL; } /* exported symbols */ static int driver_get_available( void ) { int i, fd; int joy_count = 0; char devicename[20]; for (i=0; i<8; i++) { snprintf( devicename, 20, "/dev/js%d", i ); fd = open( devicename, O_RDONLY ); if (fd < 0) break; close (fd); joy_count++; } if (!joy_count) { /* try new-style device names */ for (i=0; i<8; i++) { snprintf( devicename, 20, "/dev/input/js%d", i ); fd = open( devicename, O_RDONLY ); if (fd < 0) break; close (fd); joy_count++; } } return joy_count; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "Joystick Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 0; info->version.minor = 9; } static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; char buttons, axes; JoystickData *data; char devicename[20]; /* open the right device */ snprintf( devicename, 20, "/dev/js%d", number ); fd = open( devicename, O_RDONLY ); if (fd < 0) { /* try new-style device names */ snprintf( devicename, 20, "/dev/input/js%d", number ); fd = open( devicename, O_RDONLY ); if (fd < 0) { D_PERROR( "DirectFB/Joystick: Could not open `%s'!\n", devicename ); return DFB_INIT; /* no joystick available */ } } /* query number of buttons and axes */ if (ioctl( fd, JSIOCGBUTTONS, &buttons ) == -1) buttons = 0; if (ioctl( fd, JSIOCGAXES, &axes ) == -1) axes = 0; /* fill device info structure */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "Joystick" ); snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Unknown" ); info->prefered_id = DIDID_JOYSTICK; info->desc.type = DIDTF_JOYSTICK; #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; #else info->desc.caps = DIDCAPS_AXES | DIDCAPS_BUTTONS; #endif info->desc.max_button = buttons - 1; info->desc.max_axis = axes - 1; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(JoystickData) ); if (!data) { close( fd ); return D_OOM(); } data->fd = fd; data->device = device; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, joystickEventThread, data, "Joystick Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } static void driver_close_device( void *driver_data ) { JoystickData *data = (JoystickData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close device */ close( data->fd ); /* free private data */ D_FREE( data ); } DirectFB-1.7.7/inputdrivers/joystick/Makefile.am0000644000175000017500000000120412171403127016515 00000000000000## Makefile.am for DirectFB/inputdrivers/joystick INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src joystick_LTLIBRARIES = libdirectfb_joystick.la if BUILD_STATIC joystick_DATA = $(joystick_LTLIBRARIES:.la=.o) endif joystickdir = $(MODULEDIR)/inputdrivers libdirectfb_joystick_la_SOURCES = \ joystick.c libdirectfb_joystick_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_joystick_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/joystick/Makefile.in0000644000175000017500000006467612466665312016571 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/joystick ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(joystickdir)" \ "$(DESTDIR)$(joystickdir)" LTLIBRARIES = $(joystick_LTLIBRARIES) libdirectfb_joystick_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_joystick_la_OBJECTS = joystick.lo libdirectfb_joystick_la_OBJECTS = \ $(am_libdirectfb_joystick_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_joystick_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_joystick_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_joystick_la_SOURCES) DIST_SOURCES = $(libdirectfb_joystick_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(joystick_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src joystick_LTLIBRARIES = libdirectfb_joystick.la @BUILD_STATIC_TRUE@joystick_DATA = $(joystick_LTLIBRARIES:.la=.o) joystickdir = $(MODULEDIR)/inputdrivers libdirectfb_joystick_la_SOURCES = \ joystick.c libdirectfb_joystick_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_joystick_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/joystick/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/joystick/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-joystickLTLIBRARIES: $(joystick_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(joystick_LTLIBRARIES)'; test -n "$(joystickdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(joystickdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(joystickdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(joystickdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(joystickdir)"; \ } uninstall-joystickLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(joystick_LTLIBRARIES)'; test -n "$(joystickdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(joystickdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(joystickdir)/$$f"; \ done clean-joystickLTLIBRARIES: -test -z "$(joystick_LTLIBRARIES)" || rm -f $(joystick_LTLIBRARIES) @list='$(joystick_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_joystick.la: $(libdirectfb_joystick_la_OBJECTS) $(libdirectfb_joystick_la_DEPENDENCIES) $(EXTRA_libdirectfb_joystick_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_joystick_la_LINK) -rpath $(joystickdir) $(libdirectfb_joystick_la_OBJECTS) $(libdirectfb_joystick_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/joystick.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-joystickDATA: $(joystick_DATA) @$(NORMAL_INSTALL) @list='$(joystick_DATA)'; test -n "$(joystickdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(joystickdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(joystickdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(joystickdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(joystickdir)" || exit $$?; \ done uninstall-joystickDATA: @$(NORMAL_UNINSTALL) @list='$(joystick_DATA)'; test -n "$(joystickdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(joystickdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(joystickdir)" "$(DESTDIR)$(joystickdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-joystickLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-joystickDATA install-joystickLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-joystickDATA uninstall-joystickLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-joystickLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-joystickDATA \ install-joystickLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-joystickDATA \ uninstall-joystickLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/input_hub/0000755000175000017500000000000012466665354014725 500000000000000DirectFB-1.7.7/inputdrivers/input_hub/Makefile.am0000644000175000017500000000125712171403127016663 00000000000000## Makefile.am for DirectFB/inputdrivers/input_hub INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/systems input_hub_LTLIBRARIES = libdirectfb_input_hub.la if BUILD_STATIC input_hub_DATA = $(input_hub_LTLIBRARIES:.la=.o) endif input_hubdir = $(MODULEDIR)/inputdrivers libdirectfb_input_hub_la_SOURCES = \ input_hub_driver.c libdirectfb_input_hub_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_input_hub_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/input_hub/Makefile.in0000644000175000017500000006507112466665312016715 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/input_hub ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(input_hubdir)" \ "$(DESTDIR)$(input_hubdir)" LTLIBRARIES = $(input_hub_LTLIBRARIES) libdirectfb_input_hub_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_input_hub_la_OBJECTS = input_hub_driver.lo libdirectfb_input_hub_la_OBJECTS = \ $(am_libdirectfb_input_hub_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_input_hub_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_input_hub_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_input_hub_la_SOURCES) DIST_SOURCES = $(libdirectfb_input_hub_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(input_hub_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/systems input_hub_LTLIBRARIES = libdirectfb_input_hub.la @BUILD_STATIC_TRUE@input_hub_DATA = $(input_hub_LTLIBRARIES:.la=.o) input_hubdir = $(MODULEDIR)/inputdrivers libdirectfb_input_hub_la_SOURCES = \ input_hub_driver.c libdirectfb_input_hub_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_input_hub_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/input_hub/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/input_hub/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-input_hubLTLIBRARIES: $(input_hub_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(input_hub_LTLIBRARIES)'; test -n "$(input_hubdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(input_hubdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(input_hubdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(input_hubdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(input_hubdir)"; \ } uninstall-input_hubLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(input_hub_LTLIBRARIES)'; test -n "$(input_hubdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(input_hubdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(input_hubdir)/$$f"; \ done clean-input_hubLTLIBRARIES: -test -z "$(input_hub_LTLIBRARIES)" || rm -f $(input_hub_LTLIBRARIES) @list='$(input_hub_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_input_hub.la: $(libdirectfb_input_hub_la_OBJECTS) $(libdirectfb_input_hub_la_DEPENDENCIES) $(EXTRA_libdirectfb_input_hub_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_input_hub_la_LINK) -rpath $(input_hubdir) $(libdirectfb_input_hub_la_OBJECTS) $(libdirectfb_input_hub_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input_hub_driver.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-input_hubDATA: $(input_hub_DATA) @$(NORMAL_INSTALL) @list='$(input_hub_DATA)'; test -n "$(input_hubdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(input_hubdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(input_hubdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(input_hubdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(input_hubdir)" || exit $$?; \ done uninstall-input_hubDATA: @$(NORMAL_UNINSTALL) @list='$(input_hub_DATA)'; test -n "$(input_hubdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(input_hubdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(input_hubdir)" "$(DESTDIR)$(input_hubdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-input_hubLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-input_hubDATA install-input_hubLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-input_hubDATA uninstall-input_hubLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-input_hubLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-input_hubDATA \ install-input_hubLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-input_hubDATA \ uninstall-input_hubLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/input_hub/input_hub_driver.c0000644000175000017500000002217612254435330020351 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #define DFB_INPUTDRIVER_HAS_AXIS_INFO #define DISABLE_INPUT_HOTPLUG_FUNCTION_STUB #include DFB_INPUT_DRIVER( input_hub ) D_DEBUG_DOMAIN( Input_Hub, "Input/Hub", "Input Hub driver" ); typedef struct { CoreInputDevice *device; DFBInputDeviceID device_id; DFBInputDeviceDescription description; } InputHubDeviceNode; static CoreDFB *m_core; static void *m_driver; static CoreInputHubClient *m_client; static DirectHash *m_nodes; static void InputHub_DeviceAdd( void *ctx, DFBInputDeviceID device_id, const DFBInputDeviceDescription *desc ) { DirectResult ret; InputHubDeviceNode *node; D_DEBUG_AT( Input_Hub, "%s( ID %u, '%s' )\n", __FUNCTION__, device_id, desc->name ); node = direct_hash_lookup( m_nodes, device_id ); if (!node) { node = D_CALLOC( 1, sizeof(InputHubDeviceNode) ); if (!node) { D_OOM(); return; } node->device_id = device_id; node->description = *desc; ret = direct_hash_insert( m_nodes, device_id, node ); if (ret) { D_FREE( node ); return; } ret = dfb_input_create_device( device_id, m_core, m_driver ); if (ret) { direct_hash_remove( m_nodes, device_id ); D_FREE( node ); return; } } else D_WARN( "already have device (ID %u)", device_id ); } static void InputHub_DeviceRemove( void *ctx, DFBInputDeviceID device_id ) { InputHubDeviceNode *node; D_DEBUG_AT( Input_Hub, "%s( ID %u )\n", __FUNCTION__, device_id ); node = direct_hash_lookup( m_nodes, device_id ); if (node) { dfb_input_remove_device( device_id, m_driver ); direct_hash_remove( m_nodes, device_id ); D_FREE( node ); } else D_WARN( "don't have device (ID %u)", device_id ); } static void InputHub_EventDispatch( void *ctx, DFBInputDeviceID device_id, const DFBInputEvent *event ) { InputHubDeviceNode *node; D_DEBUG_AT( Input_Hub, "%s( ID %u, %s )\n", __FUNCTION__, device_id, dfb_input_event_type_name(event->type) ); node = direct_hash_lookup( m_nodes, device_id ); if (node) { if (node->device) { DFBInputEvent event_copy = *event; D_DEBUG_AT( Input_Hub, " -> found device %p (ID %u)\n", node->device, dfb_input_device_id(node->device) ); dfb_input_dispatch( node->device, &event_copy ); } else D_WARN( "inactive device (ID %u)", device_id ); } else D_WARN( "unknown device (ID %u)", device_id ); } /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available( void ) { D_DEBUG_AT( Input_Hub, "%s()\n", __FUNCTION__ ); return 0; } /* * Fill out general information about this driver. * Called once during initialization of DirectFB. */ static void driver_get_info( InputDriverInfo *info ) { D_DEBUG_AT( Input_Hub, "%s()\n", __FUNCTION__ ); /* fill driver info structure */ snprintf ( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "Input Hub Driver" ); snprintf ( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 1; info->version.minor = 0; } /* * Check if /dev/input/eventX is handled by the input device. If so, return * DFB_OK. Otherwise, return DFB_UNSUPPORTED. */ static DFBResult is_created( int index, void *data ) { D_DEBUG_AT( Input_Hub, "%s( %d )\n", __FUNCTION__, index ); D_ASSERT( data != NULL ); if (index + 1 != (long) data) return DFB_UNSUPPORTED; return DFB_OK; } /* * Indicate that the hotplug detection capability is supported. */ static InputDriverCapability get_capability( void ) { return IDC_HOTPLUG; } /* * Stop hotplug detection thread. */ static DFBResult stop_hotplug( void ) { D_DEBUG_AT( Input_Hub, "%s()\n", __FUNCTION__ ); return DFB_OK; } /* * Launch hotplug detection thread. */ static DFBResult launch_hotplug( CoreDFB *core, void *input_driver ) { DFBResult ret; CoreInputHubClientCallbacks callbacks; D_DEBUG_AT( Input_Hub, "%s()\n", __FUNCTION__ ); if (!m_client && dfb_config->input_hub_qid) { D_ASSERT( m_nodes == NULL ); ret = direct_hash_create( 17, &m_nodes ); if (ret) return ret; D_DEBUG_AT( Input_Hub, " -> creating input hub client...\n" ); m_core = core; m_driver = input_driver; memset( &callbacks, 0, sizeof(CoreInputHubClientCallbacks) ); callbacks.DeviceAdd = InputHub_DeviceAdd; callbacks.DeviceRemove = InputHub_DeviceRemove; callbacks.EventDispatch = InputHub_EventDispatch; CoreInputHubClient_Create( dfb_config->input_hub_qid, &callbacks, NULL, &m_client ); return CoreInputHubClient_Activate( m_client ); } return DFB_OK; } /* * Enter the driver suspended state by setting the driver_suspended Boolean * to prevent hotplug events from being handled. */ static DFBResult driver_suspend( void ) { return DFB_OK; } /* * Leave the driver suspended state by clearing the driver_suspended Boolean * which will allow hotplug events to be handled again. */ static DFBResult driver_resume( void ) { return DFB_OK; } /* * Open the device, fill out information about it, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { InputHubDeviceNode *node; D_DEBUG_AT( Input_Hub, "%s( ID %u )\n", __FUNCTION__, number ); node = direct_hash_lookup( m_nodes, number ); if (!node) { D_BUG( "did not find device (ID %u)", number ); return DFB_BUG; } info->prefered_id = number; info->desc = node->description; node->device = device; *driver_data = (void*)(long) (number + 1); return DFB_OK; } /* * Fetch one entry from the kernel keymap. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { D_DEBUG_AT( Input_Hub, "%s( ID %u )\n", __FUNCTION__, dfb_input_device_id(device) ); D_UNIMPLEMENTED(); return DFB_UNIMPLEMENTED; } /* * Obtain information about an axis (only absolute axis so far). */ static DFBResult driver_get_axis_info( CoreInputDevice *device, void *driver_data, DFBInputDeviceAxisIdentifier axis, DFBInputDeviceAxisInfo *ret_info ) { D_DEBUG_AT( Input_Hub, "%s( ID %u, axis %u )\n", __FUNCTION__, dfb_input_device_id(device), axis ); D_UNIMPLEMENTED(); return DFB_UNIMPLEMENTED; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { D_DEBUG_AT( Input_Hub, "%s()\n", __FUNCTION__ ); } DirectFB-1.7.7/inputdrivers/ps2mouse/0000755000175000017500000000000012466665355014506 500000000000000DirectFB-1.7.7/inputdrivers/ps2mouse/Makefile.am0000644000175000017500000000120412171403127016433 00000000000000## Makefile.am for DirectFB/inputdrivers/ps2mouse INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src ps2mouse_LTLIBRARIES = libdirectfb_ps2mouse.la if BUILD_STATIC ps2mouse_DATA = $(ps2mouse_LTLIBRARIES:.la=.o) endif ps2mousedir = $(MODULEDIR)/inputdrivers libdirectfb_ps2mouse_la_SOURCES = \ ps2mouse.c libdirectfb_ps2mouse_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_ps2mouse_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/ps2mouse/ps2mouse.c0000644000175000017500000004111212254435330016325 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( ps2mouse ) /* Stolen from the linux kernel (pc_keyb.h) */ #define PS2_SET_RES 0xE8 /* Set resolution */ #define PS2_SET_SCALE11 0xE6 /* Set 1:1 scaling */ #define PS2_SET_SCALE21 0xE7 /* Set 2:1 scaling */ #define PS2_GET_SCALE 0xE9 /* Get scaling factor */ #define PS2_SET_STREAM 0xEA /* Set stream mode */ #define PS2_SET_SAMPLE 0xF3 /* Set sample rate */ #define PS2_ENABLE_DEV 0xF4 /* Enable aux device */ #define PS2_DISABLE_DEV 0xF5 /* Disable aux device */ #define PS2_RESET 0xFF /* Reset aux device */ #define PS2_ACK 0xFA /* Command byte ACK */ /*** mouse commands ***/ #define PS2_SEND_ID 0xF2 #define PS2_ID_ERROR -1 #define PS2_ID_PS2 0 #define PS2_ID_IMPS2 3 static int ndev; static const char *devlist[8]; typedef struct { int fd; CoreInputDevice *device; DirectThread *thread; int mouseId; int packetLength; int dx; int dy; } PS2MouseData; static void flush_xy( PS2MouseData *data ) { DFBInputEvent evt; if (data->dx) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISREL; evt.axis = DIAI_X; evt.axisrel = data->dx; /* Signal immediately following event. */ if (data->dy) evt.flags |= DIEF_FOLLOW; dfb_input_dispatch( data->device, &evt ); data->dx = 0; } if (data->dy) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISREL; evt.axis = DIAI_Y; evt.axisrel = data->dy; dfb_input_dispatch( data->device, &evt ); data->dy = 0; } } static void* ps2mouseEventThread( DirectThread *thread, void *driver_data ) { PS2MouseData *data = (PS2MouseData*) driver_data; unsigned char packet[4]; unsigned char pos = 0; unsigned char last_buttons = 0; int readlen; unsigned char buf[256]; while ( (readlen = read(data->fd, buf, 256)) > 0 ) { int i; direct_thread_testcancel( thread ); for ( i = 0; i < readlen; i++ ) { if ( pos == 0 && (buf[i] & 0xc0) ) { continue; } packet[pos++] = buf[i]; if ( pos == data->packetLength ) { int dx, dy, dz; int buttons; pos = 0; if ( !(packet[0] & 0x08) ) { /* We've lost sync! */ i--; /* does this make sense? oh well, it will resync eventually (will it ?)*/ continue; } buttons = packet[0] & 0x07; dx = (packet[0] & 0x10) ? packet[1]-256 : packet[1]; dy = (packet[0] & 0x20) ? -(packet[2]-256) : -packet[2]; if (data->mouseId == PS2_ID_IMPS2) { /* Just strip off the extra buttons if present and sign extend the 4 bit value */ dz = (s8)((packet[3] & 0x80) ? packet[3] | 0xf0 : packet[3] & 0x0F); if (dz) { DFBInputEvent evt; evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISREL; evt.axis = DIAI_Z; evt.axisrel = dz; flush_xy( data ); dfb_input_dispatch( data->device, &evt ); } } else { dz = 0; } data->dx += dx; data->dy += dy; if ( !dfb_config->mouse_motion_compression ) flush_xy( data ); if ( last_buttons != buttons ) { DFBInputEvent evt; unsigned char changed_buttons; changed_buttons = last_buttons ^ buttons; /* make sure the compressed motion event is dispatched before any button change */ flush_xy( data ); if ( changed_buttons & 0x01 ) { evt.type = (buttons & 0x01) ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch( data->device, &evt ); } if ( changed_buttons & 0x02 ) { evt.type = (buttons & 0x02) ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; evt.button = DIBI_RIGHT; dfb_input_dispatch( data->device, &evt ); } if ( changed_buttons & 0x04 ) { evt.type = (buttons & 0x04) ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; evt.button = DIBI_MIDDLE; dfb_input_dispatch( data->device, &evt ); } last_buttons = buttons; } } } /* make sure the compressed motion event is dispatched, necessary if the last packet was a motion event */ flush_xy( data ); } if ( readlen <= 0 && errno != EINTR ) D_PERROR ("psmouse thread died\n"); return NULL; } static int ps2WriteChar( int fd, unsigned char c, bool verbose ) { struct timeval tv; fd_set fds; int res; (void)res; tv.tv_sec = 0; tv.tv_usec = 200000; /* timeout 200 ms */ FD_ZERO( &fds ); FD_SET( fd, &fds ); res = write( fd, &c, 1 ); if ( select(fd+1, &fds, NULL, NULL, &tv) == 0 ) { if ( verbose ) D_ERROR( "DirectFB/PS2Mouse: timeout waiting for ack!!\n" ); return -1; } res = read( fd, &c, 1 ); if ( c != PS2_ACK ) return -2; return 0; } static int ps2GetId( int fd, bool verbose ) { unsigned char c; int res; if ( ps2WriteChar(fd, PS2_SEND_ID, verbose) < 0 ) return PS2_ID_ERROR; res = read( fd, &c, 1 ); (void)res; return( c ); } static int ps2Write( int fd, const unsigned char *data, size_t len, bool verbose) { size_t i; int error = 0; for ( i = 0; i < len; i++ ) { if ( ps2WriteChar(fd, data[i], verbose) < 0 ) { if ( verbose ) D_ERROR( "DirectFB/PS2Mouse: error @byte %zu\n", i ); error++; } } if ( error && verbose ) D_ERROR( "DirectFB/PS2Mouse: missed %i ack's!\n", error); return( error ); } static int init_ps2( int fd, bool verbose ) { static const unsigned char basic_init[] = { PS2_ENABLE_DEV, PS2_SET_SAMPLE, 100 }; static const unsigned char imps2_init[] = { PS2_SET_SAMPLE, 200, PS2_SET_SAMPLE, 100, PS2_SET_SAMPLE, 80 }; static const unsigned char ps2_init[] = { PS2_SET_SCALE11, PS2_ENABLE_DEV, PS2_SET_SAMPLE, 100, PS2_SET_RES, 3 }; int mouseId; struct timeval tv; fd_set fds; int count = 100; int res; (void)res; /* read all data from the file descriptor before initializing the mouse */ while (true) { unsigned char buf[64]; tv.tv_sec = 0; tv.tv_usec = 50000; /* timeout 1/50 sec */ FD_ZERO( &fds ); FD_SET( fd, &fds ); if (select( fd+1, &fds, NULL, NULL, &tv )) res = read( fd, buf, sizeof(buf) ); else break; if (! --count) { D_ERROR( "DirectFB/PS2Mouse: " "PS/2 mouse keeps sending data, " "initialization failed\n" ); return -1; } } ps2Write( fd, basic_init, sizeof (basic_init), verbose ); /* Do a basic init in case the mouse is confused */ if (ps2Write( fd, basic_init, sizeof (basic_init), verbose ) != 0) { if (verbose) D_ERROR( "DirectFB/PS2Mouse: PS/2 mouse failed init\n" ); return -1; } ps2Write( fd, ps2_init, sizeof (ps2_init), verbose ); if (ps2Write(fd, imps2_init, sizeof (imps2_init), verbose) != 0) { if (verbose) D_ERROR ("DirectFB/PS2Mouse: mouse failed IMPS/2 init\n"); return -2; } if ((mouseId = ps2GetId( fd, verbose )) < 0) return mouseId; if ( mouseId != PS2_ID_IMPS2 ) /* unknown id, assume PS/2 */ mouseId = PS2_ID_PS2; return mouseId; } /**************************************************************************************************/ static void check_devices( const char *devnames[], int num ) { int i, fd; for (i=0; imouse_protocol && (strcasecmp( dfb_config->mouse_protocol, "PS/2") == 0 || strcasecmp( dfb_config->mouse_protocol, "IMPS/2") == 0)) { int fd = open( dfb_config->mouse_source, O_RDONLY | O_NONBLOCK ); if (fd < 0) { D_PERROR( "DirectFB/PS2Mouse: opening %s failed!\n", dfb_config->mouse_source ); return 0; } devlist[0] = dfb_config->mouse_source; close( fd ); return 1; } if (uname( &uts ) < 0) D_PERROR( "DirectFB/PS2Mouse: uname() failed!\n" ); else if (!strncmp( uts.release, "2.6.", 4 ) || !strncmp( uts.release, "2.5.", 4 )) check_psaux = false; if (check_psaux) CHECK_DEVICES( dev_psaux ); if (check_input) CHECK_DEVICES( dev_input ); return ndev; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "PS/2 Mouse Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 1; info->version.minor = 0; } static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; int mouseId = -1; int flags; PS2MouseData *data; /* open device */ flags = (dfb_config->mouse_gpm_source) ? (O_RDONLY | O_NONBLOCK) : (O_RDWR | O_SYNC | O_EXCL); fd = open( devlist[number], flags ); if (fd < 0) { D_PERROR( "DirectFB/PS2Mouse: failed opening `%s' !\n", devlist[number] ); close( fd ); return DFB_INIT; } fcntl( fd, F_SETFL, fcntl ( fd, F_GETFL ) & ~O_NONBLOCK ); if (!dfb_config->mouse_gpm_source) { mouseId = init_ps2( fd, true ); if (mouseId < 0) { D_PERROR( "DirectFB/PS2Mouse: could not initialize mouse on `%s'!\n", devlist[number] ); close( fd ); return DFB_INIT; } } if (dfb_config->mouse_protocol) { if (strcasecmp( dfb_config->mouse_protocol, "IMPS/2" ) == 0) { mouseId = PS2_ID_IMPS2; } else if (strcasecmp( dfb_config->mouse_protocol, "PS/2" ) == 0) { mouseId = PS2_ID_PS2; } else { D_ERROR( "DirectFB/PS2Mouse: unsupported protocol `%s' !\n", dfb_config->mouse_protocol ); close( fd ); return DFB_INIT; } } /* fill device info structure */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, (mouseId == PS2_ID_IMPS2) ? "IMPS/2 Mouse" : "PS/2 Mouse" ); snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Unknown" ); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; #else info->desc.caps = DIDCAPS_AXES | DIDCAPS_BUTTONS; #endif info->desc.max_axis = (mouseId == PS2_ID_IMPS2) ? DIAI_Z : DIAI_Y; info->desc.max_button = DIBI_MIDDLE; /* TODO: probe!? */ /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(PS2MouseData) ); if (!data) { close( fd ); return D_OOM(); } data->fd = fd; data->device = device; data->mouseId = mouseId; data->packetLength = (mouseId == PS2_ID_IMPS2) ? 4 : 3; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, ps2mouseEventThread, data, "PS/2 Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } static void driver_close_device( void *driver_data ) { PS2MouseData *data = (PS2MouseData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close device */ close( data->fd ); /* free private data */ D_FREE( data ); } DirectFB-1.7.7/inputdrivers/ps2mouse/Makefile.in0000644000175000017500000006467612466665312016507 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/ps2mouse ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(ps2mousedir)" \ "$(DESTDIR)$(ps2mousedir)" LTLIBRARIES = $(ps2mouse_LTLIBRARIES) libdirectfb_ps2mouse_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_ps2mouse_la_OBJECTS = ps2mouse.lo libdirectfb_ps2mouse_la_OBJECTS = \ $(am_libdirectfb_ps2mouse_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_ps2mouse_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_ps2mouse_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_ps2mouse_la_SOURCES) DIST_SOURCES = $(libdirectfb_ps2mouse_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(ps2mouse_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src ps2mouse_LTLIBRARIES = libdirectfb_ps2mouse.la @BUILD_STATIC_TRUE@ps2mouse_DATA = $(ps2mouse_LTLIBRARIES:.la=.o) ps2mousedir = $(MODULEDIR)/inputdrivers libdirectfb_ps2mouse_la_SOURCES = \ ps2mouse.c libdirectfb_ps2mouse_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_ps2mouse_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/ps2mouse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/ps2mouse/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-ps2mouseLTLIBRARIES: $(ps2mouse_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(ps2mouse_LTLIBRARIES)'; test -n "$(ps2mousedir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(ps2mousedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ps2mousedir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(ps2mousedir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(ps2mousedir)"; \ } uninstall-ps2mouseLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(ps2mouse_LTLIBRARIES)'; test -n "$(ps2mousedir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(ps2mousedir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(ps2mousedir)/$$f"; \ done clean-ps2mouseLTLIBRARIES: -test -z "$(ps2mouse_LTLIBRARIES)" || rm -f $(ps2mouse_LTLIBRARIES) @list='$(ps2mouse_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_ps2mouse.la: $(libdirectfb_ps2mouse_la_OBJECTS) $(libdirectfb_ps2mouse_la_DEPENDENCIES) $(EXTRA_libdirectfb_ps2mouse_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_ps2mouse_la_LINK) -rpath $(ps2mousedir) $(libdirectfb_ps2mouse_la_OBJECTS) $(libdirectfb_ps2mouse_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ps2mouse.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-ps2mouseDATA: $(ps2mouse_DATA) @$(NORMAL_INSTALL) @list='$(ps2mouse_DATA)'; test -n "$(ps2mousedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(ps2mousedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ps2mousedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ps2mousedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(ps2mousedir)" || exit $$?; \ done uninstall-ps2mouseDATA: @$(NORMAL_UNINSTALL) @list='$(ps2mouse_DATA)'; test -n "$(ps2mousedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(ps2mousedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(ps2mousedir)" "$(DESTDIR)$(ps2mousedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-ps2mouseLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-ps2mouseDATA install-ps2mouseLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-ps2mouseDATA uninstall-ps2mouseLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-ps2mouseLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-ps2mouseDATA \ install-ps2mouseLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-ps2mouseDATA \ uninstall-ps2mouseLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/Makefile.in0000644000175000017500000006021612466665311014713 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = inputdrivers DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = dbox2remote divine dreamboxremote dynapro elo gunze \ h3600_ts input_hub joystick keyboard linux_input lirc mutouch \ zytronic penmount ps2mouse serialmouse sonypi tslib ucb1x00_ts \ wm97xx_ts DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @DBOX2REMOTE_TRUE@DBOX2REMOTE_DIR = dbox2remote @ENABLE_DIVINE_TRUE@DIVINE_DIR = divine @DREAMBOXREMOTE_TRUE@DREAMBOXREMOTE_DIR = dreamboxremote @DYNAPRO_INPUT_TRUE@DYNAPRO_INPUT_DIR = dynapro @ELO_INPUT_TRUE@ELO_INPUT_DIR = elo @GUNZE_INPUT_TRUE@GUNZE_INPUT_DIR = gunze @H3600_TS_TRUE@H3600_TS_DIR = h3600_ts @INPUT_HUB_TRUE@INPUT_HUB_DIR = input_hub @JOYSTICK_INPUT_TRUE@JOYSTICK_INPUT_DIR = joystick @KEYBOARD_INPUT_TRUE@KEYBOARD_INPUT_DIR = keyboard @LINUX_INPUT_TRUE@LINUX_INPUT_DIR = linux_input @LIRC_INPUT_TRUE@LIRC_INPUT_DIR = lirc @MUTOUCH_TS_TRUE@MUTOUCH_TS_DIR = mutouch @ZYTRONIC_TS_TRUE@ZYTRONIC_TS_DIR = zytronic @PENMOUNT_TS_TRUE@PENMOUNT_TS_DIR = penmount @PS2MOUSE_INPUT_TRUE@PS2MOUSE_INPUT_DIR = ps2mouse @SERIAL_MOUSE_INPUT_TRUE@SERIALMOUSE_INPUT_DIR = serialmouse @SONYPI_TRUE@SONYPI_DIR = sonypi @TSLIB_TRUE@TSLIB_DIR = tslib @UCB1X00_TS_TRUE@UCB1X00_TS_DIR = ucb1x00_ts @WM97XX_TS_TRUE@WM97XX_TS_DIR = wm97xx_ts SUBDIRS = \ $(DBOX2REMOTE_DIR) \ $(DIVINE_DIR) \ $(DREAMBOXREMOTE_DIR) \ $(DYNAPRO_INPUT_DIR) \ $(ELO_INPUT_DIR) \ $(GUNZE_INPUT_DIR) \ $(H3600_TS_DIR) \ $(INPUT_HUB_DIR) \ $(JOYSTICK_INPUT_DIR) \ $(KEYBOARD_INPUT_DIR) \ $(LINUX_INPUT_DIR) \ $(LIRC_INPUT_DIR) \ $(MUTOUCH_TS_DIR) \ $(ZYTRONIC_TS_DIR) \ $(PENMOUNT_TS_DIR) \ $(PS2MOUSE_INPUT_DIR) \ $(SERIALMOUSE_INPUT_DIR) \ $(SONYPI_DIR) \ $(TSLIB_DIR) \ $(UCB1X00_TS_DIR) \ $(WM97XX_TS_DIR) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # 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: DirectFB-1.7.7/inputdrivers/elo/0000755000175000017500000000000012466665354013507 500000000000000DirectFB-1.7.7/inputdrivers/elo/Makefile.am0000644000175000017500000000113212171403127015435 00000000000000## Makefile.am for DirectFB/inputdrivers/elo INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_elo.la if BUILD_STATIC input_DATA = $(input_LTLIBRARIES:.la=.o) endif inputdir = $(MODULEDIR)/inputdrivers libdirectfb_elo_la_SOURCES = \ elo.c libdirectfb_elo_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_elo_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/elo/Makefile.in0000644000175000017500000006424112466665312015475 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/elo ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)" LTLIBRARIES = $(input_LTLIBRARIES) libdirectfb_elo_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_elo_la_OBJECTS = elo.lo libdirectfb_elo_la_OBJECTS = $(am_libdirectfb_elo_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_elo_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_elo_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_elo_la_SOURCES) DIST_SOURCES = $(libdirectfb_elo_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(input_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_elo.la @BUILD_STATIC_TRUE@input_DATA = $(input_LTLIBRARIES:.la=.o) inputdir = $(MODULEDIR)/inputdrivers libdirectfb_elo_la_SOURCES = \ elo.c libdirectfb_elo_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_elo_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/elo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/elo/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputLTLIBRARIES: $(input_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdir)"; \ } uninstall-inputLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdir)/$$f"; \ done clean-inputLTLIBRARIES: -test -z "$(input_LTLIBRARIES)" || rm -f $(input_LTLIBRARIES) @list='$(input_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_elo.la: $(libdirectfb_elo_la_OBJECTS) $(libdirectfb_elo_la_DEPENDENCIES) $(EXTRA_libdirectfb_elo_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_elo_la_LINK) -rpath $(inputdir) $(libdirectfb_elo_la_OBJECTS) $(libdirectfb_elo_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elo.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-inputDATA: $(input_DATA) @$(NORMAL_INSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdir)" || exit $$?; \ done uninstall-inputDATA: @$(NORMAL_UNINSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-inputLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-inputDATA install-inputLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-inputDATA uninstall-inputLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-inputLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-inputDATA install-inputLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-inputDATA uninstall-inputLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/elo/elo.c0000644000175000017500000003073112171403127014333 00000000000000/* (c) Copyright 2003 Commercial Timesharing Inc. All rights reserved. Written by Byron Stanoszek and Brandon Reynolds This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( elo ) #define elo_REPORT_SIZE 5 #define elo_PACKET_SIZE 10 #define elo_SCREENWIDTH 4096 #define elo_SCREENHEIGHT 4096 #define elo_MINX 0 #define elo_MINY 0 /* Mode 1 Bit Definitions */ #define ELO_M_INITIAL 0x01 /* Enables initial pressing detection */ #define ELO_M_STREAM 0x02 /* Enables stream touch (when finger moves) */ #define ELO_M_UNTOUCH 0x04 /* Enables untouch detection */ #define ELO_M_RANGECK 0x40 /* Range checking mode */ /* Mode 2 Bit Definitions */ #define ELO_M_TRIM 0x02 /* Trim Mode */ #define ELO_M_CALIB 0x04 /* Calibration Mode */ #define ELO_M_SCALE 0x08 /* Scaling Mode */ #define ELO_M_TRACK 0x40 /* Tracking Mode */ typedef struct __eloData__ { int fd; DirectThread *thread; CoreInputDevice *device; unsigned short x; unsigned short y; unsigned short screen_width; unsigned short screen_height; unsigned short min_x; unsigned short min_y; unsigned char action; } eloData; static int elo_check_ack(int fd); static inline void __mdelay(unsigned int msec) { struct timespec delay; delay.tv_sec = 0; delay.tv_nsec = msec * 1000000; nanosleep (&delay, NULL); } // Write a 10-byte character packet to the touch device. // static inline void elo_putbuf(int fd, unsigned char *data) { unsigned char packet[10]; int i; packet[0]='U'; /* Special serial lead-in byte */ memcpy(packet+1, data, 8); packet[9]=0; /* Calculate checksum */ for(i=1;i<9;i++) packet[9]+=packet[i]; packet[9]--; write(fd, packet, 10); } // Read a packet from the touch device. // static inline unsigned char *elo_getbuf(int fd) { static unsigned char packet[10]; static int len=0, start=0; fd_set set; unsigned char checksum; int i, j; while(1) { /* look ahead to see if there is any data to be gotten */ FD_ZERO(&set); FD_SET(fd, &set); if(!select(fd+1, &set, NULL, NULL, NULL)) return NULL; /* read the next byte from the stream */ if(read(fd, &packet[len++], 1) < 1) exit(1); if(!start && packet[len-1] != 0x55) { /* search for `begin-packet' 0x55 */ len=0; continue; } start=1; if(len < 10) /* wait until we get 10 full bytes first */ continue; /* check packet checksum when finished */ for(i=1,checksum=0;i<9;i++) checksum+=packet[i]; checksum--; /* checksum does not match */ if(checksum != packet[9]) { /* scan buffer for next `begin-packet' byte 0x55 */ for(i=1;i<10;i++) if(packet[i] == 0x55) break; if(i == 10) { /* No other 0x55 found */ len=0; continue; } for(j=0;i+j < 10;j++) /* Move 0x55 to front of buffer */ packet[j]=packet[i+j]; len=j; continue; } /* We have a match. Return buffer string */ len=0; /* set for next match */ return packet+1; } } // Remove all input translations over tty serial controller. // // set=1: Saves current settings then turns rawmode on. // set=0: Restores controller to previous saved value. // static void tty_rawmode(int fd, int set) { static struct termio tbuf, termio_save; int ret; if(set) { ioctl(fd, TCGETA, &termio_save); tbuf=termio_save; /* For complete explanation of the flags set/unset below, see termios(3) unix programmers reference manual. */ tbuf.c_iflag = 0; /* No input processing */ tbuf.c_oflag = 0; /* No output processing */ tbuf.c_lflag = 0; /* Disable erase/kill, signals, and echo */ tbuf.c_cflag = B9600|CS8|CLOCAL|CREAD; /* Set baud & 1-char read mode */ ret = ioctl(fd, TCSETAF, &tbuf); D_INFO("Elo:tty_rawmode ioctl= %d\n",ret); } else ioctl(fd, TCSETAF, &termio_save); } // Wait for acknowledgment. Returns 0 if no packet received or 1 for success or 2 for fail. static int elo_check_ack(int fd) { unsigned char buf[100]; int i; __mdelay(100); fd_set set; struct timeval timeout={0, 100000}; /* 0.1 seconds */ FD_ZERO(&set); FD_SET(fd, &set); if(!select(fd+1, &set, NULL, NULL, &timeout)) { D_INFO("Elo:elo_check_ack NO PACKET\n"); return 0; } memset(buf, 0, sizeof(buf)); ssize_t nb = read( fd, buf, sizeof(buf)-1); if( nb >= 0) { for( i = 0; i < nb; i++ ) { if( buf[i] < 0x20 ) buf[i] = 0x20; } buf[nb] = '\0'; /* buf now look as a string */ char* pt = strstr( buf, "A0000"); if ( pt != NULL ) { D_INFO("Elo:elo_check_ack nb= %zd ACK OK\n", nb); return 1; } } D_INFO("Elo:elo_check_ack nb= %zd ACK KO\n", nb); return 2; } // Set scaling info to touch device. Axis can be either 'X', 'Y', or 'Z'. // static int elo_set_scale(int fd, unsigned char axis, short low, short high) { unsigned char packet[8], *ptr; if(axis < 'X' || axis > 'Z') return -1; memset(packet, 0, 8); packet[0]='S'; packet[1]=axis; packet[2]=low; packet[3]=low >> 8; packet[4]=high; packet[5]=high >> 8; /* send packet until proper ack is received */ while(1) { elo_putbuf(fd, packet); int ret = elo_check_ack(fd); if( ret == 1 ) // OK return 0; if( ret == 0 ) // No receive return -2; } } // Set touch screen response packet mode (see #ifdefs in beginning of file). // static int elo_set_mode(int fd, unsigned char mode1, unsigned char mode2) { unsigned char packet[8]; /* create packet */ memset(packet, 0, 8); packet[0]='M'; packet[2]=mode1; packet[3]=mode2; /* send packet until proper ack is received */ while(1) { elo_putbuf(fd, packet); int ret = elo_check_ack(fd); if( ret == 1 ) // OK return 0; if( ret == 0 ) // No receive return -2; } } // Reset the touch-screen interface. // static int elo_reset_touch(int fd) { unsigned char packet[8]; /* Send reset command */ memset(packet, 0, 8); packet[0]='R'; packet[1]=1; /* 0=Hard reset, 1=Soft */ elo_putbuf(fd, packet); /* Wait for response */ if(!elo_check_ack(fd)) return -1; /* no valid packet received */ /* Set the proper mode of operation: Initial Touch, Range Checking, Calibration, Scaling, and Trim. */ elo_set_mode(fd,ELO_M_INITIAL|ELO_M_UNTOUCH|ELO_M_RANGECK, ELO_M_CALIB|ELO_M_SCALE|ELO_M_TRIM); /* Set scaling to 80 x 25 */ elo_set_scale(fd, 'X', elo_MINX, elo_SCREENWIDTH-1); elo_set_scale(fd, 'Y', elo_MINY, elo_SCREENHEIGHT-1); return 0; } static int eloOpenDevice(char *device) { int fd; int res; if((fd = open(device, O_RDWR|O_NOCTTY)) == -1) return -1; if((flock(fd, LOCK_EX|LOCK_NB)) == -1) { D_PERROR("DirectFB/elo: Error locking '%s'!\n",device); close(fd); return -1; } tty_rawmode(fd,1); if((res=elo_reset_touch(fd))) { close(fd); return -1; } return fd; } // // static int eloGetEvent(eloData *event) { unsigned char *ptr; /* read in the packet */ if(!(ptr=elo_getbuf(event->fd))) return -1; if(ptr[0] != 'T') return -1; /* Get touch coordinates */ event->x = ptr[2]+(ptr[3] << 8); event->y = ptr[4]+(ptr[5] << 8); /* Check for invalid range -- reset touch device if so */ if(event->x >= event->screen_width || event->y >= event->screen_height) { elo_reset_touch(event->fd); return -1; } event->action = ptr[1]; return 0; // valid touch } /* The main routine for elo */ static void *eloTouchEventThread(DirectThread *thread, void *driver_data) { eloData *data = (eloData *) driver_data; /* Read data */ while (1) { DFBInputEvent evt; if(eloGetEvent(data) == -1) continue; direct_thread_testcancel(thread); /* Dispatch axis */ evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = data->x; dfb_input_dispatch(data->device, &evt); evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = data->y; dfb_input_dispatch(data->device, &evt); /* Dispatch touch event */ if(data->action & ELO_M_UNTOUCH) evt.type = DIET_BUTTONRELEASE; else evt.type = DIET_BUTTONPRESS; evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch(data->device, &evt); direct_thread_testcancel(thread); } return NULL; } /* exported symbols */ static int driver_get_available( void ) { int fd; /* we will only use the ELO device if it has been configured */ if(!dfb_config->elo_device) { return 0; } fd = eloOpenDevice (dfb_config->elo_device); if (fd < 0) { D_INFO("Elo:driver_get_available NON OK\n"); return 0; } close(fd); return 1; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf(info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "elo" ); snprintf(info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "elo Systems" ); info->version.major = 0; info->version.minor = 2; } static DFBResult driver_open_device(CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data) { int fd; eloData *data; /* open device */ fd = eloOpenDevice(dfb_config->elo_device); if(fd < 0) { D_INFO("DirectFB/elo: Error opening '%s'!\n", dfb_config->elo_device); return DFB_INIT; } data = D_CALLOC(1, sizeof(eloData)); if (!data) { close(fd); return D_OOM(); } data->fd = fd; data->device = device; /* Must define the correct resolution of screen */ data->screen_width = elo_SCREENWIDTH; data->screen_height = elo_SCREENHEIGHT; /* The following variable are defined to adjust the orientation of * the touchscreen. Variables are either max screen height/width or 0. */ data->min_x = elo_MINX; data->min_y = elo_MINY; /* fill device info structure */ snprintf(info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "elo"); snprintf(info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "elo Systems"); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; info->desc.max_axis = DIAI_Y; info->desc.max_button = DIBI_LEFT; /* start input thread */ data->thread = direct_thread_create (DTT_INPUT, eloTouchEventThread, data, "ELO Touch Input"); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry(CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry) { return DFB_UNSUPPORTED; } static void driver_close_device(void *driver_data) { eloData *data = (eloData *)driver_data; /* stop input thread */ direct_thread_cancel(data->thread); direct_thread_join(data->thread); direct_thread_destroy(data->thread); /* restore termnial settings for the port */ tty_rawmode(data->fd,0); /* close device */ close(data->fd); /* free private data */ D_FREE(data); } DirectFB-1.7.7/inputdrivers/linux_input/0000755000175000017500000000000012466665354015306 500000000000000DirectFB-1.7.7/inputdrivers/linux_input/input_fake.h0000644000175000017500000000442712171403127017510 00000000000000#ifndef _INPUT_FAKE_H #define _INPUT_FAKE_H #include #if !defined(KEY_OK) /** * define some additional remote control keys in case they * were not already defined above in */ #define KEY_OK 0x160 #define KEY_SELECT 0x161 #define KEY_GOTO 0x162 #define KEY_CLEAR 0x163 #define KEY_POWER2 0x164 #define KEY_OPTION 0x165 #define KEY_INFO 0x166 #define KEY_TIME 0x167 #define KEY_VENDOR 0x168 #define KEY_ARCHIVE 0x169 #define KEY_PROGRAM 0x16a #define KEY_CHANNEL 0x16b #define KEY_FAVORITES 0x16c #define KEY_EPG 0x16d #define KEY_PVR 0x16e #define KEY_MHP 0x16f #define KEY_LANGUAGE 0x170 #define KEY_TITLE 0x171 #define KEY_SUBTITLE 0x172 #define KEY_ANGLE 0x173 #define KEY_ZOOM 0x174 #define KEY_MODE 0x175 #define KEY_KEYBOARD 0x176 #define KEY_SCREEN 0x177 #define KEY_PC 0x178 #define KEY_TV 0x179 #define KEY_TV2 0x17a #define KEY_VCR 0x17b #define KEY_VCR2 0x17c #define KEY_SAT 0x17d #define KEY_SAT2 0x17e #define KEY_CD 0x17f #define KEY_TAPE 0x180 #define KEY_RADIO 0x181 #define KEY_TUNER 0x182 #define KEY_PLAYER 0x183 #define KEY_TEXT 0x184 #define KEY_DVD 0x185 #define KEY_AUX 0x186 #define KEY_MP3 0x187 #define KEY_AUDIO 0x188 #define KEY_VIDEO 0x189 #define KEY_DIRECTORY 0x18a #define KEY_LIST 0x18b #define KEY_MEMO 0x18c #define KEY_CALENDAR 0x18d #define KEY_RED 0x18e #define KEY_GREEN 0x18f #define KEY_YELLOW 0x190 #define KEY_BLUE 0x191 #define KEY_CHANNELUP 0x192 #define KEY_CHANNELDOWN 0x193 #define KEY_FIRST 0x194 #define KEY_LAST 0x195 #define KEY_AB 0x196 #define KEY_PLAY 0x197 #define KEY_RESTART 0x198 #define KEY_SLOW 0x199 #define KEY_SHUFFLE 0x19a #define KEY_FASTFORWARD 0x19b #define KEY_PREVIOUS 0x19c #define KEY_NEXT 0x19d #define KEY_DIGITS 0x19e #define KEY_TEEN 0x19f #define KEY_TWEN 0x1a0 #define KEY_BREAK 0x1a1 #endif /* !defined(KEY_OK) */ #endif /* _INPUT_FAKE_H */ DirectFB-1.7.7/inputdrivers/linux_input/linux_input.c0000644000175000017500000021260512361150102017724 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) typedef unsigned long kernel_ulong_t; #define BITS_PER_LONG (sizeof(long)*8) #endif #include #ifndef KEY_OK /* Linux kernel 2.5.42+ defines additional keys in linux/input.h */ #include "input_fake.h" #endif #ifndef EV_CNT #define EV_CNT (EV_MAX+1) #define KEY_CNT (KEY_MAX+1) #define REL_CNT (REL_MAX+1) #define ABS_CNT (ABS_MAX+1) #define LED_CNT (LED_MAX+1) #endif /* compat defines for older kernel like 2.4.x */ #ifndef EV_SYN #define EV_SYN 0x00 #define SYN_REPORT 0 #define SYN_CONFIG 1 #define ABS_TOOL_WIDTH 0x1c #define BTN_TOOL_DOUBLETAP 0x14d #define BTN_TOOL_TRIPLETAP 0x14e #endif #ifndef EVIOCGLED #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) #endif #ifndef EVIOCGRAB #define EVIOCGRAB _IOW('E', 0x90, int) #endif #include #include #include #include #include #include #include #include #include #include #include #define DFB_INPUTDRIVER_HAS_AXIS_INFO #define DFB_INPUTDRIVER_HAS_SET_CONFIGURATION #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* Exclude hot-plug stub functionality from this input provider. */ #define DISABLE_INPUT_HOTPLUG_FUNCTION_STUB #include #include DFB_INPUT_DRIVER( linux_input ) D_DEBUG_DOMAIN( Debug_LinuxInput, "Input/Linux", "Linux input driver" ); #ifndef BITS_PER_LONG #define BITS_PER_LONG (sizeof(long) * 8) #endif #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) #define OFF(x) ((x)%BITS_PER_LONG) #define BIT(x) (1UL<> OFF(bit)) & 1) #define MAX_LENGTH_OF_EVENT_STRING 1024 /* compat for 2.4.x kernel - just a compile fix */ #ifndef HAVE_INPUT_ABSINFO typedef struct { s32 value; s32 minimum; s32 maximum; s32 fuzz; s32 flat; } Input_AbsInfo; #else typedef struct input_absinfo Input_AbsInfo; #endif /* * declaration of private data */ typedef struct { CoreInputDevice *device; DirectThread *thread; int fd; int quitpipe[2]; bool has_keys; bool has_leds; unsigned long led_state[NBITS(LED_CNT)]; DFBInputDeviceLockState locks; int vt_fd; int dx; int dy; bool touchpad; /* Indice of the associated device_nums and device_names array entry. * Used as the second parameter of the driver_open_device function. */ int index; int sensitivity; } LinuxInputData; #define MAX_LINUX_INPUT_DEVICES 16 static int num_devices = 0; static char *device_names[MAX_LINUX_INPUT_DEVICES]; /* The entries with the same index in device_names and device_nums are the same * are used in two different forms (one is "/dev/input/eventX", the other is * X). */ static int device_nums[MAX_LINUX_INPUT_DEVICES] = { 0 }; /* Socket file descriptor for getting udev events. */ static int socket_fd = 0; /* Pipe file descriptor for terminating the hotplug thread. */ static int hotplug_quitpipe[2]; /* The hot-plug thread that is launched by the launch_hotplug() function. */ static DirectThread *hotplug_thread = NULL; /* The driver suspended lock mutex. */ static pthread_mutex_t driver_suspended_lock; /* Flag that indicates if the driver is suspended when true. */ static bool driver_suspended = false; static const int basic_keycodes [] = { DIKI_UNKNOWN, DIKI_ESCAPE, DIKI_1, DIKI_2, DIKI_3, DIKI_4, DIKI_5, DIKI_6, DIKI_7, DIKI_8, DIKI_9, DIKI_0, DIKI_MINUS_SIGN, DIKI_EQUALS_SIGN, DIKI_BACKSPACE, DIKI_TAB, DIKI_Q, DIKI_W, DIKI_E, DIKI_R, DIKI_T, DIKI_Y, DIKI_U, DIKI_I, DIKI_O, DIKI_P, DIKI_BRACKET_LEFT, DIKI_BRACKET_RIGHT, DIKI_ENTER, DIKI_CONTROL_L, DIKI_A, DIKI_S, DIKI_D, DIKI_F, DIKI_G, DIKI_H, DIKI_J, DIKI_K, DIKI_L, DIKI_SEMICOLON, DIKI_QUOTE_RIGHT, DIKI_QUOTE_LEFT, DIKI_SHIFT_L, DIKI_BACKSLASH, DIKI_Z, DIKI_X, DIKI_C, DIKI_V, DIKI_B, DIKI_N, DIKI_M, DIKI_COMMA, DIKI_PERIOD, DIKI_SLASH, DIKI_SHIFT_R, DIKI_KP_MULT, DIKI_ALT_L, DIKI_SPACE, DIKI_CAPS_LOCK, DIKI_F1, DIKI_F2, DIKI_F3, DIKI_F4, DIKI_F5, DIKI_F6, DIKI_F7, DIKI_F8, DIKI_F9, DIKI_F10, DIKI_NUM_LOCK, DIKI_SCROLL_LOCK, DIKI_KP_7, DIKI_KP_8, DIKI_KP_9, DIKI_KP_MINUS, DIKI_KP_4, DIKI_KP_5, DIKI_KP_6, DIKI_KP_PLUS, DIKI_KP_1, DIKI_KP_2, DIKI_KP_3, DIKI_KP_0, DIKI_KP_DECIMAL, /*KEY_103RD,*/ DIKI_BACKSLASH, /*KEY_F13,*/ DFB_FUNCTION_KEY(13), /*KEY_102ND*/ DIKI_LESS_SIGN, DIKI_F11, DIKI_F12, DFB_FUNCTION_KEY(14), DFB_FUNCTION_KEY(15), DFB_FUNCTION_KEY(16), DFB_FUNCTION_KEY(17), DFB_FUNCTION_KEY(18), DFB_FUNCTION_KEY(19), DFB_FUNCTION_KEY(20), DIKI_KP_ENTER, DIKI_CONTROL_R, DIKI_KP_DIV, DIKI_PRINT, DIKS_ALTGR, /*KEY_LINEFEED*/ DIKI_UNKNOWN, DIKI_HOME, DIKI_UP, DIKI_PAGE_UP, DIKI_LEFT, DIKI_RIGHT, DIKI_END, DIKI_DOWN, DIKI_PAGE_DOWN, DIKI_INSERT, DIKI_DELETE, /*KEY_MACRO,*/ DIKI_UNKNOWN, DIKS_MUTE, DIKS_VOLUME_DOWN, DIKS_VOLUME_UP, DIKS_POWER, DIKI_KP_EQUAL, /*KEY_KPPLUSMINUS,*/ DIKI_UNKNOWN, DIKS_PAUSE, DFB_FUNCTION_KEY(21), DFB_FUNCTION_KEY(22), DFB_FUNCTION_KEY(23), DFB_FUNCTION_KEY(24), DIKI_KP_SEPARATOR, DIKI_META_L, DIKI_META_R, DIKI_SUPER_L, DIKS_STOP, /*DIKS_AGAIN, DIKS_PROPS, DIKS_UNDO, DIKS_FRONT, DIKS_COPY, DIKS_OPEN, DIKS_PASTE, DIKS_FIND, DIKS_CUT,*/ DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKS_HELP, DIKS_MENU, DIKS_CALCULATOR, DIKS_SETUP, /*KEY_SLEEP, KEY_WAKEUP, KEY_FILE, KEY_SENDFILE, KEY_DELETEFILE, KEY_XFER,*/ DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, /*KEY_PROG1, KEY_PROG2,*/ DIKS_CUSTOM1, DIKS_CUSTOM2, DIKS_INTERNET, /*KEY_MSDOS, KEY_COFFEE, KEY_DIRECTION, KEY_CYCLEWINDOWS,*/ DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKS_MAIL, /*KEY_BOOKMARKS, KEY_COMPUTER, */ DIKI_UNKNOWN, DIKI_UNKNOWN, DIKS_BACK, DIKS_FORWARD, /*KEY_CLOSECD, KEY_EJECTCD, KEY_EJECTCLOSECD,*/ DIKS_EJECT, DIKS_EJECT, DIKS_EJECT, DIKS_NEXT, DIKS_PLAYPAUSE, DIKS_PREVIOUS, DIKS_STOP, DIKS_RECORD, DIKS_REWIND, DIKS_PHONE, /*KEY_ISO,*/ DIKI_UNKNOWN, /*KEY_CONFIG,*/ DIKS_SETUP, /*KEY_HOMEPAGE, KEY_REFRESH,*/ DIKI_UNKNOWN, DIKS_SHUFFLE, DIKS_EXIT, /*KEY_MOVE,*/ DIKI_UNKNOWN, DIKS_EDITOR, /*KEY_SCROLLUP,*/ DIKS_PAGE_UP, /*KEY_SCROLLDOWN,*/ DIKS_PAGE_DOWN, /*KEY_KPLEFTPAREN,*/ DIKI_UNKNOWN, /*KEY_KPRIGHTPAREN,*/ DIKI_UNKNOWN, /* unused codes 181-182: */ DIKI_UNKNOWN, DIKI_UNKNOWN, DFB_FUNCTION_KEY(13), DFB_FUNCTION_KEY(14), DFB_FUNCTION_KEY(15), DFB_FUNCTION_KEY(16), DFB_FUNCTION_KEY(17), DFB_FUNCTION_KEY(18), DFB_FUNCTION_KEY(19), DFB_FUNCTION_KEY(20), DFB_FUNCTION_KEY(21), DFB_FUNCTION_KEY(22), DFB_FUNCTION_KEY(23), DFB_FUNCTION_KEY(24), /* unused codes 195-199: */ DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, DIKI_UNKNOWN, /* KEY_PLAYCD, KEY_PAUSECD */ DIKS_PLAY, DIKS_PAUSE, /*KEY_PROG3, KEY_PROG4,*/ DIKS_CUSTOM3, DIKS_CUSTOM4, DIKI_UNKNOWN, /*KEY_SUSPEND, KEY_CLOSE*/ DIKI_UNKNOWN, DIKI_UNKNOWN, /* KEY_PLAY */ DIKS_PLAY, /* KEY_FASTFORWARD */ DIKS_FASTFORWARD, /* KEY_BASSBOOST */ DIKI_UNKNOWN, /* KEY_PRINT */ DIKS_PRINT, /* KEY_HP */ DIKI_UNKNOWN, /* KEY_CAMERA */ DIKI_UNKNOWN, /* KEY_SOUND */ DIKS_AUDIO, /* KEY_QUESTION */ DIKS_HELP, /* KEY_EMAIL */ DIKS_MAIL, /* KEY_CHAT */ DIKI_UNKNOWN, /* KEY_SEARCH */ DIKI_UNKNOWN, /* KEY_CONNECT */ DIKI_UNKNOWN, /* KEY_FINANCE */ DIKI_UNKNOWN, /* KEY_SPORT */ DIKI_UNKNOWN, /* KEY_SHOP */ DIKI_UNKNOWN, /* KEY_ALTERASE */ DIKI_UNKNOWN, /* KEY_CANCEL */ DIKS_CANCEL, /* KEY_BRIGHTNESSDOWN */ DIKI_UNKNOWN, /* KEY_BRIGHTNESSUP */ DIKI_UNKNOWN, /* KEY_MEDIA */ DIKI_UNKNOWN, }; static const int ext_keycodes [] = { DIKS_OK, DIKS_SELECT, DIKS_GOTO, DIKS_CLEAR, DIKS_POWER2, DIKS_OPTION, DIKS_INFO, DIKS_TIME, DIKS_VENDOR, DIKS_ARCHIVE, DIKS_PROGRAM, DIKS_CHANNEL, DIKS_FAVORITES, DIKS_EPG, DIKS_PVR, DIKS_MHP, DIKS_LANGUAGE, DIKS_TITLE, DIKS_SUBTITLE, DIKS_ANGLE, DIKS_ZOOM, DIKS_MODE, DIKS_KEYBOARD, DIKS_SCREEN, DIKS_PC, DIKS_TV, DIKS_TV2, DIKS_VCR, DIKS_VCR2, DIKS_SAT, DIKS_SAT2, DIKS_CD, DIKS_TAPE, DIKS_RADIO, DIKS_TUNER, DIKS_PLAYER, DIKS_TEXT, DIKS_DVD, DIKS_AUX, DIKS_MP3, DIKS_AUDIO, DIKS_VIDEO, DIKS_DIRECTORY, DIKS_LIST, DIKS_MEMO, DIKS_CALENDAR, DIKS_RED, DIKS_GREEN, DIKS_YELLOW, DIKS_BLUE, DIKS_CHANNEL_UP, DIKS_CHANNEL_DOWN, DIKS_FIRST, DIKS_LAST, DIKS_AB, DIKS_NEXT, DIKS_RESTART, DIKS_SLOW, DIKS_SHUFFLE, DIKS_FASTFORWARD, DIKS_PREVIOUS, DIKS_NEXT, DIKS_DIGITS, DIKS_TEEN, DIKS_TWEN, DIKS_BREAK }; /* * Touchpads related stuff */ enum { TOUCHPAD_FSM_START, TOUCHPAD_FSM_MAIN, TOUCHPAD_FSM_DRAG_START, TOUCHPAD_FSM_DRAG_MAIN, }; struct touchpad_axis { int old, min, max; }; struct touchpad_fsm_state { int fsm_state; struct touchpad_axis x; struct touchpad_axis y; struct timeval timeout; }; static void touchpad_fsm_init( struct touchpad_fsm_state *state ); static int touchpad_fsm( struct touchpad_fsm_state *state, const struct input_event *levt, DFBInputEvent *devt ); static bool timeout_passed( const struct timeval *timeout, const struct timeval *current ); static bool timeout_is_set( const struct timeval *timeout ); static void timeout_sub( struct timeval *timeout, const struct timeval *sub ); /* * Translates a Linux input keycode into a DirectFB keycode. */ static int translate_key( unsigned short code ) { if (code < D_ARRAY_SIZE( basic_keycodes )) return basic_keycodes[code]; if (code >= KEY_OK) if (code - KEY_OK < D_ARRAY_SIZE( ext_keycodes )) return ext_keycodes[code-KEY_OK]; return DIKI_UNKNOWN; } static DFBInputDeviceKeySymbol keyboard_get_symbol( int code, unsigned short value, DFBInputDeviceKeymapSymbolIndex level ) { unsigned char type = KTYP(value); unsigned char index = KVAL(value); int base = (level == DIKSI_BASE); switch (type) { case KT_FN: if (index < 20) return DFB_FUNCTION_KEY( index + 1 ); break; case KT_LETTER: case KT_LATIN: switch (index) { case 0x1c: return DIKS_PRINT; case 0x7f: return DIKS_BACKSPACE; case 0xa4: return 0x20ac; /* euro currency sign */ default: return index; } break; case KT_DEAD: switch (value) { case K_DGRAVE: return DIKS_DEAD_GRAVE; case K_DACUTE: return DIKS_DEAD_ACUTE; case K_DCIRCM: return DIKS_DEAD_CIRCUMFLEX; case K_DTILDE: return DIKS_DEAD_TILDE; case K_DDIERE: return DIKS_DEAD_DIAERESIS; case K_DCEDIL: return DIKS_DEAD_CEDILLA; default: break; } break; case KT_PAD: if (index <= 9 && level != DIKSI_BASE) return DIKS_0 + index; break; case 0xe: /* special IPAQ H3600 case - AH */ switch (index) { case 0x20: return DIKS_CALENDAR; case 0x1a: return DIKS_BACK; case 0x1c: return DIKS_MEMO; case 0x21: return DIKS_POWER; } break; case 0xd: /* another special IPAQ H3600 case - AH */ switch (index) { case 0x2: return DIKS_DIRECTORY; case 0x1: return DIKS_MAIL; /* Q on older iPaqs */ } break; } switch (value) { case K_LEFT: return DIKS_CURSOR_LEFT; case K_RIGHT: return DIKS_CURSOR_RIGHT; case K_UP: return DIKS_CURSOR_UP; case K_DOWN: return DIKS_CURSOR_DOWN; case K_ENTER: return DIKS_ENTER; case K_CTRL: return DIKS_CONTROL; case K_SHIFT: return DIKS_SHIFT; case K_ALT: return DIKS_ALT; case K_ALTGR: return DIKS_ALTGR; case K_INSERT: return DIKS_INSERT; case K_REMOVE: return DIKS_DELETE; case K_FIND: return DIKS_HOME; case K_SELECT: return DIKS_END; case K_PGUP: return DIKS_PAGE_UP; case K_PGDN: return DIKS_PAGE_DOWN; case K_NUM: return DIKS_NUM_LOCK; case K_HOLD: return DIKS_SCROLL_LOCK; case K_PAUSE: return DIKS_PAUSE; case K_BREAK: return DIKS_BREAK; case K_CAPS: return DIKS_CAPS_LOCK; case K_P0: return DIKS_INSERT; case K_P1: return DIKS_END; case K_P2: return DIKS_CURSOR_DOWN; case K_P3: return DIKS_PAGE_DOWN; case K_P4: return DIKS_CURSOR_LEFT; case K_P5: return DIKS_BEGIN; case K_P6: return DIKS_CURSOR_RIGHT; case K_P7: return DIKS_HOME; case K_P8: return DIKS_CURSOR_UP; case K_P9: return DIKS_PAGE_UP; case K_PPLUS: return DIKS_PLUS_SIGN; case K_PMINUS: return DIKS_MINUS_SIGN; case K_PSTAR: return DIKS_ASTERISK; case K_PSLASH: return DIKS_SLASH; case K_PENTER: return DIKS_ENTER; case K_PCOMMA: return base ? DIKS_DELETE : DIKS_COMMA; case K_PDOT: return base ? DIKS_DELETE : DIKS_PERIOD; case K_PPARENL: return DIKS_PARENTHESIS_LEFT; case K_PPARENR: return DIKS_PARENTHESIS_RIGHT; } /* special keys not in the map, hack? */ if (code == 99) return DIKS_PRINT; if (code == 124) /* keypad equal key */ return DIKS_EQUALS_SIGN; if (code == 125) /* left windows key */ return DIKS_META; if (code == 126) /* right windows key */ return DIKS_META; if (code == 127) /* context menu key */ return DIKS_SUPER; return DIKS_NULL; } static DFBInputDeviceKeyIdentifier keyboard_get_identifier( int code, unsigned short value ) { unsigned char type = KTYP(value); unsigned char index = KVAL(value); if (type == KT_PAD) { if (index <= 9) return DIKI_KP_0 + index; switch (value) { case K_PSLASH: return DIKI_KP_DIV; case K_PSTAR: return DIKI_KP_MULT; case K_PMINUS: return DIKI_KP_MINUS; case K_PPLUS: return DIKI_KP_PLUS; case K_PENTER: return DIKI_KP_ENTER; case K_PCOMMA: case K_PDOT: return DIKI_KP_DECIMAL; } } /* Looks like a hack, but don't know a better way yet. */ switch (code) { case 12: return DIKI_MINUS_SIGN; case 13: return DIKI_EQUALS_SIGN; case 26: return DIKI_BRACKET_LEFT; case 27: return DIKI_BRACKET_RIGHT; case 39: return DIKI_SEMICOLON; case 40: return DIKI_QUOTE_RIGHT; case 41: return DIKI_QUOTE_LEFT; case 43: return DIKI_BACKSLASH; case 51: return DIKI_COMMA; case 52: return DIKI_PERIOD; case 53: return DIKI_SLASH; case 54: return DIKI_SHIFT_R; case 97: return DIKI_CONTROL_R; case 100: return DIKI_ALT_R; default: ; } /* special keys not in the map, hack? */ if (code == 124) /* keypad equal key */ return DIKI_KP_EQUAL; if (code == 125) /* left windows key */ return DIKI_META_L; if (code == 126) /* right windows key */ return DIKI_META_R; if (code == 127) /* context menu key */ return DIKI_SUPER_R; return DIKI_UNKNOWN; } static unsigned short keyboard_read_value( const LinuxInputData *data, unsigned char table, unsigned char index ) { struct kbentry entry; entry.kb_table = table; entry.kb_index = index; entry.kb_value = 0; if (ioctl( data->vt_fd, KDGKBENT, &entry )) { D_PERROR("DirectFB/keyboard: KDGKBENT (table: %d, index: %d) " "failed!\n", table, index); return 0; } return entry.kb_value; } /* * Translates key and button events. */ static bool key_event( const struct input_event *levt, DFBInputEvent *devt ) { int code = levt->code; /* map touchscreen and smartpad events to button mouse */ if (code == BTN_TOUCH || code == BTN_TOOL_FINGER) code = BTN_MOUSE; if ((code >= BTN_MOUSE && code < BTN_JOYSTICK) || code == BTN_TOUCH) { /* ignore repeat events for buttons */ if (levt->value == 2) return false; devt->type = levt->value ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; /* don't set DIEF_BUTTONS, it will be set by the input core */ devt->button = DIBI_FIRST + code - BTN_MOUSE; } else { int key = translate_key( code ); if (key == DIKI_UNKNOWN) return false; devt->type = levt->value ? DIET_KEYPRESS : DIET_KEYRELEASE; if (DFB_KEY_TYPE(key) == DIKT_IDENTIFIER) { devt->key_id = key; devt->flags |= DIEF_KEYID; } else { devt->key_symbol = key; devt->flags |= DIEF_KEYSYMBOL; } devt->flags |= DIEF_KEYCODE; devt->key_code = code; } if (levt->value == 2) devt->flags |= DIEF_REPEAT; return true; } /* * Translates relative axis events. */ static bool rel_event( const LinuxInputData *data, const struct input_event *levt, DFBInputEvent *devt ) { switch (levt->code) { case REL_X: devt->axis = DIAI_X; devt->axisrel = levt->value * data->sensitivity / 0x100; break; case REL_Y: devt->axis = DIAI_Y; devt->axisrel = levt->value * data->sensitivity / 0x100; break; case REL_Z: case REL_WHEEL: devt->axis = DIAI_Z; devt->axisrel = -levt->value; break; default: if (levt->code > REL_MAX || levt->code > DIAI_LAST) return false; devt->axis = levt->code; devt->axisrel = levt->value; } devt->type = DIET_AXISMOTION; devt->flags |= DIEF_AXISREL; return true; } /* * Translates absolute axis events. */ static bool abs_event( const struct input_event *levt, DFBInputEvent *devt ) { switch (levt->code) { case ABS_X: devt->axis = DIAI_X; break; case ABS_Y: devt->axis = DIAI_Y; break; case ABS_Z: case ABS_WHEEL: devt->axis = DIAI_Z; break; default: if (levt->code >= ABS_PRESSURE || levt->code > DIAI_LAST) return false; devt->axis = levt->code; } devt->type = DIET_AXISMOTION; devt->flags |= DIEF_AXISABS; devt->axisabs = levt->value; return true; } /* * Translates a Linux input event into a DirectFB input event. */ static bool translate_event( const LinuxInputData *data, const struct input_event *levt, DFBInputEvent *devt ) { devt->flags = DIEF_TIMESTAMP; devt->timestamp = levt->time; switch (levt->type) { case EV_KEY: return key_event( levt, devt ); case EV_REL: return rel_event( data, levt, devt ); case EV_ABS: return abs_event( levt, devt ); default: ; } return false; } static void set_led( const LinuxInputData *data, int led, int state ) { int res; struct input_event levt; levt.type = EV_LED; levt.code = led; levt.value = !!state; res = write( data->fd, &levt, sizeof(levt) ); (void)res; } static void flush_xy( LinuxInputData *data, bool last ) { DFBInputEvent evt = { .type = DIET_UNKNOWN }; if (data->dx) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISREL; evt.axis = DIAI_X; evt.axisrel = data->dx; /* Signal immediately following event. */ if (!last || data->dy) evt.flags |= DIEF_FOLLOW; dfb_input_dispatch( data->device, &evt ); data->dx = 0; } if (data->dy) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISREL; evt.axis = DIAI_Y; evt.axisrel = data->dy; /* Signal immediately following event. */ if (!last) evt.flags |= DIEF_FOLLOW; dfb_input_dispatch( data->device, &evt ); data->dy = 0; } } /* * Input thread reading from device. * Generates events on incoming data. */ static void* linux_input_EventThread( DirectThread *thread, void *driver_data ) { LinuxInputData *data = (LinuxInputData*) driver_data; int readlen, status; unsigned int i; int fdmax; struct input_event levt[64]; fd_set set; struct touchpad_fsm_state fsm_state; D_DEBUG_AT( Debug_LinuxInput, "%s()\n", __FUNCTION__ ); fdmax = MAX( data->fd, data->quitpipe[0] ); /* Query min/max coordinates. */ if (data->touchpad) { Input_AbsInfo absinfo; touchpad_fsm_init( &fsm_state ); ioctl( data->fd, EVIOCGABS(ABS_X), &absinfo ); fsm_state.x.min = absinfo.minimum; fsm_state.x.max = absinfo.maximum; ioctl( data->fd, EVIOCGABS(ABS_Y), &absinfo ); fsm_state.y.min = absinfo.minimum; fsm_state.y.max = absinfo.maximum; } /* Query key states. */ if (data->has_keys) { unsigned long keybit[NBITS(KEY_CNT)]; unsigned long keystate[NBITS(KEY_CNT)]; int i; /* get keyboard bits */ ioctl( data->fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit ); /* get key states */ ioctl( data->fd, EVIOCGKEY(sizeof(keystate)), keystate ); /* for each key, synthetize a press or release event depending on the key state */ for (i=0; i<=KEY_CNT; i++) { if (test_bit( i, keybit )) { const int key = translate_key( i ); if (DFB_KEY_TYPE(key) == DIKT_IDENTIFIER) { DFBInputEvent devt; devt.type = (test_bit( i, keystate ) ? DIET_KEYPRESS : DIET_KEYRELEASE); devt.flags = DIEF_KEYID | DIEF_KEYCODE; devt.key_id = key; devt.key_code = i; dfb_input_dispatch( data->device, &devt ); } } } } while (1) { DFBInputEvent devt = { .type = DIET_UNKNOWN }; FD_ZERO( &set ); FD_SET( data->fd, &set ); FD_SET( data->quitpipe[0], &set ); if (data->touchpad && timeout_is_set( &fsm_state.timeout )) { struct timeval time; gettimeofday( &time, NULL ); if (!timeout_passed( &fsm_state.timeout, &time )) { struct timeval timeout = fsm_state.timeout; timeout_sub( &timeout, &time ); status = select( fdmax + 1, &set, NULL, NULL, &timeout ); } else { status = 0; } } else { status = select( fdmax + 1, &set, NULL, NULL, NULL ); } if (status < 0 && errno != EINTR) break; if (status > 0 && FD_ISSET( data->quitpipe[0], &set )) break; direct_thread_testcancel( thread ); if (status < 0) continue; /* timeout? */ if (status == 0) { if (data->touchpad && touchpad_fsm( &fsm_state, NULL, &devt ) > 0) dfb_input_dispatch( data->device, &devt ); continue; } readlen = read( data->fd, levt, sizeof(levt) ); if (readlen < 0 && errno != EINTR) break; direct_thread_testcancel( thread ); if (readlen <= 0) continue; for (i=0; itouchpad) { status = touchpad_fsm( &fsm_state, &levt[i], &temp ); if (status < 0) { /* Not handled. Try the direct approach. */ if (!translate_event( data, &levt[i], &temp )) continue; } else if (status == 0) { /* Handled but no further processing is necessary. */ continue; } } else { if (!translate_event( data, &levt[i], &temp )) continue; } /* Flush previous event with DIEF_FOLLOW? */ if (devt.type != DIET_UNKNOWN) { flush_xy( data, false ); /* Signal immediately following event. */ devt.flags |= DIEF_FOLLOW; dfb_input_dispatch( data->device, &devt ); if (data->has_leds && (devt.locks != data->locks)) { set_led( data, LED_SCROLLL, devt.locks & DILS_SCROLL ); set_led( data, LED_NUML, devt.locks & DILS_NUM ); set_led( data, LED_CAPSL, devt.locks & DILS_CAPS ); data->locks = devt.locks; } devt.type = DIET_UNKNOWN; devt.flags = DIEF_NONE; } devt = temp; if (D_FLAGS_IS_SET( devt.flags, DIEF_AXISREL ) && devt.type == DIET_AXISMOTION && dfb_config->mouse_motion_compression) { switch (devt.axis) { case DIAI_X: data->dx += devt.axisrel; continue; case DIAI_Y: data->dy += devt.axisrel; continue; default: break; } } /* Event is dispatched in next round of loop. */ } /* Flush last event without DIEF_FOLLOW. */ if (devt.type != DIET_UNKNOWN) { flush_xy( data, false ); dfb_input_dispatch( data->device, &devt ); if (data->has_leds && (devt.locks != data->locks)) { set_led( data, LED_SCROLLL, devt.locks & DILS_SCROLL ); set_led( data, LED_NUML, devt.locks & DILS_NUM ); set_led( data, LED_CAPSL, devt.locks & DILS_CAPS ); data->locks = devt.locks; } } else flush_xy( data, true ); } if (status <= 0) D_PERROR ("linux_input thread died\n"); return NULL; } /* * Fill device information. * Queries the input device and tries to classify it. */ static void get_device_info( int fd, InputDeviceInfo *info, bool *touchpad ) { unsigned int num_keys = 0; unsigned int num_ext_keys = 0; unsigned int num_buttons = 0; unsigned int num_rels = 0; unsigned int num_abs = 0; unsigned long evbit[NBITS(EV_CNT)]; unsigned long keybit[NBITS(KEY_CNT)]; unsigned long relbit[NBITS(REL_CNT)]; unsigned long absbit[NBITS(ABS_CNT)]; struct input_id devinfo; D_DEBUG_AT( Debug_LinuxInput, "%s()\n", __FUNCTION__ ); /* get device name */ ioctl( fd, EVIOCGNAME(DFB_INPUT_DEVICE_DESC_NAME_LENGTH - 1), info->desc.name ); D_DEBUG_AT( Debug_LinuxInput, " -> name '%s'\n", info->desc.name ); /* set device vendor */ snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Linux" ); /* get event type bits */ ioctl( fd, EVIOCGBIT(0, sizeof(evbit)), evbit ); if (test_bit( EV_KEY, evbit )) { int i; /* get keyboard bits */ ioctl( fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit ); /* count typical keyboard keys only */ for (i=KEY_Q; i<=KEY_M; i++) if (test_bit( i, keybit )) num_keys++; /* this might be a keyboard with just cursor keys, typically found on front panels - handle as remote control and make sure not to treat normal (full key) keyboards likewise */ if (!num_keys) for (i=KEY_HOME; i<=KEY_PAGEDOWN; i++) if (test_bit( i, keybit )) num_ext_keys++; for (i=KEY_OK; idesc.caps |= DICAPS_KEYS; #else info->desc.caps |= DIDCAPS_KEYS; #endif } if (test_bit( EV_REL, evbit )) { int i; /* get bits for relative axes */ ioctl( fd, EVIOCGBIT(EV_REL, sizeof(relbit)), relbit ); for (i=0; i= 2 && num_buttons) || (num_abs == 2 && (num_buttons == 1)))) info->desc.type |= DIDTF_MOUSE; else if (num_abs && num_buttons) /* Or a Joystick? */ info->desc.type |= DIDTF_JOYSTICK; /* A Keyboard, do we have at least some letters? */ if (num_keys > 20) { info->desc.type |= DIDTF_KEYBOARD; info->desc.min_keycode = 0; info->desc.max_keycode = 127; } /* A Remote Control? */ if (num_ext_keys) { info->desc.type |= DIDTF_REMOTE; } /* Buttons */ if (num_buttons) { #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps |= DICAPS_BUTTONS; #else info->desc.caps |= DIDCAPS_BUTTONS; #endif info->desc.max_button = DIBI_FIRST + num_buttons - 1; } /* Axes */ if (num_rels || num_abs) { #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps |= DICAPS_AXES; #else info->desc.caps |= DIDCAPS_AXES; #endif info->desc.max_axis = DIAI_FIRST + MAX(num_rels, num_abs) - 1; } /* Decide which primary input device to be. */ if (info->desc.type & DIDTF_KEYBOARD) info->prefered_id = DIDID_KEYBOARD; else if (info->desc.type & DIDTF_REMOTE) info->prefered_id = DIDID_REMOTE; else if (info->desc.type & DIDTF_JOYSTICK) info->prefered_id = DIDID_JOYSTICK; else if (info->desc.type & DIDTF_MOUSE) info->prefered_id = DIDID_MOUSE; else info->prefered_id = DIDID_ANY; /* Get VID and PID information */ ioctl( fd, EVIOCGID, &devinfo ); info->desc.vendor_id = devinfo.vendor; info->desc.product_id = devinfo.product; D_DEBUG_AT( Debug_LinuxInput, " -> ids %d/%d\n", info->desc.vendor_id, info->desc.product_id ); } static bool check_device( const char *device ) { int fd; D_DEBUG_AT( Debug_LinuxInput, "%s( '%s' )\n", __FUNCTION__, device ); /* Check if we are able to open the device */ fd = open( device, O_RDWR ); if (fd < 0) { D_DEBUG_AT( Debug_LinuxInput, " -> open failed!\n" ); return false; } else { InputDeviceInfo info; bool touchpad; /* try to grab the device */ if (dfb_config->linux_input_grab) { /* 2.4 kernels don't have EVIOCGRAB so ignore EINVAL */ if (ioctl( fd, EVIOCGRAB, 1 ) && errno != EINVAL) { close( fd ); return false; } } memset( &info, 0, sizeof(InputDeviceInfo) ); get_device_info( fd, &info, &touchpad ); if (dfb_config->linux_input_grab) ioctl( fd, EVIOCGRAB, 0 ); close( fd ); if (!info.desc.caps) { D_DEBUG_AT( Debug_LinuxInput, " -> no caps!\n" ); return false; } if (!dfb_config->linux_input_ir_only || (info.desc.type & DIDTF_REMOTE)) return true; } D_DEBUG_AT( Debug_LinuxInput, " -> returning false!\n" ); return false; } /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available( void ) { int i; char *tsdev; if (!(dfb_config->linux_input_force || (dfb_system_type() == CORE_FBDEV) || (dfb_system_type() == CORE_MESA) || (dfb_system_type() == CORE_DRMKMS) )) return 0; if (dfb_system_type() == CORE_FBDEV && !dfb_config->linux_input_force) { FBDev *dfb_fbdev = (FBDev*) dfb_system_data(); D_ASSERT( dfb_fbdev ); // Only allow USB keyboard and mouse support if the systems driver has // the Virtual Terminal file ("/dev/tty0") open and available for use. // FIXME: Additional logic needed for system drivers not similar to fbdev? if (!dfb_fbdev->vt || dfb_fbdev->vt->fd < 0) return 0; } /* Use the devices specified in the configuration. */ if (fusion_vector_has_elements( &dfb_config->linux_input_devices )) { const char *device; fusion_vector_foreach (device, i, dfb_config->linux_input_devices) { if (num_devices >= MAX_LINUX_INPUT_DEVICES) break; /* Update the device_names and device_nums array entries too. */ if (check_device( device )){ D_ASSERT( device_names[num_devices] == NULL ); device_names[num_devices] = D_STRDUP( device ); device_nums[num_devices] = i; num_devices++; } } return num_devices; } /* Check for tslib device being used. */ tsdev = getenv( "TSLIB_TSDEVICE" ); /* No devices specified. Try to guess some. */ for (i=0; iname, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "Linux Input Driver" ); snprintf ( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 0; info->version.minor = 1; } /* * Enter the driver suspended state by setting the driver_suspended Boolean * to prevent hotplug events from being handled. */ static DFBResult driver_suspend( void ) { if (pthread_mutex_lock(&driver_suspended_lock)) return DFB_FAILURE; driver_suspended = true; pthread_mutex_unlock(&driver_suspended_lock); return DFB_OK; } /* * Leave the driver suspended state by clearing the driver_suspended Boolean * which will allow hotplug events to be handled again. */ static DFBResult driver_resume( void ) { if (pthread_mutex_lock(&driver_suspended_lock)) return DFB_FAILURE; driver_suspended = false; pthread_mutex_unlock(&driver_suspended_lock); return DFB_OK; } /* * Register /dev/input/eventX device node into the driver. Called when a new * device node is created. The device node indicated by event_num should never * be registered before registering it into the driver or should be * unregistered by unregister_device_node() beforehand. */ static DFBResult register_device_node( int event_num, int *index) { D_DEBUG_AT( Debug_LinuxInput, "%s()\n", __FUNCTION__ ); D_ASSERT( index != NULL ); int i; char buf[32]; for (i=0; i= MAX_LINUX_INPUT_DEVICES) { return DFB_UNSUPPORTED; } if (index != ((LinuxInputData *)data)->index) { return DFB_UNSUPPORTED; } return DFB_OK; } /* * Indicate that the hotplug detection capability is supported by this input * provider if the Virtual Terminal was opened for use by the systems driver. * * Note: The systems driver will open the Virtual Terminal file * ("/dev/tty0") based on the directfbrc commands "vt" and "no-vt". */ static InputDriverCapability get_capability( void ) { D_DEBUG_AT( Debug_LinuxInput, "%s()\n", __FUNCTION__ ); InputDriverCapability capabilities = IDC_NONE; if (!(dfb_config->linux_input_force || (dfb_system_type() == CORE_FBDEV) || (dfb_system_type() == CORE_MESA) )) goto exit; if (dfb_system_type() == CORE_FBDEV) { FBDev *dfb_fbdev = (FBDev*) dfb_system_data(); D_ASSERT( dfb_fbdev ); // Only allow USB keyboard and mouse support if the systems driver has // the Virtual Terminal file ("/dev/tty0") open and available for use. // FIXME: Additional logic needed for system drivers not similar to fbdev? if (!dfb_fbdev->vt || dfb_fbdev->vt->fd < 0) { D_DEBUG_AT( Debug_LinuxInput, " -> no VT\n" ); goto exit; } } D_DEBUG_AT( Debug_LinuxInput, " -> returning HOTPLUG\n" ); capabilities |= IDC_HOTPLUG; exit: return capabilities; } /* * Detect udev hotplug events from socket /org/kernel/udev/monitor and act * according to hotplug events received. */ static void * udev_hotplug_EventThread(DirectThread *thread, void * hotplug_data) { D_DEBUG_AT( Debug_LinuxInput, "%s()\n", __FUNCTION__ ); CoreDFB *core; void *driver; HotplugThreadData *data = (HotplugThreadData *)hotplug_data; int rt; struct sockaddr_un sock_addr; int fdmax; D_ASSERT( data != NULL ); D_ASSERT( data->core != NULL ); D_ASSERT( data->driver != NULL ); core = data->core; driver = data->driver; /* Free no needed data packet */ D_FREE(data); /* Open and bind the socket /org/kernel/udev/monitor */ socket_fd = socket(AF_UNIX, SOCK_DGRAM, 0); if (socket_fd == -1) { D_PERROR( "DirectFB/linux_input: socket() failed: %s\n", strerror(errno) ); goto errorExit; } fdmax = MAX( socket_fd, hotplug_quitpipe[0] ); memset(&sock_addr, 0, sizeof(sock_addr)); sock_addr.sun_family = AF_UNIX; strncpy(&sock_addr.sun_path[1], "/org/kernel/udev/monitor", sizeof(sock_addr.sun_path) - 1); rt = bind(socket_fd, &sock_addr, sizeof(sock_addr.sun_family)+1+strlen(&sock_addr.sun_path[1])); if (rt < 0) { D_PERROR( "DirectFB/linux_input: bind() failed: %s\n", strerror(errno) ); goto errorExit; } while(1) { char udev_event[MAX_LENGTH_OF_EVENT_STRING]; char *pos; char *event_cont; //udev event content int device_num, number_file, recv_len, index; DFBResult ret; fd_set rset; /* get udev event */ FD_ZERO(&rset); FD_SET(socket_fd, &rset); FD_SET(hotplug_quitpipe[0], &rset); number_file = select(fdmax+1, &rset, NULL, NULL, NULL); if (number_file < 0 && errno != EINTR) break; if (FD_ISSET( hotplug_quitpipe[0], &rset )) break; /* check cancel thread */ direct_thread_testcancel( thread ); if (FD_ISSET(socket_fd, &rset)) { recv_len = recv(socket_fd, udev_event, sizeof(udev_event), 0); if (recv_len <= 0) { D_DEBUG_AT( Debug_LinuxInput, "error receiving uevent message: %s\n", strerror(errno) ); continue; } /* check cancel thread */ direct_thread_testcancel( thread ); } /* analysize udev event */ pos = strchr(udev_event, '@'); if (pos == NULL) continue; /* replace '@' with '\0' to separate event type and event content */ *pos = '\0'; event_cont = pos + 1; pos = strstr(event_cont, "/event"); if (pos == NULL) continue; /* get event device number */ device_num = atoi(pos + 6); /* Attempt to lock the driver suspended mutex. */ pthread_mutex_lock(&driver_suspended_lock); if (driver_suspended) { /* Release the lock and quit handling hotplug events. */ D_DEBUG_AT( Debug_LinuxInput, "Driver is suspended\n" ); pthread_mutex_unlock(&driver_suspended_lock); continue; } /* Handle hotplug events since the driver is not suspended. */ if (!strcmp(udev_event, "add")) { D_DEBUG_AT( Debug_LinuxInput, "Device node /dev/input/event%d is created by udev\n", device_num); ret = register_device_node( device_num, &index); if ( DFB_OK == ret) { /* Handle the event that the input device node is created */ ret = dfb_input_create_device(index, core, driver); /* If cannot create the device within Linux Input * provider, inform the user. */ if ( DFB_OK != ret) { D_DEBUG_AT( Debug_LinuxInput, "Linux/Input: Failed to create the " "device for /dev/input/event%d\n", device_num ); } } } else if (!strcmp(udev_event, "remove")) { D_DEBUG_AT( Debug_LinuxInput, "Device node /dev/input/event%d is removed by udev\n", device_num ); ret = unregister_device_node( device_num, &index ); if ( DFB_OK == ret) { /* Handle the event that the input device node is removed */ ret = dfb_input_remove_device( index, driver ); /* If unable to remove the device within the Linux Input * provider, just print the info. */ if ( DFB_OK != ret) { D_DEBUG_AT( Debug_LinuxInput, "Linux/Input: Failed to remove the " "device for /dev/input/event%d\n", device_num ); } } } /* Hotplug event handling is complete so release the lock. */ pthread_mutex_unlock(&driver_suspended_lock); } D_DEBUG_AT( Debug_LinuxInput, "Finished hotplug detection thread within Linux Input " "provider.\n" ); return NULL; errorExit: D_INFO( "Linux/Input: Fail to open udev socket, disable detecting " "hotplug with Linux Input provider\n" ); if (socket_fd != -1) { close(socket_fd); } return NULL; } /* * Stop hotplug detection thread. */ static DFBResult stop_hotplug( void ) { int res; D_DEBUG_AT( Debug_LinuxInput, "%s()\n", __FUNCTION__ ); /* Exit immediately if the hotplug thread is not created successfully in * launch_hotplug(). */ if (!hotplug_thread) goto exit; /* Write to the hotplug quit pipe to cause the thread to terminate */ res = write( hotplug_quitpipe[1], " ", 1 ); (void)res; /* Shutdown the hotplug detection thread. */ direct_thread_join(hotplug_thread); direct_thread_destroy(hotplug_thread); close( hotplug_quitpipe[0] ); close( hotplug_quitpipe[1] ); hotplug_thread = NULL; /* Destroy the suspended mutex. */ pthread_mutex_destroy(&driver_suspended_lock); /* shutdown the connection of the socket */ if (socket_fd > 0) { int rt = shutdown(socket_fd, SHUT_RDWR); if (rt < 0) { D_PERROR( "DirectFB/linux_input: Socket shutdown failed: %s\n", strerror(errno) ); return DFB_FAILURE; } } if (socket_fd > 0) { close(socket_fd); socket_fd = 0; } exit: D_DEBUG_AT( Debug_LinuxInput, "%s() closed\n", __FUNCTION__ ); return DFB_OK; } /* * Launch hotplug detection thread. */ static DFBResult launch_hotplug(CoreDFB *core, void *input_driver) { int ret; D_DEBUG_AT( Debug_LinuxInput, "%s()\n", __FUNCTION__ ); HotplugThreadData *data; DFBResult result; D_ASSERT( core != NULL ); D_ASSERT( input_driver != NULL ); D_ASSERT( hotplug_thread == NULL ); data = D_CALLOC(1, sizeof(HotplugThreadData)); if (!data) { D_OOM(); result = DFB_UNSUPPORTED; goto errorExit; } data->core = core; data->driver = input_driver; /* open a pipe to awake the reader thread when we want to quit */ ret = pipe( hotplug_quitpipe ); if (ret < 0) { D_PERROR( "DirectFB/linux_input: could not open quitpipe for hotplug" ); D_FREE( data ); result = DFB_INIT; goto errorExit; } socket_fd = 0; /* Initialize a mutex used to communicate to the hotplug handling thread * when the driver is suspended. */ pthread_mutex_init(&driver_suspended_lock, NULL); /* Create a thread to handle hotplug events. */ hotplug_thread = direct_thread_create( DTT_INPUT, udev_hotplug_EventThread, data, "Hotplug with Linux Input" ); if (!hotplug_thread) { pthread_mutex_destroy(&driver_suspended_lock); /* The hotplug thread normally deallocates the HotplugThreadData * memory, however since it could not be created it must be done * here. */ D_FREE( data ); result = DFB_UNSUPPORTED; } else result = DFB_OK; errorExit: return result; } /* * Open the device, fill out information about it, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd, ret; bool touchpad; unsigned long ledbit[NBITS(LED_CNT)]; LinuxInputData *data; D_DEBUG_AT( Debug_LinuxInput, "%s()\n", __FUNCTION__ ); /* open device */ fd = open( device_names[number], O_RDWR ); if (fd < 0) { D_DEBUG_AT( Debug_LinuxInput, "DirectFB/linux_input: could not open device %s\n", device_names[number] ); return DFB_INIT; } /* grab device */ if (dfb_config->linux_input_grab) { ret = ioctl( fd, EVIOCGRAB, 1 ); /* 2.4 kernels don't have EVIOCGRAB so ignore EINVAL */ if (ret && errno != EINVAL) { D_PERROR( "DirectFB/linux_input: could not grab device" ); close( fd ); return DFB_INIT; } } /* fill device info structure */ get_device_info( fd, info, &touchpad ); /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(LinuxInputData) ); if (!data) { if (dfb_config->linux_input_grab) ioctl( fd, EVIOCGRAB, 0 ); close( fd ); return D_OOM(); } data->fd = fd; data->device = device; #ifndef DIRECTFB_DISABLE_DEPRECATED data->has_keys = (info->desc.caps & DICAPS_KEYS) != 0; #else data->has_keys = (info->desc.caps & DIDCAPS_KEYS) != 0; #endif data->touchpad = touchpad; data->vt_fd = -1; data->sensitivity = 0x100; /* Track associated entry in device_nums and device_names array. */ data->index = number; if (info->desc.min_keycode >= 0 && info->desc.max_keycode >= info->desc.min_keycode) { if (dfb_system_type() == CORE_FBDEV) { FBDev *dfb_fbdev = dfb_system_data(); if (dfb_fbdev->vt) data->vt_fd = dup( dfb_fbdev->vt->fd ); } if (data->vt_fd < 0) data->vt_fd = open( "/dev/tty0", O_RDWR | O_NOCTTY ); if (data->vt_fd < 0) D_WARN( "no keymap support (requires /dev/tty0 - CONFIG_VT)" ); } /* check if the device has LEDs */ ret = ioctl( fd, EVIOCGBIT(EV_LED, sizeof(ledbit)), ledbit ); if (ret < 0) D_PERROR( "DirectFB/linux_input: could not get LED bits" ); else data->has_leds = test_bit( LED_SCROLLL, ledbit ) || test_bit( LED_NUML, ledbit ) || test_bit( LED_CAPSL, ledbit ); if (data->has_leds) { /* get LED state */ ret = ioctl( fd, EVIOCGLED(sizeof(data->led_state)), data->led_state ); if (ret < 0) { D_PERROR( "DirectFB/linux_input: could not get LED state" ); goto driver_open_device_error; } /* turn off LEDs */ set_led( data, LED_SCROLLL, 0 ); set_led( data, LED_NUML, 0 ); set_led( data, LED_CAPSL, 0 ); } /* open a pipe to awake the reader thread when we want to quit */ ret = pipe( data->quitpipe ); if (ret < 0) { D_PERROR( "DirectFB/linux_input: could not open quitpipe" ); goto driver_open_device_error; } /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, linux_input_EventThread, data, "Linux Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; driver_open_device_error: if (dfb_config->linux_input_grab) ioctl( fd, EVIOCGRAB, 0 ); if (data->vt_fd >= 0) close( data->vt_fd ); close( fd ); D_FREE( data ); return DFB_INIT; } /* * Obtain information about an axis (only absolute axis so far). */ static DFBResult driver_get_axis_info( CoreInputDevice *device, void *driver_data, DFBInputDeviceAxisIdentifier axis, DFBInputDeviceAxisInfo *ret_info ) { LinuxInputData *data = (LinuxInputData*) driver_data; if (data->touchpad && !dfb_config->linux_input_touch_abs) return DFB_OK; if (axis <= ABS_PRESSURE && axis < DIAI_LAST) { unsigned long absbit[NBITS(ABS_CNT)]; /* check if we have an absolute axes */ ioctl( data->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit ); if (test_bit (axis, absbit)) { Input_AbsInfo absinfo; if (ioctl( data->fd, EVIOCGABS(axis), &absinfo ) == 0 && (absinfo.minimum || absinfo.maximum)) { ret_info->flags |= DIAIF_ABS_MIN | DIAIF_ABS_MAX; ret_info->abs_min = absinfo.minimum; ret_info->abs_max = absinfo.maximum; } } } return DFB_OK; } static DFBResult driver_set_configuration( CoreInputDevice *device, void *driver_data, const DFBInputDeviceConfig *config ) { LinuxInputData *data = (LinuxInputData*) driver_data; if (config->flags & DIDCONF_SENSITIVITY) data->sensitivity = config->sensitivity; return DFB_OK; } /* * Fetch one entry from the kernel keymap. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { LinuxInputData *data = (LinuxInputData*) driver_data; int code = entry->code; unsigned short value; DFBInputDeviceKeyIdentifier identifier; if (data->vt_fd < 0) return DFB_UNSUPPORTED; /* fetch the base level */ value = keyboard_read_value( driver_data, K_NORMTAB, code ); /* get the identifier for basic mapping */ identifier = keyboard_get_identifier( code, value ); /* is CapsLock effective? */ if (KTYP(value) == KT_LETTER) entry->locks |= DILS_CAPS; /* is NumLock effective? */ if (identifier >= DIKI_KP_DECIMAL && identifier <= DIKI_KP_9) entry->locks |= DILS_NUM; /* write identifier to entry */ entry->identifier = identifier; /* write base level symbol to entry */ entry->symbols[DIKSI_BASE] = keyboard_get_symbol( code, value, DIKSI_BASE ); /* fetch the shifted base level */ value = keyboard_read_value( driver_data, K_SHIFTTAB, entry->code ); /* write shifted base level symbol to entry */ entry->symbols[DIKSI_BASE_SHIFT] = keyboard_get_symbol( code, value, DIKSI_BASE_SHIFT ); /* fetch the alternative level */ value = keyboard_read_value( driver_data, K_ALTTAB, entry->code ); /* write alternative level symbol to entry */ entry->symbols[DIKSI_ALT] = keyboard_get_symbol( code, value, DIKSI_ALT ); /* fetch the shifted alternative level */ value = keyboard_read_value( driver_data, K_ALTSHIFTTAB, entry->code ); /* write shifted alternative level symbol to entry */ entry->symbols[DIKSI_ALT_SHIFT] = keyboard_get_symbol( code, value, DIKSI_ALT_SHIFT ); return DFB_OK; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { int res; LinuxInputData *data = (LinuxInputData*) driver_data; D_DEBUG_AT( Debug_LinuxInput, "%s()\n", __FUNCTION__ ); /* stop input thread */ res = write( data->quitpipe[1], " ", 1 ); (void)res; direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); close( data->quitpipe[0] ); close( data->quitpipe[1] ); if (data->has_leds) { /* restore LED state */ set_led( data, LED_SCROLLL, test_bit( LED_SCROLLL, data->led_state ) ); set_led( data, LED_NUML, test_bit( LED_NUML, data->led_state ) ); set_led( data, LED_CAPSL, test_bit( LED_CAPSL, data->led_state ) ); } /* release device */ if (dfb_config->linux_input_grab) ioctl( data->fd, EVIOCGRAB, 0 ); if (data->vt_fd >= 0) close( data->vt_fd ); /* close file */ close( data->fd ); /* free private data */ D_FREE( data ); D_DEBUG_AT( Debug_LinuxInput, "%s() closed\n", __FUNCTION__ ); } static bool timeout_is_set( const struct timeval *timeout ) { return timeout->tv_sec || timeout->tv_usec; } static bool timeout_passed( const struct timeval *timeout, const struct timeval *current ) { return !timeout_is_set( timeout ) || current->tv_sec > timeout->tv_sec || (current->tv_sec == timeout->tv_sec && current->tv_usec > timeout->tv_usec); } static void timeout_clear( struct timeval *timeout ) { timeout->tv_sec = 0; timeout->tv_usec = 0; } static void timeout_add( struct timeval *timeout, const struct timeval *add ) { timeout->tv_sec += add->tv_sec; timeout->tv_usec += add->tv_usec; while (timeout->tv_usec >= 1000000) { timeout->tv_sec++; timeout->tv_usec -= 1000000; } } static void timeout_sub( struct timeval *timeout, const struct timeval *sub ) { timeout->tv_sec -= sub->tv_sec; timeout->tv_usec -= sub->tv_usec; while (timeout->tv_usec < 0) { timeout->tv_sec--; timeout->tv_usec += 1000000; } } static void touchpad_fsm_init( struct touchpad_fsm_state *state ) { state->x.old = -1; state->y.old = -1; state->fsm_state = TOUCHPAD_FSM_START; timeout_clear( &state->timeout ); } static int touchpad_normalize( const struct touchpad_axis *axis, int value ) { return ((value - axis->min) << 9) / (axis->max - axis->min); } static int touchpad_translate( struct touchpad_fsm_state *state, const struct input_event *levt, DFBInputEvent *devt ) { struct touchpad_axis *axis = NULL; int abs, rel; devt->flags = DIEF_TIMESTAMP | (dfb_config->linux_input_touch_abs ? DIEF_AXISABS : DIEF_AXISREL); devt->timestamp = levt->time; devt->type = DIET_AXISMOTION; switch (levt->code) { case ABS_X: axis = &state->x; devt->axis = DIAI_X; break; case ABS_Y: axis = &state->y; devt->axis = DIAI_Y; break; default: return 0; } abs = touchpad_normalize( axis, levt->value ); if (axis->old == -1) axis->old = abs; rel = abs - axis->old; #define ACCEL_THRESHOLD 25 #define ACCEL_NUM 3 #define ACCEL_DENOM 1 if (rel > ACCEL_THRESHOLD) rel += (rel - ACCEL_THRESHOLD) * ACCEL_NUM / ACCEL_DENOM; else if (rel < -ACCEL_THRESHOLD) rel += (rel + ACCEL_THRESHOLD) * ACCEL_NUM / ACCEL_DENOM; axis->old = abs; devt->axisrel = rel; devt->axisabs = levt->value; return 1; } static bool touchpad_finger_landing( const struct input_event *levt ) { return levt->type == EV_KEY && levt->code == BTN_TOUCH && levt->value == 1; } static bool touchpad_finger_leaving( const struct input_event *levt ) { return levt->type == EV_KEY && levt->code == BTN_TOUCH && levt->value == 0; } static bool touchpad_finger_moving( const struct input_event *levt ) { return levt->type == EV_ABS && (levt->code == ABS_X || levt->code == ABS_Y); } /* * This FSM takes into accout finger landing on touchpad and leaving and * translates absolute DFBInputEvent into a relative one */ static int touchpad_fsm( struct touchpad_fsm_state *state, const struct input_event *levt, DFBInputEvent *devt ) { struct timeval timeout = { 0, 125000 }; /* select() timeout? */ if (!levt) { /* Check if button release is due. */ if (state->fsm_state == TOUCHPAD_FSM_DRAG_START) { devt->flags = DIEF_TIMESTAMP; devt->timestamp = state->timeout; /* timeout of current time? */ devt->type = DIET_BUTTONRELEASE; devt->button = DIBI_FIRST; touchpad_fsm_init( state ); return 1; } /* Already passed, clear it so select() won't return until there is something to do. */ timeout_clear( &state->timeout ); return 0; } /* More or less ignore these events for now */ if ((levt->type == EV_SYN && levt->code == SYN_REPORT) || (levt->type == EV_ABS && levt->code == ABS_PRESSURE) || (levt->type == EV_ABS && levt->code == ABS_TOOL_WIDTH) || (levt->type == EV_KEY && levt->code == BTN_TOOL_FINGER) || (levt->type == EV_KEY && levt->code == BTN_TOOL_DOUBLETAP) || (levt->type == EV_KEY && levt->code == BTN_TOOL_TRIPLETAP)) { /* Check if button release is due. */ if (state->fsm_state == TOUCHPAD_FSM_DRAG_START && timeout_passed( &state->timeout, &levt->time )) { devt->flags = DIEF_TIMESTAMP; devt->timestamp = state->timeout; /* timeout of levt->time? */ devt->type = DIET_BUTTONRELEASE; devt->button = DIBI_FIRST; touchpad_fsm_init( state ); return 1; } return 0; } /* Use translate_event() for other events. */ if (!(levt->type == EV_KEY && levt->code == BTN_TOUCH) && !(levt->type == EV_ABS && (levt->code == ABS_X || levt->code == ABS_Y))) return -1; switch (state->fsm_state) { case TOUCHPAD_FSM_START: if (touchpad_finger_landing( levt )) { state->fsm_state = TOUCHPAD_FSM_MAIN; state->timeout = levt->time; timeout_add( &state->timeout, &timeout ); } return 0; case TOUCHPAD_FSM_MAIN: if (touchpad_finger_moving( levt )) { if (1){//timeout_passed( &state->timeout, &levt->time )) { //timeout_clear( &state->timeout ); return touchpad_translate( state, levt, devt ); } } else if (touchpad_finger_leaving( levt )) { if (!timeout_passed( &state->timeout, &levt->time )) { devt->flags = DIEF_TIMESTAMP; devt->timestamp = levt->time; devt->type = DIET_BUTTONPRESS; devt->button = DIBI_FIRST; touchpad_fsm_init( state ); state->fsm_state = TOUCHPAD_FSM_DRAG_START; state->timeout = levt->time; timeout_add( &state->timeout, &timeout ); return 1; } else { touchpad_fsm_init( state ); } } return 0; case TOUCHPAD_FSM_DRAG_START: if (timeout_passed( &state->timeout, &levt->time )){ devt->flags = DIEF_TIMESTAMP; devt->timestamp = state->timeout; /* timeout of levt->time? */ devt->type = DIET_BUTTONRELEASE; devt->button = DIBI_FIRST; touchpad_fsm_init(state); return 1; } else { if (touchpad_finger_landing( levt )) { state->fsm_state = TOUCHPAD_FSM_DRAG_MAIN; state->timeout = levt->time; timeout_add( &state->timeout, &timeout ); } } return 0; case TOUCHPAD_FSM_DRAG_MAIN: if (touchpad_finger_moving( levt )) { if (1){//timeout_passed( &state->timeout, &levt->time )) { //timeout_clear( &state->timeout ); return touchpad_translate( state, levt, devt ); } } else if (touchpad_finger_leaving( levt )) { devt->flags = DIEF_TIMESTAMP; devt->timestamp = levt->time; devt->type = DIET_BUTTONRELEASE; devt->button = DIBI_FIRST; touchpad_fsm_init( state ); return 1; } return 0; default: return 0; } return 0; } DirectFB-1.7.7/inputdrivers/linux_input/Makefile.am0000644000175000017500000000131512171403127017237 00000000000000## Makefile.am for DirectFB/inputdrivers/linux_input INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/systems linux_input_LTLIBRARIES = libdirectfb_linux_input.la if BUILD_STATIC linux_input_DATA = $(linux_input_LTLIBRARIES:.la=.o) endif linux_inputdir = $(MODULEDIR)/inputdrivers libdirectfb_linux_input_la_SOURCES = \ input_fake.h \ linux_input.c libdirectfb_linux_input_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_linux_input_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/linux_input/Makefile.in0000644000175000017500000006532112466665312017274 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/linux_input ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(linux_inputdir)" \ "$(DESTDIR)$(linux_inputdir)" LTLIBRARIES = $(linux_input_LTLIBRARIES) libdirectfb_linux_input_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_linux_input_la_OBJECTS = linux_input.lo libdirectfb_linux_input_la_OBJECTS = \ $(am_libdirectfb_linux_input_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_linux_input_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_linux_input_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_linux_input_la_SOURCES) DIST_SOURCES = $(libdirectfb_linux_input_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(linux_input_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/systems linux_input_LTLIBRARIES = libdirectfb_linux_input.la @BUILD_STATIC_TRUE@linux_input_DATA = $(linux_input_LTLIBRARIES:.la=.o) linux_inputdir = $(MODULEDIR)/inputdrivers libdirectfb_linux_input_la_SOURCES = \ input_fake.h \ linux_input.c libdirectfb_linux_input_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_linux_input_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/linux_input/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/linux_input/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-linux_inputLTLIBRARIES: $(linux_input_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(linux_input_LTLIBRARIES)'; test -n "$(linux_inputdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(linux_inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(linux_inputdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(linux_inputdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(linux_inputdir)"; \ } uninstall-linux_inputLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(linux_input_LTLIBRARIES)'; test -n "$(linux_inputdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(linux_inputdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(linux_inputdir)/$$f"; \ done clean-linux_inputLTLIBRARIES: -test -z "$(linux_input_LTLIBRARIES)" || rm -f $(linux_input_LTLIBRARIES) @list='$(linux_input_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_linux_input.la: $(libdirectfb_linux_input_la_OBJECTS) $(libdirectfb_linux_input_la_DEPENDENCIES) $(EXTRA_libdirectfb_linux_input_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_linux_input_la_LINK) -rpath $(linux_inputdir) $(libdirectfb_linux_input_la_OBJECTS) $(libdirectfb_linux_input_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux_input.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-linux_inputDATA: $(linux_input_DATA) @$(NORMAL_INSTALL) @list='$(linux_input_DATA)'; test -n "$(linux_inputdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(linux_inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(linux_inputdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linux_inputdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linux_inputdir)" || exit $$?; \ done uninstall-linux_inputDATA: @$(NORMAL_UNINSTALL) @list='$(linux_input_DATA)'; test -n "$(linux_inputdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(linux_inputdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(linux_inputdir)" "$(DESTDIR)$(linux_inputdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-linux_inputLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-linux_inputDATA \ install-linux_inputLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-linux_inputDATA \ uninstall-linux_inputLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-linux_inputLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-linux_inputDATA \ install-linux_inputLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-linux_inputDATA \ uninstall-linux_inputLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/divine/0000755000175000017500000000000012466665354014206 500000000000000DirectFB-1.7.7/inputdrivers/divine/Makefile.am0000644000175000017500000000116012254435330016140 00000000000000## Makefile.am for DirectFB/inputdrivers/divine INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src divine_LTLIBRARIES = libdirectfb_divine.la if BUILD_STATIC divine_DATA = $(divine_LTLIBRARIES:.la=.o) endif divinedir = $(MODULEDIR)/inputdrivers libdirectfb_divine_la_SOURCES = \ divine.c libdirectfb_divine_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_divine_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/divine/Makefile.in0000644000175000017500000006444112466665311016175 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/divine ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(divinedir)" "$(DESTDIR)$(divinedir)" LTLIBRARIES = $(divine_LTLIBRARIES) libdirectfb_divine_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_divine_la_OBJECTS = divine.lo libdirectfb_divine_la_OBJECTS = $(am_libdirectfb_divine_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_divine_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_divine_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_divine_la_SOURCES) DIST_SOURCES = $(libdirectfb_divine_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(divine_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src divine_LTLIBRARIES = libdirectfb_divine.la @BUILD_STATIC_TRUE@divine_DATA = $(divine_LTLIBRARIES:.la=.o) divinedir = $(MODULEDIR)/inputdrivers libdirectfb_divine_la_SOURCES = \ divine.c libdirectfb_divine_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_divine_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/divine/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/divine/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-divineLTLIBRARIES: $(divine_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(divine_LTLIBRARIES)'; test -n "$(divinedir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(divinedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(divinedir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(divinedir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(divinedir)"; \ } uninstall-divineLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(divine_LTLIBRARIES)'; test -n "$(divinedir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(divinedir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(divinedir)/$$f"; \ done clean-divineLTLIBRARIES: -test -z "$(divine_LTLIBRARIES)" || rm -f $(divine_LTLIBRARIES) @list='$(divine_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_divine.la: $(libdirectfb_divine_la_OBJECTS) $(libdirectfb_divine_la_DEPENDENCIES) $(EXTRA_libdirectfb_divine_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_divine_la_LINK) -rpath $(divinedir) $(libdirectfb_divine_la_OBJECTS) $(libdirectfb_divine_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/divine.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-divineDATA: $(divine_DATA) @$(NORMAL_INSTALL) @list='$(divine_DATA)'; test -n "$(divinedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(divinedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(divinedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(divinedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(divinedir)" || exit $$?; \ done uninstall-divineDATA: @$(NORMAL_UNINSTALL) @list='$(divine_DATA)'; test -n "$(divinedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(divinedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(divinedir)" "$(DESTDIR)$(divinedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-divineLTLIBRARIES clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-divineDATA install-divineLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-divineDATA uninstall-divineLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-divineLTLIBRARIES clean-generic clean-libtool \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-divineDATA \ install-divineLTLIBRARIES install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-divineDATA \ uninstall-divineLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/inputdrivers/divine/divine.c0000644000175000017500000001707612254435330015543 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define DFB_INPUTDRIVER_HAS_AXIS_INFO #include #include DFB_INPUT_DRIVER( divine ) #define PIPE_PATH "/tmp/divine" /* * declaration of private data */ typedef struct { char pipename[256]; int fd; CoreInputDevice *device; DirectThread *thread; } DiVineData; /* * Input thread reading from pipe. * Directly passes read events to input core. */ static void* divineEventThread( DirectThread *thread, void *driver_data ) { DiVineData *data = (DiVineData*) driver_data; DFBInputEvent event; struct pollfd pfd; /* fill poll info */ pfd.fd = data->fd; pfd.events = POLLIN; /* wait for the next event */ while (poll( &pfd, 1, -1 ) > 0 || errno == EINTR) { /* read the next event from the pipe */ if (read( data->fd, &event, sizeof(DFBInputEvent) ) == sizeof(DFBInputEvent)) { /* directly dispatch the event */ dfb_input_dispatch( data->device, &event ); } else { if (!strcmp( (const char*) &event, "STOP" )) return NULL; // FIXME: handle poll/read errors usleep( 20000 ); /* avoid 100% CPU usage in case poll() doesn't work */ } } D_PERROR( "divine thread died\n" ); return NULL; } /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available() { int fd; int world_index; char buf[256]; /* avoid clash with other DirectFB sessions, but keep compatible for default session */ world_index = fusion_world_index( dfb_core_world( NULL ) ); if (world_index != 0) snprintf( buf, sizeof(buf), "%s.%d", PIPE_PATH, world_index ); else snprintf( buf, sizeof(buf), "%s", PIPE_PATH ); /* create the pipe if not already existent */ if (mkfifo( buf, 0660 ) && errno != EEXIST) { D_PERROR( "DirectFB/DiVine: could not create pipe '%s'\n", buf ); return 0; } /* try to open pipe */ fd = open( buf, O_RDONLY | O_NONBLOCK ); if (fd < 0) { D_PERROR( "DirectFB/DiVine: could not open pipe '%s'\n", buf ); return 0; } /* close pipe */ close( fd ); return 1; } /* * Fill out general information about this driver. * Called once during initialization of DirectFB. */ static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "DiVine Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "Convergence GmbH" ); info->version.major = DIRECTFB_MAJOR_VERSION; info->version.minor = DIRECTFB_MINOR_VERSION; } /* * Open the pipe, fill out information about device, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { DiVineData *data; int world_index; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(DiVineData) ); if (!data) return D_OOM(); data->device = device; /* avoid clash with other DirectFB sessions, but keep compatible for default session */ world_index = fusion_world_index( dfb_core_world( NULL ) ); if (world_index != 0) snprintf( data->pipename, sizeof(data->pipename), "%s.%d", PIPE_PATH, world_index ); else snprintf( data->pipename, sizeof(data->pipename), "%s", PIPE_PATH ); /* open pipe */ data->fd = open( data->pipename, O_RDWR | O_NONBLOCK ); if (data->fd < 0) { D_PERROR( "DirectFB/DiVine: could not open pipe '%s'\n", data->pipename ); D_FREE( data ); return DFB_INIT; } /* set device name */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "Virtual Input" ); /* set device vendor */ snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "DirectFB" ); /* set one of the primary input device IDs */ info->prefered_id = DIDID_ANY; /* set type flags */ info->desc.type = DIDTF_KEYBOARD | DIDTF_MOUSE | DIDTF_JOYSTICK | DIDTF_REMOTE | DIDTF_VIRTUAL; /* set capabilities */ info->desc.caps = DICAPS_ALL; info->desc.max_axis = DIAI_LAST; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, divineEventThread, data, "Virtual Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } static DFBResult driver_get_axis_info( CoreInputDevice *device, void *driver_data, DFBInputDeviceAxisIdentifier axis, DFBInputDeviceAxisInfo *ret_info ) { ret_info->flags = DIAIF_ABS_MIN | DIAIF_ABS_MAX; ret_info->abs_min = 0; ret_info->abs_max = 65535; return DFB_OK; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { DiVineData *data = (DiVineData*) driver_data; write( data->fd, "STOP", 5 ); /* stop input thread */ direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close pipe */ close( data->fd ); /* free private data */ D_FREE( data ); } DirectFB-1.7.7/inputdrivers/wm97xx_ts/0000755000175000017500000000000012466665355014622 500000000000000DirectFB-1.7.7/inputdrivers/wm97xx_ts/wm97xx_ts.c0000644000175000017500000001602712254435330016564 00000000000000/* Driver for Wolfson WM9705/WM9712 touchscreen controllers as found in the Dell Axim and Toshiba e740. liam.girdwood@wolfsonmicro.com NOTE: Please make sure that pressure measurement is enable in the kernel driver. (i.e. pil != 0) Please read wolfson-touchscreen.txt in your kernel documentation for details. Based on the h3600_ts.c driver: (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( wm97xx_ts ) typedef struct { CoreInputDevice *device; DirectThread *thread; int fd; } WM97xxTSData; /* I copied this from the kernel driver since there is no include file */ typedef struct { u16 pressure; u16 x; u16 y; u16 pad; struct timeval stamp; } TS_EVENT; static void * wm97xxtsEventThread( DirectThread *thread, void *driver_data ) { WM97xxTSData *data = (WM97xxTSData*) driver_data; TS_EVENT ts_event; int readlen; unsigned short old_x = -1; unsigned short old_y = -1; unsigned short old_pressure = 0; while ((readlen = read(data->fd, &ts_event, sizeof(TS_EVENT))) > 0 || errno == EINTR) { DFBInputEvent evt; direct_thread_testcancel( thread ); if (readlen < 1) continue; if (ts_event.pressure) { if (ts_event.x != old_x) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_X; evt.axisabs = ts_event.x; dfb_input_dispatch( data->device, &evt ); old_x = ts_event.x; } if (ts_event.y != old_y) { evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS; evt.axis = DIAI_Y; evt.axisabs = ts_event.y; dfb_input_dispatch( data->device, &evt ); old_y = ts_event.y; } } if ((ts_event.pressure && !old_pressure) || (!ts_event.pressure && old_pressure)) { evt.type = (ts_event.pressure ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE); evt.flags = DIEF_NONE; evt.button = DIBI_LEFT; dfb_input_dispatch( data->device, &evt ); old_pressure = ts_event.pressure; } } if (readlen <= 0) D_PERROR ("WM97xx Touchscreen thread died\n"); return NULL; } /* exported symbols */ static int driver_get_available( void ) { int fd; fd = open( "/dev/touchscreen/wm97xx", O_RDONLY | O_NOCTTY ); if (fd < 0) return 0; close( fd ); return 1; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "WM97xx Touchscreen Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 0; info->version.minor = 1; } static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { int fd; WM97xxTSData *data; /* open device */ fd = open( "/dev/touchscreen/wm97xx", O_RDONLY | O_NOCTTY ); if (fd < 0) { D_PERROR( "DirectFB/WM97xx: Error opening `/dev/touchscreen/wm97xx'!\n" ); return DFB_INIT; } /* fill device info structure */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "WM97xx Touchscreen" ); snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Wolfson Microelectronics" ); info->prefered_id = DIDID_MOUSE; info->desc.type = DIDTF_MOUSE; #ifndef DIRECTFB_DISABLE_DEPRECATED info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS; #else info->desc.caps = DIDCAPS_AXES | DIDCAPS_BUTTONS; #endif info->desc.max_axis = DIAI_Y; info->desc.max_button = DIBI_LEFT; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(WM97xxTSData) ); if (!data) { close( fd ); return D_OOM(); } data->fd = fd; data->device = device; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, wm97xxtsEventThread, data, "WM97xx TS Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } static void driver_close_device( void *driver_data ) { WM97xxTSData *data = (WM97xxTSData*) driver_data; /* stop input thread */ direct_thread_cancel( data->thread ); direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* close device */ if (close( data->fd ) < 0) D_PERROR( "DirectFB/WM97xx: Error closing `/dev/touchscreen/wm97xx'!\n" ); /* free private data */ D_FREE( data ); } DirectFB-1.7.7/inputdrivers/wm97xx_ts/Makefile.am0000644000175000017500000000117312171403127016554 00000000000000## Makefile.am for DirectFB/inputdrivers/wm97xx INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_wm97xx_ts.la if BUILD_STATIC input_DATA = $(input_LTLIBRARIES:.la=.o) endif inputdir = $(MODULEDIR)/inputdrivers libdirectfb_wm97xx_ts_la_SOURCES = \ wm97xx_ts.c libdirectfb_wm97xx_ts_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_wm97xx_ts_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/inputdrivers/wm97xx_ts/Makefile.in0000644000175000017500000006447312466665313016617 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = inputdrivers/wm97xx_ts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)" LTLIBRARIES = $(input_LTLIBRARIES) libdirectfb_wm97xx_ts_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_wm97xx_ts_la_OBJECTS = wm97xx_ts.lo libdirectfb_wm97xx_ts_la_OBJECTS = \ $(am_libdirectfb_wm97xx_ts_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_wm97xx_ts_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_wm97xx_ts_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_wm97xx_ts_la_SOURCES) DIST_SOURCES = $(libdirectfb_wm97xx_ts_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(input_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src input_LTLIBRARIES = libdirectfb_wm97xx_ts.la @BUILD_STATIC_TRUE@input_DATA = $(input_LTLIBRARIES:.la=.o) inputdir = $(MODULEDIR)/inputdrivers libdirectfb_wm97xx_ts_la_SOURCES = \ wm97xx_ts.c libdirectfb_wm97xx_ts_la_LDFLAGS = \ -module \ -avoid-version \ $(DFB_LDFLAGS) libdirectfb_wm97xx_ts_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inputdrivers/wm97xx_ts/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inputdrivers/wm97xx_ts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputLTLIBRARIES: $(input_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdir)"; \ } uninstall-inputLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(input_LTLIBRARIES)'; test -n "$(inputdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdir)/$$f"; \ done clean-inputLTLIBRARIES: -test -z "$(input_LTLIBRARIES)" || rm -f $(input_LTLIBRARIES) @list='$(input_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_wm97xx_ts.la: $(libdirectfb_wm97xx_ts_la_OBJECTS) $(libdirectfb_wm97xx_ts_la_DEPENDENCIES) $(EXTRA_libdirectfb_wm97xx_ts_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_wm97xx_ts_la_LINK) -rpath $(inputdir) $(libdirectfb_wm97xx_ts_la_OBJECTS) $(libdirectfb_wm97xx_ts_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wm97xx_ts.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-inputDATA: $(input_DATA) @$(NORMAL_INSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdir)" || exit $$?; \ done uninstall-inputDATA: @$(NORMAL_UNINSTALL) @list='$(input_DATA)'; test -n "$(inputdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-inputLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-inputDATA install-inputLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-inputDATA uninstall-inputLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-inputLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-inputDATA install-inputLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-inputDATA uninstall-inputLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/directfb.pc.in0000644000175000017500000000060212171403127012600 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ water=runs Name: DirectFB Description: Graphics and windowing library for the Linux frame buffer device Version: @VERSION@ Requires: @DEP_VOODOO@ fusion direct Libs: -L${libdir} -ldirectfb @THREADLIB@ @OSX_LIBS@ Libs.private: -L${libdir} @LIBM@ @DYNLIB@ @ZLIB_LIBS@ Cflags: @THREADFLAGS@ -I@INCLUDEDIR@ DirectFB-1.7.7/depcomp0000755000175000017500000005601612466665320011470 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 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, see . # 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 . 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 outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} 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" # Avoid interferences from the environment. gccflag= dashmflag= # 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 cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc 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. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## 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). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # 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. ## 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. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -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 -ne 0; then 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 ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # 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 ;; 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. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then 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" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; 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. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies 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$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # 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 ;; #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 "X$1" != 'X--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|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | 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 "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi 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. -arch) eat=yes ;; -*|$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" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | 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 "X$1" != 'X--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. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # 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 ;; 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: DirectFB-1.7.7/systems/0000755000175000017500000000000012466665353011700 500000000000000DirectFB-1.7.7/systems/drmkms/0000755000175000017500000000000012466665353013175 500000000000000DirectFB-1.7.7/systems/drmkms/vt.c0000644000175000017500000004405712254435330013705 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include /* Needs to be included before dfb_types.h */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "vt.h" #include "drmkms_system.h" D_DEBUG_DOMAIN( VT, "DRMKMS/VT", "DRMKMS System Module VT Handling" ); /* * FIXME: the following looks like a bad hack. * * SIGUNUSED is no longer unused, but is defined for backwards compatibility. * sparc, mips and alpha signal.h however do not define SIGUNUSED. */ #ifdef SIGUNUSED #define SIG_SWITCH_FROM (SIGUNUSED + 10) #define SIG_SWITCH_TO (SIGUNUSED + 11) #else #define SIG_SWITCH_FROM (31 + 10) #define SIG_SWITCH_TO (31 + 11) #endif #ifndef SI_KERNEL /* glibc 2.1.x doesn't have this in /usr/include/bits/siginfo.h */ #define SI_KERNEL 0x80 #endif extern DRMKMSData *m_data; static VirtualTerminal *dfb_vt = NULL; static DFBResult vt_init_switching( void ); static void *vt_thread( DirectThread *thread, void *arg ); static void vt_start_flushing( void ); static void vt_stop_flushing( void ); static void *vt_flush_thread( DirectThread *thread, void *arg ); DFBResult dfb_vt_initialize( void ) { DFBResult ret; struct vt_stat vs; D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); dfb_vt = D_CALLOC( 1, sizeof(VirtualTerminal) ); if (!dfb_vt) return D_OOM(); setsid(); dfb_vt->fd0 = open( "/dev/tty0", O_RDONLY | O_NOCTTY ); if (dfb_vt->fd0 < 0) { if (errno == ENOENT) { dfb_vt->fd0 = open( "/dev/vc/0", O_RDONLY | O_NOCTTY ); if (dfb_vt->fd0 < 0) { if (errno == ENOENT) { D_PERROR( "DirectFB/core/vt: Couldn't open " "neither `/dev/tty0' nor `/dev/vc/0'!\n" ); } else { D_PERROR( "DirectFB/core/vt: " "Error opening `/dev/vc/0'!\n" ); } D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } } else { D_PERROR( "DirectFB/core/vt: Error opening `/dev/tty0'!\n"); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } } if (ioctl( dfb_vt->fd0, VT_GETSTATE, &vs ) < 0) { D_PERROR( "DirectFB/core/vt: VT_GETSTATE failed!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } dfb_vt->prev = vs.v_active; if (!dfb_config->vt_switch) { if (dfb_config->vt_num != -1) dfb_vt->num = dfb_config->vt_num; else dfb_vt->num = dfb_vt->prev; /* move vt to framebuffer */ // dfb_vt->old_fb = vt_get_fb( dfb_vt->num ); // vt_set_fb( dfb_vt->num, -1 ); } else { if (dfb_config->vt_num == -1) { int n; n = ioctl( dfb_vt->fd0, VT_OPENQRY, &dfb_vt->num ); if (n < 0 || dfb_vt->num == -1) { D_PERROR( "DirectFB/core/vt: Cannot allocate VT!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } } else { dfb_vt->num = dfb_config->vt_num; } /* move vt to framebuffer */ // dfb_vt->old_fb = vt_get_fb( dfb_vt->num ); // vt_set_fb( dfb_vt->num, -1 ); /* switch to vt */ while (ioctl( dfb_vt->fd0, VT_ACTIVATE, dfb_vt->num ) < 0) { if (errno == EINTR) continue; D_PERROR( "DirectFB/core/vt: VT_ACTIVATE failed!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } while (ioctl( dfb_vt->fd0, VT_WAITACTIVE, dfb_vt->num ) < 0) { if (errno == EINTR) continue; D_PERROR( "DirectFB/core/vt: VT_WAITACTIVE failed!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } usleep( 40000 ); } ret = vt_init_switching(); if (ret) { if (dfb_config->vt_switch) { D_DEBUG_AT( VT, " -> switching back...\n" ); ioctl( dfb_vt->fd0, VT_ACTIVATE, dfb_vt->prev ); ioctl( dfb_vt->fd0, VT_WAITACTIVE, dfb_vt->prev ); D_DEBUG_AT( VT, " -> ...switched back\n" ); ioctl( dfb_vt->fd0, VT_DISALLOCATE, dfb_vt->num ); } close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return ret; } vt_start_flushing(); m_data->vt = dfb_vt; return DFB_OK; } DFBResult dfb_vt_join( void ) { D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); dfb_vt_detach( true ); return DFB_OK; } DFBResult dfb_vt_shutdown( bool emergency ) { const char cursoron_str[] = "\033[?0;0;0c"; const char blankon_str[] = "\033[9;10]"; int res; (void)res; D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); if (!dfb_vt) return DFB_OK; vt_stop_flushing(); if (dfb_config->vt_switching) { if (ioctl( dfb_vt->fd, VT_SETMODE, &dfb_vt->vt_mode ) < 0) D_PERROR( "DirectFB/fbdev/vt: Unable to restore VT mode!!!\n" ); sigaction( SIG_SWITCH_FROM, &dfb_vt->sig_usr1, NULL ); sigaction( SIG_SWITCH_TO, &dfb_vt->sig_usr2, NULL ); direct_thread_cancel( dfb_vt->thread ); direct_thread_join( dfb_vt->thread ); direct_thread_destroy( dfb_vt->thread ); pthread_mutex_destroy( &dfb_vt->lock ); pthread_cond_destroy( &dfb_vt->wait ); } if (dfb_config->kd_graphics) { if (ioctl( dfb_vt->fd, KDSETMODE, KD_TEXT ) < 0) D_PERROR( "DirectFB/fbdev/vt: KD_TEXT failed!\n" ); } else { res = write( dfb_vt->fd, blankon_str, sizeof(blankon_str) ); } res = write( dfb_vt->fd, cursoron_str, sizeof(cursoron_str) ); if (tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ) < 0) D_PERROR("DirectFB/fbdev/vt: tcsetattr for original values failed!\n"); if (ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ) < 0) D_PERROR( "DirectFB/fbdev/vt: K_XLATE failed!\n" ); if (dfb_config->vt_switch) { D_DEBUG_AT( VT, " -> switching back...\n" ); if (ioctl( dfb_vt->fd0, VT_ACTIVATE, dfb_vt->prev ) < 0) D_PERROR( "DirectFB/core/vt: VT_ACTIVATE" ); if (ioctl( dfb_vt->fd0, VT_WAITACTIVE, dfb_vt->prev ) < 0) D_PERROR( "DirectFB/core/vt: VT_WAITACTIVE" ); D_DEBUG_AT( VT, " -> switched back...\n" ); usleep( 40000 ); /* restore con2fbmap */ // vt_set_fb( dfb_vt->num, dfb_vt->old_fb ); if (close( dfb_vt->fd ) < 0) D_PERROR( "DirectFB/core/vt: Unable to " "close file descriptor of allocated VT!\n" ); if (ioctl( dfb_vt->fd0, VT_DISALLOCATE, dfb_vt->num ) < 0) D_PERROR( "DirectFB/core/vt: Unable to disallocate VT!\n" ); } else { /* restore con2fbmap */ // vt_set_fb( dfb_vt->num, dfb_vt->old_fb ); if (close( dfb_vt->fd ) < 0) D_PERROR( "DirectFB/core/vt: Unable to " "close file descriptor of current VT!\n" ); } if (close( dfb_vt->fd0 ) < 0) D_PERROR( "DirectFB/core/vt: Unable to " "close file descriptor of tty0!\n" ); D_FREE( dfb_vt ); dfb_vt = m_data->vt = NULL; return DFB_OK; } DFBResult dfb_vt_leave( bool emergency ) { D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); return DFB_OK; } DFBResult dfb_vt_detach( bool force ) { D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); if (dfb_config->vt_switch || force) { int fd; struct vt_stat vt_state; fd = open( "/dev/tty", O_RDONLY | O_NOCTTY ); if (fd < 0) { if (errno == ENXIO) return DFB_OK; D_PERROR( "DirectFB/VT: Opening /dev/tty failed!\n" ); return errno2result( errno ); } if (ioctl( fd, VT_GETSTATE, &vt_state )) { close( fd ); return DFB_OK; } if (ioctl( fd, TIOCNOTTY )) { D_PERROR( "DirectFB/VT: TIOCNOTTY on /dev/tty failed\n" ); close( fd ); return errno2result( errno ); } close( fd ); } return DFB_OK; } bool dfb_vt_switch( int num ) { D_DEBUG_AT( VT, "%s( %d )\n", __FUNCTION__, num ); if (!dfb_config->vt_switching) return false; D_DEBUG_AT( VT, " -> switching to vt %d...\n", num ); if (ioctl( dfb_vt->fd0, VT_ACTIVATE, num ) < 0) D_PERROR( "DirectFB/fbdev/vt: VT_ACTIVATE failed\n" ); return true; } static void * vt_thread( DirectThread *thread, void *arg ) { D_DEBUG_AT( VT, "%s( %p, %p )\n", __FUNCTION__, thread, arg ); pthread_mutex_lock( &dfb_vt->lock ); while (true) { direct_thread_testcancel( thread ); D_DEBUG_AT( VT, "...%s (signal %d)\n", __FUNCTION__, dfb_vt->vt_sig); switch (dfb_vt->vt_sig) { default: D_BUG( "unexpected vt_sig" ); /* fall through */ case -1: pthread_cond_wait( &dfb_vt->wait, &dfb_vt->lock ); continue; case SIG_SWITCH_FROM: if (dfb_core_suspend( m_data->core ) == DFB_OK) { if (ioctl( dfb_vt->fd, VT_RELDISP, VT_ACKACQ ) < 0) D_PERROR( "DirectFB/fbdev/vt: VT_RELDISP failed\n" ); } break; case SIG_SWITCH_TO: if (dfb_core_resume( m_data->core ) == DFB_OK) { if (ioctl( dfb_vt->fd, VT_RELDISP, VT_ACKACQ ) < 0) D_PERROR( "DirectFB/fbdev/vt: VT_RELDISP failed\n" ); if (dfb_config->kd_graphics) { if (ioctl( dfb_vt->fd, KDSETMODE, KD_GRAPHICS ) < 0) D_PERROR( "DirectFB/fbdev/vt: KD_GRAPHICS failed!\n" ); } } break; } dfb_vt->vt_sig = -1; pthread_cond_signal( &dfb_vt->wait ); } return NULL; } static void vt_switch_handler( int signum ) { D_DEBUG_AT( VT, "%s( %d )\n", __FUNCTION__, signum ); pthread_mutex_lock( &dfb_vt->lock ); while (dfb_vt->vt_sig != -1) pthread_cond_wait( &dfb_vt->wait, &dfb_vt->lock ); dfb_vt->vt_sig = signum; pthread_cond_signal( &dfb_vt->wait ); pthread_mutex_unlock( &dfb_vt->lock ); } static DFBResult vt_init_switching( void ) { struct termios ts; const char cursoroff_str[] = "\033[?1;0;0c"; const char blankoff_str[] = "\033[9;0]"; char buf[32]; int res; (void)res; D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); /* FIXME: Opening the device should be moved out of this function. */ snprintf(buf, 32, "/dev/tty%d", dfb_vt->num); dfb_vt->fd = open( buf, O_RDWR | O_NOCTTY ); if (dfb_vt->fd < 0) { if (errno == ENOENT) { snprintf(buf, 32, "/dev/vc/%d", dfb_vt->num); dfb_vt->fd = open( buf, O_RDWR | O_NOCTTY ); if (dfb_vt->fd < 0) { if (errno == ENOENT) { D_PERROR( "DirectFB/core/vt: Couldn't open " "neither `/dev/tty%d' nor `/dev/vc/%d'!\n", dfb_vt->num, dfb_vt->num ); } else { D_PERROR( "DirectFB/core/vt: " "Error opening `%s'!\n", buf ); } return errno2result( errno ); } } else { D_PERROR( "DirectFB/core/vt: Error opening `%s'!\n", buf ); return errno2result( errno ); } } /* attach to the new TTY before doing anything like KDSETMODE with it, otherwise we'd get access denied error: */ ioctl( dfb_vt->fd, TIOCSCTTY, 0 ); if (ioctl( dfb_vt->fd, KDSKBMODE, K_MEDIUMRAW ) < 0) { D_PERROR( "DirectFB/fbdev/vt: K_MEDIUMRAW failed!\n" ); close( dfb_vt->fd ); return DFB_INIT; } if (tcgetattr( dfb_vt->fd, &dfb_vt->old_ts ) < 0) { D_PERROR( "DirectFB/fbdev/vt: tcgetattr failed!\n" ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } ts = dfb_vt->old_ts; ts.c_cc[VTIME] = 0; ts.c_cc[VMIN] = 1; ts.c_lflag &= ~(ICANON|ECHO|ISIG); ts.c_iflag = 0; if (tcsetattr( dfb_vt->fd, TCSAFLUSH, &ts ) < 0) { D_PERROR( "DirectFB/fbdev/vt: tcsetattr for new values failed!\n" ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } res = write( dfb_vt->fd, cursoroff_str, sizeof(cursoroff_str) ); if (dfb_config->kd_graphics) { if (ioctl( dfb_vt->fd, KDSETMODE, KD_GRAPHICS ) < 0) { D_PERROR( "DirectFB/fbdev/vt: KD_GRAPHICS failed!\n" ); tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } } else { res = write( dfb_vt->fd, blankoff_str, sizeof(blankoff_str) ); } if (dfb_config->vt_switching) { struct vt_mode vt; struct sigaction sig_tty; memset( &sig_tty, 0, sizeof( sig_tty ) ); sig_tty.sa_handler = vt_switch_handler; sigfillset( &sig_tty.sa_mask ); if (sigaction( SIG_SWITCH_FROM, &sig_tty, &dfb_vt->sig_usr1 ) || sigaction( SIG_SWITCH_TO, &sig_tty, &dfb_vt->sig_usr2 )) { D_PERROR( "DirectFB/fbdev/vt: sigaction failed!\n" ); tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } vt.mode = VT_PROCESS; vt.waitv = 0; vt.relsig = SIG_SWITCH_FROM; vt.acqsig = SIG_SWITCH_TO; if (ioctl( dfb_vt->fd, VT_SETMODE, &vt ) < 0) { D_PERROR( "DirectFB/fbdev/vt: VT_SETMODE failed!\n" ); sigaction( SIG_SWITCH_FROM, &dfb_vt->sig_usr1, NULL ); sigaction( SIG_SWITCH_TO, &dfb_vt->sig_usr2, NULL ); tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } direct_util_recursive_pthread_mutex_init( &dfb_vt->lock ); pthread_cond_init( &dfb_vt->wait, NULL ); dfb_vt->vt_sig = -1; dfb_vt->thread = direct_thread_create( DTT_CRITICAL, vt_thread, NULL, "VT Switcher" ); } return DFB_OK; } static void vt_start_flushing( void ) { dfb_vt->flush = true; dfb_vt->flush_thread = direct_thread_create( DTT_DEFAULT, vt_flush_thread, NULL, "VT Flusher" ); } static void vt_stop_flushing( void ) { dfb_vt->flush = false; direct_thread_cancel( dfb_vt->flush_thread ); direct_thread_join( dfb_vt->flush_thread ); direct_thread_destroy( dfb_vt->flush_thread ); dfb_vt->flush_thread = NULL; } /* * If the vt buffer in not kept clean the kernel may stop sleeping. */ static void * vt_flush_thread( DirectThread *thread, void *arg ) { D_DEBUG_AT( VT, "%s( %p, %p )\n", __FUNCTION__, thread, arg ); while (dfb_vt->flush) { fd_set set; int ret; FD_ZERO( &set ); FD_SET( dfb_vt->fd, &set ); ret = select( dfb_vt->fd + 1, &set, NULL, NULL, NULL ); if (ret < 0 && errno == EINTR) continue; if (ret < 0) break; tcflush( dfb_vt->fd, TCIFLUSH ); } return NULL; } DirectFB-1.7.7/systems/drmkms/drmkms_system.h0000644000175000017500000001056312463500054016153 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DRMKMS_SYSTEM_H__ #define __DRMKMS_SYSTEM_H__ #ifdef USE_GBM #include #else #include #endif #include #include #include #include #include #include #include #include "vt.h" extern const SurfacePoolFuncs drmkmsSurfacePoolFuncs; extern const ScreenFuncs *drmkmsScreenFuncs; extern const DisplayLayerFuncs *drmkmsLayerFuncs; extern const DisplayLayerFuncs *drmkmsPlaneLayerFuncs; typedef struct { int index; int layer_index; int plane_index; drmModePlane *plane; uint32_t colorkey_propid; uint32_t zpos_propid; uint32_t alpha_propid; int level; CoreLayerRegionConfig *config; int surfacebuffer_index; CoreSurface *surface; DFB_DisplayTask *prev_task; DFB_DisplayTask *pending_task; bool flip_pending; DirectMutex lock; DirectWaitQueue wq_event; bool muted; } DRMKMSLayerData; typedef struct { FusionSHMPoolShared *shmpool; CoreSurfacePool *pool; bool use_prime_fd; bool mirror_outputs; bool clone_outputs; bool multihead; int plane_limit; char device_name[256]; DFBRectangle primary_rect; u32 primary_fb; drmModeModeInfo mode[8]; DFBDimension primary_dimension[8]; int enabled_crtcs; uint32_t cloned_connectors[8]; int cloned_count; DRMKMSLayerData *layer_data[16]; int layer_index_count; int plane_index_count; int layerplane_index_count; } DRMKMSDataShared; typedef struct { DRMKMSDataShared *shared; CoreDFB *core; CoreScreen *screen; int fd; /* DRM file descriptor */ #ifdef USE_GBM struct gbm_device *gbm; #else struct kms_driver *kms; #endif drmModeConnector *connector[8]; drmModeEncoder *encoder[8]; drmModeRes *resources; drmModePlaneRes *plane_resources; drmModeCrtcPtr saved_crtc; drmEventContext drmeventcontext; VirtualTerminal *vt; DirectThread *thread; DFBDisplayLayerIDs layer_ids[8]; DFBDisplayLayerID layer_id_next; } DRMKMSData; drmModeModeInfo* drmkms_find_mode( int encoder, int width, int height, int freq ); drmModeModeInfo* drmkms_dsor_freq_to_mode( int encoder, DFBScreenOutputResolution dsor, DFBScreenEncoderFrequency freq ); DFBResult drmkms_mode_to_dsor_dsef( drmModeModeInfo *videomode, DFBScreenOutputResolution *dso_res, DFBScreenEncoderFrequency *dse_freq ); DFBScreenOutputResolution drmkms_modes_to_dsor_bitmask( int connector ); #endif DirectFB-1.7.7/systems/drmkms/drmkms_system.c0000644000175000017500000004123112463500054016142 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include "drmkms_system.h" #include "vt.h" #include #include D_DEBUG_DOMAIN( DRMKMS_Mode, "DRMKMS/Mode", "DRM/KMS Mode" ); D_DEBUG_DOMAIN( DRMKMS_Layer, "DRMKMS/Layer", "DRM/KMS Layer" ); DFB_CORE_SYSTEM( drmkms ) /**********************************************************************************************************************/ DRMKMSData *m_data; /* FIXME: Fix Core System API to pass data in all functions. */ /**********************************************************************************************************************/ void drmkms_page_flip_handler(int fd, unsigned int frame, unsigned int sec, unsigned int usec, void *layer_data); void drmkms_page_flip_handler(int fd, unsigned int frame, unsigned int sec, unsigned int usec, void *layer_data) { DRMKMSLayerData *data = layer_data; D_DEBUG_AT( DRMKMS_Layer, "%s()\n", __FUNCTION__ ); direct_mutex_lock( &data->lock ); if (data->flip_pending) { dfb_surface_notify_display2( data->surface, data->surfacebuffer_index, data->pending_task ); dfb_surface_unref( data->surface ); if (data->prev_task) Task_Done( data->prev_task ); data->prev_task = data->pending_task; } data->flip_pending = false; direct_waitqueue_broadcast( &data->wq_event ); direct_mutex_unlock( &data->lock ); D_DEBUG_AT( DRMKMS_Layer, "%s() done.\n", __FUNCTION__ ); } static void * DRMKMS_BufferThread_Main( DirectThread *thread, void *arg ) { DRMKMSData *data = arg; D_DEBUG_AT( DRMKMS_Layer, "%s()\n", __FUNCTION__ ); while (true) drmHandleEvent( data->fd, &data->drmeventcontext ); return NULL; } static DFBResult InitLocal( DRMKMSData *drmkms ) { DFBResult ret; int i; DRMKMSDataShared *shared = drmkms->shared; drmkms->fd = open( shared->device_name, O_RDWR ); if (drmkms->fd < 0) { ret = errno2result( errno ); D_PERROR( "DirectFB/DRMKMS: Failed to open '%s'!\n", shared->device_name ); return ret; } #ifdef USE_GBM drmkms->gbm = gbm_create_device( drmkms->fd ); #else kms_create( drmkms->fd, &drmkms->kms); #endif drmkms->resources = drmModeGetResources( drmkms->fd ); if (!drmkms->resources) { D_ERROR( "DirectFB/DRMKMS: drmModeGetResources() failed!\n" ); return DFB_INIT; } drmkms->plane_resources = drmModeGetPlaneResources( drmkms->fd ); drmkms->screen = dfb_screens_register( NULL, drmkms, drmkmsScreenFuncs ); dfb_layers_register( drmkms->screen, drmkms, drmkmsLayerFuncs ); DFB_DISPLAYLAYER_IDS_ADD( drmkms->layer_ids[0], drmkms->layer_id_next++ ); if (drmkms->plane_resources) { for (i = 0; i < drmkms->plane_resources->count_planes; i++) { if (i==shared->plane_limit) break; dfb_layers_register( drmkms->screen, drmkms, drmkmsPlaneLayerFuncs ); DFB_DISPLAYLAYER_IDS_ADD( drmkms->layer_ids[0], drmkms->layer_id_next++ ); } } return DFB_OK; } static DFBResult DeinitLocal( DRMKMSData *drmkms ) { if (drmkms->plane_resources) drmModeFreePlaneResources(drmkms->plane_resources); if (drmkms->resources) drmModeFreeResources( drmkms->resources ); if (drmkms->kms) kms_destroy (&drmkms->kms); if (drmkms->fd) close (drmkms->fd); return DFB_OK; } /**********************************************************************************************************************/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_DRMKMS; info->caps = CSCAPS_ACCELERATION | CSCAPS_NOTIFY_DISPLAY | CSCAPS_DISPLAY_TASKS; snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "DRM/KMS" ); } static DFBResult system_initialize( CoreDFB *core, void **ret_data ) { DFBResult ret; DRMKMSData *drmkms; DRMKMSDataShared *shared; FusionSHMPoolShared *pool; int ret_num; char *optionbuffer = NULL; D_ASSERT( m_data == NULL ); drmkms = D_CALLOC( 1, sizeof(DRMKMSData) ); if (!drmkms) return D_OOM(); drmkms->core = core; pool = dfb_core_shmpool( core ); shared = SHCALLOC( pool, 1, sizeof(DRMKMSDataShared) ); if (!shared) { D_FREE( drmkms ); return D_OOSHM(); } shared->shmpool = pool; drmkms->shared = shared; m_data = drmkms; if (dfb_config->vt) { ret = dfb_vt_initialize(); if (ret) return DFB_INIT; } if (direct_config_get("drmkms-mirror-outputs", &optionbuffer, 1, &ret_num) == DR_OK) { shared->mirror_outputs = 1; D_INFO("DRMKMS/Init: mirror on connected outputs\n"); } else if (direct_config_get("drmkms-clone-outputs", &optionbuffer, 1, &ret_num) == DR_OK) { shared->clone_outputs = 1; D_INFO("DRMKMS/Init: clone on connected outputs (if supported)\n"); } else if (direct_config_get("drmkms-multihead", &optionbuffer, 1, &ret_num) == DR_OK) { shared->multihead = 1; D_INFO("DRMKMS/Init: multi-head mode enabled\n"); } shared->plane_limit = direct_config_get_int_value("drmkms-plane-limit"); if (shared->plane_limit > 15) shared->plane_limit = 15; else if (shared->plane_limit == 0) shared->plane_limit = 15; else D_INFO("DRMKMS/Init: limiting possible overlay planes to %d\n", shared->plane_limit); if (direct_config_get("drmkms-use-prime-fd", &optionbuffer, 1, &ret_num) == DR_OK) { shared->use_prime_fd = 1; D_INFO("DRMKMS/Init: using prime fd\n"); } if (direct_config_get("drmkms-device", &optionbuffer, 1, &ret_num) == DR_OK) { direct_snputs( shared->device_name, optionbuffer, 255 ); D_INFO("DRMKMS/Init: using device %s as specified in DirectFB configuration\n", shared->device_name); } else { direct_snputs( shared->device_name, "/dev/dri/card0", 255 ); D_INFO("DRMKMS/Init: using device %s (default)\n", shared->device_name); } ret = InitLocal( drmkms ); if (ret) { if (dfb_config->vt) dfb_vt_shutdown( false ); return ret; } *ret_data = m_data; dfb_surface_pool_initialize( core, &drmkmsSurfacePoolFuncs, &shared->pool ); core_arena_add_shared_field( core, "drmkms", shared ); drmkms->drmeventcontext.version = DRM_EVENT_CONTEXT_VERSION; drmkms->drmeventcontext.vblank_handler = drmkms_page_flip_handler; drmkms->drmeventcontext.page_flip_handler = drmkms_page_flip_handler; drmkms->thread = direct_thread_create( DTT_CRITICAL, DRMKMS_BufferThread_Main, drmkms, "DRMKMS/Buffer" ); return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **ret_data ) { DFBResult ret; void *tmp; DRMKMSData *drmkms; DRMKMSDataShared *shared; int i; D_ASSERT( m_data == NULL ); if (dfb_config->vt) { ret = dfb_vt_join(); if (ret) return DFB_INIT; } drmkms = D_CALLOC( 1, sizeof(DRMKMSData) ); if (!drmkms) return D_OOM(); drmkms->core = core; ret = core_arena_get_shared_field( core, "drmkms", &tmp ); if (ret) { D_FREE( drmkms ); return ret; } drmkms->shared = shared = tmp; ret = InitLocal( drmkms ); if (ret) return ret; *ret_data = m_data = drmkms; if ((shared->enabled_crtcs > 1) && shared->multihead) { for (i=1; ienabled_crtcs; i++) { dfb_layers_register( drmkms->screen, drmkms, drmkmsLayerFuncs ); } } dfb_surface_pool_join( core, shared->pool, &drmkmsSurfacePoolFuncs ); return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { DRMKMSDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_destroy( shared->pool ); if (m_data->saved_crtc) { drmModeSetCrtc( m_data->fd, m_data->saved_crtc->crtc_id, m_data->saved_crtc->buffer_id, m_data->saved_crtc->x, m_data->saved_crtc->y, &m_data->connector[0]->connector_id, 1, &m_data->saved_crtc->mode ); drmModeFreeCrtc( m_data->saved_crtc ); } DeinitLocal( m_data ); if (dfb_config->vt) dfb_vt_shutdown( emergency ); SHFREE( shared->shmpool, shared ); D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_leave( bool emergency ) { DFBResult ret; DRMKMSDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_leave( shared->pool ); DeinitLocal( m_data ); if (dfb_config->vt) { ret = dfb_vt_leave( emergency ); if (ret) return ret; } D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_suspend( void ) { D_ASSERT( m_data != NULL ); return DFB_OK; } static DFBResult system_resume( void ) { D_ASSERT( m_data != NULL ); return DFB_OK; } static volatile void * system_map_mmio( unsigned int offset, int length ) { D_ASSERT( m_data != NULL ); return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator( void ) { return dfb_config->accelerator; } static VideoMode * system_get_modes( void ) { return NULL; } static VideoMode * system_get_current_mode( void ) { return NULL; } static DFBResult system_thread_init( void ) { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { if (dfb_config->vt && dfb_config->vt_switching) { switch (event->type) { case DIET_KEYPRESS: if (DFB_KEY_TYPE(event->key_symbol) == DIKT_FUNCTION && event->modifiers == (DIMM_CONTROL | DIMM_ALT)) return dfb_vt_switch( event->key_symbol - DIKS_F1 + 1 ); break; case DIET_KEYRELEASE: if (DFB_KEY_TYPE(event->key_symbol) == DIKT_FUNCTION && event->modifiers == (DIMM_CONTROL | DIMM_ALT)) return true; break; default: break; } } return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return dfb_config->video_phys + offset; } static void * system_video_memory_virtual( unsigned int offset ) { D_ASSERT( m_data != NULL ); return NULL; } static unsigned int system_videoram_length( void ) { return dfb_config->video_length; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length( void ) { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { return; } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ return; } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ return; } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { return; } static int xres_table[] = { 640,720,720,800,1024,1152,1280,1280,1280,1280,1400,1600,1920,960,1440,800,1024,1366, 1920, 2560, 2560 }; static int yres_table[] = { 480,480,576,600, 768, 864, 720, 768, 960,1024,1050,1200,1080,540, 540,480, 600, 768, 1200, 1440, 1600 }; static int freq_table[] = { 25, 30, 50, 59, 60, 75, 30, 24, 23 }; DFBScreenOutputResolution drmkms_modes_to_dsor_bitmask( int connector ) { drmModeModeInfo *videomode = m_data->connector[connector]->modes; int ret = DSOR_UNKNOWN; int i,j; D_DEBUG_AT( DRMKMS_Mode, "%s()\n", __FUNCTION__ ); for (i=0;iconnector[connector]->count_modes;i++) { for (j=0;jhdisplay == xres_table[j] && videomode->vdisplay == yres_table[j]) { *dso_res = (1 << j); break; } } } if (dse_freq) { for (j=0;jvrefresh == freq_table[j]) { *dse_freq = (1 << j); break; } } } return DFB_OK; } drmModeModeInfo* drmkms_dsor_freq_to_mode( int connector, DFBScreenOutputResolution dsor, DFBScreenEncoderFrequency dsefreq ) { int res = D_BITn32(dsor); int freq_index = D_BITn32(dsefreq); int freq = 0; D_DEBUG_AT( DRMKMS_Mode, "%s( dsor = %x, dsefreq = %x)\n", __FUNCTION__, dsor, dsefreq ); if (res >= D_ARRAY_SIZE(xres_table) || freq_index >= D_ARRAY_SIZE(freq_table)) return NULL; if (freq_index > 0) freq = freq_table[freq_index]; return drmkms_find_mode( connector, xres_table[res], yres_table[res], freq ); } drmModeModeInfo* drmkms_find_mode( int connector, int width, int height, int freq ) { drmModeModeInfo *videomode = m_data->connector[connector]->modes; drmModeModeInfo *found_mode = NULL; D_DEBUG_AT( DRMKMS_Mode, "%s()\n", __FUNCTION__ ); int i; for (i=0;iconnector[connector]->count_modes;i++) { if (videomode[i].hdisplay == width && videomode[i].vdisplay == height && ((videomode[i].vrefresh == freq) || (freq == 0) )) { found_mode = &videomode[i]; D_DEBUG_AT( DRMKMS_Mode, "Found mode %dx%d@%dHz\n", width, height, videomode[i].vrefresh ); break; } else D_DEBUG_AT( DRMKMS_Mode, "Mode %dx%d@%dHz does not match requested %dx%d@%dHz\n", videomode[i].hdisplay, videomode[i].vdisplay, videomode[i].vrefresh, width, height, freq ); } if (!found_mode) D_ONCE( "no mode found for %dx%d at %d Hz\n", width, height, freq ); return found_mode; } DirectFB-1.7.7/systems/drmkms/Makefile.am0000644000175000017500000000161012463500054015126 00000000000000## Makefile.am for DirectFB/systems/drmkms INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(DRMKMS_CFLAGS) internalincludedir = $(INTERNALINCLUDEDIR)/drmkms_system internalinclude_HEADERS = \ drmkms_system.h systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_drmkms_system.o endif systems_LTLIBRARIES = libdirectfb_drmkms_system.la libdirectfb_drmkms_system_la_LDFLAGS = \ -avoid-version \ -module \ $(DRMKMS_LIBS) libdirectfb_drmkms_system_la_SOURCES = \ drmkms_layer.c \ drmkms_screen.c \ drmkms_system.c \ drmkms_surface_pool.c \ vt.c \ vt.h libdirectfb_drmkms_system_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/drmkms/drmkms_layer.c0000644000175000017500000006112412463500054015735 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include "drmkms_system.h" D_DEBUG_DOMAIN( DRMKMS_Layer, "DRMKMS/Layer", "DRM/KMS Layer" ); D_DEBUG_DOMAIN( DRMKMS_Mode, "DRMKMS/Mode", "DRM/KMS Mode" ); /**********************************************************************************************************************/ static DFBResult drmkmsInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; DRMKMSLayerData *data = layer_data; D_DEBUG_AT( DRMKMS_Layer, "%s()\n", __FUNCTION__ ); data->index = shared->layerplane_index_count++; data->layer_index = shared->layer_index_count++; data->level = 0; description->type = DLTF_GRAPHICS; description->caps = DLCAPS_SURFACE; description->surface_caps = DSCAPS_NONE; description->surface_accessor = CSAID_LAYER0; direct_snputs( description->name, "DRMKMS Layer", DFB_DISPLAY_LAYER_DESC_NAME_LENGTH ); config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->width = dfb_config->mode.width ?: shared->mode[data->layer_index].hdisplay; config->height = dfb_config->mode.height ?: shared->mode[data->layer_index].vdisplay; config->pixelformat = dfb_config->mode.format ?: DSPF_ARGB; config->buffermode = DLBM_FRONTONLY; direct_mutex_init( &data->lock ); direct_waitqueue_init( &data->wq_event ); return DFB_OK; } static DFBResult drmkmsTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *ret_failed ) { DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; DRMKMSLayerData *data = layer_data; if ((shared->primary_dimension[data->layer_index].w && (shared->primary_dimension[data->layer_index].w > config->width) ) || (shared->primary_dimension[data->layer_index].h && (shared->primary_dimension[data->layer_index].h > config->height ))) { D_DEBUG_AT( DRMKMS_Layer, " -> rejecting layer that is smaller than the screen (drm/kms limitation)\n" ); if (ret_failed) *ret_failed = CLRCF_WIDTH | CLRCF_HEIGHT; return DFB_UNSUPPORTED; } return DFB_OK; } static DFBResult drmkmsSetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { int ret; DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; DRMKMSLayerData *data = layer_data; int index = data->layer_index; D_DEBUG_AT( DRMKMS_Layer, "%s()\n", __FUNCTION__ ); if (updated & (CLRCF_WIDTH | CLRCF_HEIGHT | CLRCF_BUFFERMODE | CLRCF_SOURCE)) { int i; for (i=0; ienabled_crtcs; i++) { if (shared->mirror_outputs) index = i; if (shared->clone_outputs) { ret = drmModeSetCrtc( drmkms->fd, drmkms->encoder[index]->crtc_id, (u32)(long)left_lock->handle, config->source.x, config->source.y, shared->cloned_connectors, shared->cloned_count, &shared->mode[index] ); } else { ret = drmModeSetCrtc( drmkms->fd, drmkms->encoder[index]->crtc_id, (u32)(long)left_lock->handle, config->source.x, config->source.y, &drmkms->connector[index]->connector_id, 1, &shared->mode[index] ); } if (ret) { D_PERROR( "DirectFB/DRMKMS: drmModeSetCrtc() failed! (%d)\n", ret ); D_DEBUG_AT( DRMKMS_Mode, " crtc_id: %d connector_id %d, mode %dx%d\n", drmkms->encoder[index]->crtc_id, drmkms->connector[index]->connector_id, shared->mode[index].hdisplay, shared->mode[index].vdisplay ); return DFB_FAILURE; } if (!shared->mirror_outputs) break; } shared->primary_dimension[data->layer_index] = surface->config.size; shared->primary_rect = config->source; shared->primary_fb = (u32)(long)left_lock->handle; } return DFB_OK; } static DFBResult drmkmsUpdateFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock, bool flip ) { int ret, i; DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; DRMKMSLayerData *data = layer_data; D_DEBUG_AT( DRMKMS_Layer, "%s()\n", __FUNCTION__ ); direct_mutex_lock( &data->lock ); while (data->flip_pending) { D_DEBUG_AT( DRMKMS_Layer, " -> waiting for pending flip (previous)\n" ); if (direct_waitqueue_wait_timeout( &data->wq_event, &data->lock, 30000 ) == DR_TIMEOUT) break; } dfb_surface_ref( surface ); data->surface = surface; data->surfacebuffer_index = left_lock->buffer->index; /* Task */ data->pending_task = left_lock->task; D_DEBUG_AT( DRMKMS_Layer, " -> calling drmModePageFlip()\n" ); data->flip_pending = true; ret = drmModePageFlip( drmkms->fd, drmkms->encoder[data->layer_index]->crtc_id, (u32)(long)left_lock->handle, DRM_MODE_PAGE_FLIP_EVENT, layer_data ); if (ret) { D_PERROR( "DirectFB/DRMKMS: drmModePageFlip() failed on layer %d!\n", data->index ); direct_mutex_unlock( &data->lock ); return DFB_FAILURE; } if (shared->mirror_outputs) { for (i=1; ienabled_crtcs; i++) { ret = drmModePageFlip( drmkms->fd, drmkms->encoder[i]->crtc_id, (u32)(long)left_lock->handle, 0, 0); if (ret) D_WARN( "DirectFB/DRMKMS: drmModePageFlip() failed for mirror on crtc id %d!\n", drmkms->encoder[i]->crtc_id ); } } shared->primary_fb = (u32)(long)left_lock->handle; if (flip) dfb_surface_flip( surface, false ); if ((flags & DSFLIP_WAITFORSYNC) == DSFLIP_WAITFORSYNC) { while (data->flip_pending) { D_DEBUG_AT( DRMKMS_Layer, " -> waiting for pending flip (WAITFORSYNC)\n" ); if (direct_waitqueue_wait_timeout( &data->wq_event, &data->lock, 30000 ) == DR_TIMEOUT) break; } } direct_mutex_unlock( &data->lock ); return DFB_OK; } static DFBResult drmkmsFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { return drmkmsUpdateFlipRegion( layer, driver_data, layer_data, region_data, surface, flags, left_update, left_lock, right_update, right_lock, true ); } static DFBResult drmkmsUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { return drmkmsUpdateFlipRegion( layer, driver_data, layer_data, region_data, surface, DSFLIP_ONSYNC, left_update, left_lock, right_update, right_lock, false ); } static int drmkmsLayerDataSize( void ) { return sizeof(DRMKMSLayerData); } static DFBResult drmkmsPlaneInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; DRMKMSLayerData *data = layer_data; drmModeObjectPropertiesPtr props; D_DEBUG_AT( DRMKMS_Layer, "%s()\n", __FUNCTION__ ); data->index = shared->layerplane_index_count++; data->plane_index = shared->plane_index_count++; data->level = data->index; D_DEBUG_AT( DRMKMS_Layer, " -> getting plane with index %d\n", data->plane_index ); data->plane = drmModeGetPlane(drmkms->fd, drmkms->plane_resources->planes[data->plane_index]); D_DEBUG_AT( DRMKMS_Layer, " -> plane_id is %d\n", data->plane->plane_id ); description->type = DLTF_GRAPHICS; description->caps = DLCAPS_SURFACE | DLCAPS_SCREEN_POSITION | DLCAPS_ALPHACHANNEL; description->surface_caps = DSCAPS_NONE; description->surface_accessor = CSAID_LAYER0; snprintf( description->name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "DRMKMS Plane Layer %d", data->plane_index ); config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->width = dfb_config->mode.width ?: shared->mode[0].hdisplay; config->height = dfb_config->mode.height ?: shared->mode[0].vdisplay; config->pixelformat = dfb_config->mode.format ?: DSPF_ARGB; config->buffermode = DLBM_FRONTONLY; props = drmModeObjectGetProperties( drmkms->fd, data->plane->plane_id, DRM_MODE_OBJECT_PLANE ); if (props) { int i; drmModePropertyPtr prop; D_INFO( "DirectFB/DRMKMS: supported properties for layer id %d\n", data->plane->plane_id ); for (i = 0; i < props->count_props; i++) { prop = drmModeGetProperty( drmkms->fd, props->props[i] ); if (!strcmp(prop->name, "colorkey")) { description->caps |= DLCAPS_SRC_COLORKEY; data->colorkey_propid = prop->prop_id; D_INFO( " colorkey\n" ); } else if (!strcmp(prop->name, "zpos")) { description->caps |= DLCAPS_LEVELS; data->zpos_propid = prop->prop_id; D_INFO( " zpos\n" ); drmModeObjectSetProperty( drmkms->fd, data->plane->plane_id, DRM_MODE_OBJECT_PLANE, data->zpos_propid, data->level ); } else if (!strcmp(prop->name, "alpha")) { description->caps |= DLCAPS_OPACITY; data->alpha_propid = prop->prop_id; D_INFO( " alpha\n" ); } drmModeFreeProperty( prop ); } drmModeFreeObjectProperties( props ); } shared->layer_data[data->index] = data; return DFB_OK; } static DFBResult drmkmsPlaneGetLevel( CoreLayer *layer, void *driver_data, void *layer_data, int *level ) { DRMKMSLayerData *data = layer_data; if (level) *level = data->level; return DFB_OK; } static DFBResult drmkmsPlaneSetLevel( CoreLayer *layer, void *driver_data, void *layer_data, int level ) { DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; DRMKMSLayerData *data = layer_data; int ret; if (!data->zpos_propid) return DFB_UNSUPPORTED; if (level < 1 || level > shared->plane_index_count) return DFB_INVARG; ret = drmModeObjectSetProperty( drmkms->fd, data->plane->plane_id, DRM_MODE_OBJECT_PLANE, data->zpos_propid, level ); if (ret) { D_ERROR( "DirectFB/DRMKMS: drmModeObjectSetProperty() failed setting zpos\n"); return DFB_FAILURE; } data->level = level; return DFB_OK; } static DFBResult drmkmsPlaneTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *ret_failed ) { DRMKMSLayerData *data = layer_data; CoreLayerRegionConfigFlags failed = CLRCF_NONE; if ((config->options & DLOP_SRC_COLORKEY) && !data->colorkey_propid) failed |= CLRCF_OPTIONS; if (ret_failed) *ret_failed = failed; if (failed) return DFB_UNSUPPORTED; return DFB_OK; } static DFBResult drmkmsPlaneSetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { int ret; bool unmute = false; DRMKMSData *drmkms = driver_data; DRMKMSLayerData *data = layer_data; D_DEBUG_AT( DRMKMS_Layer, "%s()\n", __FUNCTION__ ); if ((updated & CLRCF_OPACITY) && data->muted && config->opacity) unmute = true; if ((updated & (CLRCF_WIDTH | CLRCF_HEIGHT | CLRCF_BUFFERMODE | CLRCF_DEST | CLRCF_SOURCE)) || unmute) { ret = drmModeSetPlane(drmkms->fd, data->plane->plane_id, drmkms->encoder[0]->crtc_id, (u32)(long)left_lock->handle, /* plane_flags */ 0, config->dest.x, config->dest.y, config->dest.w, config->dest.h, config->source.x << 16, config->source.y <<16, config->source.w << 16, config->source.h << 16); if (ret) { D_INFO( "DirectFB/DRMKMS: drmModeSetPlane(plane_id=%d, fb_id=%d , dest=%d,%d-%dx%d, src=%d,%d-%dx%d) failed! (%d)\n", data->plane->plane_id, (u32)(long)left_lock->handle, DFB_RECTANGLE_VALS(&config->dest), DFB_RECTANGLE_VALS(&config->source), ret ); return DFB_FAILURE; } data->config = config; data->muted = false; } if ((updated & (CLRCF_SRCKEY | CLRCF_OPTIONS)) && data->colorkey_propid) { uint32_t drm_colorkey = config->src_key.r << 16 | config->src_key.g << 8 | config->src_key.b; if (config->options & DLOP_SRC_COLORKEY) drm_colorkey |= 0x01000000; ret = drmModeObjectSetProperty( drmkms->fd, data->plane->plane_id, DRM_MODE_OBJECT_PLANE, data->colorkey_propid, drm_colorkey ); if (ret) { D_ERROR( "DirectFB/DRMKMS: drmModeObjectSetProperty() failed setting colorkey\n"); return DFB_FAILURE; } } if (updated & CLRCF_OPACITY) { if (config->opacity == 0) { ret = drmModeSetPlane(drmkms->fd, data->plane->plane_id, drmkms->encoder[0]->crtc_id, 0, /* plane_flags */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0); if (ret) { D_ERROR( "DirectFB/DRMKMS: drmModeSetPlane() failed disabling plane\n"); return DFB_FAILURE; } data->muted = true; } else if (data->alpha_propid) { ret = drmModeObjectSetProperty( drmkms->fd, data->plane->plane_id, DRM_MODE_OBJECT_PLANE, data->alpha_propid, config->opacity ); if (ret) { D_ERROR( "DirectFB/DRMKMS: drmModeObjectSetProperty() failed setting alpha\n"); return DFB_FAILURE; } } } return DFB_OK; } static DFBResult drmkmsPlaneRemoveRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ) { DFBResult ret; DRMKMSData *drmkms = driver_data; DRMKMSLayerData *data = layer_data; D_DEBUG_AT( DRMKMS_Layer, "%s()\n", __FUNCTION__ ); if (!data->muted) { ret = drmModeSetPlane(drmkms->fd, data->plane->plane_id, drmkms->encoder[0]->crtc_id, 0, /* plane_flags */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0); if (ret) { D_PERROR( "DRMKMS/Layer/Remove: Failed setting plane configuration!\n" ); return ret; } } return DFB_OK; } static DFBResult drmkmsPlaneUpdateFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock, bool flip ) { int ret; DRMKMSData *drmkms = driver_data; DRMKMSLayerData *data = layer_data; D_DEBUG_AT( DRMKMS_Layer, "%s()\n", __FUNCTION__ ); direct_mutex_lock( &data->lock ); while (data->flip_pending) { D_DEBUG_AT( DRMKMS_Layer, " -> waiting for pending flip (previous)\n" ); if (direct_waitqueue_wait_timeout( &data->wq_event, &data->lock, 30000 ) == DR_TIMEOUT) break; } dfb_surface_ref( surface ); data->surface = surface; data->surfacebuffer_index = left_lock->buffer->index; /* Task */ data->pending_task = left_lock->task; if (!data->muted) { ret = drmModeSetPlane(drmkms->fd, data->plane->plane_id, drmkms->encoder[0]->crtc_id, (u32)(long)left_lock->handle, /* plane_flags */ 0, data->config->dest.x, data->config->dest.y, data->config->dest.w, data->config->dest.h, data->config->source.x << 16, data->config->source.y <<16, data->config->source.w << 16, data->config->source.h << 16); if (ret) { D_PERROR( "DRMKMS/Layer/FlipRegion: Failed setting plane configuration!\n" ); direct_mutex_unlock( &data->lock ); return ret; } } if (flip) dfb_surface_flip( surface, false ); data->flip_pending = true; drmVBlank vbl; vbl.request.type = DRM_VBLANK_EVENT | DRM_VBLANK_RELATIVE; vbl.request.signal = (unsigned long)data; vbl.request.sequence = 1; drmWaitVBlank( drmkms->fd, &vbl ); if ((flags & DSFLIP_WAITFORSYNC) == DSFLIP_WAITFORSYNC) { while (data->flip_pending) { D_DEBUG_AT( DRMKMS_Layer, " -> waiting for pending flip (WAITFORSYNC)\n" ); if (direct_waitqueue_wait_timeout( &data->wq_event, &data->lock, 30000 ) == DR_TIMEOUT) break; } } direct_mutex_unlock( &data->lock ); return DFB_OK; } static DFBResult drmkmsPlaneFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { return drmkmsPlaneUpdateFlipRegion( layer, driver_data, layer_data, region_data, surface, flags, left_update, left_lock, right_update, right_lock, true ); } static DFBResult drmkmsPlaneUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { return drmkmsPlaneUpdateFlipRegion( layer, driver_data, layer_data, region_data, surface, DSFLIP_ONSYNC, left_update, left_lock, right_update, right_lock, false ); } static const DisplayLayerFuncs _drmkmsLayerFuncs = { .LayerDataSize = drmkmsLayerDataSize, .InitLayer = drmkmsInitLayer, .TestRegion = drmkmsTestRegion, .SetRegion = drmkmsSetRegion, .FlipRegion = drmkmsFlipRegion, .UpdateRegion = drmkmsUpdateRegion }; static const DisplayLayerFuncs _drmkmsPlaneLayerFuncs = { .LayerDataSize = drmkmsLayerDataSize, .InitLayer = drmkmsPlaneInitLayer, .GetLevel = drmkmsPlaneGetLevel, .SetLevel = drmkmsPlaneSetLevel, .TestRegion = drmkmsPlaneTestRegion, .SetRegion = drmkmsPlaneSetRegion, .RemoveRegion = drmkmsPlaneRemoveRegion, .FlipRegion = drmkmsPlaneFlipRegion, .UpdateRegion = drmkmsPlaneUpdateRegion, }; const DisplayLayerFuncs *drmkmsLayerFuncs = &_drmkmsLayerFuncs; const DisplayLayerFuncs *drmkmsPlaneLayerFuncs = &_drmkmsPlaneLayerFuncs; DirectFB-1.7.7/systems/drmkms/Makefile.in0000644000175000017500000007043612466665316015173 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ $(internalinclude_HEADERS) subdir = systems/drmkms ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" \ "$(DESTDIR)$(internalincludedir)" LTLIBRARIES = $(systems_LTLIBRARIES) libdirectfb_drmkms_system_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_drmkms_system_la_OBJECTS = drmkms_layer.lo \ drmkms_screen.lo drmkms_system.lo drmkms_surface_pool.lo vt.lo libdirectfb_drmkms_system_la_OBJECTS = \ $(am_libdirectfb_drmkms_system_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_drmkms_system_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_drmkms_system_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_drmkms_system_la_SOURCES) DIST_SOURCES = $(libdirectfb_drmkms_system_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systems_DATA) HEADERS = $(internalinclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(DRMKMS_CFLAGS) internalincludedir = $(INTERNALINCLUDEDIR)/drmkms_system internalinclude_HEADERS = \ drmkms_system.h systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_drmkms_system.o systems_LTLIBRARIES = libdirectfb_drmkms_system.la libdirectfb_drmkms_system_la_LDFLAGS = \ -avoid-version \ -module \ $(DRMKMS_LIBS) libdirectfb_drmkms_system_la_SOURCES = \ drmkms_layer.c \ drmkms_screen.c \ drmkms_system.c \ drmkms_surface_pool.c \ vt.c \ vt.h libdirectfb_drmkms_system_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/drmkms/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/drmkms/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_drmkms_system.la: $(libdirectfb_drmkms_system_la_OBJECTS) $(libdirectfb_drmkms_system_la_DEPENDENCIES) $(EXTRA_libdirectfb_drmkms_system_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_drmkms_system_la_LINK) -rpath $(systemsdir) $(libdirectfb_drmkms_system_la_OBJECTS) $(libdirectfb_drmkms_system_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drmkms_layer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drmkms_screen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drmkms_surface_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drmkms_system.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vt.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) install-internalincludeHEADERS: $(internalinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(internalincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(internalincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(internalincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(internalincludedir)" || exit $$?; \ done uninstall-internalincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(internalincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(internalincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-systemsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-internalincludeHEADERS install-systemsDATA \ install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-internalincludeHEADERS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-systemsDATA install-systemsLTLIBRARIES \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/drmkms/drmkms_surface_pool.c0000644000175000017500000006665312463500054017316 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include "drmkms_system.h" D_DEBUG_DOMAIN( DRMKMS_Surfaces, "DRMKMS/Surfaces", "DRMKMS Framebuffer Surface Pool" ); D_DEBUG_DOMAIN( DRMKMS_SurfLock, "DRMKMS/SurfLock", "DRMKMS Framebuffer Surface Pool Locks" ); /**********************************************************************************************************************/ struct kms_bo { struct kms_driver *kms; void *ptr; size_t size; size_t offset; size_t pitch; unsigned handle; }; typedef struct { int magic; } DRMKMSPoolData; typedef struct { int magic; DRMKMSData *drmkms; DirectHash *hash; DirectMutex lock; } DRMKMSPoolLocalData; typedef struct { int magic; unsigned int pitch; int size; int offset; unsigned int handle; int prime_fd; u32 name; #ifdef USE_GBM struct gbm_bo *bo; struct gbm_surface *gs; #else struct kms_bo *bo; #endif uint32_t fb_id; void *addr; } DRMKMSAllocationData; typedef struct { int magic; DRMKMSPoolLocalData *pool_local; DRMKMSAllocationData *alloc; FusionObjectID alloc_id; unsigned int pitch; int size; int offset; unsigned int handle; void *addr; Reaction reaction; #ifdef USE_GBM struct gbm_bo *bo; struct gbm_surface *gs; #else struct kms_bo bo; #endif } DRMKMSAllocationLocalData; /**********************************************************************************************************************/ static int drmkmsPoolDataSize( void ) { return sizeof(DRMKMSPoolData); } static int drmkmsPoolLocalDataSize( void ) { return sizeof(DRMKMSPoolLocalData); } static int drmkmsAllocationDataSize( void ) { return sizeof(DRMKMSAllocationData); } static DFBResult InitLocal( DRMKMSPoolLocalData *local, CoreDFB *core ) { direct_hash_create( 17, &local->hash ); direct_mutex_init( &local->lock ); return DFB_OK; } static void DeinitLocal( DRMKMSPoolLocalData *local ) { direct_mutex_init( &local->lock ); direct_hash_destroy( local->hash ); } static DFBResult drmkmsInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { DRMKMSPoolData *data = pool_data; DRMKMSPoolLocalData *local = pool_local; DRMKMSData *drmkms = system_data; D_DEBUG_AT( DRMKMS_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( data != NULL ); D_ASSERT( local != NULL ); D_ASSERT( drmkms != NULL ); D_ASSERT( drmkms->shared != NULL ); D_ASSERT( ret_desc != NULL ); ret_desc->caps = CSPCAPS_VIRTUAL; ret_desc->access[CSAID_CPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_ULTIMATE; ret_desc->size = dfb_config->video_length; /* For hardware layers */ ret_desc->access[CSAID_LAYER0] = CSAF_READ; ret_desc->access[CSAID_LAYER1] = CSAF_READ; ret_desc->access[CSAID_LAYER2] = CSAF_READ; ret_desc->access[CSAID_LAYER3] = CSAF_READ; ret_desc->access[CSAID_LAYER4] = CSAF_READ; ret_desc->access[CSAID_LAYER5] = CSAF_READ; ret_desc->access[CSAID_LAYER6] = CSAF_READ; ret_desc->access[CSAID_LAYER7] = CSAF_READ; ret_desc->access[CSAID_LAYER8] = CSAF_READ; ret_desc->access[CSAID_LAYER9] = CSAF_READ; ret_desc->access[CSAID_LAYER10] = CSAF_READ; ret_desc->access[CSAID_LAYER11] = CSAF_READ; ret_desc->access[CSAID_LAYER12] = CSAF_READ; ret_desc->access[CSAID_LAYER13] = CSAF_READ; ret_desc->access[CSAID_LAYER14] = CSAF_READ; ret_desc->access[CSAID_LAYER15] = CSAF_READ; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "DRMKMS" ); local->drmkms = drmkms; InitLocal( local, core ); D_MAGIC_SET( data, DRMKMSPoolData ); D_MAGIC_SET( local, DRMKMSPoolLocalData ); return DFB_OK; } static DFBResult drmkmsJoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { DRMKMSPoolData *data = pool_data; DRMKMSPoolLocalData *local = pool_local; DRMKMSData *drmkms = system_data; D_DEBUG_AT( DRMKMS_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DRMKMSPoolData ); D_ASSERT( local != NULL ); D_ASSERT( drmkms != NULL ); D_ASSERT( drmkms->shared != NULL ); (void) data; local->drmkms = drmkms; InitLocal( local, core ); D_MAGIC_SET( local, DRMKMSPoolLocalData ); return DFB_OK; } static DFBResult drmkmsDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { DRMKMSPoolData *data = pool_data; DRMKMSPoolLocalData *local = pool_local; D_DEBUG_AT( DRMKMS_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DRMKMSPoolData ); D_MAGIC_ASSERT( local, DRMKMSPoolLocalData ); DeinitLocal( local ); D_MAGIC_CLEAR( data ); D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult drmkmsLeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { DRMKMSPoolData *data = pool_data; DRMKMSPoolLocalData *local = pool_local; D_DEBUG_AT( DRMKMS_Surfaces, "%s()\n", __FUNCTION__ ); (void) data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DRMKMSPoolData ); D_MAGIC_ASSERT( local, DRMKMSPoolLocalData ); DeinitLocal( local ); D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult drmkmsTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { CoreSurface *surface; DRMKMSPoolData *data = pool_data; DRMKMSPoolLocalData *local = pool_local; (void)data; (void)local; D_DEBUG_AT( DRMKMS_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DRMKMSPoolData ); D_MAGIC_ASSERT( local, DRMKMSPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); switch (surface->config.format) { case DSPF_ARGB: case DSPF_RGB32: case DSPF_RGB16: case DSPF_RGB555: case DSPF_ARGB1555: case DSPF_RGB332: case DSPF_RGB24: case DSPF_A8: case DSPF_UYVY: case DSPF_YUY2: case DSPF_NV12: case DSPF_NV21: case DSPF_NV16: break; default: D_ERROR( "DirectFB/DRMKMS: unsupported pixelformat!\n" ); return DFB_UNSUPPORTED; } return DFB_OK; } static DFBResult drmkmsAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { int ret; int pitch; int length; CoreGraphicsDevice *device; CoreSurface *surface; DRMKMSPoolData *data = pool_data; DRMKMSPoolLocalData *local = pool_local; DRMKMSAllocationData *alloc = alloc_data; DRMKMSData *drmkms; u32 drm_format; u32 drm_fake_width; u32 drm_fake_height; (void)data; (void)local; D_DEBUG_AT( DRMKMS_Surfaces, "%s( allocation %p )\n", __FUNCTION__, allocation ); D_DEBUG_AT( DRMKMS_Surfaces, " -> %s\n", ToString_CoreSurfaceAllocation( allocation ) ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DRMKMSPoolData ); D_MAGIC_ASSERT( local, DRMKMSPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); drmkms = local->drmkms; D_ASSERT( drmkms != NULL ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); /* FIXME: Only one global device at the moment. */ device = dfb_core_get_part( core_dfb, DFCP_GRAPHICS ); D_ASSERT( device != NULL ); dfb_gfxcard_calc_buffer_size( device, buffer, &pitch, &length ); drm_fake_width = (pitch + 3) >> 2; drm_fake_height = surface->config.size.h; switch (surface->config.format) { case DSPF_ARGB: drm_format = DRM_FORMAT_ARGB8888; break; case DSPF_RGB32: drm_format = DRM_FORMAT_XRGB8888; break; case DSPF_RGB16: drm_format = DRM_FORMAT_RGB565; break; case DSPF_RGB555: drm_format = DRM_FORMAT_XRGB1555; break; case DSPF_ARGB1555: drm_format = DRM_FORMAT_ARGB1555; break; case DSPF_RGB332: drm_format = DRM_FORMAT_RGB332; break; case DSPF_RGB24: drm_format = DRM_FORMAT_RGB888; break; case DSPF_A8: drm_format = DRM_FORMAT_C8; break; case DSPF_UYVY: drm_format = DRM_FORMAT_UYVY; break; case DSPF_YUY2: drm_format = DRM_FORMAT_YUYV; break; case DSPF_NV12: drm_format = DRM_FORMAT_NV12; drm_fake_height = (surface->config.size.h * 3 + 1) >> 1; break; case DSPF_NV21: drm_format = DRM_FORMAT_NV21; drm_fake_height = (surface->config.size.h * 3 + 1) >> 1; break; case DSPF_NV16: drm_format = DRM_FORMAT_NV16; drm_fake_height = surface->config.size.h << 2; break; default: D_ERROR( "DirectFB/DRMKMS: unsupported pixelformat!\n" ); return DFB_FAILURE; } #ifdef USE_GBM alloc->bo = gbm_bo_create( drmkms->gbm, drm_fake_width, drm_Fake_height, GBM_BO_FORMAT_ARGB8888, GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING ); alloc->handle = gbm_bo_get_handle( alloc->bo ).u32; alloc->pitch = gbm_bo_get_stride( alloc->bo ); #else unsigned attr[] = { KMS_BO_TYPE, KMS_BO_TYPE_SCANOUT_X8R8G8B8, KMS_WIDTH, drm_fake_width, KMS_HEIGHT, drm_fake_height, KMS_TERMINATE_PROP_LIST }; ret = kms_bo_create(drmkms->kms, attr, &alloc->bo); if (ret) { D_ERROR( "DirectFB/DRMKMS: kms_bo_create( '%s' ) failed (%s)!\n", ToString_CoreSurfaceAllocation( allocation ), strerror(-ret) ); ret = errno2result( -ret ); goto error; } kms_bo_get_prop(alloc->bo, KMS_HANDLE, &alloc->handle); kms_bo_get_prop(alloc->bo, KMS_PITCH, &alloc->pitch); #endif alloc->size = alloc->pitch * drm_fake_height; D_DEBUG_AT( DRMKMS_Surfaces, " -> bo %p\n", alloc->bo ); D_DEBUG_AT( DRMKMS_Surfaces, " -> bo.handle %u\n", alloc->handle ); D_DEBUG_AT( DRMKMS_Surfaces, " -> bo.pitch %u\n", alloc->pitch ); D_DEBUG_AT( DRMKMS_Surfaces, " -> size %u\n", alloc->size ); if (drmkms->shared->use_prime_fd) { // this seems to render the handle unusable on radeon ret = drmPrimeHandleToFD( drmkms->fd, alloc->handle, DRM_CLOEXEC, &alloc->prime_fd ); if (ret) { ret = errno2result( errno ); D_ERROR( "DirectFB/DRMKMS: drmPrimeHandleToFD( %u '%s' ) failed (%s)!\n", alloc->handle, ToString_CoreSurfaceAllocation( allocation ), strerror(errno) ); goto error; } D_DEBUG_AT( DRMKMS_Surfaces, " -> prime_fd %d\n", alloc->prime_fd ); } struct drm_gem_flink fl; fl.handle = alloc->handle; fl.name = 0; ret = drmIoctl( drmkms->fd, DRM_IOCTL_GEM_FLINK, &fl ); if (ret) { ret = errno2result( errno ); D_ERROR( "DirectFB/DRMKMS: DRM_IOCTL_GEM_FLINK( %u '%s' ) failed (%s)!\n", alloc->handle, ToString_CoreSurfaceAllocation( allocation ), strerror(errno) ); goto error; } alloc->name = fl.name; D_DEBUG_AT( DRMKMS_Surfaces, " -> name %d\n", alloc->name ); allocation->size = alloc->size; allocation->offset = (unsigned long) alloc->prime_fd; /* * Mode Framebuffer */ if (surface->type & (CSTF_LAYER | CSTF_WINDOW)) { u32 drm_bo_offsets[4] = {0,0,0,0}; u32 drm_bo_handles[4] = {0,0,0,0}; u32 drm_bo_pitches[4] = {0,0,0,0}; drm_bo_handles[0] = drm_bo_handles[1] = drm_bo_handles[2] = drm_bo_handles[3] = alloc->handle; drm_bo_pitches[0] = drm_bo_pitches[1] = drm_bo_pitches[2] = drm_bo_pitches[3] = alloc->pitch; drm_bo_offsets[1] = surface->config.size.h * alloc->pitch; ret = drmModeAddFB2( drmkms->fd, surface->config.size.w, surface->config.size.h, drm_format, drm_bo_handles, drm_bo_pitches, drm_bo_offsets, &alloc->fb_id, 0 ); if (ret) { ret = errno2result( errno ); D_ERROR( "DirectFB/DRMKMS: drmModeAddFB2( %u '%s' ) failed (%s)!\n", alloc->handle, ToString_CoreSurfaceAllocation( allocation ), strerror(errno) ); goto error; } D_DEBUG_AT( DRMKMS_Surfaces, " -> fb_id %u\n", alloc->fb_id ); } #ifdef USE_GBM //FIXME use gbm instead of ioctl struct drm_i915_gem_mmap_gtt arg; memset(&arg, 0, sizeof(arg)); arg.handle = alloc->handle; drmCommandWriteRead( drmkms->fd, DRM_I915_GEM_MMAP_GTT, &arg, sizeof( arg ) ); alloc->addr = mmap( 0, alloc->size, PROT_READ | PROT_WRITE, MAP_SHARED, drmkms->fd, arg.offset ); #else ret = kms_bo_map( alloc->bo, &alloc->addr ); if (ret) { ret = errno2result( errno ); D_ERROR( "DirectFB/DRMKMS: kms_bo_map( %u '%s' ) failed (%s)!\n", alloc->handle, ToString_CoreSurfaceAllocation( allocation ), strerror(errno) ); goto error; } #endif D_DEBUG_AT( DRMKMS_Surfaces, " -> addr %p (mapped)\n", alloc->addr ); D_MAGIC_SET( alloc, DRMKMSAllocationData ); return DFB_OK; error: #ifdef USE_GBM // FIXME: unmap in GBM case #else if (alloc->addr) kms_bo_unmap( alloc->addr ); #endif if (alloc->fb_id) drmModeRmFB( drmkms->fd, alloc->fb_id ); if (alloc->prime_fd) close( alloc->prime_fd ); #ifdef USE_GBM gbm_bo_destroy( alloc->bo ); #else kms_bo_destroy( &alloc->bo ); #endif return ret; } static DFBResult drmkmsDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { DRMKMSPoolData *data = pool_data; DRMKMSAllocationData *alloc = alloc_data; DRMKMSPoolLocalData *local = pool_local; (void)data; D_DEBUG_AT( DRMKMS_Surfaces, "%s( allocation %p )\n", __FUNCTION__, allocation ); D_DEBUG_AT( DRMKMS_Surfaces, " -> %s\n", ToString_CoreSurfaceAllocation( allocation ) ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DRMKMSPoolData ); D_MAGIC_ASSERT( alloc, DRMKMSAllocationData ); if (!dfb_config->task_manager) dfb_gfxcard_sync(); D_DEBUG_AT( DRMKMS_Surfaces, " -> bo %p\n", alloc->bo ); D_DEBUG_AT( DRMKMS_Surfaces, " -> bo.handle %u\n", alloc->handle ); D_DEBUG_AT( DRMKMS_Surfaces, " -> bo.pitch %u\n", alloc->pitch ); D_DEBUG_AT( DRMKMS_Surfaces, " -> size %u\n", alloc->size ); D_DEBUG_AT( DRMKMS_Surfaces, " -> prime_fd %d\n", alloc->prime_fd ); D_DEBUG_AT( DRMKMS_Surfaces, " -> fb_id %u\n", alloc->fb_id ); D_DEBUG_AT( DRMKMS_Surfaces, " -> addr %p (mapped)\n", alloc->addr ); #ifdef USE_GBM // FIXME: unmap in GBM case #else if (alloc->addr) kms_bo_unmap( alloc->bo ); #endif if (alloc->fb_id) drmModeRmFB( local->drmkms->fd, alloc->fb_id ); if (alloc->prime_fd) close( alloc->prime_fd ); #ifdef USE_GBM gbm_bo_destroy( alloc->bo ); #else kms_bo_destroy( &alloc->bo ); #endif D_MAGIC_CLEAR( alloc ); return DFB_OK; } static ReactionResult drmkmsAllocationReaction( const void *msg_data, void *ctx ) { const CoreSurfaceAllocationNotification *notification = msg_data; DRMKMSAllocationLocalData *local = ctx; D_DEBUG_AT( DRMKMS_Surfaces, "%s( local %p )\n", __FUNCTION__, local ); D_MAGIC_ASSERT( local, DRMKMSAllocationLocalData ); if (notification->flags & CSANF_DEALLOCATED) { D_DEBUG_AT( DRMKMS_Surfaces, " -> DEALLOCATED\n" ); struct drm_gem_close cl; cl.handle = local->handle; drmIoctl( local->pool_local->drmkms->fd, DRM_IOCTL_GEM_CLOSE, &cl ); #ifdef USE_GBM // FIXME: unmap in GBM case #else if (local->addr) kms_bo_unmap( &local->bo ); #endif direct_mutex_lock( &local->pool_local->lock ); direct_hash_remove( local->pool_local->hash, (unsigned long) local->alloc_id ); direct_mutex_unlock( &local->pool_local->lock ); D_MAGIC_CLEAR( local ); D_FREE( local ); return RS_REMOVE; } return RS_OK; } static DFBResult drmkmsLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { DFBResult ret; DRMKMSPoolLocalData *local = pool_local; DRMKMSAllocationData *alloc = alloc_data; DRMKMSData *drmkms; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, DRMKMSAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( DRMKMS_SurfLock, "%s( allocation %p )\n", __FUNCTION__, allocation ); D_DEBUG_AT( DRMKMS_Surfaces, " -> %s\n", ToString_CoreSurfaceAllocation( allocation ) ); drmkms = local->drmkms; D_ASSERT( drmkms != NULL ); lock->pitch = alloc->pitch; lock->offset = ~0; lock->addr = dfb_core_is_master( core_dfb ) ? alloc->addr : NULL; lock->phys = 0; D_DEBUG_AT( DRMKMS_SurfLock, "%s( allocation %p )\n", __FUNCTION__, allocation ); switch (lock->accessor) { case CSAID_LAYER0: lock->handle = (void*) (long) alloc->fb_id; break; case CSAID_GPU: if (drmkms->shared->use_prime_fd) lock->offset = (unsigned long) alloc->prime_fd; lock->handle = (void*) (long) alloc->handle; break; case CSAID_CPU: if (!dfb_core_is_master( core_dfb )) { #ifdef USE_GBM //FIXME use gbm instead of ioctl struct drm_i915_gem_mmap_gtt arg; memset(&arg, 0, sizeof(arg)); arg.handle = alloc->handle; drmCommandWriteRead( local->drmkms->fd, DRM_I915_GEM_MMAP_GTT, &arg, sizeof( arg ) ); lock->addr = mmap( 0, alloc->size, PROT_READ | PROT_WRITE, MAP_SHARED, local->drmkms->fd, arg.offset ); #else DRMKMSAllocationLocalData *alloc_local; alloc_local = direct_hash_lookup( local->hash, (unsigned long) allocation->object.id ); if (!alloc_local) { alloc_local = D_CALLOC( 1, sizeof(DRMKMSAllocationLocalData) + 1024 /* for kms driver private data */ ); if (!alloc_local) return D_OOM(); alloc_local->bo.kms = drmkms->kms; alloc_local->bo.size = alloc->size; alloc_local->bo.offset = alloc->offset; alloc_local->bo.pitch = alloc->pitch; alloc_local->pool_local = local; alloc_local->alloc = alloc; alloc_local->alloc_id = allocation->object.id; alloc_local->pitch = alloc->pitch; alloc_local->size = alloc->size; alloc_local->offset = alloc->offset; struct drm_gem_open op; op.name = alloc->name; op.handle = 0; ret = drmIoctl( drmkms->fd, DRM_IOCTL_GEM_OPEN, &op ); if (ret) { ret = errno2result( errno ); D_ERROR( "DirectFB/DRMKMS: DRM_IOCTL_GEM_OPEN( %u '%s' ) failed (%s)!\n", alloc->handle, ToString_CoreSurfaceAllocation( allocation ), strerror(errno) ); D_FREE( alloc_local ); return ret; } alloc_local->bo.handle = op.handle; D_DEBUG_AT( DRMKMS_Surfaces, " -> bo.handle %u\n", alloc_local->bo.handle ); ret = kms_bo_map( &alloc_local->bo, &alloc_local->addr ); if (ret) { ret = errno2result( errno ); D_ERROR( "DirectFB/DRMKMS: kms_bo_map( %u '%s' ) failed (%s)!\n", alloc->handle, ToString_CoreSurfaceAllocation( allocation ), strerror(errno) ); struct drm_gem_close cl; cl.handle = alloc_local->bo.handle; drmIoctl( drmkms->fd, DRM_IOCTL_GEM_CLOSE, &cl ); D_FREE( alloc_local ); return ret; } D_DEBUG_AT( DRMKMS_Surfaces, " -> mapped to %p\n", alloc_local->addr ); D_MAGIC_SET( alloc_local, DRMKMSAllocationLocalData ); direct_hash_insert( local->hash, (unsigned long) allocation->object.id, alloc_local ); dfb_surface_allocation_attach( allocation, drmkmsAllocationReaction, alloc_local, &alloc_local->reaction ); } else D_MAGIC_ASSERT( alloc_local, DRMKMSAllocationLocalData ); lock->addr = alloc_local->addr; #endif } break; default: D_BUG( "unsupported accessor %d", lock->accessor ); break; } D_DEBUG_AT( DRMKMS_SurfLock, " -> offset %lu, pitch %d, addr %p, phys 0x%08lx\n", lock->offset, lock->pitch, lock->addr, lock->phys ); return DFB_OK; } static DFBResult drmkmsUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { DRMKMSAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, DRMKMSAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); (void) alloc; D_DEBUG_AT( DRMKMS_SurfLock, "%s( allocation %p )\n", __FUNCTION__, allocation ); D_DEBUG_AT( DRMKMS_Surfaces, " -> %s\n", ToString_CoreSurfaceAllocation( allocation ) ); switch (lock->accessor) { case CSAID_LAYER0: case CSAID_GPU: break; case CSAID_CPU: if (!dfb_core_is_master( core_dfb )) { #ifdef USE_GBM // FIXME: unmap in GBM case #else #endif } break; default: D_BUG( "unsupported accessor %d", lock->accessor ); break; } return DFB_OK; } const SurfacePoolFuncs drmkmsSurfacePoolFuncs = { .PoolDataSize = drmkmsPoolDataSize, .PoolLocalDataSize = drmkmsPoolLocalDataSize, .AllocationDataSize = drmkmsAllocationDataSize, .InitPool = drmkmsInitPool, .JoinPool = drmkmsJoinPool, .DestroyPool = drmkmsDestroyPool, .LeavePool = drmkmsLeavePool, .TestConfig = drmkmsTestConfig, .AllocateBuffer = drmkmsAllocateBuffer, .DeallocateBuffer = drmkmsDeallocateBuffer, .Lock = drmkmsLock, .Unlock = drmkmsUnlock }; DirectFB-1.7.7/systems/drmkms/drmkms_screen.c0000644000175000017500000005462312463500054016106 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include "drmkms_system.h" D_DEBUG_DOMAIN( DRMKMS_Screen, "DRMKMS/Screen", "DRM/KMS Screen" ); /**********************************************************************************************************************/ static DFBResult drmkmsInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; drmModeRes *resources; drmModeConnector *connector = NULL; drmModeEncoder *encoder = NULL; uint32_t crtc = 0; int i, j, k, l, found; description->caps = DSCCAPS_MIXERS | DSCCAPS_ENCODERS | DSCCAPS_OUTPUTS; shared->enabled_crtcs = 0; direct_snputs( description->name, "DRMKMS Screen", DFB_SCREEN_DESC_NAME_LENGTH ); resources = drmkms->resources; D_INFO( "DirectFB/DRMKMS: Got %d connectors, %d encoders\n", resources->count_connectors, resources->count_encoders ); for (i = 0; i < resources->count_connectors; i++) { crtc = 0; connector = drmModeGetConnector( drmkms->fd, resources->connectors[i] ); if (!connector) continue; if ((connector->connection == DRM_MODE_CONNECTED || connector->connection == DRM_MODE_UNKNOWNCONNECTION) && connector->count_modes > 0) { D_INFO( "DirectFB/DRMKMS: found connected connector id %d.\n", connector->connector_id ); if (connector->encoder_id) { D_INFO( "DirectFB/DRMKMS: connector %d is already bound to encoder %d.\n", connector->connector_id, connector->encoder_id ); encoder = drmModeGetEncoder(drmkms->fd, connector->encoder_id); } if (encoder) crtc = encoder->crtc_id; if (crtc) D_INFO( "DirectFB/DRMKMS: encoder %d is already bound to ctrc %d.\n", connector->encoder_id, encoder->crtc_id ); else { D_INFO( "DirectFB/DRMKMS: Seaching for appropriate encoder/crtc for connector %d.\n", connector->connector_id ); for (j = 0; j < resources->count_encoders; j++) { int busy = 0; encoder = drmModeGetEncoder( drmkms->fd, resources->encoders[j] ); if (encoder == NULL) continue; for (k=0; kenabled_crtcs; k++) { if (drmkms->encoder[k]->encoder_id == encoder->encoder_id) { D_INFO( "DirectFB/DRMKMS: encoder %d is already in use by connector %d\n", encoder->encoder_id, drmkms->connector[k]->connector_id ); busy = 1; } } if (busy) continue; found = 0; for (k = 0; k < resources->count_crtcs; k++) { busy = 0; if (!(encoder->possible_crtcs & (1 << k))) continue; for (l=0; lenabled_crtcs; l++) { if (drmkms->encoder[l]->crtc_id == resources->crtcs[k]) busy = 1; } if (busy) continue; crtc = resources->crtcs[k]; D_INFO( "DirectFB/DRMKMS: using encoder %d and crtc %d for connector %d.\n", encoder->encoder_id, crtc, connector->connector_id ); found = 1; break; } if (found) break; } } if (encoder && crtc) { drmkms->connector[shared->enabled_crtcs] = connector; drmkms->encoder[shared->enabled_crtcs] = encoder; drmkms->encoder[shared->enabled_crtcs]->crtc_id = crtc; shared->mode[shared->enabled_crtcs] = connector->modes[0]; shared->enabled_crtcs++; if (!shared->multihead && !shared->mirror_outputs) break; if (shared->multihead && shared->enabled_crtcs > 1) { dfb_layers_register( drmkms->screen, drmkms, drmkmsLayerFuncs ); DFB_DISPLAYLAYER_IDS_ADD( drmkms->layer_ids[shared->enabled_crtcs-1], drmkms->layer_id_next++ ); } } else if (encoder) drmModeFreeEncoder( encoder ); encoder = NULL; } else drmModeFreeConnector( connector ); } if (!shared->enabled_crtcs) { D_ERROR( "DirectFB/DRMKMS: No currently active connector found.\n"); return DFB_INIT; } if (dfb_config->mode.width && dfb_config->mode.height) { drmModeModeInfo *mode = drmkms_find_mode( 0, dfb_config->mode.width, dfb_config->mode.height, 0 ); if (mode) shared->mode[0] = *mode; } if (shared->mirror_outputs || (dfb_config->mode.width && dfb_config->mode.height)) { for (int i=1; ienabled_crtcs; i++) shared->mode[i] = shared->mode[0]; } if (shared->clone_outputs) { if (drmkms->encoder[0]->possible_clones) { for (i = 0; i < resources->count_crtcs; i++) { if (drmkms->encoder[0]->possible_clones & (1 << i)) { shared->cloned_connectors[shared->cloned_count++] = resources->connectors[0]; shared->cloned_connectors[shared->cloned_count++] = resources->connectors[1]; D_INFO( "DirectFB/DRMKMS: cloning on connector %d and %d enabled \n", resources->connectors[0], resources->connectors[1]); break; } } if (shared->cloned_count < 2) { D_WARN( "DirectFB/DRMKMS: cloning is not possible on enough connectors, disabling.\n" ); shared->cloned_count = 0; shared->clone_outputs = false; } } else { D_WARN( "DirectFB/DRMKMS: cloning is not possible, disabling.\n" ); shared->clone_outputs = false; } } D_INFO( "DirectFB/DRMKMS: Default mode is %dx%d, we have %d modes in total\n", shared->mode[0].hdisplay, shared->mode[0].vdisplay, drmkms->connector[0]->count_modes ); drmkms->resources = resources; drmkms->saved_crtc = drmModeGetCrtc( drmkms->fd, drmkms->encoder[0]->crtc_id ); description->mixers = shared->enabled_crtcs; description->outputs = shared->enabled_crtcs; description->encoders = shared->enabled_crtcs; return DFB_OK; } static DFBResult drmkmsGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; *ret_width = shared->mode[0].hdisplay; *ret_height = shared->mode[0].vdisplay; return DFB_OK; } static DFBResult drmkmsInitMixer( CoreScreen *screen, void *driver_data, void *screen_data, int mixer, DFBScreenMixerDescription *description, DFBScreenMixerConfig *config ) { DRMKMSData *drmkms = driver_data; D_DEBUG_AT( DRMKMS_Screen, "%s()\n", __FUNCTION__ ); direct_snputs( description->name, "DRMKMS Mixer", DFB_SCREEN_ENCODER_DESC_NAME_LENGTH ); description->caps = DSMCAPS_FULL | DSMCAPS_SUB_LAYERS; description->layers = drmkms->layer_ids[mixer]; description->sub_layers = description->layers; config->flags = DSMCONF_LAYERS; config->layers = description->layers; return DFB_OK; } static DFBResult drmkmsSetMixerConfig( CoreScreen *screen, void *driver_data, void *screen_data, int mixer, const DFBScreenMixerConfig *config ) { D_DEBUG_AT( DRMKMS_Screen, "%s()\n", __FUNCTION__ ); if (config->flags & DSMCONF_LAYERS) { D_DEBUG_AT( DRMKMS_Screen, " -> requested layers 0x%04x\n", config->layers ); } return DFB_OK; } static DFBResult drmkmsTestMixerConfig( CoreScreen *screen, void *driver_data, void *screen_data, int mixer, const DFBScreenMixerConfig *config, DFBScreenMixerConfigFlags *failed ) { D_DEBUG_AT( DRMKMS_Screen, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult drmkmsInitEncoder( CoreScreen *screen, void *driver_data, void *screen_data, int encoder, DFBScreenEncoderDescription *description, DFBScreenEncoderConfig *config ) { DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; D_DEBUG_AT( DRMKMS_Screen, "%s()\n", __FUNCTION__ ); direct_snputs( description->name, "DRMKMS Encoder", DFB_SCREEN_ENCODER_DESC_NAME_LENGTH ); description->caps = DSECAPS_RESOLUTION | DSECAPS_FREQUENCY; switch (drmkms->encoder[encoder]->encoder_type) { case DRM_MODE_ENCODER_DAC: description->type = DSET_CRTC; break; case DRM_MODE_ENCODER_LVDS: case DRM_MODE_ENCODER_TMDS: description->type = DSET_DIGITAL; break; case DRM_MODE_ENCODER_TVDAC: description->type = DSET_TV; break; default: description->type = DSET_UNKNOWN; } description->all_resolutions = drmkms_modes_to_dsor_bitmask( encoder ); config->flags = DSECONF_RESOLUTION | DSECONF_FREQUENCY | DSECONF_MIXER; config->mixer = encoder; drmkms_mode_to_dsor_dsef( &shared->mode[encoder], &config->resolution, &config->frequency ); return DFB_OK; } static DFBResult drmkmsSetEncoderConfig( CoreScreen *screen, void *driver_data, void *screen_data, int encoder, const DFBScreenEncoderConfig *config ) { int ret = 0; DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; DFBScreenEncoderFrequency dse_freq; DFBScreenOutputResolution dso_res; D_DEBUG_AT( DRMKMS_Screen, "%s()\n", __FUNCTION__ ); if (!(config->flags & (DSECONF_FREQUENCY | DSECONF_RESOLUTION))) return DFB_INVARG; drmkms_mode_to_dsor_dsef( &shared->mode[encoder], &dso_res, &dse_freq ); if (config->flags & DSECONF_FREQUENCY) { D_DEBUG_AT( DRMKMS_Screen, " -> requested frequency change \n" ); dse_freq = config->frequency; } if (config->flags & DSECONF_RESOLUTION) { D_DEBUG_AT( DRMKMS_Screen, " -> requested resolution change \n" ); dso_res = config->resolution; } drmModeModeInfo *videomode = drmkms_dsor_freq_to_mode( encoder, dso_res, dse_freq ); if (!videomode) return DFB_INVARG; if ((shared->primary_dimension[encoder].w && (shared->primary_dimension[encoder].w < videomode->hdisplay) ) || (shared->primary_dimension[encoder].h && (shared->primary_dimension[encoder].h < videomode->vdisplay ))) { D_DEBUG_AT( DRMKMS_Screen, " -> cannot switch to mode to something that is bigger than the current primary layer\n" ); return DFB_INVARG; } if (shared->primary_fb) ret = drmModeSetCrtc( drmkms->fd, drmkms->encoder[encoder]->crtc_id, shared->primary_fb, shared->primary_rect.x, shared->primary_rect.y, &drmkms->connector[encoder]->connector_id, 1, videomode ); if (ret) { D_DEBUG_AT( DRMKMS_Screen, " crtc_id: %d connector_id %d, mode %dx%d\n", drmkms->encoder[encoder]->crtc_id, drmkms->connector[encoder]->connector_id, shared->mode[encoder].hdisplay, shared->mode[encoder].vdisplay ); D_PERROR( "DirectFB/DRMKMS: drmModeSetCrtc() failed! (%d)\n", ret ); return DFB_FAILURE; } shared->mode[encoder] = *videomode; return DFB_OK; } static DFBResult drmkmsTestEncoderConfig( CoreScreen *screen, void *driver_data, void *screen_data, int encoder, const DFBScreenEncoderConfig *config, DFBScreenEncoderConfigFlags *failed ) { DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; DFBScreenEncoderFrequency dse_freq; DFBScreenOutputResolution dso_res; D_DEBUG_AT( DRMKMS_Screen, "%s()\n", __FUNCTION__ ); if (!(config->flags & (DSECONF_FREQUENCY | DSECONF_RESOLUTION))) return DFB_UNSUPPORTED; drmkms_mode_to_dsor_dsef( &shared->mode[encoder], &dso_res, &dse_freq ); if (config->flags & DSECONF_FREQUENCY) dse_freq = config->frequency; if (config->flags & DSECONF_RESOLUTION) dso_res = config->resolution; drmModeModeInfo *videomode = drmkms_dsor_freq_to_mode( encoder, dso_res, dse_freq ); if (!videomode) { *failed = config->flags & (DSECONF_RESOLUTION | DSECONF_FREQUENCY); return DFB_UNSUPPORTED; } if ((shared->primary_dimension[encoder].w && (shared->primary_dimension[encoder].w < videomode->hdisplay) ) || (shared->primary_dimension[encoder].h && (shared->primary_dimension[encoder].h < videomode->vdisplay ))) { D_DEBUG_AT( DRMKMS_Screen, " -> cannot switch to mode to something that is bigger than the current primary layer\n" ); *failed = config->flags & (DSECONF_RESOLUTION | DSECONF_FREQUENCY); return DFB_UNSUPPORTED; } return DFB_OK; } static DFBResult drmkmsInitOutput( CoreScreen *screen, void *driver_data, void *screen_data, int output, DFBScreenOutputDescription *description, DFBScreenOutputConfig *config ) { DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; D_DEBUG_AT( DRMKMS_Screen, "%s()\n", __FUNCTION__ ); direct_snputs( description->name, "DRMKMS Output", DFB_SCREEN_OUTPUT_DESC_NAME_LENGTH ); description->caps = DSOCAPS_RESOLUTION; switch (drmkms->connector[output]->connector_type) { case DRM_MODE_CONNECTOR_VGA: description->all_connectors = DSOC_VGA; description->all_signals = DSOS_VGA; break; case DRM_MODE_CONNECTOR_SVIDEO: description->all_connectors = DSOC_YC; description->all_signals = DSOS_YC; break; case DRM_MODE_CONNECTOR_Composite: description->all_connectors = DSOC_CVBS; description->all_signals = DSOS_CVBS; break; case DRM_MODE_CONNECTOR_Component: description->all_connectors = DSOC_COMPONENT; description->all_signals = DSOS_YCBCR; break; case DRM_MODE_CONNECTOR_HDMIA: case DRM_MODE_CONNECTOR_HDMIB: description->all_connectors = DSOC_HDMI; description->all_signals = DSOS_HDMI; break; default: description->all_connectors = DSOC_UNKNOWN; description->all_signals = DSOC_UNKNOWN; } description->all_resolutions = drmkms_modes_to_dsor_bitmask( output ); config->flags = DSOCONF_RESOLUTION | DSOCONF_ENCODER; config->encoder = output; drmkms_mode_to_dsor_dsef( &shared->mode[output], &config->resolution, NULL ); return DFB_OK; } static DFBResult drmkmsSetOutputConfig( CoreScreen *screen, void *driver_data, void *screen_data, int output, const DFBScreenOutputConfig *config ) { int ret = 0; DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; DFBScreenOutputResolution dso_res; DFBScreenEncoderFrequency dse_freq; D_DEBUG_AT( DRMKMS_Screen, "%s()\n", __FUNCTION__ ); if (!(config->flags & DSOCONF_RESOLUTION)) return DFB_INVARG; drmkms_mode_to_dsor_dsef( &shared->mode[output], &dso_res, &dse_freq ); dso_res = config->resolution; drmModeModeInfo *videomode = drmkms_dsor_freq_to_mode( output, dso_res, dse_freq ); if (!videomode) return DFB_INVARG; if ((shared->primary_dimension[output].w && (shared->primary_dimension[output].w < videomode->hdisplay) ) || (shared->primary_dimension[output].h && (shared->primary_dimension[output].h < videomode->vdisplay ))) { D_DEBUG_AT( DRMKMS_Screen, " -> cannot switch to mode to something that is bigger than the current primary layer\n" ); return DFB_INVARG; } if (shared->primary_fb) ret = drmModeSetCrtc( drmkms->fd, drmkms->encoder[output]->crtc_id, shared->primary_fb, shared->primary_rect.x, shared->primary_rect.y, &drmkms->connector[output]->connector_id, 1, videomode ); if (ret) { D_DEBUG_AT( DRMKMS_Screen, " crtc_id: %d connector_id %d, mode %dx%d\n", drmkms->encoder[output]->crtc_id, drmkms->connector[output]->connector_id, shared->mode[output].hdisplay, shared->mode[output].vdisplay ); D_PERROR( "DirectFB/DRMKMS: drmModeSetCrtc() failed! (%d)\n", ret ); return DFB_FAILURE; } shared->mode[output] = *videomode; return DFB_OK; } static DFBResult drmkmsTestOutputConfig( CoreScreen *screen, void *driver_data, void *screen_data, int output, const DFBScreenOutputConfig *config, DFBScreenOutputConfigFlags *failed ) { DRMKMSData *drmkms = driver_data; DRMKMSDataShared *shared = drmkms->shared; DFBScreenEncoderFrequency dse_freq; DFBScreenOutputResolution dso_res; D_DEBUG_AT( DRMKMS_Screen, "%s()\n", __FUNCTION__ ); if (!(config->flags & (DSOCONF_RESOLUTION))) return DFB_UNSUPPORTED; drmkms_mode_to_dsor_dsef( &shared->mode[output], &dso_res, &dse_freq ); dso_res = config->resolution; drmModeModeInfo *videomode = drmkms_dsor_freq_to_mode( output, dso_res, dse_freq ); if (!videomode) { *failed = config->flags & DSOCONF_RESOLUTION; return DFB_UNSUPPORTED; } if ((shared->primary_dimension[output].w && (shared->primary_dimension[output].w < videomode->hdisplay) ) || (shared->primary_dimension[output].h && (shared->primary_dimension[output].h < videomode->vdisplay ))) { D_DEBUG_AT( DRMKMS_Screen, " -> cannot switch to mode to something that is bigger than the current primary layer\n" ); *failed = config->flags & DSOCONF_RESOLUTION; return DFB_UNSUPPORTED; } return DFB_OK; } static const ScreenFuncs _drmkmsScreenFuncs = { .InitScreen = drmkmsInitScreen, .GetScreenSize = drmkmsGetScreenSize, .InitMixer = drmkmsInitMixer, .SetMixerConfig = drmkmsSetMixerConfig, .TestMixerConfig = drmkmsTestMixerConfig, .InitEncoder = drmkmsInitEncoder, .SetEncoderConfig = drmkmsSetEncoderConfig, .TestEncoderConfig = drmkmsTestEncoderConfig, .InitOutput = drmkmsInitOutput, .SetOutputConfig = drmkmsSetOutputConfig, .TestOutputConfig = drmkmsTestOutputConfig, }; const ScreenFuncs *drmkmsScreenFuncs = &_drmkmsScreenFuncs; DirectFB-1.7.7/systems/drmkms/vt.h0000644000175000017500000000537412254435330013711 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __VT_H__ #define __VT_H__ #include #include #include #include #include typedef struct { int fd0; /* file descriptor of /dev/tty0 */ int fd; /* file descriptor of /dev/ttyN where N is the number of the allocated VT, may be equal to 'fd0' if VT allocation is disabled by "--no-vt-switch" */ int num; /* number of vt where DirectFB runs */ int prev; /* number of vt DirectFB was started from */ int old_fb; /* original fb mapped to vt */ struct sigaction sig_usr1; /* previous signal handler for USR1 */ struct sigaction sig_usr2; /* previous signal handler for USR2 */ struct vt_mode vt_mode; /* previous VT mode */ DirectThread *thread; pthread_mutex_t lock; pthread_cond_t wait; int vt_sig; struct termios old_ts; bool flush; DirectThread *flush_thread; } VirtualTerminal; /* * allocates and switches to a new virtual terminal */ DFBResult dfb_vt_initialize( void ); DFBResult dfb_vt_join( void ); /* * deallocates virtual terminal */ DFBResult dfb_vt_shutdown( bool emergency ); DFBResult dfb_vt_leave( bool emergency ); DFBResult dfb_vt_detach( bool force ); bool dfb_vt_switch( int num ); #endif DirectFB-1.7.7/systems/sdl/0000755000175000017500000000000012466665353012462 500000000000000DirectFB-1.7.7/systems/sdl/sdlinput.c0000644000175000017500000004102312254435330014371 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include "sdl.h" #include DFB_INPUT_DRIVER( sdlinput ) /* * declaration of private data */ typedef struct { CoreInputDevice *device; DirectThread *thread; DFBSDL *dfb_sdl; int stop; } SDLInputData; static DFBInputEvent motionX = { .type = DIET_UNKNOWN, .axisabs = 0, }; static DFBInputEvent motionY = { .type = DIET_UNKNOWN, .axisabs = 0, }; static void motion_compress( int x, int y ) { if (motionX.axisabs != x) { motionX.type = DIET_AXISMOTION; motionX.flags = DIEF_AXISABS; motionX.axis = DIAI_X; motionX.axisabs = x; } if (motionY.axisabs != y) { motionY.type = DIET_AXISMOTION; motionY.flags = DIEF_AXISABS; motionY.axis = DIAI_Y; motionY.axisabs = y; } } static void motion_realize( SDLInputData *data ) { if (motionX.type != DIET_UNKNOWN) { if (motionY.type != DIET_UNKNOWN) { /* let DirectFB know two events are coming */ motionX.flags |= DIEF_FOLLOW; } dfb_input_dispatch( data->device, &motionX ); motionX.type = DIET_UNKNOWN; } if (motionY.type != DIET_UNKNOWN) { dfb_input_dispatch( data->device, &motionY ); motionY.type = DIET_UNKNOWN; } } static bool translate_key( SDLKey key, DFBInputEvent *evt ) { evt->flags = DIEF_KEYID; /* Numeric keypad */ if (key >= SDLK_KP0 && key <= SDLK_KP9) { evt->key_id = DIKI_KP_0 + key - SDLK_KP0; return true; } /* Function keys */ if (key >= SDLK_F1 && key <= SDLK_F12) { evt->key_id = DIKI_F1 + key - SDLK_F1; return true; } /* letter keys */ if (key >= SDLK_a && key <= SDLK_z) { evt->key_id = DIKI_A + key - SDLK_a; return true; } if (key >= SDLK_0 && key <= SDLK_9) { evt->key_id = DIKI_0 + key - SDLK_0; return true; } switch (key) { case SDLK_QUOTE: evt->key_id = DIKI_QUOTE_RIGHT; return true; case SDLK_BACKQUOTE: evt->key_id = DIKI_QUOTE_LEFT; return true; case SDLK_COMMA: evt->key_id = DIKI_COMMA; return true; case SDLK_MINUS: evt->key_id = DIKI_MINUS_SIGN; return true; case SDLK_PERIOD: evt->key_id = DIKI_PERIOD; return true; case SDLK_SLASH: evt->key_id = DIKI_SLASH; return true; case SDLK_SEMICOLON: evt->key_id = DIKI_SEMICOLON; return true; case SDLK_LESS: evt->key_id = DIKI_LESS_SIGN; return true; case SDLK_EQUALS: evt->key_id = DIKI_EQUALS_SIGN; return true; case SDLK_LEFTBRACKET: evt->key_id = DIKI_BRACKET_LEFT; return true; case SDLK_RIGHTBRACKET: evt->key_id = DIKI_BRACKET_RIGHT; return true; case SDLK_BACKSLASH: evt->key_id = DIKI_BACKSLASH; return true; /* Numeric keypad */ case SDLK_KP_PERIOD: evt->key_id = DIKI_KP_DECIMAL; return true; case SDLK_KP_DIVIDE: evt->key_id = DIKI_KP_DIV; return true; case SDLK_KP_MULTIPLY: evt->key_id = DIKI_KP_MULT; return true; case SDLK_KP_MINUS: evt->key_id = DIKI_KP_MINUS; return true; case SDLK_KP_PLUS: evt->key_id = DIKI_KP_PLUS; return true; case SDLK_KP_ENTER: evt->key_id = DIKI_KP_ENTER; return true; case SDLK_KP_EQUALS: evt->key_id = DIKI_KP_EQUAL; return true; case SDLK_ESCAPE: evt->key_id = DIKI_ESCAPE; return true; case SDLK_TAB: evt->key_id = DIKI_TAB; return true; case SDLK_RETURN: evt->key_id = DIKI_ENTER; return true; case SDLK_SPACE: evt->key_id = DIKI_SPACE; return true; case SDLK_BACKSPACE: evt->key_id = DIKI_BACKSPACE; return true; case SDLK_INSERT: evt->key_id = DIKI_INSERT; return true; case SDLK_DELETE: evt->key_id = DIKI_DELETE; return true; case SDLK_PRINT: evt->key_id = DIKI_PRINT; return true; case SDLK_PAUSE: evt->key_id = DIKI_PAUSE; return true; /* Arrows + Home/End pad */ case SDLK_UP: evt->key_id = DIKI_UP; return true; case SDLK_DOWN: evt->key_id = DIKI_DOWN; return true; case SDLK_RIGHT: evt->key_id = DIKI_RIGHT; return true; case SDLK_LEFT: evt->key_id = DIKI_LEFT; return true; case SDLK_HOME: evt->key_id = DIKI_HOME; return true; case SDLK_END: evt->key_id = DIKI_END; return true; case SDLK_PAGEUP: evt->key_id = DIKI_PAGE_UP; return true; case SDLK_PAGEDOWN: evt->key_id = DIKI_PAGE_DOWN; return true; /* Key state modifier keys */ case SDLK_NUMLOCK: evt->key_id = DIKI_NUM_LOCK; return true; case SDLK_CAPSLOCK: evt->key_id = DIKI_CAPS_LOCK; return true; case SDLK_SCROLLOCK: evt->key_id = DIKI_SCROLL_LOCK; return true; case SDLK_RSHIFT: evt->key_id = DIKI_SHIFT_R; return true; case SDLK_LSHIFT: evt->key_id = DIKI_SHIFT_L; return true; case SDLK_RCTRL: evt->key_id = DIKI_CONTROL_R; return true; case SDLK_LCTRL: evt->key_id = DIKI_CONTROL_L; return true; case SDLK_RALT: evt->key_id = DIKI_ALT_R; return true; case SDLK_LALT: evt->key_id = DIKI_ALT_L; return true; case SDLK_RMETA: evt->key_id = DIKI_META_R; return true; case SDLK_LMETA: evt->key_id = DIKI_META_L; return true; case SDLK_LSUPER: evt->key_id = DIKI_SUPER_L; return true; case SDLK_RSUPER: evt->key_id = DIKI_SUPER_R; return true; case SDLK_MODE: evt->key_id = DIKI_ALT_R; evt->flags |= DIEF_KEYSYMBOL; evt->key_symbol = DIKS_ALTGR; return true; default: break; } evt->flags = DIEF_NONE; return false; } /* * Input thread reading from device. * Generates events on incoming data. */ static void* sdlEventThread( DirectThread *thread, void *driver_data ) { SDLInputData *data = (SDLInputData*) driver_data; DFBSDL *dfb_sdl = data->dfb_sdl; while (!data->stop) { DFBInputEvent evt; SDL_Event event; fusion_skirmish_prevail( &dfb_sdl->lock ); /* Check for events */ while ( SDL_PollEvent(&event) ) { fusion_skirmish_dismiss( &dfb_sdl->lock ); switch (event.type) { case SDL_MOUSEMOTION: motion_compress( event.motion.x, event.motion.y ); break; case SDL_MOUSEBUTTONUP: case SDL_MOUSEBUTTONDOWN: motion_realize( data ); if (event.type == SDL_MOUSEBUTTONDOWN) evt.type = DIET_BUTTONPRESS; else evt.type = DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; switch (event.button.button) { case SDL_BUTTON_LEFT: evt.button = DIBI_LEFT; break; case SDL_BUTTON_MIDDLE: evt.button = DIBI_MIDDLE; break; case SDL_BUTTON_RIGHT: evt.button = DIBI_RIGHT; break; case SDL_BUTTON_WHEELUP: case SDL_BUTTON_WHEELDOWN: if (event.type != SDL_MOUSEBUTTONDOWN) { fusion_skirmish_prevail( &dfb_sdl->lock ); continue; } evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISREL; evt.axis = DIAI_Z; if (event.button.button == SDL_BUTTON_WHEELUP) evt.axisrel = -1; else evt.axisrel = 1; break; default: fusion_skirmish_prevail( &dfb_sdl->lock ); continue; } dfb_input_dispatch( data->device, &evt ); break; case SDL_KEYUP: case SDL_KEYDOWN: if (event.type == SDL_KEYDOWN) evt.type = DIET_KEYPRESS; else evt.type = DIET_KEYRELEASE; /* Get a key id first */ translate_key( event.key.keysym.sym, &evt ); /* If SDL provided a symbol, use it */ if (event.key.keysym.unicode) { evt.flags |= DIEF_KEYSYMBOL; evt.key_symbol = event.key.keysym.unicode; /** * Hack to translate the Control+[letter] * combination to * Modifier: CONTROL, Key Symbol: [letter] * A side effect here is that Control+Backspace * produces Control+h */ if (evt.modifiers == DIMM_CONTROL && evt.key_symbol >= 1 && evt.key_symbol <= ('z'-'a'+1)) { evt.key_symbol += 'a'-1; } } dfb_input_dispatch( data->device, &evt ); break; case SDL_QUIT: evt.type = DIET_KEYPRESS; evt.flags = DIEF_KEYSYMBOL; evt.key_symbol = DIKS_ESCAPE; dfb_input_dispatch( data->device, &evt ); evt.type = DIET_KEYRELEASE; evt.flags = DIEF_KEYSYMBOL; evt.key_symbol = DIKS_ESCAPE; dfb_input_dispatch( data->device, &evt ); break; default: break; } fusion_skirmish_prevail( &dfb_sdl->lock ); } fusion_skirmish_dismiss( &dfb_sdl->lock ); motion_realize( data ); usleep(10000); direct_thread_testcancel( thread ); } return NULL; } /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available( void ) { if (dfb_system_type() == CORE_SDL) return 1; return 0; } /* * Fill out general information about this driver. * Called once during initialization of DirectFB. */ static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf ( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "SDL Input Driver" ); snprintf ( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "Denis Oliver Kropp" ); info->version.major = 0; info->version.minor = 1; } /* * Open the device, fill out information about it, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { SDLInputData *data; DFBSDL *dfb_sdl = dfb_system_data(); fusion_skirmish_prevail( &dfb_sdl->lock ); SDL_EnableUNICODE( true ); SDL_EnableKeyRepeat( 250, 40 ); fusion_skirmish_dismiss( &dfb_sdl->lock ); /* set device name */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "SDL Input" ); /* set device vendor */ snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "SDL" ); /* set one of the primary input device IDs */ info->prefered_id = DIDID_KEYBOARD; /* set type flags */ info->desc.type = DIDTF_JOYSTICK | DIDTF_KEYBOARD | DIDTF_MOUSE; /* set capabilities */ info->desc.caps = DICAPS_ALL; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(SDLInputData) ); data->device = device; data->dfb_sdl = dfb_sdl; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, sdlEventThread, data, "SDL Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { SDLInputData *data = (SDLInputData*) driver_data; /* stop input thread */ data->stop = 1; direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* free private data */ D_FREE ( data ); } DirectFB-1.7.7/systems/sdl/primary.c0000644000175000017500000004662312463500054014223 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "sdl.h" #include "primary.h" D_DEBUG_DOMAIN( SDL_Screen, "SDL/Screen", "SDL System Screen" ); D_DEBUG_DOMAIN( SDL_Updates, "SDL/Updates", "SDL System Screen Updates" ); /******************************************************************************/ static DFBResult update_screen( int x, int y, int w, int h ); /******************************************************************************/ static DFBResult primaryInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { /* Set the screen capabilities. */ description->caps = DSCCAPS_NONE; /* Set the screen name. */ snprintf( description->name, DFB_SCREEN_DESC_NAME_LENGTH, "SDL Primary Screen" ); return DFB_OK; } static DFBResult primaryGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { D_ASSERT( dfb_sdl != NULL ); if (dfb_sdl->primary) { *ret_width = dfb_sdl->primary->config.size.w; *ret_height = dfb_sdl->primary->config.size.w; } else { if (dfb_config->mode.width) *ret_width = dfb_config->mode.width; else *ret_width = 640; if (dfb_config->mode.height) *ret_height = dfb_config->mode.height; else *ret_height = 480; } return DFB_OK; } static ScreenFuncs primaryScreenFuncs = { .InitScreen = primaryInitScreen, .GetScreenSize = primaryGetScreenSize, }; ScreenFuncs *sdlPrimaryScreenFuncs = &primaryScreenFuncs; /******************************************************************************/ static void * ScreenUpdateLoop( DirectThread *thread, void *arg ); /******************************************************************************/ static int primaryLayerDataSize( void ) { return 0; } static int primaryRegionDataSize( void ) { return 0; } static DFBResult primaryInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { /* set capabilities and type */ description->caps = DLCAPS_SURFACE; description->type = DLTF_GRAPHICS; /* set name */ snprintf( description->name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "SDL Primary Layer" ); /* fill out the default configuration */ config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->buffermode = DLBM_FRONTONLY; if (dfb_config->mode.width) config->width = dfb_config->mode.width; else config->width = 640; if (dfb_config->mode.height) config->height = dfb_config->mode.height; else config->height = 480; if (dfb_config->mode.format != DSPF_UNKNOWN) config->pixelformat = dfb_config->mode.format; else if (dfb_config->mode.depth > 0) config->pixelformat = dfb_pixelformat_for_depth( dfb_config->mode.depth ); else config->pixelformat = DSPF_RGB16; /* Initialize update lock and condition. */ pthread_mutex_init( &dfb_sdl->update.lock, NULL ); pthread_cond_init( &dfb_sdl->update.cond, NULL ); /* Start update thread. */ dfb_sdl->update.thread = direct_thread_create( DTT_OUTPUT, ScreenUpdateLoop, NULL, "Screen Update" ); if (!dfb_sdl->update.thread) return DFB_FAILURE; return DFB_OK; } static DFBResult primaryTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *failed ) { CoreLayerRegionConfigFlags fail = 0; switch (config->buffermode) { case DLBM_FRONTONLY: case DLBM_BACKSYSTEM: case DLBM_BACKVIDEO: break; default: fail |= CLRCF_BUFFERMODE; break; } if (config->options) fail |= CLRCF_OPTIONS; if (failed) *failed = fail; if (fail) return DFB_UNSUPPORTED; return DFB_OK; } static DFBResult primaryAddRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config ) { return DFB_OK; } static DFBResult primarySetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *lock ) { if (surface) { pthread_mutex_lock( &dfb_sdl->update.lock ); dfb_sdl->primary = surface; dfb_sdl->update.pending = false; pthread_mutex_unlock( &dfb_sdl->update.lock ); } if (palette) dfb_sdl_set_palette( palette ); return DFB_OK; } static DFBResult primaryRemoveRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ) { D_DEBUG_AT( SDL_Updates, "%s( %p )\n", __FUNCTION__, layer ); D_DEBUG_AT( SDL_Updates, " -> locking sdl lock...\n" ); fusion_skirmish_prevail( &dfb_sdl->lock ); D_DEBUG_AT( SDL_Updates, " -> setting primary to NULL...\n" ); dfb_sdl->primary = NULL; D_DEBUG_AT( SDL_Updates, " -> unlocking sdl lock...\n" ); fusion_skirmish_dismiss( &dfb_sdl->lock ); D_DEBUG_AT( SDL_Updates, " -> done.\n" ); return DFB_OK; } static DFBResult primaryFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { dfb_surface_flip( surface, false ); return dfb_sdl_update_screen( dfb_sdl_core, NULL ); } static DFBResult primaryUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *update, CoreSurfaceBufferLock *lock ) { if (update) { DFBRegion region = *update; return dfb_sdl_update_screen( dfb_sdl_core, ®ion ); } return dfb_sdl_update_screen( dfb_sdl_core, NULL ); } static DisplayLayerFuncs primaryLayerFuncs = { .LayerDataSize = primaryLayerDataSize, .RegionDataSize = primaryRegionDataSize, .InitLayer = primaryInitLayer, .TestRegion = primaryTestRegion, .AddRegion = primaryAddRegion, .SetRegion = primarySetRegion, .RemoveRegion = primaryRemoveRegion, .FlipRegion = primaryFlipRegion, .UpdateRegion = primaryUpdateRegion, }; DisplayLayerFuncs *sdlPrimaryLayerFuncs = &primaryLayerFuncs; /******************************************************************************/ static DFBResult update_screen( int x, int y, int w, int h ) { #if 0 int i, n; void *dst; u8 *srces[3]; int pitches[3]; DFBResult ret; CoreSurface *surface; CoreSurfaceBuffer *buffer; CoreSurfaceBufferLock lock; u16 *src16, *dst16; u8 *src8; #endif D_DEBUG_AT( SDL_Updates, "%s( %d, %d, %d, %d )\n", __FUNCTION__, x, y, w, h ); D_DEBUG_AT( SDL_Updates, " -> locking sdl lock...\n" ); fusion_skirmish_prevail( &dfb_sdl->lock ); #if 0 surface = dfb_sdl->primary; D_MAGIC_ASSERT_IF( surface, CoreSurface ); D_DEBUG_AT( SDL_Updates, " -> primary is %p\n", surface ); if (!surface) { D_DEBUG_AT( SDL_Updates, " -> unlocking sdl lock...\n" ); fusion_skirmish_dismiss( &dfb_sdl->lock ); D_DEBUG_AT( SDL_Updates, " -> done.\n" ); return DFB_OK; } buffer = dfb_surface_get_buffer( surface, CSBR_FRONT ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_DEBUG_AT( SDL_Updates, " -> locking sdl surface...\n" ); if (SDL_LockSurface( screen ) < 0) { D_ERROR( "DirectFB/SDL: " "Couldn't lock the display surface: %s\n", SDL_GetError() ); fusion_skirmish_dismiss( &dfb_sdl->lock ); return DFB_FAILURE; } D_DEBUG_AT( SDL_Updates, " -> locking dfb surface...\n" ); ret = dfb_surface_buffer_lock( buffer, CSAF_CPU_READ, &lock ); if (ret) { D_ERROR( "DirectFB/SDL: Couldn't lock layer surface: %s\n", DirectFBErrorString( ret ) ); SDL_UnlockSurface(screen); fusion_skirmish_dismiss( &dfb_sdl->lock ); return ret; } src = lock.addr; dst = screen->pixels; dfb_surface_get_data_offsets( surface->data, lock.addr, lock.pitch, x, y, 3, srces, pitches ); D_DEBUG_AT( SDL_Updates, " -> copying pixels...\n" ); switch (screen->format->BitsPerPixel) { case 16: dfb_convert_to_rgb16( surface->config.format, srces[0], pitches[0], srces[1], pitches[1], srces[2], pitches[2], surface->config.size.h, dst, screen->pitch, w, h ); break; default: direct_memcpy( dst, srces[0], DFB_BYTES_PER_LINE( surface->config.format, w ) ); } D_DEBUG_AT( SDL_Updates, " -> unlocking dfb surface...\n" ); dfb_surface_buffer_unlock( &lock ); D_DEBUG_AT( SDL_Updates, " -> unlocking sdl surface...\n" ); SDL_UnlockSurface( screen ); #endif D_DEBUG_AT( SDL_Updates, " -> calling SDL_UpdateRect()...\n" ); SDL_UpdateRect( dfb_sdl->screen, x, y, w, h ); D_DEBUG_AT( SDL_Updates, " -> unlocking sdl lock...\n" ); fusion_skirmish_dismiss( &dfb_sdl->lock ); D_DEBUG_AT( SDL_Updates, " -> done.\n" ); return DFB_OK; } static void * ScreenUpdateLoop( DirectThread *thread, void *arg ) { pthread_mutex_lock( &dfb_sdl->update.lock ); D_DEBUG_AT( SDL_Updates, "Entering %s()...\n", __FUNCTION__ ); while (!dfb_sdl->update.quit) { if (dfb_sdl->update.pending) { DFBRectangle update = DFB_RECTANGLE_INIT_FROM_REGION( &dfb_sdl->update.region ); dfb_sdl->update.pending = false; D_DEBUG_AT( SDL_Updates, "Got update %d,%d - %dx%d...\n", DFB_RECTANGLE_VALS( &update ) ); pthread_mutex_unlock( &dfb_sdl->update.lock ); update_screen( update.x, update.y, update.w, update.h ); pthread_mutex_lock( &dfb_sdl->update.lock ); } else pthread_cond_wait( &dfb_sdl->update.cond, &dfb_sdl->update.lock ); } D_DEBUG_AT( SDL_Updates, "Returning from %s()...\n", __FUNCTION__ ); pthread_mutex_unlock( &dfb_sdl->update.lock ); return NULL; } /******************************************************************************/ typedef enum { SDL_SET_VIDEO_MODE, SDL_UPDATE_SCREEN, SDL_SET_PALETTE } DFBSDLCall; static inline int get_pixelformat_target_depth( DFBSurfacePixelFormat format ) { switch (format) { case DSPF_NV16: return 16; default: break; } return DFB_BITS_PER_PIXEL( format ); } static DFBResult dfb_sdl_set_video_mode_handler( CoreSurfaceConfig *config ) { int depth = get_pixelformat_target_depth( config->format ); Uint32 flags = SDL_HWSURFACE | SDL_RESIZABLE;// | SDL_ASYNCBLIT | SDL_FULLSCREEN; SDL_Surface *screen; if (config->caps & DSCAPS_FLIPPING) flags |= SDL_DOUBLEBUF; fusion_skirmish_prevail( &dfb_sdl->lock ); D_DEBUG_AT( SDL_Screen, " -> SDL_SetVideoMode( %dx%d, %d, 0x%08x )\n", config->size.w, config->size.h, DFB_BITS_PER_PIXEL(config->format), flags ); /* Set video mode */ screen = SDL_SetVideoMode( config->size.w, config->size.h, depth, flags ); if (!screen) { D_ERROR( "DirectFB/SDL: Couldn't set %dx%dx%d video mode: %s\n", config->size.w, config->size.h, depth, SDL_GetError()); fusion_skirmish_dismiss( &dfb_sdl->lock ); return DFB_FAILURE; } dfb_sdl->screen = screen; /* Hide SDL's cursor */ SDL_ShowCursor( SDL_DISABLE ); fusion_skirmish_dismiss( &dfb_sdl->lock ); return DFB_OK; } static DFBResult dfb_sdl_update_screen_handler( const DFBRegion *region ) { DFBRegion update; CoreSurface *surface = dfb_sdl->primary; DFB_REGION_ASSERT_IF( region ); if (region) update = *region; else { update.x1 = 0; update.y1 = 0; update.x2 = surface->config.size.w - 1; update.y2 = surface->config.size.h - 1; } #if 0 pthread_mutex_lock( &dfb_sdl->update.lock ); if (dfb_sdl->update.pending) dfb_region_region_union( &dfb_sdl->update.region, &update ); else { dfb_sdl->update.region = update; dfb_sdl->update.pending = true; } pthread_cond_signal( &dfb_sdl->update.cond ); pthread_mutex_unlock( &dfb_sdl->update.lock ); #else if (surface->config.caps & DSCAPS_FLIPPING) SDL_Flip( dfb_sdl->screen ); else SDL_UpdateRect( dfb_sdl->screen, DFB_RECTANGLE_VALS_FROM_REGION(&update) ); #endif return DFB_OK; } static DFBResult dfb_sdl_set_palette_handler( CorePalette *palette ) { unsigned int i; SDL_Color colors[palette->num_entries]; for (i=0; inum_entries; i++) { colors[i].r = palette->entries[i].r; colors[i].g = palette->entries[i].g; colors[i].b = palette->entries[i].b; } fusion_skirmish_prevail( &dfb_sdl->lock ); SDL_SetColors( dfb_sdl->screen, colors, 0, palette->num_entries ); fusion_skirmish_dismiss( &dfb_sdl->lock ); return DFB_OK; } FusionCallHandlerResult dfb_sdl_call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { switch (call_arg) { case SDL_SET_VIDEO_MODE: *ret_val = dfb_sdl_set_video_mode_handler( call_ptr ); break; case SDL_UPDATE_SCREEN: *ret_val = dfb_sdl_update_screen_handler( call_ptr ); break; case SDL_SET_PALETTE: *ret_val = dfb_sdl_set_palette_handler( call_ptr ); break; default: D_BUG( "unknown call" ); *ret_val = DFB_BUG; break; } return FCHR_RETURN; } DFBResult dfb_sdl_set_video_mode( CoreDFB *core, CoreSurfaceConfig *config ) { int ret; CoreSurfaceConfig *tmp = NULL; D_ASSERT( config != NULL ); if (dfb_core_is_master( core )) return dfb_sdl_set_video_mode_handler( config ); if (!fusion_is_shared( dfb_core_world(core), config )) { tmp = SHMALLOC( dfb_core_shmpool(core), sizeof(CoreSurfaceConfig) ); if (!tmp) return D_OOSHM(); direct_memcpy( tmp, config, sizeof(CoreSurfaceConfig) ); } fusion_call_execute( &dfb_sdl->call, FCEF_NONE, SDL_SET_VIDEO_MODE, tmp ? tmp : config, &ret ); if (tmp) SHFREE( dfb_core_shmpool(core), tmp ); return ret; } DFBResult dfb_sdl_update_screen( CoreDFB *core, DFBRegion *region ) { int ret; DFBRegion *tmp = NULL; if (dfb_core_is_master( core )) return dfb_sdl_update_screen_handler( region ); if (region) { tmp = SHMALLOC( dfb_core_shmpool(core), sizeof(DFBRegion) ); if (!tmp) return D_OOSHM(); direct_memcpy( tmp, region, sizeof(DFBRegion) ); } fusion_call_execute( &dfb_sdl->call, FCEF_NONE, SDL_UPDATE_SCREEN, tmp ? tmp : region, &ret ); if (tmp) SHFREE( dfb_core_shmpool(core), tmp ); return DFB_OK; } DFBResult dfb_sdl_set_palette( CorePalette *palette ) { int ret; fusion_call_execute( &dfb_sdl->call, FCEF_NONE, SDL_SET_PALETTE, palette, &ret ); return ret; } DirectFB-1.7.7/systems/sdl/sdl_surface_pool.c0000644000175000017500000002571312254435330016062 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include "sdl.h" D_DEBUG_DOMAIN( SDL_Pool, "SDL/Pool", "SDL Surface Pool" ); /**********************************************************************************************************************/ typedef struct { } SDLPoolData; typedef struct { int magic; SDL_Surface *sdl_surf; } SDLAllocationData; /**********************************************************************************************************************/ static int sdlPoolDataSize( void ) { return sizeof(SDLPoolData); } static int sdlAllocationDataSize( void ) { return sizeof(SDLAllocationData); } static DFBResult sdlInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { D_DEBUG_AT( SDL_Pool, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( ret_desc != NULL ); ret_desc->caps = CSPCAPS_NONE; ret_desc->access[CSAID_CPU] = CSAF_READ | CSAF_WRITE; ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_PREFERED; ret_desc->access[CSAID_LAYER0] = CSAF_READ; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "SDL" ); return DFB_OK; } static DFBResult sdlDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { D_DEBUG_AT( SDL_Pool, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); return DFB_OK; } static DFBResult sdlTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { D_DEBUG_AT( SDL_Pool, "%s()\n", __FUNCTION__ ); switch (config->format) { case DSPF_A8: case DSPF_RGB16: case DSPF_RGB32: case DSPF_ARGB: break; default: return DFB_UNSUPPORTED; } return DFB_OK; } static DFBResult sdlAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { DFBResult ret; CoreSurface *surface; SDLAllocationData *alloc = alloc_data; D_DEBUG_AT( SDL_Pool, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (surface->type & CSTF_LAYER) { dfb_sdl->screen = NULL; /* clear? */ ret = dfb_sdl_set_video_mode( dfb_sdl_core, &surface->config ); if (ret) { D_DERROR( ret, "SDL/Surface: dfb_sdl_set_video_mode() failed!\n" ); return ret; } D_ASSERT( dfb_sdl->screen != NULL ); if (!dfb_sdl->screen) { D_ERROR( "SDL/Surface: No screen surface!?\n" ); return DFB_BUG; } alloc->sdl_surf = dfb_sdl->screen; D_DEBUG_AT( SDL_Pool, " -> screen surface %dx%d, %d, 0x%08x, pitch %d\n", dfb_sdl->screen->w, dfb_sdl->screen->h, dfb_sdl->screen->format->BitsPerPixel, dfb_sdl->screen->flags, dfb_sdl->screen->pitch ); } else { DFBSurfacePixelFormat format = surface->config.format; Uint32 flags = SDL_HWSURFACE;// | SDL_ASYNCBLIT | SDL_FULLSCREEN; Uint32 rmask; Uint32 gmask; Uint32 bmask; Uint32 amask; if (surface->config.caps & DSCAPS_FLIPPING) flags |= SDL_DOUBLEBUF; switch (format) { case DSPF_A8: rmask = 0x00; gmask = 0x00; bmask = 0x00; amask = 0xff; break; case DSPF_RGB16: rmask = 0xf800; gmask = 0x07e0; bmask = 0x001f; amask = 0x0000; break; case DSPF_RGB32: rmask = 0x00ff0000; gmask = 0x0000ff00; bmask = 0x000000ff; amask = 0x00000000; break; case DSPF_ARGB: rmask = 0x00ff0000; gmask = 0x0000ff00; bmask = 0x000000ff; amask = 0xff000000; break; default: D_ERROR( "SDL/Surface: %s() has no support for %s!\n", __FUNCTION__, dfb_pixelformat_name(format) ); return DFB_UNSUPPORTED; } D_DEBUG_AT( SDL_Pool, " -> SDL_CreateRGBSurface( 0x%08x, " "%dx%d, %d, 0x%08x, 0x%08x, 0x%08x, 0x%08x )\n", flags, surface->config.size.w, surface->config.size.h, DFB_BITS_PER_PIXEL(format), rmask, gmask, bmask, amask ); alloc->sdl_surf = SDL_CreateRGBSurface( flags, surface->config.size.w, surface->config.size.h, DFB_BITS_PER_PIXEL(format), rmask, gmask, bmask, amask ); if (!alloc->sdl_surf) { D_ERROR( "SDL/Surface: SDL_CreateRGBSurface( 0x%08x, " "%dx%d, %d, 0x%08x, 0x%08x, 0x%08x, 0x%08x ) failed!\n", flags, surface->config.size.w, surface->config.size.h, DFB_BITS_PER_PIXEL(format), rmask, gmask, bmask, amask ); return DFB_FAILURE; } } /* approximation */ allocation->size = surface->config.size.h * surface->config.size.w; D_MAGIC_SET( alloc, SDLAllocationData ); return DFB_OK; } static DFBResult sdlDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { SDLAllocationData *alloc = alloc_data; D_DEBUG_AT( SDL_Pool, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( alloc, SDLAllocationData ); SDL_FreeSurface( alloc->sdl_surf ); D_MAGIC_CLEAR( alloc ); return DFB_OK; } static DFBResult sdlLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { SDLAllocationData *alloc = alloc_data; SDL_Surface *sdl_surf; // D_DEBUG_AT( SDL_Pool, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, SDLAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); sdl_surf = alloc->sdl_surf; D_ASSERT( sdl_surf != NULL ); if (SDL_MUSTLOCK( sdl_surf ) && SDL_LockSurface( sdl_surf )) { D_ERROR( "SDL/Surface: SDL_LockSurface() on a %dx%dx surface failed!\n", sdl_surf->w, sdl_surf->h ); return DFB_FAILURE; } D_ASSUME( sdl_surf->pixels != NULL ); if (!sdl_surf->pixels) return DFB_UNSUPPORTED; D_ASSERT( sdl_surf->pitch > 0 ); lock->addr = sdl_surf->pixels; lock->pitch = sdl_surf->pitch; lock->offset = sdl_surf->offset; lock->handle = sdl_surf; return DFB_OK; } static DFBResult sdlUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { SDLAllocationData *alloc = alloc_data; SDL_Surface *sdl_surf; // D_DEBUG_AT( SDL_Pool, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, SDLAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); sdl_surf = alloc->sdl_surf; D_ASSERT( sdl_surf != NULL ); if (SDL_MUSTLOCK( sdl_surf )) SDL_UnlockSurface( sdl_surf ); return DFB_OK; } const SurfacePoolFuncs sdlSurfacePoolFuncs = { .PoolDataSize = sdlPoolDataSize, .AllocationDataSize = sdlAllocationDataSize, .InitPool = sdlInitPool, .DestroyPool = sdlDestroyPool, .TestConfig = sdlTestConfig, .AllocateBuffer = sdlAllocateBuffer, .DeallocateBuffer = sdlDeallocateBuffer, .Lock = sdlLock, .Unlock = sdlUnlock, }; DirectFB-1.7.7/systems/sdl/sdl.h0000644000175000017500000000424412254435330013322 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __SDL__SDL_H__ #define __SDL__SDL_H__ #include #include #include #include typedef struct { FusionSkirmish lock; FusionCall call; CoreSurface *primary; CoreSurfacePool *sdl_pool; struct { pthread_mutex_t lock; pthread_cond_t cond; DirectThread *thread; bool pending; DFBRegion region; bool quit; } update; VideoMode *modes; /* linked list of valid video modes */ SDL_Surface *screen; } DFBSDL; extern DFBSDL *dfb_sdl; extern CoreDFB *dfb_sdl_core; DFBResult dfb_sdl_set_video_mode( CoreDFB *core, CoreSurfaceConfig *config ); DFBResult dfb_sdl_update_screen( CoreDFB *core, DFBRegion *region ); DFBResult dfb_sdl_set_palette( CorePalette *palette ); #endif DirectFB-1.7.7/systems/sdl/Makefile.am0000644000175000017500000000312112171403127014411 00000000000000## Makefile.am for DirectFB/systems/sdl INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(SDL_CFLAGS) systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_sdl.o endif systems_LTLIBRARIES = libdirectfb_sdl.la inputdriversdir = $(MODULEDIR)/inputdrivers if BUILD_STATIC inputdrivers_DATA = libdirectfb_sdlinput.o endif inputdrivers_LTLIBRARIES = libdirectfb_sdlinput.la gfxdriversdir = $(MODULEDIR)/gfxdrivers if BUILD_STATIC gfxdrivers_DATA = libdirectfb_sdlgraphics.o endif gfxdrivers_LTLIBRARIES = libdirectfb_sdlgraphics.la libdirectfb_sdl_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_sdl_la_SOURCES = \ primary.c \ primary.h \ sdl.c \ sdl.h \ sdl_surface_pool.c libdirectfb_sdl_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la \ $(SDL_LIBS) libdirectfb_sdlinput_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_sdlinput_la_SOURCES = \ sdlinput.c libdirectfb_sdlinput_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la \ $(SDL_LIBS) libdirectfb_sdlgraphics_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_sdlgraphics_la_SOURCES = \ sdlgfx.c libdirectfb_sdlgraphics_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la \ $(SDL_LIBS) include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/sdl/sdlgfx.c0000644000175000017500000002047312254435330014024 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DFB_GRAPHICS_DRIVER( sdlgraphics ) #include "sdl.h" /* FIXME: support for destination color keying */ #define SDL_DRAWING_FLAGS \ (DSDRAW_NOFX) #define SDL_DRAWING_FUNCTIONS \ (DFXL_FILLRECTANGLE) #define SDL_BLITTING_FLAGS \ (DSBLIT_SRC_COLORKEY) #define SDL_BLITTING_FUNCTIONS \ (DFXL_BLIT) D_DEBUG_DOMAIN( SDL_GFX, "SDL/Graphics", "SDL Graphics" ); typedef struct { } SDLDriverData; typedef struct { SDL_Surface *dest; SDL_Surface *source; u32 color; bool color_valid; bool key_valid; } SDLDeviceData; static DFBResult sdlEngineSync( void *drv, void *dev ) { return DFB_OK; } static void sdlCheckState( void *drv, void *dev, CardState *state, DFBAccelerationMask accel ) { /* check destination format first */ switch (state->destination->config.format) { case DSPF_RGB16: case DSPF_RGB32: break; default: return; } if (DFB_DRAWING_FUNCTION( accel )) { /* if there are no other drawing flags than the supported */ if (state->drawingflags & ~SDL_DRAWING_FLAGS) return; state->accel |= SDL_DRAWING_FUNCTIONS; } else { /* if there are no other blitting flags than the supported and the source and destination formats are the same */ if (state->blittingflags & ~SDL_BLITTING_FLAGS) return; /* check source format */ switch (state->source->config.format) { case DSPF_RGB16: case DSPF_RGB32: break; default: return; } state->accel |= SDL_BLITTING_FUNCTIONS; } } static void sdlSetState( void *drv, void *dev, GraphicsDeviceFuncs *funcs, CardState *state, DFBAccelerationMask accel ) { SDLDeviceData *sdev = (SDLDeviceData*) dev; sdev->dest = state->dst.handle; sdev->source = state->src.handle; if (state->mod_hw & (SMF_SOURCE | SMF_BLITTING_FLAGS | SMF_SRC_COLORKEY)) sdev->key_valid = false; if (state->mod_hw & (SMF_DESTINATION | SMF_COLOR)) sdev->color_valid = false; switch (accel) { case DFXL_FILLRECTANGLE: if (!sdev->color_valid) { switch (state->destination->config.format) { case DSPF_RGB16: case DSPF_RGB32: sdev->color = dfb_color_to_pixel( state->destination->config.format, state->color.r, state->color.g, state->color.b ); break; default: D_BUG( "unexpected format" ); } sdev->color_valid = true; } state->set |= SDL_DRAWING_FUNCTIONS; break; case DFXL_BLIT: if (!sdev->key_valid) { SDL_SetColorKey( sdev->source, (state->blittingflags & DSBLIT_SRC_COLORKEY) ? SDL_SRCCOLORKEY : 0, state->src_colorkey | 0xff000000 ); sdev->key_valid = true; } state->set |= SDL_BLITTING_FUNCTIONS; break; default: D_BUG("unexpected acceleration" ); break; } state->mod_hw = 0; } static bool sdlFillRectangle( void *drv, void *dev, DFBRectangle *rect ) { SDLDeviceData *sdev = (SDLDeviceData*) dev; SDL_Rect dr; dr.x = rect->x; dr.y = rect->y; dr.w = rect->w; dr.h = rect->h; return SDL_FillRect( sdev->dest, &dr, sdev->color ) == 0; } static bool sdlBlit( void *drv, void *dev, DFBRectangle *rect, int dx, int dy ) { SDLDeviceData *sdev = (SDLDeviceData*) dev; SDL_Rect sr, dr; D_DEBUG_AT( SDL_GFX, "%s()\n", __FUNCTION__ ); sr.x = rect->x; sr.y = rect->y; sr.w = rect->w; sr.h = rect->h; dr.x = dx; dr.y = dy; dr.w = rect->w; dr.h = rect->h; return SDL_BlitSurface( sdev->source, &sr, sdev->dest, &dr ) == 0; } /* exported symbols */ static int driver_probe( CoreGraphicsDevice *device ) { return dfb_system_type() == CORE_SDL; } static void driver_get_info( CoreGraphicsDevice *device, GraphicsDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_GRAPHICS_DRIVER_INFO_NAME_LENGTH, "SDL Graphics Driver" ); snprintf( info->vendor, DFB_GRAPHICS_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 0; info->version.minor = 1; info->driver_data_size = sizeof (SDLDriverData); info->device_data_size = sizeof (SDLDeviceData); } static DFBResult driver_init_driver( CoreGraphicsDevice *device, GraphicsDeviceFuncs *funcs, void *driver_data, void *device_data, CoreDFB *core ) { /* fill acceleration function table */ funcs->EngineSync = sdlEngineSync; funcs->CheckState = sdlCheckState; funcs->SetState = sdlSetState; funcs->FillRectangle = sdlFillRectangle; funcs->Blit = sdlBlit; return DFB_OK; } static DFBResult driver_init_device( CoreGraphicsDevice *device, GraphicsDeviceInfo *device_info, void *driver_data, void *device_data ) { /* fill device info */ snprintf( device_info->name, DFB_GRAPHICS_DEVICE_INFO_NAME_LENGTH, "Graphics" ); snprintf( device_info->vendor, DFB_GRAPHICS_DEVICE_INFO_VENDOR_LENGTH, "SDL" ); device_info->caps.flags = CCF_READSYSMEM; device_info->caps.accel = SDL_DRAWING_FUNCTIONS | SDL_BLITTING_FUNCTIONS; device_info->caps.drawing = SDL_DRAWING_FLAGS; device_info->caps.blitting = SDL_BLITTING_FLAGS; return DFB_OK; } static void driver_close_device( CoreGraphicsDevice *device, void *driver_data, void *device_data ) { } static void driver_close_driver( CoreGraphicsDevice *device, void *driver_data ) { } DirectFB-1.7.7/systems/sdl/primary.h0000644000175000017500000000343312254435330014222 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __SDL__PRIMARY_H__ #define __SDL__PRIMARY_H__ #include #include #include extern ScreenFuncs *sdlPrimaryScreenFuncs; extern DisplayLayerFuncs *sdlPrimaryLayerFuncs; FusionCallHandlerResult dfb_sdl_call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ); #endif DirectFB-1.7.7/systems/sdl/Makefile.in0000644000175000017500000010544712466665317014462 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = systems/sdl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(gfxdriversdir)" \ "$(DESTDIR)$(inputdriversdir)" "$(DESTDIR)$(systemsdir)" \ "$(DESTDIR)$(gfxdriversdir)" "$(DESTDIR)$(inputdriversdir)" \ "$(DESTDIR)$(systemsdir)" LTLIBRARIES = $(gfxdrivers_LTLIBRARIES) $(inputdrivers_LTLIBRARIES) \ $(systems_LTLIBRARIES) am__DEPENDENCIES_1 = libdirectfb_sdl_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la $(am__DEPENDENCIES_1) am_libdirectfb_sdl_la_OBJECTS = primary.lo sdl.lo sdl_surface_pool.lo libdirectfb_sdl_la_OBJECTS = $(am_libdirectfb_sdl_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_sdl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_sdl_la_LDFLAGS) \ $(LDFLAGS) -o $@ libdirectfb_sdlgraphics_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la $(am__DEPENDENCIES_1) am_libdirectfb_sdlgraphics_la_OBJECTS = sdlgfx.lo libdirectfb_sdlgraphics_la_OBJECTS = \ $(am_libdirectfb_sdlgraphics_la_OBJECTS) libdirectfb_sdlgraphics_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_sdlgraphics_la_LDFLAGS) \ $(LDFLAGS) -o $@ libdirectfb_sdlinput_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la $(am__DEPENDENCIES_1) am_libdirectfb_sdlinput_la_OBJECTS = sdlinput.lo libdirectfb_sdlinput_la_OBJECTS = \ $(am_libdirectfb_sdlinput_la_OBJECTS) libdirectfb_sdlinput_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_sdlinput_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_sdl_la_SOURCES) \ $(libdirectfb_sdlgraphics_la_SOURCES) \ $(libdirectfb_sdlinput_la_SOURCES) DIST_SOURCES = $(libdirectfb_sdl_la_SOURCES) \ $(libdirectfb_sdlgraphics_la_SOURCES) \ $(libdirectfb_sdlinput_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(gfxdrivers_DATA) $(inputdrivers_DATA) $(systems_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(SDL_CFLAGS) systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_sdl.o systems_LTLIBRARIES = libdirectfb_sdl.la inputdriversdir = $(MODULEDIR)/inputdrivers @BUILD_STATIC_TRUE@inputdrivers_DATA = libdirectfb_sdlinput.o inputdrivers_LTLIBRARIES = libdirectfb_sdlinput.la gfxdriversdir = $(MODULEDIR)/gfxdrivers @BUILD_STATIC_TRUE@gfxdrivers_DATA = libdirectfb_sdlgraphics.o gfxdrivers_LTLIBRARIES = libdirectfb_sdlgraphics.la libdirectfb_sdl_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_sdl_la_SOURCES = \ primary.c \ primary.h \ sdl.c \ sdl.h \ sdl_surface_pool.c libdirectfb_sdl_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la \ $(SDL_LIBS) libdirectfb_sdlinput_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_sdlinput_la_SOURCES = \ sdlinput.c libdirectfb_sdlinput_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la \ $(SDL_LIBS) libdirectfb_sdlgraphics_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_sdlgraphics_la_SOURCES = \ sdlgfx.c libdirectfb_sdlgraphics_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la \ $(SDL_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/sdl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/sdl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-gfxdriversLTLIBRARIES: $(gfxdrivers_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(gfxdrivers_LTLIBRARIES)'; test -n "$(gfxdriversdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(gfxdriversdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(gfxdriversdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(gfxdriversdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(gfxdriversdir)"; \ } uninstall-gfxdriversLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(gfxdrivers_LTLIBRARIES)'; test -n "$(gfxdriversdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(gfxdriversdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(gfxdriversdir)/$$f"; \ done clean-gfxdriversLTLIBRARIES: -test -z "$(gfxdrivers_LTLIBRARIES)" || rm -f $(gfxdrivers_LTLIBRARIES) @list='$(gfxdrivers_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-inputdriversLTLIBRARIES: $(inputdrivers_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(inputdrivers_LTLIBRARIES)'; test -n "$(inputdriversdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdriversdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdriversdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdriversdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdriversdir)"; \ } uninstall-inputdriversLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(inputdrivers_LTLIBRARIES)'; test -n "$(inputdriversdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdriversdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdriversdir)/$$f"; \ done clean-inputdriversLTLIBRARIES: -test -z "$(inputdrivers_LTLIBRARIES)" || rm -f $(inputdrivers_LTLIBRARIES) @list='$(inputdrivers_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_sdl.la: $(libdirectfb_sdl_la_OBJECTS) $(libdirectfb_sdl_la_DEPENDENCIES) $(EXTRA_libdirectfb_sdl_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_sdl_la_LINK) -rpath $(systemsdir) $(libdirectfb_sdl_la_OBJECTS) $(libdirectfb_sdl_la_LIBADD) $(LIBS) libdirectfb_sdlgraphics.la: $(libdirectfb_sdlgraphics_la_OBJECTS) $(libdirectfb_sdlgraphics_la_DEPENDENCIES) $(EXTRA_libdirectfb_sdlgraphics_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_sdlgraphics_la_LINK) -rpath $(gfxdriversdir) $(libdirectfb_sdlgraphics_la_OBJECTS) $(libdirectfb_sdlgraphics_la_LIBADD) $(LIBS) libdirectfb_sdlinput.la: $(libdirectfb_sdlinput_la_OBJECTS) $(libdirectfb_sdlinput_la_DEPENDENCIES) $(EXTRA_libdirectfb_sdlinput_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_sdlinput_la_LINK) -rpath $(inputdriversdir) $(libdirectfb_sdlinput_la_OBJECTS) $(libdirectfb_sdlinput_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdl_surface_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdlgfx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdlinput.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-gfxdriversDATA: $(gfxdrivers_DATA) @$(NORMAL_INSTALL) @list='$(gfxdrivers_DATA)'; test -n "$(gfxdriversdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(gfxdriversdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(gfxdriversdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gfxdriversdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(gfxdriversdir)" || exit $$?; \ done uninstall-gfxdriversDATA: @$(NORMAL_UNINSTALL) @list='$(gfxdrivers_DATA)'; test -n "$(gfxdriversdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(gfxdriversdir)'; $(am__uninstall_files_from_dir) install-inputdriversDATA: $(inputdrivers_DATA) @$(NORMAL_INSTALL) @list='$(inputdrivers_DATA)'; test -n "$(inputdriversdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdriversdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdriversdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdriversdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdriversdir)" || exit $$?; \ done uninstall-inputdriversDATA: @$(NORMAL_UNINSTALL) @list='$(inputdrivers_DATA)'; test -n "$(inputdriversdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdriversdir)'; $(am__uninstall_files_from_dir) install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(gfxdriversdir)" "$(DESTDIR)$(inputdriversdir)" "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(gfxdriversdir)" "$(DESTDIR)$(inputdriversdir)" "$(DESTDIR)$(systemsdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-gfxdriversLTLIBRARIES \ clean-inputdriversLTLIBRARIES clean-libtool \ clean-systemsLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-gfxdriversDATA install-gfxdriversLTLIBRARIES \ install-inputdriversDATA install-inputdriversLTLIBRARIES \ install-systemsDATA install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-gfxdriversDATA uninstall-gfxdriversLTLIBRARIES \ uninstall-inputdriversDATA uninstall-inputdriversLTLIBRARIES \ uninstall-systemsDATA uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-gfxdriversLTLIBRARIES clean-inputdriversLTLIBRARIES \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-gfxdriversDATA \ install-gfxdriversLTLIBRARIES install-html install-html-am \ install-info install-info-am install-inputdriversDATA \ install-inputdriversLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ install-systemsDATA install-systemsLTLIBRARIES installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-gfxdriversDATA \ uninstall-gfxdriversLTLIBRARIES uninstall-inputdriversDATA \ uninstall-inputdriversLTLIBRARIES uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/sdl/sdl.c0000644000175000017500000002474312254435330013323 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "sdl.h" #include "primary.h" #include DFB_CORE_SYSTEM( sdl ) DFBSDL *dfb_sdl = NULL; CoreDFB *dfb_sdl_core = NULL; extern const SurfacePoolFuncs sdlSurfacePoolFuncs; static DFBResult dfb_fbdev_read_modes( void ); static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_SDL; info->caps = CSCAPS_ACCELERATION; snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "SDL" ); } static DFBResult system_initialize( CoreDFB *core, void **data ) { char *driver; CoreScreen *screen; D_ASSERT( dfb_sdl == NULL ); dfb_sdl = (DFBSDL*) SHCALLOC( dfb_core_shmpool(core), 1, sizeof(DFBSDL) ); if (!dfb_sdl) { D_ERROR( "DirectFB/SDL: Couldn't allocate shared memory!\n" ); return D_OOSHM(); } dfb_sdl_core = core; dfb_fbdev_read_modes(); /* use same mode list as a fake */ driver = getenv( "SDL_VIDEODRIVER" ); if (driver && !strcasecmp( driver, "directfb" )) { D_INFO( "DirectFB/SDL: SDL_VIDEODRIVER is 'directfb', unsetting it.\n" ); unsetenv( "SDL_VIDEODRIVER" ); } /* Initialize SDL */ if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) { D_ERROR( "DirectFB/SDL: Couldn't initialize SDL: %s\n", SDL_GetError() ); SHFREE( dfb_core_shmpool(core), dfb_sdl ); dfb_sdl = NULL; return DFB_INIT; } fusion_skirmish_init( &dfb_sdl->lock, "SDL System", dfb_core_world(core) ); fusion_call_init( &dfb_sdl->call, dfb_sdl_call_handler, NULL, dfb_core_world(core) ); screen = dfb_screens_register( NULL, NULL, sdlPrimaryScreenFuncs ); dfb_layers_register( screen, NULL, sdlPrimaryLayerFuncs ); core_arena_add_shared_field( core, "sdl", dfb_sdl ); dfb_surface_pool_initialize( core, &sdlSurfacePoolFuncs, &dfb_sdl->sdl_pool ); *data = dfb_sdl; return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **data ) { void *ret; CoreScreen *screen; D_ASSERT( dfb_sdl == NULL ); core_arena_get_shared_field( core, "sdl", &ret ); dfb_sdl = ret; dfb_sdl_core = core; screen = dfb_screens_register( NULL, NULL, sdlPrimaryScreenFuncs ); dfb_layers_register( screen, NULL, sdlPrimaryLayerFuncs ); dfb_surface_pool_join( core, dfb_sdl->sdl_pool, &sdlSurfacePoolFuncs ); *data = dfb_sdl; return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { FusionSHMPoolShared *pool; D_ASSERT( dfb_sdl != NULL ); /* Stop update thread. */ if (dfb_sdl->update.thread) { if (!emergency) { dfb_sdl->update.quit = true; pthread_cond_signal( &dfb_sdl->update.cond ); direct_thread_join( dfb_sdl->update.thread ); } direct_thread_destroy( dfb_sdl->update.thread ); } dfb_surface_pool_destroy( dfb_sdl->sdl_pool ); fusion_call_destroy( &dfb_sdl->call ); fusion_skirmish_prevail( &dfb_sdl->lock ); SDL_Quit(); fusion_skirmish_destroy( &dfb_sdl->lock ); pool = dfb_core_shmpool(dfb_sdl_core); while (dfb_sdl->modes) { VideoMode *next = dfb_sdl->modes->next; SHFREE( pool, dfb_sdl->modes ); dfb_sdl->modes = next; } SHFREE( pool, dfb_sdl ); dfb_sdl = NULL; dfb_sdl_core = NULL; return DFB_OK; } static DFBResult system_leave( bool emergency ) { D_ASSERT( dfb_sdl != NULL ); dfb_sdl = NULL; dfb_sdl_core = NULL; return DFB_OK; } static DFBResult system_suspend( void ) { return DFB_UNIMPLEMENTED; } static DFBResult system_resume( void ) { return DFB_UNIMPLEMENTED; } static volatile void * system_map_mmio( unsigned int offset, int length ) { return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator( void ) { return -1; } static VideoMode * system_get_modes( void ) { return dfb_sdl->modes; } static VideoMode * system_get_current_mode( void ) { return NULL; } static DFBResult system_thread_init( void ) { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return 0; } static void * system_video_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_videoram_length( void ) { return 0; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length( void ) { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { return; } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ return; } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ return; } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { return; } /* * parses video modes in /etc/fb.modes and stores them in dfb_fbdev->shared->modes * (to be replaced by DirectFB's own config system */ static DFBResult dfb_fbdev_read_modes( void ) { FILE *fp; char line[80],label[32],value[16]; int geometry=0, timings=0; int dummy; VideoMode temp_mode; VideoMode *m = dfb_sdl->modes; if (!(fp = fopen("/etc/fb.modes","r"))) return errno2result( errno ); while (fgets(line,79,fp)) { if (sscanf(line, "mode \"%31[^\"]\"",label) == 1) { memset( &temp_mode, 0, sizeof(VideoMode) ); geometry = 0; timings = 0; while (fgets(line,79,fp) && !(strstr(line,"endmode"))) { if (5 == sscanf(line," geometry %d %d %d %d %d", &temp_mode.xres, &temp_mode.yres, &dummy, &dummy, &temp_mode.bpp)) { geometry = 1; } else if (7 == sscanf(line," timings %d %d %d %d %d %d %d", &temp_mode.pixclock, &temp_mode.left_margin, &temp_mode.right_margin, &temp_mode.upper_margin, &temp_mode.lower_margin, &temp_mode.hsync_len, &temp_mode.vsync_len)) { timings = 1; } else if (1 == sscanf(line, " hsync %15s",value) && 0 == strcasecmp(value,"high")) { temp_mode.hsync_high = 1; } else if (1 == sscanf(line, " vsync %15s",value) && 0 == strcasecmp(value,"high")) { temp_mode.vsync_high = 1; } else if (1 == sscanf(line, " csync %15s",value) && 0 == strcasecmp(value,"high")) { temp_mode.csync_high = 1; } else if (1 == sscanf(line, " laced %15s",value) && 0 == strcasecmp(value,"true")) { temp_mode.laced = 1; } else if (1 == sscanf(line, " double %15s",value) && 0 == strcasecmp(value,"true")) { temp_mode.doubled = 1; } else if (1 == sscanf(line, " gsync %15s",value) && 0 == strcasecmp(value,"true")) { temp_mode.sync_on_green = 1; } else if (1 == sscanf(line, " extsync %15s",value) && 0 == strcasecmp(value,"true")) { temp_mode.external_sync = 1; } else if (1 == sscanf(line, " bcast %15s",value) && 0 == strcasecmp(value,"true")) { temp_mode.broadcast = 1; } } if (geometry && timings) { if (!m) { dfb_sdl->modes = SHCALLOC( dfb_core_shmpool(dfb_sdl_core), 1, sizeof(VideoMode) ); m = dfb_sdl->modes; } else { m->next = SHCALLOC( dfb_core_shmpool(dfb_sdl_core), 1, sizeof(VideoMode) ); m = m->next; } direct_memcpy (m, &temp_mode, sizeof(VideoMode)); D_DEBUG( "DirectFB/FBDev: %20s %4dx%4d %s%s\n", label, temp_mode.xres, temp_mode.yres, temp_mode.laced ? "interlaced " : "", temp_mode.doubled ? "doublescan" : "" ); } } } fclose (fp); return DFB_OK; } DirectFB-1.7.7/systems/pvr2d/0000755000175000017500000000000012466665353012735 500000000000000DirectFB-1.7.7/systems/pvr2d/pvr2d_primary.c0000644000175000017500000003126212254435330015606 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "pvr2d_system.h" #include "pvr2d_primary.h" D_DEBUG_DOMAIN( PVR2D_Layer, "PVR2D/Layer", "PVR2D Layer" ); D_DEBUG_DOMAIN( PVR2D_Update, "PVR2D/Update", "PVR2D Update" ); /**********************************************************************************************************************/ static DFBResult primaryInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { PVR2DData *pvr2d = driver_data; PVR2DDataShared *shared = pvr2d->shared; (void) shared; D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); /* Set the screen capabilities. */ description->caps = DSCCAPS_OUTPUTS; description->outputs = 1; /* Set the screen name. */ snprintf( description->name, DFB_SCREEN_DESC_NAME_LENGTH, "PVR2D Primary Screen" ); return DFB_OK; } static DFBResult primaryShutdownScreen( CoreScreen *screen, void *driver_data, void *screen_data ) { D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primaryGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { PVR2DData *pvr2d = driver_data; PVR2DDataShared *shared = pvr2d->shared; D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); *ret_width = shared->screen_size.w; *ret_height = shared->screen_size.h; return DFB_OK; } static DFBResult primaryInitOutput( CoreScreen *screen, void *driver_data, void *screen_data, int output, DFBScreenOutputDescription *description, DFBScreenOutputConfig *config ) { D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); description->caps = DSOCAPS_RESOLUTION; config->flags |= DSOCONF_RESOLUTION; config->resolution = DSOR_UNKNOWN; return DFB_OK; } static DFBResult primaryTestOutputConfig( CoreScreen *screen, void *driver_data, void *screen_data, int output, const DFBScreenOutputConfig *config, DFBScreenOutputConfigFlags *failed ) { D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primarySetOutputConfig( CoreScreen *screen, void *driver_data, void *screen_data, int output, const DFBScreenOutputConfig *config ) { PVR2DData *pvr2d = driver_data; PVR2DDataShared *shared = pvr2d->shared; int hor[] = { 640,720,720,800,1024,1152,1280,1280,1280,1280,1400,1600,1920 }; int ver[] = { 480,480,576,600, 768, 864, 720, 768, 960,1024,1050,1200,1080 }; int res; D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); (void)output; /* all outputs are active */ /* we support screen resizing only */ if (config->flags != DSOCONF_RESOLUTION) return DFB_INVARG; res = D_BITn32(config->resolution); if ( (res == -1) || (res >= D_ARRAY_SIZE(hor)) ) return DFB_INVARG; shared->screen_size.w = hor[res]; shared->screen_size.h = ver[res]; // FIXME: recreate window/target etc. return DFB_OK; } static const ScreenFuncs _pvr2dPrimaryScreenFuncs = { .InitScreen = primaryInitScreen, .ShutdownScreen = primaryShutdownScreen, .GetScreenSize = primaryGetScreenSize, .InitOutput = primaryInitOutput, .TestOutputConfig = primaryTestOutputConfig, .SetOutputConfig = primarySetOutputConfig }; const ScreenFuncs *pvr2dPrimaryScreenFuncs = &_pvr2dPrimaryScreenFuncs; /******************************************************************************/ static int primaryLayerDataSize( void ) { return sizeof(PVR2DLayerData); } static int primaryRegionDataSize( void ) { return 0; } static DFBResult primaryInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { PVR2DData *pvr2d = driver_data; PVR2DDataShared *shared = pvr2d->shared; D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); /* set capabilities and type */ description->caps = DLCAPS_SURFACE; description->type = DLTF_GRAPHICS; /* set name */ snprintf( description->name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "PVR2D Primary Layer" ); /* fill out the default configuration */ config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->buffermode = DLBM_FRONTONLY; if (dfb_config->mode.width) config->width = dfb_config->mode.width; else config->width = shared->screen_size.w; if (dfb_config->mode.height) config->height = dfb_config->mode.height; else config->height = shared->screen_size.h; if (dfb_config->mode.format != DSPF_UNKNOWN) config->pixelformat = dfb_config->mode.format; else if (dfb_config->mode.depth > 0) config->pixelformat = dfb_pixelformat_for_depth( dfb_config->mode.depth ); else config->pixelformat = DSPF_RGB16; return DFB_OK; } static DFBResult primaryTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *failed ) { CoreLayerRegionConfigFlags fail = 0; D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); switch (config->buffermode) { case DLBM_FRONTONLY: // case DLBM_BACKSYSTEM: // case DLBM_BACKVIDEO: // case DLBM_TRIPLE: break; default: fail |= CLRCF_BUFFERMODE; break; } switch (config->format) { // case DSPF_ARGB: case DSPF_RGB16: break; default: fail |= CLRCF_FORMAT; break; } if (config->options) fail |= CLRCF_OPTIONS; if (failed) *failed = fail; if (fail) return DFB_UNSUPPORTED; return DFB_OK; } static DFBResult primaryAddRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config ) { return DFB_OK; } static DFBResult primarySetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primaryRemoveRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ) { D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult DisplaySurface( PVR2DData *pvr2d, PVR2DMEMINFO *meminfo ) { PVR2DERROR ePVR2DStatus; /* ePVR2DStatus = PVR2DPresentBlt( pvr2d->hPVR2DContext, meminfo, 0 ); if (ePVR2DStatus) { D_ERROR( "DirectFB/PVR2D: PVR2DPresentBlt() failed! (status %d)\n", ePVR2DStatus ); return DFB_FAILURE; } */ return DFB_OK; } static DFBResult primaryFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { PVR2DData *pvr2d = driver_data; // PVR2DDataShared *shared = pvr2d->shared; D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); dfb_surface_flip( surface, false ); return DisplaySurface( pvr2d, left_lock->handle ); } static DFBResult primaryUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { PVR2DData *pvr2d = driver_data; // PVR2DDataShared *shared = pvr2d->shared; DFBRegion region = DFB_REGION_INIT_FROM_DIMENSION( &surface->config.size ); D_DEBUG_AT( PVR2D_Layer, "%s()\n", __FUNCTION__ ); if (left_update && !dfb_region_region_intersect( ®ion, left_update )) return DFB_OK; return DisplaySurface( pvr2d, left_lock->handle ); } static const DisplayLayerFuncs _pvr2dPrimaryLayerFuncs = { .LayerDataSize = primaryLayerDataSize, .RegionDataSize = primaryRegionDataSize, .InitLayer = primaryInitLayer, .TestRegion = primaryTestRegion, .AddRegion = primaryAddRegion, .SetRegion = primarySetRegion, .RemoveRegion = primaryRemoveRegion, .FlipRegion = primaryFlipRegion, .UpdateRegion = primaryUpdateRegion, }; const DisplayLayerFuncs *pvr2dPrimaryLayerFuncs = &_pvr2dPrimaryLayerFuncs; DirectFB-1.7.7/systems/pvr2d/Makefile.am0000644000175000017500000000147312171403127014674 00000000000000## Makefile.am for DirectFB/systems/pvr2d INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(PVR2D_CFLAGS) internalincludedir = $(INTERNALINCLUDEDIR)/pvr2d internalinclude_HEADERS = \ pvr2d_primary.h \ pvr2d_system.h systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_pvr2d.o endif systems_LTLIBRARIES = libdirectfb_pvr2d.la libdirectfb_pvr2d_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_pvr2d_la_SOURCES = \ pvr2d_primary.c \ pvr2d_system.c \ pvr2d_surface_pool.c libdirectfb_pvr2d_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la \ $(PVR2D_LIBS) include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/pvr2d/pvr2d_surface_pool.c0000644000175000017500000004240712254435330016607 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include "pvr2d_system.h" D_DEBUG_DOMAIN( PVR2D_Surfaces, "PVR2D/Surfaces", "PVR2D Framebuffer Surface Pool" ); D_DEBUG_DOMAIN( PVR2D_SurfLock, "PVR2D/SurfLock", "PVR2D Framebuffer Surface Pool Locks" ); /**********************************************************************************************************************/ typedef struct { int magic; } PVR2DPoolData; typedef struct { int magic; CoreDFB *core; PVR2DData *pvr2d; } PVR2DPoolLocalData; typedef struct { int magic; int offset; int pitch; int size; PVR2DMEMINFO *meminfo; NATIVE_PIXMAP_STRUCT nativePixmap; GLeglImageOES eglImage; GLuint texture; } PVR2DAllocationData; /**********************************************************************************************************************/ static int pvr2dPoolDataSize( void ) { return sizeof(PVR2DPoolData); } static int pvr2dPoolLocalDataSize( void ) { return sizeof(PVR2DPoolLocalData); } static int pvr2dAllocationDataSize( void ) { return sizeof(PVR2DAllocationData); } static DFBResult pvr2dInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { PVR2DPoolData *data = pool_data; PVR2DPoolLocalData *local = pool_local; PVR2DData *pvr2d = system_data; PVR2DDataShared *shared; D_DEBUG_AT( PVR2D_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( data != NULL ); D_ASSERT( local != NULL ); D_ASSERT( pvr2d != NULL ); D_ASSERT( ret_desc != NULL ); shared = pvr2d->shared; D_ASSERT( shared != NULL ); ret_desc->caps = CSPCAPS_PHYSICAL | CSPCAPS_VIRTUAL; ret_desc->access[CSAID_CPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_LAYER0] = CSAF_READ | CSAF_SHARED; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_DEFAULT; ret_desc->size = 0; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "PVR2D Pool" ); local->core = core; local->pvr2d = pvr2d; D_MAGIC_SET( data, PVR2DPoolData ); D_MAGIC_SET( local, PVR2DPoolLocalData ); return DFB_OK; } static DFBResult pvr2dJoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { PVR2DPoolData *data = pool_data; PVR2DPoolLocalData *local = pool_local; PVR2DData *pvr2d = system_data; PVR2DDataShared *shared; D_DEBUG_AT( PVR2D_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, PVR2DPoolData ); D_ASSERT( local != NULL ); D_ASSERT( pvr2d != NULL ); shared = pvr2d->shared; D_ASSERT( shared != NULL ); (void) data; local->core = core; local->pvr2d = pvr2d; D_MAGIC_SET( local, PVR2DPoolLocalData ); return DFB_OK; } static DFBResult pvr2dDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { PVR2DPoolData *data = pool_data; PVR2DPoolLocalData *local = pool_local; D_DEBUG_AT( PVR2D_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, PVR2DPoolData ); D_MAGIC_ASSERT( local, PVR2DPoolLocalData ); D_MAGIC_CLEAR( data ); D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult pvr2dLeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { PVR2DPoolData *data = pool_data; PVR2DPoolLocalData *local = pool_local; D_DEBUG_AT( PVR2D_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, PVR2DPoolData ); D_MAGIC_ASSERT( local, PVR2DPoolLocalData ); (void) data; D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult pvr2dTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { DFBResult ret; CoreSurface *surface; PVR2DPoolData *data = pool_data; PVR2DPoolLocalData *local = pool_local; (void) data; (void) local; D_DEBUG_AT( PVR2D_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, PVR2DPoolData ); D_MAGIC_ASSERT( local, PVR2DPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (surface->type & CSTF_LAYER) return DFB_OK; ret = DFB_OK;//dfb_surfacemanager_allocate( local->core, data->manager, buffer, NULL, NULL ); D_DEBUG_AT( PVR2D_Surfaces, " -> %s\n", DirectFBErrorString(ret) ); return ret; } static DFBResult pvr2dAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { CoreSurface *surface; PVR2DPoolData *data = pool_data; PVR2DPoolLocalData *local = pool_local; PVR2DAllocationData *alloc = alloc_data; PVR2DData *pvr2d; (void) data; (void) local; D_DEBUG_AT( PVR2D_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, PVR2DPoolData ); D_MAGIC_ASSERT( local, PVR2DPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); pvr2d = local->pvr2d; D_ASSERT( pvr2d != NULL ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); dfb_surface_calc_buffer_size( surface, 8, 1, &alloc->pitch, &alloc->size ); if (surface->type & CSTF_LAYER) { /* * Use Framebuffer */ alloc->meminfo = pvr2d->pFBMemInfo; } else { PVR2DERROR ePVR2DStatus; /* * Allocate PVR2D Memory */ ePVR2DStatus = PVR2DMemAlloc( pvr2d->hPVR2DContext, alloc->size, 256, 0, &alloc->meminfo ); if (ePVR2DStatus) { D_ERROR( "DirectFB/PVR2D: PVR2DMemAlloc( %d ) failed! (status %d)\n", alloc->size, ePVR2DStatus ); return DFB_INIT; } } alloc->offset = 0; D_DEBUG_AT( PVR2D_Surfaces, " -> offset %d, pitch %d, size %d\n", alloc->offset, alloc->pitch, alloc->size ); long ePixelFormat; switch (surface->config.format) { case DSPF_RGB16: ePixelFormat = 0; break; case DSPF_ARGB: ePixelFormat = 2; break; default: break; } /* * Native Pixmap */ alloc->nativePixmap.ePixelFormat = ePixelFormat; alloc->nativePixmap.eRotation = 0; alloc->nativePixmap.lWidth = surface->config.size.w; alloc->nativePixmap.lHeight = surface->config.size.h; alloc->nativePixmap.lStride = alloc->pitch; alloc->nativePixmap.lSizeInBytes = alloc->size; alloc->nativePixmap.pvAddress = alloc->meminfo->ui32DevAddr; alloc->nativePixmap.lAddress = (long) alloc->meminfo->pBase; /* * EGLImage */ EGLint err; alloc->eglImage = pvr2d->eglCreateImageKHR( pvr2d->eglDisplay, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, &alloc->nativePixmap, NULL ); if ((err = eglGetError()) != EGL_SUCCESS) { D_ERROR( "DirectFB/PVR2D: eglCreateImageKHR() failed! (error = %x)\n", err ); //return DFB_FAILURE; } /* * Texture */ glGenTextures( 1, &alloc->texture ); glBindTexture( GL_TEXTURE_2D, alloc->texture ); pvr2d->glEGLImageTargetTexture2DOES( GL_TEXTURE_2D, alloc->eglImage ); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/PVR2D: glEGLImageTargetTexture2DOES() failed! (error = %x)\n", err ); //return DFB_FAILURE; } allocation->size = alloc->size; allocation->offset = alloc->offset; D_MAGIC_SET( alloc, PVR2DAllocationData ); return DFB_OK; } static DFBResult pvr2dDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { CoreSurface *surface; PVR2DPoolData *data = pool_data; PVR2DPoolLocalData *local = pool_local; PVR2DAllocationData *alloc = alloc_data; PVR2DData *pvr2d; (void) data; D_DEBUG_AT( PVR2D_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, PVR2DPoolData ); D_MAGIC_ASSERT( local, VPSMemPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( alloc, PVR2DAllocationData ); pvr2d = local->pvr2d; D_ASSERT( pvr2d != NULL ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (surface->type & CSTF_LAYER) { alloc->meminfo = pvr2d->pFBMemInfo; } else { PVR2DERROR ePVR2DStatus; ePVR2DStatus = PVR2DMemFree( pvr2d->hPVR2DContext, alloc->meminfo ); if (ePVR2DStatus) { D_ERROR( "DirectFB/PVR2D: PVR2DMemFree() failed! (status %d)\n", ePVR2DStatus ); return DFB_INIT; } } D_MAGIC_CLEAR( alloc ); return DFB_OK; } static DFBResult pvr2dMuckOut( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer ) { CoreSurface *surface; PVR2DPoolData *data = pool_data; PVR2DPoolLocalData *local = pool_local; (void) data; (void) local; D_DEBUG_AT( PVR2D_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, VPSMemPoolData ); D_MAGIC_ASSERT( local, VPSMemPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); return DFB_UNSUPPORTED;//dfb_surfacemanager_displace( local->core, data->manager, buffer ); } static DFBResult pvr2dLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { PVR2DPoolLocalData *local = pool_local; PVR2DAllocationData *alloc = alloc_data; PVR2DData *pvr2d; (void) local; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, PVR2DAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( PVR2D_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); pvr2d = local->pvr2d; D_ASSERT( pvr2d != NULL ); lock->pitch = alloc->pitch; lock->offset = alloc->offset; lock->addr = alloc->meminfo->pBase; lock->phys = alloc->meminfo->ui32DevAddr; lock->handle = alloc->meminfo; if (lock->accessor == CSAID_GPU) { if (lock->access & CSAF_WRITE) lock->handle = alloc->meminfo; else lock->handle = alloc->texture; } D_DEBUG_AT( PVR2D_SurfLock, " -> offset %lu, pitch %d, addr %p, phys 0x%08lx\n", lock->offset, lock->pitch, lock->addr, lock->phys ); return DFB_OK; } static DFBResult pvr2dUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { PVR2DAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, PVR2DAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( PVR2D_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); (void) alloc; return DFB_OK; } #if 0 static DFBResult pvr2dRead( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, void *destination, int pitch, const DFBRectangle *rect ) { PVR2DAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, MesaAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( PVR2D_SurfLock, "%s( %p )\n", __FUNCTION__, allocation->buffer ); (void) alloc; return DFB_OK; } static DFBResult pvr2dWrite( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, const void *source, int pitch, const DFBRectangle *rect ) { PVR2DAllocationData *alloc = alloc_data; CoreSurface *surface; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, MesaAllocationData ); surface = allocation->surface; D_MAGIC_ASSERT( surface, CoreSurface ); D_DEBUG_AT( PVR2D_SurfLock, "%s( %p )\n", __FUNCTION__, allocation->buffer ); EGLint err; glBindTexture( GL_TEXTURE_2D, alloc->texture ); glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, surface->config.size.w, surface->config.size.h, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, source ); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/PVR2D: glTexSubImage2D() failed! (error = %x)\n", err ); //return DFB_FAILURE; } return DFB_OK; } #endif static const SurfacePoolFuncs _pvr2dSurfacePoolFuncs = { PoolDataSize: pvr2dPoolDataSize, PoolLocalDataSize: pvr2dPoolLocalDataSize, AllocationDataSize: pvr2dAllocationDataSize, InitPool: pvr2dInitPool, JoinPool: pvr2dJoinPool, DestroyPool: pvr2dDestroyPool, LeavePool: pvr2dLeavePool, TestConfig: pvr2dTestConfig, AllocateBuffer: pvr2dAllocateBuffer, DeallocateBuffer: pvr2dDeallocateBuffer, MuckOut: pvr2dMuckOut, Lock: pvr2dLock, Unlock: pvr2dUnlock, // Read: pvr2dRead, // Write: pvr2dWrite, }; const SurfacePoolFuncs *pvr2dSurfacePoolFuncs = &_pvr2dSurfacePoolFuncs; DirectFB-1.7.7/systems/pvr2d/pvr2d_system.c0000644000175000017500000002550012254435330015445 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include "pvr2d_primary.h" #include "pvr2d_system.h" #include DFB_CORE_SYSTEM( pvr2d ) /**********************************************************************************************************************/ static PVR2DData *m_data; /* FIXME: Fix Core System API to pass data in all functions. */ /**********************************************************************************************************************/ static DFBResult InitPVR2D( PVR2DData *pvr2d ) { PVR2DERROR ePVR2DStatus; PVR2DDataShared *shared = pvr2d->shared; pvr2d->nDevices = PVR2DEnumerateDevices(0); pvr2d->pDevInfo = (PVR2DDEVICEINFO *) malloc(pvr2d->nDevices * sizeof(PVR2DDEVICEINFO)); PVR2DEnumerateDevices(pvr2d->pDevInfo); pvr2d->nDeviceNum = pvr2d->pDevInfo[0].ulDevID; ePVR2DStatus = PVR2DCreateDeviceContext (pvr2d->nDeviceNum, &pvr2d->hPVR2DContext, 0); if (ePVR2DStatus) { D_ERROR( "DirectFB/PVR2D: PVR2DCreateDeviceContext() failed! (status %d)\n", ePVR2DStatus ); return DFB_INIT; } ePVR2DStatus = PVR2DGetFrameBuffer( pvr2d->hPVR2DContext, PVR2D_FB_PRIMARY_SURFACE, &pvr2d->pFBMemInfo); if (ePVR2DStatus) { D_ERROR( "DirectFB/PVR2D: PVR2DGetFrameBuffer() failed! (status %d)\n", ePVR2DStatus ); return DFB_INIT; } ePVR2DStatus = PVR2DGetScreenMode(pvr2d->hPVR2DContext, &pvr2d->eDisplayFormat, &pvr2d->lDisplayWidth, &pvr2d->lDisplayHeight, &pvr2d->lStride, &pvr2d->RefreshRate); if (ePVR2DStatus) { D_ERROR( "DirectFB/PVR2D: PVR2DGetScreenMode() failed! (status %d)\n", ePVR2DStatus ); return DFB_INIT; } D_INFO( "DirectFB/PVR2D: Display %ldx%ld, format %d, stride %ld, refresh %d\n", pvr2d->lDisplayWidth, pvr2d->lDisplayHeight, pvr2d->eDisplayFormat, pvr2d->lStride, pvr2d->RefreshRate ); shared->screen_size.w = pvr2d->lDisplayWidth; shared->screen_size.h = pvr2d->lDisplayHeight; return DFB_OK; } static DFBResult InitEGL( PVR2DData *pvr2d ) { EGLint iMajorVersion, iMinorVersion; EGLint ai32ContextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE}; pvr2d->eglDisplay = eglGetDisplay((int)0); if (!eglInitialize(pvr2d->eglDisplay, &iMajorVersion, &iMinorVersion)) return DFB_INIT; pvr2d->eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC) eglGetProcAddress("eglCreateImageKHR"); if (pvr2d->eglCreateImageKHR == NULL) { D_ERROR( "DirectFB/PVR2D: eglCreateImageKHR not found!\n" ); return DFB_UNSUPPORTED; } pvr2d->glEGLImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) eglGetProcAddress("glEGLImageTargetTexture2DOES"); if (pvr2d->glEGLImageTargetTexture2DOES == NULL) { D_ERROR( "DirectFB/PVR2D: glEGLImageTargetTexture2DOES not found!\n" ); return DFB_UNSUPPORTED; } eglBindAPI(EGL_OPENGL_ES_API); if (!TestEGLError("eglBindAPI")) return DFB_INIT; EGLint pi32ConfigAttribs[5]; pi32ConfigAttribs[0] = EGL_SURFACE_TYPE; pi32ConfigAttribs[1] = EGL_WINDOW_BIT | EGL_PIXMAP_BIT; pi32ConfigAttribs[2] = EGL_RENDERABLE_TYPE; pi32ConfigAttribs[3] = EGL_OPENGL_ES2_BIT; pi32ConfigAttribs[4] = EGL_NONE; int iConfigs; if (!eglChooseConfig(pvr2d->eglDisplay, pi32ConfigAttribs, &pvr2d->eglConfig, 1, &iConfigs) || (iConfigs != 1)) { D_ERROR("DirectFB/PVR2D: eglChooseConfig() failed.\n"); return DFB_INIT; } pvr2d->nativePixmap.ePixelFormat = 0; pvr2d->nativePixmap.eRotation = 0; pvr2d->nativePixmap.lWidth = pvr2d->lDisplayWidth; pvr2d->nativePixmap.lHeight = pvr2d->lDisplayHeight; pvr2d->nativePixmap.lStride = pvr2d->lStride; pvr2d->nativePixmap.lSizeInBytes = pvr2d->pFBMemInfo->ui32MemSize; pvr2d->nativePixmap.pvAddress = pvr2d->pFBMemInfo->ui32DevAddr; pvr2d->nativePixmap.lAddress = (long) pvr2d->pFBMemInfo->pBase; pvr2d->eglSurface = eglCreatePixmapSurface( pvr2d->eglDisplay, pvr2d->eglConfig, &pvr2d->nativePixmap, NULL ); if (!TestEGLError("eglCreatePixmapSurface")) return DFB_INIT; pvr2d->eglContext = eglCreateContext(pvr2d->eglDisplay, pvr2d->eglConfig, NULL, ai32ContextAttribs); if (!TestEGLError("eglCreateContext")) return DFB_INIT; eglMakeCurrent( pvr2d->eglDisplay, pvr2d->eglSurface, pvr2d->eglSurface, pvr2d->eglContext ); if (!TestEGLError("eglMakeCurrent")) return DFB_INIT; eglSwapInterval( pvr2d->eglDisplay, 1 ); if (!TestEGLError("eglSwapInterval")) return DFB_INIT; return DFB_OK; } /**********************************************************************************************************************/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_PVR2D; info->caps = CSCAPS_ACCELERATION; snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "PVR2D" ); } static DFBResult system_initialize( CoreDFB *core, void **ret_data ) { DFBResult ret; PVR2DData *data; PVR2DDataShared *shared; FusionSHMPoolShared *pool; D_ASSERT( m_data == NULL ); data = D_CALLOC( 1, sizeof(PVR2DData) ); if (!data) return D_OOM(); data->core = core; pool = dfb_core_shmpool( core ); shared = SHCALLOC( pool, 1, sizeof(PVR2DDataShared) ); if (!shared) { D_FREE( data ); return D_OOSHM(); } shared->shmpool = pool; data->shared = shared; ret = InitPVR2D( data ); if (ret) { SHFREE( pool, shared ); D_FREE( data ); return ret; } ret = InitEGL( data ); if (ret) { SHFREE( pool, shared ); D_FREE( data ); return ret; } *ret_data = m_data = data; data->screen = dfb_screens_register( NULL, data, pvr2dPrimaryScreenFuncs ); data->layer = dfb_layers_register( data->screen, data, pvr2dPrimaryLayerFuncs ); dfb_surface_pool_initialize( core, pvr2dSurfacePoolFuncs, &shared->pool ); core_arena_add_shared_field( core, "pvr2d", shared ); return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **ret_data ) { DFBResult ret; void *tmp; PVR2DData *data; PVR2DDataShared *shared; D_ASSERT( m_data == NULL ); data = D_CALLOC( 1, sizeof(PVR2DData) ); if (!data) return D_OOM(); data->core = core; ret = core_arena_get_shared_field( core, "pvr2d", &tmp ); if (ret) { D_FREE( data ); return ret; } data->shared = shared = tmp; *ret_data = m_data = data; data->screen = dfb_screens_register( NULL, data, pvr2dPrimaryScreenFuncs ); data->layer = dfb_layers_register( data->screen, data, pvr2dPrimaryLayerFuncs ); dfb_surface_pool_join( core, shared->pool, pvr2dSurfacePoolFuncs ); return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { PVR2DDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_destroy( shared->pool ); SHFREE( shared->shmpool, shared ); D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_leave( bool emergency ) { PVR2DDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_leave( shared->pool ); D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_suspend() { D_ASSERT( m_data != NULL ); return DFB_OK; } static DFBResult system_resume() { D_ASSERT( m_data != NULL ); return DFB_OK; } static volatile void * system_map_mmio( unsigned int offset, int length ) { return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator() { return dfb_config->accelerator; } static VideoMode * system_get_modes() { return NULL; } static VideoMode * system_get_current_mode() { return NULL; } static DFBResult system_thread_init() { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return 0; } static void * system_video_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_videoram_length() { return 0; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length() { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { return; } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { return; } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } DirectFB-1.7.7/systems/pvr2d/Makefile.in0000644000175000017500000006772412466665317014742 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ $(internalinclude_HEADERS) subdir = systems/pvr2d ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" \ "$(DESTDIR)$(internalincludedir)" LTLIBRARIES = $(systems_LTLIBRARIES) am__DEPENDENCIES_1 = libdirectfb_pvr2d_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la $(am__DEPENDENCIES_1) am_libdirectfb_pvr2d_la_OBJECTS = pvr2d_primary.lo pvr2d_system.lo \ pvr2d_surface_pool.lo libdirectfb_pvr2d_la_OBJECTS = $(am_libdirectfb_pvr2d_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_pvr2d_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_pvr2d_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_pvr2d_la_SOURCES) DIST_SOURCES = $(libdirectfb_pvr2d_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systems_DATA) HEADERS = $(internalinclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(PVR2D_CFLAGS) internalincludedir = $(INTERNALINCLUDEDIR)/pvr2d internalinclude_HEADERS = \ pvr2d_primary.h \ pvr2d_system.h systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_pvr2d.o systems_LTLIBRARIES = libdirectfb_pvr2d.la libdirectfb_pvr2d_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_pvr2d_la_SOURCES = \ pvr2d_primary.c \ pvr2d_system.c \ pvr2d_surface_pool.c libdirectfb_pvr2d_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la \ $(PVR2D_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/pvr2d/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/pvr2d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_pvr2d.la: $(libdirectfb_pvr2d_la_OBJECTS) $(libdirectfb_pvr2d_la_DEPENDENCIES) $(EXTRA_libdirectfb_pvr2d_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_pvr2d_la_LINK) -rpath $(systemsdir) $(libdirectfb_pvr2d_la_OBJECTS) $(libdirectfb_pvr2d_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pvr2d_primary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pvr2d_surface_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pvr2d_system.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) install-internalincludeHEADERS: $(internalinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(internalincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(internalincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(internalincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(internalincludedir)" || exit $$?; \ done uninstall-internalincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(internalincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(internalincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-systemsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-internalincludeHEADERS install-systemsDATA \ install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-internalincludeHEADERS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-systemsDATA install-systemsLTLIBRARIES \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/pvr2d/pvr2d_primary.h0000644000175000017500000000310512254435330015606 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __PVR2D__PRIMARY_H__ #define __PVR2D__PRIMARY_H__ #include #include extern const ScreenFuncs *pvr2dPrimaryScreenFuncs; extern const DisplayLayerFuncs *pvr2dPrimaryLayerFuncs; typedef struct { int layer_id; } PVR2DLayerData; #endif // __PVR2D__PRIMARY_H__ DirectFB-1.7.7/systems/pvr2d/pvr2d_system.h0000644000175000017500000000620312254435330015451 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __PVR2D_PVR2D_H__ #define __PVR2D_PVR2D_H__ #include #define GL_GLEXT_PROTOTYPES #include #include #define EGL_EGLEXT_PROTOTYPES #include #include #include #include extern const SurfacePoolFuncs *pvr2dSurfacePoolFuncs; typedef struct _NATIVE_PIXMAP_STRUCT { long ePixelFormat; long eRotation; long lWidth; long lHeight; long lStride; long lSizeInBytes; long pvAddress; long lAddress; }NATIVE_PIXMAP_STRUCT; typedef struct { FusionSHMPoolShared *shmpool; CoreSurfacePool *pool; DFBDimension screen_size; } PVR2DDataShared; typedef struct { PVR2DDataShared *shared; CoreDFB *core; CoreScreen *screen; CoreLayer *layer; int nDevices; PVR2DDEVICEINFO *pDevInfo; PVR2DCONTEXTHANDLE hPVR2DContext; PVR2DMEMINFO *pFBMemInfo; int nDeviceNum; PVR2DFORMAT eDisplayFormat; long lStride; int RefreshRate; long lDisplayWidth; long lDisplayHeight; long lDisplayBitsPerPixel; NATIVE_PIXMAP_STRUCT nativePixmap; EGLConfig eglConfig; EGLDisplay eglDisplay; EGLSurface eglSurface; EGLContext eglContext; PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; } PVR2DData; static inline bool TestEGLError(const char* pszLocation) { EGLint iErr = eglGetError(); if (iErr != EGL_SUCCESS) { D_ERROR("DirectFB/PVR2D: %s failed (%d).\n", pszLocation, iErr); return false; } return true; } #endif DirectFB-1.7.7/systems/devmem/0000755000175000017500000000000012466665353013155 500000000000000DirectFB-1.7.7/systems/devmem/surfacemanager.c0000644000175000017500000004370412254435330016215 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include "surfacemanager.h" D_DEBUG_DOMAIN( SurfMan, "SurfaceManager", "DirectFB Surface Manager" ); static Chunk *split_chunk ( SurfaceManager *manager, Chunk *chunk, int length ); static Chunk *free_chunk ( SurfaceManager *manager, Chunk *chunk ); static Chunk *occupy_chunk( SurfaceManager *manager, Chunk *chunk, CoreSurfaceAllocation *allocation, int length, int pitch ); DFBResult dfb_surfacemanager_create( CoreDFB *core, unsigned int length, SurfaceManager **ret_manager ) { FusionSHMPoolShared *pool; SurfaceManager *manager; Chunk *chunk; D_DEBUG_AT( SurfMan, "%s( %p, %d )\n", __FUNCTION__, core, length ); D_ASSERT( core != NULL ); D_ASSERT( ret_manager != NULL ); pool = dfb_core_shmpool( core ); manager = SHCALLOC( pool, 1, sizeof(SurfaceManager) ); if (!manager) return D_OOSHM(); chunk = SHCALLOC( pool, 1, sizeof(Chunk) ); if (!chunk) { D_OOSHM(); SHFREE( pool, manager ); return DFB_NOSHAREDMEMORY; } manager->shmpool = pool; manager->chunks = chunk; manager->offset = 0; manager->length = length; manager->avail = manager->length - manager->offset; D_MAGIC_SET( manager, SurfaceManager ); chunk->offset = manager->offset; chunk->length = manager->avail; D_MAGIC_SET( chunk, Chunk ); D_DEBUG_AT( SurfMan, " -> %p\n", manager ); *ret_manager = manager; return DFB_OK; } void dfb_surfacemanager_destroy( SurfaceManager *manager ) { Chunk *chunk; void *next; D_DEBUG_AT( SurfMan, "%s( %p )\n", __FUNCTION__, manager ); D_MAGIC_ASSERT( manager, SurfaceManager ); /* Deallocate all video chunks. */ chunk = manager->chunks; while (chunk) { next = chunk->next; D_MAGIC_CLEAR( chunk ); SHFREE( manager->shmpool, chunk ); chunk = next; } D_MAGIC_CLEAR( manager ); /* Deallocate manager struct. */ SHFREE( manager->shmpool, manager ); } /** public functions NOT locking the surfacemanger theirself, to be called between lock/unlock of surfacemanager **/ DFBResult dfb_surfacemanager_allocate( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, Chunk **ret_chunk ) { int pitch; int length; Chunk *c; CoreGraphicsDevice *device; Chunk *best_free = NULL; D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( buffer->surface, CoreSurface ); if (ret_chunk) D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); else D_ASSUME( allocation == NULL ); D_DEBUG_AT( SurfMan, "%s( %p ) <- %dx%d %s\n", __FUNCTION__, buffer, buffer->surface->config.size.w, buffer->surface->config.size.h, dfb_pixelformat_name( buffer->surface->config.format ) ); if (manager->suspended) return DFB_SUSPENDED; /* FIXME: Only one global device at the moment. */ device = dfb_core_get_part( core, DFCP_GRAPHICS ); D_ASSERT( device != NULL ); dfb_gfxcard_calc_buffer_size( device, buffer, &pitch, &length ); D_DEBUG_AT( SurfMan, " -> pitch %d, length %d\n", pitch, length ); if (manager->avail < length) return DFB_TEMPUNAVAIL; /* examine chunks */ c = manager->chunks; D_MAGIC_ASSERT( c, Chunk ); /* FIXME_SC_2 Workaround creation happening before graphics driver initialization. */ if (!c->next) { int length = dfb_gfxcard_memory_length(); if (c->length != length - manager->offset) { D_WARN( "workaround" ); manager->length = length; manager->avail = length - manager->offset; c->length = length - manager->offset; } } while (c) { D_MAGIC_ASSERT( c, Chunk ); if (!c->buffer && c->length >= length) { /* NULL means check only. */ if (!ret_chunk) return DFB_OK; /* found a nice place to chill */ if (!best_free || best_free->length > c->length) /* first found or better one? */ best_free = c; if (c->length == length) break; } c = c->next; } /* if we found a place */ if (best_free) { D_DEBUG_AT( SurfMan, " -> found free (%d)\n", best_free->length ); /* NULL means check only. */ if (ret_chunk) *ret_chunk = occupy_chunk( manager, best_free, allocation, length, pitch ); return DFB_OK; } D_DEBUG_AT( SurfMan, " -> failed (%d/%d avail)\n", manager->avail, manager->length ); /* no luck */ return DFB_NOVIDEOMEMORY; } DFBResult dfb_surfacemanager_displace( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer ) { int length; Chunk *multi_start = NULL; int multi_size = 0; int multi_tsize = 0; int multi_count = 0; Chunk *bestm_start = NULL; int bestm_count = 0; int bestm_size = 0; int min_toleration; Chunk *chunk; CoreGraphicsDevice *device; CoreSurfaceAllocation *smallest = NULL; (void)device; D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( buffer->surface, CoreSurface ); D_DEBUG_AT( SurfMan, "%s( %p ) <- %dx%d %s\n", __FUNCTION__, buffer, buffer->surface->config.size.w, buffer->surface->config.size.h, dfb_pixelformat_name( buffer->surface->config.format ) ); /* FIXME: Only one global device at the moment. */ device = dfb_core_get_part( core, DFCP_GRAPHICS ); D_ASSERT( device != NULL ); dfb_gfxcard_calc_buffer_size( dfb_core_get_part( core, DFCP_GRAPHICS ), buffer, NULL, &length ); min_toleration = manager->min_toleration/8 + 2; D_DEBUG_AT( SurfMan, " -> %7d required, min toleration %d\n", length, min_toleration ); chunk = manager->chunks; while (chunk) { CoreSurfaceAllocation *allocation; D_MAGIC_ASSERT( chunk, Chunk ); allocation = chunk->allocation; if (allocation) { CoreSurfaceBuffer *other; int size, locks; D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_ASSERT( chunk->buffer == allocation->buffer ); D_ASSERT( chunk->length >= allocation->size ); other = allocation->buffer; D_MAGIC_ASSERT( other, CoreSurfaceBuffer ); locks = dfb_surface_allocation_locks( allocation ); if (locks) { D_DEBUG_AT( SurfMan, " ++ %7d locked %dx\n", allocation->size, locks ); goto next_reset; } if (other->policy > buffer->policy) { D_DEBUG_AT( SurfMan, " ++ %7d policy %d > %d\n", allocation->size, other->policy, buffer->policy ); goto next_reset; } if (other->policy == CSP_VIDEOONLY) { D_DEBUG_AT( SurfMan, " ++ %7d policy videoonly\n", allocation->size ); goto next_reset; } chunk->tolerations++; if (chunk->tolerations > 0xff) chunk->tolerations = 0xff; if (other->policy == buffer->policy && chunk->tolerations < min_toleration) { D_DEBUG_AT( SurfMan, " ++ %7d tolerations %d/%d\n", allocation->size, chunk->tolerations, min_toleration ); goto next_reset; } size = allocation->size; if (chunk->prev && !chunk->prev->allocation) size += chunk->prev->length; if (chunk->next && !chunk->next->allocation) size += chunk->next->length; if (size >= length) { if (!smallest || smallest->size > allocation->size) { D_DEBUG_AT( SurfMan, " => %7d [%d] < %d, tolerations %d\n", allocation->size, size, smallest ? smallest->size : 0, chunk->tolerations ); smallest = allocation; } else D_DEBUG_AT( SurfMan, " -> %7d [%d] > %d\n", allocation->size, size, smallest->size ); } else D_DEBUG_AT( SurfMan, " -> %7d [%d]\n", allocation->size, size ); } else D_DEBUG_AT( SurfMan, " - %7d free\n", chunk->length ); if (!smallest) { if (!multi_start) { multi_start = chunk; multi_tsize = chunk->length; multi_size = chunk->allocation ? chunk->length : 0; multi_count = chunk->allocation ? 1 : 0; } else { multi_tsize += chunk->length; multi_size += chunk->allocation ? chunk->length : 0; multi_count += chunk->allocation ? 1 : 0; while (multi_tsize >= length && multi_count > 1) { if (!bestm_start || bestm_size > multi_size * multi_count / bestm_count) { D_DEBUG_AT( SurfMan, " =====> %7d, %7d %2d used [%7d %2d]\n", multi_tsize, multi_size, multi_count, bestm_size, bestm_count ); bestm_size = multi_size; bestm_start = multi_start; bestm_count = multi_count; } else D_DEBUG_AT( SurfMan, " -----> %7d, %7d %2d used\n", multi_tsize, multi_size, multi_count ); if (multi_count <= 2) break; if (!multi_start->allocation) { multi_tsize -= multi_start->length; multi_start = multi_start->next; } D_ASSUME( multi_start->allocation != NULL ); multi_tsize -= multi_start->length; multi_size -= multi_start->allocation ? multi_start->length : 0; multi_count -= multi_start->allocation ? 1 : 0; multi_start = multi_start->next; } } } chunk = chunk->next; continue; next_reset: multi_start = NULL; chunk = chunk->next; } if (smallest) { D_MAGIC_ASSERT( smallest, CoreSurfaceAllocation ); D_MAGIC_ASSERT( smallest->buffer, CoreSurfaceBuffer ); smallest->flags |= CSALF_MUCKOUT; D_DEBUG_AT( SurfMan, " -> offset %lu, size %d\n", smallest->offset, smallest->size ); return DFB_OK; } if (bestm_start) { chunk = bestm_start; while (bestm_count) { CoreSurfaceAllocation *allocation = chunk->allocation; if (allocation) { D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( allocation->buffer, CoreSurfaceBuffer ); allocation->flags |= CSALF_MUCKOUT; bestm_count--; } D_DEBUG_AT( SurfMan, " ---> offset %d, length %d\n", chunk->offset, chunk->length ); chunk = chunk->next; } return DFB_OK; } return DFB_NOVIDEOMEMORY; } DFBResult dfb_surfacemanager_deallocate( SurfaceManager *manager, Chunk *chunk ) { CoreSurfaceBuffer *buffer; (void)buffer; D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( chunk, Chunk ); buffer = chunk->buffer; D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( buffer->surface, CoreSurface ); D_DEBUG_AT( SurfMan, "%s( %p ) <- %dx%d %s\n", __FUNCTION__, buffer, buffer->surface->config.size.w, buffer->surface->config.size.h, dfb_pixelformat_name( buffer->surface->config.format ) ); free_chunk( manager, chunk ); return DFB_OK; } /** internal functions NOT locking the surfacemanager **/ static Chunk * split_chunk( SurfaceManager *manager, Chunk *c, int length ) { Chunk *newchunk; D_MAGIC_ASSERT( c, Chunk ); if (c->length == length) /* does not need be splitted */ return c; newchunk = (Chunk*) SHCALLOC( manager->shmpool, 1, sizeof(Chunk) ); if (!newchunk) { D_OOSHM(); return NULL; } /* calculate offsets and lengths of resulting chunks */ newchunk->offset = c->offset + c->length - length; newchunk->length = length; c->length -= newchunk->length; /* insert newchunk after chunk c */ newchunk->prev = c; newchunk->next = c->next; if (c->next) c->next->prev = newchunk; c->next = newchunk; D_MAGIC_SET( newchunk, Chunk ); return newchunk; } static Chunk * free_chunk( SurfaceManager *manager, Chunk *chunk ) { D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( chunk, Chunk ); if (!chunk->buffer) { D_BUG( "freeing free chunk" ); return chunk; } else { D_DEBUG_AT( SurfMan, "Deallocating %d bytes at offset %d.\n", chunk->length, chunk->offset ); } if (chunk->buffer->policy == CSP_VIDEOONLY) manager->avail += chunk->length; chunk->allocation = NULL; chunk->buffer = NULL; manager->min_toleration--; if (chunk->prev && !chunk->prev->buffer) { Chunk *prev = chunk->prev; //D_DEBUG_AT( SurfMan, " -> merging with previous chunk at %d\n", prev->offset ); prev->length += chunk->length; prev->next = chunk->next; if (prev->next) prev->next->prev = prev; //D_DEBUG_AT( SurfMan, " -> freeing %p (prev %p, next %p)\n", chunk, chunk->prev, chunk->next); D_MAGIC_CLEAR( chunk ); SHFREE( manager->shmpool, chunk ); chunk = prev; } if (chunk->next && !chunk->next->buffer) { Chunk *next = chunk->next; //D_DEBUG_AT( SurfMan, " -> merging with next chunk at %d\n", next->offset ); chunk->length += next->length; chunk->next = next->next; if (chunk->next) chunk->next->prev = chunk; D_MAGIC_CLEAR( next ); SHFREE( manager->shmpool, next ); } return chunk; } static Chunk * occupy_chunk( SurfaceManager *manager, Chunk *chunk, CoreSurfaceAllocation *allocation, int length, int pitch ) { D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( chunk, Chunk ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( allocation->buffer, CoreSurfaceBuffer ); if (allocation->buffer->policy == CSP_VIDEOONLY) manager->avail -= length; chunk = split_chunk( manager, chunk, length ); if (!chunk) return NULL; D_DEBUG_AT( SurfMan, "Allocating %d bytes at offset %d.\n", chunk->length, chunk->offset ); chunk->allocation = allocation; chunk->buffer = allocation->buffer; chunk->pitch = pitch; manager->min_toleration++; return chunk; } DirectFB-1.7.7/systems/devmem/surfacemanager.h0000644000175000017500000000774312254435330016225 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __SURFACEMANAGER_H__ #define __SURFACEMANAGER_H__ #include #include typedef struct _SurfaceManager SurfaceManager; typedef struct _Chunk Chunk; /* * initially there is one big free chunk, * chunks are splitted into a free and an occupied chunk if memory is allocated, * two chunks are merged to one free chunk if memory is deallocated */ struct _Chunk { int magic; int offset; /* offset in memory, is greater or equal to the heap offset */ int length; /* length of this chunk in bytes */ int pitch; CoreSurfaceBuffer *buffer; /* pointer to surface buffer occupying this chunk, or NULL if chunk is free */ CoreSurfaceAllocation *allocation; int tolerations; /* number of times this chunk was scanned occupied, resetted in assure_video */ Chunk *prev; Chunk *next; }; struct _SurfaceManager { int magic; FusionSHMPoolShared *shmpool; Chunk *chunks; int offset; int length; /* length of the heap in bytes */ int avail; /* amount of available memory in bytes */ int min_toleration; bool suspended; }; DFBResult dfb_surfacemanager_create ( CoreDFB *core, unsigned int length, SurfaceManager **ret_manager ); void dfb_surfacemanager_destroy( SurfaceManager *manager ); /* * finds and allocates one for the surface or fails, * after success the video health is CSH_RESTORE. * NOTE: this does not notify the listeners */ DFBResult dfb_surfacemanager_allocate( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, Chunk **ret_chunk ); DFBResult dfb_surfacemanager_displace( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer ); /* * sets the video health to CSH_INVALID frees the chunk and * notifies the listeners */ DFBResult dfb_surfacemanager_deallocate( SurfaceManager *manager, Chunk *chunk ); #endif DirectFB-1.7.7/systems/devmem/devmem.h0000644000175000017500000000341312254435330014505 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DEVMEM_DEVMEM_H__ #define __DEVMEM_DEVMEM_H__ #include #include #include "surfacemanager.h" #define DEV_MEM "/dev/mem" extern const SurfacePoolFuncs devmemSurfacePoolFuncs; typedef struct { FusionSHMPoolShared *shmpool; CoreSurfacePool *pool; SurfaceManager *manager; } DevMemDataShared; typedef struct { DevMemDataShared *shared; void *mem; volatile void *reg; } DevMemData; #endif DirectFB-1.7.7/systems/devmem/Makefile.am0000644000175000017500000000145312171403127015112 00000000000000## Makefile.am for DirectFB/systems/devmem INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src internalincludedir = $(INTERNALINCLUDEDIR)/devmem internalinclude_HEADERS = \ devmem.h \ surfacemanager.h systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_devmem.o endif systems_LTLIBRARIES = libdirectfb_devmem.la libdirectfb_devmem_la_LDFLAGS = \ -avoid-version \ -module \ $(SH772X_DEP_LIBS) libdirectfb_devmem_la_SOURCES = \ devmem.c \ devmem_surface_pool.c \ surfacemanager.c libdirectfb_devmem_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/devmem/Makefile.in0000644000175000017500000006764212466665316015160 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ $(internalinclude_HEADERS) subdir = systems/devmem ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" \ "$(DESTDIR)$(internalincludedir)" LTLIBRARIES = $(systems_LTLIBRARIES) libdirectfb_devmem_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_devmem_la_OBJECTS = devmem.lo devmem_surface_pool.lo \ surfacemanager.lo libdirectfb_devmem_la_OBJECTS = $(am_libdirectfb_devmem_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_devmem_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_devmem_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_devmem_la_SOURCES) DIST_SOURCES = $(libdirectfb_devmem_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systems_DATA) HEADERS = $(internalinclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src internalincludedir = $(INTERNALINCLUDEDIR)/devmem internalinclude_HEADERS = \ devmem.h \ surfacemanager.h systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_devmem.o systems_LTLIBRARIES = libdirectfb_devmem.la libdirectfb_devmem_la_LDFLAGS = \ -avoid-version \ -module \ $(SH772X_DEP_LIBS) libdirectfb_devmem_la_SOURCES = \ devmem.c \ devmem_surface_pool.c \ surfacemanager.c libdirectfb_devmem_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/devmem/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/devmem/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_devmem.la: $(libdirectfb_devmem_la_OBJECTS) $(libdirectfb_devmem_la_DEPENDENCIES) $(EXTRA_libdirectfb_devmem_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_devmem_la_LINK) -rpath $(systemsdir) $(libdirectfb_devmem_la_OBJECTS) $(libdirectfb_devmem_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devmem_surface_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/surfacemanager.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) install-internalincludeHEADERS: $(internalinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(internalincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(internalincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(internalincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(internalincludedir)" || exit $$?; \ done uninstall-internalincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(internalincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(internalincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-systemsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-internalincludeHEADERS install-systemsDATA \ install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-internalincludeHEADERS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-systemsDATA install-systemsLTLIBRARIES \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/devmem/devmem_surface_pool.c0000644000175000017500000003055012254435330017243 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include "devmem.h" #include "surfacemanager.h" D_DEBUG_DOMAIN( DevMem_Surfaces, "DevMem/Surfaces", "DevMem Framebuffer Surface Pool" ); D_DEBUG_DOMAIN( DevMem_SurfLock, "DevMem/SurfLock", "DevMem Framebuffer Surface Pool Locks" ); /**********************************************************************************************************************/ typedef struct { int magic; SurfaceManager *manager; } DevMemPoolData; typedef struct { int magic; CoreDFB *core; void *mem; } DevMemPoolLocalData; typedef struct { int magic; int offset; int pitch; int size; Chunk *chunk; } DevMemAllocationData; /**********************************************************************************************************************/ static int devmemPoolDataSize( void ) { return sizeof(DevMemPoolData); } static int devmemPoolLocalDataSize( void ) { return sizeof(DevMemPoolLocalData); } static int devmemAllocationDataSize( void ) { return sizeof(DevMemAllocationData); } static DFBResult devmemInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { DFBResult ret; DevMemPoolData *data = pool_data; DevMemPoolLocalData *local = pool_local; DevMemData *devmem = system_data; D_DEBUG_AT( DevMem_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( data != NULL ); D_ASSERT( local != NULL ); D_ASSERT( devmem != NULL ); D_ASSERT( devmem->shared != NULL ); D_ASSERT( ret_desc != NULL ); ret = dfb_surfacemanager_create( core, dfb_config->video_length, &data->manager ); if (ret) return ret; ret_desc->caps = CSPCAPS_PHYSICAL | CSPCAPS_VIRTUAL; ret_desc->access[CSAID_CPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_DEFAULT; ret_desc->size = dfb_config->video_length; /* For hardware layers */ ret_desc->access[CSAID_LAYER0] = CSAF_READ; ret_desc->access[CSAID_LAYER1] = CSAF_READ; ret_desc->access[CSAID_LAYER2] = CSAF_READ; ret_desc->access[CSAID_LAYER3] = CSAF_READ; ret_desc->access[CSAID_LAYER4] = CSAF_READ; ret_desc->access[CSAID_LAYER5] = CSAF_READ; ret_desc->access[CSAID_LAYER6] = CSAF_READ; ret_desc->access[CSAID_LAYER7] = CSAF_READ; ret_desc->access[CSAID_LAYER8] = CSAF_READ; ret_desc->access[CSAID_LAYER9] = CSAF_READ; ret_desc->access[CSAID_LAYER10] = CSAF_READ; ret_desc->access[CSAID_LAYER11] = CSAF_READ; ret_desc->access[CSAID_LAYER12] = CSAF_READ; ret_desc->access[CSAID_LAYER13] = CSAF_READ; ret_desc->access[CSAID_LAYER14] = CSAF_READ; ret_desc->access[CSAID_LAYER15] = CSAF_READ; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "/dev/mem" ); local->core = core; local->mem = devmem->mem; D_MAGIC_SET( data, DevMemPoolData ); D_MAGIC_SET( local, DevMemPoolLocalData ); devmem->shared->manager = data->manager; return DFB_OK; } static DFBResult devmemJoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { DevMemPoolData *data = pool_data; DevMemPoolLocalData *local = pool_local; DevMemData *devmem = system_data; D_DEBUG_AT( DevMem_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DevMemPoolData ); D_ASSERT( local != NULL ); D_ASSERT( devmem != NULL ); D_ASSERT( devmem->shared != NULL ); (void) data; local->core = core; local->mem = devmem->mem; D_MAGIC_SET( local, DevMemPoolLocalData ); return DFB_OK; } static DFBResult devmemDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { DevMemPoolData *data = pool_data; DevMemPoolLocalData *local = pool_local; D_DEBUG_AT( DevMem_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DevMemPoolData ); D_MAGIC_ASSERT( local, DevMemPoolLocalData ); dfb_surfacemanager_destroy( data->manager ); D_MAGIC_CLEAR( data ); D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult devmemLeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { DevMemPoolData *data = pool_data; DevMemPoolLocalData *local = pool_local; D_DEBUG_AT( DevMem_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DevMemPoolData ); D_MAGIC_ASSERT( local, DevMemPoolLocalData ); (void) data; D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult devmemTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { DFBResult ret; CoreSurface *surface; DevMemPoolData *data = pool_data; DevMemPoolLocalData *local = pool_local; D_DEBUG_AT( DevMem_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DevMemPoolData ); D_MAGIC_ASSERT( local, DevMemPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (surface->type & CSTF_LAYER) return DFB_OK; ret = dfb_surfacemanager_allocate( local->core, data->manager, buffer, NULL, NULL ); D_DEBUG_AT( DevMem_Surfaces, " -> %s\n", DirectFBErrorString(ret) ); return ret; } static DFBResult devmemAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { DFBResult ret; Chunk *chunk; CoreSurface *surface; DevMemPoolData *data = pool_data; DevMemPoolLocalData *local = pool_local; DevMemAllocationData *alloc = alloc_data; (void)surface; D_DEBUG_AT( DevMem_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DevMemPoolData ); D_MAGIC_ASSERT( local, DevMemPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); ret = dfb_surfacemanager_allocate( local->core, data->manager, buffer, allocation, &chunk ); if (ret) return ret; D_MAGIC_ASSERT( chunk, Chunk ); alloc->offset = chunk->offset; alloc->pitch = chunk->pitch; alloc->size = chunk->length; alloc->chunk = chunk; D_DEBUG_AT( DevMem_Surfaces, " -> offset %d, pitch %d, size %d\n", alloc->offset, alloc->pitch, alloc->size ); allocation->size = alloc->size; allocation->offset = alloc->offset; D_MAGIC_SET( alloc, DevMemAllocationData ); return DFB_OK; } static DFBResult devmemDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { DevMemPoolData *data = pool_data; DevMemAllocationData *alloc = alloc_data; D_DEBUG_AT( DevMem_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, DevMemPoolData ); D_MAGIC_ASSERT( alloc, DevMemAllocationData ); if (alloc->chunk) dfb_surfacemanager_deallocate( data->manager, alloc->chunk ); D_MAGIC_CLEAR( alloc ); return DFB_OK; } static DFBResult devmemLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { DevMemPoolLocalData *local = pool_local; DevMemAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, DevMemAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( DevMem_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); lock->pitch = alloc->pitch; lock->offset = alloc->offset; lock->addr = local->mem + alloc->offset; lock->phys = dfb_config->video_phys + alloc->offset; D_DEBUG_AT( DevMem_SurfLock, " -> offset %lu, pitch %d, addr %p, phys 0x%08lx\n", lock->offset, lock->pitch, lock->addr, lock->phys ); return DFB_OK; } static DFBResult devmemUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { DevMemAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( alloc, DevMemAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( DevMem_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); (void) alloc; return DFB_OK; } const SurfacePoolFuncs devmemSurfacePoolFuncs = { .PoolDataSize = devmemPoolDataSize, .PoolLocalDataSize = devmemPoolLocalDataSize, .AllocationDataSize = devmemAllocationDataSize, .InitPool = devmemInitPool, .JoinPool = devmemJoinPool, .DestroyPool = devmemDestroyPool, .LeavePool = devmemLeavePool, .TestConfig = devmemTestConfig, .AllocateBuffer = devmemAllocateBuffer, .DeallocateBuffer = devmemDeallocateBuffer, .Lock = devmemLock, .Unlock = devmemUnlock, }; DirectFB-1.7.7/systems/devmem/devmem.c0000644000175000017500000002246412254435330014507 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include "devmem.h" #include "surfacemanager.h" #include #ifdef HAVE_GFX_SH772X #include #endif DFB_CORE_SYSTEM( devmem ) /**********************************************************************************************************************/ static DevMemData *m_data; /* FIXME: Fix Core System API to pass data in all functions. */ /**********************************************************************************************************************/ static DFBResult MapMemAndReg( DevMemData *data, unsigned long mem_phys, unsigned int mem_length, unsigned long reg_phys, unsigned int reg_length ) { int fd; fd = open( DEV_MEM, O_RDWR | O_SYNC ); if (fd < 0) { D_PERROR( "System/DevMem: Opening '%s' failed!\n", DEV_MEM ); return DFB_INIT; } data->mem = mmap( NULL, mem_length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, mem_phys ); if (data->mem == MAP_FAILED) { D_PERROR( "System/DevMem: Mapping %d bytes at 0x%08lx via '%s' failed!\n", mem_length, mem_phys, DEV_MEM ); return DFB_INIT; } if (reg_phys && reg_length) { data->reg = mmap( NULL, reg_length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, reg_phys ); if (data->reg == MAP_FAILED) { D_PERROR( "System/DevMem: Mapping %d bytes at 0x%08lx via '%s' failed!\n", reg_length, reg_phys, DEV_MEM ); munmap( data->mem, mem_length ); close( fd ); return DFB_INIT; } } #ifdef HAVE_GFX_SH772X uiomux_register (data->mem, mem_phys, mem_length); #endif close( fd ); return DFB_OK; } static void UnmapMemAndReg( DevMemData *data, unsigned int mem_length, unsigned int reg_length ) { munmap( data->mem, mem_length ); if (reg_length) munmap( (void*) data->reg, reg_length ); } /**********************************************************************************************************************/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_DEVMEM; info->caps = CSCAPS_ACCELERATION; snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "DevMem" ); } static DFBResult system_initialize( CoreDFB *core, void **ret_data ) { DFBResult ret; DevMemData *data; DevMemDataShared *shared; FusionSHMPoolShared *pool; D_ASSERT( m_data == NULL ); if (!dfb_config->video_phys || !dfb_config->video_length) { D_ERROR( "System/DevMem: Please supply 'video-phys = 0xXXXXXXXX' and 'video-length = XXXX' options!\n" ); return DFB_INVARG; } if (dfb_config->mmio_phys && !dfb_config->mmio_length) { D_ERROR( "System/DevMem: Please supply both 'mmio-phys = 0xXXXXXXXX' and 'mmio-length = XXXX' options or none!\n" ); return DFB_INVARG; } data = D_CALLOC( 1, sizeof(DevMemData) ); if (!data) return D_OOM(); pool = dfb_core_shmpool( core ); shared = SHCALLOC( pool, 1, sizeof(DevMemDataShared) ); if (!shared) { D_FREE( data ); return D_OOSHM(); } shared->shmpool = pool; data->shared = shared; ret = MapMemAndReg( data, dfb_config->video_phys, dfb_config->video_length, dfb_config->mmio_phys, dfb_config->mmio_length ); if (ret) { SHFREE( pool, shared ); D_FREE( data ); return ret; } *ret_data = m_data = data; dfb_surface_pool_initialize( core, &devmemSurfacePoolFuncs, &shared->pool ); core_arena_add_shared_field( core, "devmem", shared ); return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **ret_data ) { DFBResult ret; void *tmp; DevMemData *data; DevMemDataShared *shared; D_ASSERT( m_data == NULL ); if (!dfb_config->video_phys || !dfb_config->video_length) { D_ERROR( "System/DevMem: Please supply 'video-phys = 0xXXXXXXXX' and 'video-length = XXXX' options!\n" ); return DFB_INVARG; } if (dfb_config->mmio_phys && !dfb_config->mmio_length) { D_ERROR( "System/DevMem: Please supply both 'mmio-phys = 0xXXXXXXXX' and 'mmio-length = XXXX' options or none!\n" ); return DFB_INVARG; } data = D_CALLOC( 1, sizeof(DevMemData) ); if (!data) return D_OOM(); ret = core_arena_get_shared_field( core, "devmem", &tmp ); if (ret) { D_FREE( data ); return ret; } data->shared = shared = tmp; ret = MapMemAndReg( data, dfb_config->video_phys, dfb_config->video_length, dfb_config->mmio_phys, dfb_config->mmio_length ); if (ret) { D_FREE( data ); return ret; } *ret_data = m_data = data; dfb_surface_pool_join( core, shared->pool, &devmemSurfacePoolFuncs ); return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { DevMemDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_destroy( shared->pool ); UnmapMemAndReg( m_data, dfb_config->video_length, dfb_config->mmio_length ); SHFREE( shared->shmpool, shared ); D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_leave( bool emergency ) { DevMemDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_leave( shared->pool ); UnmapMemAndReg( m_data, dfb_config->video_length, dfb_config->mmio_length ); D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_suspend( void ) { D_ASSERT( m_data != NULL ); return DFB_OK; } static DFBResult system_resume( void ) { D_ASSERT( m_data != NULL ); return DFB_OK; } static volatile void * system_map_mmio( unsigned int offset, int length ) { D_ASSERT( m_data != NULL ); return m_data->reg + offset; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator( void ) { return dfb_config->accelerator; } static VideoMode * system_get_modes( void ) { return NULL; } static VideoMode * system_get_current_mode( void ) { return NULL; } static DFBResult system_thread_init( void ) { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return dfb_config->video_phys + offset; } static void * system_video_memory_virtual( unsigned int offset ) { D_ASSERT( m_data != NULL ); return m_data->mem + offset; } static unsigned int system_videoram_length( void ) { return dfb_config->video_length; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length( void ) { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { return; } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ return; } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ return; } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { return; } DirectFB-1.7.7/systems/osx/0000755000175000017500000000000012466665353012511 500000000000000DirectFB-1.7.7/systems/osx/primary.c0000644000175000017500000004435212254435330014251 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "osx.h" #include "primary.h" extern DFBOSX *dfb_osx; extern CoreDFB *dfb_osx_core; /******************************************************************************/ static DFBResult dfb_osx_set_video_mode( CoreDFB *core, CoreLayerRegionConfig *config ); static DFBResult dfb_osx_update_screen( CoreDFB *core, DFBRegion *region ); static DFBResult dfb_osx_set_palette( CorePalette *palette ); static DFBResult update_screen( CoreSurface *surface, int x, int y, int w, int h ); static CGDirectDisplayID screen = NULL; /******************************************************************************/ static DFBResult primaryInitScreen( CoreScreen *screen, GraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { /* Set the screen capabilities. */ description->caps = DSCCAPS_NONE; /* Set the screen name. */ snprintf( description->name, DFB_SCREEN_DESC_NAME_LENGTH, "OSX Primary Screen" ); return DFB_OK; } static DFBResult primaryGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { D_ASSERT( dfb_osx != NULL ); if (dfb_osx->primary) { *ret_width = dfb_osx->primary->width; *ret_height = dfb_osx->primary->height; } else { if (dfb_config->mode.width) *ret_width = dfb_config->mode.width; else *ret_width = 640; if (dfb_config->mode.height) *ret_height = dfb_config->mode.height; else *ret_height = 480; } return DFB_OK; } static ScreenFuncs primaryScreenFuncs = { .InitScreen = primaryInitScreen, .GetScreenSize = primaryGetScreenSize, }; ScreenFuncs *osxPrimaryScreenFuncs = &primaryScreenFuncs; /******************************************************************************/ static int primaryLayerDataSize( void ) { return 0; } static int primaryRegionDataSize( void ) { return 0; } static DFBResult primaryInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { /* set capabilities and type */ description->caps = DLCAPS_SURFACE; description->type = DLTF_GRAPHICS; /* set name */ snprintf( description->name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "OSX Primary Layer" ); /* fill out the default configuration */ config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->buffermode = DLBM_FRONTONLY; if (dfb_config->mode.width) config->width = dfb_config->mode.width; else config->width = 640; if (dfb_config->mode.height) config->height = dfb_config->mode.height; else config->height = 480; if (dfb_config->mode.format != DSPF_UNKNOWN) config->pixelformat = dfb_config->mode.format; else if (dfb_config->mode.depth > 0) config->pixelformat = dfb_pixelformat_for_depth( dfb_config->mode.depth ); else config->pixelformat = DSPF_ARGB1555; return DFB_OK; } static DFBResult primaryTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *failed ) { CoreLayerRegionConfigFlags fail = 0; switch (config->buffermode) { case DLBM_FRONTONLY: case DLBM_BACKSYSTEM: case DLBM_BACKVIDEO: break; default: fail |= CLRCF_BUFFERMODE; break; } if (config->options) fail |= CLRCF_OPTIONS; if (failed) *failed = fail; if (fail) return DFB_UNSUPPORTED; return DFB_OK; } static DFBResult primaryAddRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config ) { return DFB_OK; } static DFBResult primarySetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette ) { DFBResult ret; if (surface) dfb_osx->primary = surface; ret = dfb_osx_set_video_mode( dfb_osx_core, config ); if (ret) return ret; if (palette) dfb_osx_set_palette( palette ); return DFB_OK; } static DFBResult primaryRemoveRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ) { dfb_osx->primary = NULL; return DFB_OK; } static DFBResult primaryFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags ) { dfb_surface_flip_buffers( surface, false ); return dfb_osx_update_screen( dfb_osx_core, NULL ); } static DFBResult primaryUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *update ) { if (surface && (surface->caps & DSCAPS_FLIPPING)) { if (update) { DFBRegion region = *update; return dfb_osx_update_screen( dfb_osx_core, ®ion ); } else return dfb_osx_update_screen( dfb_osx_core, NULL ); } return DFB_OK; } static DFBResult primaryAllocateSurface( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreSurface **ret_surface ) { DFBSurfaceCapabilities caps = DSCAPS_SYSTEMONLY; if (config->buffermode != DLBM_FRONTONLY) { caps |= DSCAPS_DOUBLE; return dfb_surface_create( NULL, config->width, config->height, config->format, CSP_SYSTEMONLY, caps, NULL, ret_surface ); } else { DFBResult ret; CoreSurface *surface = NULL; surface = dfb_core_create_surface( NULL ); if (!surface) return DFB_FAILURE; /* reallocation just needs an allocated buffer structure */ surface->idle_buffer = surface->back_buffer = surface->front_buffer = SHCALLOC( dfb_core_shmpool(dfb_osx_core), 1, sizeof(SurfaceBuffer) ); surface->front_buffer->policy = CSP_SYSTEMONLY; surface->front_buffer->format = config->format; *ret_surface = surface; ret = dfb_surface_init( NULL, surface, config->width, config->height, config->format, caps, NULL ); if (ret) return ret; /* activate object */ fusion_object_activate( &surface->object ); return ret; } } static DFBResult primaryReallocateSurface( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreSurface *surface ) { DFBResult ret; /* FIXME: write surface management functions for easier configuration changes */ switch (config->buffermode) { case DLBM_BACKVIDEO: case DLBM_BACKSYSTEM: surface->caps |= DSCAPS_DOUBLE; ret = dfb_surface_reconfig( surface, CSP_SYSTEMONLY, CSP_SYSTEMONLY ); break; case DLBM_FRONTONLY: surface->caps &= ~DSCAPS_DOUBLE; ret = dfb_surface_reconfig( surface, CSP_SYSTEMONLY, CSP_SYSTEMONLY ); break; default: D_BUG("unknown buffermode"); return DFB_BUG; } if (ret) return ret; ret = dfb_surface_reformat( NULL, surface, config->width, config->height, config->format ); if (ret) return ret; if (DFB_PIXELFORMAT_IS_INDEXED(config->format) && !surface->palette) { DFBResult ret; CorePalette *palette; ret = dfb_palette_create( NULL, /* FIXME */ 1 << DFB_COLOR_BITS_PER_PIXEL( config->format ), &palette ); if (ret) return ret; if (config->format == DSPF_LUT8) dfb_palette_generate_rgb332_map( palette ); dfb_surface_set_palette( surface, palette ); dfb_palette_unref( palette ); } return DFB_OK; } static DisplayLayerFuncs primaryLayerFuncs = { .LayerDataSize = primaryLayerDataSize, .RegionDataSize = primaryRegionDataSize, .InitLayer = primaryInitLayer, .TestRegion = primaryTestRegion, .AddRegion = primaryAddRegion, .SetRegion = primarySetRegion, .RemoveRegion = primaryRemoveRegion, .FlipRegion = primaryFlipRegion, .UpdateRegion = primaryUpdateRegion, .AllocateSurface = primaryAllocateSurface, .ReallocateSurface = primaryReallocateSurface, }; DisplayLayerFuncs *osxPrimaryLayerFuncs = &primaryLayerFuncs; /******************************************************************************/ static DFBResult update_screen( CoreSurface *surface, int x, int y, int w, int h ) { int i; void *dst; void *src; int pitch; int dst_pitch; DFBResult ret; D_ASSERT( surface != NULL ); ret = dfb_surface_soft_lock( dfb_osx_core, surface, DSLF_READ, &src, &pitch, true ); if (ret) { D_ERROR( "DirectFB/OSX: Couldn't lock layer surface: %s\n", DirectFBErrorString( ret ) ); return ret; } dst = CGDisplayBaseAddress( screen ); dst_pitch = CGDisplayBytesPerRow( screen ); src += DFB_BYTES_PER_LINE( surface->config.format, x ) + y * pitch; dst += DFB_BYTES_PER_LINE( surface->config.format, x ) + y * dst_pitch; for (i=0; iconfig.format, w ) ); src += pitch; dst += dst_pitch; } dfb_surface_unlock( surface, true ); return DFB_OK; } /******************************************************************************/ typedef enum { OSX_SET_VIDEO_MODE, OSX_UPDATE_SCREEN, OSX_SET_PALETTE } DFBOSXCall; static DFBResult dfb_osx_set_video_mode_handler( CoreLayerRegionConfig *config ) { boolean_t exactMatch; CFDictionaryRef mode; fusion_skirmish_prevail( &dfb_osx->lock ); mode = CGDisplayBestModeForParameters( screen, DFB_BITS_PER_PIXEL(config->format), config->width, config->height, &exactMatch); if (!mode || !exactMatch) { D_ERROR( "DirectFB/OSX: Couldn't set %dx%dx%d video mode.\n", config->width, config->height, DFB_COLOR_BITS_PER_PIXEL(config->format)); fusion_skirmish_dismiss( &dfb_osx->lock ); return DFB_FAILURE; } CGDisplaySwitchToMode( screen, mode ); CGDisplayCapture(screen); if (config->buffermode == DLBM_FRONTONLY) { /* update primary surface information */ dfb_osx->primary->front_buffer->system.addr = CGDisplayBaseAddress( screen ); dfb_osx->primary->front_buffer->system.pitch = CGDisplayBytesPerRow( screen ); } fusion_skirmish_dismiss( &dfb_osx->lock ); return DFB_OK; } static DFBResult dfb_osx_update_screen_handler( DFBRegion *region ) { DFBResult ret; CoreSurface *surface = dfb_osx->primary; fusion_skirmish_prevail( &dfb_osx->lock ); if (!region) ret = update_screen( surface, 0, 0, surface->config.size.w, surface->config.size.h ); else ret = update_screen( surface, region->x1, region->y1, region->x2 - region->x1 + 1, region->y2 - region->y1 + 1 ); fusion_skirmish_dismiss( &dfb_osx->lock ); return DFB_OK; } static DFBResult dfb_osx_set_palette_handler( CorePalette *palette ) { fusion_skirmish_prevail( &dfb_osx->lock ); // do something usefull fusion_skirmish_dismiss( &dfb_osx->lock ); return DFB_OK; } FusionCallHandlerResult dfb_osx_call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { switch (call_arg) { case OSX_SET_VIDEO_MODE: *ret_val = dfb_osx_set_video_mode_handler( call_ptr ); break; case OSX_UPDATE_SCREEN: *ret_val = dfb_osx_update_screen_handler( call_ptr ); break; case OSX_SET_PALETTE: *ret_val = dfb_osx_set_palette_handler( call_ptr ); break; default: D_BUG( "unknown call" ); *ret_val = DFB_BUG; break; } return FCHR_RETURN; } static DFBResult dfb_osx_set_video_mode( CoreDFB *core, CoreLayerRegionConfig *config ) { int ret; CoreLayerRegionConfig *tmp = NULL; D_ASSERT( config != NULL ); if (dfb_core_is_master( core )) return dfb_osx_set_video_mode_handler( config ); if (!fusion_is_shared( dfb_core_world(core), config )) { tmp = SHMALLOC( dfb_core_shmpool(dfb_osx_core), sizeof(CoreLayerRegionConfig) ); if (!tmp) return D_OOSHM(); direct_memcpy( tmp, config, sizeof(CoreLayerRegionConfig) ); } fusion_call_execute( &dfb_osx->call, FCEF_NONE, OSX_SET_VIDEO_MODE, tmp ? tmp : config, &ret ); if (tmp) SHFREE( dfb_core_shmpool(dfb_osx_core), tmp ); return ret; } static DFBResult dfb_osx_update_screen( CoreDFB *core, DFBRegion *region ) { int ret; DFBRegion *tmp = NULL; if (dfb_core_is_master( core )) return dfb_osx_update_screen_handler( region ); if (region) { if (!fusion_is_shared( dfb_core_world(core), region )) { tmp = SHMALLOC( dfb_core_shmpool(dfb_osx_core), sizeof(DFBRegion) ); if (!tmp) return D_OOSHM(); direct_memcpy( tmp, region, sizeof(DFBRegion) ); } } fusion_call_execute( &dfb_osx->call, FCEF_ONEWAY, OSX_UPDATE_SCREEN, tmp ? tmp : region, &ret ); if (tmp) SHFREE( dfb_core_shmpool(dfb_osx_core), tmp ); return ret; } static DFBResult dfb_osx_set_palette( CorePalette *palette ) { int ret; fusion_call_execute( &dfb_osx->call, FCEF_NONE, OSX_SET_PALETTE, palette, &ret ); return ret; } DirectFB-1.7.7/systems/osx/Makefile.am0000644000175000017500000000216412171403127014446 00000000000000## Makefile.am for DirectFB/systems/osx INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src systemsdir = $(MODULEDIR)/systems systems_LTLIBRARIES = libdirectfb_osx.la if BUILD_STATIC systems_DATA = libdirectfb_osx.o endif libdirectfb_osx_la_LDFLAGS = \ -framework ApplicationServices \ -avoid-version \ -module libdirectfb_osx_la_SOURCES = \ primary.c \ primary.h \ osx.c \ osx.h libdirectfb_osx_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la inputdriversdir = $(MODULEDIR)/inputdrivers inputdrivers_LTLIBRARIES = libdirectfb_osxinput.la if BUILD_STATIC inputdrivers_DATA = libdirectfb_osxinput.o endif libdirectfb_osxinput_la_LDFLAGS = \ -framework Carbon \ -avoid-version \ -module libdirectfb_osxinput_la_SOURCES = \ osxinput.c libdirectfb_osxinput_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/osx/primary.h0000644000175000017500000000343212254435330014250 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __OSX__PRIMARY_H__ #define __OSX__PRIMARY_H__ #include #include #include extern ScreenFuncs *osxPrimaryScreenFuncs; extern DisplayLayerFuncs *osxPrimaryLayerFuncs; FusionCallHandlerResult dfb_osx_call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) #endif DirectFB-1.7.7/systems/osx/Makefile.in0000644000175000017500000007505612466665317014513 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = systems/osx ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputdriversdir)" \ "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(inputdriversdir)" \ "$(DESTDIR)$(systemsdir)" LTLIBRARIES = $(inputdrivers_LTLIBRARIES) $(systems_LTLIBRARIES) libdirectfb_osx_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_osx_la_OBJECTS = primary.lo osx.lo libdirectfb_osx_la_OBJECTS = $(am_libdirectfb_osx_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_osx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_osx_la_LDFLAGS) \ $(LDFLAGS) -o $@ libdirectfb_osxinput_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_osxinput_la_OBJECTS = osxinput.lo libdirectfb_osxinput_la_OBJECTS = \ $(am_libdirectfb_osxinput_la_OBJECTS) libdirectfb_osxinput_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_osxinput_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_osx_la_SOURCES) \ $(libdirectfb_osxinput_la_SOURCES) DIST_SOURCES = $(libdirectfb_osx_la_SOURCES) \ $(libdirectfb_osxinput_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(inputdrivers_DATA) $(systems_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src systemsdir = $(MODULEDIR)/systems systems_LTLIBRARIES = libdirectfb_osx.la @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_osx.o libdirectfb_osx_la_LDFLAGS = \ -framework ApplicationServices \ -avoid-version \ -module libdirectfb_osx_la_SOURCES = \ primary.c \ primary.h \ osx.c \ osx.h libdirectfb_osx_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la inputdriversdir = $(MODULEDIR)/inputdrivers inputdrivers_LTLIBRARIES = libdirectfb_osxinput.la @BUILD_STATIC_TRUE@inputdrivers_DATA = libdirectfb_osxinput.o libdirectfb_osxinput_la_LDFLAGS = \ -framework Carbon \ -avoid-version \ -module libdirectfb_osxinput_la_SOURCES = \ osxinput.c libdirectfb_osxinput_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/osx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/osx/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputdriversLTLIBRARIES: $(inputdrivers_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(inputdrivers_LTLIBRARIES)'; test -n "$(inputdriversdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdriversdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdriversdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputdriversdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputdriversdir)"; \ } uninstall-inputdriversLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(inputdrivers_LTLIBRARIES)'; test -n "$(inputdriversdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdriversdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdriversdir)/$$f"; \ done clean-inputdriversLTLIBRARIES: -test -z "$(inputdrivers_LTLIBRARIES)" || rm -f $(inputdrivers_LTLIBRARIES) @list='$(inputdrivers_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_osx.la: $(libdirectfb_osx_la_OBJECTS) $(libdirectfb_osx_la_DEPENDENCIES) $(EXTRA_libdirectfb_osx_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_osx_la_LINK) -rpath $(systemsdir) $(libdirectfb_osx_la_OBJECTS) $(libdirectfb_osx_la_LIBADD) $(LIBS) libdirectfb_osxinput.la: $(libdirectfb_osxinput_la_OBJECTS) $(libdirectfb_osxinput_la_DEPENDENCIES) $(EXTRA_libdirectfb_osxinput_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_osxinput_la_LINK) -rpath $(inputdriversdir) $(libdirectfb_osxinput_la_OBJECTS) $(libdirectfb_osxinput_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osxinput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primary.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-inputdriversDATA: $(inputdrivers_DATA) @$(NORMAL_INSTALL) @list='$(inputdrivers_DATA)'; test -n "$(inputdriversdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(inputdriversdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputdriversdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(inputdriversdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(inputdriversdir)" || exit $$?; \ done uninstall-inputdriversDATA: @$(NORMAL_UNINSTALL) @list='$(inputdrivers_DATA)'; test -n "$(inputdriversdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(inputdriversdir)'; $(am__uninstall_files_from_dir) install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(inputdriversdir)" "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(inputdriversdir)" "$(DESTDIR)$(systemsdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-inputdriversLTLIBRARIES clean-libtool \ clean-systemsLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-inputdriversDATA \ install-inputdriversLTLIBRARIES install-systemsDATA \ install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-inputdriversDATA \ uninstall-inputdriversLTLIBRARIES uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-inputdriversLTLIBRARIES clean-libtool \ clean-systemsLTLIBRARIES cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-inputdriversDATA \ install-inputdriversLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ install-systemsDATA install-systemsLTLIBRARIES installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-inputdriversDATA \ uninstall-inputdriversLTLIBRARIES uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/osx/osx.h0000644000175000017500000000274212254435330013401 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __OSX__OSX_H__ #define __OSX__OSX_H__ #include #include typedef struct { FusionSkirmish lock; FusionCall call; CoreSurface *primary; } DFBOSX; #endif DirectFB-1.7.7/systems/osx/osxinput.c0000644000175000017500000002033712254435330014454 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include "osx.h" #include DFB_INPUT_DRIVER( osxinput ) /* * declaration of private data */ typedef struct { CoreInputDevice *device; DirectThread *thread; DFBOSX *dfb_osx; int stop; } OSXInputData; static DFBInputEvent motionX = { .type = DIET_UNKNOWN, .axisabs = 0, }; static DFBInputEvent motionY = { .type = DIET_UNKNOWN, .axisabs = 0, }; static void motion_compress( int x, int y ) { if (motionX.axisabs != x) { motionX.type = DIET_AXISMOTION; motionX.flags = DIEF_AXISABS; motionX.axis = DIAI_X; motionX.axisabs = x; } if (motionY.axisabs != y) { motionY.type = DIET_AXISMOTION; motionY.flags = DIEF_AXISABS; motionY.axis = DIAI_Y; motionY.axisabs = y; } } static void motion_realize( OSXInputData *data ) { if (motionX.type != DIET_UNKNOWN) { dfb_input_dispatch( data->device, &motionX ); motionX.type = DIET_UNKNOWN; } if (motionY.type != DIET_UNKNOWN) { dfb_input_dispatch( data->device, &motionY ); motionY.type = DIET_UNKNOWN; } } static bool translate_key( unsigned short key, DFBInputEvent *evt ) { unsigned char charcode = (unsigned char)key; unsigned char keycode = (unsigned char)(key>>8); printf("keycode: %d char: %d\n",keycode,charcode); if (charcode) { evt->flags = DIEF_KEYSYMBOL; switch (charcode) { case 28: evt->key_symbol = DIKS_CURSOR_LEFT; break; case 29: evt->key_symbol = DIKS_CURSOR_RIGHT; break; case 30: evt->key_symbol = DIKS_CURSOR_UP; break; case 31: evt->key_symbol = DIKS_CURSOR_DOWN; break; default: evt->key_symbol = charcode; break; } return true; } else if (keycode) { evt->flags = DIEF_KEYID; evt->key_id = keycode; return true; } return false; } /* * Input thread reading from device. * Generates events on incoming data. */ static void* osxEventThread( DirectThread *thread, void *driver_data ) { OSXInputData *data = (OSXInputData*) driver_data; DFBOSX *dfb_osx = data->dfb_osx; while (!data->stop) { DFBInputEvent evt; EventRecord event; fusion_skirmish_prevail( &dfb_osx->lock ); /* Check for events */ while ( WaitNextEvent( everyEvent, &event, 0, nil) ) { fusion_skirmish_dismiss( &dfb_osx->lock ); switch (event.what) { case keyDown: case keyUp: case autoKey: if (event.what == keyUp) evt.type = DIET_KEYRELEASE; else evt.type = DIET_KEYPRESS; if (translate_key( event.message & (charCodeMask | keyCodeMask), &evt )) { dfb_input_dispatch( data->device, &evt ); } break; case mouseDown: evt.type = DIET_BUTTONPRESS; evt.button = DIBI_LEFT; dfb_input_dispatch( data->device, &evt ); break; case mouseUp: evt.type = DIET_BUTTONRELEASE; evt.button = DIBI_LEFT; dfb_input_dispatch( data->device, &evt ); break; default: printf("%d\n",event.what); break; } fusion_skirmish_prevail( &dfb_osx->lock ); } fusion_skirmish_dismiss( &dfb_osx->lock ); usleep(10000); direct_thread_testcancel( thread ); } return NULL; } /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available( void ) { if (dfb_system_type() == CORE_OSX) return 1; return 0; } /* * Fill out general information about this driver. * Called once during initialization of DirectFB. */ static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf ( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "OSX Input Driver" ); snprintf ( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "Andreas Hundt" ); info->version.major = 0; info->version.minor = 1; } /* * Open the device, fill out information about it, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { OSXInputData *data; DFBOSX *dfb_osx = dfb_system_data(); fusion_skirmish_prevail( &dfb_osx->lock ); fusion_skirmish_dismiss( &dfb_osx->lock ); /* set device name */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "OSX Input" ); /* set device vendor */ snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "OSX" ); /* set one of the primary input device IDs */ info->prefered_id = DIDID_KEYBOARD; /* set type flags */ info->desc.type = DIDTF_KEYBOARD | DIDTF_MOUSE; /* set capabilities */ info->desc.caps = DICAPS_ALL; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(OSXInputData) ); data->device = device; data->dfb_osx = dfb_osx; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, osxEventThread, data, "OSX Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { OSXInputData *data = (OSXInputData*) driver_data; /* stop input thread */ data->stop = 1; direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); /* free private data */ D_FREE ( data ); } DirectFB-1.7.7/systems/osx/osx.c0000644000175000017500000001307712254435330013377 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "osx.h" #include "primary.h" #include DFB_CORE_SYSTEM( osx ) DFBOSX *dfb_osx = NULL; CoreDFB *dfb_osx_core = NULL; static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_OSX; snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "OSX" ); } static DFBResult system_initialize( CoreDFB *core, void **data ) { char *driver; CoreScreen *screen; D_ASSERT( dfb_osx == NULL ); dfb_osx = (DFBOSX*) SHCALLOC( dfb_core_shmpool(dfb_osx_core), 1, sizeof(DFBOSX) ); if (!dfb_osx) { D_ERROR( "DirectFB/OSX: Couldn't allocate shared memory!\n" ); return D_OOSHM(); } dfb_osx_core = core; /* Initialize OSX */ fusion_skirmish_init( &dfb_osx->lock, "OSX System", dfb_core_world(core) ); fusion_call_init( &dfb_osx->call, dfb_osx_call_handler, NULL, dfb_core_world(core) ); screen = dfb_screens_register( NULL, NULL, osxPrimaryScreenFuncs ); dfb_layers_register( screen, NULL, osxPrimaryLayerFuncs ); core_arena_add_shared_field( core, "OSX", dfb_osx ); *data = dfb_osx; return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **data ) { void *ret; CoreScreen *screen; D_ASSERT( dfb_osx == NULL ); core_arena_get_shared_field( core, "OSX", &ret ); dfb_osx = ret; dfb_osx_core = core; screen = dfb_screens_register( NULL, NULL, osxPrimaryScreenFuncs ); dfb_layers_register( screen, NULL, osxPrimaryLayerFuncs ); *data = dfb_osx; return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { D_ASSERT( dfb_osx != NULL ); fusion_call_destroy( &dfb_osx->call ); fusion_skirmish_prevail( &dfb_osx->lock ); fusion_skirmish_destroy( &dfb_osx->lock ); SHFREE( dfb_core_shmpool(dfb_osx_core), dfb_osx ); dfb_osx = NULL; dfb_osx_core = NULL; return DFB_OK; } static DFBResult system_leave( bool emergency ) { D_ASSERT( dfb_osx != NULL ); dfb_osx = NULL; dfb_osx_core = NULL; return DFB_OK; } static DFBResult system_suspend( void ) { return DFB_UNIMPLEMENTED; } static DFBResult system_resume( void ) { return DFB_UNIMPLEMENTED; } static volatile void * system_map_mmio( unsigned int offset, int length ) { return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator( void ) { return -1; } static VideoMode * system_get_modes( void ) { return NULL; } static VideoMode * system_get_current_mode( void ) { return NULL; } static DFBResult system_thread_init( void ) { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return 0; } static void * system_video_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_videoram_length( void ) { return 0; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length( void ) { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { return; } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ return; } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ return; } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { return; } DirectFB-1.7.7/systems/egl/0000755000175000017500000000000012466665353012447 500000000000000DirectFB-1.7.7/systems/egl/egl_system.h0000644000175000017500000001035112254435330014674 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __EGL_EGL_H__ #define __EGL_EGL_H__ #include #define GL_GLEXT_PROTOTYPES #define EGL_EGLEXT_PROTOTYPES #include #include #include #include #include #include extern const SurfacePoolFuncs *eglSurfacePoolFuncs; typedef struct { FusionSHMPoolShared *shmpool; CoreSurfacePool *pool; DFBDimension screen_size; } EGLDataShared; typedef struct { EGLDataShared *shared; CoreDFB *core; CoreScreen *screen; CoreLayer *layer; int nDevices; int nDeviceNum; int Stride; int RefreshRate; int DisplayWidth; int DisplayHeight; int DisplayBitsPerPixel; EGLConfig eglConfig; EGLDisplay eglDisplay; EGLSurface eglSurface; EGLContext eglContext; PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; } EGLData; static inline bool TestEGLError(const char* pszLocation) { EGLint iErr = eglGetError(); if (iErr != EGL_SUCCESS) { D_ERROR("DirectFB/EGL: %s failed (%d).\n", pszLocation, iErr); return false; } return true; } EGLAPI void EGLAPIENTRY eglCreateGlobalImageBRCM(EGLint width, EGLint height, EGLint pixel_format, const void *data, EGLint data_stride, EGLint *id); #define EGL_NATIVE_PIXMAP_CLIENT_SIDE_BRCM 0x99930B0 #define EGL_IMAGE_WRAP_BRCM 0x9993140 #define EGL_IMAGE_WRAP_BRCM_BCG 0x9993141 #define EGL_PIXEL_FORMAT_XRGB_8888_BRCM 2 #define EGL_PIXEL_FORMAT_ARGB_8888_BRCM 1 typedef enum { /* These formats are render target formats, but cannot be textured from */ BEGL_BufferFormat_eA8B8G8R8, BEGL_BufferFormat_eR8G8B8A8, BEGL_BufferFormat_eX8B8G8R8, BEGL_BufferFormat_eR8G8B8X8, BEGL_BufferFormat_eR5G6B5, /* These formats can be textured from, but cannot be rendered into */ BEGL_BufferFormat_eYUV422_Texture, BEGL_BufferFormat_eA8B8G8R8_Texture, /* These formats are TFormat variants */ BEGL_BufferFormat_eR8G8B8A8_TFormat, BEGL_BufferFormat_eX8G8B8A8_TFormat, BEGL_BufferFormat_eR5G6B5_TFormat, BEGL_BufferFormat_eR5G5B5A1_TFormat, BEGL_BufferFormat_eR4G4B4A4_TFormat, /* These are the LT versions for small textures */ BEGL_BufferFormat_eR8G8B8A8_LTFormat, BEGL_BufferFormat_eX8G8B8A8_LTFormat, BEGL_BufferFormat_eR5G6B5_LTFormat, BEGL_BufferFormat_eR5G5B5A1_LTFormat, BEGL_BufferFormat_eR4G4B4A4_LTFormat, /* Can be used to return back an invalid format */ BEGL_BufferFormat_INVALID } BEGL_BufferFormat; typedef struct { BEGL_BufferFormat format; uint16_t width; uint16_t height; int32_t stride; /* in bytes */ void *storage; } EGL_IMAGE_WRAP_BRCM_BC_IMAGE_T; #endif DirectFB-1.7.7/systems/egl/egl_primary.h0000644000175000017500000000307112254435330015034 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __EGL__PRIMARY_H__ #define __EGL__PRIMARY_H__ #include #include extern const ScreenFuncs *eglPrimaryScreenFuncs; extern const DisplayLayerFuncs *eglPrimaryLayerFuncs; typedef struct { int layer_id; } EGLLayerData; #endif // __EGL__PRIMARY_H__ DirectFB-1.7.7/systems/egl/Makefile.am0000644000175000017500000000143712254360430014407 00000000000000## Makefile.am for DirectFB/systems/egl INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(EGL_CFLAGS) internalincludedir = $(INTERNALINCLUDEDIR)/egl internalinclude_HEADERS = \ egl_primary.h \ egl_system.h systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_egl.o endif systems_LTLIBRARIES = libdirectfb_egl.la libdirectfb_egl_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_egl_la_SOURCES = \ egl_primary.c \ egl_system.c \ egl_surface_pool.c libdirectfb_egl_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la \ $(EGL_LIBS) include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/egl/egl_primary.c0000644000175000017500000003125612254435330015035 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "egl_system.h" #include "egl_primary.h" D_DEBUG_DOMAIN( EGL_Layer, "EGL/Layer", "EGL Layer" ); D_DEBUG_DOMAIN( EGL_Update, "EGL/Update", "EGL Update" ); /**********************************************************************************************************************/ static DFBResult primaryInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { EGLData *egl = driver_data; EGLDataShared *shared = egl->shared; (void) shared; D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); /* Set the screen capabilities. */ description->caps = DSCCAPS_OUTPUTS; description->outputs = 1; /* Set the screen name. */ snprintf( description->name, DFB_SCREEN_DESC_NAME_LENGTH, "EGL Primary Screen" ); return DFB_OK; } static DFBResult primaryShutdownScreen( CoreScreen *screen, void *driver_data, void *screen_data ) { D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primaryGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { EGLData *egl = driver_data; EGLDataShared *shared = egl->shared; D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); *ret_width = shared->screen_size.w; *ret_height = shared->screen_size.h; return DFB_OK; } static DFBResult primaryInitOutput( CoreScreen *screen, void *driver_data, void *screen_data, int output, DFBScreenOutputDescription *description, DFBScreenOutputConfig *config ) { D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); description->caps = DSOCAPS_RESOLUTION; config->flags |= DSOCONF_RESOLUTION; config->resolution = DSOR_UNKNOWN; return DFB_OK; } static DFBResult primaryTestOutputConfig( CoreScreen *screen, void *driver_data, void *screen_data, int output, const DFBScreenOutputConfig *config, DFBScreenOutputConfigFlags *failed ) { D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primarySetOutputConfig( CoreScreen *screen, void *driver_data, void *screen_data, int output, const DFBScreenOutputConfig *config ) { EGLData *egl = driver_data; EGLDataShared *shared = egl->shared; int hor[] = { 640,720,720,800,1024,1152,1280,1280,1280,1280,1400,1600,1920 }; int ver[] = { 480,480,576,600, 768, 864, 720, 768, 960,1024,1050,1200,1080 }; int res; D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); (void)output; /* all outputs are active */ /* we support screen resizing only */ if (config->flags != DSOCONF_RESOLUTION) return DFB_INVARG; res = D_BITn32(config->resolution); if ( (res == -1) || (res >= D_ARRAY_SIZE(hor)) ) return DFB_INVARG; shared->screen_size.w = hor[res]; shared->screen_size.h = ver[res]; // FIXME: recreate window/target etc. return DFB_OK; } static const ScreenFuncs _eglPrimaryScreenFuncs = { .InitScreen = primaryInitScreen, .ShutdownScreen = primaryShutdownScreen, .GetScreenSize = primaryGetScreenSize, .InitOutput = primaryInitOutput, .TestOutputConfig = primaryTestOutputConfig, .SetOutputConfig = primarySetOutputConfig }; const ScreenFuncs *eglPrimaryScreenFuncs = &_eglPrimaryScreenFuncs; /******************************************************************************/ static int primaryLayerDataSize( void ) { return sizeof(EGLLayerData); } static int primaryRegionDataSize( void ) { return 0; } static DFBResult primaryInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { EGLData *egl = driver_data; EGLDataShared *shared = egl->shared; D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); /* set capabilities and type */ description->caps = DLCAPS_SURFACE; description->type = DLTF_GRAPHICS; /* set name */ snprintf( description->name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "EGL Primary Layer" ); /* fill out the default configuration */ config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->buffermode = DLBM_FRONTONLY; if (dfb_config->mode.width) config->width = dfb_config->mode.width; else config->width = shared->screen_size.w; if (dfb_config->mode.height) config->height = dfb_config->mode.height; else config->height = shared->screen_size.h; if (dfb_config->mode.format != DSPF_UNKNOWN) config->pixelformat = dfb_config->mode.format; else if (dfb_config->mode.depth > 0) config->pixelformat = dfb_pixelformat_for_depth( dfb_config->mode.depth ); else config->pixelformat = DSPF_RGB16; return DFB_OK; } static DFBResult primaryTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *failed ) { CoreLayerRegionConfigFlags fail = 0; D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); switch (config->buffermode) { case DLBM_FRONTONLY: case DLBM_BACKSYSTEM: case DLBM_BACKVIDEO: case DLBM_TRIPLE: break; default: fail |= CLRCF_BUFFERMODE; break; } switch (config->format) { case DSPF_ARGB: case DSPF_RGB16: break; default: fail |= CLRCF_FORMAT; break; } if (config->options) fail |= CLRCF_OPTIONS; if (failed) *failed = fail; if (fail) return DFB_UNSUPPORTED; return DFB_OK; } static DFBResult primaryAddRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config ) { return DFB_OK; } static DFBResult primarySetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primaryRemoveRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ) { D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult DisplaySurface( EGLData *egl, void *handle ) { // EGLERROR eEGLStatus; // eEGLStatus = EGLPresentBlt( egl->hEGLContext, meminfo, 0 ); // if (eEGLStatus) { // D_ERROR( "DirectFB/EGL: EGLPresentBlt() failed! (status %d)\n", eEGLStatus ); // return DFB_FAILURE; // } return DFB_OK; } static DFBResult primaryFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { EGLData *egl = driver_data; // EGLDataShared *shared = egl->shared; D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); eglSwapBuffers(egl->eglDisplay, egl->eglSurface); dfb_surface_flip( surface, false ); return DisplaySurface( egl, left_lock->handle ); } static DFBResult primaryUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { EGLData *egl = driver_data; // EGLDataShared *shared = egl->shared; DFBRegion region = DFB_REGION_INIT_FROM_DIMENSION( &surface->config.size ); D_DEBUG_AT( EGL_Layer, "%s()\n", __FUNCTION__ ); if (left_update && !dfb_region_region_intersect( ®ion, left_update )) return DFB_OK; eglSwapBuffers(egl->eglDisplay, egl->eglSurface); return DisplaySurface( egl, left_lock->handle ); } static const DisplayLayerFuncs _eglPrimaryLayerFuncs = { .LayerDataSize = primaryLayerDataSize, .RegionDataSize = primaryRegionDataSize, .InitLayer = primaryInitLayer, .TestRegion = primaryTestRegion, .AddRegion = primaryAddRegion, .SetRegion = primarySetRegion, .RemoveRegion = primaryRemoveRegion, .FlipRegion = primaryFlipRegion, .UpdateRegion = primaryUpdateRegion, }; const DisplayLayerFuncs *eglPrimaryLayerFuncs = &_eglPrimaryLayerFuncs; DirectFB-1.7.7/systems/egl/egl_surface_pool.c0000644000175000017500000005730112254435330016032 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include "egl_system.h" D_DEBUG_DOMAIN( EGL_Surfaces, "EGL/Surfaces", "EGL Framebuffer Surface Pool" ); D_DEBUG_DOMAIN( EGL_SurfLock, "EGL/SurfLock", "EGL Framebuffer Surface Pool Locks" ); /**********************************************************************************************************************/ typedef struct { int magic; } EGLPoolData; typedef struct { int magic; CoreDFB *core; EGLData *egl; } EGLPoolLocalData; typedef struct { int magic; int offset; int pitch; int size; EGLint id; GLeglImageOES eglImage; GLuint texture; GLuint fbo; void *pixeldata; } EGLAllocationData; /**********************************************************************************************************************/ static int eglPoolDataSize( void ) { return sizeof(EGLPoolData); } static int eglPoolLocalDataSize( void ) { return sizeof(EGLPoolLocalData); } static int eglAllocationDataSize( void ) { return sizeof(EGLAllocationData); } static DFBResult eglInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { EGLPoolData *data = pool_data; EGLPoolLocalData *local = pool_local; EGLData *egl = system_data; EGLDataShared *shared; D_DEBUG_AT( EGL_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( data != NULL ); D_ASSERT( local != NULL ); D_ASSERT( egl != NULL ); D_ASSERT( ret_desc != NULL ); shared = egl->shared; D_ASSERT( shared != NULL ); ret_desc->caps = CSPCAPS_PHYSICAL | CSPCAPS_VIRTUAL; // ret_desc->access[CSAID_CPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_LAYER0] = CSAF_READ | CSAF_SHARED; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_DEFAULT; ret_desc->size = 0; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "EGL Pool" ); local->core = core; local->egl = egl; D_MAGIC_SET( data, EGLPoolData ); D_MAGIC_SET( local, EGLPoolLocalData ); return DFB_OK; } static DFBResult eglJoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { EGLPoolData *data = pool_data; EGLPoolLocalData *local = pool_local; EGLData *egl = system_data; EGLDataShared *shared; D_DEBUG_AT( EGL_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, EGLPoolData ); D_ASSERT( local != NULL ); D_ASSERT( egl != NULL ); shared = egl->shared; D_ASSERT( shared != NULL ); (void) data; local->core = core; local->egl = egl; D_MAGIC_SET( local, EGLPoolLocalData ); return DFB_OK; } static DFBResult eglDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { EGLPoolData *data = pool_data; EGLPoolLocalData *local = pool_local; D_DEBUG_AT( EGL_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, EGLPoolData ); D_MAGIC_ASSERT( local, EGLPoolLocalData ); D_MAGIC_CLEAR( data ); D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult eglLeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { EGLPoolData *data = pool_data; EGLPoolLocalData *local = pool_local; D_DEBUG_AT( EGL_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, EGLPoolData ); D_MAGIC_ASSERT( local, EGLPoolLocalData ); (void) data; D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult eglTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { DFBResult ret; CoreSurface *surface; EGLPoolData *data = pool_data; EGLPoolLocalData *local = pool_local; (void) data; (void) local; D_DEBUG_AT( EGL_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, EGLPoolData ); D_MAGIC_ASSERT( local, EGLPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (surface->type & CSTF_LAYER) return DFB_OK; ret = DFB_OK;//dfb_surfacemanager_allocate( local->core, data->manager, buffer, NULL, NULL ); D_DEBUG_AT( EGL_Surfaces, " -> %s\n", DirectFBErrorString(ret) ); return ret; } static DFBResult eglAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { CoreSurface *surface; EGLPoolData *data = pool_data; EGLPoolLocalData *local = pool_local; EGLAllocationData *alloc = alloc_data; EGLData *egl; (void) data; (void) local; D_DEBUG_AT( EGL_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, EGLPoolData ); D_MAGIC_ASSERT( local, EGLPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); egl = local->egl; D_ASSERT( egl != NULL ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); dfb_surface_calc_buffer_size( surface, 8, 1, &alloc->pitch, &alloc->size ); alloc->offset = 0; D_DEBUG_AT( EGL_Surfaces, " -> offset %d, pitch %d, size %d\n", alloc->offset, alloc->pitch, alloc->size ); // EGLContext context = eglGetCurrentContext(); // eglMakeCurrent( egl->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, egl->eglContext ); long ePixelFormat; switch (surface->config.format) { case DSPF_RGB16: ePixelFormat = 0; break; case DSPF_ARGB: ePixelFormat = 2; break; default: break; } /* * EGLImage */ #if 1 EGLint err; int fbo = 0; int tex = 0; #if 0 alloc->pixeldata = malloc (alloc->pitch * surface->config.size.h); alloc->id = -1; eglCreateGlobalImageBRCM( surface->config.size.w, surface->config.size.h, EGL_PIXEL_FORMAT_ARGB_8888_BRCM, alloc->pixeldata, alloc->pitch, &alloc->id); if (alloc->id < 0) { D_ERROR( "DirectFB/EGL: eglCreateGlobalImageBRCM() failed! (error = %x)\n", err ); return DFB_FAILURE; } EGL_IMAGE_WRAP_BRCM_BC_IMAGE_T brcm_image_wrap; brcm_image_wrap.format = BEGL_BufferFormat_eA8B8G8R8_Texture; brcm_image_wrap.height = surface->config.size.h; brcm_image_wrap.width = surface->config.size.w; brcm_image_wrap.stride = alloc->pitch; brcm_image_wrap.storage = alloc->id; alloc->eglImage = egl->eglCreateImageKHR( egl->eglDisplay, NULL, EGL_IMAGE_WRAP_BRCM_BCG, &brcm_image_wrap, NULL ); if ((err = eglGetError()) != EGL_SUCCESS) { D_ERROR( "DirectFB/EGL: eglCreateImageKHR() failed! (error = %x)\n", err ); return DFB_FAILURE; } #endif glGetIntegerv( GL_FRAMEBUFFER_BINDING, &fbo ); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/EGL: glGetIntegerv( GL_FRAMEBUFFER_BINDING ) failed! (error = %x)\n", err ); //return DFB_FAILURE; } glGetIntegerv( GL_TEXTURE_BINDING_2D, &tex ); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/EGL: glGetIntegerv( GL_TEXTURE_BINDING_2D ) failed! (error = %x)\n", err ); //return DFB_FAILURE; } /* * Texture */ if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/EGL: Error before glGenTextures()! (error = %x)\n", err ); //return DFB_FAILURE; } while (!alloc->texture) { glGenTextures( 1, &alloc->texture ); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/EGL: glGenTextures() failed! (error = %x)\n", err ); //return DFB_FAILURE; } } glBindTexture( GL_TEXTURE_2D, alloc->texture ); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/EGL: glBindTexture() failed! (error = %x)\n", err ); return DFB_FAILURE; } glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, surface->config.size.w, surface->config.size.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL ); // glEGLImageTargetTexture2DOES( GL_TEXTURE_2D, alloc->eglImage ); if ((err = eglGetError()) != EGL_SUCCESS) { D_ERROR( "DirectFB/EGL: glTexImage2D() failed! (error = %x)\n", err ); return DFB_FAILURE; } /* * FBO */ glGenFramebuffers( 1, &alloc->fbo ); glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, alloc->texture, 0 ); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/EGL: glFramebufferTexture2D() failed! (error = %x)\n", err ); return DFB_FAILURE; } glBindTexture( GL_TEXTURE_2D, tex ); glBindFramebuffer( GL_FRAMEBUFFER, fbo ); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/EGL: glBindFramebuffer() failed! (error = %x)\n", err ); return DFB_FAILURE; } #endif allocation->size = alloc->size; allocation->offset = alloc->offset; D_MAGIC_SET( alloc, EGLAllocationData ); // eglMakeCurrent( egl->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, context ); return DFB_OK; } static DFBResult eglDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { CoreSurface *surface; EGLPoolData *data = pool_data; EGLPoolLocalData *local = pool_local; EGLAllocationData *alloc = alloc_data; EGLData *egl; (void) data; D_DEBUG_AT( EGL_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, EGLPoolData ); D_MAGIC_ASSERT( alloc, EGLAllocationData ); egl = local->egl; D_ASSERT( egl != NULL ); glDeleteFramebuffers( 1, &alloc->fbo ); glDeleteTextures( 1, &alloc->texture ); if (allocation->type & CSTF_LAYER) { } else { // EGLERROR eEGLStatus; // eEGLStatus = EGLMemFree( egl->hEGLContext, alloc->meminfo ); // if (eEGLStatus) { // D_ERROR( "DirectFB/EGL: EGLMemFree() failed! (status %d)\n", eEGLStatus ); // return DFB_INIT; // } } D_MAGIC_CLEAR( alloc ); return DFB_OK; } static DFBResult eglMuckOut( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer ) { CoreSurface *surface; EGLPoolData *data = pool_data; EGLPoolLocalData *local = pool_local; (void) data; (void) local; D_DEBUG_AT( EGL_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, VPSMemPoolData ); D_MAGIC_ASSERT( local, VPSMemPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); return DFB_UNSUPPORTED;//dfb_surfacemanager_displace( local->core, data->manager, buffer ); } static DFBResult eglLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { EGLPoolLocalData *local = pool_local; EGLAllocationData *alloc = alloc_data; EGLData *egl; (void) local; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, EGLAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( EGL_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); egl = local->egl; D_ASSERT( egl != NULL ); lock->pitch = alloc->pitch; lock->offset = alloc->offset; lock->addr = alloc->pixeldata; // lock->addr = alloc->meminfo->pBase; // lock->phys = alloc->meminfo->ui32DevAddr; // lock->handle = alloc->meminfo; if (lock->accessor == CSAID_GPU) { if (lock->access & CSAF_WRITE) { if (allocation->type & CSTF_LAYER) glBindFramebuffer( GL_FRAMEBUFFER, 0 ); else glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); } else lock->handle = alloc->texture; } D_DEBUG_AT( EGL_SurfLock, " -> offset %lu, pitch %d, addr %p, phys 0x%08lx\n", lock->offset, lock->pitch, lock->addr, 0x0 ); return DFB_OK; } static DFBResult eglUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { EGLAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, EGLAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( EGL_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); (void) alloc; return DFB_OK; } static DFBResult eglWrite( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, const void *source, int pitch, const DFBRectangle *rect ) { EGLAllocationData *alloc = alloc_data; GLuint *buff, *sline, *dline, *s, *d; GLuint pixel, w, h, pixels_per_line; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, EGLAllocationData ); D_DEBUG_AT( EGL_SurfLock, "%s( %p )\n", __FUNCTION__, allocation->buffer ); EGLint err; int tex; switch (allocation->config.format) { case DSPF_RGB32: case DSPF_ARGB: glGetIntegerv( GL_TEXTURE_BINDING_2D, &tex ); glBindTexture( GL_TEXTURE_2D, alloc->texture ); buff = (GLuint *)D_MALLOC(rect->w * rect->h * 4); if (!buff) { D_ERROR("EGL: failed to allocate %d bytes for texture upload!\n", rect->w * rect->h * 4); return D_OOM(); } pixels_per_line = pitch/4; sline = (GLuint *)source + rect->x + (rect->y * pixels_per_line); dline = buff; h = rect->h; while (h--) { s = sline; d = dline; w = rect->w; while (w--) { pixel = *s++; *d++ = (pixel & 0xff00ff00) | ((pixel >> 16) & 0x000000ff) | ((pixel << 16) & 0x00ff0000); } sline += pixels_per_line; dline += rect->w; } //if (rect->w == allocation->config.size.w && rect->h == allocation->config.size.h) // glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, allocation->config.size.w, allocation->config.size.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, source ); //else glTexSubImage2D( GL_TEXTURE_2D, 0, rect->x, rect->y, rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, buff ); D_FREE(buff); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/EGL: glTexSubImage2D() failed! (error = %x)\n", err ); //return DFB_FAILURE; } glBindTexture( GL_TEXTURE_2D, tex ); break; default: break; } return DFB_OK; } static DFBResult fboRead( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, void *destination, int pitch, const DFBRectangle *rect ) { EGLAllocationData *alloc = alloc_data; GLuint *buff, *sline, *dline, *s, *d; GLuint pixel, w, h, pixels_per_line; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, EGLAllocationData ); D_INFO( "%s( %p, %dx%d, type 0x%08x )\n", __FUNCTION__, allocation->buffer, allocation->config.size.w, allocation->config.size.h, allocation->type ); D_DEBUG_AT( EGL_SurfLock, "%s( %p )\n", __FUNCTION__, allocation->buffer ); (void) alloc; buff = (GLuint *)D_MALLOC(rect->w * rect->h * 4); if (!buff) { D_ERROR("EGL: failed to allocate %d bytes for texture download!\n", rect->w * rect->h); return D_OOM(); } int fbo; glGetIntegerv( GL_FRAMEBUFFER_BINDING, &fbo ); glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); glReadPixels(rect->x, rect->y, rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, buff); glBindFramebuffer( GL_FRAMEBUFFER, fbo ); pixels_per_line = pitch/4; sline = buff; dline = (GLuint *)destination;// + rect->x + (rect->y * pixels_per_line); h = rect->h; while (h--) { s = sline; d = dline; w = rect->w; while (w--) { pixel = *s++; *d++ = (pixel & 0xff00ff00) | ((pixel >> 16) & 0x000000ff) | ((pixel << 16) & 0x00ff0000); } sline += rect->w; dline += pixels_per_line; } D_FREE(buff); return DFB_OK; } static DFBResult fboWrite( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, const void *source, int pitch, const DFBRectangle *rect ) { EGLAllocationData *alloc = alloc_data; CoreSurface *surface; GLuint *buff, *sline, *dline, *s, *d; GLuint pixel, w, h, pixels_per_line; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, EGLAllocationData ); surface = allocation->surface; D_MAGIC_ASSERT( surface, CoreSurface ); // D_INFO( "%s( %p, %dx%d, type 0x%08x )\n", __FUNCTION__, allocation->buffer, allocation->config.size.w, allocation->config.size.h, // allocation->type ); // direct_trace_print_stack(NULL); D_DEBUG_AT( EGL_SurfLock, "%s( %p )\n", __FUNCTION__, allocation->buffer ); D_DEBUG_AT( EGL_SurfLock, " -> " DFB_RECT_FORMAT "\n", DFB_RECTANGLE_VALS(rect) ); EGLint err; int tex; glGetIntegerv( GL_TEXTURE_BINDING_2D, &tex ); glBindTexture( GL_TEXTURE_2D, alloc->texture ); glPixelStorei( GL_UNPACK_ALIGNMENT, 8 ); if (allocation->config.format == DSPF_ABGR) { glTexSubImage2D(GL_TEXTURE_2D, 0, rect->x, rect->y, rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, source); } else { glTexSubImage2D(GL_TEXTURE_2D, 0, rect->x, rect->y, rect->w, rect->h, GL_BGRA_EXT, GL_UNSIGNED_BYTE, source); } if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/PVR2D: glTexSubImage2D() failed! (error = %x)\n", err ); //return DFB_FAILURE; } glBindTexture( GL_TEXTURE_2D, tex ); // D_INFO( "%s( %p, %dx%d, type 0x%08x ) done\n", __FUNCTION__, allocation->buffer, allocation->config.size.w, allocation->config.size.h, // allocation->type ); return DFB_OK; } static const SurfacePoolFuncs _eglSurfacePoolFuncs = { PoolDataSize: eglPoolDataSize, PoolLocalDataSize: eglPoolLocalDataSize, AllocationDataSize: eglAllocationDataSize, InitPool: eglInitPool, JoinPool: eglJoinPool, DestroyPool: eglDestroyPool, LeavePool: eglLeavePool, TestConfig: eglTestConfig, AllocateBuffer: eglAllocateBuffer, DeallocateBuffer: eglDeallocateBuffer, MuckOut: eglMuckOut, Lock: eglLock, Unlock: eglUnlock, Read: fboRead, Write: fboWrite, }; const SurfacePoolFuncs *eglSurfacePoolFuncs = &_eglSurfacePoolFuncs; DirectFB-1.7.7/systems/egl/Makefile.in0000644000175000017500000006761212466665317014450 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ $(internalinclude_HEADERS) subdir = systems/egl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" \ "$(DESTDIR)$(internalincludedir)" LTLIBRARIES = $(systems_LTLIBRARIES) am__DEPENDENCIES_1 = libdirectfb_egl_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la $(am__DEPENDENCIES_1) am_libdirectfb_egl_la_OBJECTS = egl_primary.lo egl_system.lo \ egl_surface_pool.lo libdirectfb_egl_la_OBJECTS = $(am_libdirectfb_egl_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_egl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_egl_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_egl_la_SOURCES) DIST_SOURCES = $(libdirectfb_egl_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systems_DATA) HEADERS = $(internalinclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(EGL_CFLAGS) internalincludedir = $(INTERNALINCLUDEDIR)/egl internalinclude_HEADERS = \ egl_primary.h \ egl_system.h systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_egl.o systems_LTLIBRARIES = libdirectfb_egl.la libdirectfb_egl_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_egl_la_SOURCES = \ egl_primary.c \ egl_system.c \ egl_surface_pool.c libdirectfb_egl_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la \ $(EGL_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/egl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/egl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_egl.la: $(libdirectfb_egl_la_OBJECTS) $(libdirectfb_egl_la_DEPENDENCIES) $(EXTRA_libdirectfb_egl_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_egl_la_LINK) -rpath $(systemsdir) $(libdirectfb_egl_la_OBJECTS) $(libdirectfb_egl_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egl_primary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egl_surface_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egl_system.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) install-internalincludeHEADERS: $(internalinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(internalincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(internalincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(internalincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(internalincludedir)" || exit $$?; \ done uninstall-internalincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(internalincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(internalincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-systemsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-internalincludeHEADERS install-systemsDATA \ install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-internalincludeHEADERS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-systemsDATA install-systemsLTLIBRARIES \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/egl/egl_system.c0000644000175000017500000002413312254435330014672 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include "egl_primary.h" #include "egl_system.h" #include #define RASPBERRY_PI DFB_CORE_SYSTEM( egl ) /**********************************************************************************************************************/ static EGLData *m_data; /* FIXME: Fix Core System API to pass data in all functions. */ /**********************************************************************************************************************/ static DFBResult InitEGL( EGLData *egl ) { int err; EGLint iMajorVersion, iMinorVersion; EGLint ai32ContextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE}; #ifdef RASPBERRY_PI static EGL_DISPMANX_WINDOW_T nativewindow; DISPMANX_ELEMENT_HANDLE_T dispman_element; DISPMANX_DISPLAY_HANDLE_T dispman_display; DISPMANX_UPDATE_HANDLE_T dispman_update; VC_RECT_T dst_rect; VC_RECT_T src_rect; bcm_host_init(); #endif egl->eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); if (!eglInitialize(egl->eglDisplay, &iMajorVersion, &iMinorVersion)) return DFB_INIT; egl->eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC) eglGetProcAddress("eglCreateImageKHR"); if (egl->eglCreateImageKHR == NULL) { D_ERROR( "DirectFB/EGL: eglCreateImageKHR not found!\n" ); return DFB_UNSUPPORTED; } egl->glEGLImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) eglGetProcAddress("glEGLImageTargetTexture2DOES"); if (egl->glEGLImageTargetTexture2DOES == NULL) { D_ERROR( "DirectFB/EGL: glEGLImageTargetTexture2DOES not found!\n" ); return DFB_UNSUPPORTED; } eglBindAPI(EGL_OPENGL_ES_API); if (!TestEGLError("eglBindAPI")) return DFB_INIT; EGLint pi32ConfigAttribs[] = { EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_NONE }; int iConfigs; if (!eglChooseConfig(egl->eglDisplay, pi32ConfigAttribs, &egl->eglConfig, 1, &iConfigs) || (iConfigs != 1)) { D_ERROR("DirectFB/EGL: eglChooseConfig() failed.\n"); return DFB_INIT; } egl->eglContext = eglCreateContext(egl->eglDisplay, egl->eglConfig, EGL_NO_CONTEXT, ai32ContextAttribs); if (!TestEGLError("eglCreateContext")) return DFB_INIT; #ifdef RASPBERRY_PI graphics_get_display_size(0 /* LCD */, &egl->DisplayWidth, &egl->DisplayHeight); dst_rect.x = 0; dst_rect.y = 0; dst_rect.width = egl->DisplayWidth; dst_rect.height = egl->DisplayHeight; src_rect.x = 0; src_rect.y = 0; src_rect.width = dst_rect.width << 16; // ANDI: fixed point 16.16? src_rect.height = dst_rect.height << 16; dispman_display = vc_dispmanx_display_open( 0); dispman_update = vc_dispmanx_update_start( 0 ); dispman_element = vc_dispmanx_element_add ( dispman_update, dispman_display, 0, &dst_rect, 0, &src_rect, DISPMANX_PROTECTION_NONE, 0, 0, 0); nativewindow.element = dispman_element; nativewindow.width = egl->DisplayWidth; nativewindow.height = egl->DisplayHeight; vc_dispmanx_update_submit_sync( dispman_update ); #endif egl->eglSurface = eglCreateWindowSurface( egl->eglDisplay, egl->eglConfig, &nativewindow, NULL ); if (!TestEGLError("eglCreateWindowSurface")) return DFB_INIT; eglMakeCurrent( egl->eglDisplay, egl->eglSurface, egl->eglSurface, egl->eglContext ); if (!TestEGLError("eglMakeCurrent")) return DFB_INIT; eglSwapInterval( egl->eglDisplay, 1 ); if (!TestEGLError("eglSwapInterval")) return DFB_INIT; if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/EGL: Error at end of InitEGL! (error = %x)\n", err ); //return DFB_FAILURE; } return DFB_OK; } /**********************************************************************************************************************/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_EGL; info->caps = CSCAPS_ACCELERATION; snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "EGL" ); } static DFBResult system_initialize( CoreDFB *core, void **ret_data ) { DFBResult ret; EGLData *data; EGLDataShared *shared; FusionSHMPoolShared *pool; D_ASSERT( m_data == NULL ); data = D_CALLOC( 1, sizeof(EGLData) ); if (!data) return D_OOM(); data->core = core; pool = dfb_core_shmpool( core ); shared = SHCALLOC( pool, 1, sizeof(EGLDataShared) ); if (!shared) { D_FREE( data ); return D_OOSHM(); } shared->shmpool = pool; data->shared = shared; ret = InitEGL( data ); if (ret) { SHFREE( pool, shared ); D_FREE( data ); return ret; } *ret_data = m_data = data; data->screen = dfb_screens_register( NULL, data, eglPrimaryScreenFuncs ); data->layer = dfb_layers_register( data->screen, data, eglPrimaryLayerFuncs ); dfb_surface_pool_initialize( core, eglSurfacePoolFuncs, &shared->pool ); core_arena_add_shared_field( core, "egl", shared ); return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **ret_data ) { DFBResult ret; void *tmp; EGLData *data; EGLDataShared *shared; D_ASSERT( m_data == NULL ); data = D_CALLOC( 1, sizeof(EGLData) ); if (!data) return D_OOM(); data->core = core; ret = core_arena_get_shared_field( core, "egl", &tmp ); if (ret) { D_FREE( data ); return ret; } data->shared = shared = tmp; *ret_data = m_data = data; data->screen = dfb_screens_register( NULL, data, eglPrimaryScreenFuncs ); data->layer = dfb_layers_register( data->screen, data, eglPrimaryLayerFuncs ); dfb_surface_pool_join( core, shared->pool, eglSurfacePoolFuncs ); return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { EGLDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_destroy( shared->pool ); SHFREE( shared->shmpool, shared ); D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_leave( bool emergency ) { EGLDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_leave( shared->pool ); D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_suspend() { D_ASSERT( m_data != NULL ); return DFB_OK; } static DFBResult system_resume() { D_ASSERT( m_data != NULL ); return DFB_OK; } static volatile void * system_map_mmio( unsigned int offset, int length ) { return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator() { return dfb_config->accelerator; } static VideoMode * system_get_modes() { return NULL; } static VideoMode * system_get_current_mode() { return NULL; } static DFBResult system_thread_init() { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return 0; } static void * system_video_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_videoram_length() { return 0; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length() { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { return; } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { return; } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } DirectFB-1.7.7/systems/Makefile.am0000644000175000017500000000150012254435330013631 00000000000000## Makefile.am for DirectFB/systems if SDL_CORE SDL_DIR = sdl else SDL_DIR = endif if OSX_CORE OSX_DIR = osx else OSX_DIR = endif if X11_CORE X11_DIR = x11 else X11_DIR = endif if X11VDPAU_CORE X11VDPAU_DIR = x11vdpau else X11VDPAU_DIR = endif if PVR2D_CORE PVR2D_DIR = pvr2d else PVR2D_DIR = endif if EGL_CORE EGL_DIR = egl else EGL_DIR = endif if DEVMEM_CORE DEVMEM_DIR = devmem else DEVMEM_DIR = endif if FBDEV_CORE FBDEV_DIR = fbdev else FBDEV_DIR = endif if MESA_CORE MESA_DIR = mesa else MESA_DIR = endif if DRMKMS_CORE DRMKMS_DIR = drmkms else DRMKMS_DIR = endif if VNC_CORE VNC_DIR = vnc else VNC_DIR = endif SUBDIRS = \ android \ dummy \ $(PVR2D_DIR) \ $(EGL_DIR) \ $(DEVMEM_DIR) \ $(FBDEV_DIR) \ $(MESA_DIR) \ $(DRMKMS_DIR) \ $(X11_DIR) \ $(X11VDPAU_DIR) \ $(SDL_DIR) \ $(OSX_DIR) \ $(VNC_DIR) DirectFB-1.7.7/systems/Makefile.in0000644000175000017500000005701512466665316013674 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = systems DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = android dummy pvr2d egl devmem fbdev mesa drmkms x11 \ x11vdpau sdl osx vnc DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @SDL_CORE_FALSE@SDL_DIR = @SDL_CORE_TRUE@SDL_DIR = sdl @OSX_CORE_FALSE@OSX_DIR = @OSX_CORE_TRUE@OSX_DIR = osx @X11_CORE_FALSE@X11_DIR = @X11_CORE_TRUE@X11_DIR = x11 @X11VDPAU_CORE_FALSE@X11VDPAU_DIR = @X11VDPAU_CORE_TRUE@X11VDPAU_DIR = x11vdpau @PVR2D_CORE_FALSE@PVR2D_DIR = @PVR2D_CORE_TRUE@PVR2D_DIR = pvr2d @EGL_CORE_FALSE@EGL_DIR = @EGL_CORE_TRUE@EGL_DIR = egl @DEVMEM_CORE_FALSE@DEVMEM_DIR = @DEVMEM_CORE_TRUE@DEVMEM_DIR = devmem @FBDEV_CORE_FALSE@FBDEV_DIR = @FBDEV_CORE_TRUE@FBDEV_DIR = fbdev @MESA_CORE_FALSE@MESA_DIR = @MESA_CORE_TRUE@MESA_DIR = mesa @DRMKMS_CORE_FALSE@DRMKMS_DIR = @DRMKMS_CORE_TRUE@DRMKMS_DIR = drmkms @VNC_CORE_FALSE@VNC_DIR = @VNC_CORE_TRUE@VNC_DIR = vnc SUBDIRS = \ android \ dummy \ $(PVR2D_DIR) \ $(EGL_DIR) \ $(DEVMEM_DIR) \ $(FBDEV_DIR) \ $(MESA_DIR) \ $(DRMKMS_DIR) \ $(X11_DIR) \ $(X11VDPAU_DIR) \ $(SDL_DIR) \ $(OSX_DIR) \ $(VNC_DIR) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # 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: DirectFB-1.7.7/systems/vnc/0000755000175000017500000000000012466665353012466 500000000000000DirectFB-1.7.7/systems/vnc/vnc.h0000644000175000017500000000444512254435330013335 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __VNC__VNC_H__ #define __VNC__VNC_H__ #include #include #include #include #include #include #define VNC_MAX_LAYERS 2 typedef struct { bool shown; CoreLayerRegionConfig config; DFBDisplayLayerID layer_id; CoreSurface *surface; } VNCLayerData; typedef struct { FusionCall call; DFBDimension screen_size; CoreSurface *screen_surface; VNCLayerData *layer_data[VNC_MAX_LAYERS]; } DFBVNCShared; typedef struct { DFBVNCShared *shared; CoreDFB *core; CoreScreen *screen; CoreLayer *layer[VNC_MAX_LAYERS]; rfbScreenInfoPtr rfb_screen; unsigned int layer_count; CoreSurfaceBufferLock buffer_lock; } DFBVNC; typedef enum { VNC_MARK_RECT_AS_MODIFIED, } DFBVNCCall; typedef struct { DFBRegion region; } DFBVNCMarkRectAsModified; #endif DirectFB-1.7.7/systems/vnc/vnc.c0000644000175000017500000001644012254435330013326 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "vnc.h" #include "primary.h" #include DFB_CORE_SYSTEM( vnc ) static DFBVNC *dfb_vnc; static FusionCallHandlerResult VNC_Dispatch( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ); /**********************************************************************************************************************/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_VNC; snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "VNC" ); } static DFBResult system_initialize( CoreDFB *core, void **data ) { D_ASSERT( dfb_vnc == NULL ); dfb_vnc = (DFBVNC*) D_CALLOC( 1, sizeof(DFBVNC) ); if (!dfb_vnc) return D_OOM(); dfb_vnc->core = core; dfb_vnc->shared = (DFBVNCShared*) SHCALLOC( dfb_core_shmpool(core), 1, sizeof(DFBVNCShared) ); if (!dfb_vnc->shared) { D_FREE( dfb_vnc ); return D_OOSHM(); } dfb_vnc->shared->screen_size.w = dfb_config->mode.width ? dfb_config->mode.width : 1280; dfb_vnc->shared->screen_size.h = dfb_config->mode.height ? dfb_config->mode.height : 720; fusion_call_init( &dfb_vnc->shared->call, VNC_Dispatch, dfb_vnc, dfb_core_world(core) ); dfb_vnc->screen = dfb_screens_register( NULL, dfb_vnc, (void*) vncPrimaryScreenFuncs ); dfb_vnc->layer[0] = dfb_layers_register( dfb_vnc->screen, dfb_vnc, vncPrimaryLayerFuncs ); dfb_vnc->layer[1] = dfb_layers_register( dfb_vnc->screen, dfb_vnc, vncPrimaryLayerFuncs ); core_arena_add_shared_field( core, "vnc", dfb_vnc->shared ); *data = dfb_vnc; return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **data ) { void *ret; D_ASSERT( dfb_vnc == NULL ); core_arena_get_shared_field( core, "vnc", &ret ); dfb_vnc = (DFBVNC*) D_CALLOC( 1, sizeof(DFBVNC) ); if (!dfb_vnc) return D_OOM(); dfb_vnc->core = core; dfb_vnc->shared = ret; dfb_vnc->screen = dfb_screens_register( NULL, dfb_vnc, (void*) vncPrimaryScreenFuncs ); dfb_vnc->layer[0] = dfb_layers_register( dfb_vnc->screen, dfb_vnc, vncPrimaryLayerFuncs ); dfb_vnc->layer[1] = dfb_layers_register( dfb_vnc->screen, dfb_vnc, vncPrimaryLayerFuncs ); *data = dfb_vnc; return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { D_ASSERT( dfb_vnc != NULL ); fusion_call_destroy( &dfb_vnc->shared->call ); SHFREE( dfb_core_shmpool(dfb_vnc->core), dfb_vnc->shared ); D_FREE( dfb_vnc ); dfb_vnc = NULL; return DFB_OK; } static DFBResult system_leave( bool emergency ) { D_ASSERT( dfb_vnc != NULL ); D_FREE( dfb_vnc ); dfb_vnc = NULL; return DFB_OK; } static DFBResult system_suspend( void ) { return DFB_UNIMPLEMENTED; } static DFBResult system_resume( void ) { return DFB_UNIMPLEMENTED; } static int system_get_accelerator( void ) { return -1; } static VideoMode * system_get_modes( void ) { return NULL; } static VideoMode * system_get_current_mode( void ) { return NULL; } static volatile void * system_map_mmio( unsigned int offset, int length ) { return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static DFBResult system_thread_init( void ) { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return 0; } static void * system_video_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_videoram_length( void ) { return 0; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length( void ) { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { return; } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { return; } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } /**********************************************************************************************************************/ static int VNC_Dispatch_MarkRectAsModified( DFBVNC *vnc, DFBVNCMarkRectAsModified *mark ) { rfbMarkRectAsModified( vnc->rfb_screen, mark->region.x1, mark->region.y1, mark->region.x2 + 1, mark->region.y2 + 1 ); return 0; } static FusionCallHandlerResult VNC_Dispatch( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { DFBVNC *vnc = ctx; DFBVNCMarkRectAsModified modified; modified.region.x1 = call_arg >> 16; modified.region.x2 = call_arg & 0xffff; modified.region.y1 = (long)call_ptr >> 16; modified.region.y2 = (long)call_ptr & 0xffff; *ret_val = VNC_Dispatch_MarkRectAsModified( vnc, &modified ); return FCHR_RETURN; } DirectFB-1.7.7/systems/vnc/primary.c0000644000175000017500000007174212254435330014231 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "vnc.h" #include "primary.h" D_DEBUG_DOMAIN( VNC_Layer, "VNC/Layer", "VNC Layer" ); /**********************************************************************************************************************/ /******************************************************************************/ /*VNC server setup*/ /* Here we create a structure so that every client has it's own pointer */ typedef struct ClientData { DFBVNC *vnc; int oldButtonMask; int oldx,oldy; } ClientData; static void process_key_event(rfbBool down, rfbKeySym key, struct _rfbClientRec* cl); static void process_pointer_event(int buttonMask, int x, int y, struct _rfbClientRec* cl); static bool translate_key(rfbKeySym key, DFBInputEvent *evt ); static void clientgone(rfbClientPtr cl); static enum rfbNewClientAction newclient(rfbClientPtr cl); extern CoreInputDevice *vncInputDevice; /******************************************************************************/ static DFBResult primaryInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { int argc = 0; char **argv = NULL; DFBVNC *vnc = driver_data; DFBVNCShared *shared = vnc->shared; /* Set the screen capabilities. */ description->caps = DSCCAPS_NONE; /* Set the screen name. */ direct_snputs( description->name, "VNC Primary Screen", DFB_SCREEN_DESC_NAME_LENGTH ); /* Set video mode */ vnc->rfb_screen = rfbGetScreen( &argc, argv, shared->screen_size.w, shared->screen_size.h, 8, 3, 4 ); if (!vnc->rfb_screen) { D_ERROR( "DirectFB/VNC: rfbGetScreen( %dx%d, 8, 3, 4 ) failed!\n", shared->screen_size.w, shared->screen_size.h ); return DFB_FAILURE; } vnc->rfb_screen->screenData = vnc; vnc->rfb_screen->serverFormat.redShift = 16; vnc->rfb_screen->serverFormat.greenShift = 8; vnc->rfb_screen->serverFormat.blueShift = 0; vnc->rfb_screen->serverFormat.redMax = 255; vnc->rfb_screen->serverFormat.greenMax = 255; vnc->rfb_screen->serverFormat.blueMax = 255; /* Connect key handler */ vnc->rfb_screen->kbdAddEvent = process_key_event; vnc->rfb_screen->ptrAddEvent = process_pointer_event; vnc->rfb_screen->newClientHook = newclient; vnc->rfb_screen->autoPort = TRUE; /* Initialize VNC */ rfbInitServer(vnc->rfb_screen); if (vnc->rfb_screen->listenSock == -1) { D_ERROR( "DirectFB/VNC: rfbInitServer() failed to initialize listening socket!\n" ); return DFB_FAILURE; } DFBResult ret; CoreSurfaceConfig config; config.flags = CSCONF_SIZE | CSCONF_FORMAT | CSCONF_CAPS; config.size.w = shared->screen_size.w; config.size.h = shared->screen_size.h; config.format = DSPF_ARGB; config.caps = DSCAPS_SYSTEMONLY | DSCAPS_DOUBLE;// | DSCAPS_SHARED; ret = dfb_surface_create( vnc->core, &config, CSTF_NONE, 0, NULL, &shared->screen_surface ); if (ret) { D_DERROR( ret, "DirectFB/VNC: Could not createscreen surface!\n" ); return ret; } dfb_surface_lock_buffer( shared->screen_surface, 0, CSAID_CPU, CSAF_WRITE, &vnc->buffer_lock ); rfbNewFramebuffer( vnc->rfb_screen, vnc->buffer_lock.addr, shared->screen_size.w, shared->screen_size.h, 8, 3, 4 ); /* patch serverFormat structure for ARGB */ vnc->rfb_screen->serverFormat.redShift = 16; vnc->rfb_screen->serverFormat.greenShift = 8; vnc->rfb_screen->serverFormat.blueShift = 0; vnc->rfb_screen->serverFormat.redMax = 255; vnc->rfb_screen->serverFormat.greenMax = 255; vnc->rfb_screen->serverFormat.blueMax = 255; rfbRunEventLoop( vnc->rfb_screen, -1, TRUE ); return DFB_OK; } /* static DFBResult primaryShutdownScreen( CoreScreen *screen, void *driver_data, void *screen_data ) { DFBVNC *vnc = driver_data; DFBVNCShared *shared = vnc->shared; rfbScreenCleanup( vnc->rfb_screen ); dfb_surface_unlock_buffer( shared->screen_surface, &vnc->buffer_lock ); return DFB_OK; } */ static DFBResult primaryGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { DFBVNC *vnc = driver_data; *ret_width = vnc->shared->screen_size.w; *ret_height = vnc->shared->screen_size.h; return DFB_OK; } static const ScreenFuncs _vncPrimaryScreenFuncs = { .InitScreen = primaryInitScreen, // .ShutdownScreen = primaryShutdownScreen, .GetScreenSize = primaryGetScreenSize, }; const ScreenFuncs *vncPrimaryScreenFuncs = &_vncPrimaryScreenFuncs; /******************************************************************************/ static int primaryLayerDataSize( void ) { return sizeof(VNCLayerData); } static int primaryRegionDataSize( void ) { return 0; } static DFBResult primaryInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { DFBVNC *vnc = driver_data; VNCLayerData *data = layer_data; const char *name; D_DEBUG( "DirectFB/VNC: primaryInitLayer\n"); char *names[] = { "Primary", "Secondary", "Tertiary" }; if (vnc->layer_count < 3) name = names[vnc->layer_count]; else name = "Other"; data->layer_id = vnc->layer_count; vnc->shared->layer_data[vnc->layer_count++] = data; /* set capabilities and type */ description->caps = DLCAPS_SURFACE | DLCAPS_SCREEN_LOCATION | DLCAPS_ALPHACHANNEL | DLCAPS_OPACITY; description->type = DLTF_GRAPHICS; description->surface_accessor = CSAID_CPU; /* set name */ snprintf( description->name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "VNC %s Layer", name ); /* fill out the default configuration */ config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->buffermode = DLBM_FRONTONLY; config->width = vnc->shared->screen_size.w; config->height = vnc->shared->screen_size.h; if (dfb_config->mode.format != DSPF_UNKNOWN) config->pixelformat = dfb_config->mode.format; else if (dfb_config->mode.depth > 0) config->pixelformat = dfb_pixelformat_for_depth( dfb_config->mode.depth ); else config->pixelformat = DSPF_RGB32; return DFB_OK; } static DFBResult primaryTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *failed ) { CoreLayerRegionConfigFlags fail = 0; switch (config->buffermode) { case DLBM_FRONTONLY: case DLBM_BACKSYSTEM: case DLBM_BACKVIDEO: case DLBM_TRIPLE: break; default: fail |= CLRCF_BUFFERMODE; break; } if (config->options & ~(DLOP_ALPHACHANNEL | DLOP_OPACITY)) fail |= CLRCF_OPTIONS; if (failed) *failed = fail; if (fail) return DFB_UNSUPPORTED; return DFB_OK; } static DFBResult primaryAddRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config ) { return DFB_OK; } static DFBResult UpdateScreen( DFBVNC *vnc, const DFBRectangle *update ) { DFBVNCShared *shared = vnc->shared; DFBRegion clip = { 0, 0, shared->screen_size.w - 1, shared->screen_size.h - 1 }; CardState state; unsigned int i; D_DEBUG_AT( VNC_Layer, "%s()\n", __FUNCTION__ ); if (update) { if (!dfb_region_rectangle_intersect( &clip, update )) { D_DEBUG_AT( VNC_Layer, " -> update not intersecting with screen area!\n" ); return DFB_OK; } } dfb_state_init( &state, vnc->core ); state.destination = shared->screen_surface; state.clip = clip; state.src_blend = DSBF_ONE; state.dst_blend = DSBF_INVSRCALPHA; // FIXME: optimize out clear DFBRectangle rect = { 0, 0, shared->screen_size.w, shared->screen_size.h }; dfb_gfxcard_fillrectangles( &rect, 1, &state ); for (i=0; ilayer_data[i]; if (data->surface) { DFBRectangle src = data->config.source; DFBRectangle dst = data->config.dest; state.modified |= SMF_SOURCE | SMF_BLITTING_FLAGS; state.source = data->surface; /* emulate missing hw layer clipping */ // if (dst.x + dst.w > shared->screen_size.w || dst.y + dst.h > shared->screen_size.h) // return DFB_ACCESSDENIED; if (data->config.options & DLOP_ALPHACHANNEL) { state.blittingflags = DSBLIT_BLEND_ALPHACHANNEL; if (!(data->surface->config.caps & DSCAPS_PREMULTIPLIED)) state.blittingflags |= DSBLIT_SRC_PREMULTIPLY; } else state.blittingflags = DSBLIT_NOFX; if ((data->config.options & DLOP_OPACITY) && data->config.opacity != 0xff) { state.blittingflags |= DSBLIT_BLEND_COLORALPHA; if (data->surface->config.caps & DSCAPS_PREMULTIPLIED) state.blittingflags |= DSBLIT_SRC_PREMULTCOLOR; state.modified |= SMF_COLOR; state.color.a = data->config.opacity; } dfb_gfxcard_stretchblit( &src, &dst, &state ); } } state.destination = NULL; state.source = NULL; dfb_state_destroy( &state ); dfb_back_to_front_copy( shared->screen_surface, &clip ); dfb_gfxcard_sync(); DirectResult ret; ret = fusion_call_execute( &shared->call, FCEF_ONEWAY, (int)((clip.x1 << 16) | clip.x2), (void*)(long)((clip.y1 << 16) | clip.y2), NULL ); if (ret) { D_DERROR( ret, "DirectFB/VNC: fusion_call_execute2() failed!\n" ); return ret; } return DFB_OK; } static DFBResult primarySetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { DFBVNC *vnc = driver_data; VNCLayerData *data = layer_data; D_DEBUG_AT( VNC_Layer, "%s()\n", __FUNCTION__ ); data->config = *config; if (updated & CLRCF_OPACITY) D_DEBUG_AT( VNC_Layer, " -> opacity %d\n", config->opacity ); dfb_surface_link( &vnc->shared->layer_data[data->layer_id]->surface, surface ); if (data->shown) return UpdateScreen( vnc, NULL ); else D_DEBUG_AT( VNC_Layer, " -> not shown\n" ); return DFB_OK; } static DFBResult primaryRemoveRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ) { DFBVNC *vnc = driver_data; VNCLayerData *data = layer_data; D_DEBUG_AT( VNC_Layer, "%s()\n", __FUNCTION__ ); D_DEBUG_AT( VNC_Layer, " -> setting shown to false\n" ); data->shown = false; dfb_surface_unlink( &vnc->shared->layer_data[data->layer_id]->surface ); return UpdateScreen( vnc, NULL ); } static DFBResult primaryFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { DFBVNC *vnc = driver_data; VNCLayerData *data = layer_data; D_DEBUG_AT( VNC_Layer, "%s()\n", __FUNCTION__ ); dfb_surface_flip( surface, false ); D_DEBUG_AT( VNC_Layer, " -> setting shown to true\n" ); data->shown = true; return UpdateScreen( vnc, &data->config.dest ); } static DFBResult primaryUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { DFBVNC *vnc = driver_data; VNCLayerData *data = layer_data; DFBRectangle update = data->config.dest; D_DEBUG_AT( VNC_Layer, "%s()\n", __FUNCTION__ ); if (left_update) { DFBRegion screen_update = { left_update->x1 + data->config.dest.x, left_update->y1 + data->config.dest.y, left_update->x2 + data->config.dest.x, left_update->y2 + data->config.dest.y }; D_DEBUG_AT( VNC_Layer, " -> update %d,%d-%dx%d\n", DFB_RECTANGLE_VALS_FROM_REGION(&screen_update) ); if (!dfb_rectangle_intersect_by_region( &update, &screen_update )) { D_DEBUG_AT( VNC_Layer, " -> no intersection with %d,%d-%dx%d!\n", DFB_RECTANGLE_VALS( &data->config.dest ) ); return DFB_OK; } } D_DEBUG_AT( VNC_Layer, " -> setting shown to true\n" ); data->shown = true; return UpdateScreen( vnc, &update ); } static DFBResult primaryAllocateSurface( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreSurface **ret_surface ) { DFBVNC *vnc = driver_data; CoreSurfaceConfig conf; conf.flags = CSCONF_SIZE | CSCONF_FORMAT | CSCONF_CAPS; conf.size.w = config->width; conf.size.h = config->height; conf.format = config->format; conf.caps = DSCAPS_SYSTEMONLY; if (config->buffermode != DLBM_FRONTONLY) conf.caps |= DSCAPS_DOUBLE; return dfb_surface_create( vnc->core, &conf, CSTF_LAYER, DLID_PRIMARY, NULL, ret_surface ); } static DFBResult primaryReallocateSurface( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreSurface *surface ) { DFBResult ret; CoreSurfaceConfig conf; conf.flags = CSCONF_SIZE | CSCONF_FORMAT | CSCONF_CAPS; conf.size.w = config->width; conf.size.h = config->height; conf.format = config->format; conf.caps = DSCAPS_SYSTEMONLY; if (config->buffermode != DLBM_FRONTONLY) conf.caps |= DSCAPS_DOUBLE; ret = dfb_surface_reconfig( surface, &conf ); if (ret) return ret; if (DFB_PIXELFORMAT_IS_INDEXED(config->format) && !surface->palette) { DFBResult ret; CorePalette *palette; ret = dfb_palette_create( NULL, /* FIXME */ 1 << DFB_COLOR_BITS_PER_PIXEL( config->format ), &palette ); if (ret) return ret; if (config->format == DSPF_LUT8) dfb_palette_generate_rgb332_map( palette ); dfb_surface_set_palette( surface, palette ); dfb_palette_unref( palette ); } return DFB_OK; } static const DisplayLayerFuncs _vncPrimaryLayerFuncs = { .LayerDataSize = primaryLayerDataSize, .RegionDataSize = primaryRegionDataSize, .InitLayer = primaryInitLayer, .TestRegion = primaryTestRegion, .AddRegion = primaryAddRegion, .SetRegion = primarySetRegion, .RemoveRegion = primaryRemoveRegion, .FlipRegion = primaryFlipRegion, .UpdateRegion = primaryUpdateRegion, .AllocateSurface = primaryAllocateSurface, .ReallocateSurface = primaryReallocateSurface, }; const DisplayLayerFuncs *vncPrimaryLayerFuncs = &_vncPrimaryLayerFuncs; /**********************************************************************************************************************/ /** VNC Server setup **/ static void clientgone(rfbClientPtr cl) { D_FREE( cl->clientData ); } static enum rfbNewClientAction newclient(rfbClientPtr cl) { ClientData *cd; DFBVNC *vnc = cl->screen->screenData; cd = D_CALLOC( 1, sizeof(ClientData) ); if (!cd) { D_OOM(); return RFB_CLIENT_REFUSE; } cd->vnc = vnc; cl->clientData = cd; cl->clientGoneHook = clientgone; return RFB_CLIENT_ACCEPT; } static void send_button_event( DFBInputDeviceButtonIdentifier button, bool press ) { if (vncInputDevice) { DFBInputEvent evt; evt.flags = DIEF_NONE; evt.type = press ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; evt.button = button; dfb_input_dispatch( vncInputDevice, &evt ); } } static void process_pointer_event(int buttonMask, int x, int y, rfbClientPtr cl) { if (vncInputDevice) { ClientData *cd = cl->clientData; DFBInputEvent evt; evt.type = DIET_AXISMOTION; evt.flags = DIEF_AXISABS | DIEF_MIN | DIEF_MAX; if (cd->oldx != x) { cd->oldx = x; evt.axis = DIAI_X; evt.axisabs = x; evt.min = 0; evt.max = cd->vnc->shared->screen_size.w - 1; dfb_input_dispatch( vncInputDevice, &evt ); } if (cd->oldy != y) { cd->oldy = y; evt.axis = DIAI_Y; evt.axisabs = y; evt.min = 0; evt.max = cd->vnc->shared->screen_size.h - 1; dfb_input_dispatch( vncInputDevice, &evt ); } if (buttonMask != cd->oldButtonMask) { if ((buttonMask & (1 << 0)) != (cd->oldButtonMask & (1 << 0))) send_button_event( DIBI_LEFT, !!(buttonMask & (1 << 0)) ); if ((buttonMask & (1 << 1)) != (cd->oldButtonMask & (1 << 1))) send_button_event( DIBI_MIDDLE, !!(buttonMask & (1 << 1)) ); if ((buttonMask & (1 << 2)) != (cd->oldButtonMask & (1 << 2))) send_button_event( DIBI_RIGHT, !!(buttonMask & (1 << 2)) ); cd->oldButtonMask = buttonMask; } } rfbDefaultPtrAddEvent(buttonMask,x,y,cl); } /* * declaration of private data */ static void process_key_event(rfbBool down, rfbKeySym key, rfbClientPtr cl) { if (vncInputDevice) { DFBInputEvent evt; if (down) evt.type = DIET_KEYPRESS; else evt.type = DIET_KEYRELEASE; if (translate_key( key, &evt )) dfb_input_dispatch( vncInputDevice, &evt ); } } static bool translate_key(rfbKeySym key, DFBInputEvent *evt ) { /* Unicode */ if (key <= 0xf000) { evt->flags = DIEF_KEYSYMBOL; evt->key_symbol = key; return true; } /* Dead keys */ /* todo */ /* Numeric keypad */ if (key >= XK_KP_0 && key <= XK_KP_9) { evt->flags = DIEF_KEYID; evt->key_id = DIKI_KP_0 + key - XK_KP_0; return true; } /* Function keys */ if (key >= XK_F1 && key <= XK_F11) { evt->flags = DIEF_KEYID; evt->key_id = DIKI_F1 + key - XK_F1; return true; } switch (key) { /* Numeric keypad */ case XK_KP_Decimal: evt->flags = DIEF_KEYID; evt->key_id = DIKI_KP_DECIMAL; break; case XK_KP_Separator: evt->flags = DIEF_KEYID; evt->key_id = DIKI_KP_SEPARATOR; break; case XK_KP_Divide: evt->flags = DIEF_KEYID; evt->key_id = DIKI_KP_DIV; break; case XK_KP_Multiply: evt->flags = DIEF_KEYID; evt->key_id = DIKI_KP_MULT; break; case XK_KP_Subtract: evt->flags = DIEF_KEYID; evt->key_id = DIKI_KP_MINUS; break; case XK_KP_Add: evt->flags = DIEF_KEYID; evt->key_id = DIKI_KP_PLUS; break; case XK_KP_Enter: evt->flags = DIEF_KEYID; evt->key_id = DIKI_KP_ENTER; break; case XK_KP_Equal: evt->flags = DIEF_KEYID; evt->key_id = DIKI_KP_EQUAL; break; /* Arrows + Home/End pad */ case XK_Up: evt->flags = DIEF_KEYID; evt->key_id = DIKI_UP; break; case XK_Down: evt->flags = DIEF_KEYID; evt->key_id = DIKI_DOWN; break; case XK_Right: evt->flags = DIEF_KEYID; evt->key_id = DIKI_RIGHT; break; case XK_Left: evt->flags = DIEF_KEYID; evt->key_id = DIKI_LEFT; break; case XK_Insert: evt->flags = DIEF_KEYID; evt->key_id = DIKI_INSERT; break; case XK_Delete: evt->flags = DIEF_KEYID; evt->key_id = DIKI_DELETE; break; case XK_Home: evt->flags = DIEF_KEYID; evt->key_id = DIKI_HOME; break; case XK_End: evt->flags = DIEF_KEYID; evt->key_id = DIKI_END; break; case XK_Page_Up: evt->flags = DIEF_KEYID; evt->key_id = DIKI_PAGE_UP; break; case XK_Page_Down: evt->flags = DIEF_KEYID; evt->key_id = DIKI_PAGE_DOWN; break; /* Key state modifier keys */ case XK_Num_Lock: evt->flags = DIEF_KEYID; evt->key_id = DIKI_NUM_LOCK; break; case XK_Caps_Lock: evt->flags = DIEF_KEYID; evt->key_id = DIKI_CAPS_LOCK; break; case XK_Scroll_Lock: evt->flags = DIEF_KEYID; evt->key_id = DIKI_SCROLL_LOCK; break; case XK_Shift_R: evt->flags = DIEF_KEYID; evt->key_id = DIKI_SHIFT_R; break; case XK_Shift_L: evt->flags = DIEF_KEYID; evt->key_id = DIKI_SHIFT_L; break; case XK_Control_R: evt->flags = DIEF_KEYID; evt->key_id = DIKI_CONTROL_R; break; case XK_Control_L: evt->flags = DIEF_KEYID; evt->key_id = DIKI_CONTROL_L; break; case XK_Alt_R: evt->flags = DIEF_KEYID; evt->key_id = DIKI_ALT_R; break; case XK_Alt_L: evt->flags = DIEF_KEYID; evt->key_id = DIKI_ALT_L; break; case XK_Meta_R: evt->flags = DIEF_KEYID; evt->key_id = DIKI_META_R; break; case XK_Meta_L: evt->flags = DIEF_KEYID; evt->key_id = DIKI_META_L; break; case XK_Super_L: evt->flags = DIEF_KEYID; evt->key_id = DIKI_SUPER_L; break; case XK_Super_R: evt->flags = DIEF_KEYID; evt->key_id = DIKI_SUPER_R; break; case XK_Hyper_L: evt->flags = DIEF_KEYID; evt->key_id = DIKI_HYPER_L; break; case XK_Hyper_R: evt->flags = DIEF_KEYID; evt->key_id = DIKI_HYPER_R; break; /*case ??: evt->flags = DIEF_KEYID; evt->key_id = DIKI_ALTGR; break;*/ case XK_BackSpace: evt->flags = DIEF_KEYID; evt->key_id = DIKI_BACKSPACE; break; case XK_Tab: evt->flags = DIEF_KEYID; evt->key_id = DIKI_HYPER_L; break; case XK_Return: evt->flags = DIEF_KEYID; evt->key_id = DIKI_ENTER; break; case XK_Escape: evt->flags = DIEF_KEYID; evt->key_id = DIKI_ESCAPE; break; case XK_Pause: evt->flags = DIEF_KEYID; evt->key_id = DIKI_PAUSE; break; /* Miscellaneous function keys */ case XK_Help: evt->flags = DIEF_KEYSYMBOL; evt->key_symbol = DIKS_HELP; break; case XK_Print: evt->flags = DIEF_KEYSYMBOL; evt->key_symbol = DIKS_PRINT; break; case XK_Break: evt->flags = DIEF_KEYSYMBOL; evt->key_symbol = DIKS_BREAK; break; default: return false; } return true; } DirectFB-1.7.7/systems/vnc/Makefile.am0000644000175000017500000000126712171403127014426 00000000000000## Makefile.am for DirectFB/systems/vnc INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(VNC_CFLAGS) systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_vnc.o endif systems_LTLIBRARIES = libdirectfb_vnc.la libdirectfb_vnc_la_LDFLAGS = \ $(VNC_LIBS) \ -avoid-version \ -module libdirectfb_vnc_la_SOURCES = \ primary.c \ primary.h \ vncinput.c \ vnc.c \ vnc.h libdirectfb_vnc_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/vnc/primary.h0000644000175000017500000000345012254435330014225 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __SDL__PRIMARY_H__ #define __SDL__PRIMARY_H__ #include #include #include extern const ScreenFuncs *vncPrimaryScreenFuncs; extern const DisplayLayerFuncs *vncPrimaryLayerFuncs; FusionCallHandlerResult dfb_vnc_call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ); #endif DirectFB-1.7.7/systems/vnc/Makefile.in0000644000175000017500000006504712466665317014467 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = systems/vnc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" LTLIBRARIES = $(systems_LTLIBRARIES) libdirectfb_vnc_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_vnc_la_OBJECTS = primary.lo vncinput.lo vnc.lo libdirectfb_vnc_la_OBJECTS = $(am_libdirectfb_vnc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_vnc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_vnc_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_vnc_la_SOURCES) DIST_SOURCES = $(libdirectfb_vnc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systems_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(VNC_CFLAGS) systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_vnc.o systems_LTLIBRARIES = libdirectfb_vnc.la libdirectfb_vnc_la_LDFLAGS = \ $(VNC_LIBS) \ -avoid-version \ -module libdirectfb_vnc_la_SOURCES = \ primary.c \ primary.h \ vncinput.c \ vnc.c \ vnc.h libdirectfb_vnc_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/vnc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/vnc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_vnc.la: $(libdirectfb_vnc_la_OBJECTS) $(libdirectfb_vnc_la_DEPENDENCIES) $(EXTRA_libdirectfb_vnc_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_vnc_la_LINK) -rpath $(systemsdir) $(libdirectfb_vnc_la_OBJECTS) $(libdirectfb_vnc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vnc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vncinput.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-systemsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-systemsDATA install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-systemsDATA uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip install-systemsDATA \ install-systemsLTLIBRARIES installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/vnc/vncinput.c0000644000175000017500000000740612254435330014410 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include DFB_INPUT_DRIVER( vncinput ) CoreInputDevice *vncInputDevice = NULL; /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available( void ) { if (dfb_system_type() == CORE_VNC) return 1; return 0; } /* * Fill out general information about this driver. * Called once during initialization of DirectFB. */ static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf ( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "VNC Input Driver" ); snprintf ( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "Leonard Schneider" ); info->version.major = 0; info->version.minor = 1; } /* * Open the device, fill out information about it, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { vncInputDevice = device; /* set device name */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "VNC Input" ); /* set device vendor */ snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "VNC" ); /* set one of the primary input device IDs */ info->prefered_id = DIDID_KEYBOARD; /* set type flags */ info->desc.type = /*DIDTF_JOYSTICK |*/ DIDTF_KEYBOARD| DIDTF_MOUSE; /* set capabilities */ info->desc.caps = DICAPS_ALL; /* set private data pointer */ /* *driver_data = device;*/ return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { } DirectFB-1.7.7/systems/dummy/0000755000175000017500000000000012466665353013033 500000000000000DirectFB-1.7.7/systems/dummy/dummy.c0000644000175000017500000004157312254435330014245 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #define DUMMY_WIDTH 8 #define DUMMY_HEIGHT 8 #define DUMMY_FORMAT DSPF_ARGB #include DFB_CORE_SYSTEM( dummy ) D_DEBUG_DOMAIN( Dummy_Display, "Dummy/Display", "DirectFB Dummy System Display" ); D_DEBUG_DOMAIN( Dummy_Layer, "Dummy/Layer", "DirectFB Dummy System Layer" ); D_DEBUG_DOMAIN( Dummy_Screen, "Dummy/Screen", "DirectFB Dummy System Screen" ); D_DEBUG_DOMAIN( Dummy_Display_PTS, "Dummy/Display/PTS", "DirectFB Dummy System Display PTS" ); /**********************************************************************************************************************/ /**********************************************************************************************************************/ static DirectThread *dummy_display_thread; static bool dummy_display_thread_stop; static DirectMutex dummy_display_lock; static DirectWaitQueue dummy_display_wq; static DirectLink *dummy_display_list; static DFB_DisplayTask *dummy_display_task; typedef struct { DirectLink link; int magic; CoreSurface *surface; CoreSurfaceBuffer *buffer; int index; DFB_DisplayTask *task; long long pts; CoreSurfaceBufferLock lock; } DummyDisplayBuffer; /**********************************************************************************************************************/ static void * dummy_display_loop( DirectThread *thread, void *ctx ) { while (!dummy_display_thread_stop) { DummyDisplayBuffer *request; direct_mutex_lock( &dummy_display_lock ); while (!dummy_display_list) { direct_waitqueue_wait( &dummy_display_wq, &dummy_display_lock ); if (dummy_display_thread_stop) { direct_mutex_unlock( &dummy_display_lock ); goto out; } } request = (DummyDisplayBuffer*) dummy_display_list; D_MAGIC_ASSERT( request, DummyDisplayBuffer ); direct_mutex_unlock( &dummy_display_lock ); long long now = direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ); D_DEBUG_AT( Dummy_Display, "%s() <- request %p\n", __FUNCTION__, request ); D_DEBUG_AT( Dummy_Display, " -> surface %p\n", request->surface ); D_DEBUG_AT( Dummy_Display, " -> index %d\n", request->index ); D_DEBUG_AT( Dummy_Display, " -> task %p\n", request->task ); D_DEBUG_AT( Dummy_Display, " -> pts %lldus (%lldus from now)\n", request->pts, request->pts - now ); while (request->pts - now > 100) { long long delay = request->pts - now - 100; D_DEBUG_AT( Dummy_Display, " -> sleeping for %lldus...\n", delay ); direct_thread_sleep( delay ); now = direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ); } D_DEBUG_AT( Dummy_Display_PTS, " => display at %lldus (%lld from pts)\n", now, now - request->pts ); dfb_surface_notify_display2( request->surface, request->index, request->task ); if (direct_config_get_int_value( "dummy-layer-dump" ) && request->pts > 0) { static long long first; if (!first) first = request->pts; char buf[100]; snprintf( buf, sizeof(buf), "dfb_dummy_layer_%lu_%09lld", request->surface->resource_id, request->pts - first ); D_DEBUG_AT( Dummy_Display_PTS, " => dumping frame with pts %lld\n", request->pts ); dfb_surface_buffer_dump_type_locked( request->buffer, buf, NULL, false, &request->lock ); } direct_mutex_lock( &dummy_display_lock ); if (dummy_display_task) { D_DEBUG_AT( Dummy_Display, " <= done previous task %p (pts %lld, %lld to current)\n", dummy_display_task, DisplayTask_GetPTS( dummy_display_task ), request->pts - DisplayTask_GetPTS( dummy_display_task ) ); Task_Done( dummy_display_task ); } dummy_display_task = request->task; direct_list_remove( &dummy_display_list, &request->link ); direct_mutex_unlock( &dummy_display_lock ); direct_waitqueue_broadcast( &dummy_display_wq ); dfb_surface_buffer_unref( request->buffer ); dfb_surface_unref( request->surface ); D_MAGIC_CLEAR( request ); D_FREE( request ); } out: D_DEBUG_AT( Dummy_Display, "%s() <- stop!\n", __FUNCTION__ ); if (dummy_display_task) Task_Done( dummy_display_task ); return NULL; } /**********************************************************************************************************************/ static DFBResult dummyInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { D_DEBUG_AT( Dummy_Screen, "%s( %p, %p )\n", __FUNCTION__, screen, device ); description->caps = DSCCAPS_NONE; direct_snputs( description->name, "Dummy", DFB_SCREEN_DESC_NAME_LENGTH ); dummy_display_thread = direct_thread_create( DTT_OUTPUT, dummy_display_loop, NULL, "Dummy Display" ); return DFB_OK; } static DFBResult dummyShutdownScreen( CoreScreen *screen, void *driver_data, void *screen_data ) { D_DEBUG_AT( Dummy_Screen, "%s( %p )\n", __FUNCTION__, screen ); direct_mutex_lock( &dummy_display_lock ); dummy_display_thread_stop = true; direct_waitqueue_signal( &dummy_display_wq ); direct_mutex_unlock( &dummy_display_lock ); direct_thread_join( dummy_display_thread ); direct_thread_destroy( dummy_display_thread ); dummy_display_thread = NULL; dummy_display_thread_stop = false; return DFB_OK; } static DFBResult dummyGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { *ret_width = dfb_config->mode.width ?: DUMMY_WIDTH; *ret_height = dfb_config->mode.height ?: DUMMY_HEIGHT; return DFB_OK; } static ScreenFuncs dummyScreenFuncs = { .InitScreen = dummyInitScreen, .ShutdownScreen = dummyShutdownScreen, .GetScreenSize = dummyGetScreenSize }; /**********************************************************************************************************************/ static DFBResult dummyDisplayRequest( CoreSurface *surface, CoreSurfaceBufferLock *lock ) { DFBResult ret; DummyDisplayBuffer *request; D_DEBUG_AT( Dummy_Display, "%s( %p, %p )\n", __FUNCTION__, surface, lock ); CORE_SURFACE_BUFFER_LOCK_ASSERT( lock ); CORE_SURFACE_ALLOCATION_ASSERT( lock->allocation ); CORE_SURFACE_ASSERT( surface ); ret = dfb_surface_ref( surface ); if (ret) return ret; CORE_SURFACE_BUFFER_ASSERT( lock->buffer ); ret = dfb_surface_buffer_ref( lock->buffer ); if (ret) { dfb_surface_unref( surface ); return ret; } CORE_SURFACE_BUFFER_ASSERT( lock->buffer ); /* Allocate new request */ request = D_CALLOC( 1, sizeof(DummyDisplayBuffer) ); if (!request) { dfb_surface_buffer_unref( lock->buffer ); dfb_surface_unref( surface ); return D_OOM(); } CORE_SURFACE_ALLOCATION_ASSERT( lock->allocation ); /* Initialize request */ request->surface = surface; request->buffer = lock->buffer; request->index = lock->allocation->index; request->task = lock->task; request->pts = lock->task ? DisplayTask_GetPTS( lock->task ) : -1; request->lock = *lock; D_MAGIC_SET( request, DummyDisplayBuffer ); D_DEBUG_AT( Dummy_Display, " -> %p\n", request ); D_DEBUG_AT( Dummy_Display, " -> index %d\n", request->index ); D_DEBUG_AT( Dummy_Display, " -> pts %lld\n", request->pts ); direct_mutex_lock( &dummy_display_lock ); direct_list_append( &dummy_display_list, &request->link ); direct_waitqueue_signal( &dummy_display_wq ); direct_mutex_unlock( &dummy_display_lock ); return DFB_OK; } /**********************************************************************************************************************/ static DFBResult dummyInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { description->type = DLTF_GRAPHICS; description->caps = DLCAPS_SURFACE; description->surface_caps = DSCAPS_SYSTEMONLY; description->surface_accessor = CSAID_CPU; direct_snputs( description->name, "Dummy", DFB_DISPLAY_LAYER_DESC_NAME_LENGTH ); config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->width = dfb_config->mode.width ?: DUMMY_WIDTH; config->height = dfb_config->mode.height ?: DUMMY_HEIGHT; config->pixelformat = dfb_config->mode.format ?: DUMMY_FORMAT; config->buffermode = DLBM_FRONTONLY; return DFB_OK; } static DFBResult dummyTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *ret_failed ) { if (ret_failed) *ret_failed = DLCONF_NONE; return DFB_OK; } static DFBResult dummySetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { return DFB_OK; } static DFBResult dummyRemoveRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ) { direct_mutex_lock( &dummy_display_lock ); while (dummy_display_list) direct_waitqueue_wait( &dummy_display_wq, &dummy_display_lock ); if (dummy_display_task) { Task_Done( dummy_display_task ); dummy_display_task = NULL; } direct_mutex_unlock( &dummy_display_lock ); return DFB_OK; } static DFBResult dummyFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { dfb_surface_flip( surface, false ); return dummyDisplayRequest( surface, left_lock ); } static DFBResult dummyUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { return dummyDisplayRequest( surface, left_lock ); } static DisplayLayerFuncs dummyLayerFuncs = { .InitLayer = dummyInitLayer, .TestRegion = dummyTestRegion, .SetRegion = dummySetRegion, .RemoveRegion = dummyRemoveRegion, .FlipRegion = dummyFlipRegion, .UpdateRegion = dummyUpdateRegion }; /**********************************************************************************************************************/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_ANY; info->caps = CSCAPS_ACCELERATION | CSCAPS_SYSMEM_EXTERNAL | CSCAPS_DISPLAY_TASKS | CSCAPS_NOTIFY_DISPLAY | CSCAPS_DISPLAY_PTS; direct_snputs( info->name, "Dummy", DFB_CORE_SYSTEM_INFO_NAME_LENGTH ); } static DFBResult system_initialize( CoreDFB *core, void **ret_data ) { CoreScreen *screen = dfb_screens_register( NULL, NULL, &dummyScreenFuncs ); CoreLayer *layer = dfb_layers_register( screen, NULL, &dummyLayerFuncs ); (void) layer; direct_mutex_init( &dummy_display_lock ); direct_waitqueue_init( &dummy_display_wq ); return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **ret_data ) { CoreScreen *screen = dfb_screens_register( NULL, NULL, &dummyScreenFuncs ); CoreLayer *layer = dfb_layers_register( screen, NULL, &dummyLayerFuncs ); (void) layer; return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { direct_mutex_deinit( &dummy_display_lock ); direct_waitqueue_deinit( &dummy_display_wq ); return DFB_OK; } static DFBResult system_leave( bool emergency ) { return DFB_OK; } static DFBResult system_suspend( void ) { return DFB_OK; } static DFBResult system_resume( void ) { return DFB_OK; } static volatile void * system_map_mmio( unsigned int offset, int length ) { return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator( void ) { return dfb_config->accelerator; } static VideoMode * system_get_modes( void ) { return NULL; } static VideoMode * system_get_current_mode( void ) { return NULL; } static DFBResult system_thread_init( void ) { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return 0; } static void * system_video_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_videoram_length( void ) { return 0; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length( void ) { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { } static int system_surface_data_size( void ) { return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { } DirectFB-1.7.7/systems/dummy/dummy.h0000644000175000017500000000340712254435330014244 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DUMMY_DUMMY_H__ #define __DUMMY_DUMMY_H__ #include #include #include "surfacemanager.h" #define DEV_MEM "/dev/mem" extern const SurfacePoolFuncs devmemSurfacePoolFuncs; typedef struct { FusionSHMPoolShared *shmpool; CoreSurfacePool *pool; SurfaceManager *manager; } DevMemDataShared; typedef struct { DevMemDataShared *shared; void *mem; volatile void *reg; } DevMemData; #endif DirectFB-1.7.7/systems/dummy/Makefile.am0000644000175000017500000000131212171403127014762 00000000000000## Makefile.am for DirectFB/systems/dummy INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src internalincludedir = $(INTERNALINCLUDEDIR)/dummy internalinclude_HEADERS = \ dummy.h systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_dummy.o endif systems_LTLIBRARIES = libdirectfb_dummy.la libdirectfb_dummy_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_dummy_la_SOURCES = \ dummy.c libdirectfb_dummy_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/dummy/Makefile.in0000644000175000017500000006713612466665317015035 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ $(internalinclude_HEADERS) subdir = systems/dummy ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" \ "$(DESTDIR)$(internalincludedir)" LTLIBRARIES = $(systems_LTLIBRARIES) libdirectfb_dummy_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_dummy_la_OBJECTS = dummy.lo libdirectfb_dummy_la_OBJECTS = $(am_libdirectfb_dummy_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_dummy_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_dummy_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_dummy_la_SOURCES) DIST_SOURCES = $(libdirectfb_dummy_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systems_DATA) HEADERS = $(internalinclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src internalincludedir = $(INTERNALINCLUDEDIR)/dummy internalinclude_HEADERS = \ dummy.h systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_dummy.o systems_LTLIBRARIES = libdirectfb_dummy.la libdirectfb_dummy_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_dummy_la_SOURCES = \ dummy.c libdirectfb_dummy_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/dummy/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/dummy/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_dummy.la: $(libdirectfb_dummy_la_OBJECTS) $(libdirectfb_dummy_la_DEPENDENCIES) $(EXTRA_libdirectfb_dummy_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_dummy_la_LINK) -rpath $(systemsdir) $(libdirectfb_dummy_la_OBJECTS) $(libdirectfb_dummy_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) install-internalincludeHEADERS: $(internalinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(internalincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(internalincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(internalincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(internalincludedir)" || exit $$?; \ done uninstall-internalincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(internalincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(internalincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-systemsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-internalincludeHEADERS install-systemsDATA \ install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-internalincludeHEADERS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-systemsDATA install-systemsLTLIBRARIES \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/fbdev/0000755000175000017500000000000012466665353012766 500000000000000DirectFB-1.7.7/systems/fbdev/surfacemanager.c0000644000175000017500000004715012254435330016025 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include "surfacemanager.h" D_DEBUG_DOMAIN( SurfMan, "SurfaceManager", "DirectFB Surface Manager" ); static Chunk *split_chunk ( SurfaceManager *manager, Chunk *chunk, int length ); static Chunk *free_chunk ( SurfaceManager *manager, Chunk *chunk ); static Chunk *occupy_chunk( SurfaceManager *manager, Chunk *chunk, CoreSurfaceAllocation *allocation, int length, int pitch ); DFBResult dfb_surfacemanager_create( CoreDFB *core, unsigned int length, SurfaceManager **ret_manager ) { FusionSHMPoolShared *pool; SurfaceManager *manager; Chunk *chunk; D_DEBUG_AT( SurfMan, "%s( %p, %d )\n", __FUNCTION__, core, length ); D_ASSERT( core != NULL ); D_ASSERT( ret_manager != NULL ); pool = dfb_core_shmpool( core ); manager = SHCALLOC( pool, 1, sizeof(SurfaceManager) ); if (!manager) return D_OOSHM(); chunk = SHCALLOC( pool, 1, sizeof(Chunk) ); if (!chunk) { D_OOSHM(); SHFREE( pool, manager ); return DFB_NOSHAREDMEMORY; } manager->shmpool = pool; manager->chunks = chunk; manager->offset = 0; manager->length = length; manager->avail = manager->length - manager->offset; D_MAGIC_SET( manager, SurfaceManager ); chunk->offset = manager->offset; chunk->length = manager->avail; D_MAGIC_SET( chunk, Chunk ); D_DEBUG_AT( SurfMan, " -> %p\n", manager ); *ret_manager = manager; return DFB_OK; } void dfb_surfacemanager_destroy( SurfaceManager *manager ) { Chunk *chunk; void *next; D_DEBUG_AT( SurfMan, "%s( %p )\n", __FUNCTION__, manager ); D_MAGIC_ASSERT( manager, SurfaceManager ); /* Deallocate all video chunks. */ chunk = manager->chunks; while (chunk) { next = chunk->next; D_MAGIC_CLEAR( chunk ); SHFREE( manager->shmpool, chunk ); chunk = next; } D_MAGIC_CLEAR( manager ); /* Deallocate manager struct. */ SHFREE( manager->shmpool, manager ); } DFBResult dfb_surfacemanager_adjust_heap_offset( SurfaceManager *manager, int offset ) { D_MAGIC_ASSERT( manager, SurfaceManager ); D_ASSERT( offset >= 0 ); D_DEBUG_AT( SurfMan, "%s( %p, %d )\n", __FUNCTION__, manager, offset ); /*FIXME_SC_2 if (manager->limits.surface_byteoffset_alignment > 1) { offset += manager->limits.surface_byteoffset_alignment - 1; offset -= offset % manager->limits.surface_byteoffset_alignment; } */ /* * Adjust the offset of the heap. */ if (manager->chunks->buffer == NULL) { /* first chunk is free */ if (offset <= manager->chunks->offset + manager->chunks->length) { /* ok, just recalculate offset and length */ manager->chunks->length = manager->chunks->offset + manager->chunks->length - offset; manager->chunks->offset = offset; } else { D_WARN("unable to adjust heap offset"); /* more space needed than free at the beginning */ /* TODO: move/destroy instances */ } } else { D_WARN("unable to adjust heap offset"); /* very rare case that the first chunk is occupied */ /* TODO: move/destroy instances */ } manager->avail -= offset - manager->offset; manager->offset = offset; return DFB_OK; } /** public functions NOT locking the surfacemanger theirself, to be called between lock/unlock of surfacemanager **/ DFBResult dfb_surfacemanager_allocate( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, Chunk **ret_chunk ) { int pitch; int length; Chunk *c; CoreGraphicsDevice *device; Chunk *best_free = NULL; D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( buffer->surface, CoreSurface ); if (ret_chunk) D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); else D_ASSUME( allocation == NULL ); D_DEBUG_AT( SurfMan, "%s( %p ) <- %dx%d %s\n", __FUNCTION__, buffer, buffer->surface->config.size.w, buffer->surface->config.size.h, dfb_pixelformat_name( buffer->surface->config.format ) ); if (manager->suspended) return DFB_SUSPENDED; /* FIXME: Only one global device at the moment. */ device = dfb_core_get_part( core, DFCP_GRAPHICS ); D_ASSERT( device != NULL ); dfb_gfxcard_calc_buffer_size( device, buffer, &pitch, &length ); D_DEBUG_AT( SurfMan, " -> pitch %d, length %d, available %d\n", pitch, length, manager->avail ); if (manager->avail < length) return DFB_TEMPUNAVAIL; /* examine chunks */ c = manager->chunks; D_MAGIC_ASSERT( c, Chunk ); /* FIXME_SC_2 Workaround creation happening before graphics driver initialization. */ if (!c->next) { int length = dfb_gfxcard_memory_length(); if (c->length != length - manager->offset) { D_WARN( "workaround" ); manager->length = length; manager->avail = length - manager->offset; c->length = length - manager->offset; } } while (c) { D_MAGIC_ASSERT( c, Chunk ); if (!c->buffer && c->length >= length) { /* NULL means check only. */ if (!ret_chunk) return DFB_OK; /* found a nice place to chill */ if (!best_free || best_free->length > c->length) /* first found or better one? */ best_free = c; if (c->length == length) break; } c = c->next; } /* if we found a place */ if (best_free) { D_DEBUG_AT( SurfMan, " -> found free (%d)\n", best_free->length ); /* NULL means check only. */ if (ret_chunk) *ret_chunk = occupy_chunk( manager, best_free, allocation, length, pitch ); return DFB_OK; } D_DEBUG_AT( SurfMan, " -> failed (%d/%d avail)\n", manager->avail, manager->length ); /* no luck */ return DFB_NOVIDEOMEMORY; } DFBResult dfb_surfacemanager_displace( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer ) { int length; Chunk *multi_start = NULL; int multi_size = 0; int multi_tsize = 0; int multi_count = 0; Chunk *bestm_start = NULL; int bestm_count = 0; int bestm_size = 0; int min_toleration; Chunk *chunk; CoreGraphicsDevice *device; CoreSurfaceAllocation *smallest = NULL; D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( buffer->surface, CoreSurface ); D_DEBUG_AT( SurfMan, "%s( %p ) <- %dx%d %s\n", __FUNCTION__, buffer, buffer->surface->config.size.w, buffer->surface->config.size.h, dfb_pixelformat_name( buffer->surface->config.format ) ); /* FIXME: Only one global device at the moment. */ device = dfb_core_get_part( core, DFCP_GRAPHICS ); D_ASSERT( device != NULL ); D_UNUSED_P( device ); dfb_gfxcard_calc_buffer_size( dfb_core_get_part( core, DFCP_GRAPHICS ), buffer, NULL, &length ); min_toleration = manager->min_toleration/8 + 2; D_DEBUG_AT( SurfMan, " -> %7d required, min toleration %d\n", length, min_toleration ); chunk = manager->chunks; while (chunk) { CoreSurfaceAllocation *allocation; D_MAGIC_ASSERT( chunk, Chunk ); allocation = chunk->allocation; if (allocation) { CoreSurfaceBuffer *other; int size, locks; D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_ASSERT( chunk->buffer == allocation->buffer ); D_ASSERT( chunk->length >= allocation->size ); other = allocation->buffer; D_MAGIC_ASSERT( other, CoreSurfaceBuffer ); locks = dfb_surface_allocation_locks( allocation ); if (locks) { D_DEBUG_AT( SurfMan, " ++ %7d locked %dx\n", allocation->size, locks ); goto next_reset; } if (other->policy > buffer->policy) { D_DEBUG_AT( SurfMan, " ++ %7d policy %d > %d\n", allocation->size, other->policy, buffer->policy ); goto next_reset; } if (other->policy == CSP_VIDEOONLY) { D_DEBUG_AT( SurfMan, " ++ %7d policy videoonly\n", allocation->size ); goto next_reset; } chunk->tolerations++; if (chunk->tolerations > 0xff) chunk->tolerations = 0xff; if (other->policy == buffer->policy && chunk->tolerations < min_toleration) { D_DEBUG_AT( SurfMan, " ++ %7d tolerations %d/%d\n", allocation->size, chunk->tolerations, min_toleration ); goto next_reset; } size = allocation->size; if (chunk->prev && !chunk->prev->allocation) size += chunk->prev->length; if (chunk->next && !chunk->next->allocation) size += chunk->next->length; if (size >= length) { if (!smallest || smallest->size > allocation->size) { D_DEBUG_AT( SurfMan, " => %7d [%d] < %d, tolerations %d\n", allocation->size, size, smallest ? smallest->size : 0, chunk->tolerations ); smallest = allocation; } else D_DEBUG_AT( SurfMan, " -> %7d [%d] > %d\n", allocation->size, size, smallest->size ); } else D_DEBUG_AT( SurfMan, " -> %7d [%d]\n", allocation->size, size ); } else D_DEBUG_AT( SurfMan, " - %7d free\n", chunk->length ); if (!smallest) { if (!multi_start) { multi_start = chunk; multi_tsize = chunk->length; multi_size = chunk->allocation ? chunk->length : 0; multi_count = chunk->allocation ? 1 : 0; } else { multi_tsize += chunk->length; multi_size += chunk->allocation ? chunk->length : 0; multi_count += chunk->allocation ? 1 : 0; while (multi_tsize >= length && multi_count > 1) { if (!bestm_start || bestm_size > multi_size * multi_count / bestm_count) { D_DEBUG_AT( SurfMan, " =====> %7d, %7d %2d used [%7d %2d]\n", multi_tsize, multi_size, multi_count, bestm_size, bestm_count ); bestm_size = multi_size; bestm_start = multi_start; bestm_count = multi_count; } else D_DEBUG_AT( SurfMan, " -----> %7d, %7d %2d used\n", multi_tsize, multi_size, multi_count ); if (multi_count <= 2) break; if (!multi_start->allocation) { multi_tsize -= multi_start->length; multi_start = multi_start->next; } D_ASSUME( multi_start->allocation != NULL ); multi_tsize -= multi_start->length; multi_size -= multi_start->allocation ? multi_start->length : 0; multi_count -= multi_start->allocation ? 1 : 0; multi_start = multi_start->next; } } } chunk = chunk->next; continue; next_reset: multi_start = NULL; chunk = chunk->next; } if (smallest) { D_MAGIC_ASSERT( smallest, CoreSurfaceAllocation ); D_MAGIC_ASSERT( smallest->buffer, CoreSurfaceBuffer ); smallest->flags |= CSALF_MUCKOUT; D_DEBUG_AT( SurfMan, " -> offset %lu, size %d\n", smallest->offset, smallest->size ); return DFB_OK; } if (bestm_start) { chunk = bestm_start; while (bestm_count) { CoreSurfaceAllocation *allocation = chunk->allocation; if (allocation) { D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( allocation->buffer, CoreSurfaceBuffer ); allocation->flags |= CSALF_MUCKOUT; bestm_count--; } D_DEBUG_AT( SurfMan, " ---> offset %d, length %d\n", chunk->offset, chunk->length ); chunk = chunk->next; } return DFB_OK; } return DFB_NOVIDEOMEMORY; } DFBResult dfb_surfacemanager_deallocate( SurfaceManager *manager, Chunk *chunk ) { CoreSurfaceBuffer *buffer; D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( chunk, Chunk ); buffer = chunk->buffer; D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( buffer->surface, CoreSurface ); D_UNUSED_P( buffer ); D_DEBUG_AT( SurfMan, "%s( %p ) <- %dx%d %s\n", __FUNCTION__, buffer, buffer->surface->config.size.w, buffer->surface->config.size.h, dfb_pixelformat_name( buffer->surface->config.format ) ); free_chunk( manager, chunk ); return DFB_OK; } /** internal functions NOT locking the surfacemanager **/ static Chunk * split_chunk( SurfaceManager *manager, Chunk *c, int length ) { Chunk *newchunk; D_MAGIC_ASSERT( c, Chunk ); if (c->length == length) /* does not need be splitted */ return c; newchunk = (Chunk*) SHCALLOC( manager->shmpool, 1, sizeof(Chunk) ); if (!newchunk) { D_OOSHM(); return NULL; } /* calculate offsets and lengths of resulting chunks */ newchunk->offset = c->offset + c->length - length; newchunk->length = length; c->length -= newchunk->length; /* insert newchunk after chunk c */ newchunk->prev = c; newchunk->next = c->next; if (c->next) c->next->prev = newchunk; c->next = newchunk; D_MAGIC_SET( newchunk, Chunk ); return newchunk; } static Chunk * free_chunk( SurfaceManager *manager, Chunk *chunk ) { D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( chunk, Chunk ); if (!chunk->buffer) { D_BUG( "freeing free chunk" ); return chunk; } D_DEBUG_AT( SurfMan, "%s( %d bytes at offset %d )\n", __FUNCTION__, chunk->length, chunk->offset ); if (chunk->buffer->policy == CSP_VIDEOONLY) manager->avail += chunk->length; D_DEBUG_AT( SurfMan, " -> freed %d, available %d\n", chunk->length, manager->avail ); chunk->allocation = NULL; chunk->buffer = NULL; manager->min_toleration--; if (chunk->prev && !chunk->prev->buffer) { Chunk *prev = chunk->prev; //D_DEBUG_AT( SurfMan, " -> merging with previous chunk at %d\n", prev->offset ); prev->length += chunk->length; prev->next = chunk->next; if (prev->next) prev->next->prev = prev; //D_DEBUG_AT( SurfMan, " -> freeing %p (prev %p, next %p)\n", chunk, chunk->prev, chunk->next); D_MAGIC_CLEAR( chunk ); SHFREE( manager->shmpool, chunk ); chunk = prev; } if (chunk->next && !chunk->next->buffer) { Chunk *next = chunk->next; //D_DEBUG_AT( SurfMan, " -> merging with next chunk at %d\n", next->offset ); chunk->length += next->length; chunk->next = next->next; if (chunk->next) chunk->next->prev = chunk; D_MAGIC_CLEAR( next ); SHFREE( manager->shmpool, next ); } return chunk; } static Chunk * occupy_chunk( SurfaceManager *manager, Chunk *chunk, CoreSurfaceAllocation *allocation, int length, int pitch ) { D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( chunk, Chunk ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( allocation->buffer, CoreSurfaceBuffer ); if (allocation->buffer->policy == CSP_VIDEOONLY) manager->avail -= length; chunk = split_chunk( manager, chunk, length ); if (!chunk) return NULL; D_DEBUG_AT( SurfMan, "%s( %d bytes at offset %d )\n", __FUNCTION__, chunk->length, chunk->offset ); D_DEBUG_AT( SurfMan, " -> occupied %d, available %d\n", chunk->length, manager->avail ); chunk->allocation = allocation; chunk->buffer = allocation->buffer; chunk->pitch = pitch; manager->min_toleration++; return chunk; } DirectFB-1.7.7/systems/fbdev/fbdev.h0000644000175000017500000000736412254435330014140 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __CORE__FBDEV_H__ #define __CORE__FBDEV_H__ #include /* Needs to be included before dfb_types.h */ #include #include #include #include #include #include "agp.h" #include "fb.h" #include "surfacemanager.h" #include "vt.h" #ifndef FBIO_WAITFORVSYNC #define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t) #endif typedef struct { /* fbdev fixed screeninfo, contains infos about memory and type of card */ struct fb_fix_screeninfo fix; VideoMode *modes; /* linked list of valid video modes */ VideoMode current_mode; /* current video mode */ struct fb_var_screeninfo current_var; /* fbdev variable screeninfo set by DirectFB */ struct fb_var_screeninfo orig_var; /* fbdev variable screeninfo before DirectFB was started */ void *orig_cmap_memory; void *temp_cmap_memory; void *current_cmap_memory; struct fb_cmap orig_cmap; /* original palette */ struct fb_cmap current_cmap; /* our copy of the cmap */ struct fb_cmap temp_cmap; /* scratch */ FusionCall fbdev_ioctl; /* ioctl rpc */ unsigned long page_mask; /* PAGE_SIZE - 1 */ CoreSurfacePool *pool; struct { int bus; int dev; int func; } pci; /* PCI Bus ID of graphics device */ struct { unsigned short vendor; /* Graphics device vendor id */ unsigned short model; /* Graphics device model id */ } device; AGPShared *agp; FusionSHMPoolShared *shmpool; FusionSHMPoolShared *shmpool_data; CoreLayerRegionConfig config; SurfaceManager *manager; } FBDevShared; typedef struct { FBDevShared *shared; CoreDFB *core; /* virtual framebuffer address */ void *framebuffer_base; int fd; /* file descriptor for /dev/fb */ VirtualTerminal *vt; AGPDevice *agp; } FBDev; #endif DirectFB-1.7.7/systems/fbdev/vt.c0000644000175000017500000004624112254435330013473 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include /* Needs to be included before dfb_types.h */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "fbdev.h" #include "fb.h" #include "vt.h" D_DEBUG_DOMAIN( VT, "FBDev/VT", "FBDev System Module VT Handling" ); /* * FIXME: the following looks like a bad hack. * * SIGUNUSED is no longer unused, but is defined for backwards compatibility. * sparc, mips and alpha signal.h however do not define SIGUNUSED. */ #ifdef SIGUNUSED #define SIG_SWITCH_FROM (SIGUNUSED + 10) #define SIG_SWITCH_TO (SIGUNUSED + 11) #else #define SIG_SWITCH_FROM (31 + 10) #define SIG_SWITCH_TO (31 + 11) #endif #ifndef SI_KERNEL /* glibc 2.1.x doesn't have this in /usr/include/bits/siginfo.h */ #define SI_KERNEL 0x80 #endif extern FBDev *dfb_fbdev; static VirtualTerminal *dfb_vt = NULL; static DFBResult vt_init_switching( void ); static int vt_get_fb( int vt ); static void vt_set_fb( int vt, int fb ); static void *vt_thread( DirectThread *thread, void *arg ); static void vt_start_flushing( void ); static void vt_stop_flushing( void ); static void *vt_flush_thread( DirectThread *thread, void *arg ); DFBResult dfb_vt_initialize( void ) { DFBResult ret; struct vt_stat vs; D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); dfb_vt = D_CALLOC( 1, sizeof(VirtualTerminal) ); if (!dfb_vt) return D_OOM(); setsid(); dfb_vt->fd0 = open( "/dev/tty0", O_RDONLY | O_NOCTTY ); if (dfb_vt->fd0 < 0) { if (errno == ENOENT) { dfb_vt->fd0 = open( "/dev/vc/0", O_RDONLY | O_NOCTTY ); if (dfb_vt->fd0 < 0) { if (errno == ENOENT) { D_PERROR( "DirectFB/core/vt: Couldn't open " "neither `/dev/tty0' nor `/dev/vc/0'!\n" ); } else { D_PERROR( "DirectFB/core/vt: " "Error opening `/dev/vc/0'!\n" ); } D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } } else { D_PERROR( "DirectFB/core/vt: Error opening `/dev/tty0'!\n"); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } } if (ioctl( dfb_vt->fd0, VT_GETSTATE, &vs ) < 0) { D_PERROR( "DirectFB/core/vt: VT_GETSTATE failed!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } dfb_vt->prev = vs.v_active; if (!dfb_config->vt_switch) { if (dfb_config->vt_num != -1) dfb_vt->num = dfb_config->vt_num; else dfb_vt->num = dfb_vt->prev; /* move vt to framebuffer */ dfb_vt->old_fb = vt_get_fb( dfb_vt->num ); vt_set_fb( dfb_vt->num, -1 ); } else { if (dfb_config->vt_num == -1) { int n; n = ioctl( dfb_vt->fd0, VT_OPENQRY, &dfb_vt->num ); if (n < 0 || dfb_vt->num == -1) { D_PERROR( "DirectFB/core/vt: Cannot allocate VT!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } } else { dfb_vt->num = dfb_config->vt_num; } /* move vt to framebuffer */ dfb_vt->old_fb = vt_get_fb( dfb_vt->num ); vt_set_fb( dfb_vt->num, -1 ); /* switch to vt */ while (ioctl( dfb_vt->fd0, VT_ACTIVATE, dfb_vt->num ) < 0) { if (errno == EINTR) continue; D_PERROR( "DirectFB/core/vt: VT_ACTIVATE failed!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } while (ioctl( dfb_vt->fd0, VT_WAITACTIVE, dfb_vt->num ) < 0) { if (errno == EINTR) continue; D_PERROR( "DirectFB/core/vt: VT_WAITACTIVE failed!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } usleep( 40000 ); } ret = vt_init_switching(); if (ret) { if (dfb_config->vt_switch) { D_DEBUG_AT( VT, " -> switching back...\n" ); ioctl( dfb_vt->fd0, VT_ACTIVATE, dfb_vt->prev ); ioctl( dfb_vt->fd0, VT_WAITACTIVE, dfb_vt->prev ); D_DEBUG_AT( VT, " -> ...switched back\n" ); ioctl( dfb_vt->fd0, VT_DISALLOCATE, dfb_vt->num ); } close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return ret; } vt_start_flushing(); dfb_fbdev->vt = dfb_vt; return DFB_OK; } DFBResult dfb_vt_join( void ) { D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); dfb_vt_detach( true ); return DFB_OK; } DFBResult dfb_vt_shutdown( bool emergency ) { int res; const char cursoron_str[] = "\033[?0;0;0c"; const char blankon_str[] = "\033[9;10]"; (void)res; D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); if (!dfb_vt) return DFB_OK; vt_stop_flushing(); if (dfb_config->vt_switching) { if (ioctl( dfb_vt->fd, VT_SETMODE, &dfb_vt->vt_mode ) < 0) D_PERROR( "DirectFB/fbdev/vt: Unable to restore VT mode!!!\n" ); sigaction( SIG_SWITCH_FROM, &dfb_vt->sig_usr1, NULL ); sigaction( SIG_SWITCH_TO, &dfb_vt->sig_usr2, NULL ); direct_thread_cancel( dfb_vt->thread ); direct_thread_join( dfb_vt->thread ); direct_thread_destroy( dfb_vt->thread ); pthread_mutex_destroy( &dfb_vt->lock ); pthread_cond_destroy( &dfb_vt->wait ); } if (dfb_config->kd_graphics) { if (ioctl( dfb_vt->fd, KDSETMODE, KD_TEXT ) < 0) D_PERROR( "DirectFB/fbdev/vt: KD_TEXT failed!\n" ); } else { res = write( dfb_vt->fd, blankon_str, sizeof(blankon_str) ); } res = write( dfb_vt->fd, cursoron_str, sizeof(cursoron_str) ); if (tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ) < 0) D_PERROR("DirectFB/fbdev/vt: tcsetattr for original values failed!\n"); if (ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ) < 0) D_PERROR( "DirectFB/fbdev/vt: K_XLATE failed!\n" ); if (dfb_config->vt_switch) { D_DEBUG_AT( VT, " -> switching back...\n" ); if (ioctl( dfb_vt->fd0, VT_ACTIVATE, dfb_vt->prev ) < 0) D_PERROR( "DirectFB/core/vt: VT_ACTIVATE" ); if (ioctl( dfb_vt->fd0, VT_WAITACTIVE, dfb_vt->prev ) < 0) D_PERROR( "DirectFB/core/vt: VT_WAITACTIVE" ); D_DEBUG_AT( VT, " -> switched back...\n" ); usleep( 40000 ); /* restore con2fbmap */ vt_set_fb( dfb_vt->num, dfb_vt->old_fb ); if (close( dfb_vt->fd ) < 0) D_PERROR( "DirectFB/core/vt: Unable to " "close file descriptor of allocated VT!\n" ); if (ioctl( dfb_vt->fd0, VT_DISALLOCATE, dfb_vt->num ) < 0) D_PERROR( "DirectFB/core/vt: Unable to disallocate VT!\n" ); } else { /* restore con2fbmap */ vt_set_fb( dfb_vt->num, dfb_vt->old_fb ); if (close( dfb_vt->fd ) < 0) D_PERROR( "DirectFB/core/vt: Unable to " "close file descriptor of current VT!\n" ); } if (close( dfb_vt->fd0 ) < 0) D_PERROR( "DirectFB/core/vt: Unable to " "close file descriptor of tty0!\n" ); D_FREE( dfb_vt ); dfb_vt = dfb_fbdev->vt = NULL; return DFB_OK; } DFBResult dfb_vt_leave( bool emergency ) { D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); return DFB_OK; } DFBResult dfb_vt_detach( bool force ) { D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); if (dfb_config->vt_switch || force) { int fd; struct vt_stat vt_state; fd = open( "/dev/tty", O_RDONLY | O_NOCTTY ); if (fd < 0) { if (errno == ENXIO) return DFB_OK; D_PERROR( "DirectFB/VT: Opening /dev/tty failed!\n" ); return errno2result( errno ); } if (ioctl( fd, VT_GETSTATE, &vt_state )) { close( fd ); return DFB_OK; } if (ioctl( fd, TIOCNOTTY )) { D_PERROR( "DirectFB/VT: TIOCNOTTY on /dev/tty failed\n" ); close( fd ); return errno2result( errno ); } close( fd ); } return DFB_OK; } bool dfb_vt_switch( int num ) { D_DEBUG_AT( VT, "%s( %d )\n", __FUNCTION__, num ); if (!dfb_config->vt_switching) return false; D_DEBUG_AT( VT, " -> switching to vt %d...\n", num ); if (ioctl( dfb_vt->fd0, VT_ACTIVATE, num ) < 0) D_PERROR( "DirectFB/fbdev/vt: VT_ACTIVATE failed\n" ); return true; } static void * vt_thread( DirectThread *thread, void *arg ) { D_DEBUG_AT( VT, "%s( %p, %p )\n", __FUNCTION__, thread, arg ); pthread_mutex_lock( &dfb_vt->lock ); while (true) { direct_thread_testcancel( thread ); D_DEBUG_AT( VT, "...%s (signal %d)\n", __FUNCTION__, dfb_vt->vt_sig); switch (dfb_vt->vt_sig) { default: D_BUG( "unexpected vt_sig" ); /* fall through */ case -1: pthread_cond_wait( &dfb_vt->wait, &dfb_vt->lock ); continue; case SIG_SWITCH_FROM: if (dfb_core_suspend( dfb_fbdev->core ) == DFB_OK) { if (ioctl( dfb_vt->fd, VT_RELDISP, VT_ACKACQ ) < 0) D_PERROR( "DirectFB/fbdev/vt: VT_RELDISP failed\n" ); } break; case SIG_SWITCH_TO: if (dfb_core_resume( dfb_fbdev->core ) == DFB_OK) { if (ioctl( dfb_vt->fd, VT_RELDISP, VT_ACKACQ ) < 0) D_PERROR( "DirectFB/fbdev/vt: VT_RELDISP failed\n" ); if (dfb_config->kd_graphics) { if (ioctl( dfb_vt->fd, KDSETMODE, KD_GRAPHICS ) < 0) D_PERROR( "DirectFB/fbdev/vt: KD_GRAPHICS failed!\n" ); } } break; } dfb_vt->vt_sig = -1; pthread_cond_signal( &dfb_vt->wait ); } return NULL; } static void vt_switch_handler( int signum ) { D_DEBUG_AT( VT, "%s( %d )\n", __FUNCTION__, signum ); pthread_mutex_lock( &dfb_vt->lock ); while (dfb_vt->vt_sig != -1) pthread_cond_wait( &dfb_vt->wait, &dfb_vt->lock ); dfb_vt->vt_sig = signum; pthread_cond_signal( &dfb_vt->wait ); pthread_mutex_unlock( &dfb_vt->lock ); } static DFBResult vt_init_switching( void ) { struct termios ts; const char cursoroff_str[] = "\033[?1;0;0c"; const char blankoff_str[] = "\033[9;0]"; char buf[32]; int res; (void)res; D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); /* FIXME: Opening the device should be moved out of this function. */ snprintf(buf, 32, "/dev/tty%d", dfb_vt->num); dfb_vt->fd = open( buf, O_RDWR | O_NOCTTY ); if (dfb_vt->fd < 0) { if (errno == ENOENT) { snprintf(buf, 32, "/dev/vc/%d", dfb_vt->num); dfb_vt->fd = open( buf, O_RDWR | O_NOCTTY ); if (dfb_vt->fd < 0) { if (errno == ENOENT) { D_PERROR( "DirectFB/core/vt: Couldn't open " "neither `/dev/tty%d' nor `/dev/vc/%d'!\n", dfb_vt->num, dfb_vt->num ); } else { D_PERROR( "DirectFB/core/vt: " "Error opening `%s'!\n", buf ); } return errno2result( errno ); } } else { D_PERROR( "DirectFB/core/vt: Error opening `%s'!\n", buf ); return errno2result( errno ); } } /* attach to the new TTY before doing anything like KDSETMODE with it, otherwise we'd get access denied error: */ ioctl( dfb_vt->fd, TIOCSCTTY, 0 ); if (ioctl( dfb_vt->fd, KDSKBMODE, K_MEDIUMRAW ) < 0) { D_PERROR( "DirectFB/fbdev/vt: K_MEDIUMRAW failed!\n" ); close( dfb_vt->fd ); return DFB_INIT; } if (tcgetattr( dfb_vt->fd, &dfb_vt->old_ts ) < 0) { D_PERROR( "DirectFB/fbdev/vt: tcgetattr failed!\n" ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } ts = dfb_vt->old_ts; ts.c_cc[VTIME] = 0; ts.c_cc[VMIN] = 1; ts.c_lflag &= ~(ICANON|ECHO|ISIG); ts.c_iflag = 0; if (tcsetattr( dfb_vt->fd, TCSAFLUSH, &ts ) < 0) { D_PERROR( "DirectFB/fbdev/vt: tcsetattr for new values failed!\n" ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } res = write( dfb_vt->fd, cursoroff_str, sizeof(cursoroff_str) ); if (dfb_config->kd_graphics) { if (ioctl( dfb_vt->fd, KDSETMODE, KD_GRAPHICS ) < 0) { D_PERROR( "DirectFB/fbdev/vt: KD_GRAPHICS failed!\n" ); tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } } else { res = write( dfb_vt->fd, blankoff_str, sizeof(blankoff_str) ); } if (dfb_config->vt_switching) { struct vt_mode vt; struct sigaction sig_tty; memset( &sig_tty, 0, sizeof( sig_tty ) ); sig_tty.sa_handler = vt_switch_handler; sigfillset( &sig_tty.sa_mask ); if (sigaction( SIG_SWITCH_FROM, &sig_tty, &dfb_vt->sig_usr1 ) || sigaction( SIG_SWITCH_TO, &sig_tty, &dfb_vt->sig_usr2 )) { D_PERROR( "DirectFB/fbdev/vt: sigaction failed!\n" ); tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } vt.mode = VT_PROCESS; vt.waitv = 0; vt.relsig = SIG_SWITCH_FROM; vt.acqsig = SIG_SWITCH_TO; if (ioctl( dfb_vt->fd, VT_SETMODE, &vt ) < 0) { D_PERROR( "DirectFB/fbdev/vt: VT_SETMODE failed!\n" ); sigaction( SIG_SWITCH_FROM, &dfb_vt->sig_usr1, NULL ); sigaction( SIG_SWITCH_TO, &dfb_vt->sig_usr2, NULL ); tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } direct_util_recursive_pthread_mutex_init( &dfb_vt->lock ); pthread_cond_init( &dfb_vt->wait, NULL ); dfb_vt->vt_sig = -1; dfb_vt->thread = direct_thread_create( DTT_CRITICAL, vt_thread, NULL, "VT Switcher" ); } return DFB_OK; } static int vt_get_fb( int vt ) { struct fb_con2fbmap c2m; D_DEBUG_AT( VT, "%s( %d )\n", __FUNCTION__, vt ); c2m.console = vt; if (ioctl( dfb_fbdev->fd, FBIOGET_CON2FBMAP, &c2m )) { D_PERROR( "DirectFB/FBDev/vt: " "FBIOGET_CON2FBMAP failed!\n" ); return 0; } D_DEBUG_AT( VT, " -> %d\n", c2m.framebuffer ); return c2m.framebuffer; } static void vt_set_fb( int vt, int fb ) { struct fb_con2fbmap c2m; struct stat sbf; D_DEBUG_AT( VT, "%s( %d, %d )\n", __FUNCTION__, vt, fb ); if (fstat( dfb_fbdev->fd, &sbf )) { D_PERROR( "DirectFB/FBDev/vt: Could not fstat fb device!\n" ); return; } if (fb >= 0) c2m.framebuffer = fb; else c2m.framebuffer = (sbf.st_rdev & 0xFF) >> 5; c2m.console = vt; if (ioctl( dfb_fbdev->fd, FBIOPUT_CON2FBMAP, &c2m ) < 0) { D_PERROR( "DirectFB/FBDev/vt: " "FBIOPUT_CON2FBMAP failed!\n" ); } } static void vt_start_flushing( void ) { dfb_vt->flush = true; dfb_vt->flush_thread = direct_thread_create( DTT_DEFAULT, vt_flush_thread, NULL, "VT Flusher" ); } static void vt_stop_flushing( void ) { dfb_vt->flush = false; direct_thread_cancel( dfb_vt->flush_thread ); direct_thread_join( dfb_vt->flush_thread ); direct_thread_destroy( dfb_vt->flush_thread ); dfb_vt->flush_thread = NULL; } /* * If the vt buffer in not kept clean the kernel may stop sleeping. */ static void * vt_flush_thread( DirectThread *thread, void *arg ) { D_DEBUG_AT( VT, "%s( %p, %p )\n", __FUNCTION__, thread, arg ); while (dfb_vt->flush) { fd_set set; int ret; FD_ZERO( &set ); FD_SET( dfb_vt->fd, &set ); ret = select( dfb_vt->fd + 1, &set, NULL, NULL, NULL ); if (ret < 0 && errno == EINTR) continue; if (ret < 0 || !dfb_vt->flush) break; tcflush( dfb_vt->fd, TCIFLUSH ); } return NULL; } DirectFB-1.7.7/systems/fbdev/surfacemanager.h0000644000175000017500000001036112254435330016024 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __SURFACEMANAGER_H__ #define __SURFACEMANAGER_H__ #include #include typedef struct _SurfaceManager SurfaceManager; typedef struct _Chunk Chunk; /* * initially there is one big free chunk, * chunks are splitted into a free and an occupied chunk if memory is allocated, * two chunks are merged to one free chunk if memory is deallocated */ struct _Chunk { int magic; int offset; /* offset in memory, is greater or equal to the heap offset */ int length; /* length of this chunk in bytes */ int pitch; CoreSurfaceBuffer *buffer; /* pointer to surface buffer occupying this chunk, or NULL if chunk is free */ CoreSurfaceAllocation *allocation; int tolerations; /* number of times this chunk was scanned occupied, resetted in assure_video */ Chunk *prev; Chunk *next; }; struct _SurfaceManager { int magic; FusionSHMPoolShared *shmpool; Chunk *chunks; int offset; int length; /* length of the heap in bytes */ int avail; /* amount of available memory in bytes */ int min_toleration; bool suspended; }; DFBResult dfb_surfacemanager_create ( CoreDFB *core, unsigned int length, SurfaceManager **ret_manager ); void dfb_surfacemanager_destroy( SurfaceManager *manager ); /* * adjust the offset within the framebuffer for surface storage, * needs to be called after a resolution switch */ DFBResult dfb_surfacemanager_adjust_heap_offset( SurfaceManager *manager, int offset ); /* * finds and allocates one for the surface or fails, * after success the video health is CSH_RESTORE. * NOTE: this does not notify the listeners */ DFBResult dfb_surfacemanager_allocate( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, Chunk **ret_chunk ); DFBResult dfb_surfacemanager_displace( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer ); /* * sets the video health to CSH_INVALID frees the chunk and * notifies the listeners */ DFBResult dfb_surfacemanager_deallocate( SurfaceManager *manager, Chunk *chunk ); #endif DirectFB-1.7.7/systems/fbdev/Makefile.am0000644000175000017500000000154112171403127014721 00000000000000## Makefile.am for DirectFB/systems/fbdev INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src AM_CPPFLAGS = -D_XOPEN_SOURCE=500 internalincludedir = $(INTERNALINCLUDEDIR)/fbdev internalinclude_HEADERS = \ agp.h \ fb.h \ fbdev.h \ surfacemanager.h \ vt.h systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_fbdev.o endif systems_LTLIBRARIES = libdirectfb_fbdev.la libdirectfb_fbdev_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_fbdev_la_SOURCES = \ agp.c \ fbdev.c \ fbdev_surface_pool.c \ surfacemanager.c \ vt.c libdirectfb_fbdev_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/fbdev/fb.h0000644000175000017500000003415412171403127013433 00000000000000#ifndef _LINUX_FB_H #define _LINUX_FB_H #include /* Definitions of frame buffers */ #define FB_MAJOR 29 #define FB_MAX 32 /* sufficient for now */ /* ioctls 0x46 is 'F' */ #define FBIOGET_VSCREENINFO 0x4600 #define FBIOPUT_VSCREENINFO 0x4601 #define FBIOGET_FSCREENINFO 0x4602 #define FBIOGETCMAP 0x4604 #define FBIOPUTCMAP 0x4605 #define FBIOPAN_DISPLAY 0x4606 #define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor) /* 0x4607-0x460B are defined below */ /* #define FBIOGET_MONITORSPEC 0x460C */ /* #define FBIOPUT_MONITORSPEC 0x460D */ /* #define FBIOSWITCH_MONIBIT 0x460E */ #define FBIOGET_CON2FBMAP 0x460F #define FBIOPUT_CON2FBMAP 0x4610 #define FBIOBLANK 0x4611 /* arg: 0 or vesa level + 1 */ #define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank) #define FBIO_ALLOC 0x4613 #define FBIO_FREE 0x4614 #define FBIOGET_GLYPH 0x4615 #define FBIOGET_HWCINFO 0x4616 #define FBIOPUT_MODEINFO 0x4617 #define FBIOGET_DISPINFO 0x4618 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ #define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */ #define FB_TYPE_TEXT 3 /* Text/attributes */ #define FB_TYPE_VGA_PLANES 4 /* EGA/VGA planes */ #define FB_AUX_TEXT_MDA 0 /* Monochrome text */ #define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */ #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ #define FB_AUX_VGA_PLANES_CFB8 2 /* CFB8 in planes (VGA) */ #define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */ #define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */ #define FB_VISUAL_TRUECOLOR 2 /* True color */ #define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */ #define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */ #define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */ #define FB_ACCEL_NONE 0 /* no hardware accelerator */ #define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */ #define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */ #define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */ #define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */ #define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */ #define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */ #define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */ #define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */ #define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */ #define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */ #define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */ #define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */ #define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */ #define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */ #define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */ #define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */ #define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */ #define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */ #define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */ #define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */ #define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */ #define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */ #define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */ #define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */ #define FB_ACCEL_SUN_TCX 25 /* Sun tcx */ #define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */ #define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */ #define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */ #define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */ #define FB_ACCEL_CT_6555x 30 /* C&T 6555x */ #define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */ #define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */ #define FB_ACCEL_IGS_CYBER2000 33 /* CyberPro 2000 */ #define FB_ACCEL_IGS_CYBER2010 34 /* CyberPro 2010 */ #define FB_ACCEL_IGS_CYBER5000 35 /* CyberPro 5000 */ #define FB_ACCEL_SIS_GLAMOUR 36 /* SiS 300/630/540 */ #define FB_ACCEL_3DLABS_PERMEDIA3 37 /* 3Dlabs Permedia 3 */ #define FB_ACCEL_ATI_RADEON 38 /* ATI Radeon family */ #define FB_ACCEL_I810 39 /* Intel 810/815 */ #define FB_ACCEL_SIS_GLAMOUR_2 40 /* SiS 315, 650, 740 */ #define FB_ACCEL_SIS_XABRE 41 /* SiS 330 ("Xabre") */ #define FB_ACCEL_I830 42 /* Intel 830M/845G/85x/865G */ #define FB_ACCEL_NV_10 43 /* nVidia Arch 10 */ #define FB_ACCEL_NV_20 44 /* nVidia Arch 20 */ #define FB_ACCEL_NV_30 45 /* nVidia Arch 30 */ #define FB_ACCEL_NV_40 46 /* nVidia Arch 40 */ #define FB_ACCEL_XGI_VOLARI_V 47 /* XGI Volari V3XT, V5, V8 */ #define FB_ACCEL_XGI_VOLARI_Z 48 /* XGI Volari Z7 */ #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ #define FB_ACCEL_NEOMAGIC_NM2097 93 /* NeoMagic NM2097 */ #define FB_ACCEL_NEOMAGIC_NM2160 94 /* NeoMagic NM2160 */ #define FB_ACCEL_NEOMAGIC_NM2200 95 /* NeoMagic NM2200 */ #define FB_ACCEL_NEOMAGIC_NM2230 96 /* NeoMagic NM2230 */ #define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */ #define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */ #define FB_ACCEL_EP9X 99 /* CirrusLogic EP9X family */ #define FB_ACCEL_SAVAGE4 0x80 /* S3 Savage4 */ #define FB_ACCEL_SAVAGE3D 0x81 /* S3 Savage3D */ #define FB_ACCEL_SAVAGE3D_MV 0x82 /* S3 Savage3D-MV */ #define FB_ACCEL_SAVAGE2000 0x83 /* S3 Savage2000 */ #define FB_ACCEL_SAVAGE_MX_MV 0x84 /* S3 Savage/MX-MV */ #define FB_ACCEL_SAVAGE_MX 0x85 /* S3 Savage/MX */ #define FB_ACCEL_SAVAGE_IX_MV 0x86 /* S3 Savage/IX-MV */ #define FB_ACCEL_SAVAGE_IX 0x87 /* S3 Savage/IX */ #define FB_ACCEL_PROSAVAGE_PM 0x88 /* S3 ProSavage PM133 */ #define FB_ACCEL_PROSAVAGE_KM 0x89 /* S3 ProSavage KM133 */ #define FB_ACCEL_S3TWISTER_P 0x8a /* S3 Twister */ #define FB_ACCEL_S3TWISTER_K 0x8b /* S3 TwisterK */ #define FB_ACCEL_SUPERSAVAGE 0x8c /* S3 Supersavage */ #define FB_ACCEL_PROSAVAGE_DDR 0x8d /* S3 ProSavage DDR */ #define FB_ACCEL_PROSAVAGE_DDRK 0x8e /* S3 ProSavage DDR-K */ struct fb_fix_screeninfo { char id[16]; /* identification string eg "TT Builtin" */ unsigned long smem_start; /* Start of frame buffer mem */ /* (physical address) */ u32 smem_len; /* Length of frame buffer mem */ u32 type; /* see FB_TYPE_* */ u32 type_aux; /* Interleave for interleaved Planes */ u32 visual; /* see FB_VISUAL_* */ u16 xpanstep; /* zero if no hardware panning */ u16 ypanstep; /* zero if no hardware panning */ u16 ywrapstep; /* zero if no hardware ywrap */ u32 line_length; /* length of a line in bytes */ unsigned long mmio_start; /* Start of Memory Mapped I/O */ /* (physical address) */ u32 mmio_len; /* Length of Memory Mapped I/O */ u32 accel; /* Indicate to driver which */ /* specific chip/card we have */ u16 reserved[3]; /* Reserved for future compatibility */ }; /* Interpretation of offset for color fields: All offsets are from the right, * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you * can use the offset as right argument to <<). A pixel afterwards is a bit * stream and is written to video memory as that unmodified. This implies * big-endian byte order if bits_per_pixel is greater than 8. */ struct fb_bitfield { u32 offset; /* beginning of bitfield */ u32 length; /* length of bitfield */ u32 msb_right; /* != 0 : Most significant bit is */ /* right */ }; #define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */ #define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl)*/ #define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */ #define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */ #define FB_ACTIVATE_MASK 15 /* values */ #define FB_ACTIVATE_VBL 16 /* activate values on next vbl */ #define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */ #define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ #define FB_ACTIVATE_FORCE 128 /* force apply even when no change*/ #define FB_ACTIVATE_INV_MODE 256 /* invalidate videomode */ #define FB_ACCELF_TEXT 1 /* (OBSOLETE) see fb_info.flags and vc_mode */ #define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */ #define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */ #define FB_SYNC_EXT 4 /* external sync */ #define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */ #define FB_SYNC_BROADCAST 16 /* broadcast video timings */ /* vtotal = 144d/288n/576i => PAL */ /* vtotal = 121d/242n/484i => NTSC */ #define FB_SYNC_ON_GREEN 32 /* sync on green */ #define FB_VMODE_NONINTERLACED 0 /* non interlaced */ #define FB_VMODE_INTERLACED 1 /* interlaced */ #define FB_VMODE_DOUBLE 2 /* double scan */ #define FB_VMODE_MASK 255 #define FB_VMODE_YWRAP 256 /* ywrap instead of panning */ #define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ /* * Display rotation support */ #define FB_ROTATE_UR 0 #define FB_ROTATE_CW 1 #define FB_ROTATE_UD 2 #define FB_ROTATE_CCW 3 #define PICOS2KHZ(a) (1000000000UL/(a)) #define KHZ2PICOS(a) (1000000000UL/(a)) struct fb_var_screeninfo { u32 xres; /* visible resolution */ u32 yres; u32 xres_virtual; /* virtual resolution */ u32 yres_virtual; u32 xoffset; /* offset from virtual to visible */ u32 yoffset; /* resolution */ u32 bits_per_pixel; /* guess what */ u32 grayscale; /* != 0 Graylevels instead of colors */ struct fb_bitfield red; /* bitfield in fb mem if true color, */ struct fb_bitfield green; /* else only length is significant */ struct fb_bitfield blue; struct fb_bitfield transp; /* transparency */ u32 nonstd; /* != 0 Non standard pixel format */ u32 activate; /* see FB_ACTIVATE_* */ u32 height; /* height of picture in mm */ u32 width; /* width of picture in mm */ u32 accel_flags; /* (OBSOLETE) see fb_info.flags */ /* Timing: All values in pixclocks, except pixclock (of course) */ u32 pixclock; /* pixel clock in ps (pico seconds) */ u32 left_margin; /* time from sync to picture */ u32 right_margin; /* time from picture to sync */ u32 upper_margin; /* time from sync to picture */ u32 lower_margin; u32 hsync_len; /* length of horizontal sync */ u32 vsync_len; /* length of vertical sync */ u32 sync; /* see FB_SYNC_* */ u32 vmode; /* see FB_VMODE_* */ u32 rotate; /* angle we rotate counter clockwise */ u32 reserved[5]; /* Reserved for future compatibility */ }; struct fb_cmap { u32 start; /* First entry */ u32 len; /* Number of entries */ u16 *red; /* Red values */ u16 *green; u16 *blue; u16 *transp; /* transparency, can be NULL */ }; struct fb_con2fbmap { u32 console; u32 framebuffer; }; /* VESA Blanking Levels */ #define VESA_NO_BLANKING 0 #define VESA_VSYNC_SUSPEND 1 #define VESA_HSYNC_SUSPEND 2 #define VESA_POWERDOWN 3 enum { /* screen: unblanked, hsync: on, vsync: on */ FB_BLANK_UNBLANK = VESA_NO_BLANKING, /* screen: blanked, hsync: on, vsync: on */ FB_BLANK_NORMAL = VESA_NO_BLANKING + 1, /* screen: blanked, hsync: on, vsync: off */ FB_BLANK_VSYNC_SUSPEND = VESA_VSYNC_SUSPEND + 1, /* screen: blanked, hsync: off, vsync: on */ FB_BLANK_HSYNC_SUSPEND = VESA_HSYNC_SUSPEND + 1, /* screen: blanked, hsync: off, vsync: off */ FB_BLANK_POWERDOWN = VESA_POWERDOWN + 1 }; #define FB_VBLANK_VBLANKING 0x001 /* currently in a vertical blank */ #define FB_VBLANK_HBLANKING 0x002 /* currently in a horizontal blank */ #define FB_VBLANK_HAVE_VBLANK 0x004 /* vertical blanks can be detected */ #define FB_VBLANK_HAVE_HBLANK 0x008 /* horizontal blanks can be detected */ #define FB_VBLANK_HAVE_COUNT 0x010 /* global retrace counter is available */ #define FB_VBLANK_HAVE_VCOUNT 0x020 /* the vcount field is valid */ #define FB_VBLANK_HAVE_HCOUNT 0x040 /* the hcount field is valid */ #define FB_VBLANK_VSYNCING 0x080 /* currently in a vsync */ #define FB_VBLANK_HAVE_VSYNC 0x100 /* verical syncs can be detected */ struct fb_vblank { u32 flags; /* FB_VBLANK flags */ u32 count; /* counter of retraces since boot */ u32 vcount; /* current scanline position */ u32 hcount; /* current scandot position */ u32 reserved[4]; /* reserved for future compatibility */ }; /* Internal HW accel */ #define ROP_COPY 0 #define ROP_XOR 1 struct fb_copyarea { u32 dx; u32 dy; u32 width; u32 height; u32 sx; u32 sy; }; struct fb_fillrect { u32 dx; /* screen-relative */ u32 dy; u32 width; u32 height; u32 color; u32 rop; }; struct fb_image { u32 dx; /* Where to place image */ u32 dy; u32 width; /* Size of image */ u32 height; u32 fg_color; /* Only used when a mono bitmap */ u32 bg_color; u8 depth; /* Depth of the image */ const char *data; /* Pointer to image data */ struct fb_cmap cmap; /* color map info */ }; /* * hardware cursor control */ #define FB_CUR_SETIMAGE 0x01 #define FB_CUR_SETPOS 0x02 #define FB_CUR_SETHOT 0x04 #define FB_CUR_SETCMAP 0x08 #define FB_CUR_SETSHAPE 0x10 #define FB_CUR_SETSIZE 0x20 #define FB_CUR_SETALL 0xFF struct fbcurpos { u16 x, y; }; struct fb_cursor { u16 set; /* what to set */ u16 enable; /* cursor on/off */ u16 rop; /* bitop operation */ const char *mask; /* cursor mask bits */ struct fbcurpos hot; /* cursor hot spot */ struct fb_image image; /* Cursor image */ }; #endif /* _LINUX_FB_H */ DirectFB-1.7.7/systems/fbdev/agp.h0000644000175000017500000000325512254435330013614 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __AGP_H__ #define __AGP_H__ #include typedef struct { unsigned int agp_mem; int agp_key; agp_info info; } AGPShared; typedef struct { int fd; void *base; } AGPDevice; DFBResult dfb_agp_initialize( void ); DFBResult dfb_agp_shutdown( void ); DFBResult dfb_agp_join( void ); DFBResult dfb_agp_leave( void ); #endif /* __AGP_H__ */ DirectFB-1.7.7/systems/fbdev/Makefile.in0000644000175000017500000007012512466665317014760 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ $(internalinclude_HEADERS) subdir = systems/fbdev ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" \ "$(DESTDIR)$(internalincludedir)" LTLIBRARIES = $(systems_LTLIBRARIES) libdirectfb_fbdev_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_fbdev_la_OBJECTS = agp.lo fbdev.lo \ fbdev_surface_pool.lo surfacemanager.lo vt.lo libdirectfb_fbdev_la_OBJECTS = $(am_libdirectfb_fbdev_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_fbdev_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_fbdev_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_fbdev_la_SOURCES) DIST_SOURCES = $(libdirectfb_fbdev_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systems_DATA) HEADERS = $(internalinclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src AM_CPPFLAGS = -D_XOPEN_SOURCE=500 internalincludedir = $(INTERNALINCLUDEDIR)/fbdev internalinclude_HEADERS = \ agp.h \ fb.h \ fbdev.h \ surfacemanager.h \ vt.h systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_fbdev.o systems_LTLIBRARIES = libdirectfb_fbdev.la libdirectfb_fbdev_la_LDFLAGS = \ -avoid-version \ -module libdirectfb_fbdev_la_SOURCES = \ agp.c \ fbdev.c \ fbdev_surface_pool.c \ surfacemanager.c \ vt.c libdirectfb_fbdev_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/fbdev/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/fbdev/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_fbdev.la: $(libdirectfb_fbdev_la_OBJECTS) $(libdirectfb_fbdev_la_DEPENDENCIES) $(EXTRA_libdirectfb_fbdev_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_fbdev_la_LINK) -rpath $(systemsdir) $(libdirectfb_fbdev_la_OBJECTS) $(libdirectfb_fbdev_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbdev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbdev_surface_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/surfacemanager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vt.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) install-internalincludeHEADERS: $(internalinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(internalincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(internalincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(internalincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(internalincludedir)" || exit $$?; \ done uninstall-internalincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(internalincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(internalincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-systemsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-internalincludeHEADERS install-systemsDATA \ install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-internalincludeHEADERS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-systemsDATA install-systemsLTLIBRARIES \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/fbdev/fbdev.c0000644000175000017500000023371712463500703014135 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include /* Needs to be included before dfb_types.h */ #include #include #include #include #include #include #if defined(HAVE_SYSIO) # include #endif #include #include #include #include #include #define SYS_CLASS_GRAPHICS_DEV "/sys/class/graphics/%s/device" #define SYS_CLASS_GRAPHICS_DEV_VENDOR "/sys/class/graphics/%s/device/vendor" #define SYS_CLASS_GRAPHICS_DEV_MODEL "/sys/class/graphics/%s/device/device" #define SYSFS_PATH_MAX 128 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "fbdev.h" #include "fb.h" #include "vt.h" #include "agp.h" #include DFB_CORE_SYSTEM( fbdev ) D_DEBUG_DOMAIN( FBDev_Mode, "FBDev/Mode", "FBDev System Module Mode Switching" ); D_DEBUG_DOMAIN( FBDev_Primary, "FBDev/Primary", "FBDev Primary Layer" ); /******************************************************************************/ extern const SurfacePoolFuncs fbdevSurfacePoolFuncs; static FusionCallHandlerResult fbdev_ioctl_call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ); static int fbdev_ioctl( int request, void *arg, int arg_size ); #define FBDEV_IOCTL(request,arg) fbdev_ioctl( request, arg, sizeof(*(arg)) ) FBDev *dfb_fbdev = NULL; /******************************************************************************/ static int primaryLayerDataSize ( void ); static int primaryRegionDataSize( void ); static DFBResult primaryInitLayer ( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ); static DFBResult primarySetColorAdjustment( CoreLayer *layer, void *driver_data, void *layer_data, DFBColorAdjustment *adjustment ); static DFBResult primaryTestRegion ( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *failed ); static DFBResult primaryAddRegion ( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config ); static DFBResult primarySetRegion ( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ); static DFBResult primaryRemoveRegion ( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ); static DFBResult primaryFlipRegion ( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ); static DisplayLayerFuncs primaryLayerFuncs = { .LayerDataSize = primaryLayerDataSize, .RegionDataSize = primaryRegionDataSize, .InitLayer = primaryInitLayer, .SetColorAdjustment = primarySetColorAdjustment, .TestRegion = primaryTestRegion, .AddRegion = primaryAddRegion, .SetRegion = primarySetRegion, .RemoveRegion = primaryRemoveRegion, .FlipRegion = primaryFlipRegion, }; /******************************************************************************/ static DFBResult primaryInitScreen ( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ); static DFBResult primarySetPowerMode( CoreScreen *screen, void *driver_data, void *screen_data, DFBScreenPowerMode mode ); static DFBResult primaryWaitVSync ( CoreScreen *screen, void *driver_data, void *layer_data ); static DFBResult primaryGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ); static DFBResult primaryGetVSyncCount( CoreScreen *screen, void *driver_data, void *screen_data, unsigned long *ret_count ); static ScreenFuncs primaryScreenFuncs = { .InitScreen = primaryInitScreen, .SetPowerMode = primarySetPowerMode, .WaitVSync = primaryWaitVSync, .GetScreenSize = primaryGetScreenSize, .GetVSyncCount = primaryGetVSyncCount, }; /******************************************************************************/ static DFBResult dfb_fbdev_read_modes( void ); static DFBResult dfb_fbdev_set_gamma_ramp( DFBSurfacePixelFormat format ); static DFBResult dfb_fbdev_set_palette( CorePalette *palette ); static DFBResult dfb_fbdev_set_rgb332_palette( void ); static DFBResult dfb_fbdev_pan( int xoffset, int yoffset, bool onsync ); static DFBResult dfb_fbdev_blank( int level ); static void dfb_fbdev_var_to_mode( const struct fb_var_screeninfo *var, VideoMode *mode ); static const VideoMode *dfb_fbdev_find_mode( int width, int height ); static DFBResult dfb_fbdev_test_mode ( const VideoMode *mode, const CoreLayerRegionConfig *config ); static DFBResult dfb_fbdev_test_mode_simple( const VideoMode *mode ); static DFBResult dfb_fbdev_set_mode ( const VideoMode *mode, CoreSurface *surface, unsigned int xoffset, unsigned int yoffset ); /******************************************************************************/ static inline void waitretrace (void) { #if defined(HAVE_INB_OUTB_IOPL) if (iopl(3)) return; if (!(inb (0x3cc) & 1)) { while ((inb (0x3ba) & 0x8)) ; while (!(inb (0x3ba) & 0x8)) ; } else { while ((inb (0x3da) & 0x8)) ; while (!(inb (0x3da) & 0x8)) ; } #endif } /******************************************************************************/ static DFBResult dfb_fbdev_open( void ) { DFBResult error_result = DFB_FAILURE; if (dfb_config->fb_device) { dfb_fbdev->fd = open( dfb_config->fb_device, O_RDWR ); if (dfb_fbdev->fd < 0) { D_PERROR( "DirectFB/FBDev: Error opening '%s'!\n", dfb_config->fb_device); error_result = errno2result( errno ); goto error; } } else if (getenv( "FRAMEBUFFER" ) && *getenv( "FRAMEBUFFER" ) != '\0') { dfb_fbdev->fd = open( getenv ("FRAMEBUFFER"), O_RDWR ); if (dfb_fbdev->fd < 0) { D_PERROR( "DirectFB/FBDev: Error opening '%s'!\n", getenv ("FRAMEBUFFER")); error_result = errno2result( errno ); goto error; } } else { dfb_fbdev->fd = direct_try_open( "/dev/fb0", "/dev/fb/0", O_RDWR, true ); if (dfb_fbdev->fd < 0) { D_ERROR( "DirectFB/FBDev: Error opening framebuffer device!\n" ); D_ERROR( "DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.\n" ); error_result = DFB_INIT; goto error; } } /* should be closed automatically in children upon exec(...) */ if (fcntl( dfb_fbdev->fd, F_SETFD, FD_CLOEXEC ) < 0) { D_PERROR( "Fusion/Init: Setting FD_CLOEXEC flag failed!\n" ); goto error; } return DFB_OK; error: return error_result; } /******************************************************************************/ static void dfb_fbdev_get_pci_info( FBDevShared *shared ) { char buf[512+1]; int vendor = -1; int model = -1; FILE *fp; int bus; int dev; int func; char *fbdev; char devname[5] = { 'f', 'b', '0', 0, 0 }; char path[SYSFS_PATH_MAX]; int len; /* try sysfs interface */ fbdev = dfb_config->fb_device; if (!fbdev) fbdev = getenv( "FRAMEBUFFER" ); if (fbdev) { if (!strncmp( fbdev, "/dev/fb/", 8 )) snprintf( devname, 5, "fb%s", fbdev+8 ); else if (!strncmp( fbdev, "/dev/fb", 7 )) snprintf( devname, 5, "fb%s", fbdev+7 ); } snprintf(path, SYSFS_PATH_MAX, SYS_CLASS_GRAPHICS_DEV, devname); len = readlink(path,buf,512); if(len != -1) { char * base; buf[len] = '\0'; base = basename(buf); if (sscanf( base, "0000:%02x:%02x.%1x", &bus, &dev, &func ) == 3) { shared->pci.bus = bus; shared->pci.dev = dev; shared->pci.func = func; } snprintf(path, SYSFS_PATH_MAX, SYS_CLASS_GRAPHICS_DEV_VENDOR, devname); fp = fopen(path,"r"); if(fp) { if(fgets(buf,512,fp)) { if(sscanf(buf,"0x%04x", &vendor) == 1) shared->device.vendor = vendor; } fclose(fp); } else { D_DEBUG( "DirectFB/FBDev: " "couldn't access %s!\n", path ); } snprintf(path, SYSFS_PATH_MAX, SYS_CLASS_GRAPHICS_DEV_MODEL, devname); fp = fopen(path,"r"); if(fp) { if(fgets(buf,512,fp)) { if(sscanf(buf,"0x%04x", &model) == 1) shared->device.model = model; } fclose(fp); } else { D_DEBUG( "DirectFB/FBDev: " "couldn't access %s!\n", path ); } } else { D_DEBUG( "DirectFB/FBDev: " "couldn't access %s!\n", path ); } /* try /proc interface */ if (vendor == -1 || model == -1) { int id; fp = fopen( "/proc/bus/pci/devices", "r" ); if (!fp) { D_DEBUG( "DirectFB/FBDev: " "couldn't access /proc/bus/pci/devices!\n" ); return; } while (fgets( buf, 512, fp )) { if (sscanf( buf, "%04x\t%04x%04x", &id, &vendor, &model ) == 3) { bus = (id & 0xff00) >> 8; dev = (id & 0x00ff) >> 3; func = (id & 0x0007); if (bus == dfb_config->pci.bus && dev == dfb_config->pci.dev && func == dfb_config->pci.func) { shared->pci.bus = bus; shared->pci.dev = dev; shared->pci.func = func; shared->device.vendor = vendor; shared->device.model = model; break; } } } fclose( fp ); } } /** public **/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_FBDEV; info->caps = CSCAPS_ACCELERATION; snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "FBDev" ); } static DFBResult system_initialize( CoreDFB *core, void **data ) { DFBResult ret; CoreScreen *screen; long page_size; FBDevShared *shared = NULL; FusionSHMPoolShared *pool; FusionSHMPoolShared *pool_data; D_ASSERT( dfb_fbdev == NULL ); pool = dfb_core_shmpool( core ); pool_data = dfb_core_shmpool_data( core ); dfb_fbdev = D_CALLOC( 1, sizeof(FBDev) ); if (!dfb_fbdev) return D_OOM(); dfb_fbdev->fd = -1; shared = (FBDevShared*) SHCALLOC( pool, 1, sizeof(FBDevShared) ); if (!shared) { ret = D_OOSHM(); goto error; } shared->shmpool = pool; shared->shmpool_data = pool_data; core_arena_add_shared_field( core, "fbdev", shared ); dfb_fbdev->core = core; dfb_fbdev->shared = shared; page_size = direct_pagesize(); shared->page_mask = page_size < 0 ? 0 : (page_size - 1); ret = dfb_fbdev_open(); if (ret) goto error; if (dfb_config->vt) { ret = dfb_vt_initialize(); if (ret) goto error; } ret = DFB_INIT; /* Retrieve fixed informations like video ram size */ if (ioctl( dfb_fbdev->fd, FBIOGET_FSCREENINFO, &shared->fix ) < 0) { D_PERROR( "DirectFB/FBDev: " "Could not get fixed screen information!\n" ); goto error; } D_INFO( "DirectFB/FBDev: Found '%s' (ID %d) with frame buffer at 0x%08lx, %dk (MMIO 0x%08lx, %dk)\n", shared->fix.id, shared->fix.accel, shared->fix.smem_start, shared->fix.smem_len >> 10, shared->fix.mmio_start, shared->fix.mmio_len >> 10 ); /* Map the framebuffer */ dfb_fbdev->framebuffer_base = mmap( NULL, shared->fix.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, dfb_fbdev->fd, 0 ); if (dfb_fbdev->framebuffer_base == MAP_FAILED) { D_PERROR( "DirectFB/FBDev: " "Could not mmap the framebuffer!\n"); dfb_fbdev->framebuffer_base = NULL; goto error; } if (ioctl( dfb_fbdev->fd, FBIOGET_VSCREENINFO, &shared->orig_var ) < 0) { D_PERROR( "DirectFB/FBDev: " "Could not get variable screen information!\n" ); goto error; } shared->current_var = shared->orig_var; shared->current_var.accel_flags = 0; if (ioctl( dfb_fbdev->fd, FBIOPUT_VSCREENINFO, &shared->current_var ) < 0) { D_PERROR( "DirectFB/FBDev: " "Could not disable console acceleration!\n" ); goto error; } dfb_fbdev_var_to_mode( &shared->current_var, &shared->current_mode ); shared->orig_cmap_memory = SHMALLOC( pool_data, 256 * 2 * 4 ); if (!shared->orig_cmap_memory) { ret = D_OOSHM(); goto error; } shared->orig_cmap.start = 0; shared->orig_cmap.len = 256; shared->orig_cmap.red = shared->orig_cmap_memory + 256 * 2 * 0; shared->orig_cmap.green = shared->orig_cmap_memory + 256 * 2 * 1; shared->orig_cmap.blue = shared->orig_cmap_memory + 256 * 2 * 2; shared->orig_cmap.transp = shared->orig_cmap_memory + 256 * 2 * 3; if (ioctl( dfb_fbdev->fd, FBIOGETCMAP, &shared->orig_cmap ) < 0) { D_DEBUG( "DirectFB/FBDev: " "Could not retrieve palette for backup!\n" ); memset( &shared->orig_cmap, 0, sizeof(shared->orig_cmap) ); SHFREE( pool_data, shared->orig_cmap_memory ); shared->orig_cmap_memory = NULL; } shared->temp_cmap_memory = SHMALLOC( pool_data, 256 * 2 * 4 ); if (!shared->temp_cmap_memory) { ret = D_OOSHM(); goto error; } shared->temp_cmap.start = 0; shared->temp_cmap.len = 256; shared->temp_cmap.red = shared->temp_cmap_memory + 256 * 2 * 0; shared->temp_cmap.green = shared->temp_cmap_memory + 256 * 2 * 1; shared->temp_cmap.blue = shared->temp_cmap_memory + 256 * 2 * 2; shared->temp_cmap.transp = shared->temp_cmap_memory + 256 * 2 * 3; shared->current_cmap_memory = SHMALLOC( pool_data, 256 * 2 * 4 ); if (!shared->current_cmap_memory) { ret = D_OOSHM(); goto error; } shared->current_cmap.start = 0; shared->current_cmap.len = 256; shared->current_cmap.red = shared->current_cmap_memory + 256 * 2 * 0; shared->current_cmap.green = shared->current_cmap_memory + 256 * 2 * 1; shared->current_cmap.blue = shared->current_cmap_memory + 256 * 2 * 2; shared->current_cmap.transp = shared->current_cmap_memory + 256 * 2 * 3; dfb_fbdev_get_pci_info( shared ); if (dfb_config->agp) { /* Do not fail here, AGP slot could be unavailable */ ret = dfb_agp_initialize(); if (ret) { D_DEBUG( "DirectFB/FBDev: dfb_agp_initialize()\n\t->%s\n", DirectFBErrorString( ret ) ); ret = DFB_OK; } } fusion_call_init( &shared->fbdev_ioctl, fbdev_ioctl_call_handler, NULL, dfb_core_world(core) ); dfb_surface_pool_initialize( core, &fbdevSurfacePoolFuncs, &dfb_fbdev->shared->pool ); /* Register primary screen functions */ screen = dfb_screens_register( NULL, NULL, &primaryScreenFuncs ); /* Register primary layer functions */ dfb_layers_register( screen, NULL, &primaryLayerFuncs ); *data = dfb_fbdev; return DFB_OK; error: if (shared) { if (shared->orig_cmap_memory) SHFREE( pool_data, shared->orig_cmap_memory ); if (shared->temp_cmap_memory) SHFREE( pool_data, shared->temp_cmap_memory ); if (shared->current_cmap_memory) SHFREE( pool_data, shared->current_cmap_memory ); SHFREE( pool, shared ); } if (dfb_fbdev->framebuffer_base) munmap( dfb_fbdev->framebuffer_base, shared->fix.smem_len ); if (dfb_fbdev->fd != -1) close( dfb_fbdev->fd ); D_FREE( dfb_fbdev ); dfb_fbdev = NULL; return ret; } static DFBResult system_join( CoreDFB *core, void **data ) { DFBResult ret; CoreScreen *screen; void *shared; D_ASSERT( dfb_fbdev == NULL ); if (dfb_config->vt) { ret = dfb_vt_join(); if (ret) return ret; } dfb_fbdev = D_CALLOC( 1, sizeof(FBDev) ); if (!dfb_fbdev) return D_OOM(); core_arena_get_shared_field( core, "fbdev", &shared ); dfb_fbdev->core = core; dfb_fbdev->shared = shared; /* Open framebuffer device */ ret = dfb_fbdev_open(); if (ret) { D_FREE( dfb_fbdev ); dfb_fbdev = NULL; return ret; } /* Map the framebuffer */ dfb_fbdev->framebuffer_base = mmap( NULL, dfb_fbdev->shared->fix.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, dfb_fbdev->fd, 0 ); if (dfb_fbdev->framebuffer_base == MAP_FAILED) { D_PERROR( "DirectFB/FBDev: " "Could not mmap the framebuffer!\n"); close( dfb_fbdev->fd ); D_FREE( dfb_fbdev ); dfb_fbdev = NULL; return DFB_INIT; } /* Open AGP device */ ret = dfb_agp_join(); if (ret) { D_ERROR( "DirectFB/FBDev: Could not join AGP!\n" ); munmap( dfb_fbdev->framebuffer_base, dfb_fbdev->shared->fix.smem_len ); close( dfb_fbdev->fd ); D_FREE( dfb_fbdev ); dfb_fbdev = NULL; return ret; } dfb_surface_pool_join( core, dfb_fbdev->shared->pool, &fbdevSurfacePoolFuncs ); /* Register primary screen functions */ screen = dfb_screens_register( NULL, NULL, &primaryScreenFuncs ); /* Register primary layer functions */ dfb_layers_register( screen, NULL, &primaryLayerFuncs ); *data = dfb_fbdev; return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { DFBResult ret; VideoMode *m; FBDevShared *shared; FusionSHMPoolShared *pool; D_ASSERT( dfb_fbdev != NULL ); shared = dfb_fbdev->shared; D_ASSERT( shared != NULL ); pool = shared->shmpool; D_ASSERT( pool != NULL ); m = shared->modes; while (m) { VideoMode *next = m->next; SHFREE( pool, m ); m = next; } if (ioctl( dfb_fbdev->fd, FBIOPUT_VSCREENINFO, &shared->orig_var ) < 0) { D_PERROR( "DirectFB/FBDev: " "Could not restore variable screen information!\n" ); } if (shared->orig_cmap.len) { if (ioctl( dfb_fbdev->fd, FBIOPUTCMAP, &shared->orig_cmap ) < 0) D_DEBUG( "DirectFB/FBDev: " "Could not restore palette!\n" ); } if (shared->orig_cmap_memory) SHFREE( shared->shmpool_data, shared->orig_cmap_memory ); if (shared->temp_cmap_memory) SHFREE( shared->shmpool_data, shared->temp_cmap_memory ); if (shared->current_cmap_memory) SHFREE( shared->shmpool_data, shared->current_cmap_memory ); fusion_call_destroy( &shared->fbdev_ioctl ); dfb_agp_shutdown(); dfb_surface_pool_destroy( dfb_fbdev->shared->pool ); munmap( dfb_fbdev->framebuffer_base, shared->fix.smem_len ); if (dfb_config->vt) { ret = dfb_vt_shutdown( emergency ); if (ret) return ret; } close( dfb_fbdev->fd ); SHFREE( pool, shared ); D_FREE( dfb_fbdev ); dfb_fbdev = NULL; return DFB_OK; } static DFBResult system_leave( bool emergency ) { DFBResult ret; D_ASSERT( dfb_fbdev != NULL ); dfb_agp_leave(); dfb_surface_pool_leave( dfb_fbdev->shared->pool ); munmap( dfb_fbdev->framebuffer_base, dfb_fbdev->shared->fix.smem_len ); if (dfb_config->vt) { ret = dfb_vt_leave( emergency ); if (ret) return ret; } close( dfb_fbdev->fd ); D_FREE( dfb_fbdev ); dfb_fbdev = NULL; return DFB_OK; } static DFBResult system_suspend( void ) { return DFB_OK; } static DFBResult system_resume( void ) { return DFB_OK; } /******************************************************************************/ static volatile void * system_map_mmio( unsigned int offset, int length ) { void *addr; if (length <= 0) length = dfb_fbdev->shared->fix.mmio_len; addr = mmap( NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED, dfb_fbdev->fd, dfb_fbdev->shared->fix.smem_len + offset ); if (addr == MAP_FAILED) { D_PERROR( "DirectFB/FBDev: Could not mmap MMIO region " "(offset %d, length %d)!\n", offset, length ); return NULL; } return(volatile void*) ((u8*) addr + (dfb_fbdev->shared->fix.mmio_start & dfb_fbdev->shared->page_mask)); } static void system_unmap_mmio( volatile void *addr, int length ) { if (length <= 0) length = dfb_fbdev->shared->fix.mmio_len; if (munmap( (void*) ((u8*) addr - (dfb_fbdev->shared->fix.mmio_start & dfb_fbdev->shared->page_mask)), length ) < 0) D_PERROR( "DirectFB/FBDev: Could not unmap MMIO region " "at %p (length %d)!\n", addr, length ); } static int system_get_accelerator( void ) { #ifdef FB_ACCEL_MATROX_MGAG400 if (!strcmp( dfb_fbdev->shared->fix.id, "MATROX DH" )) return FB_ACCEL_MATROX_MGAG400; #endif #ifdef FB_ACCEL_EP9X if (!strcmp( dfb_fbdev->shared->fix.id, "ep9xfb" )) return FB_ACCEL_EP9X; #endif if (dfb_config->accelerator) return dfb_config->accelerator; return dfb_fbdev->shared->fix.accel; } static VideoMode * system_get_modes( void ) { return dfb_fbdev->shared->modes; } static VideoMode * system_get_current_mode( void ) { return &dfb_fbdev->shared->current_mode; } static DFBResult system_thread_init( void ) { if (dfb_config->block_all_signals) direct_signals_block_all(); return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { if (dfb_config->vt && dfb_config->vt_switching) { switch (event->type) { case DIET_KEYPRESS: if (DFB_KEY_TYPE(event->key_symbol) == DIKT_FUNCTION && event->modifiers == (DIMM_CONTROL | DIMM_ALT)) return dfb_vt_switch( event->key_symbol - DIKS_F1 + 1 ); break; case DIET_KEYRELEASE: if (DFB_KEY_TYPE(event->key_symbol) == DIKT_FUNCTION && event->modifiers == (DIMM_CONTROL | DIMM_ALT)) return true; break; default: break; } } return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return dfb_fbdev->shared->fix.smem_start + offset; } static void * system_video_memory_virtual( unsigned int offset ) { return(void*)((u8*)(dfb_fbdev->framebuffer_base) + offset); } static unsigned int system_videoram_length( void ) { return dfb_fbdev->shared->fix.smem_len; } static unsigned long system_aux_memory_physical( unsigned int offset ) { if (dfb_fbdev->shared->agp) return dfb_fbdev->shared->agp->info.aper_base + offset; return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { if (dfb_fbdev->agp) return (void*)(u8*)dfb_fbdev->agp->base + offset; return NULL; } static unsigned int system_auxram_length( void ) { if (dfb_fbdev->shared->agp) return dfb_fbdev->shared->agp->agp_mem; return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { *ret_bus = dfb_fbdev->shared->pci.bus; *ret_dev = dfb_fbdev->shared->pci.dev; *ret_func = dfb_fbdev->shared->pci.func; } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { *ret_vendor_id = dfb_fbdev->shared->device.vendor; *ret_device_id = dfb_fbdev->shared->device.model; } /******************************************************************************/ static DFBResult init_modes( void ) { dfb_fbdev_read_modes(); if (!dfb_fbdev->shared->modes) { /* try to use current mode*/ dfb_fbdev->shared->modes = (VideoMode*) SHCALLOC( dfb_fbdev->shared->shmpool, 1, sizeof(VideoMode) ); if (!dfb_fbdev->shared->modes) return D_OOSHM(); *dfb_fbdev->shared->modes = dfb_fbdev->shared->current_mode; if (dfb_fbdev_test_mode_simple(dfb_fbdev->shared->modes)) { D_ERROR("DirectFB/FBDev: " "No supported modes found in /etc/fb.modes and " "current mode not supported!\n"); D_ERROR( "DirectFB/FBDev: Current mode's pixelformat: " "rgba %d/%d, %d/%d, %d/%d, %d/%d (%dbit)\n", dfb_fbdev->shared->orig_var.red.length, dfb_fbdev->shared->orig_var.red.offset, dfb_fbdev->shared->orig_var.green.length, dfb_fbdev->shared->orig_var.green.offset, dfb_fbdev->shared->orig_var.blue.length, dfb_fbdev->shared->orig_var.blue.offset, dfb_fbdev->shared->orig_var.transp.length, dfb_fbdev->shared->orig_var.transp.offset, dfb_fbdev->shared->orig_var.bits_per_pixel ); return DFB_INIT; } } return DFB_OK; } /******************************************************************************/ static DFBResult primaryInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); /* Set the screen capabilities. */ description->caps = DSCCAPS_VSYNC | DSCCAPS_POWER_MANAGEMENT; /* Set the screen name. */ snprintf( description->name, DFB_SCREEN_DESC_NAME_LENGTH, "FBDev Primary Screen" ); return DFB_OK; } static DFBResult primarySetPowerMode( CoreScreen *screen, void *driver_data, void *screen_data, DFBScreenPowerMode mode ) { int level; D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); switch (mode) { case DSPM_OFF: level = 4; break; case DSPM_SUSPEND: level = 3; break; case DSPM_STANDBY: level = 2; break; case DSPM_ON: level = 0; break; default: return DFB_INVARG; } return dfb_fbdev_blank( level ); } static DFBResult primaryWaitVSync( CoreScreen *screen, void *driver_data, void *screen_data ) { static const int zero = 0; D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); if (dfb_config->pollvsync_none) return DFB_OK; if (ioctl( dfb_fbdev->fd, FBIO_WAITFORVSYNC, &zero )) waitretrace(); return DFB_OK; } static DFBResult primaryGetVSyncCount( CoreScreen *screen, void *driver_data, void *screen_data, unsigned long *ret_count ) { struct fb_vblank vblank; D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); D_ASSERT( ret_count != NULL ); if (!ret_count) return DFB_INVARG; if (ioctl( dfb_fbdev->fd, FBIOGET_VBLANK, &vblank )) return errno2result( errno ); if (!D_FLAGS_IS_SET( vblank.flags, FB_VBLANK_HAVE_COUNT )) return DFB_UNSUPPORTED; *ret_count = vblank.count; return DFB_OK; } static DFBResult primaryGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); D_ASSERT( dfb_fbdev != NULL ); D_ASSERT( dfb_fbdev->shared != NULL ); *ret_width = dfb_fbdev->shared->current_mode.xres; *ret_height = dfb_fbdev->shared->current_mode.yres; return DFB_OK; } /******************************************************************************/ static int primaryLayerDataSize( void ) { return 0; } static int primaryRegionDataSize( void ) { return 0; } static DFBResult primaryInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { DFBResult ret; VideoMode *default_mode; D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); /* initialize mode table */ ret = init_modes(); if (ret) return ret; default_mode = dfb_fbdev->shared->modes; /* set capabilities and type */ description->caps = DLCAPS_SURFACE | DLCAPS_CONTRAST | DLCAPS_SATURATION | DLCAPS_BRIGHTNESS; description->type = DLTF_GRAPHICS; /* set name */ snprintf( description->name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "FBDev Primary Layer" ); /* fill out default color adjustment */ adjustment->flags = DCAF_BRIGHTNESS | DCAF_CONTRAST | DCAF_SATURATION; adjustment->brightness = 0x8000; adjustment->contrast = 0x8000; adjustment->saturation = 0x8000; /* fill out the default configuration */ config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->buffermode = DLBM_FRONTONLY; config->width = dfb_config->mode.width ? dfb_config->mode.width : default_mode->xres; config->height = dfb_config->mode.height ? dfb_config->mode.height : default_mode->yres; if (dfb_config->mode.format) config->pixelformat = dfb_config->mode.format; else config->pixelformat = dfb_pixelformat_for_depth( default_mode->bpp ); return DFB_OK; } static DFBResult primarySetColorAdjustment( CoreLayer *layer, void *driver_data, void *layer_data, DFBColorAdjustment *adjustment ) { struct fb_cmap *cmap = &dfb_fbdev->shared->current_cmap; struct fb_cmap *temp = &dfb_fbdev->shared->temp_cmap; int contrast = adjustment->contrast >> 8; int brightness = (adjustment->brightness >> 8) - 128; int saturation = adjustment->saturation >> 8; int r, g, b, i; D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); if (dfb_fbdev->shared->fix.visual != FB_VISUAL_DIRECTCOLOR) return DFB_UNIMPLEMENTED; /* Use gamma ramp to set color attributes */ for (i = 0; i < (int)cmap->len; i++) { r = cmap->red[i]; g = cmap->green[i]; b = cmap->blue[i]; r >>= 8; g >>= 8; b >>= 8; /* * Brightness Adjustment: Increase/Decrease each color channels * by a constant amount as specified by value of brightness. */ if (adjustment->flags & DCAF_BRIGHTNESS) { r += brightness; g += brightness; b += brightness; r = CLAMP( r, 0, 255 ); g = CLAMP( g, 0, 255 ); b = CLAMP( b, 0, 255 ); } /* * Contrast Adjustment: We increase/decrease the "separation" * between colors in proportion to the value specified by the * contrast control. Decreasing the contrast has a side effect * of decreasing the brightness. */ if (adjustment->flags & DCAF_CONTRAST) { /* Increase contrast */ if (contrast > 128) { int c = contrast - 128; r = ((r + c/2)/c) * c; g = ((g + c/2)/c) * c; b = ((b + c/2)/c) * c; } /* Decrease contrast */ else if (contrast < 127) { r = (r * contrast) >> 7; g = (g * contrast) >> 7; b = (b * contrast) >> 7; } r = CLAMP( r, 0, 255 ); g = CLAMP( g, 0, 255 ); b = CLAMP( b, 0, 255 ); } /* * Saturation Adjustment: This is is a better implementation. * Saturation is implemented by "mixing" a proportion of medium * gray to the color value. On the other side, "removing" * a proportion of medium gray oversaturates the color. */ if (adjustment->flags & DCAF_SATURATION) { if (saturation > 128) { int gray = saturation - 128; int color = 128 - gray; r = ((r - gray) << 7) / color; g = ((g - gray) << 7) / color; b = ((b - gray) << 7) / color; } else if (saturation < 128) { int color = saturation; int gray = 128 - color; r = ((r * color) >> 7) + gray; g = ((g * color) >> 7) + gray; b = ((b * color) >> 7) + gray; } r = CLAMP( r, 0, 255 ); g = CLAMP( g, 0, 255 ); b = CLAMP( b, 0, 255 ); } r |= r << 8; g |= g << 8; b |= b << 8; temp->red[i] = (unsigned short)r; temp->green[i] = (unsigned short)g; temp->blue[i] = (unsigned short)b; } temp->len = cmap->len; temp->start = cmap->start; if (FBDEV_IOCTL( FBIOPUTCMAP, temp ) < 0) { D_PERROR( "DirectFB/FBDev: Could not set the palette!\n" ); return errno2result(errno); } return DFB_OK; } const VideoMode * dfb_fbdev_find_mode( int width, int height ) { FBDevShared *shared = dfb_fbdev->shared; const VideoMode *videomode = shared->modes; const VideoMode *highest = NULL; D_DEBUG_AT( FBDev_Mode, "%s()\n", __FUNCTION__ ); while (videomode) { if (videomode->xres == width && videomode->yres == height) { if (!highest || highest->priority < videomode->priority) highest = videomode; } videomode = videomode->next; } if (!highest) D_ONCE( "no mode found for %dx%d", width, height ); return highest; } static DFBResult primaryTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *failed ) { FBDevShared *shared = dfb_fbdev->shared; CoreLayerRegionConfigFlags fail = CLRCF_NONE; VideoMode dummy; const VideoMode *mode; D_DEBUG_AT( FBDev_Primary, "%s( %dx%d, %s )\n", __FUNCTION__, config->source.w, config->source.h, dfb_pixelformat_name(config->format) ); mode = dfb_fbdev_find_mode( config->source.w, config->source.h ); if (!mode) { dummy = shared->current_mode; dummy.xres = config->source.w; dummy.yres = config->source.h; dummy.bpp = DFB_BITS_PER_PIXEL(config->format); mode = &dummy; } if (dfb_fbdev_test_mode( mode, config )) fail |= CLRCF_WIDTH | CLRCF_HEIGHT | CLRCF_FORMAT | CLRCF_BUFFERMODE; if (config->options) fail |= CLRCF_OPTIONS; if ((config->source.x && !shared->fix.xpanstep) || (config->source.y && !shared->fix.ypanstep && !shared->fix.ywrapstep)) fail |= CLRCF_SOURCE; if (failed) *failed = fail; if (fail) return DFB_UNSUPPORTED; return DFB_OK; } static DFBResult primaryAddRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config ) { D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primarySetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { DFBResult ret; FBDevShared *shared = dfb_fbdev->shared; D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); if (updated & (CLRCF_SOURCE | CLRCF_WIDTH | CLRCF_HEIGHT | CLRCF_FORMAT | CLRCF_BUFFERMODE)) { if (updated & (CLRCF_WIDTH | CLRCF_HEIGHT | CLRCF_FORMAT | CLRCF_BUFFERMODE) || config->source.w != shared->current_var.xres || config->source.h != shared->current_var.yres) { const VideoMode *mode; VideoMode dummy; D_INFO( "FBDev/Mode: Setting %dx%d %s\n", config->source.w, config->source.h, dfb_pixelformat_name( surface->config.format ) ); mode = dfb_fbdev_find_mode( config->source.w, config->source.h ); if (!mode) { dummy = shared->current_mode; dummy.xres = config->source.w; dummy.yres = config->source.h; dummy.bpp = DFB_BITS_PER_PIXEL(config->format); mode = &dummy; } ret = dfb_fbdev_set_mode( mode, surface, config->source.x, left_lock->offset / left_lock->pitch + config->source.y ); if (ret) return ret; } else { ret = dfb_fbdev_pan( config->source.x, left_lock->offset / left_lock->pitch + config->source.y, true ); if (ret) return ret; } } if ((updated & CLRCF_PALETTE) && palette) dfb_fbdev_set_palette( palette ); /* remember configuration */ shared->config = *config; return DFB_OK; } static DFBResult primaryRemoveRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ) { D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primaryFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { DFBResult ret; CoreLayerRegionConfig *config = &dfb_fbdev->shared->config; D_DEBUG_AT( FBDev_Primary, "%s()\n", __FUNCTION__ ); if (((flags & DSFLIP_WAITFORSYNC) == DSFLIP_WAITFORSYNC) && !dfb_config->pollvsync_after) dfb_screen_wait_vsync( dfb_screens_at(DSCID_PRIMARY) ); ret = dfb_fbdev_pan( config->source.x, left_lock->offset / left_lock->pitch + config->source.y, (flags & DSFLIP_WAITFORSYNC) == DSFLIP_ONSYNC ); if (ret) return ret; if ((flags & DSFLIP_WAIT) && (dfb_config->pollvsync_after || !(flags & DSFLIP_ONSYNC))) dfb_screen_wait_vsync( dfb_screens_at(DSCID_PRIMARY) ); dfb_surface_flip( surface, false ); return DFB_OK; } /** fbdev internal **/ static void dfb_fbdev_var_to_mode( const struct fb_var_screeninfo *var, VideoMode *mode ) { mode->xres = var->xres; mode->yres = var->yres; mode->bpp = var->bits_per_pixel; mode->hsync_len = var->hsync_len; mode->vsync_len = var->vsync_len; mode->left_margin = var->left_margin; mode->right_margin = var->right_margin; mode->upper_margin = var->upper_margin; mode->lower_margin = var->lower_margin; mode->pixclock = var->pixclock; mode->hsync_high = (var->sync & FB_SYNC_HOR_HIGH_ACT) ? 1 : 0; mode->vsync_high = (var->sync & FB_SYNC_VERT_HIGH_ACT) ? 1 : 0; mode->csync_high = (var->sync & FB_SYNC_COMP_HIGH_ACT) ? 1 : 0; mode->sync_on_green = (var->sync & FB_SYNC_ON_GREEN) ? 1 : 0; mode->external_sync = (var->sync & FB_SYNC_EXT) ? 1 : 0; mode->broadcast = (var->sync & FB_SYNC_BROADCAST) ? 1 : 0; mode->laced = (var->vmode & FB_VMODE_INTERLACED) ? 1 : 0; mode->doubled = (var->vmode & FB_VMODE_DOUBLE) ? 1 : 0; } /* * pans display (flips buffer) using fbdev ioctl */ static DFBResult dfb_fbdev_pan( int xoffset, int yoffset, bool onsync ) { // DFBResult ret; int result; struct fb_var_screeninfo *var; FBDevShared *shared = dfb_fbdev->shared; if (!shared->fix.xpanstep && !shared->fix.ypanstep && !shared->fix.ywrapstep) return DFB_OK; var = &shared->current_var; if (var->xres_virtual < xoffset + var->xres) { D_ERROR( "DirectFB/FBDev: xres %d, vxres %d, xoffset %d\n", var->xres, var->xres_virtual, xoffset ); D_BUG( "panning buffer out of range" ); return DFB_BUG; } if (var->yres_virtual < yoffset + var->yres) { D_ERROR( "DirectFB/FBDev: yres %d, vyres %d, offset %d\n", var->yres, var->yres_virtual, yoffset ); D_BUG( "panning buffer out of range" ); return DFB_BUG; } if (shared->fix.xpanstep) var->xoffset = xoffset - (xoffset % shared->fix.xpanstep); else var->xoffset = 0; if (shared->fix.ywrapstep) { var->yoffset = yoffset - (yoffset % shared->fix.ywrapstep); var->vmode |= FB_VMODE_YWRAP; } else if (shared->fix.ypanstep) { var->yoffset = yoffset - (yoffset % shared->fix.ypanstep); var->vmode &= ~FB_VMODE_YWRAP; } else { var->yoffset = 0; } var->activate = onsync ? FB_ACTIVATE_VBL : FB_ACTIVATE_NOW; #if 0 ret = fusion_call_execute( &shared->fbdev_ioctl, FCEF_NONE, FBIOPAN_DISPLAY, var, &result ); if (ret) return DFB_FUSION; if (result) { errno = result; #else if (ioctl( dfb_fbdev->fd, FBIOPAN_DISPLAY, var ) < 0) { result = errno; #endif D_PERROR( "DirectFB/FBDev: Panning display failed (x=%u y=%u ywrap=%d vbl=%d)!\n", var->xoffset, var->yoffset, (var->vmode & FB_VMODE_YWRAP) ? 1 : 0, (var->activate & FB_ACTIVATE_VBL) ? 1 : 0); return errno2result(result); } return DFB_OK; } /* * blanks display using fbdev ioctl */ static DFBResult dfb_fbdev_blank( int level ) { if (ioctl( dfb_fbdev->fd, FBIOBLANK, level ) < 0) { D_PERROR( "DirectFB/FBDev: Display blanking failed!\n" ); return errno2result( errno ); } return DFB_OK; } static DFBResult dfb_fbdev_mode_to_var( const VideoMode *mode, DFBSurfacePixelFormat pixelformat, unsigned int vxres, unsigned int vyres, unsigned int xoffset, unsigned int yoffset, DFBDisplayLayerBufferMode buffermode, struct fb_var_screeninfo *ret_var ) { struct fb_var_screeninfo var; FBDevShared *shared = dfb_fbdev->shared; D_DEBUG_AT( FBDev_Mode, "%s( mode: %p )\n", __FUNCTION__, mode ); D_ASSERT( mode != NULL ); D_ASSERT( ret_var != NULL ); D_DEBUG_AT( FBDev_Mode, " -> resolution %dx%d\n", mode->xres, mode->yres ); D_DEBUG_AT( FBDev_Mode, " -> virtual %dx%d\n", vxres, vyres ); D_DEBUG_AT( FBDev_Mode, " -> pixelformat %s\n", dfb_pixelformat_name(pixelformat) ); D_DEBUG_AT( FBDev_Mode, " -> buffermode %s\n", buffermode == DLBM_FRONTONLY ? "FRONTONLY" : buffermode == DLBM_BACKVIDEO ? "BACKVIDEO" : buffermode == DLBM_BACKSYSTEM ? "BACKSYSTEM" : buffermode == DLBM_TRIPLE ? "TRIPLE" : "invalid!" ); /* Start from current information */ var = shared->current_var; var.activate = FB_ACTIVATE_NOW; /* Set timings */ var.pixclock = mode->pixclock; var.left_margin = mode->left_margin; var.right_margin = mode->right_margin; var.upper_margin = mode->upper_margin; var.lower_margin = mode->lower_margin; var.hsync_len = mode->hsync_len; var.vsync_len = mode->vsync_len; /* Set resolution */ var.xres = mode->xres; var.yres = mode->yres; var.xres_virtual = vxres; var.yres_virtual = vyres; if (shared->fix.xpanstep) var.xoffset = xoffset - (xoffset % shared->fix.xpanstep); else var.xoffset = 0; if (shared->fix.ywrapstep) var.yoffset = yoffset - (yoffset % shared->fix.ywrapstep); else if (shared->fix.ypanstep) var.yoffset = yoffset - (yoffset % shared->fix.ypanstep); else var.yoffset = 0; /* Set buffer mode */ switch (buffermode) { case DLBM_TRIPLE: if (shared->fix.ypanstep == 0 && shared->fix.ywrapstep == 0) return DFB_UNSUPPORTED; var.yres_virtual *= 3; break; case DLBM_BACKVIDEO: if (shared->fix.ypanstep == 0 && shared->fix.ywrapstep == 0) return DFB_UNSUPPORTED; var.yres_virtual *= 2; break; case DLBM_BACKSYSTEM: case DLBM_FRONTONLY: break; default: return DFB_UNSUPPORTED; } /* Set pixel format */ var.bits_per_pixel = DFB_BITS_PER_PIXEL(pixelformat); var.transp.length = var.transp.offset = 0; switch (pixelformat) { case DSPF_ARGB1555: var.transp.length = 1; var.red.length = 5; var.green.length = 5; var.blue.length = 5; var.transp.offset = 15; var.red.offset = 10; var.green.offset = 5; var.blue.offset = 0; break; case DSPF_RGBA5551: var.transp.length = 1; var.red.length = 5; var.green.length = 5; var.blue.length = 5; var.red.offset = 11; var.green.offset = 6; var.blue.offset = 1; var.transp.offset = 0; break; case DSPF_RGB555: var.red.length = 5; var.green.length = 5; var.blue.length = 5; var.red.offset = 10; var.green.offset = 5; var.blue.offset = 0; break; case DSPF_BGR555: var.red.length = 5; var.green.length = 5; var.blue.length = 5; var.red.offset = 0; var.green.offset = 5; var.blue.offset = 10; break; case DSPF_ARGB4444: var.transp.length = 4; var.red.length = 4; var.green.length = 4; var.blue.length = 4; var.transp.offset = 12; var.red.offset = 8; var.green.offset = 4; var.blue.offset = 0; break; case DSPF_RGBA4444: var.transp.length = 4; var.red.length = 4; var.green.length = 4; var.blue.length = 4; var.transp.offset = 0; var.red.offset = 12; var.green.offset = 8; var.blue.offset = 4; break; case DSPF_RGB444: var.red.length = 4; var.green.length = 4; var.blue.length = 4; var.red.offset = 8; var.green.offset = 4; var.blue.offset = 0; break; case DSPF_RGB32: var.red.length = 8; var.green.length = 8; var.blue.length = 8; var.red.offset = 16; var.green.offset = 8; var.blue.offset = 0; break; case DSPF_ARGB8565: var.transp.length = 8; var.transp.offset = 16; /* fall through */ case DSPF_RGB16: var.red.length = 5; var.green.length = 6; var.blue.length = 5; var.red.offset = 11; var.green.offset = 5; var.blue.offset = 0; break; case DSPF_ARGB: case DSPF_AiRGB: var.transp.length = 8; var.red.length = 8; var.green.length = 8; var.blue.length = 8; var.transp.offset = 24; var.red.offset = 16; var.green.offset = 8; var.blue.offset = 0; break; case DSPF_ABGR: var.transp.length = 8; var.red.length = 8; var.green.length = 8; var.blue.length = 8; var.transp.offset = 24; var.red.offset = 0; var.green.offset = 8; var.blue.offset = 16; break; case DSPF_LUT8: case DSPF_RGB24: case DSPF_RGB332: break; case DSPF_ARGB1666: var.transp.length = 1; var.red.length = 6; var.green.length = 6; var.blue.length = 6; var.transp.offset = 18; var.red.offset = 12; var.green.offset = 6; var.blue.offset = 0; break; case DSPF_ARGB6666: var.transp.length = 6; var.red.length = 6; var.green.length = 6; var.blue.length = 6; var.transp.offset = 18; var.red.offset = 12; var.green.offset = 6; var.blue.offset = 0; break; case DSPF_RGB18: var.red.length = 6; var.green.length = 6; var.blue.length = 6; var.red.offset = 12; var.green.offset = 6; var.blue.offset = 0; break; case DSPF_RGBAF88871: var.transp.length = 7; var.red.length = 8; var.green.length = 8; var.blue.length = 8; var.transp.offset = 1; var.red.offset = 24; var.green.offset = 16; var.blue.offset = 8; break; default: return DFB_UNSUPPORTED; } /* Set sync options */ var.sync = 0; if (mode->hsync_high) var.sync |= FB_SYNC_HOR_HIGH_ACT; if (mode->vsync_high) var.sync |= FB_SYNC_VERT_HIGH_ACT; if (mode->csync_high) var.sync |= FB_SYNC_COMP_HIGH_ACT; if (mode->sync_on_green) var.sync |= FB_SYNC_ON_GREEN; if (mode->external_sync) var.sync |= FB_SYNC_EXT; if (mode->broadcast) var.sync |= FB_SYNC_BROADCAST; /* Set interlace/linedouble */ var.vmode = 0; if (mode->laced) var.vmode |= FB_VMODE_INTERLACED; if (mode->doubled) var.vmode |= FB_VMODE_DOUBLE; *ret_var = var; return DFB_OK; } static DFBResult dfb_fbdev_test_mode( const VideoMode *mode, const CoreLayerRegionConfig *config ) { DFBResult ret; struct fb_var_screeninfo var; unsigned int need_mem; FBDevShared *shared = dfb_fbdev->shared; const DFBRectangle *source = &config->source; D_DEBUG_AT( FBDev_Mode, "%s( mode: %p, config: %p )\n", __FUNCTION__, mode, config ); D_ASSERT( mode != NULL ); D_ASSERT( config != NULL ); /* Is panning supported? */ if (source->w != mode->xres && shared->fix.xpanstep == 0) return DFB_UNSUPPORTED; if (source->h != mode->yres && shared->fix.ypanstep == 0 && shared->fix.ywrapstep == 0) return DFB_UNSUPPORTED; ret = dfb_fbdev_mode_to_var( mode, config->format, config->width, config->height, 0, 0, config->buffermode, &var ); if (ret) return ret; need_mem = DFB_BYTES_PER_LINE( config->format, var.xres_virtual ) * DFB_PLANE_MULTIPLY( config->format, var.yres_virtual ); if (shared->fix.smem_len < need_mem) { D_DEBUG_AT( FBDev_Mode, " => not enough framebuffer memory (%u < %u)!\n", shared->fix.smem_len, need_mem ); return DFB_LIMITEXCEEDED; } /* Enable test mode */ var.activate = FB_ACTIVATE_TEST; dfb_gfxcard_lock( GDLF_WAIT | GDLF_SYNC | GDLF_RESET | GDLF_INVALIDATE ); if (FBDEV_IOCTL( FBIOPUT_VSCREENINFO, &var ) < 0) { int erno = errno; dfb_gfxcard_unlock(); D_DEBUG_AT( FBDev_Mode, " => FAILED!\n" ); return errno2result( erno ); } dfb_gfxcard_unlock(); D_DEBUG_AT( FBDev_Mode, " => SUCCESS\n" ); return DFB_OK; } static DFBResult dfb_fbdev_test_mode_simple( const VideoMode *mode ) { DFBResult ret; struct fb_var_screeninfo var; D_DEBUG_AT( FBDev_Mode, "%s( mode: %p )\n", __FUNCTION__, mode ); D_ASSERT( mode != NULL ); ret = dfb_fbdev_mode_to_var( mode, dfb_pixelformat_for_depth(mode->bpp), mode->xres, mode->yres, 0, 0, DLBM_FRONTONLY, &var ); if (ret) return ret; /* Enable test mode */ var.activate = FB_ACTIVATE_TEST; if (FBDEV_IOCTL( FBIOPUT_VSCREENINFO, &var ) < 0) { D_DEBUG_AT( FBDev_Mode, " => FAILED!\n" ); return errno2result( errno ); } D_DEBUG_AT( FBDev_Mode, " => SUCCESS\n" ); return DFB_OK; } static inline int num_video_buffers( CoreSurface *surface ) { int i; for (i = 0; i < surface->num_buffers; i++) { if (surface->buffers[i]->policy == CSP_SYSTEMONLY) break; } return i; } static DFBResult dfb_fbdev_set_mode( const VideoMode *mode, CoreSurface *surface, unsigned int xoffset, unsigned int yoffset ) { DFBResult ret; int bufs; struct fb_var_screeninfo var; struct fb_var_screeninfo var2; FBDevShared *shared = dfb_fbdev->shared; DFBDisplayLayerBufferMode buffermode = DLBM_FRONTONLY; const CoreSurfaceConfig *config = &surface->config; D_DEBUG_AT( FBDev_Mode, "%s( mode: %p, config: %p )\n", __FUNCTION__, mode, config ); D_ASSERT( mode != NULL ); D_ASSERT( config != NULL ); bufs = num_video_buffers( surface ); switch (bufs) { case 3: buffermode = DLBM_TRIPLE; break; case 2: buffermode = DLBM_BACKVIDEO; break; case 1: buffermode = DLBM_FRONTONLY; break; default: D_BUG( "dfb_fbdev_set_mode() called with %d video buffers!", bufs ); return DFB_BUG; } ret = dfb_fbdev_mode_to_var( mode, config->format, config->size.w, config->size.h, xoffset, yoffset, buffermode, &var ); if (ret) { D_ERROR( "FBDev/Mode: Failed to switch to %dx%d %s (buffermode %d)\n", config->size.w, config->size.h, dfb_pixelformat_name(config->format), buffermode ); return ret; } dfb_gfxcard_lock( GDLF_WAIT | GDLF_SYNC | GDLF_RESET | GDLF_INVALIDATE ); if (FBDEV_IOCTL( FBIOPUT_VSCREENINFO, &var )) { D_DEBUG_AT( FBDev_Mode, " => FBIOPUT_VSCREENINFO failed!\n" ); ret = errno2result( errno ); goto error; } if (FBDEV_IOCTL( FBIOGET_VSCREENINFO, &var2 )) { D_DEBUG_AT( FBDev_Mode, " => FBIOGET_VSCREENINFO failed!\n" ); ret = errno2result( errno ); goto error; } if (var.xres != var2.xres || var.xres_virtual != var2.xres_virtual || var.yres != var2.yres || var.yres_virtual != var2.yres_virtual) { D_DEBUG_AT( FBDev_Mode, " => read back mismatch! (%dx%d [%dx%d] should be %dx%d [%dx%d])\n", var2.xres, var2.yres, var2.xres_virtual, var2.yres_virtual, var.xres, var.yres, var.xres_virtual, var.yres_virtual ); ret = DFB_IO; goto error; } D_DEBUG_AT( FBDev_Mode, " => SUCCESS\n" ); shared->current_var = var; dfb_fbdev_var_to_mode( &var, &shared->current_mode ); /* To get the new pitch */ FBDEV_IOCTL( FBIOGET_FSCREENINFO, &shared->fix ); D_INFO( "FBDev/Mode: Switched to %dx%d (virtual %dx%d) at %d bit (%s), pitch %d\n", var.xres, var.yres, var.xres_virtual, var.yres_virtual, var.bits_per_pixel, dfb_pixelformat_name(config->format), shared->fix.line_length ); if (config->format == DSPF_RGB332) dfb_fbdev_set_rgb332_palette(); else dfb_fbdev_set_gamma_ramp( config->format ); /* invalidate original pan offset */ shared->orig_var.xoffset = 0; shared->orig_var.yoffset = 0; dfb_surfacemanager_adjust_heap_offset( dfb_fbdev->shared->manager, var.yres_virtual * shared->fix.line_length ); dfb_gfxcard_after_set_var(); dfb_gfxcard_unlock(); return DFB_OK; error: dfb_gfxcard_unlock(); D_ERROR( "FBDev/Mode: Failed to switched to %dx%d (virtual %dx%d) at %d bit (%s)!\n", var.xres, var.yres, var.xres_virtual, var.yres_virtual, var.bits_per_pixel, dfb_pixelformat_name(config->format) ); return ret; } /* * parses video modes in /etc/fb.modes and stores them in dfb_fbdev->shared->modes * (to be replaced by DirectFB's own config system */ static DFBResult dfb_fbdev_read_modes( void ) { FILE *fp; char line[80],label[32],value[16]; int geometry=0, timings=0; int dummy; VideoMode temp_mode; FBDevShared *shared = dfb_fbdev->shared; VideoMode *prev = shared->modes; D_DEBUG_AT( FBDev_Mode, "%s()\n", __FUNCTION__ ); if (!(fp = fopen("/etc/fb.modes","r"))) return errno2result( errno ); while (fgets(line,79,fp)) { if (sscanf(line, "mode \"%31[^\"]\"",label) == 1) { memset( &temp_mode, 0, sizeof(VideoMode) ); geometry = 0; timings = 0; while (fgets(line,79,fp) && !(strstr(line,"endmode"))) { if (5 == sscanf(line," geometry %d %d %d %d %d", &temp_mode.xres, &temp_mode.yres, &dummy, &dummy, &temp_mode.bpp)) { geometry = 1; } else if (7 == sscanf(line," timings %d %d %d %d %d %d %d", &temp_mode.pixclock, &temp_mode.left_margin, &temp_mode.right_margin, &temp_mode.upper_margin, &temp_mode.lower_margin, &temp_mode.hsync_len, &temp_mode.vsync_len)) { timings = 1; } else if (1 == sscanf(line, " hsync %15s",value) && 0 == strcasecmp(value,"high")) { temp_mode.hsync_high = 1; } else if (1 == sscanf(line, " vsync %15s",value) && 0 == strcasecmp(value,"high")) { temp_mode.vsync_high = 1; } else if (1 == sscanf(line, " csync %15s",value) && 0 == strcasecmp(value,"high")) { temp_mode.csync_high = 1; } else if (1 == sscanf(line, " laced %15s",value) && 0 == strcasecmp(value,"true")) { temp_mode.laced = 1; } else if (1 == sscanf(line, " double %15s",value) && 0 == strcasecmp(value,"true")) { temp_mode.doubled = 1; } else if (1 == sscanf(line, " gsync %15s",value) && 0 == strcasecmp(value,"true")) { temp_mode.sync_on_green = 1; } else if (1 == sscanf(line, " extsync %15s",value) && 0 == strcasecmp(value,"true")) { temp_mode.external_sync = 1; } else if (1 == sscanf(line, " bcast %15s",value) && 0 == strcasecmp(value,"true")) { temp_mode.broadcast = 1; } } if (geometry && timings && !dfb_fbdev_test_mode_simple(&temp_mode)) { VideoMode *mode = SHCALLOC( shared->shmpool, 1, sizeof(VideoMode) ); if (!mode) { D_OOSHM(); continue; } if (!prev) shared->modes = mode; else prev->next = mode; direct_memcpy (mode, &temp_mode, sizeof(VideoMode)); prev = mode; D_DEBUG_AT( FBDev_Mode, " +-> %16s %4dx%4d %s%s\n", label, temp_mode.xres, temp_mode.yres, temp_mode.laced ? "interlaced " : "", temp_mode.doubled ? "doublescan" : "" ); } } } fclose (fp); return DFB_OK; } /* * some fbdev drivers use the palette as gamma ramp in >8bpp modes, to have * correct colors, the gamme ramp has to be initialized. */ static u16 dfb_fbdev_calc_gamma(int n, int max) { int ret = 65535 * n / max; return CLAMP( ret, 0, 65535 ); } static DFBResult dfb_fbdev_set_gamma_ramp( DFBSurfacePixelFormat format ) { int i; int red_size = 0; int green_size = 0; int blue_size = 0; int red_max = 0; int green_max = 0; int blue_max = 0; struct fb_cmap *cmap; D_DEBUG_AT( FBDev_Mode, "%s()\n", __FUNCTION__ ); if (!dfb_fbdev) { D_BUG( "dfb_fbdev_set_gamma_ramp() called while dfb_fbdev == NULL!" ); return DFB_BUG; } switch (format) { case DSPF_ARGB1555: case DSPF_RGBA5551: case DSPF_RGB555: case DSPF_BGR555: red_size = 32; green_size = 32; blue_size = 32; break; case DSPF_ARGB4444: case DSPF_RGBA4444: case DSPF_RGB444: red_size = 16; green_size = 16; blue_size = 16; break; case DSPF_RGB16: case DSPF_ARGB8565: red_size = 32; green_size = 64; blue_size = 32; break; case DSPF_RGB24: case DSPF_RGB32: case DSPF_ARGB: case DSPF_ABGR: case DSPF_RGBAF88871: red_size = 256; green_size = 256; blue_size = 256; break; default: return DFB_OK; } /* * ++Tony: The gamma ramp must be set differently if in DirectColor, * ie, to mimic TrueColor, index == color[index]. */ if (dfb_fbdev->shared->fix.visual == FB_VISUAL_DIRECTCOLOR) { red_max = 65536 / (256/red_size); green_max = 65536 / (256/green_size); blue_max = 65536 / (256/blue_size); } else { red_max = red_size; green_max = green_size; blue_max = blue_size; } cmap = &dfb_fbdev->shared->current_cmap; /* assume green to have most weight */ cmap->len = green_size; for (i = 0; i < red_size; i++) cmap->red[i] = dfb_fbdev_calc_gamma( i, red_max ); for (i = 0; i < green_size; i++) cmap->green[i] = dfb_fbdev_calc_gamma( i, green_max ); for (i = 0; i < blue_size; i++) cmap->blue[i] = dfb_fbdev_calc_gamma( i, blue_max ); /* ++Tony: Some drivers use the upper byte, some use the lower */ if (dfb_fbdev->shared->fix.visual == FB_VISUAL_DIRECTCOLOR) { for (i = 0; i < red_size; i++) cmap->red[i] |= cmap->red[i] << 8; for (i = 0; i < green_size; i++) cmap->green[i] |= cmap->green[i] << 8; for (i = 0; i < blue_size; i++) cmap->blue[i] |= cmap->blue[i] << 8; } if (FBDEV_IOCTL( FBIOPUTCMAP, cmap ) < 0) { D_PERROR( "DirectFB/FBDev: " "Could not set gamma ramp" ); return errno2result(errno); } return DFB_OK; } static DFBResult dfb_fbdev_set_palette( CorePalette *palette ) { int i; struct fb_cmap *cmap = &dfb_fbdev->shared->current_cmap; D_ASSERT( palette != NULL ); cmap->len = palette->num_entries <= 256 ? palette->num_entries : 256; for (i = 0; i < (int)cmap->len; i++) { cmap->red[i] = palette->entries[i].r; cmap->green[i] = palette->entries[i].g; cmap->blue[i] = palette->entries[i].b; cmap->transp[i] = 0xff - palette->entries[i].a; cmap->red[i] |= cmap->red[i] << 8; cmap->green[i] |= cmap->green[i] << 8; cmap->blue[i] |= cmap->blue[i] << 8; cmap->transp[i] |= cmap->transp[i] << 8; } if (FBDEV_IOCTL( FBIOPUTCMAP, cmap ) < 0) { D_PERROR( "DirectFB/FBDev: Could not set the palette!\n" ); return errno2result(errno); } return DFB_OK; } static DFBResult dfb_fbdev_set_rgb332_palette( void ) { DFBResult ret = DFB_OK; int red_val; int green_val; int blue_val; int i = 0; FusionSHMPoolShared *pool = dfb_fbdev->shared->shmpool_data; struct fb_cmap cmap; if (!dfb_fbdev) { D_BUG( "dfb_fbdev_set_rgb332_palette() called while dfb_fbdev == NULL!" ); return DFB_BUG; } cmap.start = 0; cmap.len = 256; cmap.red = (u16*)SHMALLOC( pool, 2 * 256 ); if (!cmap.red) { return D_OOSHM(); } cmap.green = (u16*)SHMALLOC( pool, 2 * 256 ); if (!cmap.green) { ret = D_OOSHM(); goto free_red; } cmap.blue = (u16*)SHMALLOC( pool, 2 * 256 ); if (!cmap.blue) { ret = D_OOSHM(); goto free_green; } cmap.transp = (u16*)SHMALLOC( pool, 2 * 256 ); if (!cmap.transp) { ret = D_OOSHM(); goto free_blue; } for (red_val = 0; red_val < 8 ; red_val++) { for (green_val = 0; green_val < 8 ; green_val++) { for (blue_val = 0; blue_val < 4 ; blue_val++) { cmap.red[i] = dfb_fbdev_calc_gamma( red_val, 7 ); cmap.green[i] = dfb_fbdev_calc_gamma( green_val, 7 ); cmap.blue[i] = dfb_fbdev_calc_gamma( blue_val, 3 ); cmap.transp[i] = (i ? 0x2000 : 0xffff); i++; } } } if (FBDEV_IOCTL( FBIOPUTCMAP, &cmap ) < 0) { D_PERROR( "DirectFB/FBDev: " "Could not set rgb332 palette" ); ret = errno2result(errno); goto free_transp; } free_transp: SHFREE( pool, cmap.transp ); free_blue: SHFREE( pool, cmap.blue ); free_green: SHFREE( pool, cmap.green ); free_red: SHFREE( pool, cmap.red ); return ret; } static FusionCallHandlerResult fbdev_ioctl_call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { int ret; int res; const char cursoroff_str[] = "\033[?1;0;0c"; const char blankoff_str[] = "\033[9;0]"; if (dfb_config->vt && !dfb_config->kd_graphics && call_arg == FBIOPUT_VSCREENINFO) ioctl( dfb_fbdev->vt->fd, KDSETMODE, KD_GRAPHICS ); ret = ioctl( dfb_fbdev->fd, call_arg, call_ptr ); if (ret) ret = errno; if (dfb_config->vt && !dfb_config->kd_graphics && call_arg == FBIOPUT_VSCREENINFO) { ioctl( dfb_fbdev->vt->fd, KDSETMODE, KD_TEXT ); res = write( dfb_fbdev->vt->fd, cursoroff_str, strlen(cursoroff_str) ); res = write( dfb_fbdev->vt->fd, blankoff_str, strlen(blankoff_str) ); (void)res; } *ret_val = ret; return FCHR_RETURN; } static int fbdev_ioctl( int request, void *arg, int arg_size ) { int ret; int erno; void *tmp_shm = NULL; FBDevShared *shared; D_ASSERT( dfb_fbdev != NULL ); shared = dfb_fbdev->shared; D_ASSERT( shared != NULL ); if (dfb_core_is_master( dfb_fbdev->core )) { fbdev_ioctl_call_handler( 1, request, arg, NULL, 0, &ret ); errno = ret; return errno ? -1 : 0; } if (arg) { if (!fusion_is_shared( dfb_core_world(dfb_fbdev->core), arg )) { tmp_shm = SHMALLOC( shared->shmpool, arg_size ); if (!tmp_shm) { errno = ENOMEM; return -1; } direct_memcpy( tmp_shm, arg, arg_size ); } } ret = fusion_call_execute( &shared->fbdev_ioctl, FCEF_NONE, request, tmp_shm ? tmp_shm : arg, &erno ); if (tmp_shm) { direct_memcpy( arg, tmp_shm, arg_size ); SHFREE( shared->shmpool, tmp_shm ); } errno = erno; return errno ? -1 : 0; } DirectFB-1.7.7/systems/fbdev/fbdev_surface_pool.c0000644000175000017500000003244612254435330016673 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include "fbdev.h" #include "surfacemanager.h" extern FBDev *dfb_fbdev; D_DEBUG_DOMAIN( FBDev_Surfaces, "FBDev/Surfaces", "FBDev Framebuffer Surface Pool" ); D_DEBUG_DOMAIN( FBDev_SurfLock, "FBDev/SurfLock", "FBDev Framebuffer Surface Pool Locks" ); /**********************************************************************************************************************/ typedef struct { int magic; SurfaceManager *manager; } FBDevPoolData; typedef struct { int magic; CoreDFB *core; } FBDevPoolLocalData; typedef struct { int magic; Chunk *chunk; } FBDevAllocationData; /**********************************************************************************************************************/ static int fbdevPoolDataSize( void ) { return sizeof(FBDevPoolData); } static int fbdevPoolLocalDataSize( void ) { return sizeof(FBDevPoolLocalData); } static int fbdevAllocationDataSize( void ) { return sizeof(FBDevAllocationData); } static DFBResult fbdevInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { DFBResult ret; FBDevPoolData *data = pool_data; FBDevPoolLocalData *local = pool_local; D_DEBUG_AT( FBDev_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( data != NULL ); D_ASSERT( local != NULL ); D_ASSERT( ret_desc != NULL ); ret = dfb_surfacemanager_create( core, dfb_fbdev->shared->fix.smem_len, &data->manager ); if (ret) return ret; ret_desc->caps = CSPCAPS_PHYSICAL | CSPCAPS_VIRTUAL; ret_desc->access[CSAID_CPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_DEFAULT; /* For hardware layers */ ret_desc->access[CSAID_LAYER0] = CSAF_READ; ret_desc->access[CSAID_LAYER1] = CSAF_READ; ret_desc->access[CSAID_LAYER2] = CSAF_READ; ret_desc->access[CSAID_LAYER3] = CSAF_READ; ret_desc->access[CSAID_LAYER4] = CSAF_READ; ret_desc->access[CSAID_LAYER5] = CSAF_READ; ret_desc->access[CSAID_LAYER6] = CSAF_READ; ret_desc->access[CSAID_LAYER7] = CSAF_READ; ret_desc->access[CSAID_LAYER8] = CSAF_READ; ret_desc->access[CSAID_LAYER9] = CSAF_READ; ret_desc->access[CSAID_LAYER10] = CSAF_READ; ret_desc->access[CSAID_LAYER11] = CSAF_READ; ret_desc->access[CSAID_LAYER12] = CSAF_READ; ret_desc->access[CSAID_LAYER13] = CSAF_READ; ret_desc->access[CSAID_LAYER14] = CSAF_READ; ret_desc->access[CSAID_LAYER15] = CSAF_READ; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "Frame Buffer Memory" ); local->core = core; D_MAGIC_SET( data, FBDevPoolData ); D_MAGIC_SET( local, FBDevPoolLocalData ); D_ASSERT( dfb_fbdev != NULL ); D_ASSERT( dfb_fbdev->shared != NULL ); dfb_fbdev->shared->manager = data->manager; return DFB_OK; } static DFBResult fbdevJoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { FBDevPoolData *data = pool_data; FBDevPoolLocalData *local = pool_local; D_DEBUG_AT( FBDev_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBDevPoolData ); D_ASSERT( local != NULL ); (void) data; local->core = core; D_MAGIC_SET( local, FBDevPoolLocalData ); return DFB_OK; } static DFBResult fbdevDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { FBDevPoolData *data = pool_data; FBDevPoolLocalData *local = pool_local; D_DEBUG_AT( FBDev_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBDevPoolData ); D_MAGIC_ASSERT( local, FBDevPoolLocalData ); dfb_surfacemanager_destroy( data->manager ); D_MAGIC_CLEAR( data ); D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult fbdevLeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { FBDevPoolData *data = pool_data; FBDevPoolLocalData *local = pool_local; D_DEBUG_AT( FBDev_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBDevPoolData ); D_MAGIC_ASSERT( local, FBDevPoolLocalData ); (void) data; D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult fbdevTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { DFBResult ret; CoreSurface *surface; FBDevPoolData *data = pool_data; FBDevPoolLocalData *local = pool_local; D_DEBUG_AT( FBDev_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBDevPoolData ); D_MAGIC_ASSERT( local, FBDevPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if ((surface->type & CSTF_LAYER) && surface->resource_id == DLID_PRIMARY) return DFB_OK; ret = dfb_surfacemanager_allocate( local->core, data->manager, buffer, NULL, NULL ); D_DEBUG_AT( FBDev_Surfaces, " -> %s\n", DirectFBErrorString(ret) ); return ret; } static DFBResult fbdevAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { DFBResult ret; CoreSurface *surface; FBDevPoolData *data = pool_data; FBDevPoolLocalData *local = pool_local; FBDevAllocationData *alloc = alloc_data; D_DEBUG_AT( FBDev_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBDevPoolData ); D_MAGIC_ASSERT( local, FBDevPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (surface->type & CSTF_LAYER && surface->resource_id == DLID_PRIMARY) { D_DEBUG_AT( FBDev_Surfaces, " -> primary layer buffer (index %d)\n", dfb_surface_buffer_index( buffer ) ); dfb_surface_calc_buffer_size( surface, 8, 1, NULL, &allocation->size ); } else { ret = dfb_surfacemanager_allocate( local->core, data->manager, buffer, allocation, &alloc->chunk ); if (ret) return ret; D_MAGIC_ASSERT( alloc->chunk, Chunk ); allocation->offset = alloc->chunk->offset; allocation->size = alloc->chunk->length; } D_MAGIC_SET( alloc, FBDevAllocationData ); return DFB_OK; } static DFBResult fbdevDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { FBDevPoolData *data = pool_data; FBDevAllocationData *alloc = alloc_data; D_DEBUG_AT( FBDev_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBDevPoolData ); D_MAGIC_ASSERT( alloc, FBDevAllocationData ); if (alloc->chunk) dfb_surfacemanager_deallocate( data->manager, alloc->chunk ); D_MAGIC_CLEAR( alloc ); return DFB_OK; } static DFBResult fbdevMuckOut( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer ) { FBDevPoolData *data = pool_data; FBDevPoolLocalData *local = pool_local; D_DEBUG_AT( FBDev_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBDevPoolData ); D_MAGIC_ASSERT( local, FBDevPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); return dfb_surfacemanager_displace( local->core, data->manager, buffer ); } static DFBResult fbdevLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { FBDevAllocationData *alloc = alloc_data; FBDevShared *shared = dfb_fbdev->shared; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, FBDevAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( FBDev_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); if (allocation->type & CSTF_LAYER && allocation->resource_id == DLID_PRIMARY) { int index = allocation->index; D_DEBUG_AT( FBDev_Surfaces, " -> primary layer buffer (index %d)\n", index ); lock->pitch = shared->fix.line_length; lock->offset = index * allocation->config.size.h * lock->pitch; #if D_DEBUG_ENABLED allocation->offset = lock->offset; #endif } else { D_MAGIC_ASSERT( alloc->chunk, Chunk ); lock->pitch = alloc->chunk->pitch; lock->offset = alloc->chunk->offset; } lock->addr = dfb_fbdev->framebuffer_base + lock->offset; lock->phys = dfb_fbdev->shared->fix.smem_start + lock->offset; D_DEBUG_AT( FBDev_SurfLock, " -> offset %lu, pitch %d, addr %p, phys 0x%08lx\n", lock->offset, lock->pitch, lock->addr, lock->phys ); return DFB_OK; } static DFBResult fbdevUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { FBDevAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, FBDevAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( FBDev_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); (void) alloc; return DFB_OK; } const SurfacePoolFuncs fbdevSurfacePoolFuncs = { .PoolDataSize = fbdevPoolDataSize, .PoolLocalDataSize = fbdevPoolLocalDataSize, .AllocationDataSize = fbdevAllocationDataSize, .InitPool = fbdevInitPool, .JoinPool = fbdevJoinPool, .DestroyPool = fbdevDestroyPool, .LeavePool = fbdevLeavePool, .TestConfig = fbdevTestConfig, .AllocateBuffer = fbdevAllocateBuffer, .DeallocateBuffer = fbdevDeallocateBuffer, .MuckOut = fbdevMuckOut, .Lock = fbdevLock, .Unlock = fbdevUnlock, }; DirectFB-1.7.7/systems/fbdev/agp.c0000644000175000017500000003026512254435330013610 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include /* Needs to be included before dfb_types.h */ #include #include #include #include #include #include #include #include #include #include #include "fbdev.h" #include "agp.h" #define PAGE_SIZE direct_pagesize() /*****************************************************************************/ extern FBDev *dfb_fbdev; static AGPDevice *dfb_agp = NULL; /*****************************************************************************/ static DFBResult dfb_agp_info( agp_info *info ) { D_ASSERT( info != NULL ); if (ioctl( dfb_agp->fd, AGPIOC_INFO, info )) { D_PERROR( "DirectFB/FBDev/agp: Could not get AGP info!\n" ); return errno2result( errno ); } return DFB_OK; } static DFBResult dfb_agp_setup( u32 mode ) { agp_setup setup; setup.agp_mode = mode; if (ioctl( dfb_agp->fd, AGPIOC_SETUP, &setup )) { D_PERROR( "DirectFB/FBDev/agp: AGP setup failed!\n" ); return errno2result( errno ); } return DFB_OK; } static DFBResult dfb_agp_acquire( void ) { if (ioctl( dfb_agp->fd, AGPIOC_ACQUIRE, 0 )) { D_PERROR( "DirectFB/FBDev/agp: Acquire failed!\n" ); return errno2result( errno ); } return DFB_OK; } static DFBResult dfb_agp_release( void ) { if (ioctl( dfb_agp->fd, AGPIOC_RELEASE, 0 )) { D_PERROR( "DirectFB/FBDev/agp: Release failed!\n" ); return errno2result( errno ); } return DFB_OK; } static DFBResult dfb_agp_allocate( unsigned long size, int *key ) { agp_allocate alloc; int pages; D_ASSERT( key != NULL ); pages = size / PAGE_SIZE; if (pages % PAGE_SIZE) pages++; if (pages == 0) { D_BUG( "attempted to allocate 0 pages!"); return DFB_BUG; } alloc.pg_count = pages; alloc.type = 0; if (ioctl( dfb_agp->fd, AGPIOC_ALLOCATE, &alloc )) { D_PERROR( "DirectFB/FBDev/agp: " "Could not allocate %d pages!\n", pages ); return errno2result( errno ); } *key = alloc.key; return DFB_OK; } static DFBResult dfb_agp_deallocate( int key ) { if (ioctl( dfb_agp->fd, AGPIOC_DEALLOCATE, key )) { D_PERROR( "DirectFB/FBDev/agp: " "Deallocate failed (key = %d)!\n", key ); return errno2result( errno ); } return DFB_OK; } static DFBResult dfb_agp_bind( unsigned int offset, int key ) { agp_bind bind; if (offset % PAGE_SIZE) { D_BUG( "offset is not page-aligned!" ); return DFB_BUG; } bind.pg_start = offset / PAGE_SIZE; bind.key = key; if (ioctl( dfb_agp->fd, AGPIOC_BIND, &bind )) { D_PERROR( "DirectFB/FBDev/agp: " "Bind failed (key = %d, offset = 0x%x)!\n", key, offset ); return errno2result( errno ); } return DFB_OK; } static DFBResult dfb_agp_unbind( int key ) { agp_unbind unbind; unbind.priority = 0; unbind.key = key; if (ioctl( dfb_agp->fd, AGPIOC_UNBIND, &unbind )) { D_PERROR( "DirectFB/FBDev/agp: " "Unbind failed (key = %d)!\n", key ); return errno2result( errno ); } return DFB_OK; } /*****************************************************************************/ static inline u16 pci_read_word( int fd, int pos ) { u8 b[2]; if (pread( fd, b, 2, pos ) < 2) return 0; return b[0] | (b[1] << 8); } static inline u8 pci_read_byte( int fd, int pos ) { u8 b; if (pread( fd, &b, 1, pos ) < 1) return 0; return b; } #define PCI_STATUS 0x06 #define PCI_STATUS_CAP_LIST 0x10 #define PCI_CAPABILITY_LIST 0x34 #define PCI_CAP_ID_AGP 0x02 static bool dfb_agp_capable( int bus, int dev, int func ) { bool found = false; char path[22]; int fd; /* XXX: the following detection method requires suid root */ snprintf( path, sizeof(path), "/proc/bus/pci/%02x/%02x.%01x", bus, dev, func ); fd = open( path, O_RDONLY | O_SYNC ); if (fd < 0) { D_PERROR( "DirectFB/FBDev/agp: " "Couldn't open '%s'!\n", path ); return false; } /* stolen from linux/drivers/pci/pci.c */ if (pci_read_word( fd, PCI_STATUS ) & PCI_STATUS_CAP_LIST) { int pos, id; int ttl = 48; pos = pci_read_byte( fd, PCI_CAPABILITY_LIST ); while (ttl-- && pos >= 0x40) { pos &= ~3; id = pci_read_byte( fd, pos ); if (id == 0xff) break; if (id == PCI_CAP_ID_AGP) { found = true; break; } pos = pci_read_byte( fd, pos+1 ); } } close( fd ); return found; } /*****************************************************************************/ DFBResult dfb_agp_initialize( void ) { AGPShared *shared; unsigned int agp_avail; DFBResult ret = DFB_FAILURE; if (dfb_agp) { D_BUG( "dfb_agp_initialize() already called!" ); return DFB_BUG; } /* Precheck for AGP capable device. */ if (!dfb_agp_capable( dfb_fbdev->shared->pci.bus, dfb_fbdev->shared->pci.dev, dfb_fbdev->shared->pci.func )) return DFB_UNSUPPORTED; dfb_agp = D_CALLOC( 1, sizeof(AGPDevice) ); if (!dfb_agp) return D_OOM(); shared = SHCALLOC( dfb_fbdev->shared->shmpool, 1, sizeof(AGPShared) ); if (!shared) { D_ERROR( "DirectFB/FBDev/agp: Could not allocate shared memory!\n" ); ret = DFB_NOSHAREDMEMORY; goto error0; } dfb_agp->fd = direct_try_open( "/dev/agpgart", "/dev/misc/agpgart", O_RDWR, true ); if (dfb_agp->fd < 0) { ret = errno2result( errno ); D_ERROR( "DirectFB/FBDev/agp: Error opening AGP device!\n" ); goto error1; } ret = dfb_agp_acquire(); if (ret) goto error2; ret = dfb_agp_info( &shared->info ); if (ret) goto error2; D_DEBUG( "DirectFB/FBDev/agp: " "Bridge supports: AGP%s%s%s%s%s%s\n", shared->info.agp_mode & 0x001 ? " 1X" : "", shared->info.agp_mode & 0x002 ? " 2X" : "", shared->info.agp_mode & 0x004 ? " 4X" : "", shared->info.agp_mode & 0x008 ? " 8X" : "", shared->info.agp_mode & 0x200 ? ", SBA" : "", shared->info.agp_mode & 0x010 ? ", FW" : "" ); shared->info.agp_mode &= ~0xf; shared->info.agp_mode |= dfb_config->agp; shared->info.agp_mode |= dfb_config->agp - 1; ret = dfb_agp_setup( shared->info.agp_mode ); if (ret) goto error2; dfb_agp_info( &shared->info ); D_DEBUG( "DirectFB/FBDev/agp: " "AGP aperture at 0x%x (%zu MB)\n", (unsigned int)shared->info.aper_base, shared->info.aper_size ); agp_avail = (shared->info.pg_total - shared->info.pg_used) * PAGE_SIZE; if (agp_avail == 0) { D_ERROR( "DirectFB/FBDev/agp: No AGP memory available!\n" ); ret = DFB_INIT; goto error2; } shared->agp_mem = shared->info.aper_size << 20; if (shared->agp_mem > agp_avail) shared->agp_mem = agp_avail; ret = dfb_agp_allocate( shared->agp_mem, &shared->agp_key ); if (ret) goto error3; ret = dfb_agp_bind( shared->agp_key, 0 ); if (ret) goto error4; dfb_agp->base = mmap( NULL, shared->info.aper_size << 20, PROT_READ | PROT_WRITE, MAP_SHARED, dfb_agp->fd, 0 ); if (dfb_agp->base == MAP_FAILED) { D_PERROR( "DirectFB/FBDev/agp: Could not mmap the AGP aperture!\n" ); ret = DFB_INIT; goto error5; } dfb_agp_release(); dfb_fbdev->agp = dfb_agp; dfb_fbdev->shared->agp = shared; return DFB_OK; error5: dfb_agp_unbind( shared->agp_key ); error4: dfb_agp_deallocate( shared->agp_key ); error3: dfb_agp_release(); error2: close( dfb_agp->fd ); error1: SHFREE( dfb_fbdev->shared->shmpool, shared ); error0: D_FREE( dfb_agp ); dfb_agp = NULL; return ret; } DFBResult dfb_agp_join( void ) { AGPShared *shared; DFBResult ret = DFB_FAILURE; if (dfb_agp) { D_BUG( "dfb_agp_join() already called!" ); return DFB_BUG; } shared = dfb_fbdev->shared->agp; if (!shared) return DFB_OK; dfb_agp = D_CALLOC( 1, sizeof(AGPDevice) ); if (!dfb_agp) return D_OOM(); dfb_agp->fd = direct_try_open( "/dev/agpgart", "/dev/misc/agpgart", O_RDWR, true ); if (dfb_agp->fd < 0) { ret = errno2result( errno ); D_ERROR( "DirectFB/FBDev/agp: Error opening AGP device!\n" ); goto error0; } ret = dfb_agp_acquire(); if (ret) goto error1; dfb_agp->base = mmap( NULL, shared->info.aper_size << 20, PROT_READ | PROT_WRITE, MAP_SHARED, dfb_agp->fd, 0 ); if (dfb_agp->base == MAP_FAILED) { D_PERROR( "DirectFB/FBDev/agp: Could not mmap the AGP aperture!\n" ); ret = DFB_INIT; goto error2; } D_DEBUG( "DirectFB/FBDev/agp: AGP aperture mapped at %p\n", dfb_agp->base ); dfb_agp_release(); dfb_fbdev->agp = dfb_agp; return DFB_OK; error2: dfb_agp_release(); error1: close( dfb_agp->fd ); error0: D_FREE( dfb_agp ); dfb_agp = NULL; return ret; } DFBResult dfb_agp_shutdown( void ) { AGPShared *shared; if (!dfb_agp) return DFB_INVARG; shared = dfb_fbdev->shared->agp; dfb_agp_acquire(); munmap( dfb_agp->base, shared->info.aper_size << 20 ); dfb_agp_unbind( shared->agp_key ); dfb_agp_deallocate( shared->agp_key ); dfb_agp_release(); close( dfb_agp->fd ); SHFREE( dfb_fbdev->shared->shmpool, shared ); D_FREE( dfb_agp ); dfb_fbdev->shared->agp = NULL; dfb_fbdev->agp = dfb_agp = NULL; return DFB_OK; } DFBResult dfb_agp_leave( void ) { AGPShared *shared; if (!dfb_agp) return DFB_INVARG; shared = dfb_fbdev->shared->agp; dfb_agp_acquire(); munmap( dfb_agp->base, shared->info.aper_size << 20 ); dfb_agp_release(); close( dfb_agp->fd ); D_FREE( dfb_agp ); dfb_fbdev->agp = dfb_agp = NULL; return DFB_OK; } DirectFB-1.7.7/systems/fbdev/vt.h0000644000175000017500000000537412254435330013502 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __VT_H__ #define __VT_H__ #include #include #include #include #include typedef struct { int fd0; /* file descriptor of /dev/tty0 */ int fd; /* file descriptor of /dev/ttyN where N is the number of the allocated VT, may be equal to 'fd0' if VT allocation is disabled by "--no-vt-switch" */ int num; /* number of vt where DirectFB runs */ int prev; /* number of vt DirectFB was started from */ int old_fb; /* original fb mapped to vt */ struct sigaction sig_usr1; /* previous signal handler for USR1 */ struct sigaction sig_usr2; /* previous signal handler for USR2 */ struct vt_mode vt_mode; /* previous VT mode */ DirectThread *thread; pthread_mutex_t lock; pthread_cond_t wait; int vt_sig; struct termios old_ts; bool flush; DirectThread *flush_thread; } VirtualTerminal; /* * allocates and switches to a new virtual terminal */ DFBResult dfb_vt_initialize( void ); DFBResult dfb_vt_join( void ); /* * deallocates virtual terminal */ DFBResult dfb_vt_shutdown( bool emergency ); DFBResult dfb_vt_leave( bool emergency ); DFBResult dfb_vt_detach( bool force ); bool dfb_vt_switch( int num ); #endif DirectFB-1.7.7/systems/x11/0000755000175000017500000000000012466665353012311 500000000000000DirectFB-1.7.7/systems/x11/surfacemanager.c0000644000175000017500000004276712254435330015361 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include "surfacemanager.h" D_DEBUG_DOMAIN( SurfMan, "SurfaceManager", "DirectFB Surface Manager" ); static Chunk *split_chunk ( SurfaceManager *manager, Chunk *chunk, int length ); static Chunk *free_chunk ( SurfaceManager *manager, Chunk *chunk ); static Chunk *occupy_chunk( SurfaceManager *manager, Chunk *chunk, CoreSurfaceAllocation *allocation, int length, int pitch ); DFBResult dfb_surfacemanager_create( CoreDFB *core, unsigned int length, SurfaceManager **ret_manager ) { FusionSHMPoolShared *pool; SurfaceManager *manager; Chunk *chunk; D_DEBUG_AT( SurfMan, "%s( %p, %d )\n", __FUNCTION__, core, length ); D_ASSERT( core != NULL ); D_ASSERT( ret_manager != NULL ); pool = dfb_core_shmpool( core ); manager = SHCALLOC( pool, 1, sizeof(SurfaceManager) ); if (!manager) return D_OOSHM(); chunk = SHCALLOC( pool, 1, sizeof(Chunk) ); if (!chunk) { D_OOSHM(); SHFREE( pool, manager ); return DFB_NOSHAREDMEMORY; } manager->shmpool = pool; manager->chunks = chunk; manager->offset = 0; manager->length = length; manager->avail = manager->length - manager->offset; D_MAGIC_SET( manager, SurfaceManager ); chunk->offset = manager->offset; chunk->length = manager->avail; D_MAGIC_SET( chunk, Chunk ); D_DEBUG_AT( SurfMan, " -> %p\n", manager ); *ret_manager = manager; return DFB_OK; } void dfb_surfacemanager_destroy( SurfaceManager *manager ) { Chunk *chunk; void *next; D_DEBUG_AT( SurfMan, "%s( %p )\n", __FUNCTION__, manager ); D_MAGIC_ASSERT( manager, SurfaceManager ); /* Deallocate all video chunks. */ chunk = manager->chunks; while (chunk) { next = chunk->next; D_MAGIC_CLEAR( chunk ); SHFREE( manager->shmpool, chunk ); chunk = next; } D_MAGIC_CLEAR( manager ); /* Deallocate manager struct. */ SHFREE( manager->shmpool, manager ); } /** public functions NOT locking the surfacemanger theirself, to be called between lock/unlock of surfacemanager **/ DFBResult dfb_surfacemanager_allocate( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, Chunk **ret_chunk ) { int pitch; int length; Chunk *c; CoreGraphicsDevice *device; Chunk *best_free = NULL; D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( buffer->surface, CoreSurface ); if (ret_chunk) D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); else D_ASSUME( allocation == NULL ); D_DEBUG_AT( SurfMan, "%s( %p ) <- %dx%d %s\n", __FUNCTION__, buffer, buffer->surface->config.size.w, buffer->surface->config.size.h, dfb_pixelformat_name( buffer->surface->config.format ) ); if (manager->suspended) return DFB_SUSPENDED; /* FIXME: Only one global device at the moment. */ device = dfb_core_get_part( core, DFCP_GRAPHICS ); D_ASSERT( device != NULL ); dfb_gfxcard_calc_buffer_size( device, buffer, &pitch, &length ); D_DEBUG_AT( SurfMan, " -> pitch %d, length %d\n", pitch, length ); if (manager->avail < length) return DFB_TEMPUNAVAIL; /* examine chunks */ c = manager->chunks; D_MAGIC_ASSERT( c, Chunk ); while (c) { D_MAGIC_ASSERT( c, Chunk ); if (!c->buffer && c->length >= length) { /* NULL means check only. */ if (!ret_chunk) return DFB_OK; /* found a nice place to chill */ if (!best_free || best_free->length > c->length) /* first found or better one? */ best_free = c; if (c->length == length) break; } c = c->next; } /* if we found a place */ if (best_free) { D_DEBUG_AT( SurfMan, " -> found free (%d)\n", best_free->length ); /* NULL means check only. */ if (ret_chunk) *ret_chunk = occupy_chunk( manager, best_free, allocation, length, pitch ); return DFB_OK; } D_DEBUG_AT( SurfMan, " -> failed (%d/%d avail)\n", manager->avail, manager->length ); /* no luck */ return DFB_NOVIDEOMEMORY; } DFBResult dfb_surfacemanager_displace( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer ) { int length; Chunk *multi_start = NULL; int multi_size = 0; int multi_tsize = 0; int multi_count = 0; Chunk *bestm_start = NULL; int bestm_count = 0; int bestm_size = 0; int min_toleration; Chunk *chunk; CoreGraphicsDevice *device; CoreSurfaceAllocation *smallest = NULL; D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( buffer->surface, CoreSurface ); D_DEBUG_AT( SurfMan, "%s( %p ) <- %dx%d %s\n", __FUNCTION__, buffer, buffer->surface->config.size.w, buffer->surface->config.size.h, dfb_pixelformat_name( buffer->surface->config.format ) ); /* FIXME: Only one global device at the moment. */ device = dfb_core_get_part( core, DFCP_GRAPHICS ); D_ASSERT( device != NULL ); D_UNUSED_P( device ); dfb_gfxcard_calc_buffer_size( dfb_core_get_part( core, DFCP_GRAPHICS ), buffer, NULL, &length ); min_toleration = manager->min_toleration/8 + 2; D_DEBUG_AT( SurfMan, " -> %7d required, min toleration %d\n", length, min_toleration ); chunk = manager->chunks; while (chunk) { CoreSurfaceAllocation *allocation; D_MAGIC_ASSERT( chunk, Chunk ); allocation = chunk->allocation; if (allocation) { CoreSurfaceBuffer *other; int size, locks; D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_ASSERT( chunk->buffer == allocation->buffer ); D_ASSERT( chunk->length >= allocation->size ); other = allocation->buffer; D_MAGIC_ASSERT( other, CoreSurfaceBuffer ); locks = dfb_surface_allocation_locks( allocation ); if (locks) { D_DEBUG_AT( SurfMan, " ++ %7d locked %dx\n", allocation->size, locks ); goto next_reset; } if (other->policy > buffer->policy) { D_DEBUG_AT( SurfMan, " ++ %7d policy %d > %d\n", allocation->size, other->policy, buffer->policy ); goto next_reset; } if (other->policy == CSP_VIDEOONLY) { D_DEBUG_AT( SurfMan, " ++ %7d policy videoonly\n", allocation->size ); goto next_reset; } chunk->tolerations++; if (chunk->tolerations > 0xff) chunk->tolerations = 0xff; if (other->policy == buffer->policy && chunk->tolerations < min_toleration) { D_DEBUG_AT( SurfMan, " ++ %7d tolerations %d/%d\n", allocation->size, chunk->tolerations, min_toleration ); goto next_reset; } size = allocation->size; if (chunk->prev && !chunk->prev->allocation) size += chunk->prev->length; if (chunk->next && !chunk->next->allocation) size += chunk->next->length; if (size >= length) { if (!smallest || smallest->size > allocation->size) { D_DEBUG_AT( SurfMan, " => %7d [%d] < %d, tolerations %d\n", allocation->size, size, smallest ? smallest->size : 0, chunk->tolerations ); smallest = allocation; } else D_DEBUG_AT( SurfMan, " -> %7d [%d] > %d\n", allocation->size, size, smallest->size ); } else D_DEBUG_AT( SurfMan, " -> %7d [%d]\n", allocation->size, size ); } else D_DEBUG_AT( SurfMan, " - %7d free\n", chunk->length ); if (!smallest) { if (!multi_start) { multi_start = chunk; multi_tsize = chunk->length; multi_size = chunk->allocation ? chunk->length : 0; multi_count = chunk->allocation ? 1 : 0; } else { multi_tsize += chunk->length; multi_size += chunk->allocation ? chunk->length : 0; multi_count += chunk->allocation ? 1 : 0; while (multi_tsize >= length && multi_count > 1) { if (!bestm_start || bestm_size > multi_size * multi_count / bestm_count) { D_DEBUG_AT( SurfMan, " =====> %7d, %7d %2d used [%7d %2d]\n", multi_tsize, multi_size, multi_count, bestm_size, bestm_count ); bestm_size = multi_size; bestm_start = multi_start; bestm_count = multi_count; } else D_DEBUG_AT( SurfMan, " -----> %7d, %7d %2d used\n", multi_tsize, multi_size, multi_count ); if (multi_count <= 2) break; if (!multi_start->allocation) { multi_tsize -= multi_start->length; multi_start = multi_start->next; } D_ASSUME( multi_start->allocation != NULL ); multi_tsize -= multi_start->length; multi_size -= multi_start->allocation ? multi_start->length : 0; multi_count -= multi_start->allocation ? 1 : 0; multi_start = multi_start->next; } } } chunk = chunk->next; continue; next_reset: multi_start = NULL; chunk = chunk->next; } if (smallest) { D_MAGIC_ASSERT( smallest, CoreSurfaceAllocation ); D_MAGIC_ASSERT( smallest->buffer, CoreSurfaceBuffer ); smallest->flags |= CSALF_MUCKOUT; D_DEBUG_AT( SurfMan, " -> offset %lu, size %d\n", smallest->offset, smallest->size ); return DFB_OK; } if (bestm_start) { chunk = bestm_start; while (bestm_count) { CoreSurfaceAllocation *allocation = chunk->allocation; if (allocation) { D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( allocation->buffer, CoreSurfaceBuffer ); allocation->flags |= CSALF_MUCKOUT; bestm_count--; } D_DEBUG_AT( SurfMan, " ---> offset %d, length %d\n", chunk->offset, chunk->length ); chunk = chunk->next; } return DFB_OK; } return DFB_NOVIDEOMEMORY; } DFBResult dfb_surfacemanager_deallocate( SurfaceManager *manager, Chunk *chunk ) { CoreSurfaceBuffer *buffer; D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( chunk, Chunk ); buffer = chunk->buffer; D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( buffer->surface, CoreSurface ); D_UNUSED_P( buffer ); D_DEBUG_AT( SurfMan, "%s( %p ) <- %dx%d %s\n", __FUNCTION__, buffer, buffer->surface->config.size.w, buffer->surface->config.size.h, dfb_pixelformat_name( buffer->surface->config.format ) ); free_chunk( manager, chunk ); return DFB_OK; } /** internal functions NOT locking the surfacemanager **/ static Chunk * split_chunk( SurfaceManager *manager, Chunk *c, int length ) { Chunk *newchunk; D_MAGIC_ASSERT( c, Chunk ); if (c->length == length) /* does not need be splitted */ return c; newchunk = (Chunk*) SHCALLOC( manager->shmpool, 1, sizeof(Chunk) ); if (!newchunk) { D_OOSHM(); return NULL; } /* calculate offsets and lengths of resulting chunks */ newchunk->offset = c->offset + c->length - length; newchunk->length = length; c->length -= newchunk->length; /* insert newchunk after chunk c */ newchunk->prev = c; newchunk->next = c->next; if (c->next) c->next->prev = newchunk; c->next = newchunk; D_MAGIC_SET( newchunk, Chunk ); return newchunk; } static Chunk * free_chunk( SurfaceManager *manager, Chunk *chunk ) { D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( chunk, Chunk ); if (!chunk->buffer) { D_BUG( "freeing free chunk" ); return chunk; } else { D_DEBUG_AT( SurfMan, "Deallocating %d bytes at offset %d.\n", chunk->length, chunk->offset ); } if (chunk->buffer->policy == CSP_VIDEOONLY) manager->avail += chunk->length; chunk->allocation = NULL; chunk->buffer = NULL; manager->min_toleration--; if (chunk->prev && !chunk->prev->buffer) { Chunk *prev = chunk->prev; //D_DEBUG_AT( SurfMan, " -> merging with previous chunk at %d\n", prev->offset ); prev->length += chunk->length; prev->next = chunk->next; if (prev->next) prev->next->prev = prev; //D_DEBUG_AT( SurfMan, " -> freeing %p (prev %p, next %p)\n", chunk, chunk->prev, chunk->next); D_MAGIC_CLEAR( chunk ); SHFREE( manager->shmpool, chunk ); chunk = prev; } if (chunk->next && !chunk->next->buffer) { Chunk *next = chunk->next; //D_DEBUG_AT( SurfMan, " -> merging with next chunk at %d\n", next->offset ); chunk->length += next->length; chunk->next = next->next; if (chunk->next) chunk->next->prev = chunk; D_MAGIC_CLEAR( next ); SHFREE( manager->shmpool, next ); } return chunk; } static Chunk * occupy_chunk( SurfaceManager *manager, Chunk *chunk, CoreSurfaceAllocation *allocation, int length, int pitch ) { D_MAGIC_ASSERT( manager, SurfaceManager ); D_MAGIC_ASSERT( chunk, Chunk ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( allocation->buffer, CoreSurfaceBuffer ); if (allocation->buffer->policy == CSP_VIDEOONLY) manager->avail -= length; chunk = split_chunk( manager, chunk, length ); D_DEBUG_AT( SurfMan, "Allocating %d bytes at offset %d.\n", chunk->length, chunk->offset ); chunk->allocation = allocation; chunk->buffer = allocation->buffer; chunk->pitch = pitch; manager->min_toleration++; return chunk; } DirectFB-1.7.7/systems/x11/README0000644000175000017500000000043312171403127013067 00000000000000This is an X11 system in very early stages, it is not really usable yet. Tested with RGB16, ARGB1555 and ARGB mode. BUGS - occasional segfault during startup - does not work with multi-application core TODO - support for RGB32 - test RGB24, RGB332, and palette mode - code cleanup DirectFB-1.7.7/systems/x11/x11image.c0000644000175000017500000001542612254435330014002 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include "x11.h" #include "x11image.h" /**********************************************************************************************************************/ DFBResult x11ImageInit( DFBX11 *x11, x11Image *image, int width, int height, DFBSurfacePixelFormat format ) { int ret; Visual *visual; DFBX11Shared *shared = x11->shared; if (!x11->use_shm) return DFB_UNSUPPORTED; /* Lookup visual. */ visual = x11->visuals[DFB_PIXELFORMAT_INDEX(format)]; if (!visual) return DFB_UNSUPPORTED; /* For probing. */ if (!image) return DFB_OK; image->width = width; image->height = height; image->format = format; image->depth = DFB_COLOR_BITS_PER_PIXEL( format ); D_MAGIC_SET( image, x11Image ); if (fusion_call_execute( &shared->call, FCEF_NONE, X11_IMAGE_INIT, image, &ret )) { D_MAGIC_CLEAR( image ); return DFB_FUSION; } if (ret) { D_DERROR( ret, "X11/Image: X11_IMAGE_INIT call failed!\n" ); D_MAGIC_CLEAR( image ); return ret; } return DFB_OK; } DFBResult x11ImageDestroy( DFBX11 *x11, x11Image *image ) { int ret; DFBX11Shared *shared = x11->shared; D_MAGIC_ASSERT( image, x11Image ); if (fusion_call_execute( &shared->call, FCEF_NONE, X11_IMAGE_DESTROY, image, &ret )) return DFB_FUSION; if (ret) { D_DERROR( ret, "X11/Image: X11_IMAGE_DESTROY call failed!\n" ); return ret; } D_MAGIC_CLEAR( image ); return DFB_OK; } DFBResult x11ImageAttach( x11Image *image, void **ret_addr ) { void *addr; D_MAGIC_ASSERT( image, x11Image ); D_ASSERT( ret_addr != NULL ); addr = shmat( image->seginfo.shmid, NULL, 0 ); if (!addr) { int erno = errno; D_PERROR( "X11/Image: shmat( %d ) failed!\n", image->seginfo.shmid ); return errno2result( erno ); } *ret_addr = addr; return DFB_OK; } DFBResult x11ImageDetach( x11Image *image, void *addr ) { D_MAGIC_ASSERT( image, x11Image ); D_ASSERT( addr != NULL ); shmdt( addr ); return DFB_OK; } /**********************************************************************************************************************/ DFBResult dfb_x11_image_init_handler( DFBX11 *x11, x11Image *image ) { Visual *visual; XImage *ximage; D_MAGIC_ASSERT( image, x11Image ); if (!x11->use_shm) return DFB_UNSUPPORTED; /* Lookup visual. */ visual = x11->visuals[DFB_PIXELFORMAT_INDEX(image->format)]; if (!visual) return DFB_UNSUPPORTED; image->visual = visual; XLockDisplay( x11->display ); ximage = XShmCreateImage( x11->display, image->visual, image->depth, ZPixmap, NULL, &image->seginfo, image->width, image->height ); if (!ximage) { D_ERROR( "X11/ShmImage: Error creating shared image (XShmCreateImage)!\n"); XUnlockDisplay( x11->display ); return DFB_FAILURE; } x11->Sync( x11 ); /* we firstly create our shared memory segment with the size we need, and correct permissions for the owner, the group and the world --> 0777 */ image->seginfo.shmid = shmget( IPC_PRIVATE, ximage->bytes_per_line * ximage->height, IPC_CREAT | 0777 ); if (image->seginfo.shmid < 0) goto error; /* Then, we have to attach the segment to our process, and we let the function search the correct memory place --> NULL. It's safest ! */ image->seginfo.shmaddr = shmat( image->seginfo.shmid, NULL, 0 ); if (!image->seginfo.shmaddr) goto error_shmat; ximage->data = image->seginfo.shmaddr; /* We set the buffer in Read and Write mode */ image->seginfo.readOnly = False; if (!XShmAttach( x11->display, &image->seginfo )) goto error_xshmattach; x11->Sync( x11 ); image->ximage = ximage; image->pitch = ximage->bytes_per_line; image->pixmap = XShmCreatePixmap( x11->display, DefaultRootWindow(x11->display), ximage->data, &image->seginfo, image->width, image->height, image->depth ); x11->Sync( x11 ); image->gc = XCreateGC( x11->display, image->pixmap, 0, NULL ); x11->Sync( x11 ); XUnlockDisplay( x11->display ); return DFB_OK; error_xshmattach: shmdt( image->seginfo.shmaddr ); error_shmat: shmctl( image->seginfo.shmid, IPC_RMID, NULL ); error: XDestroyImage( ximage ); x11->Sync( x11 ); XUnlockDisplay( x11->display ); return DFB_FAILURE; } DFBResult dfb_x11_image_destroy_handler( DFBX11 *x11, x11Image *image ) { D_MAGIC_ASSERT( image, x11Image ); XLockDisplay( x11->display ); XFreeGC( x11->display, image->gc ); x11->Sync( x11 ); XFreePixmap( x11->display, image->pixmap ); x11->Sync( x11 ); XShmDetach( x11->display, &image->seginfo ); x11->Sync( x11 ); XDestroyImage( image->ximage ); x11->Sync( x11 ); XUnlockDisplay( x11->display ); shmdt( image->seginfo.shmaddr ); shmctl( image->seginfo.shmid, IPC_RMID, NULL ); return DFB_OK; } DirectFB-1.7.7/systems/x11/xwindow.h0000644000175000017500000000501612463500054014062 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __SYSTEMS_XWINDOW_H__ #define __SYSTEMS_XWINDOW_H__ #include /* fundamentals X datas structures */ #include /* datas definitions for various functions */ #include /* for a perfect use of keyboard events */ #include #include #include #include "x11types.h" typedef struct { Display* display; Window window; Screen* screenptr; int screennum; Visual* visual; GC gc; XImage* ximage; int ximage_offset; Colormap colormap; XShmSegmentInfo* shmseginfo; unsigned char* videomemory; char* virtualscreen; int videoaccesstype; int width; int height; int depth; int bpp; /* (Null) cursor stuff*/ Cursor NullCursor; } XWindow; Bool dfb_x11_open_window ( DFBX11 *x11, XWindow** ppXW, int iXPos, int iYPos, int iWidth, int iHeight, DFBSurfacePixelFormat format ); void dfb_x11_close_window( DFBX11 *x11, XWindow* pXW ); #endif /* __SYSTEMS_XWINDOW_H__ */ DirectFB-1.7.7/systems/x11/vpsmem_surface_pool.h0000644000175000017500000000270112254435330016433 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __X11SYSTEM__VPSMEM_SURFACE_POOL_H__ #define __X11SYSTEM__VPSMEM_SURFACE_POOL_H__ #include extern const SurfacePoolFuncs vpsmemSurfacePoolFuncs; #endif DirectFB-1.7.7/systems/x11/xwindow.c0000644000175000017500000002343512463500054014062 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include "x11.h" D_DEBUG_DOMAIN( X11_Window, "X11/Window", "X11 Window handling" ); static bool use_shm = true; static int error_handler_shm( Display *display, XErrorEvent *event ) { if (use_shm) { D_INFO( "X11/Display: Error! Disabling XShm.\n" ); use_shm = false; } return 0; } static int error_code = 0; static int error_handler( Display *display, XErrorEvent *event ) { char buf[512]; D_DEBUG_AT( X11_Window, "%s()\n", __FUNCTION__ ); XGetErrorText( display, event->error_code, buf, sizeof(buf) ); D_ERROR( "X11/Window: Error! %s\n", buf ); error_code = event->error_code; return 0; } Bool dfb_x11_open_window( DFBX11 *x11, XWindow** ppXW, int iXPos, int iYPos, int iWidth, int iHeight, DFBSurfacePixelFormat format ) { XWindow *xw; XSetWindowAttributes attr = { .background_pixmap = 0 }; void *old_error_handler = 0; unsigned int cw_mask = CWEventMask; D_DEBUG_AT( X11_Window, "Creating %4dx%4d %s window...\n", iWidth, iHeight, dfb_pixelformat_name(format) ); xw = D_CALLOC( 1, sizeof(XWindow) ); if (!xw) return D_OOM(); /* We set the structure as needed for our window */ xw->width = iWidth; xw->height = iHeight; xw->display = x11->display; xw->screenptr = DefaultScreenOfDisplay(xw->display); xw->screennum = DefaultScreen(xw->display); xw->depth = DefaultDepthOfScreen(xw->screenptr); xw->visual = DefaultVisualOfScreen(xw->screenptr); attr.event_mask = ButtonPressMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask | KeyReleaseMask | ExposureMask | StructureNotifyMask; if (dfb_config->x11_borderless) { attr.override_redirect = True; cw_mask |= CWOverrideRedirect; } XLockDisplay( x11->display ); old_error_handler = XSetErrorHandler( error_handler ); error_code = 0; xw->window = XCreateWindow( xw->display, RootWindowOfScreen(xw->screenptr), iXPos, iYPos, iWidth, iHeight, 0, xw->depth, InputOutput, xw->visual, cw_mask, &attr ); XSync( xw->display, False ); if (!xw->window || error_code) { D_FREE( xw ); XUnlockDisplay( x11->display ); return False; } XSizeHints Hints; /* * Here we inform the function of what we are going to change for the * window (there's also PPosition but it's obsolete) */ Hints.flags = PSize | PMinSize | PMaxSize; /* * Now we set the structure to the values we need for width & height. * For esthetic reasons we set Width=MinWidth=MaxWidth. * The same goes for Height. You can try whith differents values, or * let's use Hints.flags=Psize; and resize your window.. */ Hints.min_width = Hints.max_width = Hints.base_width = xw->width; Hints.min_height = Hints.max_height = Hints.base_height = xw->height; /* Now we can set the size hints for the specified window */ XSetWMNormalHints(xw->display,xw->window,&Hints); /* We change the title of the window (default:Untitled) */ XStoreName(xw->display,xw->window,"DFB X11 system window"); xw->gc = XCreateGC(xw->display, xw->window, 0, NULL); #if 0 // Create a null cursor Pixmap pixmp1; Pixmap pixmp2; XColor fore; XColor back; char zero = 0; pixmp1 = XCreateBitmapFromData( xw->display, xw->window, &zero, 1, 1 ); pixmp2 = XCreateBitmapFromData( xw->display, xw->window, &zero, 1, 1 ); xw->NullCursor = XCreatePixmapCursor( xw->display, pixmp1, pixmp2, &fore, &back, 0, 0 ); XFreePixmap ( xw->display, pixmp1 ); XFreePixmap ( xw->display, pixmp2 ); XDefineCursor( xw->display, xw->window, xw->NullCursor ); #endif /* maps the window and raises it to the top of the stack */ XMapRaised( xw->display, xw->window ); if (x11->use_shm) { // Shared memory xw->shmseginfo=(XShmSegmentInfo *)D_CALLOC(1, sizeof(XShmSegmentInfo)); if (!xw->shmseginfo) { x11->use_shm = false; goto no_shm; } xw->ximage=XShmCreateImage(xw->display, xw->visual, xw->depth, ZPixmap, NULL,xw->shmseginfo, xw->width, xw->height * 2); XSync( xw->display, False ); if (!xw->ximage || error_code) { D_ERROR("X11: Error creating shared image (XShmCreateImage) \n"); x11->use_shm = false; D_FREE(xw->shmseginfo); error_code = 0; goto no_shm; } xw->bpp = (xw->ximage->bits_per_pixel + 7) / 8; /* we firstly create our shared memory segment with the size we need, and correct permissions for the owner, the group and the world --> 0777 */ xw->shmseginfo->shmid=shmget(IPC_PRIVATE, xw->ximage->bytes_per_line * xw->ximage->height * 2, IPC_CREAT|0777); if (xw->shmseginfo->shmid<0) { x11->use_shm = false; XDestroyImage(xw->ximage); D_FREE(xw->shmseginfo); goto no_shm; } /* Then, we have to attach the segment to our process, and we let the function search the correct memory place --> NULL. It's safest ! */ xw->shmseginfo->shmaddr = shmat( xw->shmseginfo->shmid, NULL, 0 ); if (!xw->shmseginfo->shmaddr) { x11->use_shm = false; shmctl(xw->shmseginfo->shmid,IPC_RMID,NULL); XDestroyImage(xw->ximage); D_FREE(xw->shmseginfo); goto no_shm; } /* We set the buffer in Read and Write mode */ xw->shmseginfo->readOnly=False; xw->virtualscreen= xw->ximage->data = xw->shmseginfo->shmaddr; XSetErrorHandler( error_handler_shm ); XShmAttach(x11->display,xw->shmseginfo); XShmPutImage(x11->display, xw->window, xw->gc, xw->ximage, 0, 0, 0, 0, 1, 1, False); XSync(x11->display, False); XSetErrorHandler( error_handler ); if (!x11->use_shm) { shmdt(xw->shmseginfo->shmaddr); shmctl(xw->shmseginfo->shmid,IPC_RMID,NULL); XDestroyImage(xw->ximage); D_FREE(xw->shmseginfo); } } no_shm: if (!x11->use_shm) { int pitch; xw->bpp = (xw->depth > 16) ? 4 : (xw->depth > 8) ? 2 : 1; pitch = (xw->bpp * xw->width + 3) & ~3; /* Use malloc(), not D_MALLOC() here, because XCreateImage() * will call free() on this data. */ xw->virtualscreen = malloc ( 2 * xw->height * pitch ); xw->ximage = XCreateImage( xw->display, xw->visual, xw->depth, ZPixmap, 0, xw->virtualscreen, xw->width, xw->height * 2, 32, pitch ); XSync( xw->display, False ); if (!xw->ximage || error_code) { D_ERROR( "X11/Window: XCreateImage( Visual %02lu, depth %d, size %dx%d, buffer %p [%d] ) failed!\n", xw->visual->visualid, xw->depth, xw->width, xw->height * 2, xw->virtualscreen, pitch ); XFreeGC(xw->display,xw->gc); XDestroyWindow(xw->display,xw->window); XSetErrorHandler( old_error_handler ); XUnlockDisplay( x11->display ); D_FREE( xw ); return False; } } XSetErrorHandler( old_error_handler ); XUnlockDisplay( x11->display ); D_INFO( "X11/Display: %ssing XShm.\n", x11->use_shm ? "U" : "Not u" ); (*ppXW) = xw; return True; } void dfb_x11_close_window( DFBX11 *x11, XWindow* xw ) { if (x11->use_shm) { XShmDetach( xw->display, xw->shmseginfo ); shmdt( xw->shmseginfo->shmaddr ); shmctl( xw->shmseginfo->shmid, IPC_RMID, NULL ); D_FREE( xw->shmseginfo ); } XDestroyImage( xw->ximage ); XFreeGC( xw->display, xw->gc ); XDestroyWindow( xw->display, xw->window ); #if 0 XFreeCursor( xw->display, xw->NullCursor ); #endif D_FREE( xw ); } DirectFB-1.7.7/systems/x11/x11_surface_pool_bridge.c0000644000175000017500000002365312254435330017055 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include "x11.h" #include "x11image.h" #include "glx_surface_pool.h" #include "x11_surface_pool.h" D_DEBUG_DOMAIN( X11_Bridge, "X11/Bridge", "X11 System Surface Pool Bridge" ); /**********************************************************************************************************************/ typedef struct { } x11PoolBridgeData; typedef struct { DFBX11 *x11; Display *display; } x11PoolBridgeLocalData; typedef struct { } x11PoolTransferData; /**********************************************************************************************************************/ static int x11PoolBridgeDataSize( void ) { return sizeof(x11PoolBridgeData); } static int x11PoolBridgeLocalDataSize( void ) { return sizeof(x11PoolBridgeLocalData); } static int x11PoolTransferDataSize( void ) { return sizeof(x11PoolTransferData); } static DFBResult x11InitPoolBridge( CoreDFB *core, CoreSurfacePoolBridge *bridge, void *bridge_data, void *bridge_local, void *context, CoreSurfacePoolBridgeDescription *ret_desc ) { x11PoolBridgeLocalData *local = bridge_local; DFBX11 *x11 = context; D_DEBUG_AT( X11_Bridge, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( bridge, CoreSurfacePoolBridge ); D_ASSERT( bridge_local != NULL ); D_ASSERT( context != NULL ); D_ASSERT( ret_desc != NULL ); local->x11 = x11; local->display = x11->display; ret_desc->caps = CSPBCAPS_NONE; snprintf( ret_desc->name, DFB_SURFACE_POOL_BRIDGE_DESC_NAME_LENGTH, "X11 Pool Bridge" ); return DFB_OK; } static DFBResult x11JoinPoolBridge( CoreDFB *core, CoreSurfacePoolBridge *bridge, void *bridge_data, void *bridge_local, void *context ) { x11PoolBridgeLocalData *local = bridge_local; DFBX11 *x11 = context; D_DEBUG_AT( X11_Bridge, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( bridge, CoreSurfacePoolBridge ); D_ASSERT( bridge_local != NULL ); D_ASSERT( context != NULL ); local->x11 = x11; local->display = x11->display; return DFB_OK; } static DFBResult x11DestroyPoolBridge( CoreSurfacePoolBridge *bridge, void *bridge_data, void *bridge_local ) { D_DEBUG_AT( X11_Bridge, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( bridge, CoreSurfacePoolBridge ); return DFB_OK; } static DFBResult x11LeavePoolBridge( CoreSurfacePoolBridge *bridge, void *bridge_data, void *bridge_local ) { D_DEBUG_AT( X11_Bridge, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( bridge, CoreSurfacePoolBridge ); return DFB_OK; } static DFBResult x11CheckTransfer( CoreSurfacePoolBridge *bridge, void *bridge_data, void *bridge_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *from, CoreSurfaceAllocation *to ) { x11PoolBridgeLocalData *local = bridge_local; DFBX11 *x11 = local->x11; DFBX11Shared *shared = x11->shared; D_DEBUG_AT( X11_Bridge, "%s()\n", __FUNCTION__ ); if (from->pool == shared->x11image_pool && to->pool == shared->glx_pool) { x11AllocationData *alloc = from->data; if (alloc->real) { /* ARGB does not work (BadMatch) */ if (buffer->format == DSPF_RGB32) return DFB_OK; } } else if (from->pool == shared->glx_pool && to->pool == shared->x11image_pool) { x11AllocationData *alloc = to->data; if (alloc->real) { /* ARGB does not work (BadMatch) */ if (buffer->format == DSPF_RGB32) return DFB_OK; } } return DFB_UNSUPPORTED; } static DFBResult x11StartTransfer( CoreSurfacePoolBridge *bridge, void *bridge_data, void *bridge_local, CoreSurfacePoolTransfer *transfer, void *transfer_data ) { DFBResult ret; int i; CoreSurfaceBufferLock lock; LocalPixmap *pixmap; x11PoolBridgeLocalData *local = bridge_local; DFBX11 *x11 = local->x11; DFBX11Shared *shared = x11->shared; CoreSurfaceAllocation *from = transfer->from; CoreSurfaceAllocation *to = transfer->to; D_DEBUG_AT( X11_Bridge, "%s()\n", __FUNCTION__ ); if (from->pool == shared->x11image_pool && to->pool == shared->glx_pool) { x11AllocationData *alloc = from->data; D_ASSERT( alloc->real ); dfb_surface_buffer_lock_init( &lock, CSAID_ANY, CSAF_WRITE ); ret = dfb_surface_pool_lock( to->pool, to, &lock ); if (ret) { dfb_surface_buffer_lock_deinit( &lock ); return ret; } pixmap = lock.handle; D_MAGIC_ASSERT( pixmap, LocalPixmap ); XLockDisplay( local->display ); for (i=0; inum_rects; i++) { const DFBRectangle *rect = &transfer->rects[i]; D_DEBUG_AT( X11_Bridge, " -> XCopyArea( %4d,%4d-%4dx%4d )\n", rect->x, rect->y, rect->w, rect->h ); XCopyArea( local->display, alloc->image.pixmap, pixmap->pixmap, pixmap->gc, rect->x, rect->y, rect->w, rect->h, rect->x, rect->y ); } XFlush( local->display ); XUnlockDisplay( local->display ); dfb_surface_pool_unlock( to->pool, to, &lock ); dfb_surface_buffer_lock_deinit( &lock ); return DFB_OK; } if (from->pool == shared->glx_pool && to->pool == shared->x11image_pool) { x11AllocationData *alloc = to->data; D_ASSERT( alloc->real ); dfb_surface_buffer_lock_init( &lock, CSAID_ANY, CSAF_READ ); ret = dfb_surface_pool_lock( from->pool, from, &lock ); if (ret) { dfb_surface_buffer_lock_deinit( &lock ); return ret; } pixmap = lock.handle; D_MAGIC_ASSERT( pixmap, LocalPixmap ); XLockDisplay( local->display ); glFinish(); for (i=0; inum_rects; i++) { const DFBRectangle *rect = &transfer->rects[i]; D_DEBUG_AT( X11_Bridge, " -> XCopyArea( %4d,%4d-%4dx%4d )\n", rect->x, rect->y, rect->w, rect->h ); XCopyArea( local->display, pixmap->pixmap, alloc->image.pixmap, alloc->image.gc, rect->x, rect->y, rect->w, rect->h, rect->x, rect->y ); } XFlush( local->display ); XUnlockDisplay( local->display ); dfb_surface_pool_unlock( from->pool, from, &lock ); dfb_surface_buffer_lock_deinit( &lock ); return DFB_OK; } return DFB_BUG; } static DFBResult x11FinishTransfer( CoreSurfacePoolBridge *bridge, void *bridge_data, void *bridge_local, CoreSurfacePoolTransfer *transfer, void *transfer_data ) { x11PoolBridgeLocalData *local = bridge_local; D_DEBUG_AT( X11_Bridge, "%s()\n", __FUNCTION__ ); XLockDisplay( local->display ); XSync( local->display, False ); XUnlockDisplay( local->display ); return DFB_OK; } const SurfacePoolBridgeFuncs x11SurfacePoolBridgeFuncs = { .PoolBridgeDataSize = x11PoolBridgeDataSize, .PoolBridgeLocalDataSize = x11PoolBridgeLocalDataSize, .PoolTransferDataSize = x11PoolTransferDataSize, .InitPoolBridge = x11InitPoolBridge, .JoinPoolBridge = x11JoinPoolBridge, .DestroyPoolBridge = x11DestroyPoolBridge, .LeavePoolBridge = x11LeavePoolBridge, .CheckTransfer = x11CheckTransfer, .StartTransfer = x11StartTransfer, .FinishTransfer = x11FinishTransfer, }; DirectFB-1.7.7/systems/x11/surfacemanager.h0000644000175000017500000000774312254435330015361 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __SURFACEMANAGER_H__ #define __SURFACEMANAGER_H__ #include #include typedef struct _SurfaceManager SurfaceManager; typedef struct _Chunk Chunk; /* * initially there is one big free chunk, * chunks are splitted into a free and an occupied chunk if memory is allocated, * two chunks are merged to one free chunk if memory is deallocated */ struct _Chunk { int magic; int offset; /* offset in memory, is greater or equal to the heap offset */ int length; /* length of this chunk in bytes */ int pitch; CoreSurfaceBuffer *buffer; /* pointer to surface buffer occupying this chunk, or NULL if chunk is free */ CoreSurfaceAllocation *allocation; int tolerations; /* number of times this chunk was scanned occupied, resetted in assure_video */ Chunk *prev; Chunk *next; }; struct _SurfaceManager { int magic; FusionSHMPoolShared *shmpool; Chunk *chunks; int offset; int length; /* length of the heap in bytes */ int avail; /* amount of available memory in bytes */ int min_toleration; bool suspended; }; DFBResult dfb_surfacemanager_create ( CoreDFB *core, unsigned int length, SurfaceManager **ret_manager ); void dfb_surfacemanager_destroy( SurfaceManager *manager ); /* * finds and allocates one for the surface or fails, * after success the video health is CSH_RESTORE. * NOTE: this does not notify the listeners */ DFBResult dfb_surfacemanager_allocate( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, Chunk **ret_chunk ); DFBResult dfb_surfacemanager_displace( CoreDFB *core, SurfaceManager *manager, CoreSurfaceBuffer *buffer ); /* * sets the video health to CSH_INVALID frees the chunk and * notifies the listeners */ DFBResult dfb_surfacemanager_deallocate( SurfaceManager *manager, Chunk *chunk ); #endif DirectFB-1.7.7/systems/x11/x11_surface_pool_bridge.h0000644000175000017500000000273112254435330017054 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __X11SYSTEM__X11_SURFACE_POOL_BRIDGE_H__ #define __X11SYSTEM__X11_SURFACE_POOL_BRIDGE_H__ #include extern const SurfacePoolBridgeFuncs x11SurfacePoolBridgeFuncs; #endif DirectFB-1.7.7/systems/x11/glx_surface_pool.c0000644000175000017500000006545212254435330015725 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include "x11.h" #include "glx_surface_pool.h" #include "x11_surface_pool.h" D_DEBUG_DOMAIN( GLX_Surfaces, "GLX/Surfaces", "GLX Surface Pool" ); D_DEBUG_DOMAIN( GLX_Pixmaps, "GLX/Pixmaps", "GLX Surface Pool Pixmaps" ); /**********************************************************************************************************************/ typedef void (*GLXBindTexImageEXTProc) ( Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list ); typedef void (*GLXReleaseTexImageEXTProc)( Display *dpy, GLXDrawable drawable, int buffer ); typedef struct { int magic; Display *display; GLXFBConfig *configs; int num_configs; GLXFBConfig config24; Visual *visual24; GLXFBConfig config32; Visual *visual32; GLXBindTexImageEXTProc BindTexImageEXT; GLXReleaseTexImageEXTProc ReleaseTexImageEXT; DirectHash *pixmaps; /* Every thread needs its own context! */ pthread_key_t context_key; pthread_key_t context_key2; } glxPoolLocalData; typedef struct { } glxPoolData; /**********************************************************************************************************************/ static void destroy_context( void *arg ) { ThreadContext *ctx = arg; XLockDisplay( ctx->display ); glXDestroyContext( ctx->display, ctx->context ); XUnlockDisplay( ctx->display ); D_FREE( ctx ); } /**********************************************************************************************************************/ static DFBResult InitLocal( glxPoolLocalData *local, DFBX11 *x11 ) { DFBResult ret; int i; int attribs[] = { GLX_DOUBLEBUFFER, False, GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT, GLX_X_RENDERABLE, True, GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, GLX_DEPTH_SIZE, 16, GLX_X_VISUAL_TYPE, GLX_TRUE_COLOR, None }; local->display = x11->display; local->BindTexImageEXT = (GLXBindTexImageEXTProc) glXGetProcAddress( (unsigned char*) "glXBindTexImageEXT" ); if (!local->BindTexImageEXT) { D_ERROR( "glXGetProcAddress( 'glXBindTexImageEXT' ) failed!\n" ); return DFB_UNSUPPORTED; } local->ReleaseTexImageEXT = (GLXReleaseTexImageEXTProc) glXGetProcAddress( (unsigned char*) "glXReleaseTexImageEXT" ); if (!local->ReleaseTexImageEXT) { D_ERROR( "glXGetProcAddress( 'glXReleaseTexImageEXT' ) failed!\n" ); return DFB_UNSUPPORTED; } ret = direct_hash_create( 7, &local->pixmaps ); if (ret) return ret; XLockDisplay( local->display ); local->configs = glXChooseFBConfig( local->display, DefaultScreen(local->display), attribs, &local->num_configs ); D_DEBUG_AT( GLX_Surfaces, " -> found %d configs\n", local->num_configs ); for (i=0; inum_configs; i++) { int red_size; int green_size; int blue_size; int alpha_size; int buffer_size; XVisualInfo *info = glXGetVisualFromFBConfig( local->display, local->configs[i] ); /* * According to the GLX specification, GLX_BUFFER_SIZE is the sum of * RED_SIZE, GREEN_SIZE, BLUE_SIZE and ALPHA_SIZE. * Since GLX_BUFFER_SIZE is often reported as 32 bit even if ALPHA_SIZE is 0, * lets calculate the value by ourselves. */ glXGetFBConfigAttrib( local->display, local->configs[i], GLX_RED_SIZE, &red_size ); glXGetFBConfigAttrib( local->display, local->configs[i], GLX_GREEN_SIZE, &green_size ); glXGetFBConfigAttrib( local->display, local->configs[i], GLX_BLUE_SIZE, &blue_size ); glXGetFBConfigAttrib( local->display, local->configs[i], GLX_ALPHA_SIZE, &alpha_size ); buffer_size = red_size + green_size + blue_size + alpha_size; D_DEBUG_AT( GLX_Surfaces, " [%2d] ID 0x%02lx, buffer_size %d, RGB 0x%06lx/0x%06lx/0x%06lx {%d}, class %d, z %d\n", i, info->visualid, buffer_size, info->red_mask, info->green_mask, info->blue_mask, info->bits_per_rgb, info->class, info->depth ); if (info->class == TrueColor) { switch (buffer_size) { case 32: local->config32 = local->configs[i]; local->visual32 = info->visual; break; case 24: local->config24 = local->configs[i]; local->visual24 = info->visual; break; } } } if (!local->config24 || !local->config32) { D_ERROR( "GLX/Surfaces: Could not find useful visuals!\n" ); direct_hash_destroy( local->pixmaps ); XUnlockDisplay( local->display ); return DFB_UNSUPPORTED; } XVisualInfo *info24 = glXGetVisualFromFBConfig( local->display, local->config24 ); XVisualInfo *info32 = glXGetVisualFromFBConfig( local->display, local->config32 ); D_INFO( "GLX/Surfaces: Using visual 0x%02lx (24bit) and 0x%02lx (32bit)\n", info24->visualid, info32->visualid ); XUnlockDisplay( local->display ); pthread_key_create( &local->context_key, destroy_context ); pthread_key_create( &local->context_key2, destroy_context ); D_MAGIC_SET( local, glxPoolLocalData ); return DFB_OK; } static DFBResult GetLocalPixmap( glxPoolLocalData *local, glxAllocationData *alloc, CoreSurfaceAllocation *allocation, LocalPixmap **ret_pixmap ) { LocalPixmap *pixmap; CoreSurface *surface; CoreSurfaceBuffer *buffer; (void)buffer; surface = allocation->surface; D_MAGIC_ASSERT( surface, CoreSurface ); buffer = allocation->buffer; D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); pixmap = direct_hash_lookup( local->pixmaps, alloc->pixmap ); if (!pixmap) { pixmap = D_CALLOC( 1, sizeof(LocalPixmap) ); if (!pixmap) return D_OOM(); pixmap->pixmap = alloc->pixmap; pixmap->config = (alloc->depth == 24) ? local->config24 : local->config32; /* * Create a GLXPixmap */ int attribs[] = { GLX_TEXTURE_FORMAT_EXT, (alloc->depth == 24) ? GLX_TEXTURE_FORMAT_RGB_EXT : GLX_TEXTURE_FORMAT_RGBA_EXT, GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_RECTANGLE_EXT, None }; XLockDisplay( local->display ); pixmap->drawable = glXCreatePixmap( local->display, pixmap->config, alloc->pixmap, attribs ); if (!pixmap->drawable) { D_ERROR( "GLX/Surfaces: Could not create %dx%d (depth %d) GLXPixmap!\n", surface->config.size.w, surface->config.size.h, alloc->depth ); XUnlockDisplay( local->display ); D_FREE( pixmap ); return DFB_FAILURE; } D_DEBUG_AT( GLX_Surfaces, " -> drawable 0x%lx\n", pixmap->drawable ); /* * Create a GC (for writing to pixmap) */ pixmap->gc = XCreateGC( local->display, alloc->pixmap, 0, NULL ); D_DEBUG_AT( GLX_Surfaces, " -> gc 0x%lx\n", pixmap->drawable ); XUnlockDisplay( local->display ); /* * Create a texture object */ glGenTextures( 1, &pixmap->buffer.texture ); D_DEBUG_AT( GLX_Pixmaps, " NEW GLXPixmap 0x%lx for 0x%lx [%4dx%4d] %-10s\n", pixmap->drawable, alloc->pixmap, surface->config.size.w, surface->config.size.h, dfb_pixelformat_name(buffer->format) ); D_DEBUG_AT( GLX_Surfaces, " -> GLXPixmap 0x%lx [%4dx%4d] %-10s (%u)\n", pixmap->drawable, surface->config.size.w, surface->config.size.h, dfb_pixelformat_name(buffer->format), pixmap->buffer.texture ); D_MAGIC_SET( pixmap, LocalPixmap ); D_MAGIC_SET( &pixmap->buffer, GLBufferData ); direct_hash_insert( local->pixmaps, alloc->pixmap, pixmap ); } else D_MAGIC_ASSERT( pixmap, LocalPixmap ); *ret_pixmap = pixmap; return DFB_OK; } static void ReleasePixmap( glxPoolLocalData *local, LocalPixmap *pixmap ) { D_MAGIC_ASSERT( local, glxPoolLocalData ); D_MAGIC_ASSERT( pixmap, LocalPixmap ); if (pixmap->bound) { D_DEBUG_AT( GLX_Pixmaps, " RELEASE 0x%08lx from %p\n", pixmap->drawable, pixmap->bound ); local->ReleaseTexImageEXT( local->display, pixmap->drawable, GLX_FRONT_EXT ); pixmap->bound = NULL; } } static void DestroyPixmap( glxPoolLocalData *local, LocalPixmap *pixmap ) { D_MAGIC_ASSERT( local, glxPoolLocalData ); D_MAGIC_ASSERT( pixmap, LocalPixmap ); D_DEBUG_AT( GLX_Pixmaps, " DESTROY 0x%08lx (%d)\n", pixmap->drawable, pixmap->buffer.texture ); glXWaitGL(); ReleasePixmap( local, pixmap ); glXWaitX(); //FIXME: crashes without proper context glDeleteTextures( 1, &pixmap->buffer.texture ); XFreeGC( local->display, pixmap->gc ); glXDestroyPixmap( local->display, pixmap->drawable ); direct_hash_remove( local->pixmaps, pixmap->pixmap ); D_MAGIC_CLEAR( pixmap ); D_MAGIC_CLEAR( &pixmap->buffer ); D_FREE( pixmap ); } /**********************************************************************************************************************/ static int glxPoolDataSize( void ) { return sizeof(glxPoolData); } static int glxPoolLocalDataSize( void ) { return sizeof(glxPoolLocalData); } static int glxAllocationDataSize( void ) { return sizeof(glxAllocationData); } static DFBResult glxInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { glxPoolLocalData *local = pool_local; DFBX11 *x11 = system_data; D_DEBUG_AT( GLX_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( ret_desc != NULL ); ret_desc->caps = CSPCAPS_NONE; if (dfb_system_get_accelerator() != 51) ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_DEFAULT; /* For showing our X11 window */ ret_desc->access[CSAID_LAYER0] = CSAF_READ; /* For user contexts via DirectFBGL */ ret_desc->access[CSAID_ACCEL1] = CSAF_READ | CSAF_WRITE; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "GLX Drawables" ); return InitLocal( local, x11 ); } static DFBResult glxJoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { glxPoolLocalData *local = pool_local; DFBX11 *x11 = system_data; D_DEBUG_AT( GLX_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); return InitLocal( local, x11 ); } static DFBResult glxDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { D_DEBUG_AT( GLX_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); return DFB_OK; } static DFBResult glxLeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { D_DEBUG_AT( GLX_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); return DFB_OK; } static DFBResult glxTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { glxPoolLocalData *local = pool_local; D_MAGIC_ASSERT( local, glxPoolLocalData ); if (!local->configs) return DFB_UNSUPPORTED; return DFB_OK; } static DFBResult glxAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { CoreSurface *surface; glxPoolLocalData *local = pool_local; glxAllocationData *alloc = alloc_data; D_DEBUG_AT( GLX_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( local, glxPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); XLockDisplay( local->display ); alloc->depth = DFB_COLOR_BITS_PER_PIXEL( buffer->format ) + DFB_ALPHA_BITS_PER_PIXEL( buffer->format ); if (surface->type & CSTF_LAYER) alloc->depth = 24; /* * Create a pixmap */ alloc->pixmap = XCreatePixmap( local->display, DefaultRootWindow( local->display ), surface->config.size.w, surface->config.size.h, alloc->depth ); if (!alloc->pixmap) { D_ERROR( "GLX/Surfaces: Could not create %dx%d (depth %d) pixmap!\n", surface->config.size.w, surface->config.size.h, alloc->depth ); XUnlockDisplay( local->display ); return DFB_FAILURE; } D_DEBUG_AT( GLX_Surfaces, " -> pixmap 0x%lx\n", alloc->pixmap ); D_DEBUG_AT( GLX_Pixmaps, " NEW Pixmap 0x%lx [%4dx%4d] %-10s\n", alloc->pixmap, surface->config.size.w, surface->config.size.h, dfb_pixelformat_name(buffer->format) ); XUnlockDisplay( local->display ); /* Pseudo calculation */ dfb_surface_calc_buffer_size( surface, 8, 2, NULL, &allocation->size ); D_MAGIC_SET( alloc, glxAllocationData ); return DFB_OK; } static DFBResult glxDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { LocalPixmap *pixmap; glxPoolLocalData *local = pool_local; glxAllocationData *alloc = alloc_data; D_DEBUG_AT( GLX_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( local, glxPoolLocalData ); D_MAGIC_ASSERT( alloc, glxAllocationData ); CORE_SURFACE_ALLOCATION_ASSERT( allocation ); XLockDisplay( local->display ); pixmap = direct_hash_lookup( local->pixmaps, alloc->pixmap ); if (pixmap) DestroyPixmap( local, pixmap ); XFreePixmap( local->display, alloc->pixmap ); XUnlockDisplay( local->display ); D_MAGIC_CLEAR( alloc ); return DFB_OK; } static DFBResult glxLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { DFBResult ret; LocalPixmap *pixmap; glxPoolLocalData *local = pool_local; glxAllocationData *alloc = alloc_data; D_DEBUG_AT( GLX_Surfaces, "%s( %p )\n", __FUNCTION__, allocation ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( local, glxPoolLocalData ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, glxAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); ret = GetLocalPixmap( local, alloc, allocation, &pixmap ); if (ret) return ret; if (lock->accessor == CSAID_GPU || lock->accessor == CSAID_ACCEL1) { ThreadContext *ctx; ctx = pthread_getspecific( (lock->accessor == CSAID_GPU) ? local->context_key : local->context_key2 ); if (!ctx) { ctx = D_CALLOC( 1, sizeof(ThreadContext) ); if (!ctx) return D_OOM(); ctx->display = local->display; XLockDisplay( local->display ); ctx->context = glXCreateNewContext( local->display, pixmap->config, GLX_RGBA_TYPE, NULL, GL_TRUE ); if (!ctx->context) { D_ERROR( "GLX: Could not create GLXContext!\n" ); XUnlockDisplay( local->display ); D_FREE( ctx ); return DFB_FAILURE; } XUnlockDisplay( local->display ); pthread_setspecific( (lock->accessor == CSAID_GPU) ? local->context_key : local->context_key2, ctx ); D_DEBUG_AT( GLX_Surfaces, " -> NEW CONTEXT %p\n", ctx->context ); } if (lock->access & CSAF_WRITE) { if (ctx->context != glXGetCurrentContext() || ctx->drawable != pixmap->drawable) { D_DEBUG_AT( GLX_Surfaces, " -> MAKE CURRENT 0x%08lx <- 0x%08lx\n", pixmap->drawable, glXGetCurrentDrawable() ); if (ctx->drawable != pixmap->drawable) { ctx->drawable = pixmap->drawable; pixmap->buffer.flags |= GLBF_UPDATE_TARGET; } XLockDisplay( local->display ); glXMakeContextCurrent( local->display, pixmap->drawable, pixmap->drawable, ctx->context ); pixmap->current = ctx->context; ReleasePixmap( local, pixmap ); XUnlockDisplay( local->display ); } } else { if (pixmap->bound != ctx->context) { D_DEBUG_AT( GLX_Surfaces, " -> BIND TEXTURE 0x%08lx (%d)\n", pixmap->drawable, pixmap->buffer.texture ); XLockDisplay( local->display ); ReleasePixmap( local, pixmap ); glEnable( GL_TEXTURE_RECTANGLE_ARB ); glBindTexture( GL_TEXTURE_RECTANGLE_ARB, pixmap->buffer.texture ); local->BindTexImageEXT( local->display, pixmap->drawable, GLX_FRONT_EXT, NULL ); pixmap->bound = ctx->context; XUnlockDisplay( local->display ); pixmap->buffer.flags |= GLBF_UPDATE_TEXTURE; } } lock->handle = &pixmap->buffer; } else lock->handle = pixmap; return DFB_OK; } static DFBResult glxUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { #if 0 DFBResult ret; LocalPixmap *pixmap; glxPoolLocalData *local = pool_local; glxAllocationData *alloc = alloc_data; D_DEBUG_AT( GLX_Surfaces, "%s( %p )\n", __FUNCTION__, allocation ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( local, glxPoolLocalData ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, glxAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); ret = GetLocalPixmap( local, alloc, allocation, &pixmap ); if (ret) return ret; if (lock->accessor == CSAID_GPU) { XLockDisplay( local->display ); if (lock->access & CSAF_WRITE) { // D_DEBUG_AT( GLX_Surfaces, " -> UNMAKE CURRENT 0x%08lx <- 0x%08lx\n", pixmap->drawable, glXGetCurrentDrawable() ); // glXMakeContextCurrent( local->display, None, None, NULL ); // pixmap->current = NULL; } else { D_DEBUG_AT( GLX_Surfaces, " -> UNBIND TEXTURE 0x%08lx (%d)\n", pixmap->drawable, pixmap->buffer.texture ); ReleasePixmap( local, pixmap ); } XUnlockDisplay( local->display ); } #endif return DFB_OK; } static DFBResult glxRead( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, void *destination, int pitch, const DFBRectangle *rect ) { XImage *image; XImage *sub; glxPoolLocalData *local = pool_local; glxAllocationData *alloc = alloc_data; D_DEBUG_AT( GLX_Surfaces, "%s( %p )\n", __FUNCTION__, allocation ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( local, glxPoolLocalData ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, glxAllocationData ); D_ASSERT( destination != NULL ); D_ASSERT( pitch >= 0 ); DFB_RECTANGLE_ASSERT( rect ); D_DEBUG_AT( GLX_Surfaces, " => %p 0x%08lx [%4d,%4d-%4dx%4d]\n", alloc, alloc->pixmap, DFB_RECTANGLE_VALS(rect) ); XLockDisplay( local->display ); image = XCreateImage( local->display, (alloc->depth == 24) ? local->visual24 : local->visual32, alloc->depth, ZPixmap, 0, destination, rect->w, rect->h, 32, pitch ); if (!image) { D_ERROR( "GLX/Surfaces: XCreateImage( %dx%d, depth %d ) failed!\n", rect->w, rect->h, alloc->depth ); XUnlockDisplay( local->display ); return DFB_FAILURE; } glXWaitGL(); sub = XGetSubImage( local->display, alloc->pixmap, rect->x, rect->y, rect->w, rect->h, ~0, ZPixmap, image, 0, 0 ); glXWaitX(); /* FIXME: Why the X-hell is XDestroyImage() freeing *MY* data? */ image->data = NULL; XDestroyImage( image ); XUnlockDisplay( local->display ); if (!sub) { D_ERROR( "GLX/Surfaces: XGetSubImage( %d,%d-%dx%d ) failed!\n", DFB_RECTANGLE_VALS(rect) ); return DFB_FAILURE; } return DFB_OK; } static DFBResult glxWrite( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, const void *source, int pitch, const DFBRectangle *rect ) { DFBResult ret; LocalPixmap *pixmap; CoreSurface *surface; XImage *image; glxPoolLocalData *local = pool_local; glxAllocationData *alloc = alloc_data; (void)surface; D_DEBUG_AT( GLX_Surfaces, "%s( %p )\n", __FUNCTION__, allocation ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( local, glxPoolLocalData ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, glxAllocationData ); D_ASSERT( source != NULL ); D_ASSERT( pitch >= 0 ); DFB_RECTANGLE_ASSERT( rect ); D_DEBUG_AT( GLX_Surfaces, " <= %p 0x%08lx [%4d,%4d-%4dx%4d]\n", alloc, alloc->pixmap, DFB_RECTANGLE_VALS(rect) ); surface = allocation->surface; D_MAGIC_ASSERT( surface, CoreSurface ); ret = GetLocalPixmap( local, alloc, allocation, &pixmap ); if (ret) return ret; XLockDisplay( local->display ); image = XCreateImage( local->display, (alloc->depth == 24) ? local->visual24 : local->visual32, alloc->depth, ZPixmap, 0, (void*) source, rect->w, rect->h, 32, pitch ); if (!image) { D_ERROR( "GLX/Surfaces: XCreateImage( %dx%d, depth %d ) failed!\n", rect->w, rect->h, alloc->depth ); XUnlockDisplay( local->display ); return DFB_FAILURE; } glXWaitGL(); XPutImage( local->display, alloc->pixmap, pixmap->gc, image, 0, 0, rect->x, rect->y, rect->w, rect->h ); glXWaitX(); /* FIXME: Why the X-hell is XDestroyImage() freeing *MY* data? */ image->data = NULL; XDestroyImage( image ); XUnlockDisplay( local->display ); return DFB_OK; } const SurfacePoolFuncs glxSurfacePoolFuncs = { .PoolDataSize = glxPoolDataSize, .PoolLocalDataSize = glxPoolLocalDataSize, .AllocationDataSize = glxAllocationDataSize, .InitPool = glxInitPool, .JoinPool = glxJoinPool, .DestroyPool = glxDestroyPool, .LeavePool = glxLeavePool, .TestConfig = glxTestConfig, .AllocateBuffer = glxAllocateBuffer, .DeallocateBuffer = glxDeallocateBuffer, .Lock = glxLock, .Unlock = glxUnlock, .Read = glxRead, .Write = glxWrite, }; DirectFB-1.7.7/systems/x11/x11image.h0000644000175000017500000000530012254435330013775 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __X11SYSTEM__X11IMAGE_H__ #define __X11SYSTEM__X11IMAGE_H__ #include /* fundamentals X datas structures */ #include /* datas definitions for various functions */ #include /* for a perfect use of keyboard events */ #include #include #include #include "x11types.h" typedef struct { int magic; int width; int height; DFBSurfacePixelFormat format; int depth; Visual* visual; XImage* ximage; int pitch; XShmSegmentInfo seginfo; Pixmap pixmap; GC gc; } x11Image; DFBResult x11ImageInit ( DFBX11 *x11, x11Image *image, int width, int height, DFBSurfacePixelFormat format ); DFBResult x11ImageDestroy( DFBX11 *x11, x11Image *image ); DFBResult x11ImageAttach ( x11Image *image, void **ret_addr ); DFBResult x11ImageDetach ( x11Image *image, void *addr ); #endif /* __X11SYSTEM__X11IMAGE_H__ */ DirectFB-1.7.7/systems/x11/x11input.c0000644000175000017500000007713112463500054014056 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "xwindow.h" #include "primary.h" #include "x11.h" #include D_DEBUG_DOMAIN( X11_Input, "X11/Input", "X11 Input/Key/Mouse handling" ); DFB_INPUT_DRIVER( x11input ) /* * declaration of private data */ typedef struct { CoreInputDevice* device; DirectThread* thread; DFBX11* x11; bool stop; } X11InputData; static DFBInputEvent motionX = { .type = DIET_UNKNOWN, .axisabs = 0, .min = 0, }; static DFBInputEvent motionY = { .type = DIET_UNKNOWN, .axisabs = 0, .min = 0, }; static void motion_compress( int x, int y, const XEvent *xEvent ) { if (motionX.axisabs != x) { motionX.type = DIET_AXISMOTION; motionX.flags = DIEF_AXISABS | DIEF_TIMESTAMP; motionX.axis = DIAI_X; motionX.axisabs = x; motionX.timestamp.tv_sec = xEvent->xmotion.time / 1000; motionX.timestamp.tv_usec = (xEvent->xmotion.time % 1000) * 1000; } if (motionY.axisabs != y) { motionY.type = DIET_AXISMOTION; motionY.flags = DIEF_AXISABS | DIEF_TIMESTAMP; motionY.axis = DIAI_Y; motionY.axisabs = y; motionY.timestamp.tv_sec = xEvent->xmotion.time / 1000; motionY.timestamp.tv_usec = (xEvent->xmotion.time % 1000) * 1000; } } static void motion_realize( X11InputData *data ) { if (motionX.type != DIET_UNKNOWN) { if (motionY.type != DIET_UNKNOWN) motionX.flags |= DIEF_FOLLOW; motionX.max = data->x11->shared->update.xw->width - 1; // FIXME dfb_input_dispatch( data->device, &motionX ); motionX.type = DIET_UNKNOWN; } if (motionY.type != DIET_UNKNOWN) { motionY.max = data->x11->shared->update.xw->height - 1; // FIXME dfb_input_dispatch( data->device, &motionY ); motionY.type = DIET_UNKNOWN; } } static DFBInputDeviceKeyIdentifier xsymbol_to_id( KeySym xKeySymbol ) { switch (xKeySymbol) { case XK_a : return DIKI_A; case XK_b : return DIKI_B; case XK_c : return DIKI_C; case XK_d : return DIKI_D; case XK_e : return DIKI_E; case XK_f : return DIKI_F; case XK_g : return DIKI_G; case XK_h : return DIKI_H; case XK_i : return DIKI_I; case XK_j : return DIKI_J; case XK_k : return DIKI_K; case XK_l : return DIKI_L; case XK_m : return DIKI_M; case XK_n : return DIKI_N; case XK_o : return DIKI_O; case XK_p : return DIKI_P; case XK_q : return DIKI_Q; case XK_r : return DIKI_R; case XK_s : return DIKI_S; case XK_t : return DIKI_T; case XK_u : return DIKI_U; case XK_v : return DIKI_V; case XK_w : return DIKI_W; case XK_x : return DIKI_X; case XK_y : return DIKI_Y; case XK_z : return DIKI_Z; case XK_0 : return DIKI_0; case XK_1 : return DIKI_1; case XK_2 : return DIKI_2; case XK_3 : return DIKI_3; case XK_4 : return DIKI_4; case XK_5 : return DIKI_5; case XK_6 : return DIKI_6; case XK_7 : return DIKI_7; case XK_8 : return DIKI_8; case XK_9 : return DIKI_9; case XK_F1 : return DIKI_F1; case XK_F2 : return DIKI_F2; case XK_F3 : return DIKI_F3; case XK_F4 : return DIKI_F4; case XK_F5 : return DIKI_F5; case XK_F6 : return DIKI_F6; case XK_F7 : return DIKI_F7; case XK_F8 : return DIKI_F8; case XK_F9 : return DIKI_F9; case XK_F10 : return DIKI_F10; case XK_F11 : return DIKI_F11; case XK_F12 : return DIKI_F12; case XK_Shift_L : return DIKI_SHIFT_L; case XK_Shift_R : return DIKI_SHIFT_R; case XK_Control_L : return DIKI_CONTROL_L; case XK_Control_R : return DIKI_CONTROL_R; case XK_Alt_L : return DIKI_ALT_L; case XK_Alt_R : return DIKI_ALT_R; case XK_Meta_L : return DIKI_META_L; case XK_Meta_R : return DIKI_META_R; case XK_Super_L : return DIKI_SUPER_L; case XK_Super_R : return DIKI_SUPER_R; case XK_Hyper_L : return DIKI_HYPER_L; case XK_Hyper_R : return DIKI_HYPER_R; case XK_Mode_switch : return DIKI_ALT_R; case XK_Caps_Lock : return DIKI_CAPS_LOCK; case XK_Num_Lock : return DIKI_NUM_LOCK; case XK_Scroll_Lock : return DIKI_SCROLL_LOCK; case XK_Escape : return DIKI_ESCAPE; case XK_Left : return DIKI_LEFT; case XK_Right : return DIKI_RIGHT; case XK_Up : return DIKI_UP; case XK_Down : return DIKI_DOWN; case XK_Tab : return DIKI_TAB; case XK_ISO_Left_Tab : return DIKI_TAB; case XK_Return : return DIKI_ENTER; case XK_space : return DIKI_SPACE; case XK_BackSpace : return DIKI_BACKSPACE; case XK_Insert : return DIKI_INSERT; case XK_Delete : return DIKI_DELETE; case XK_Home : return DIKI_HOME; case XK_End : return DIKI_END; case XK_Page_Up : return DIKI_PAGE_UP; case XK_Page_Down : return DIKI_PAGE_DOWN; case XK_Print : return DIKI_PRINT; case XK_Pause : return DIKI_PAUSE; /* The labels on these keys depend on the type of keyboard. * We've choosen the names from a US keyboard layout. The * comments refer to the ISO 9995 terminology. */ case XK_quoteleft : return DIKI_QUOTE_LEFT; /* TLDE */ case XK_minus : return DIKI_MINUS_SIGN; /* AE11 */ case XK_equal : return DIKI_EQUALS_SIGN; /* AE12 */ case XK_bracketleft : return DIKI_BRACKET_LEFT; /* AD11 */ case XK_bracketright : return DIKI_BRACKET_RIGHT;/* AD12 */ case XK_backslash : return DIKI_BACKSLASH; /* BKSL */ case XK_semicolon : return DIKI_SEMICOLON; /* AC10 */ case XK_quoteright : return DIKI_QUOTE_RIGHT; /* AC11 */ case XK_comma : return DIKI_COMMA; /* AB08 */ case XK_period : return DIKI_PERIOD; /* AB09 */ case XK_slash : return DIKI_SLASH; /* AB10 */ case XK_less : return DIKI_LESS_SIGN; /* 103rd */ case XK_KP_Divide : return DIKI_KP_DIV; case XK_KP_Multiply : return DIKI_KP_MULT; case XK_KP_Subtract : return DIKI_KP_MINUS; case XK_KP_Add : return DIKI_KP_PLUS; case XK_KP_Enter : return DIKI_KP_ENTER; case XK_KP_Space : return DIKI_KP_SPACE; case XK_KP_Tab : return DIKI_KP_TAB; case XK_KP_F1 : return DIKI_KP_F1; case XK_KP_F2 : return DIKI_KP_F2; case XK_KP_F3 : return DIKI_KP_F3; case XK_KP_F4 : return DIKI_KP_F4; case XK_KP_Equal : return DIKI_KP_EQUAL; case XK_KP_Separator : return DIKI_KP_SEPARATOR; case XK_KP_Delete : return DIKI_KP_DECIMAL; case XK_KP_Insert : return DIKI_KP_0; case XK_KP_End : return DIKI_KP_1; case XK_KP_Down : return DIKI_KP_2; case XK_KP_Page_Down : return DIKI_KP_3; case XK_KP_Left : return DIKI_KP_4; case XK_KP_Begin : return DIKI_KP_5; case XK_KP_Right : return DIKI_KP_6; case XK_KP_Home : return DIKI_KP_7; case XK_KP_Up : return DIKI_KP_8; case XK_KP_Page_Up : return DIKI_KP_9; case XK_KP_Decimal : return DIKI_KP_DECIMAL; case XK_KP_0 : return DIKI_KP_0; case XK_KP_1 : return DIKI_KP_1; case XK_KP_2 : return DIKI_KP_2; case XK_KP_3 : return DIKI_KP_3; case XK_KP_4 : return DIKI_KP_4; case XK_KP_5 : return DIKI_KP_5; case XK_KP_6 : return DIKI_KP_6; case XK_KP_7 : return DIKI_KP_7; case XK_KP_8 : return DIKI_KP_8; case XK_KP_9 : return DIKI_KP_9; case 0 : break; default: D_DEBUG_AT( X11_Input, "Unknown key symbol 0x%lx\n", xKeySymbol); } return DIKI_UNKNOWN; } static DFBInputDeviceKeySymbol xsymbol_to_symbol( KeySym xKeySymbol ) { if (xKeySymbol >= 0x20 && xKeySymbol <= 0xff) return xKeySymbol; if (xKeySymbol >= XK_F1 && xKeySymbol <= XK_F35) return DFB_FUNCTION_KEY( xKeySymbol - XK_F1 + 1 ); switch (xKeySymbol) { case XK_Shift_L : return DIKS_SHIFT; case XK_Shift_R : return DIKS_SHIFT; case XK_Control_L : return DIKS_CONTROL; case XK_Control_R : return DIKS_CONTROL; case XK_Alt_L : return DIKS_ALT; case XK_Alt_R : return DIKS_ALT; case XK_Meta_L : return DIKS_META; case XK_Meta_R : return DIKS_META; case XK_Super_L : return DIKS_SUPER; case XK_Super_R : return DIKS_SUPER; case XK_Hyper_L : return DIKS_HYPER; case XK_Hyper_R : return DIKS_HYPER; case XK_Mode_switch : return DIKS_ALTGR; case XK_Caps_Lock : return DIKS_CAPS_LOCK; case XK_Num_Lock : return DIKS_NUM_LOCK; case XK_Scroll_Lock : return DIKS_SCROLL_LOCK; case XK_Escape : return DIKS_ESCAPE; case XK_Left : return DIKS_CURSOR_LEFT; case XK_Right : return DIKS_CURSOR_RIGHT; case XK_Up : return DIKS_CURSOR_UP; case XK_Down : return DIKS_CURSOR_DOWN; case XK_Tab : return DIKS_TAB; case XK_ISO_Left_Tab : return DIKS_TAB; case XK_Return : return DIKS_ENTER; case XK_space : return DIKS_SPACE; case XK_BackSpace : return DIKS_BACKSPACE; case XK_Insert : return DIKS_INSERT; case XK_Delete : return DIKS_DELETE; case XK_Home : return DIKS_HOME; case XK_End : return DIKS_END; case XK_Page_Up : return DIKS_PAGE_UP; case XK_Page_Down : return DIKS_PAGE_DOWN; case XK_Print : return DIKS_PRINT; case XK_Pause : return DIKS_PAUSE; case XK_KP_Divide : return DIKS_SLASH; case XK_KP_Multiply : return DIKS_ASTERISK; case XK_KP_Subtract : return DIKS_MINUS_SIGN; case XK_KP_Add : return DIKS_PLUS_SIGN; case XK_KP_Enter : return DIKS_ENTER; case XK_KP_Space : return DIKS_SPACE; case XK_KP_Tab : return DIKS_TAB; case XK_KP_F1 : return DIKS_F1; case XK_KP_F2 : return DIKS_F2; case XK_KP_F3 : return DIKS_F3; case XK_KP_F4 : return DIKS_F4; case XK_KP_Equal : return DIKS_EQUALS_SIGN; case XK_KP_Separator : return DIKS_COLON; /* FIXME: what is a separator */ case XK_KP_Delete : return DIKS_DELETE; case XK_KP_Insert : return DIKS_INSERT; case XK_KP_End : return DIKS_END; case XK_KP_Down : return DIKS_CURSOR_DOWN; case XK_KP_Page_Down : return DIKS_PAGE_DOWN; case XK_KP_Left : return DIKS_CURSOR_LEFT; case XK_KP_Begin : return DIKS_BEGIN; case XK_KP_Right : return DIKS_CURSOR_RIGHT; case XK_KP_Home : return DIKS_HOME; case XK_KP_Up : return DIKS_CURSOR_UP; case XK_KP_Page_Up : return DIKS_PAGE_UP; case XK_KP_Decimal : return DIKS_PERIOD; case XK_KP_0 : return DIKS_0; case XK_KP_1 : return DIKS_1; case XK_KP_2 : return DIKS_2; case XK_KP_3 : return DIKS_3; case XK_KP_4 : return DIKS_4; case XK_KP_5 : return DIKS_5; case XK_KP_6 : return DIKS_6; case XK_KP_7 : return DIKS_7; case XK_KP_8 : return DIKS_8; case XK_KP_9 : return DIKS_9; case 0 : break; default: D_DEBUG("X11: Unknown key symbol 0x%lx\n", xKeySymbol); } return DIKS_NULL; } static void handleMouseEvent(XEvent* pXEvent, X11InputData* pData, DFBX11 *x11) { static int iMouseEventCount = 0; DFBInputEvent dfbEvent; if (pXEvent->type == MotionNotify) { int x = pXEvent->xmotion.x; if (x11->shared->stereo) { x %= x11->shared->stereo_width; x *= 2; } motion_compress( x, pXEvent->xmotion.y, pXEvent ); ++iMouseEventCount; } if ( pXEvent->type == ButtonPress || pXEvent->type == ButtonRelease ) { if ( pXEvent->type == ButtonPress ) dfbEvent.type = DIET_BUTTONPRESS; else dfbEvent.type = DIET_BUTTONRELEASE; dfbEvent.flags = DIEF_TIMESTAMP; /* Get pressed button */ switch ( pXEvent->xbutton.button ) { case 1: dfbEvent.button = DIBI_LEFT; break; case 2: dfbEvent.button = DIBI_MIDDLE; break; case 3: dfbEvent.button = DIBI_RIGHT; break; //Wheel events case 4: /*up*/ case 5: /*down*/ case 6: /*left*/ case 7: /*right*/ if (pXEvent->type == ButtonPress) { dfbEvent.type = DIET_AXISMOTION; dfbEvent.flags = DIEF_AXISREL; dfbEvent.axis = DIAI_Z; /*SCROLL UP*/ if ( pXEvent->xbutton.button == 4 ) { dfbEvent.axisrel = -1; } /*SCROLL DOWN */ else if (pXEvent->xbutton.button == 5) { dfbEvent.axisrel = 1; } /*SCROLL LEFT*/ else if (pXEvent->xbutton.button == 6) { dfbEvent.axis = DIAI_X; dfbEvent.axisrel = -1; } /*SCROLL RIGHT*/ else if (pXEvent->xbutton.button == 7 ) { dfbEvent.axis = DIAI_X; dfbEvent.axisrel = 1; } } else return; break; default: break; } dfbEvent.timestamp.tv_sec = pXEvent->xbutton.time / 1000; dfbEvent.timestamp.tv_usec = (pXEvent->xbutton.time % 1000) * 1000; dfb_input_dispatch( pData->device, &dfbEvent ); ++iMouseEventCount; } } static void handle_expose_Async( void *ctx, void *ctx2 ) { DFBX11 *x11 = ctx; const XExposeEvent *expose = ctx2; CoreLayer *layer = 0; CoreLayerContext *context; int i; X11LayerData *lds; D_DEBUG_AT( X11_Input, "%s( %d,%d-%dx%d )\n", __FUNCTION__, expose->x, expose->y, expose->width, expose->height ); //D_INFO_LINE_MSG("handle_expose %d,%d-%dx%d", expose->x, expose->y, expose->width, expose->height); /* find the correct layer */ for( i=0; ilayer_data); if( lds->xw && (lds->xw->window == expose->window) ) break; } /* layer not found? */ if( i==dfb_layer_num() ) return; lds = layer->shared->layer_data; /* Get the currently active context. */ if (dfb_layer_get_active_context( layer, &context ) == DFB_OK) { CoreLayerRegion *region; /* Get the first region. */ if (dfb_layer_context_get_primary_region( context, false, ®ion ) == DFB_OK) { /* Lock the region. */ dfb_layer_region_lock( region ); /* Get the surface of the region. */ if (region->surface && D_FLAGS_ARE_SET( region->state, CLRSF_REALIZED )) { if (dfb_config->task_manager) { DFBRegion update = { expose->x, expose->y, expose->x + expose->width - 1, expose->y + expose->height - 1 }; /* Tell the driver about the update if the region is realized. */ D_DEBUG_AT( X11_Input, " -> Issuing display task...\n" ); dfb_surface_lock( region->surface ); DisplayTask_Generate( region, &update, &update, DSFLIP_NONE, -1, NULL ); dfb_surface_unlock( region->surface ); } else { if (lds->lock_left.buffer) { DFBRegion update = { expose->x, expose->y, expose->x + expose->width - 1, expose->y + expose->height - 1 }; dfb_x11_update_screen( x11, lds, &update, &update, &lds->lock_left, &lds->lock_right ); } } } /* Unlock the region. */ dfb_layer_region_unlock( region ); /* Release the region. */ dfb_layer_region_unref( region ); } /* Release the context. */ dfb_layer_context_unref( context ); } } /* * Input thread reading from device. * Generates events on incoming data. */ static void* x11EventThread( DirectThread *thread, void *driver_data ) { X11InputData *data = driver_data; DFBX11 *x11 = data->x11; int x11_fd = ConnectionNumber(x11->display); XExposeEvent expose_event = { 0 }; fd_set in_fds; struct timeval tv; while (!data->stop) { unsigned int pull = 2000; XEvent xEvent; DFBInputEvent dfbEvent; static int nextKeyIsRepeat = false; /* FIXME: Detect key repeats, we're receiving KeyPress, KeyRelease, KeyPress, KeyRelease... !!?? */ if (expose_event.type) { handle_expose_Async( x11, &expose_event ); expose_event.type = 0; } // Create a File Description Set containing x11_fd FD_ZERO(&in_fds); FD_SET(x11_fd, &in_fds); // Set our timer. tv.tv_sec = 0; tv.tv_usec = 20000; // Wait for X Event or a Timer if (select(x11_fd+1, &in_fds, 0, 0, &tv)) { XLockDisplay( x11->display ); while (!data->stop && pull-- && XPending( x11->display )) { XNextEvent( x11->display, &xEvent ); //D_INFO_LINE_MSG("x11 event %d",xEvent.type); /* is this key repeat? idea from GII */ if ( (xEvent.type == KeyRelease) && (XPending( x11->display )) ) { XEvent peekEvent; XPeekEvent( x11->display, &peekEvent ); if ( (peekEvent.type == KeyPress) && (peekEvent.xkey.keycode == xEvent.xkey.keycode) && (peekEvent.xkey.time - xEvent.xkey.time < 2) ) { nextKeyIsRepeat = true; } } XUnlockDisplay( x11->display ); D_DEBUG_AT( X11_Input, "Event received: %d\n", xEvent.type ); switch (xEvent.type) { case ButtonPress: case ButtonRelease: motion_realize( data ); case MotionNotify: handleMouseEvent( &xEvent, data, x11 ); // crash ??? break; case KeyPress: case KeyRelease: motion_realize( data ); dfbEvent.type = (xEvent.type == KeyPress) ? DIET_KEYPRESS : DIET_KEYRELEASE; dfbEvent.flags = DIEF_KEYCODE | DIEF_TIMESTAMP; dfbEvent.key_code = xEvent.xkey.keycode; dfbEvent.timestamp.tv_sec = xEvent.xkey.time / 1000; dfbEvent.timestamp.tv_usec = (xEvent.xkey.time % 1000) * 1000; if ( (xEvent.type == KeyPress) && nextKeyIsRepeat ) { nextKeyIsRepeat = false; dfbEvent.flags |= DIEF_REPEAT; } dfb_input_dispatch( data->device, &dfbEvent ); break; case Expose: //D_INFO_LINE_MSG("<- expose %d,%d-%dx%d", // xEvent.xexpose.x, xEvent.xexpose.y, xEvent.xexpose.width, xEvent.xexpose.height); if (expose_event.type != 0) { DFBRegion e1 = { expose_event.x, expose_event.y, expose_event.x + expose_event.width - 1, expose_event.y + expose_event.height - 1 }; DFBRegion e2 = { xEvent.xexpose.x, xEvent.xexpose.y, xEvent.xexpose.x + xEvent.xexpose.width - 1, xEvent.xexpose.y + xEvent.xexpose.height - 1 }; dfb_region_region_union( &e1, &e2 ); expose_event.x = e1.x1; expose_event.y = e1.y1; expose_event.width = e1.x2 - e1.x1 + 1; expose_event.height = e1.y2 - e1.y1 + 1; } else expose_event = xEvent.xexpose; //D_INFO_LINE_MSG("-> expose %d,%d-%dx%d", // expose_event.x, expose_event.y, expose_event.width, expose_event.height); break; case DestroyNotify: /* this event is mainly to unblock XNextEvent. */ break; default: break; } XLockDisplay( x11->display ); } XUnlockDisplay( x11->display ); if (!data->stop) motion_realize( data ); } } return NULL; } /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available( void ) { return dfb_system_type() == CORE_X11; } /* * Fill out general information about this driver. * Called once during initialization of DirectFB. */ static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf ( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "X11 Input Driver" ); snprintf ( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 0; info->version.minor = 1; } /* * Open the device, fill out information about it, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { X11InputData *data; DFBX11 *x11 = dfb_system_data(); D_DEBUG_AT( X11_Input, "%s()\n", __FUNCTION__ ); /* set device vendor and name */ snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "XServer" ); snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "X11 Input" ); /* set one of the primary input device IDs */ info->prefered_id = DIDID_KEYBOARD; /* set type flags */ info->desc.type = DIDTF_JOYSTICK | DIDTF_KEYBOARD | DIDTF_MOUSE; /* set capabilities */ info->desc.caps = DICAPS_ALL; /* enable translation of fake raw hardware keycodes */ info->desc.min_keycode = 8; info->desc.max_keycode = 255; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(X11InputData) ); data->device = device; data->x11 = x11; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, x11EventThread, data, "X11 Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. * this does a fake mapping based on the orginal DFB code */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { int i; X11InputData *data = driver_data; DFBX11 *x11 = data->x11; XLockDisplay( x11->display ); for (i=0; i<4; i++) { KeySym xSymbol = XkbKeycodeToKeysym( x11->display, entry->code, 0, i ); if (i == 0) entry->identifier = xsymbol_to_id( xSymbol ); entry->symbols[i] = xsymbol_to_symbol( xSymbol ); } XUnlockDisplay( x11->display ); /* is CapsLock effective? */ if (entry->identifier >= DIKI_A && entry->identifier <= DIKI_Z) entry->locks |= DILS_CAPS; /* is NumLock effective? */ if (entry->identifier >= DIKI_KP_DECIMAL && entry->identifier <= DIKI_KP_9) entry->locks |= DILS_NUM; return DFB_OK; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { X11InputData *data = driver_data; DFBX11 *x11 = data->x11; DFBX11Shared *shared = x11->shared; D_DEBUG_AT( X11_Input, "%s()\n", __FUNCTION__ ); /* stop input thread */ data->stop = true; if (!shared->x_error) { XLockDisplay( x11->display ); XSync( x11->display, False ); XUnlockDisplay( x11->display ); } /* it is possible that this "close" function is called from the same * thread that the input device is actually running on. * This happens when you e.g. click the close box with your mouse. * As a fix, we check if we are this thread. */ if (data->thread != direct_thread_self()) { direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); } /* free private data */ D_FREE ( data ); } DirectFB-1.7.7/systems/x11/glx_surface_pool.h0000644000175000017500000000420012254435330015712 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __X11SYSTEM__GLX_SURFACE_POOL_H__ #define __X11SYSTEM__GLX_SURFACE_POOL_H__ #include #include #include extern const SurfacePoolFuncs glxSurfacePoolFuncs; typedef struct { int magic; /* Shared resource */ Pixmap pixmap; int depth; } glxAllocationData; typedef struct { int magic; GLBufferData buffer; /* Shared resource */ Pixmap pixmap; /* Process local data */ GC gc; GLXFBConfig config; GLXDrawable drawable; /* Bound to a thread's context? */ GLXContext current; GLXContext bound; } LocalPixmap; typedef struct { Display *display; /* Thread local data */ GLXContext context; GLXDrawable drawable; } ThreadContext; #endif DirectFB-1.7.7/systems/x11/primary.c0000644000175000017500000011501612466165576014066 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef USE_GLX #include #include "glx_surface_pool.h" #endif #include "xwindow.h" #include "x11.h" #include "primary.h" D_DEBUG_DOMAIN( X11_Layer, "X11/Layer", "X11 Layer" ); D_DEBUG_DOMAIN( X11_Update, "X11/Update", "X11 Update" ); /**********************************************************************************************************************/ static DFBResult dfb_x11_create_window( DFBX11 *x11, X11LayerData *lds, const CoreLayerRegionConfig *config ) { int ret; DFBX11Shared *shared = x11->shared; D_ASSERT( config != NULL ); shared->setmode.config = *config; shared->setmode.xw = &(lds->xw); if (fusion_call_execute( &shared->call, FCEF_NONE, X11_CREATE_WINDOW, &shared->setmode, &ret )) return DFB_FUSION; return ret; } static DFBResult dfb_x11_destroy_window( DFBX11 *x11, X11LayerData *lds ) { int ret; DFBX11Shared *shared = x11->shared; shared->destroy.xw = &(lds->xw); if (fusion_call_execute( &shared->call, FCEF_NONE, X11_DESTROY_WINDOW, &shared->destroy, &ret )) return DFB_FUSION; return ret; } DFBResult dfb_x11_update_screen( DFBX11 *x11, X11LayerData *lds, const DFBRegion *left_region, const DFBRegion *right_region, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { int ret; DFBX11Shared *shared = x11->shared; DFB_REGION_ASSERT( left_region ); D_ASSERT( left_lock != NULL ); /* FIXME: Just a hot fix! */ if (shared->update.left_lock.buffer) { D_ONCE( "using x11 update hotfix" ); return DFB_OK; } shared->update.xw = lds->xw; shared->update.left_region = *left_region; shared->update.left_lock = *left_lock; shared->update.stereo = (lds->config.options & DLOP_STEREO); if (shared->update.stereo) { DFB_REGION_ASSERT( right_region ); D_ASSERT( right_lock != NULL ); shared->update.right_region = *right_region; shared->update.right_lock = *right_lock; } if (fusion_call_execute( &shared->call, FCEF_NONE, X11_UPDATE_SCREEN, &shared->update, &ret )) return DFB_FUSION; return ret; } static DFBResult dfb_x11_set_palette( DFBX11 *x11, X11LayerData *lds, CorePalette *palette ) { int ret; DFBX11Shared *shared = x11->shared; D_ASSERT( palette != NULL ); if (fusion_call_execute( &shared->call, FCEF_NONE, X11_SET_PALETTE, palette, &ret )) return DFB_FUSION; return ret; } /**********************************************************************************************************************/ static DFBResult primaryInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); /* Set the screen capabilities. */ description->caps = DSCCAPS_ENCODERS | DSCCAPS_OUTPUTS; description->encoders = 1; description->outputs = 1; /* Set the screen name. */ snprintf( description->name, DFB_SCREEN_DESC_NAME_LENGTH, "X11 Primary Screen" ); return DFB_OK; } static DFBResult primaryGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); *ret_width = shared->screen_size.w; *ret_height = shared->screen_size.h; return DFB_OK; } static DFBResult primaryInitEncoder( CoreScreen *screen, void *driver_data, void *screen_data, int encoder, DFBScreenEncoderDescription *description, DFBScreenEncoderConfig *config ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; (void) shared; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); direct_snputs( description->name, "X11 Encoder", DFB_SCREEN_ENCODER_DESC_NAME_LENGTH ); description->caps = DSECAPS_TV_STANDARDS | DSECAPS_SCANMODE | DSECAPS_FREQUENCY | DSECAPS_CONNECTORS | DSECAPS_RESOLUTION | DSECAPS_FRAMING; description->type = DSET_DIGITAL; description->tv_standards = DSETV_DIGITAL; description->all_connectors = DSOC_COMPONENT | DSOC_HDMI; description->all_resolutions = DSOR_640_480 | DSOR_720_480 | DSOR_720_576 | DSOR_800_600 | DSOR_1024_768 | DSOR_1152_864 | DSOR_1280_720 | DSOR_1280_768 | DSOR_1280_960 | DSOR_1280_1024 | DSOR_1400_1050 | DSOR_1600_1200 | DSOR_1920_1080 | DSOR_960_540 | DSOR_1440_540; config->flags = DSECONF_TV_STANDARD | DSECONF_SCANMODE | DSECONF_FREQUENCY | DSECONF_CONNECTORS | DSECONF_RESOLUTION | DSECONF_FRAMING; config->tv_standard = DSETV_DIGITAL; config->out_connectors = DSOC_COMPONENT | DSOC_HDMI; config->scanmode = DSESM_PROGRESSIVE; config->frequency = DSEF_60HZ; config->framing = DSEPF_MONO; config->resolution = DSOR_1280_720; return DFB_OK; } static DFBResult primaryTestEncoderConfig( CoreScreen *screen, void *driver_data, void *screen_data, int encoder, const DFBScreenEncoderConfig *config, DFBScreenEncoderConfigFlags *failed ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; (void) shared; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primarySetEncoderConfig( CoreScreen *screen, void *driver_data, void *screen_data, int encoder, const DFBScreenEncoderConfig *config ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; int hor[] = { 640,720,720,800,1024,1152,1280,1280,1280,1280,1400,1600,1920 }; int ver[] = { 480,480,576,600, 768, 864, 720, 768, 960,1024,1050,1200,1080 }; int res; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); (void)encoder; /* all outputs are active */ res = D_BITn32(config->resolution); if ( (res == -1) || (res >= D_ARRAY_SIZE(hor)) ) return DFB_INVARG; shared->screen_size.w = hor[res]; shared->screen_size.h = ver[res]; return DFB_OK; } static DFBResult primaryInitOutput( CoreScreen *screen, void *driver_data, void *screen_data, int output, DFBScreenOutputDescription *description, DFBScreenOutputConfig *config ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; (void) shared; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); direct_snputs( description->name, "X11 Output", DFB_SCREEN_OUTPUT_DESC_NAME_LENGTH ); description->caps = DSOCAPS_RESOLUTION; config->flags |= DSOCONF_RESOLUTION; config->resolution = DSOR_UNKNOWN; return DFB_OK; } static DFBResult primaryTestOutputConfig( CoreScreen *screen, void *driver_data, void *screen_data, int output, const DFBScreenOutputConfig *config, DFBScreenOutputConfigFlags *failed ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; (void) shared; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primarySetOutputConfig( CoreScreen *screen, void *driver_data, void *screen_data, int output, const DFBScreenOutputConfig *config ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; int hor[] = { 640,720,720,800,1024,1152,1280,1280,1280,1280,1400,1600,1920 }; int ver[] = { 480,480,576,600, 768, 864, 720, 768, 960,1024,1050,1200,1080 }; int res; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); (void)output; /* all outputs are active */ /* we support screen resizing only */ if (config->flags != DSOCONF_RESOLUTION) return DFB_INVARG; res = D_BITn32(config->resolution); if ( (res == -1) || (res >= D_ARRAY_SIZE(hor)) ) return DFB_INVARG; shared->screen_size.w = hor[res]; shared->screen_size.h = ver[res]; return DFB_OK; } static ScreenFuncs primaryScreenFuncs = { .InitScreen = primaryInitScreen, .GetScreenSize = primaryGetScreenSize, .InitEncoder = primaryInitEncoder, .TestEncoderConfig = primaryTestEncoderConfig, .SetEncoderConfig = primarySetEncoderConfig, .InitOutput = primaryInitOutput, .TestOutputConfig = primaryTestOutputConfig, .SetOutputConfig = primarySetOutputConfig }; ScreenFuncs *x11PrimaryScreenFuncs = &primaryScreenFuncs; /******************************************************************************/ static int primaryLayerDataSize( void ) { return sizeof(X11LayerData); } static int primaryRegionDataSize( void ) { return 0; } static DFBResult primaryInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; char *name; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); { static int layer_counter = 0; X11LayerData *lds = layer_data; char *names[] = { "Primary", "Secondary", "Tertiary" }; name = "Other"; if( layer_counter < 3 ) name = names[layer_counter]; lds->layer_id = layer_counter; layer_counter++; } /* set capabilities and type */ description->caps = DLCAPS_SURFACE | DLCAPS_LR_MONO | DLCAPS_STEREO; description->type = DLTF_GRAPHICS; description->surface_accessor = CSAID_CPU; /* set name */ snprintf( description->name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "X11 %s Layer", name ); /* fill out the default configuration */ config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->buffermode = DLBM_FRONTONLY; if (dfb_config->mode.width) config->width = dfb_config->mode.width; else config->width = shared->screen_size.w; if (dfb_config->mode.height) config->height = dfb_config->mode.height; else config->height = shared->screen_size.h; if (dfb_config->mode.format != DSPF_UNKNOWN) config->pixelformat = dfb_config->mode.format; else if (dfb_config->mode.depth > 0) config->pixelformat = dfb_pixelformat_for_depth( dfb_config->mode.depth ); else { int depth = DefaultDepthOfScreen( x11->screenptr ); switch (depth) { case 15: config->pixelformat = DSPF_RGB555; break; case 16: config->pixelformat = DSPF_RGB16; break; case 24: config->pixelformat = DSPF_RGB32; break; case 32: config->pixelformat = DSPF_ARGB; break; default: printf(" Unsupported X11 screen depth %d \n",depth); return DFB_UNSUPPORTED; } } return DFB_OK; } static DFBResult primaryTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *failed ) { CoreLayerRegionConfigFlags fail = 0; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); switch (config->buffermode) { case DLBM_FRONTONLY: case DLBM_BACKSYSTEM: case DLBM_BACKVIDEO: case DLBM_TRIPLE: break; default: fail |= CLRCF_BUFFERMODE; break; } switch (config->format) { case DSPF_LUT8: case DSPF_RGB16: case DSPF_NV16: case DSPF_RGB444: case DSPF_ARGB4444: case DSPF_RGBA4444: case DSPF_RGB555: case DSPF_ARGB1555: case DSPF_RGBA5551: case DSPF_BGR555: case DSPF_RGB24: case DSPF_RGB32: case DSPF_ARGB: case DSPF_ABGR: case DSPF_AYUV: case DSPF_AVYU: case DSPF_VYU: case DSPF_UYVY: case DSPF_ARGB8565: case DSPF_RGBAF88871: case DSPF_YUV444P: case DSPF_YV16: break; default: fail |= CLRCF_FORMAT; break; } if (config->options & ~(DLOP_ALPHACHANNEL | DLOP_LR_MONO | DLOP_STEREO | DLOP_OPACITY)) fail |= CLRCF_OPTIONS; if (failed) *failed = fail; if (fail) { D_INFO("failed flags 0x%08x\n", fail); return DFB_UNSUPPORTED; } return DFB_OK; } static DFBResult primaryAddRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config ) { return DFB_OK; } static DFBResult primarySetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { DFBResult ret; DFBX11 *x11 = driver_data; X11LayerData *lds = layer_data; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); if (x11->shared->x_error) return DFB_FAILURE; if (lds->lock_left.allocation) dfb_surface_allocation_unref( lds->lock_left.allocation ); if (lds->lock_right.allocation) dfb_surface_allocation_unref( lds->lock_right.allocation ); memset( &lds->lock_left, 0, sizeof(lds->lock_left) ); memset( &lds->lock_right, 0, sizeof(lds->lock_right) ); ret = dfb_surface_ref( surface ); if (ret) return ret; if (lds->surface) dfb_surface_unref( lds->surface ); lds->surface = surface; lds->config = *config; ret = dfb_x11_create_window( x11, lds, config ); if (ret) return ret; x11->shared->stereo = !!(lds->config.options & DLOP_STEREO); x11->shared->stereo_width = lds->config.width / 2; if (palette) dfb_x11_set_palette( x11, lds, palette ); return DFB_OK; } static DFBResult primarySetStereoDepth( CoreLayer *layer, void *driver_data, void *layer_data, bool follow_video, int z ) { return DFB_OK; } static DFBResult primaryRemoveRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ) { DFBX11 *x11 = driver_data; X11LayerData *lds = layer_data; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); if (lds->surface) { dfb_surface_unref( lds->surface ); lds->surface = NULL; } if (lds->lock_left.allocation) dfb_surface_allocation_unref( lds->lock_left.allocation ); if (lds->lock_right.allocation) dfb_surface_allocation_unref( lds->lock_right.allocation ); memset( &lds->lock_left, 0, sizeof(lds->lock_left) ); memset( &lds->lock_right, 0, sizeof(lds->lock_right) ); if (x11->shared->x_error) return DFB_FAILURE; dfb_x11_destroy_window( x11, lds ); return DFB_OK; } static DFBResult primaryFlipUpdate( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock, bool flip ) { DFBX11 *x11 = driver_data; X11LayerData *lds = layer_data; DFBRegion left_region = DFB_REGION_INIT_FROM_DIMENSION( &surface->config.size ); DFBRegion right_region = DFB_REGION_INIT_FROM_DIMENSION( &surface->config.size ); D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); if (left_update) DFB_REGIONS_DEBUG_AT( X11_Layer, left_update, 1 ); if (right_update) DFB_REGIONS_DEBUG_AT( X11_Layer, right_update, 1 ); if (x11->shared->x_error) return DFB_FAILURE; if (left_update && !dfb_region_region_intersect( &left_region, left_update )) return DFB_OK; if (right_update && !dfb_region_region_intersect( &right_region, right_update )) return DFB_OK; if (flip) dfb_surface_flip( surface, false ); if (lds->lock_left.allocation) dfb_surface_allocation_unref( lds->lock_left.allocation ); if (lds->lock_right.allocation) dfb_surface_allocation_unref( lds->lock_right.allocation ); lds->lock_left = *left_lock; dfb_surface_allocation_ref( lds->lock_left.allocation ); dfb_surface_notify_display2( surface, left_lock->allocation->index, left_lock->task ); if (lds->config.options & DLOP_STEREO) { lds->lock_right = *right_lock; dfb_surface_allocation_ref( lds->lock_right.allocation ); dfb_surface_notify_display2( surface, right_lock->allocation->index, right_lock->task ); } else memset( &lds->lock_right, 0, sizeof(lds->lock_right) ); dfb_x11_update_screen( x11, lds, &left_region, &right_region, left_lock, right_lock ); if (left_lock->task) Task_Done( left_lock->task ); return DFB_OK; } static DFBResult primaryFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { return primaryFlipUpdate( layer, driver_data, layer_data, region_data, surface, left_update, left_lock, right_update, right_lock, true ); } static DFBResult primaryUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { return primaryFlipUpdate( layer, driver_data, layer_data, region_data, surface, left_update, left_lock, right_update, right_lock, false ); } static DisplayLayerFuncs primaryLayerFuncs = { .LayerDataSize = primaryLayerDataSize, .RegionDataSize = primaryRegionDataSize, .InitLayer = primaryInitLayer, .TestRegion = primaryTestRegion, .AddRegion = primaryAddRegion, .SetRegion = primarySetRegion, .SetStereoDepth = primarySetStereoDepth, .RemoveRegion = primaryRemoveRegion, .FlipRegion = primaryFlipRegion, .UpdateRegion = primaryUpdateRegion, }; DisplayLayerFuncs *x11PrimaryLayerFuncs = &primaryLayerFuncs; /******************************************************************************/ static DFBResult update_screen( DFBX11 *x11, const DFBRectangle *clip, CoreSurfaceBufferLock *lock, XWindow *xw ) { void *dst; u8 *srces[3] = { 0 }; int pitches[3] = { 0 }; unsigned int offset = 0; XImage *ximage; CoreSurfaceAllocation *allocation; DFBX11Shared *shared; DFBRectangle rect; bool direct = false; D_ASSERT( x11 != NULL ); DFB_RECTANGLE_ASSERT( clip ); D_DEBUG_AT( X11_Update, "%s( %4d,%4d-%4dx%4d )\n", __FUNCTION__, DFB_RECTANGLE_VALS( clip ) ); CORE_SURFACE_BUFFER_LOCK_ASSERT( lock ); shared = x11->shared; D_ASSERT( shared != NULL ); XLockDisplay( x11->display ); if (!xw) { XUnlockDisplay( x11->display ); return DFB_OK; } allocation = lock->allocation; CORE_SURFACE_ALLOCATION_ASSERT( allocation ); rect.x = rect.y = 0; rect.w = xw->width; rect.h = xw->height; if (!dfb_rectangle_intersect( &rect, clip )) { XUnlockDisplay( x11->display ); return DFB_OK; } D_DEBUG_AT( X11_Update, " -> %4d,%4d-%4dx%4d\n", DFB_RECTANGLE_VALS( &rect ) ); #ifdef USE_GLX /* Check for GLX allocation... */ if (allocation->pool == shared->glx_pool && lock->handle) { LocalPixmap *pixmap = lock->handle; D_MAGIC_ASSERT( pixmap, LocalPixmap ); /* ...and just call SwapBuffers... */ //D_DEBUG_AT( X11_Update, " -> Calling glXSwapBuffers( 0x%lx )...\n", alloc->drawable ); //glXSwapBuffers( x11->display, alloc->drawable ); D_DEBUG_AT( X11_Update, " -> Copying from GLXPixmap...\n" ); glXWaitGL(); XCopyArea( x11->display, pixmap->pixmap, xw->window, xw->gc, rect.x, rect.y, rect.w, rect.h, rect.x, rect.y ); glXWaitX(); XUnlockDisplay( x11->display ); return DFB_OK; } #endif /* Check for our special native allocation... */ if (allocation->pool == shared->x11image_pool && lock->handle) { x11Image *image = lock->handle; D_MAGIC_ASSERT( image, x11Image ); /* ...and directly XShmPutImage from that. */ ximage = image->ximage; direct = true; } else { /* ...or copy or convert into XShmImage or XImage allocated with the XWindow. */ ximage = xw->ximage; offset = xw->ximage_offset; xw->ximage_offset = (offset ? 0 : ximage->height / 2); /* make sure the 16-bit input formats are properly 2-pixel-clipped */ switch (allocation->config.format) { case DSPF_I420: case DSPF_YV12: case DSPF_NV12: case DSPF_NV21: if (rect.y & 1) { rect.y--; rect.h++; } /* fall through */ case DSPF_YUY2: case DSPF_UYVY: case DSPF_NV16: if (rect.x & 1) { rect.x--; rect.w++; } default: /* no action */ break; } dst = xw->virtualscreen + rect.x * xw->bpp + (rect.y + offset) * ximage->bytes_per_line; dfb_surface_get_data_offsets( &allocation->config, lock->addr, lock->pitch, rect.x, rect.y, 3, srces, pitches ); switch (xw->depth) { case 32: dfb_convert_to_argb( allocation->config.format, srces[0], pitches[0], srces[1], pitches[1], srces[2], pitches[2], allocation->config.size.h, dst, ximage->bytes_per_line, rect.w, rect.h ); break; case 24: dfb_convert_to_rgb32( allocation->config.format, srces[0], pitches[0], srces[1], pitches[1], srces[2], pitches[2], allocation->config.size.h, dst, ximage->bytes_per_line, rect.w, rect.h ); break; case 16: if (allocation->config.format == DSPF_LUT8) { int width = rect.w; int height = rect.h; const u8 *src8 = srces[0]; u16 *dst16 = dst; CorePalette *palette = allocation->surface->palette;//FIXME int x; while (height--) { for (x=0; xentries[src8[x]]; dst16[x] = PIXEL_RGB16( color.r, color.g, color.b ); } src8 += pitches[0]; dst16 += ximage->bytes_per_line / 2; } } else { dfb_convert_to_rgb16( allocation->config.format, srces[0], pitches[0], srces[1], pitches[1], srces[2], pitches[2], allocation->config.size.h, dst, ximage->bytes_per_line, rect.w, rect.h ); } break; case 15: dfb_convert_to_rgb555( allocation->config.format, srces[0], pitches[0], srces[1], pitches[1], srces[2], pitches[2], allocation->config.size.h, dst, ximage->bytes_per_line, rect.w, rect.h ); break; default: D_ONCE( "unsupported depth %d", xw->depth ); } } D_ASSERT( ximage != NULL ); /* Wait for previous data to be processed... */ XSync( x11->display, False ); /* ...and immediately queue or send the next! */ if (x11->use_shm) { /* Just queue the command, it's XShm :) */ XShmPutImage( xw->display, xw->window, xw->gc, ximage, rect.x, rect.y + offset, rect.x, rect.y, rect.w, rect.h, False ); /* Make sure the queue has really happened! */ XFlush( x11->display ); } else /* Initiate transfer of buffer... */ XPutImage( xw->display, xw->window, xw->gc, ximage, rect.x, rect.y + offset, rect.x, rect.y, rect.w, rect.h ); /* Wait for display if single buffered and not converted... */ if (direct && !(allocation->config.caps & DSCAPS_FLIPPING)) XSync( x11->display, False ); XUnlockDisplay( x11->display ); return DFB_OK; } static void update_scaled565( XWindow *xw, const DFBRectangle *clip, CoreSurfaceBufferLock *lock, int xoffset ) { u32 *dst; u32 *src; int x, y; D_ASSERT( xw != NULL ); DFB_RECTANGLE_ASSERT( clip ); D_DEBUG_AT( X11_Update, "%s( %4d,%4d-%4dx%4d )\n", __FUNCTION__, DFB_RECTANGLE_VALS( clip ) ); CORE_SURFACE_BUFFER_LOCK_ASSERT( lock ); dst = (u32*)(xw->virtualscreen + ((clip->x / 2) + xoffset) * xw->bpp + (clip->y + xw->ximage_offset) * xw->ximage->bytes_per_line); src = lock->addr + 2 * clip->x + clip->y * lock->pitch; for (y=0; yh; y++) { for (x=0; xw/2; x++) { u32 S2 = src[x]; u16 result; S2 &= ~0x08210821; S2 >>= 1; result = (S2 & 0xffff) + (S2 >> 16); dst[x] = RGB16_TO_RGB32( result ); } dst = (u32*)((u8*) dst + xw->ximage->bytes_per_line); src = (u32*)((u8*) src + lock->pitch); } } static void update_scaled32( XWindow *xw, const DFBRectangle *clip, CoreSurfaceBufferLock *lock, int xoffset ) { u32 *dst; u64 *src; int x, y; D_ASSERT( xw != NULL ); DFB_RECTANGLE_ASSERT( clip ); D_DEBUG_AT( X11_Update, "%s( %4d,%4d-%4dx%4d )\n", __FUNCTION__, DFB_RECTANGLE_VALS( clip ) ); CORE_SURFACE_BUFFER_LOCK_ASSERT( lock ); dst = (u32*)(xw->virtualscreen + ((clip->x / 2) + xoffset) * xw->bpp + (clip->y + xw->ximage_offset) * xw->ximage->bytes_per_line); src = lock->addr + 4 * clip->x + clip->y * lock->pitch; for (y=0; yh; y++) { for (x=0; xw/2; x++) { u64 S2 = src[x]; S2 &= ~0x0101010101010101ULL; S2 >>= 1; dst[x] = ((u32) S2) + ((u32) (S2 >> 32)); } dst = (u32*)((u8*) dst + xw->ximage->bytes_per_line); src = (u64*)((u8*) src + lock->pitch); } } static DFBResult update_stereo( DFBX11 *x11, const DFBRectangle *left_clip, const DFBRectangle *right_clip, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock, XWindow *xw ) { CoreSurface *surface; DFBRectangle left; DFBRectangle right; D_ASSERT( x11 != NULL ); DFB_RECTANGLE_ASSERT( left_clip ); DFB_RECTANGLE_ASSERT( right_clip ); D_DEBUG_AT( X11_Update, "%s( %4d,%4d-%4dx%4d | %4d,%4d-%4dx%4d )\n", __FUNCTION__, DFB_RECTANGLE_VALS( left_clip ), DFB_RECTANGLE_VALS( right_clip ) ); CORE_SURFACE_BUFFER_LOCK_ASSERT( left_lock ); CORE_SURFACE_BUFFER_LOCK_ASSERT( right_lock ); XLockDisplay( x11->display ); if (!xw) { XUnlockDisplay( x11->display ); return DFB_OK; } D_ASSERT( left_lock->allocation->surface == right_lock->allocation->surface ); surface = left_lock->allocation->surface; D_ASSERT( surface != NULL ); if (!left_lock->addr || !right_lock->addr) return DFB_UNSUPPORTED; xw->ximage_offset = (xw->ximage_offset ? 0 : xw->height); left = *left_clip; right = *right_clip; if (left.x & 1) { left.x--; left.w++; } if (left.w & 1) left.w++; if (right.x & 1) { right.x--; right.w++; } if (right.w & 1) right.w++; switch (surface->config.format) { case DSPF_RGB16: update_scaled565( xw, &left, left_lock, 0 ); update_scaled565( xw, &right, right_lock, xw->width / 2 ); break; case DSPF_ARGB: case DSPF_RGB32: update_scaled32( xw, &left, left_lock, 0 ); update_scaled32( xw, &right, right_lock, xw->width / 2 ); break; default: return DFB_UNSUPPORTED; } left.x /= 2; left.w /= 2; right.x /= 2; right.w /= 2; right.x += xw->width/2; /* Wait for previous data to be processed... */ XSync( x11->display, False ); /* ...and immediately queue or send the next! */ if (x11->use_shm) { /* Just queue the command, it's XShm :) */ XShmPutImage( xw->display, xw->window, xw->gc, xw->ximage, left.x, left.y + xw->ximage_offset, left.x, left.y, left.w, left.h, False ); /* Just queue the command, it's XShm :) */ XShmPutImage( xw->display, xw->window, xw->gc, xw->ximage, right.x, right.y + xw->ximage_offset, right.x, right.y, right.w, right.h, False ); /* Make sure the queue has really happened! */ XFlush( x11->display ); } else { /* Initiate transfer of buffer... */ XPutImage( xw->display, xw->window, xw->gc, xw->ximage, left.x, left.y + xw->ximage_offset, left.x, left.y, left.w, left.h ); /* Initiate transfer of buffer... */ XPutImage( xw->display, xw->window, xw->gc, xw->ximage, right.x, right.y + xw->ximage_offset, right.x, right.y, right.w, right.h ); } XUnlockDisplay( x11->display ); return DFB_OK; } /******************************************************************************/ DFBResult dfb_x11_create_window_handler( DFBX11 *x11, SetModeData *setmode ) { XWindow *xw; DFBX11Shared *shared = x11->shared; CoreLayerRegionConfig *config; config = &setmode->config; xw = *(setmode->xw); D_DEBUG_AT( X11_Layer, "%s( %p )\n", __FUNCTION__, config ); D_DEBUG_AT( X11_Layer, " -> %4dx%4d %s\n", config->width, config->height, dfb_pixelformat_name(config->format) ); XLockDisplay( x11->display ); if (xw != NULL) { if (xw->width == config->width && xw->height == config->height) { XUnlockDisplay( x11->display ); return DFB_OK; } *(setmode->xw) = NULL; dfb_x11_close_window( x11, xw ); shared->window_count--; } bool bSucces = dfb_x11_open_window( x11, &xw, dfb_config->x11_position.x, dfb_config->x11_position.y, config->width, config->height, config->format ); /* Set video mode */ if ( !bSucces ) { D_ERROR( "DirectFB/X11: Couldn't open %dx%d window!\n", config->width, config->height ); XUnlockDisplay( x11->display ); return DFB_FAILURE; } else { *(setmode->xw) = xw; shared->window_count++; } XUnlockDisplay( x11->display ); return DFB_OK; } DFBResult dfb_x11_destroy_window_handler( DFBX11 *x11, DestroyData *destroy ) { DFBX11Shared *shared = x11->shared; XWindow *xw; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); XLockDisplay( x11->display ); xw = *(destroy->xw); if (xw) { *(destroy->xw) = NULL; dfb_x11_close_window( x11, xw ); shared->window_count--; } XSync( x11->display, False ); XUnlockDisplay( x11->display ); return DFB_OK; } DFBResult dfb_x11_update_screen_handler( DFBX11 *x11, UpdateScreenData *data ) { D_DEBUG_AT( X11_Update, "%s( %p )\n", __FUNCTION__, data ); if (data->stereo) { DFBRectangle left_rect; DFBRectangle right_rect; left_rect = DFB_RECTANGLE_INIT_FROM_REGION( &data->left_region ); right_rect = DFB_RECTANGLE_INIT_FROM_REGION( &data->right_region ); if (data->left_lock.buffer && data->right_lock.buffer) update_stereo( x11, &left_rect, &right_rect, &data->left_lock, &data->right_lock, data->xw ); } else { DFBRectangle rect; rect = DFB_RECTANGLE_INIT_FROM_REGION( &data->left_region ); if (data->left_lock.buffer) update_screen( x11, &rect, &data->left_lock, data->xw ); } data->left_lock.buffer = NULL; data->right_lock.buffer = NULL; return DFB_OK; } DFBResult dfb_x11_set_palette_handler( DFBX11 *x11, CorePalette *palette ) { return DFB_OK; } DirectFB-1.7.7/systems/x11/idirectfbgl.c0000644000175000017500000001654412254435330014646 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include D_DEBUG_DOMAIN( IDFBGL_GLX, "IDirectFBGL/GLX", "IDirectFBGL GLX Implementation" ); static DirectResult Probe( void *ctx, ... ); static DirectResult Construct( void *interface, ... ); #include DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBGL, GLX ) /* * private data struct of IDirectFBGL */ typedef struct { int ref; /* reference counter */ IDirectFBSurface *surface; CoreSurface *core_surface; DFBGLAttributes attributes; bool locked; CoreSurfaceBufferLock lock; } IDirectFBGL_data; static void IDirectFBGL_Destruct( IDirectFBGL *thiz ) { IDirectFBGL_data *data = thiz->priv; if (data->locked) dfb_surface_unlock_buffer( data->core_surface, &data->lock ); data->surface->Release( data->surface ); DIRECT_DEALLOCATE_INTERFACE( thiz ); } static DirectResult IDirectFBGL_AddRef( IDirectFBGL *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL); data->ref++; return DFB_OK; } static DirectResult IDirectFBGL_Release( IDirectFBGL *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL) if (--data->ref == 0) IDirectFBGL_Destruct( thiz ); return DFB_OK; } static DFBResult IDirectFBGL_Lock( IDirectFBGL *thiz ) { DFBResult ret; CoreSurface *surface; DIRECT_INTERFACE_GET_DATA (IDirectFBGL); D_DEBUG_AT( IDFBGL_GLX, "%s()\n", __FUNCTION__ ); if (data->locked) return DFB_LOCKED; surface = data->core_surface; D_ASSERT( surface != NULL ); /* Lock destination buffer */ ret = dfb_surface_lock_buffer( surface, CSBR_BACK, CSAID_ACCEL1, CSAF_READ | CSAF_WRITE, &data->lock ); if (ret) { D_DERROR( ret, "IDirectFBGL/GLX: Could not lock destination buffer!\n" ); return ret; } data->locked = true; return DFB_OK; } static DFBResult IDirectFBGL_Unlock( IDirectFBGL *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL); D_DEBUG_AT( IDFBGL_GLX, "%s()\n", __FUNCTION__ ); if (!data->locked) return DFB_BUFFEREMPTY; dfb_surface_unlock_buffer( data->core_surface, &data->lock ); data->locked = false; return DFB_OK; } static DFBResult IDirectFBGL_GetAttributes( IDirectFBGL *thiz, DFBGLAttributes *attributes ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL); D_DEBUG_AT( IDFBGL_GLX, "%s()\n", __FUNCTION__ ); if (!attributes) return DFB_INVARG; *attributes = data->attributes; return DFB_OK; } static DFBResult IDirectFBGL_GetProcAddress( IDirectFBGL *thiz, const char *name, void **ret_address ) { void *handle; DIRECT_INTERFACE_GET_DATA (IDirectFBGL); D_DEBUG_AT( IDFBGL_GLX, "%s()\n", __FUNCTION__ ); if (!name) return DFB_INVARG; if (!ret_address) return DFB_INVARG; handle = dlopen( NULL, RTLD_LAZY ); if (!handle) return DFB_FAILURE; *ret_address = dlsym( handle, name ); dlclose( handle ); return (*ret_address) ? DFB_OK : DFB_UNSUPPORTED; } /* exported symbols */ static DirectResult Probe( void *ctx, ... ) { IDirectFBSurface *surface = ctx; IDirectFBSurface_data *surface_data; DFBSurfaceCapabilities caps; D_DEBUG_AT( IDFBGL_GLX, "%s()\n", __FUNCTION__ ); if (!surface) return DFB_UNSUPPORTED; surface->GetCapabilities( surface, &caps ); if (caps & DSCAPS_SYSTEMONLY) { D_DEBUG_AT( IDFBGL_GLX, " -> SYSTEM ONLY!\n" ); return DFB_UNSUPPORTED; } surface_data = surface->priv; if (!surface_data) return DFB_DEAD; /* ... */ return DFB_OK; } static DirectResult Construct( void *interface, ... ) { DFBResult ret; IDirectFBGL *thiz = interface; IDirectFBSurface *surface; IDirectFBSurface_data *surface_data; CoreSurface *core_surface; D_DEBUG_AT( IDFBGL_GLX, "%s()\n", __FUNCTION__ ); va_list tag; va_start(tag, interface); surface = va_arg(tag, IDirectFBSurface*); va_end( tag ); surface_data = surface->priv; if (!surface_data) { DIRECT_DEALLOCATE_INTERFACE( thiz ); return DFB_DEAD; } core_surface = surface_data->surface; if (!core_surface) { DIRECT_DEALLOCATE_INTERFACE( thiz ); return DFB_DESTROYED; } D_DEBUG_AT( IDFBGL_GLX, " -> increasing surface ref count...\n" ); /* Increase target reference counter. */ ret = surface->AddRef( surface ); if (ret) { DIRECT_DEALLOCATE_INTERFACE( thiz ); return ret; } /* Allocate interface data. */ DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IDirectFBGL ); /* Initialize interface data. */ data->ref = 1; data->surface = surface; data->core_surface = core_surface; /* Initialize attributes. */ data->attributes.double_buffer = !!(core_surface->config.caps & DSCAPS_FLIPPING); data->attributes.buffer_size = DFB_BITS_PER_PIXEL( core_surface->config.format ); data->attributes.alpha_size = DFB_ALPHA_BITS_PER_PIXEL( core_surface->config.format ); switch (core_surface->config.format) { case DSPF_ARGB: case DSPF_RGB32: data->attributes.red_size = 8; data->attributes.green_size = 8; data->attributes.blue_size = 8; break; default: D_UNIMPLEMENTED(); } /* Assign interface pointers. */ thiz->AddRef = IDirectFBGL_AddRef; thiz->Release = IDirectFBGL_Release; thiz->Lock = IDirectFBGL_Lock; thiz->Unlock = IDirectFBGL_Unlock; thiz->GetAttributes = IDirectFBGL_GetAttributes; thiz->GetProcAddress = IDirectFBGL_GetProcAddress; return DFB_OK; } DirectFB-1.7.7/systems/x11/x11.h0000644000175000017500000000740712463500054013002 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __X11SYSTEM__X11_H__ #define __X11SYSTEM__X11_H__ #include #include #include #include #include #include #include "x11image.h" #include "xwindow.h" typedef struct { CoreLayerRegionConfig config; XWindow **xw; } SetModeData; typedef struct { bool stereo; DFBRegion left_region; DFBRegion right_region; CoreSurfaceBufferLock left_lock; CoreSurfaceBufferLock right_lock; XWindow *xw; } UpdateScreenData; typedef struct { XWindow **xw; } DestroyData; typedef struct { UpdateScreenData update; SetModeData setmode; DestroyData destroy; FusionCall call; FusionSHMPoolShared *data_shmpool; CoreSurfacePool *x11image_pool; CoreSurfacePool *glx_pool; /* only used for GL */ CoreSurfacePool *vpsmem_pool; unsigned int vpsmem_length; CoreSurfacePoolBridge *x11_pool_bridge; DFBDimension screen_size; int window_count; /* merely for optimizing wait loop */ Bool x_error; bool stereo; int stereo_width; } DFBX11Shared; struct __DFB_X11 { DFBX11Shared *shared; CoreDFB *core; CoreScreen *screen; Bool use_shm; int xshm_major; int xshm_minor; Display *display; Screen *screenptr; int screennum; Visual *visuals[DFB_NUM_PIXELFORMATS]; void (*Sync)( DFBX11 *x11 ); }; typedef enum { X11_CREATE_WINDOW, X11_UPDATE_SCREEN, X11_SET_PALETTE, X11_IMAGE_INIT, X11_IMAGE_DESTROY, X11_DESTROY_WINDOW, } DFBX11Call; DFBResult dfb_x11_create_window_handler ( DFBX11 *x11, SetModeData *setmode ); DFBResult dfb_x11_destroy_window_handler( DFBX11 *x11, DestroyData *destroy ); DFBResult dfb_x11_update_screen_handler ( DFBX11 *x11, UpdateScreenData *data ); DFBResult dfb_x11_set_palette_handler ( DFBX11 *x11, CorePalette *palette ); DFBResult dfb_x11_image_init_handler ( DFBX11 *x11, x11Image *image ); DFBResult dfb_x11_image_destroy_handler ( DFBX11 *x11, x11Image *image ); #endif //__X11SYSTEM__X11_H__ DirectFB-1.7.7/systems/x11/x11.c0000644000175000017500000004034212463500054012770 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "primary.h" #include "xwindow.h" #include "x11.h" #include "x11_surface_pool.h" #include "x11_surface_pool_bridge.h" #ifdef USE_GLX #include "glx_surface_pool.h" #endif #include "vpsmem_surface_pool.h" #include D_DEBUG_DOMAIN( X11_Core, "X11/Core", "Main X11 system functions" ); DFB_CORE_SYSTEM( x11 ) static VideoMode modes[] = { { .xres = 320, .yres = 200 }, { .xres = 320, .yres = 240 }, { .xres = 512, .yres = 384 }, { .xres = 640, .yres = 480 }, { .xres = 768, .yres = 576 }, { .xres = 1024, .yres = 576 }, // 16:9 { .xres = 1024, .yres = 600 }, // Where does that mode come from? :-) { .xres = 1024, .yres = 768 }, // 4:3 { .xres = 1280, .yres = 720 }, // 16:9 { .xres = 1280, .yres = 960 }, // 4:3 { .xres = 1280, .yres = 1024 }, // 5:4 { .xres = 1440, .yres = 810 }, // 16:9 { .xres = 1440, .yres = 1080 }, // 4:3 { .xres = 1600, .yres = 900 }, // 16:9, obviously :) { .xres = 1600, .yres = 1200 }, // 4:3 { .xres = 1920, .yres = 1080 }, // 16:9 { .xres = 1920, .yres = 1200 }, // 16:10 { .xres = 0, .yres = 0 } }; /**********************************************************************************************************************/ static FusionCallHandlerResult call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ); /**********************************************************************************************************************/ static void sync_display( DFBX11 *x11 ) { D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); XSync( x11->display, False ); } static void sync_display_noop( DFBX11 *x11 ) { D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); } /**********************************************************************************************************************/ static DFBX11Shared *shared_for_error_handler; static int error_handler( Display *display, XErrorEvent *event ) { char buf[512]; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); XGetErrorText( display, event->error_code, buf, sizeof(buf) ); D_ERROR( "X11/Core: Error! %s\n", buf ); shared_for_error_handler->x_error = True; return 0; } static DFBResult InitLocal( DFBX11 *x11, DFBX11Shared *shared, CoreDFB *core ) { int i, n, d; XInitThreads(); if (direct_config_get_int_value( "x11-sync" )) x11->Sync = sync_display; else x11->Sync = sync_display_noop; x11->shared = shared; x11->core = core; x11->display = XOpenDisplay(getenv("DISPLAY")); if (!x11->display) { D_ERROR("X11: Error in XOpenDisplay for '%s'\n", getenv("DISPLAY")); return DFB_INIT; } x11->screenptr = DefaultScreenOfDisplay(x11->display); x11->screennum = DefaultScreen(x11->display); d = DefaultDepthOfScreen(x11->screenptr); for (i=0; iscreenptr->ndepths; i++) { const Depth *depth = &x11->screenptr->depths[i]; for (n=0; nnvisuals; n++) { Visual *visual = &depth->visuals[n]; D_DEBUG_AT( X11_Core, "[Visual %d] ID 0x%02lx, depth %d, RGB 0x%06lx/0x%06lx/0x%06lx, %d bpRGB, %d entr.\n", n, visual->visualid, depth->depth, visual->red_mask, visual->green_mask, visual->blue_mask, visual->bits_per_rgb, visual->map_entries ); if (depth->depth != d) continue; switch (depth->depth) { case 32: if (visual->red_mask == 0xff0000 && visual->green_mask == 0x00ff00 && visual->blue_mask == 0x0000ff && !x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_ARGB)]) x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_ARGB)] = visual; break; case 24: if (visual->red_mask == 0xff0000 && visual->green_mask == 0x00ff00 && visual->blue_mask == 0x0000ff && !x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB32)]) x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB32)] = visual; break; case 16: if (visual->red_mask == 0xf800 && visual->green_mask == 0x07e0 && visual->blue_mask == 0x001f && !x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB16)]) x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB16)] = visual; break; case 15: if (visual->red_mask == 0x7c00 && visual->green_mask == 0x03e0 && visual->blue_mask == 0x001f && !x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB555)]) x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB555)] = visual; break; } } } if (XShmQueryExtension( x11->display )) XShmQueryVersion( x11->display, &x11->xshm_major, &x11->xshm_minor, &x11->use_shm ); x11->screen = dfb_screens_register( NULL, x11, x11PrimaryScreenFuncs ); dfb_layers_register( x11->screen, x11, x11PrimaryLayerFuncs ); dfb_layers_register( x11->screen, x11, x11PrimaryLayerFuncs ); dfb_layers_register( x11->screen, x11, x11PrimaryLayerFuncs ); return DFB_OK; } /**********************************************************************************************************************/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_X11; info->caps = CSCAPS_ACCELERATION | CSCAPS_PREFER_SHM | CSCAPS_SYSMEM_EXTERNAL | CSCAPS_DISPLAY_TASKS | CSCAPS_NOTIFY_DISPLAY; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "X11" ); } static DFBResult system_initialize( CoreDFB *core, void **data ) { DFBResult ret; DFBX11 *x11; DFBX11Shared *shared; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); x11 = D_CALLOC( 1, sizeof(DFBX11) ); if (!x11) return D_OOM(); shared = SHCALLOC( dfb_core_shmpool( core ), 1, sizeof(DFBX11Shared) ); if (!shared) { D_FREE( x11 ); return D_OOSHM(); } /* we need the error handler to signal the error to us, so use a global static */ shared_for_error_handler = shared; XSetErrorHandler( error_handler ); /* * Local init (master and slave) */ ret = InitLocal( x11, shared, core ); if (ret) { SHFREE( dfb_core_shmpool( core ), shared ); D_FREE( x11 ); return ret; } /* * Shared init (master only) */ shared->data_shmpool = dfb_core_shmpool_data( core ); shared->screen_size.w = x11->screenptr->width; shared->screen_size.h = x11->screenptr->height; fusion_call_init( &shared->call, call_handler, x11, dfb_core_world(core) ); /* * Must be set before initializing the pools! */ *data = x11; /* * Master init */ dfb_surface_pool_initialize( core, &x11SurfacePoolFuncs, &shared->x11image_pool ); #ifdef USE_GLX dfb_surface_pool_initialize( core, &glxSurfacePoolFuncs, &shared->glx_pool ); #endif if (dfb_config->video_length) { shared->vpsmem_length = dfb_config->video_length; dfb_surface_pool_initialize( core, &vpsmemSurfacePoolFuncs, &shared->vpsmem_pool ); } #ifdef USE_GLX dfb_surface_pool_bridge_initialize( core, &x11SurfacePoolBridgeFuncs, x11, &shared->x11_pool_bridge ); #endif core_arena_add_shared_field( core, "x11", shared ); return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **data ) { DFBResult ret; void *ptr; DFBX11 *x11; DFBX11Shared *shared; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); x11 = D_CALLOC( 1, sizeof(DFBX11) ); if (!x11) return D_OOM(); core_arena_get_shared_field( core, "x11", &ptr ); shared = ptr; /* * Local init (master and slave) */ ret = InitLocal( x11, shared, core ); if (ret) { D_FREE( x11 ); return ret; } /* * Must be set before joining the pools! */ *data = x11; /* * Slave init */ if (shared->x11image_pool) dfb_surface_pool_join( core, shared->x11image_pool, &x11SurfacePoolFuncs ); #ifdef USE_GLX if (shared->glx_pool) dfb_surface_pool_join( core, shared->glx_pool, &glxSurfacePoolFuncs ); #endif if (shared->vpsmem_pool) dfb_surface_pool_join( core, shared->vpsmem_pool, &vpsmemSurfacePoolFuncs ); #ifdef USE_GLX if (shared->x11_pool_bridge) dfb_surface_pool_bridge_join( core, shared->x11_pool_bridge, &x11SurfacePoolBridgeFuncs, x11 ); #endif return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { DFBX11 *x11 = dfb_system_data(); DFBX11Shared *shared = x11->shared; int i; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); /* * Master deinit */ if (shared->x11_pool_bridge) dfb_surface_pool_bridge_destroy( shared->x11_pool_bridge ); if (shared->vpsmem_pool) dfb_surface_pool_destroy( shared->vpsmem_pool ); if (shared->glx_pool) dfb_surface_pool_destroy( shared->glx_pool ); if (shared->x11image_pool) dfb_surface_pool_destroy( shared->x11image_pool ); /* * Shared deinit (master only) */ fusion_call_destroy( &shared->call ); /* close remaining windows */ for( i=0; ilayer_data; if( lds && lds->xw ) { dfb_x11_close_window( x11, lds->xw ); lds->xw = 0; shared->window_count--; } } SHFREE( dfb_core_shmpool( x11->core ), shared ); /* * Local deinit (master and slave) */ if (x11->display) XCloseDisplay( x11->display ); D_FREE( x11 ); return DFB_OK; } static DFBResult system_leave( bool emergency ) { DFBX11 *x11 = dfb_system_data(); DFBX11Shared *shared = x11->shared; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); /* * Slave deinit */ if (shared->x11_pool_bridge) dfb_surface_pool_bridge_leave( shared->x11_pool_bridge ); if (shared->vpsmem_pool) dfb_surface_pool_leave( shared->vpsmem_pool ); if (shared->glx_pool) dfb_surface_pool_leave( shared->glx_pool ); if (shared->x11image_pool) dfb_surface_pool_leave( shared->x11image_pool ); /* * Local deinit (master and slave) */ if (x11->display) XCloseDisplay( x11->display ); D_FREE( x11 ); return DFB_OK; } static DFBResult system_suspend( void ) { return DFB_UNIMPLEMENTED; } static DFBResult system_resume( void ) { return DFB_UNIMPLEMENTED; } static volatile void * system_map_mmio( unsigned int offset, int length ) { return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator( void ) { return dfb_config->accelerator; } static VideoMode * system_get_modes( void ) { return modes; } static VideoMode * system_get_current_mode( void ) { return &modes[0]; /* FIXME */ } static DFBResult system_thread_init( void ) { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return 0; } static void * system_video_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_videoram_length( void ) { return 0; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length( void ) { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { } static FusionCallHandlerResult call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { DFBX11 *x11 = ctx; switch (call_arg) { case X11_CREATE_WINDOW: *ret_val = dfb_x11_create_window_handler( x11, call_ptr ); break; case X11_DESTROY_WINDOW: *ret_val = dfb_x11_destroy_window_handler( x11, call_ptr ); break; case X11_UPDATE_SCREEN: *ret_val = dfb_x11_update_screen_handler( x11, call_ptr ); break; case X11_SET_PALETTE: *ret_val = dfb_x11_set_palette_handler( x11, call_ptr ); break; case X11_IMAGE_INIT: *ret_val = dfb_x11_image_init_handler( x11, call_ptr ); break; case X11_IMAGE_DESTROY: *ret_val = dfb_x11_image_destroy_handler( x11, call_ptr ); break; default: D_BUG( "unknown call" ); *ret_val = DFB_BUG; break; } return FCHR_RETURN; } DirectFB-1.7.7/systems/x11/Makefile.am0000644000175000017500000000220612463500054014244 00000000000000# Makefile.am for DirectFB/systems/x11 INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/gfxdrivers \ $(X11_CFLAGS) systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_x11.o endif systems_LTLIBRARIES = libdirectfb_x11.la libdirectfb_x11_la_LDFLAGS = \ $(X11_LIBS) \ -avoid-version \ -module if GFX_GLX libdirectfb_x11_la_LDFLAGS += -lGL endif libdirectfb_x11_la_SOURCES = \ idirectfbgl.c \ primary.c \ primary.h \ surfacemanager.c \ surfacemanager.h \ vpsmem_surface_pool.c \ vpsmem_surface_pool.h \ x11.c \ x11.h \ x11image.c \ x11image.h \ x11input.c \ x11_surface_pool.c \ x11_surface_pool.h \ x11types.h \ xwindow.h \ xwindow.c if GFX_GLX libdirectfb_x11_la_SOURCES += \ glx_surface_pool.c \ glx_surface_pool.h \ x11_surface_pool_bridge.c \ x11_surface_pool_bridge.h endif libdirectfb_x11_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/x11/x11_surface_pool.c0000644000175000017500000002624512463500054015537 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include "x11.h" #include "x11image.h" #include "x11_surface_pool.h" D_DEBUG_DOMAIN( X11_Surfaces, "X11/Surfaces", "X11 System Surface Pool" ); /**********************************************************************************************************************/ typedef struct { } x11PoolData; typedef struct { pthread_mutex_t lock; DirectHash *hash; DFBX11 *x11; } x11PoolLocalData; /**********************************************************************************************************************/ static int x11PoolDataSize( void ) { return sizeof(x11PoolData); } static int x11PoolLocalDataSize( void ) { return sizeof(x11PoolLocalData); } static int x11AllocationDataSize( void ) { return sizeof(x11AllocationData); } static DFBResult x11InitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { DFBResult ret; x11PoolLocalData *local = pool_local; DFBX11 *x11 = system_data; D_DEBUG_AT( X11_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( ret_desc != NULL ); local->x11 = x11; ret_desc->caps = CSPCAPS_VIRTUAL; ret_desc->access[CSAID_CPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL | CSTF_INTERNAL; ret_desc->priority = CSPP_ULTIMATE; /* For showing our X11 window */ ret_desc->access[CSAID_LAYER0] = CSAF_READ; ret_desc->access[CSAID_LAYER1] = CSAF_READ; ret_desc->access[CSAID_LAYER2] = CSAF_READ; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "X11 Shm Images" ); ret = direct_hash_create( 7, &local->hash ); if (ret) { D_DERROR( ret, "X11/Surfaces: Could not create local hash table!\n" ); return ret; } pthread_mutex_init( &local->lock, NULL ); return DFB_OK; } static DFBResult x11JoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { DFBResult ret; x11PoolLocalData *local = pool_local; DFBX11 *x11 = system_data; D_DEBUG_AT( X11_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); local->x11 = x11; ret = direct_hash_create( 7, &local->hash ); if (ret) { D_DERROR( ret, "X11/Surfaces: Could not create local hash table!\n" ); return ret; } pthread_mutex_init( &local->lock, NULL ); return DFB_OK; } static DFBResult x11DestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { x11PoolLocalData *local = pool_local; D_DEBUG_AT( X11_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); pthread_mutex_destroy( &local->lock ); direct_hash_destroy( local->hash ); return DFB_OK; } static DFBResult x11LeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { x11PoolLocalData *local = pool_local; D_DEBUG_AT( X11_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); pthread_mutex_destroy( &local->lock ); direct_hash_destroy( local->hash ); return DFB_OK; } static DFBResult x11TestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { x11PoolLocalData *local = pool_local; DFBX11 *x11 = local->x11; DFBX11Shared *shared = x11->shared; /* Provide a fallback only if no virtual physical pool is allocated... */ //if (!shared->vpsmem_length) // return DFB_OK; /* Pass NULL image for probing */ return x11ImageInit( x11, NULL, config->size.w, config->size.h, config->format ); } static DFBResult x11AllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { CoreSurface *surface; x11AllocationData *alloc = alloc_data; x11PoolLocalData *local = pool_local; DFBX11 *x11 = local->x11; D_DEBUG_AT( X11_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (x11ImageInit( x11, &alloc->image, surface->config.size.w, surface->config.size.h, surface->config.format ) == DFB_OK) { alloc->real = true; alloc->pitch = alloc->image.pitch; allocation->size = surface->config.size.h * alloc->image.pitch; } else dfb_surface_calc_buffer_size( surface, 8, 2, &alloc->pitch, &allocation->size ); return DFB_OK; } static DFBResult x11DeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { x11AllocationData *alloc = alloc_data; x11PoolLocalData *local = pool_local; DFBX11 *x11 = local->x11; DFBX11Shared *shared = x11->shared; void *addr; D_DEBUG_AT( X11_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); CORE_SURFACE_ALLOCATION_ASSERT( allocation ); // FIXME: also detach in other processes! (e.g. via reactor) addr = direct_hash_lookup( local->hash, alloc->image.seginfo.shmid ); if (addr) { x11ImageDetach( &alloc->image, addr ); direct_hash_remove( local->hash, alloc->image.seginfo.shmid ); } if (alloc->real) return x11ImageDestroy( x11, &alloc->image ); if (alloc->ptr) SHFREE( shared->data_shmpool, alloc->ptr ); return DFB_OK; } static DFBResult x11Lock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { DFBResult ret; x11PoolLocalData *local = pool_local; x11AllocationData *alloc = alloc_data; DFBX11 *x11 = local->x11; DFBX11Shared *shared = x11->shared; D_DEBUG_AT( X11_Surfaces, "%s( %p )\n", __FUNCTION__, allocation ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_ASSERT( local->hash != NULL ); pthread_mutex_lock( &local->lock ); if (alloc->real) { void *addr = direct_hash_lookup( local->hash, alloc->image.seginfo.shmid ); if (!addr) { ret = x11ImageAttach( &alloc->image, &addr ); if (ret) { D_DERROR( ret, "X11/Surfaces: x11ImageAttach() failed!\n" ); pthread_mutex_unlock( &local->lock ); return ret; } direct_hash_insert( local->hash, alloc->image.seginfo.shmid, addr ); /* FIXME: When to remove/detach? */ } lock->addr = addr; lock->handle = &alloc->image; } else { if (!alloc->ptr) { D_DEBUG_AT( X11_Surfaces, " -> allocating memory in data_shmpool (%d bytes)\n", allocation->size ); alloc->ptr = SHCALLOC( shared->data_shmpool, 1, allocation->size ); if (!alloc->ptr) { pthread_mutex_unlock( &local->lock ); return D_OOSHM(); } } lock->addr = alloc->ptr; } lock->pitch = alloc->pitch; pthread_mutex_unlock( &local->lock ); return DFB_OK; } static DFBResult x11Unlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { D_DEBUG_AT( X11_Surfaces, "%s( %p )\n", __FUNCTION__, allocation ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); /* FIXME: Check overhead of attach/detach per lock/unlock. */ return DFB_OK; } const SurfacePoolFuncs x11SurfacePoolFuncs = { .PoolDataSize = x11PoolDataSize, .PoolLocalDataSize = x11PoolLocalDataSize, .AllocationDataSize = x11AllocationDataSize, .InitPool = x11InitPool, .JoinPool = x11JoinPool, .DestroyPool = x11DestroyPool, .LeavePool = x11LeavePool, .TestConfig = x11TestConfig, .AllocateBuffer = x11AllocateBuffer, .DeallocateBuffer = x11DeallocateBuffer, .Lock = x11Lock, .Unlock = x11Unlock, }; DirectFB-1.7.7/systems/x11/primary.h0000644000175000017500000000374512463500054014055 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __X11__PRIMARY_H__ #define __X11__PRIMARY_H__ #include #include #include "xwindow.h" extern ScreenFuncs *x11PrimaryScreenFuncs; extern DisplayLayerFuncs *x11PrimaryLayerFuncs; typedef struct { int layer_id; XWindow *xw; CoreLayerRegionConfig config; CoreSurfaceBufferLock lock_left; CoreSurfaceBufferLock lock_right; CoreSurface *surface; } X11LayerData; DFBResult dfb_x11_update_screen( DFBX11 *x11, X11LayerData *lds, const DFBRegion *left_region, const DFBRegion *right_region, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ); #endif // __X11__PRIMARY_H__ DirectFB-1.7.7/systems/x11/Makefile.in0000644000175000017500000007035412466665317014307 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ # Makefile.am for DirectFB/systems/x11 VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @GFX_GLX_TRUE@am__append_1 = -lGL @GFX_GLX_TRUE@am__append_2 = \ @GFX_GLX_TRUE@ glx_surface_pool.c \ @GFX_GLX_TRUE@ glx_surface_pool.h \ @GFX_GLX_TRUE@ x11_surface_pool_bridge.c \ @GFX_GLX_TRUE@ x11_surface_pool_bridge.h DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp README subdir = systems/x11 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" LTLIBRARIES = $(systems_LTLIBRARIES) libdirectfb_x11_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la am__libdirectfb_x11_la_SOURCES_DIST = idirectfbgl.c primary.c \ primary.h surfacemanager.c surfacemanager.h \ vpsmem_surface_pool.c vpsmem_surface_pool.h x11.c x11.h \ x11image.c x11image.h x11input.c x11_surface_pool.c \ x11_surface_pool.h x11types.h xwindow.h xwindow.c \ glx_surface_pool.c glx_surface_pool.h \ x11_surface_pool_bridge.c x11_surface_pool_bridge.h @GFX_GLX_TRUE@am__objects_1 = glx_surface_pool.lo \ @GFX_GLX_TRUE@ x11_surface_pool_bridge.lo am_libdirectfb_x11_la_OBJECTS = idirectfbgl.lo primary.lo \ surfacemanager.lo vpsmem_surface_pool.lo x11.lo x11image.lo \ x11input.lo x11_surface_pool.lo xwindow.lo $(am__objects_1) libdirectfb_x11_la_OBJECTS = $(am_libdirectfb_x11_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_x11_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_x11_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_x11_la_SOURCES) DIST_SOURCES = $(am__libdirectfb_x11_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systems_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/gfxdrivers \ $(X11_CFLAGS) systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_x11.o systems_LTLIBRARIES = libdirectfb_x11.la libdirectfb_x11_la_LDFLAGS = $(X11_LIBS) -avoid-version -module \ $(am__append_1) libdirectfb_x11_la_SOURCES = idirectfbgl.c primary.c primary.h \ surfacemanager.c surfacemanager.h vpsmem_surface_pool.c \ vpsmem_surface_pool.h x11.c x11.h x11image.c x11image.h \ x11input.c x11_surface_pool.c x11_surface_pool.h x11types.h \ xwindow.h xwindow.c $(am__append_2) libdirectfb_x11_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/x11/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/x11/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_x11.la: $(libdirectfb_x11_la_OBJECTS) $(libdirectfb_x11_la_DEPENDENCIES) $(EXTRA_libdirectfb_x11_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_x11_la_LINK) -rpath $(systemsdir) $(libdirectfb_x11_la_OBJECTS) $(libdirectfb_x11_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glx_surface_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbgl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/surfacemanager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vpsmem_surface_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11_surface_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11_surface_pool_bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xwindow.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-systemsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-systemsDATA install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-systemsDATA uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip install-systemsDATA \ install-systemsLTLIBRARIES installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/x11/vpsmem_surface_pool.c0000644000175000017500000003155712254435330016441 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include "x11.h" #include "surfacemanager.h" D_DEBUG_DOMAIN( VPSMem_Surfaces, "VPSMem/Surfaces", "VPSMem Framebuffer Surface Pool" ); D_DEBUG_DOMAIN( VPSMem_SurfLock, "VPSMem/SurfLock", "VPSMem Framebuffer Surface Pool Locks" ); /**********************************************************************************************************************/ typedef struct { int magic; SurfaceManager *manager; void *mem; unsigned int length; } VPSMemPoolData; typedef struct { int magic; CoreDFB *core; } VPSMemPoolLocalData; typedef struct { int magic; int offset; int pitch; int size; Chunk *chunk; } VPSMemAllocationData; /**********************************************************************************************************************/ static int vpsmemPoolDataSize( void ) { return sizeof(VPSMemPoolData); } static int vpsmemPoolLocalDataSize( void ) { return sizeof(VPSMemPoolLocalData); } static int vpsmemAllocationDataSize( void ) { return sizeof(VPSMemAllocationData); } static DFBResult vpsmemInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { DFBResult ret; VPSMemPoolData *data = pool_data; VPSMemPoolLocalData *local = pool_local; DFBX11 *x11 = system_data; DFBX11Shared *shared = x11->shared; D_DEBUG_AT( VPSMem_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( data != NULL ); D_ASSERT( local != NULL ); D_ASSERT( ret_desc != NULL ); data->mem = SHMALLOC( shared->data_shmpool, shared->vpsmem_length ); if (!data->mem) { shared->vpsmem_length = 0; return D_OOSHM(); } data->length = shared->vpsmem_length; ret = dfb_surfacemanager_create( core, data->length, &data->manager ); if (ret) return ret; ret_desc->caps = CSPCAPS_PHYSICAL | CSPCAPS_VIRTUAL; ret_desc->access[CSAID_CPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_DEFAULT; ret_desc->size = data->length; /* For testing... */ ret_desc->access[CSAID_ACCEL1] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_ACCEL2] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_ACCEL3] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_ACCEL4] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "Virtual Physical" ); local->core = core; D_MAGIC_SET( data, VPSMemPoolData ); D_MAGIC_SET( local, VPSMemPoolLocalData ); return DFB_OK; } static DFBResult vpsmemJoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { VPSMemPoolData *data = pool_data; VPSMemPoolLocalData *local = pool_local; D_DEBUG_AT( VPSMem_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, VPSMemPoolData ); D_ASSERT( local != NULL ); (void) data; local->core = core; D_MAGIC_SET( local, VPSMemPoolLocalData ); return DFB_OK; } static DFBResult vpsmemDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { VPSMemPoolData *data = pool_data; VPSMemPoolLocalData *local = pool_local; D_DEBUG_AT( VPSMem_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, VPSMemPoolData ); D_MAGIC_ASSERT( local, VPSMemPoolLocalData ); dfb_surfacemanager_destroy( data->manager ); D_MAGIC_CLEAR( data ); D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult vpsmemLeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { VPSMemPoolData *data = pool_data; VPSMemPoolLocalData *local = pool_local; D_DEBUG_AT( VPSMem_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, VPSMemPoolData ); D_MAGIC_ASSERT( local, VPSMemPoolLocalData ); (void) data; D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult vpsmemTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { DFBResult ret; CoreSurface *surface; VPSMemPoolData *data = pool_data; VPSMemPoolLocalData *local = pool_local; D_DEBUG_AT( VPSMem_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, VPSMemPoolData ); D_MAGIC_ASSERT( local, VPSMemPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); D_UNUSED_P( surface ); ret = dfb_surfacemanager_allocate( local->core, data->manager, buffer, NULL, NULL ); D_DEBUG_AT( VPSMem_Surfaces, " -> %s\n", DirectFBErrorString(ret) ); return ret; } static DFBResult vpsmemAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { DFBResult ret; Chunk *chunk; CoreSurface *surface; VPSMemPoolData *data = pool_data; VPSMemPoolLocalData *local = pool_local; VPSMemAllocationData *alloc = alloc_data; D_DEBUG_AT( VPSMem_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, VPSMemPoolData ); D_MAGIC_ASSERT( local, VPSMemPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); ret = dfb_surfacemanager_allocate( local->core, data->manager, buffer, allocation, &chunk ); if (ret) return ret; D_MAGIC_ASSERT( chunk, Chunk ); alloc->offset = chunk->offset; alloc->pitch = chunk->pitch; alloc->size = surface->config.size.h * alloc->pitch; alloc->chunk = chunk; D_DEBUG_AT( VPSMem_Surfaces, " -> offset %d, pitch %d, size %d (%d)\n", alloc->offset, alloc->pitch, alloc->size, chunk->length ); D_ASSERT( chunk->length >= alloc->size ); alloc->size = chunk->length; allocation->size = alloc->size; allocation->offset = alloc->offset; D_MAGIC_SET( alloc, VPSMemAllocationData ); return DFB_OK; } static DFBResult vpsmemDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { VPSMemPoolData *data = pool_data; VPSMemAllocationData *alloc = alloc_data; D_DEBUG_AT( VPSMem_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, VPSMemPoolData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); D_MAGIC_ASSERT( alloc, VPSMemAllocationData ); dfb_surfacemanager_deallocate( data->manager, alloc->chunk ); D_MAGIC_CLEAR( alloc ); return DFB_OK; } static DFBResult vpsmemMuckOut( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer ) { CoreSurface *surface; VPSMemPoolData *data = pool_data; VPSMemPoolLocalData *local = pool_local; D_DEBUG_AT( VPSMem_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, VPSMemPoolData ); D_MAGIC_ASSERT( local, VPSMemPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); D_UNUSED_P( surface ); return dfb_surfacemanager_displace( local->core, data->manager, buffer ); } static DFBResult vpsmemLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { VPSMemPoolData *data = pool_data; VPSMemAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, VPSMemPoolData ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, VPSMemAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( VPSMem_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); lock->pitch = alloc->pitch; lock->offset = alloc->offset; lock->addr = data->mem + alloc->offset; lock->phys = dfb_config->video_phys + alloc->offset; D_DEBUG_AT( VPSMem_SurfLock, " -> offset %lu, pitch %d, addr %p, phys 0x%08lx\n", lock->offset, lock->pitch, lock->addr, lock->phys ); return DFB_OK; } static DFBResult vpsmemUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { VPSMemAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, VPSMemAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( VPSMem_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); (void) alloc; return DFB_OK; } const SurfacePoolFuncs vpsmemSurfacePoolFuncs = { .PoolDataSize = vpsmemPoolDataSize, .PoolLocalDataSize = vpsmemPoolLocalDataSize, .AllocationDataSize = vpsmemAllocationDataSize, .InitPool = vpsmemInitPool, .JoinPool = vpsmemJoinPool, .DestroyPool = vpsmemDestroyPool, .LeavePool = vpsmemLeavePool, .TestConfig = vpsmemTestConfig, .AllocateBuffer = vpsmemAllocateBuffer, .DeallocateBuffer = vpsmemDeallocateBuffer, .MuckOut = vpsmemMuckOut, .Lock = vpsmemLock, .Unlock = vpsmemUnlock, }; DirectFB-1.7.7/systems/x11/x11types.h0000644000175000017500000000261512254435330014065 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __SYSTEMS_X11TYPES_H__ #define __SYSTEMS_X11TYPES_H__ typedef struct __DFB_X11 DFBX11; #endif /* __SYSTEMS_X11TYPES_H__ */ DirectFB-1.7.7/systems/x11/x11_surface_pool.h0000644000175000017500000000311412463500054015532 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __X11SYSTEM__X11_SURFACE_POOL_H__ #define __X11SYSTEM__X11_SURFACE_POOL_H__ #include #include "x11image.h" extern const SurfacePoolFuncs x11SurfacePoolFuncs; typedef struct { bool real; x11Image image; void *ptr; int pitch; } x11AllocationData; #endif DirectFB-1.7.7/systems/android/0000755000175000017500000000000012466665353013320 500000000000000DirectFB-1.7.7/systems/android/android_system.c0000644000175000017500000002420012254435330016407 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include "android_system.h" #include DFB_CORE_SYSTEM( android ) /**********************************************************************************************************************/ AndroidData *m_data; /* FIXME: Fix Core System API to pass data in all functions. */ // FIXME extern AndroidNativeData native_data; /**********************************************************************************************************************/ static inline void crashme() { char* a = 0; *a = 0; } static DFBResult InitLocal( AndroidData *android ) { /* * Here specify the attributes of the desired configuration. * Below, we select an EGLConfig with at least 8 bits per color * component compatible with on-screen windows */ const EGLint attribs[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NATIVE_VISUAL_ID, HAL_PIXEL_FORMAT_RGBA_8888, // DSPF_ARGB EGL_NONE }; static const EGLint ctx_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; EGLint w, h, dummy, format; EGLint numConfigs; EGLConfig config; EGLSurface surface; EGLContext context; EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY); eglInitialize(display, 0, 0); /* Here, the application chooses the configuration it desires. In this * sample, we have a very simplified selection process, where we pick * the first EGLConfig that matches our criteria */ eglChooseConfig(display, attribs, &config, 1, &numConfigs); /* EGL_NATIVE_VISUAL_ID is an attribute of the EGLConfig that is * guaranteed to be accepted by ANativeWindow_setBuffersGeometry(). * As soon as we picked a EGLConfig, we can safely reconfigure the * ANativeWindow buffers to match, using EGL_NATIVE_VISUAL_ID. */ eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &format); ANativeWindow_setBuffersGeometry( native_data.app->window, 0, 0, format); // ANativeActivity_setWindowFlags( native_data.app->window, AWINDOW_FLAG_FULLSCREEN | AWINDOW_FLAG_KEEP_SCREEN_ON , 0 ); surface = eglCreateWindowSurface(display, config, native_data.app->window, NULL); context = eglCreateContext(display, config, NULL, ctx_attribs); if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE) { LOGW("Unable to eglMakeCurrent"); return -1; } eglQuerySurface(display, surface, EGL_WIDTH, &w); eglQuerySurface(display, surface, EGL_HEIGHT, &h); android->dpy = display; android->ctx = context; android->surface = surface; android->shared->screen_size.w = w; android->shared->screen_size.h = h; if (strstr(glGetString(GL_RENDERER),"SGX")) android->shared->native_pixelformat = HAL_PIXEL_FORMAT_RGBA_8888; //ANativeWindow_getFormat(native_data.app->window); else android->shared->native_pixelformat = ANativeWindow_getFormat(native_data.app->window); // Initialize GL state. // glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); glEnable(GL_CULL_FACE); // glShadeModel(GL_SMOOTH); glDisable(GL_DEPTH_TEST); // Just fill the screen with a color. glClearColor( .5, .5, .5, 1 ); glClear( GL_COLOR_BUFFER_BIT ); eglSwapBuffers( android->dpy, android->surface ); return DFB_OK; } /**********************************************************************************************************************/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_ANDROID; info->caps = CSCAPS_ACCELERATION | CSCAPS_ALWAYS_INDIRECT; snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "Android" ); } static DFBResult system_initialize( CoreDFB *core, void **ret_data ) { DFBResult ret; AndroidData *android; AndroidDataShared *shared; FusionSHMPoolShared *pool; D_ASSERT( m_data == NULL ); android = D_CALLOC( 1, sizeof(AndroidData) ); if (!android) return D_OOM(); android->core = core; pool = dfb_core_shmpool( core ); shared = SHCALLOC( pool, 1, sizeof(AndroidDataShared) ); if (!shared) { D_FREE( android ); return D_OOSHM(); } shared->shmpool = pool; android->shared = shared; m_data = android; ret = InitLocal( android ); if (ret) return ret; *ret_data = m_data; dfb_surface_pool_initialize( core, &androidSurfacePoolFuncs, &shared->pool ); android->screen = dfb_screens_register( NULL, android, androidScreenFuncs ); android->layer = dfb_layers_register( android->screen, android, androidLayerFuncs ); android->java_vm = native_data.app->activity->vm; android->app_path = D_STRDUP( native_data.app->activity->internalDataPath) ; core_arena_add_shared_field( core, "android", shared ); return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **ret_data ) { DFBResult ret; void *tmp; AndroidData *android; AndroidDataShared *shared; D_ASSERT( m_data == NULL ); android = D_CALLOC( 1, sizeof(AndroidData) ); if (!android) return D_OOM(); android->core = core; ret = core_arena_get_shared_field( core, "android", &tmp ); if (ret) { D_FREE( android ); return ret; } android->shared = shared = tmp; ret = InitLocal( android ); if (ret) return ret; *ret_data = m_data = android; dfb_surface_pool_join( core, shared->pool, &androidSurfacePoolFuncs ); android->screen = dfb_screens_register( NULL, android, androidScreenFuncs ); android->layer = dfb_layers_register( android->screen, android, androidLayerFuncs ); return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { DFBResult ret; // for now just crash until we implement a clean shutdown crashme(); AndroidDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_destroy( shared->pool ); /* cleanup EGL related stuff */ eglDestroyContext( m_data->dpy, m_data->ctx ); eglTerminate( m_data->dpy ); SHFREE( shared->shmpool, shared ); D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_leave( bool emergency ) { DFBResult ret; AndroidDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_leave( shared->pool ); /* cleanup EGL related stuff */ eglDestroyContext( m_data->dpy, m_data->ctx ); eglTerminate( m_data->dpy ); D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_suspend( void ) { D_ASSERT( m_data != NULL ); return DFB_OK; } static DFBResult system_resume( void ) { D_ASSERT( m_data != NULL ); return DFB_OK; } static volatile void * system_map_mmio( unsigned int offset, int length ) { D_ASSERT( m_data != NULL ); return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator( void ) { return 0; } static VideoMode * system_get_modes( void ) { return NULL; } static VideoMode * system_get_current_mode( void ) { return NULL; } static DFBResult system_thread_init( void ) { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return 0; } static void * system_video_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_videoram_length( void ) { return 0; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length( void ) { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { } static int system_surface_data_size( void ) { return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { } DirectFB-1.7.7/systems/android/fbo_surface_pool.c0000644000175000017500000005206712254435330016706 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #define EGL_EGLEXT_PROTOTYPES #include #include #include #include #include #include #include #include #include #include #include #include "android_system.h" #include "fbo_surface_pool.h" D_DEBUG_DOMAIN( Android_FBO, "Android/FBO", "Android FBO Surface Pool" ); D_DEBUG_DOMAIN( GL, "GL", "GL" ); #define CHECK_GL_ERROR() { \ int err = glGetError(); \ if (err) { \ D_ERROR("Android/FBO: GL_ERROR(%d)\n", err); \ return DFB_INCOMPLETE; \ } \ } /**********************************************************************************************************************/ static inline bool TestEGLError( const char* pszLocation ) { EGLint iErr = eglGetError(); if (iErr != EGL_SUCCESS) { D_ERROR( "DirectFB/EGL: %s failed (%d).\n", pszLocation, iErr ); return false; } D_INFO("############################ open success!\n"); return true; } /**********************************************************************************************************************/ static int fboPoolDataSize( void ) { return sizeof(FBOPoolData); } static int fboPoolLocalDataSize( void ) { return sizeof(FBOPoolLocalData); } static int fboAllocationDataSize( void ) { return sizeof(FBOAllocationData); } static DFBResult fboInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { AndroidData *android_data = system_data; FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; D_DEBUG_AT( Android_FBO, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( data != NULL ); D_ASSERT( local != NULL ); D_ASSERT( ret_desc != NULL ); ret_desc->caps = CSPCAPS_PHYSICAL | CSPCAPS_VIRTUAL; ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_LAYER0] = CSAF_READ | CSAF_SHARED; ret_desc->types = CSTF_WINDOW | CSTF_LAYER | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_ULTIMATE; ret_desc->size = 0; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "FBO Pool" ); local->core = core; local->data = android_data; D_MAGIC_SET( data, FBOPoolData ); D_MAGIC_SET( local, FBOPoolLocalData ); return DFB_OK; } static DFBResult fboJoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { AndroidData *android_data = system_data; FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; D_DEBUG_AT( Android_FBO, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_ASSERT( local != NULL ); (void) data; local->core = core; local->data = android_data; D_MAGIC_SET( local, FBOPoolLocalData ); return DFB_OK; } static DFBResult fboDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; D_DEBUG_AT( Android_FBO, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); D_MAGIC_CLEAR( data ); D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult fboLeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; D_DEBUG_AT( Android_FBO, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); (void) data; D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult fboTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { DFBResult ret = DFB_OK; CoreSurface *surface; FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; (void) data; (void) local; D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); D_DEBUG_AT( Android_FBO, " -> %s\n", DirectFBErrorString(ret) ); return ret; } static DFBResult checkFramebufferStatus( void ) { GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); switch (status) { case 0: D_WARN( "zero status" ); case GL_FRAMEBUFFER_COMPLETE: return DFB_OK; case GL_FRAMEBUFFER_UNSUPPORTED: D_ERROR( "%s(): Unsupported!\n", __FUNCTION__); return DFB_UNSUPPORTED; case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: D_ERROR( "%s(): Incomplete attachment!\n", __FUNCTION__); return DFB_INVARG; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: D_ERROR( "%s(): Incomplete missing attachment!\n", __FUNCTION__); return DFB_INVARG; case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS: D_ERROR( "%s(): Incomplete dimensions!\n", __FUNCTION__); return DFB_INVARG; //case GL_FRAMEBUFFER_INCOMPLETE_FORMATS: // D_ERROR( "%s(): Incomplete formats!\n", __FUNCTION__); // return DFB_INVARG; default: D_ERROR( "%s(): Failure! (0x%04x)\n", __FUNCTION__, status ); return DFB_FAILURE; } } static DFBResult fboAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { CoreSurface *surface; FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; FBOAllocationData *alloc = alloc_data; (void) data; (void) local; D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); dfb_surface_calc_buffer_size( surface, 8, 2, &alloc->pitch, &alloc->size ); allocation->size = alloc->size; int tex, fbo, crb; glGetIntegerv( GL_FRAMEBUFFER_BINDING, &fbo ); CHECK_GL_ERROR(); glGetIntegerv( GL_TEXTURE_BINDING_2D, &tex ); CHECK_GL_ERROR(); glGetIntegerv( GL_RENDERBUFFER_BINDING, &crb ); CHECK_GL_ERROR(); glGenTextures( 1, &alloc->texture ); CHECK_GL_ERROR(); D_DEBUG_AT( GL, "%s glBindTexture (%d)\n", __FUNCTION__, alloc->texture ); glBindTexture( GL_TEXTURE_2D, alloc->texture ); CHECK_GL_ERROR(); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); CHECK_GL_ERROR(); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); CHECK_GL_ERROR(); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); CHECK_GL_ERROR(); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); CHECK_GL_ERROR(); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, allocation->config.size.w, allocation->config.size.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); CHECK_GL_ERROR(); /* * Framebuffer */ glGenFramebuffers( 1, &alloc->fbo ); CHECK_GL_ERROR(); D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, alloc->fbo ); glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); CHECK_GL_ERROR(); if (!alloc->fb_ready) { D_DEBUG_AT( GL, "%s glFramebufferRenderbuffer (%d)\n", __FUNCTION__, alloc->color_rb ); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, alloc->texture, 0); CHECK_GL_ERROR(); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { D_ERROR( "DirectFB/Mesa: Framebuffer not complete\n" ); } checkFramebufferStatus(); alloc->fb_ready = 1; } glBindFramebuffer( GL_FRAMEBUFFER, fbo ); CHECK_GL_ERROR(); D_DEBUG_AT( GL, "%s glBindTexture (%d)\n", __FUNCTION__, tex ); glBindTexture( GL_TEXTURE_2D, tex ); D_DEBUG_AT( GL, "%s glBindRenderbuffer (%d)\n", __FUNCTION__, crb ); allocation->size = alloc->size; #ifndef ANDROID_USE_FBO_FOR_PRIMARY alloc->layer_flip = 1; #endif D_MAGIC_SET( alloc, FBOAllocationData ); return DFB_OK; } static DFBResult fboDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; FBOAllocationData *alloc = alloc_data; (void) data; D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); D_MAGIC_ASSERT( alloc, FBOAllocationData ); glDeleteTextures( 1, &alloc->texture ); glDeleteFramebuffers( 1, &alloc->fbo ); D_MAGIC_CLEAR( alloc ); return DFB_OK; } static DFBResult fboMuckOut( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer ) { CoreSurface *surface; FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; (void) data; (void) local; D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); return DFB_UNSUPPORTED; } static DFBResult fboLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { FBOPoolLocalData *local = pool_local; FBOAllocationData *alloc = alloc_data; (void) local; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, FBOAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( Android_FBO, "%s( %p, accessor 0x%02x, access 0x%02x )\n", __FUNCTION__, lock->buffer, lock->accessor, lock->access ); // if (!dfb_core_is_master(local->core)) // return DFB_UNSUPPORTED; lock->pitch = alloc->pitch; lock->offset = 0; lock->addr = NULL; lock->phys = 0; switch (lock->accessor) { case CSAID_GPU: case CSAID_LAYER0: if (lock->access & CSAF_WRITE) { if (allocation->type & CSTF_LAYER && alloc->layer_flip) { lock->handle = NULL; D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, 0 ); glBindFramebuffer( GL_FRAMEBUFFER, 0 ); } else { lock->handle = (void*) (long) alloc->fbo; D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, alloc->fbo ); glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); CHECK_GL_ERROR(); } } else { lock->handle = (void*) (long) alloc->texture; } break; default: D_BUG( "unsupported accessor %d", lock->accessor ); return DFB_BUG; } D_DEBUG_AT( Android_FBO, " -> offset %lu, pitch %d, addr %p, phys 0x%08lx\n", lock->offset, lock->pitch, lock->addr, lock->phys ); return DFB_OK; } static DFBResult fboUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { FBOAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, FBOAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, lock->buffer ); (void) alloc; switch (lock->accessor) { case CSAID_GPU: if (lock->access & CSAF_WRITE) { //glBindFramebuffer( GL_FRAMEBUFFER, 0 ); } break; default: break; } return DFB_OK; } static DFBResult fboRead( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, void *destination, int pitch, const DFBRectangle *rect ) { FBOAllocationData *alloc = alloc_data; GLuint *buff, *sline, *dline, *s, *d; GLuint pixel, w, h, pixels_per_line; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, FBOAllocationData ); D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, allocation->buffer ); (void) alloc; /* buff = (GLuint *)D_MALLOC(rect->w * rect->h * 4); if (!buff) { D_ERROR("EGL: failed to allocate %d bytes for texture download!\n", rect->w * rect->h); return D_OOM(); } */ int fbo; glGetIntegerv( GL_FRAMEBUFFER_BINDING, &fbo ); D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, alloc->fbo ); glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); glReadPixels(rect->x, rect->y, rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, destination); D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, fbo ); glBindFramebuffer( GL_FRAMEBUFFER, fbo ); /* pixels_per_line = pitch/4; sline = buff; dline = (GLuint *)destination + rect->x + (rect->y * pixels_per_line); h = rect->h; while (h--) { s = sline; d = dline; w = rect->w; while (w--) { pixel = *s++; *d++ = (pixel & 0xff00ff00) | ((pixel >> 16) & 0x000000ff) | ((pixel << 16) & 0x00ff0000); } sline += rect->w; dline += pixels_per_line; } D_FREE(buff); */ return DFB_OK; } static DFBResult fboWrite( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, const void *source, int pitch, const DFBRectangle *rect ) { FBOAllocationData *alloc = alloc_data; CoreSurface *surface; GLuint *buff, *sline, *dline, *s, *d; GLuint pixel, w, h, pixels_per_line; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, FBOAllocationData ); surface = allocation->surface; D_MAGIC_ASSERT( surface, CoreSurface ); D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, allocation->buffer ); EGLint err; int tex; glGetIntegerv( GL_TEXTURE_BINDING_2D, &tex ); D_DEBUG_AT( GL, "%s glBindTexture (%d)\n", __FUNCTION__, alloc->texture ); glBindTexture( GL_TEXTURE_2D, alloc->texture ); /* buff = (GLuint *)D_MALLOC(rect->w * rect->h * 4); if (!buff) { D_ERROR("EGL: failed to allocate %d bytes for texture upload!\n", rect->w * rect->h * 4); return D_OOM(); } pixels_per_line = pitch/4; sline = (GLuint *)source + rect->x + (rect->y * pixels_per_line); dline = buff; h = rect->h; while (h--) { s = sline; d = dline; w = rect->w; while (w--) { pixel = *s++; *d++ = (pixel & 0xff00ff00) | ((pixel >> 16) & 0x000000ff) | ((pixel << 16) & 0x00ff0000); } sline += pixels_per_line; dline += rect->w; } */ //glTexSubImage2D(GL_TEXTURE_2D, 0, // rect->x, rect->y, // rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, buff); // glTexImage2D(GL_TEXTURE_2D, 0, // GL_RGBA, rect->w, rect->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, buff); glPixelStorei( GL_UNPACK_ALIGNMENT, 8); //glTexImage2D(GL_TEXTURE_2D, 0, // GL_RGBA, rect->w, rect->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, source); //D_FREE(buff); D_DEBUG_AT( GL, "%s glTexSubImage2D\n", __FUNCTION__ ); glTexSubImage2D( GL_TEXTURE_2D, 0, rect->x, rect->y, rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, source ); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/PVR2D: glTexSubImage2D() failed! (error = %x)\n", err ); //return DFB_FAILURE; } D_DEBUG_AT( GL, "%s glBindTexture (%d)\n", __FUNCTION__, tex ); glBindTexture( GL_TEXTURE_2D, tex ); return DFB_OK; } const SurfacePoolFuncs androidSurfacePoolFuncs = { PoolDataSize: fboPoolDataSize, PoolLocalDataSize: fboPoolLocalDataSize, AllocationDataSize: fboAllocationDataSize, InitPool: fboInitPool, JoinPool: fboJoinPool, DestroyPool: fboDestroyPool, LeavePool: fboLeavePool, TestConfig: fboTestConfig, AllocateBuffer: fboAllocateBuffer, DeallocateBuffer: fboDeallocateBuffer, MuckOut: fboMuckOut, Lock: fboLock, Unlock: fboUnlock, Read: fboRead, Write: fboWrite, }; const SurfacePoolFuncs *fboSurfacePoolFuncs = &androidSurfacePoolFuncs; DirectFB-1.7.7/systems/android/android_layer.c0000644000175000017500000001425312254435330016206 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include "android_system.h" #include "fbo_surface_pool.h" D_DEBUG_DOMAIN( EGL, "EGL", "EGL" ); /**********************************************************************************************************************/ static DFBResult androidInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { AndroidData *android = driver_data; description->type = DLTF_GRAPHICS; description->caps = DLCAPS_SURFACE; description->surface_caps = DSCAPS_NONE; description->surface_accessor = CSAID_LAYER0; direct_snputs( description->name, "Android Layer", DFB_DISPLAY_LAYER_DESC_NAME_LENGTH ); config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->width = dfb_config->mode.width ?: android->shared->screen_size.w; config->height = dfb_config->mode.height ?: android->shared->screen_size.h; if (android->shared->native_pixelformat == HAL_PIXEL_FORMAT_BGRA_8888) config->pixelformat = DSPF_ABGR; else config->pixelformat = DSPF_ARGB; config->buffermode = DLBM_BACKVIDEO; return DFB_OK; } static DFBResult androidTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *ret_failed ) { if (ret_failed) *ret_failed = DLCONF_NONE; return DFB_OK; } static DFBResult androidSetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { AndroidData *android = driver_data; return DFB_OK; } static DFBResult androidFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { AndroidData *android = driver_data; FBOAllocationData *alloc = (FBOAllocationData *)left_lock->allocation->data; alloc->layer_flip = 1; #ifdef ANDROID_USE_FBO_FOR_PRIMARY dfb_gfx_copy_to( surface, left_lock->buffer->surface, NULL , 0, 0, true ); alloc->layer_flip = 0; #endif D_DEBUG_AT( EGL, "%s eglSwapBuffers (%p, %p)\n", __FUNCTION__, android->dpy, android->surface); eglSwapBuffers(android->dpy, android->surface); dfb_surface_flip( surface, false ); return DFB_OK; } static DFBResult androidUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { AndroidData *android = driver_data; FBOAllocationData *alloc = (FBOAllocationData *)left_lock->allocation->data; alloc->layer_flip = 1; #ifdef ANDROID_USE_FBO_FOR_PRIMARY dfb_gfx_copy_to( surface, left_lock->buffer->surface, NULL , 0, 0, true ); alloc->layer_flip = 0; #endif D_DEBUG_AT( EGL, "%s eglSwapBuffers (%p, %p)\n", __FUNCTION__, android->dpy, android->surface); eglSwapBuffers(android->dpy, android->surface); dfb_surface_flip( surface, false ); return DFB_OK; } static const DisplayLayerFuncs _androidLayerFuncs = { .InitLayer = androidInitLayer, .TestRegion = androidTestRegion, .SetRegion = androidSetRegion, .FlipRegion = androidFlipRegion, .UpdateRegion = androidUpdateRegion }; const DisplayLayerFuncs *androidLayerFuncs = &_androidLayerFuncs; DirectFB-1.7.7/systems/android/android_input.c0000644000175000017500000000614112254435330016226 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include "android_system.h" DFB_INPUT_DRIVER( android ) /**************************************************************************************************/ static int driver_get_available( void ) { return dfb_system_type() == CORE_ANDROID; } static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "Android Input Driver" ); snprintf( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 1; info->version.minor = 0; } static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { AndroidData *system = dfb_system_data(); if (!system) return DFB_INIT; system->input = device; /* fill device info structure */ snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "Android Input" ); snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "Android" ); /* set one of the primary input device IDs */ info->prefered_id = DIDID_KEYBOARD; /* set type flags */ info->desc.type = DIDTF_KEYBOARD | DIDTF_MOUSE; /* set capabilities */ info->desc.caps = DICAPS_ALL; /* set private data pointer */ *driver_data = NULL; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { return DFB_UNSUPPORTED; } static void driver_close_device( void *driver_data ) { } DirectFB-1.7.7/systems/android/Makefile.am0000644000175000017500000000047212254435313015261 00000000000000EXTRA_DIST = \ android_input.c \ android_layer.c \ android_main.c \ android_screen.c \ android_surface_pool_gr.c \ android_surface_pool_gr.h \ android_system.c \ android_system.h \ fbo_surface_pool.c \ fbo_surface_pool.h \ idirectfbgl2.c \ idirectfbgl2context.c \ idirectfbimageprovider_android.c DirectFB-1.7.7/systems/android/idirectfbimageprovider_android.c0000644000175000017500000004774512254435330021617 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include "android_system.h" static DFBResult Probe( IDirectFBImageProvider_ProbeContext *ctx ); static DFBResult Construct( IDirectFBImageProvider *thiz, ... ); #include DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBImageProvider, ANDROID ) D_DEBUG_DOMAIN( imageProviderANDROID, "ANDROID/ImageProvider", "Android ImageProvider" ); /* * private data struct of IDirectFBImageProvider_ANDROID */ typedef struct { IDirectFBImageProvider_data base; char *path; int width; int height; int alpha; int pitch; int format; char *image; jbyteArray pixels; } IDirectFBImageProvider_ANDROID_data; extern AndroidData *m_data; static int check_exception( JNIEnv *env ) { if ((*env)->ExceptionCheck(env)) { (*env)->ExceptionDescribe( env ); (*env)->ExceptionClear( env ); return 1; } return 0; } static DFBResult readBufferStream( IDirectFBImageProvider_ANDROID_data *data, char **bufferData, int *bufferSize ) { IDirectFBDataBuffer *buffer = data->base.buffer; int total_size = 0; const int bufsize = 0x10000; char *buf = NULL; DFBResult ret; int len; char *rbuf; while (1) { rbuf = realloc( buf, total_size + bufsize ); if (!rbuf) { free( buf ); return DFB_NOSYSTEMMEMORY; } buf = rbuf; while (buffer->HasData( buffer ) == DFB_OK) { D_DEBUG_AT( imageProviderANDROID, "Retrieving data (up to %d )...\n", bufsize ); ret = buffer->GetData( buffer, bufsize, &buf[total_size], &len ); if (ret) return ret; D_DEBUG_AT( imageProviderANDROID, " -> got %d bytes\n", len ); total_size += len; } D_DEBUG_AT( imageProviderANDROID, "Waiting for data...\n" ); if (buffer->WaitForData( buffer, 1 ) == DFB_EOF) { *bufferData = buf; *bufferSize = total_size; return DFB_OK; } } free( buf ); return DFB_INCOMPLETE; } static DFBResult decodeImage( IDirectFBImageProvider_ANDROID_data *data ) { DFBResult ret; JNIEnv *env = 0; jclass clazz = 0; jclass clazz2 = 0; jmethodID method = 0; jstring path = 0; jobject buffer = 0; jbyteArray pixels = 0; jobject bitmap = 0; jobject convert = 0; jobject config = 0; jstring format = 0; const char *fvalue = 0; char *sdata = 0; int ssize = 0; if (data->image) return DFB_OK; (*m_data->java_vm)->AttachCurrentThread( m_data->java_vm, &env, NULL ); if (!env) { D_DEBUG_AT( imageProviderANDROID, "decodeImage: Failed to attach current thread to JVM\n" ); return DFB_INIT; } clazz = (*env)->FindClass( env, "android/graphics/BitmapFactory" ); if (check_exception( env ) || !clazz) return DFB_INIT; if (data->path) { method = (*env)->GetStaticMethodID( env, clazz, "decodeFile", "(Ljava/lang/String;)Landroid/graphics/Bitmap;" ); if (check_exception( env ) || !method) return DFB_INIT; path = (*env)->NewStringUTF( env, data->path ); if (check_exception( env ) || !path) return DFB_NOSYSTEMMEMORY; bitmap = (*env)->CallStaticObjectMethod( env, clazz, method, path ); if (check_exception( env ) || !bitmap) { (*env)->DeleteLocalRef( env, path ); check_exception( env ); return DFB_INIT; } (*env)->DeleteLocalRef( env, path ); if (check_exception( env )) return DFB_INIT; } else { jbyteArray jArray = 0; ret = readBufferStream( data, &sdata, &ssize ); if (ret) return ret; method = (*env)->GetStaticMethodID( env, clazz, "decodeByteArray", "([BII)Landroid/graphics/Bitmap;" ); if (check_exception( env ) || !method) { free( sdata ); return DFB_INIT; } jArray = (*env)->NewByteArray( env, ssize ); if (check_exception( env ) || !jArray) { free( sdata ); return DFB_NOSYSTEMMEMORY; } (*env)->SetByteArrayRegion(env, jArray, 0, ssize, sdata); if (check_exception( env )) { (*env)->DeleteLocalRef( env, jArray ); check_exception( env ); free( sdata ); return DFB_INIT; } bitmap = (*env)->CallStaticObjectMethod( env, clazz, method, jArray, 0, ssize ); if (check_exception( env ) || !bitmap) { free( sdata ); (*env)->DeleteLocalRef( env, jArray ); check_exception( env ); return DFB_INIT; } (*env)->DeleteLocalRef( env, jArray ); if (check_exception( env )) { free( sdata ); return DFB_INIT; } free( sdata ); } clazz = (*env)->GetObjectClass(env, bitmap); if (check_exception( env ) || !clazz) return DFB_INIT; method = (*env)->GetMethodID( env, clazz, "getWidth", "()I" ); if (check_exception( env ) || !method) return DFB_INIT; data->width = (*env)->CallIntMethod( env, bitmap, method ); if (check_exception( env )) return DFB_INIT; method = (*env)->GetMethodID( env, clazz, "getHeight", "()I" ); if (check_exception( env ) || !method) return DFB_INIT; data->height = (*env)->CallIntMethod( env, bitmap, method ); if (check_exception( env )) return DFB_INIT; method = (*env)->GetMethodID( env, clazz, "hasAlpha", "()Z" ); if (check_exception( env ) || !method) return DFB_INIT; data->alpha = (*env)->CallBooleanMethod( env, bitmap, method ); if (check_exception( env )) return DFB_INIT; method = (*env)->GetMethodID( env, clazz, "getRowBytes", "()I" ); if (check_exception( env ) || !method) return DFB_INIT; data->pitch = (*env)->CallIntMethod( env, bitmap, method ); if (check_exception( env )) return DFB_INIT; method = (*env)->GetMethodID( env, clazz, "getConfig", "()Landroid/graphics/Bitmap$Config;" ); if (check_exception( env ) || !method) return DFB_INIT; config = (*env)->CallObjectMethod( env, bitmap, method ); if (check_exception( env )) return DFB_INIT; if (config) { clazz2 = (*env)->FindClass( env, "android/graphics/Bitmap$Config" ); if (check_exception( env ) || !clazz2) return DFB_INIT; method = (*env)->GetMethodID( env, clazz2, "name", "()Ljava/lang/String;" ); if (check_exception( env ) || !method) return DFB_INIT; format = (jstring)(*env)->CallObjectMethod( env, config, method ); if (check_exception( env ) || !format) return DFB_INIT; fvalue = (*env)->GetStringUTFChars( env, format, 0 ); if (check_exception( env ) || !fvalue) return DFB_NOSYSTEMMEMORY; if (!strcmp( fvalue, "ALPHA_8" )) { data->format = DSPF_A8; } else if (!strcmp( fvalue, "ARGB_4444" )) { data->format = DSPF_ARGB4444; } else if (!strcmp( fvalue, "ARGB_8888" )) { data->format = DSPF_ARGB; } else if (!strcmp( fvalue, "RGB_565" )) { data->format = DSPF_RGB16; } else { data->format = DSPF_UNKNOWN; } (*env)->ReleaseStringUTFChars( env, format, fvalue ); if (check_exception( env )) return DFB_INIT; } else { // config is not known, so force conversion data->format = DSPF_UNKNOWN; } if (DSPF_ARGB != data->format) { const char *nconfig_name = "ARGB_8888"; jstring jconfig_name = 0; jclass config_clazz = 0; jobject bitmap_config = 0; jconfig_name = (*env)->NewStringUTF( env, nconfig_name ); if (check_exception( env ) || !jconfig_name) return DFB_INIT; config_clazz = (*env)->FindClass( env, "android/graphics/Bitmap$Config" ); if (check_exception( env ) || !config_clazz) { (*env)->DeleteLocalRef( env, jconfig_name ); check_exception( env ); return DFB_INIT; } method = (*env)->GetStaticMethodID( env, config_clazz, "valueOf", "(Ljava/lang/String;)Landroid/graphics/Bitmap$Config;" ); if (check_exception( env ) || !method) { (*env)->DeleteLocalRef( env, jconfig_name ); check_exception( env ); return DFB_INIT; } bitmap_config = (*env)->CallStaticObjectMethod( env, config_clazz, method, jconfig_name ); if (check_exception( env ) || !bitmap_config) { (*env)->DeleteLocalRef( env, jconfig_name ); check_exception( env ); return DFB_INIT; } method = (*env)->GetMethodID( env, clazz, "copy", "(Landroid/graphics/Bitmap$Config;Z)Landroid/graphics/Bitmap;" ); if (check_exception( env ) || !method) { (*env)->DeleteLocalRef( env, jconfig_name ); check_exception( env ); return DFB_INIT; } convert = (*env)->CallObjectMethod( env, bitmap, method, bitmap_config, 0 ); if (check_exception( env ) || !convert) { (*env)->DeleteLocalRef( env, jconfig_name ); check_exception( env ); return DFB_INIT; } (*env)->DeleteLocalRef( env, jconfig_name ); if (check_exception( env )) return DFB_INIT; bitmap = convert; data->format = DSPF_ARGB; method = (*env)->GetMethodID( env, clazz, "getRowBytes", "()I" ); if (check_exception( env ) || !method) return DFB_INIT; data->pitch = (*env)->CallIntMethod( env, bitmap, method ); if (check_exception( env )) return DFB_INIT; } pixels = (*env)->NewByteArray( env, data->pitch * data->height); if (check_exception( env ) || !pixels) return DFB_NOSYSTEMMEMORY; clazz2 = (*env)->FindClass( env, "java/nio/ByteBuffer" ); if (check_exception( env ) || !clazz2) { (*env)->DeleteLocalRef( env, pixels ); check_exception( env ); return DFB_INIT; } method = (*env)->GetStaticMethodID( env, clazz2, "wrap", "([B)Ljava/nio/ByteBuffer;" ); if (check_exception( env ) || !method) { (*env)->DeleteLocalRef( env, pixels ); check_exception( env ); return DFB_INIT; } buffer = (*env)->CallStaticObjectMethod( env, clazz2, method, pixels ); if (check_exception( env ) || !buffer) { (*env)->DeleteLocalRef( env, pixels ); check_exception( env ); return DFB_INIT; } method = (*env)->GetMethodID( env, clazz, "copyPixelsToBuffer", "(Ljava/nio/Buffer;)V" ); if (check_exception( env ) || !method) { (*env)->DeleteLocalRef( env, pixels ); check_exception( env ); return DFB_INIT; } (*env)->CallVoidMethod( env, bitmap, method, buffer ); if (check_exception( env )) { (*env)->DeleteLocalRef( env, pixels ); check_exception( env ); return DFB_INIT; } data->pixels = (*env)->NewGlobalRef( env, pixels ); if (check_exception( env )) { (*env)->DeleteLocalRef( env, pixels ); check_exception( env ); return DFB_INIT; } data->image = (*env)->GetByteArrayElements( env, pixels, 0 ); if (check_exception( env ) || !data->image) { (*env)->DeleteLocalRef( env, pixels ); check_exception( env ); return DFB_INIT; } return DFB_OK; } static void IDirectFBImageProvider_ANDROID_Destruct( IDirectFBImageProvider *thiz ) { JNIEnv *env = 0; IDirectFBImageProvider_ANDROID_data *data = (IDirectFBImageProvider_ANDROID_data *)thiz->priv; (*m_data->java_vm)->AttachCurrentThread( m_data->java_vm, &env, NULL ); if (!env) { D_DEBUG_AT( imageProviderANDROID, "Destruct: Failed to attach current thread to JVM\n" ); return; } if (data->image) { (*env)->ReleaseByteArrayElements( env, data->pixels, data->image, JNI_ABORT ); check_exception( env ); } (*env)->DeleteGlobalRef( env, data->pixels ); check_exception( env ); if (data->path) D_FREE( data->path ); } static DFBResult IDirectFBImageProvider_ANDROID_RenderTo( IDirectFBImageProvider *thiz, IDirectFBSurface *destination, const DFBRectangle *dest_rect ) { DFBResult ret; bool direct = false; DFBRegion clip; DFBRectangle rect; DFBSurfacePixelFormat format; IDirectFBSurface_data *dst_data; CoreSurface *dst_surface; CoreSurfaceBufferLock lock; DIRenderCallbackResult cb_result = DIRCR_OK; DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_ANDROID) dst_data = (IDirectFBSurface_data*) destination->priv; if (!dst_data) return DFB_DEAD; dst_surface = dst_data->surface; if (!dst_surface) return DFB_DESTROYED; ret = decodeImage( data ); if (ret) return ret; ret = destination->GetPixelFormat( destination, &format ); if (ret) return ret; dfb_region_from_rectangle( &clip, &dst_data->area.current ); if (dest_rect) { if (dest_rect->w < 1 || dest_rect->h < 1) return DFB_INVARG; rect = *dest_rect; rect.x += dst_data->area.wanted.x; rect.y += dst_data->area.wanted.y; if (!dfb_rectangle_region_intersects( &rect, &clip )) return DFB_OK; } else { rect = dst_data->area.wanted; } ret = dfb_surface_lock_buffer( dst_surface, CSBR_BACK, CSAID_CPU, CSAF_WRITE, &lock ); if (ret) return ret; dfb_scale_linear_32( (u32 *)data->image, data->width, data->height, lock.addr, lock.pitch, &rect, dst_surface, &clip ); if (data->base.render_callback) { DFBRectangle r = { 0, 0, data->width, data->height }; data->base.render_callback( &r, data->base.render_callback_context ); } dfb_surface_unlock_buffer( dst_surface, &lock ); return DFB_OK; } static DFBResult IDirectFBImageProvider_ANDROID_GetSurfaceDescription( IDirectFBImageProvider *thiz, DFBSurfaceDescription *desc ) { DFBResult ret; DFBSurfacePixelFormat primary_format = dfb_primary_layer_pixelformat(); DIRECT_INTERFACE_GET_DATA (IDirectFBImageProvider_ANDROID) if (!desc) return DFB_INVARG; ret = decodeImage( data ); if (ret) return ret; desc->flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT; if (data->alpha) desc->pixelformat = DFB_PIXELFORMAT_HAS_ALPHA(primary_format) ? primary_format : DSPF_ARGB; //desc->pixelformat = DSPF_ABGR; else desc->pixelformat = primary_format; desc->width = data->width; desc->height = data->height; D_DEBUG_AT( imageProviderANDROID, "GetSurfaceDescription: width=%d height=%d pitch=%d has_alpha=%d pixelformat=%s/%s\n", data->width, data->height, data->pitch, data->alpha, dfb_pixelformat_name(data->format), dfb_pixelformat_name(desc->pixelformat) ); return DFB_OK; } static DFBResult IDirectFBImageProvider_ANDROID_GetImageDescription( IDirectFBImageProvider *thiz, DFBImageDescription *desc ) { DFBResult ret; DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_ANDROID) if (!desc) return DFB_INVARG; ret = decodeImage( data ); if (ret) return ret; desc->caps = DICAPS_NONE; if (data->alpha) desc->caps |= DICAPS_ALPHACHANNEL; D_DEBUG_AT( imageProviderANDROID, "GetImageDescription: width=%d height=%d pitch=%d has_alpha=%d pixelformat=%s\n", data->width, data->height, data->pitch, data->alpha, dfb_pixelformat_name(data->format) ); return DFB_OK; } static DFBResult Probe( IDirectFBImageProvider_ProbeContext *ctx ) { if (dfb_system_type() == CORE_ANDROID) return DFB_OK; return DFB_UNSUPPORTED; } static DFBResult Construct( IDirectFBImageProvider *thiz, ... ) { DFBResult ret; struct stat info; void *ptr; IDirectFBDataBuffer_data *buffer_data; IDirectFBDataBuffer *buffer; CoreDFB *core; va_list tag; DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBImageProvider_ANDROID) va_start( tag, thiz ); buffer = va_arg( tag, IDirectFBDataBuffer * ); core = va_arg( tag, CoreDFB * ); va_end( tag ); D_MAGIC_ASSERT( (IAny*) buffer, DirectInterface ); buffer_data = buffer->priv; if (!buffer_data) { ret = DFB_DEAD; goto error; } if (buffer_data->filename) { data->path = D_STRDUP( buffer_data->filename ); if (stat( buffer_data->filename, &info ) < 0) { ret = errno2result( errno ); D_PERROR( "ImageProvider/ANDROID: Failure during fstat() of '%s'!\n", buffer_data->filename ); goto error; } } data->base.ref = 1; data->base.core = core; data->base.buffer = buffer; buffer->AddRef( buffer ); data->base.Destruct = IDirectFBImageProvider_ANDROID_Destruct; thiz->RenderTo = IDirectFBImageProvider_ANDROID_RenderTo; thiz->GetImageDescription = IDirectFBImageProvider_ANDROID_GetImageDescription; thiz->GetSurfaceDescription = IDirectFBImageProvider_ANDROID_GetSurfaceDescription; return DFB_OK; error: DIRECT_DEALLOCATE_INTERFACE(thiz); return ret; } DirectFB-1.7.7/systems/android/android_main.c0000644000175000017500000006234312254435330016021 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include "android_keycodes.h" #include "android_system.h" D_DEBUG_DOMAIN( ANDROID_MAIN, "ANDROID/Main", "Android Main" ); // FIXME AndroidNativeData native_data; extern AndroidData *m_data; /**********************************************************************************************************************/ extern int main( int argc, char **argv ); static inline void crashme() { char* a = 0; *a = 0; } static void * dfb_main_thread( DirectThread *thread, void *arg ) { int ret; // char *argv[] = { "android-native-dfb-app", "--dfb:debug=ANDROID,debug=direct/interface" }; // char *argv[] = { "android-native-dfb-app", "--dfb:no-debug", "-a" }; char *argv[] = { "android-native-dfb-app", "--dfb:no-cursor-updates,wm-fullscreen-updates,no-sighandler,layer-buffer-mode=backvideo,wm=sawman"}; //char *argv[] = { "android-native-dfb-app", "--dfb:no-cursor-updates,no-sighandler,layer-buffer-mode=backvideo,wm-fullscreen-updates,debug,no-debug=IDFBEventBuffer,no-debug=Core/GraphicsOps,no-debug=Core/GfxState,no-debug=Fusion/Skirmish,no-debug=Direct/Serial,no-debug=Core/SurfAllocation,no-debug=Core/WM,no-debug=GLES2/2D,no-debug=Core/SurfBuffer,no-debug=Core/Layers,no-debug=Core/SurfPoolLock,no-debug=Core/Input,no-debug=Core/LayerContext,no-debug=Core/WindowStack" }; LOGI( "Running main()..." ); ret = main( 2, argv ); LOGI( "main() has returned %d!", ret ); return NULL; } static DFBInputDeviceKeyIdentifier translate_keycode( const int key_code ) { switch (key_code) { case AKEYCODE_UNKNOWN: return DIKI_UNKNOWN; case AKEYCODE_SOFT_LEFT: break; case AKEYCODE_SOFT_RIGHT: break; case AKEYCODE_HOME: break; case AKEYCODE_BACK: return DIKI_ESCAPE; case AKEYCODE_CALL: break; case AKEYCODE_ENDCALL: break; case AKEYCODE_0: return DIKI_0; case AKEYCODE_1: return DIKI_1; case AKEYCODE_2: return DIKI_2; case AKEYCODE_3: return DIKI_3; case AKEYCODE_4: return DIKI_4; case AKEYCODE_5: return DIKI_5; case AKEYCODE_6: return DIKI_6; case AKEYCODE_7: return DIKI_7; case AKEYCODE_8: return DIKI_8; case AKEYCODE_9: return DIKI_9; case AKEYCODE_STAR: break; case AKEYCODE_POUND: break; case AKEYCODE_DPAD_UP: return DIKI_UP; case AKEYCODE_DPAD_DOWN: return DIKI_DOWN; case AKEYCODE_DPAD_LEFT: return DIKI_LEFT; case AKEYCODE_DPAD_RIGHT: return DIKI_RIGHT; case AKEYCODE_DPAD_CENTER: break; case AKEYCODE_VOLUME_UP: break; case AKEYCODE_VOLUME_DOWN: break; case AKEYCODE_POWER: break; case AKEYCODE_CAMERA: break; case AKEYCODE_CLEAR: break; case AKEYCODE_A: return DIKI_A; case AKEYCODE_B: return DIKI_B; case AKEYCODE_C: return DIKI_C; case AKEYCODE_D: return DIKI_D; case AKEYCODE_E: return DIKI_E; case AKEYCODE_F: return DIKI_F; case AKEYCODE_G: return DIKI_G; case AKEYCODE_H: return DIKI_H; case AKEYCODE_I: return DIKI_I; case AKEYCODE_J: return DIKI_J; case AKEYCODE_K: return DIKI_K; case AKEYCODE_L: return DIKI_L; case AKEYCODE_M: return DIKI_M; case AKEYCODE_N: return DIKI_N; case AKEYCODE_O: return DIKI_O; case AKEYCODE_P: return DIKI_P; case AKEYCODE_Q: return DIKI_Q; case AKEYCODE_R: return DIKI_R; case AKEYCODE_S: return DIKI_S; case AKEYCODE_T: return DIKI_T; case AKEYCODE_U: return DIKI_U; case AKEYCODE_V: return DIKI_V; case AKEYCODE_W: return DIKI_W; case AKEYCODE_X: return DIKI_X; case AKEYCODE_Y: return DIKI_Y; case AKEYCODE_Z: return DIKI_Z; case AKEYCODE_COMMA: return DIKI_COMMA; case AKEYCODE_PERIOD: break; case AKEYCODE_ALT_LEFT: return DIKI_ALT_L; case AKEYCODE_ALT_RIGHT: return DIKI_ALT_R; case AKEYCODE_SHIFT_LEFT: return DIKI_SHIFT_L; case AKEYCODE_SHIFT_RIGHT: return DIKI_SHIFT_R; case AKEYCODE_TAB: return DIKI_TAB; case AKEYCODE_SPACE: return DIKI_SPACE; case AKEYCODE_SYM: break; case AKEYCODE_EXPLORER: break; case AKEYCODE_ENVELOPE: break; case AKEYCODE_ENTER: return DIKI_ENTER; case AKEYCODE_DEL: return DIKI_DELETE; case AKEYCODE_GRAVE: break; case AKEYCODE_MINUS: break; case AKEYCODE_EQUALS: break; case AKEYCODE_LEFT_BRACKET: return DIKI_BRACKET_LEFT; case AKEYCODE_RIGHT_BRACKET: return DIKI_BRACKET_RIGHT; case AKEYCODE_BACKSLASH: return DIKI_BACKSLASH; case AKEYCODE_SEMICOLON: return DIKI_SEMICOLON; case AKEYCODE_APOSTROPHE: break; case AKEYCODE_SLASH: return DIKI_SLASH; case AKEYCODE_AT: break; case AKEYCODE_NUM: break; case AKEYCODE_HEADSETHOOK: break; case AKEYCODE_FOCUS: break; case AKEYCODE_PLUS: break; case AKEYCODE_MENU: break; case AKEYCODE_NOTIFICATION: break; case AKEYCODE_SEARCH: break; case AKEYCODE_MEDIA_PLAY_PAUSE: break; case AKEYCODE_MEDIA_STOP: break; case AKEYCODE_MEDIA_NEXT: break; case AKEYCODE_MEDIA_PREVIOUS: break; case AKEYCODE_MEDIA_REWIND: break; case AKEYCODE_MEDIA_FAST_FORWARD: break; case AKEYCODE_MUTE: break; case AKEYCODE_PAGE_UP: return DIKI_PAGE_UP; case AKEYCODE_PAGE_DOWN: return DIKI_PAGE_DOWN; case AKEYCODE_PICTSYMBOLS: break; case AKEYCODE_SWITCH_CHARSET: break; case AKEYCODE_BUTTON_A: break; case AKEYCODE_BUTTON_B: break; case AKEYCODE_BUTTON_C: break; case AKEYCODE_BUTTON_X: break; case AKEYCODE_BUTTON_Y: break; case AKEYCODE_BUTTON_Z: break; case AKEYCODE_BUTTON_L1: break; case AKEYCODE_BUTTON_R1: break; case AKEYCODE_BUTTON_L2: break; case AKEYCODE_BUTTON_R2: break; case AKEYCODE_BUTTON_THUMBL: break; case AKEYCODE_BUTTON_THUMBR: break; case AKEYCODE_BUTTON_START: break; case AKEYCODE_BUTTON_SELECT: break; case AKEYCODE_BUTTON_MODE: break; case AKEYCODE_ESCAPE: return DIKI_ESCAPE; case AKEYCODE_FORWARD_DEL: break; case AKEYCODE_CTRL_LEFT: return DIKI_CONTROL_L; case AKEYCODE_CTRL_RIGHT: return DIKI_CONTROL_R; case AKEYCODE_CAPS_LOCK: return DIKI_CAPS_LOCK; case AKEYCODE_SCROLL_LOCK: return DIKI_SCROLL_LOCK; case AKEYCODE_META_LEFT: return DIKI_META_L; case AKEYCODE_META_RIGHT: return DIKI_META_R; case AKEYCODE_FUNCTION: break; case AKEYCODE_SYSRQ: break; case AKEYCODE_BREAK: break; case AKEYCODE_MOVE_HOME: break; case AKEYCODE_MOVE_END: break; case AKEYCODE_INSERT: return DIKI_INSERT; case AKEYCODE_FORWARD: break; case AKEYCODE_MEDIA_PLAY: break; case AKEYCODE_MEDIA_PAUSE: break; case AKEYCODE_MEDIA_CLOSE: break; case AKEYCODE_MEDIA_EJECT: break; case AKEYCODE_MEDIA_RECORD: break; case AKEYCODE_F1: return DIKI_F1; case AKEYCODE_F2: return DIKI_F2; case AKEYCODE_F3: return DIKI_F3; case AKEYCODE_F4: return DIKI_F4; case AKEYCODE_F5: return DIKI_F5; case AKEYCODE_F6: return DIKI_F6; case AKEYCODE_F7: return DIKI_F7; case AKEYCODE_F8: return DIKI_F8; case AKEYCODE_F9: return DIKI_F9; case AKEYCODE_F10: return DIKI_F10; case AKEYCODE_F11: return DIKI_F11; case AKEYCODE_F12: return DIKI_F12; case AKEYCODE_NUM_LOCK: return DIKI_NUM_LOCK; case AKEYCODE_NUMPAD_0: return DIKI_KP_0; case AKEYCODE_NUMPAD_1: return DIKI_KP_1; case AKEYCODE_NUMPAD_2: return DIKI_KP_2; case AKEYCODE_NUMPAD_3: return DIKI_KP_3; case AKEYCODE_NUMPAD_4: return DIKI_KP_4; case AKEYCODE_NUMPAD_5: return DIKI_KP_5; case AKEYCODE_NUMPAD_6: return DIKI_KP_6; case AKEYCODE_NUMPAD_7: return DIKI_KP_7; case AKEYCODE_NUMPAD_8: return DIKI_KP_8; case AKEYCODE_NUMPAD_9: return DIKI_KP_9; case AKEYCODE_NUMPAD_DIVIDE: return DIKI_KP_DIV; case AKEYCODE_NUMPAD_MULTIPLY: return DIKI_KP_MULT; case AKEYCODE_NUMPAD_SUBTRACT: return DIKI_KP_MINUS; case AKEYCODE_NUMPAD_ADD: return DIKI_KP_PLUS; case AKEYCODE_NUMPAD_DOT: break; case AKEYCODE_NUMPAD_COMMA: return DIKI_COMMA; case AKEYCODE_NUMPAD_ENTER: return DIKI_KP_ENTER; case AKEYCODE_NUMPAD_EQUALS: return DIKI_KP_EQUAL; case AKEYCODE_NUMPAD_LEFT_PAREN: break; case AKEYCODE_NUMPAD_RIGHT_PAREN: break; case AKEYCODE_VOLUME_MUTE: break; case AKEYCODE_INFO: break; case AKEYCODE_CHANNEL_UP: break; case AKEYCODE_CHANNEL_DOWN: break; case AKEYCODE_ZOOM_IN: break; case AKEYCODE_ZOOM_OUT: break; case AKEYCODE_TV: break; case AKEYCODE_WINDOW: break; case AKEYCODE_GUIDE: break; case AKEYCODE_DVR: break; case AKEYCODE_BOOKMARK: break; case AKEYCODE_CAPTIONS: break; case AKEYCODE_SETTINGS: break; case AKEYCODE_TV_POWER: break; case AKEYCODE_TV_INPUT: break; case AKEYCODE_STB_POWER: break; case AKEYCODE_STB_INPUT: break; case AKEYCODE_AVR_POWER: break; case AKEYCODE_AVR_INPUT: break; case AKEYCODE_PROG_RED: break; case AKEYCODE_PROG_GREEN: break; case AKEYCODE_PROG_YELLOW: break; case AKEYCODE_PROG_BLUE: break; case AKEYCODE_APP_SWITCH: break; case AKEYCODE_BUTTON_1: break; case AKEYCODE_BUTTON_2: break; case AKEYCODE_BUTTON_3: break; case AKEYCODE_BUTTON_4: break; case AKEYCODE_BUTTON_5: break; case AKEYCODE_BUTTON_6: break; case AKEYCODE_BUTTON_7: break; case AKEYCODE_BUTTON_8: break; case AKEYCODE_BUTTON_9: break; case AKEYCODE_BUTTON_10: break; case AKEYCODE_BUTTON_11: break; case AKEYCODE_BUTTON_12: break; case AKEYCODE_BUTTON_13: break; case AKEYCODE_BUTTON_14: break; case AKEYCODE_BUTTON_15: break; case AKEYCODE_BUTTON_16: break; case AKEYCODE_LANGUAGE_SWITCH: break; case AKEYCODE_MANNER_MODE: break; case AKEYCODE_3D_MODE: break; case AKEYCODE_CONTACTS: break; case AKEYCODE_CALENDAR: break; case AKEYCODE_MUSIC: break; case AKEYCODE_CALCULATOR: break; default: break; } return DIKI_UNKNOWN; } /** * Process the next input event. */ static int32_t native_handle_input( struct android_app *app, AInputEvent *event ) { int type = AInputEvent_getType( event ); DFBInputEvent evt; evt.clazz = DFEC_INPUT; evt.device_id = dfb_input_device_id( m_data->input ); if (type == AINPUT_EVENT_TYPE_MOTION) { int action = AMotionEvent_getAction( event ) & AMOTION_EVENT_ACTION_MASK; int meta = AMotionEvent_getMetaState (event ); int proc = 0; int pos_x = AMotionEvent_getX( event, 0 ); int pos_y = AMotionEvent_getY( event, 0 ); if ((meta & AMETA_SHIFT_ON) || (meta & AMETA_SHIFT_LEFT_ON) || (meta & AMETA_SHIFT_RIGHT_ON)) evt.modifiers |= DIMM_SHIFT; if ((meta & AMETA_ALT_ON) || (meta & AMETA_ALT_LEFT_ON) || (meta & AMETA_ALT_RIGHT_ON)) evt.modifiers |= DIMM_ALT; if (meta & AMETA_SYM_ON) evt.modifiers |= DIMM_HYPER; switch (action) { case AMOTION_EVENT_ACTION_UP: evt.type = DIET_AXISMOTION; evt.button = DIBI_LEFT; evt.flags = DIEF_FOLLOW | DIEF_AXISABS; evt.axis = DIAI_X; evt.min = 0; evt.max = m_data->shared->screen_size.w - 1; evt.axisabs = pos_x; dfb_input_dispatch( m_data->input, &evt ); evt.axis = DIAI_Y; evt.min = 0; evt.max = m_data->shared->screen_size.h - 1; evt.axisabs = pos_y; dfb_input_dispatch( m_data->input, &evt ); evt.type = DIET_BUTTONRELEASE; evt.flags = DIEF_NONE; dfb_input_dispatch( m_data->input, &evt ); D_DEBUG_AT( ANDROID_MAIN, "dispatched motion event UP (%d,%d)\n", pos_x, pos_y ); break; case AMOTION_EVENT_ACTION_DOWN: evt.type = DIET_AXISMOTION; evt.button = DIBI_LEFT; evt.flags = DIEF_FOLLOW | DIEF_AXISABS; evt.axis = DIAI_X; evt.min = 0; evt.max = m_data->shared->screen_size.w - 1; evt.axisabs = pos_x; dfb_input_dispatch( m_data->input, &evt ); evt.axis = DIAI_Y; evt.min = 0; evt.max = m_data->shared->screen_size.h - 1; evt.axisabs = pos_y; dfb_input_dispatch( m_data->input, &evt ); evt.type = DIET_BUTTONPRESS; evt.flags = DIEF_NONE; dfb_input_dispatch( m_data->input, &evt ); D_DEBUG_AT( ANDROID_MAIN, "dispatched motion event DOWN (%d,%d)\n", pos_x, pos_y ); break; case AMOTION_EVENT_ACTION_MOVE: case 7: //FIXME!!! evt.type = DIET_AXISMOTION; evt.flags = DIEF_FOLLOW | DIEF_AXISABS; evt.axis = DIAI_X; evt.min = 0; evt.max = m_data->shared->screen_size.w - 1; evt.axisabs = pos_x; dfb_input_dispatch( m_data->input, &evt ); evt.axis = DIAI_Y; evt.min = 0; evt.max = m_data->shared->screen_size.h - 1; evt.axisabs = pos_y; evt.flags &= ~DIEF_FOLLOW; dfb_input_dispatch( m_data->input, &evt ); D_DEBUG_AT( ANDROID_MAIN, "dispatched motion event MOVE (%d,%d)\n", pos_x, pos_y ); break; default: D_DEBUG_AT( ANDROID_MAIN, "unhandled motion event action %d at (%d,%d)\n", action, pos_x, pos_y ); return 0; } } else if (type == AINPUT_EVENT_TYPE_KEY) { int action = AKeyEvent_getAction( event ); int meta = AKeyEvent_getMetaState( event ); int flags = AKeyEvent_getFlags( event ); if (flags & AKEY_EVENT_FLAG_CANCELED) { D_DEBUG_AT( ANDROID_MAIN, "unhandled key event action %d (cancel)", action ); return 0; } if ((meta & AMETA_SHIFT_ON) || (meta & AMETA_SHIFT_LEFT_ON) || (meta & AMETA_SHIFT_RIGHT_ON)) evt.modifiers |= DIMM_SHIFT; if ((meta & AMETA_ALT_ON) || (meta & AMETA_ALT_LEFT_ON) || (meta & AMETA_ALT_RIGHT_ON)) evt.modifiers |= DIMM_ALT; if (meta & AMETA_SYM_ON) evt.modifiers |= DIMM_HYPER; switch (action) { case AKEY_EVENT_ACTION_DOWN: evt.type = DIET_KEYPRESS; break; case AKEY_EVENT_ACTION_UP: evt.type = DIET_KEYRELEASE; break; default: D_DEBUG_AT( ANDROID_MAIN, "unhandled key event action %d", action ); return 0; } evt.flags = DIEF_KEYCODE | DIEF_KEYID; evt.key_code = AKeyEvent_getKeyCode( event ); evt.key_id = translate_keycode( evt.key_code ); dfb_input_dispatch( m_data->input, &evt ); return 1; } return 0; } /** * Process the next main command. */ static void native_handle_cmd( struct android_app* app, int32_t cmd ) { AndroidNativeData* native_data = (AndroidNativeData*)app->userData; switch (cmd) { case APP_CMD_SAVE_STATE: // The system has asked us to save our current state. Do so. // native_data->app->savedState = malloc(sizeof(struct saved_state)); // *((struct saved_state*)native_data->app->savedState) = native_data->state; // native_data->app->savedStateSize = sizeof(struct saved_state); break; case APP_CMD_INIT_WINDOW: // The window is being shown, get it ready. //if (native_data->app->window != NULL) { // native_init_display(native_data); // native_draw_frame(native_data); native_data->main_thread = direct_thread_create( DTT_DEFAULT, dfb_main_thread, native_data, "dfb-main" ); //} break; case APP_CMD_TERM_WINDOW: // The window is being hidden or closed, clean it up. // native_term_display(native_data); crashme(); direct_thread_join( native_data->main_thread ); direct_thread_destroy( native_data->main_thread ); break; case APP_CMD_GAINED_FOCUS: // When our app gains focus, we start monitoring the accelerometer. if (native_data->accelerometerSensor != NULL) { ASensorEventQueue_enableSensor(native_data->sensorEventQueue, native_data->accelerometerSensor); // We'd like to get 60 events per second (in us). ASensorEventQueue_setEventRate(native_data->sensorEventQueue, native_data->accelerometerSensor, (1000L/60)*1000); } break; case APP_CMD_LOST_FOCUS: // When our app loses focus, we stop monitoring the accelerometer. // This is to avoid consuming battery while not being used. crashme(); if (native_data->accelerometerSensor != NULL) { ASensorEventQueue_disableSensor(native_data->sensorEventQueue, native_data->accelerometerSensor); } // native_draw_frame(native_data); break; } } /** * This is the main entry point of a native application that is using * android_native_app_glue. It runs in its own thread, with its own * event loop for receiving input events and doing other things. */ void android_main( struct android_app* state ) { // Make sure glue isn't stripped. app_dummy(); memset(&native_data, 0, sizeof(native_data)); state->userData = &native_data; state->onAppCmd = native_handle_cmd; state->onInputEvent = native_handle_input; native_data.app = state; // Prepare to monitor accelerometer native_data.sensorManager = ASensorManager_getInstance(); native_data.accelerometerSensor = ASensorManager_getDefaultSensor(native_data.sensorManager, ASENSOR_TYPE_ACCELEROMETER); native_data.sensorEventQueue = ASensorManager_createEventQueue(native_data.sensorManager, state->looper, LOOPER_ID_USER, NULL, NULL); if (state->savedState != NULL) { // We are starting with a previous saved state; restore from it. // native_data.state = *(struct saved_state*)state->savedState; } // loop waiting for stuff to do. while (1) { // Read all pending events. int ident; int events; struct android_poll_source* source; // If not animating, we will block forever waiting for events. // If animating, we loop until all events are read, then continue // to draw the next frame of animation. while ((ident=ALooper_pollAll(-1, NULL, &events, (void**)&source)) >= 0) { // Process this event. if (source != NULL) { source->process(state, source); } // If a sensor has data, process it now. if (ident == LOOPER_ID_USER) { if (native_data.accelerometerSensor != NULL) { ASensorEvent event; while (ASensorEventQueue_getEvents(native_data.sensorEventQueue, &event, 1) > 0) { //LOGI("accelerometer: x=%f y=%f z=%f", event.acceleration.x, event.acceleration.y, event.acceleration.z); } } } // Check if we are exiting. if (state->destroyRequested != 0) { //native_term_display(&native_data); return; } } } } DirectFB-1.7.7/systems/android/android_screen.c0000644000175000017500000000546412254435330016355 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include "android_system.h" typedef struct { } AndroidScreenData; /**********************************************************************************************************************/ static int androidScreenDataSize( void ) { return sizeof(AndroidScreenData); } static DFBResult androidInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { AndroidData *android = driver_data; AndroidScreenData *data = screen_data; description->caps = DSCCAPS_NONE; direct_snputs( description->name, "Android", DFB_SCREEN_DESC_NAME_LENGTH ); return DFB_OK; } static DFBResult androidGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { AndroidData *android = driver_data; AndroidScreenData *data = screen_data; *ret_width = android->shared->screen_size.w; *ret_height = android->shared->screen_size.h; return DFB_OK; } static const ScreenFuncs _androidScreenFuncs = { .ScreenDataSize = androidScreenDataSize, .InitScreen = androidInitScreen, .GetScreenSize = androidGetScreenSize }; const ScreenFuncs *androidScreenFuncs = &_androidScreenFuncs; DirectFB-1.7.7/systems/android/Makefile.in0000644000175000017500000004126012466665316015307 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = systems/android DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ android_input.c \ android_layer.c \ android_main.c \ android_screen.c \ android_surface_pool_gr.c \ android_surface_pool_gr.h \ android_system.c \ android_system.h \ fbo_surface_pool.c \ fbo_surface_pool.h \ idirectfbgl2.c \ idirectfbgl2context.c \ idirectfbimageprovider_android.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/android/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/android/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am # 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: DirectFB-1.7.7/systems/android/android_surface_pool_gr.h0000644000175000017500000000425412254435330020250 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __ANDROID_SURFACE_POOL_GR_H__ #define __ANDROID_SURFACE_POOL_GR_H__ #include "hardware/gralloc.h" #include "hardware/hardware.h" #include "system/window.h" typedef struct { int magic; } FBOPoolData; typedef struct { int magic; CoreDFB *core; AndroidData *data; } FBOPoolLocalData; typedef struct { int magic; int pitch; int size; EGLImageKHR image; GLuint texture; GLuint fbo; GLuint color_rb; GLuint depth_rb; int fb_ready; ANativeWindowBuffer_t *win_buf; const hw_module_t *hw_mod; gralloc_module_t *gralloc_mod; alloc_device_t *alloc_mod; int layer_flip; } FBOAllocationData; #endif DirectFB-1.7.7/systems/android/android_surface_pool_gr.c0000644000175000017500000006243512254435330020250 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #define EGL_EGLEXT_PROTOTYPES #include #include #include #include #include #include #include #include #include #include #include #include "android_system.h" #include "android_surface_pool_gr.h" D_DEBUG_DOMAIN( Android_FBO, "Android/FBO", "Android FBO Surface Pool GR" ); D_DEBUG_DOMAIN( GL, "GL", "GL" ); #define CHECK_GL_ERROR() { \ int err = glGetError(); \ if (err) { \ D_ERROR("Android/FBO: GL_ERROR(%d)\n", err); \ return DFB_INCOMPLETE; \ } \ } /**********************************************************************************************************************/ static void incRef(struct android_native_base_t* base) { } static void decRef(struct android_native_base_t* base) { } typedef int(*HW_GET_MODULE)( const char *, const hw_module_t **); static ANativeWindowBuffer_t * AndroidAllocNativeBuffer( FBOAllocationData *alloc, int width, int height, uint32_t native_pixelformat ) { void *hw_handle = dlopen( "/system/lib/libhardware.so", RTLD_NOW ); if (!hw_handle) { D_ERROR( "DirectFB/EGL: dlopen failed (%d)\n", errno ); return NULL; } HW_GET_MODULE hw_get_module = dlsym( hw_handle, "hw_get_module" ); if (!hw_get_module) { D_ERROR( "DirectFB/EGL: dlsym failed (%d)\n", errno ); dlclose( hw_handle ); return NULL; } dlclose( hw_handle ); int err = (*hw_get_module)( "gralloc", &alloc->hw_mod ); if (err || !alloc->hw_mod) { D_ERROR( "DirectFB/EGL: hw_get_module failed (%d)\n", err ); return NULL; } alloc->hw_mod->methods->open( alloc->hw_mod, "gpu0", (struct hw_device_t**)&alloc->alloc_mod ); if (!alloc->alloc_mod) { D_ERROR( "DirectFB/EGL: open alloc failed\n"); return NULL; } buffer_handle_t buf_handle = NULL; int stride = 0; int usage = GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_SW_WRITE_OFTEN | GRALLOC_USAGE_SW_READ_OFTEN; alloc->alloc_mod->alloc( alloc->alloc_mod, width, height, native_pixelformat, usage, &buf_handle, &stride ); if (!buf_handle) { D_ERROR( "DirectFB/EGL: failed to alloc buffer\n"); return NULL; } ANativeWindowBuffer_t *wbuf = (ANativeWindowBuffer_t *)malloc( sizeof(ANativeWindowBuffer_t) ); wbuf->common.magic = ANDROID_NATIVE_BUFFER_MAGIC; wbuf->common.version = sizeof(ANativeWindowBuffer_t); memset( wbuf->common.reserved, 0, sizeof(wbuf->common.reserved) ); wbuf->width = width; wbuf->height = height; wbuf->stride = stride; wbuf->format = native_pixelformat; wbuf->common.incRef = incRef; wbuf->common.decRef = decRef; wbuf->usage = usage; wbuf->handle = buf_handle; alloc->win_buf = wbuf; alloc->gralloc_mod = (gralloc_module_t *)alloc->hw_mod; return wbuf; } void AndroidFreeNativeBuffer( FBOAllocationData *alloc ) { if (!alloc->alloc_mod || !alloc->win_buf) { D_WARN(" AndroidFreeNativeBuffer: FBO was never initialized correctly.\n "); return; } alloc->alloc_mod->free( alloc->alloc_mod, alloc->win_buf->handle ); free( alloc->win_buf ); alloc->alloc_mod->common.close( (hw_device_t *)alloc->alloc_mod ); } /**********************************************************************************************************************/ static inline bool TestEGLError( const char* pszLocation ) { EGLint iErr = eglGetError(); if (iErr != EGL_SUCCESS) { D_ERROR( "DirectFB/EGL: %s failed (%d).\n", pszLocation, iErr ); return false; } return true; } /**********************************************************************************************************************/ static int fboPoolDataSize( void ) { return sizeof(FBOPoolData); } static int fboPoolLocalDataSize( void ) { return sizeof(FBOPoolLocalData); } static int fboAllocationDataSize( void ) { return sizeof(FBOAllocationData); } static DFBResult fboInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { AndroidData *android_data = system_data; FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; D_DEBUG_AT( Android_FBO, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( data != NULL ); D_ASSERT( local != NULL ); D_ASSERT( ret_desc != NULL ); ret_desc->caps = CSPCAPS_PHYSICAL | CSPCAPS_VIRTUAL; ret_desc->access[CSAID_CPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_LAYER0] = CSAF_READ | CSAF_SHARED; ret_desc->types = CSTF_WINDOW | CSTF_LAYER | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_ULTIMATE; ret_desc->size = 0; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "FBO Pool" ); local->core = core; local->data = android_data; D_MAGIC_SET( data, FBOPoolData ); D_MAGIC_SET( local, FBOPoolLocalData ); return DFB_OK; } static DFBResult fboJoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { AndroidData *android_data = system_data; FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; D_DEBUG_AT( Android_FBO, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_ASSERT( local != NULL ); (void) data; local->core = core; local->data = android_data; D_MAGIC_SET( local, FBOPoolLocalData ); return DFB_OK; } static DFBResult fboDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; D_DEBUG_AT( Android_FBO, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); D_MAGIC_CLEAR( data ); D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult fboLeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; D_DEBUG_AT( Android_FBO, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); (void) data; D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult fboTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { DFBResult ret = DFB_OK; CoreSurface *surface; FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; (void) data; (void) local; D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); D_DEBUG_AT( Android_FBO, " -> %s\n", DirectFBErrorString(ret) ); return ret; } static DFBResult checkFramebufferStatus( void ) { GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); switch (status) { case 0: D_WARN( "zero status" ); case GL_FRAMEBUFFER_COMPLETE: return DFB_OK; case GL_FRAMEBUFFER_UNSUPPORTED: D_ERROR( "%s(): Unsupported!\n", __FUNCTION__); return DFB_UNSUPPORTED; case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: D_ERROR( "%s(): Incomplete attachment!\n", __FUNCTION__); return DFB_INVARG; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: D_ERROR( "%s(): Incomplete missing attachment!\n", __FUNCTION__); return DFB_INVARG; case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS: D_ERROR( "%s(): Incomplete dimensions!\n", __FUNCTION__); return DFB_INVARG; //case GL_FRAMEBUFFER_INCOMPLETE_FORMATS: // D_ERROR( "%s(): Incomplete formats!\n", __FUNCTION__); // return DFB_INVARG; default: D_ERROR( "%s(): Failure! (0x%04x)\n", __FUNCTION__, status ); return DFB_FAILURE; } } static DFBResult fboAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { CoreSurface *surface; FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; FBOAllocationData *alloc = alloc_data; (void) data; (void) local; D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); ANativeWindowBuffer_t *buf = AndroidAllocNativeBuffer( alloc, buffer->config.size.w, buffer->config.size.h, local->data->shared->native_pixelformat ); CHECK_GL_ERROR(); EGLint eglImgAttrs[] = { EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE, EGL_NONE }; alloc->image = eglCreateImageKHR( eglGetDisplay( EGL_DEFAULT_DISPLAY ), EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID, buf, 0 ); CHECK_GL_ERROR(); alloc->pitch = alloc->win_buf->stride * 4; alloc->size = alloc->win_buf->stride * 4 * buffer->config.size.h; int tex, fbo, crb; glGetIntegerv( GL_FRAMEBUFFER_BINDING, &fbo ); CHECK_GL_ERROR(); glGetIntegerv( GL_TEXTURE_BINDING_2D, &tex ); CHECK_GL_ERROR(); glGetIntegerv( GL_RENDERBUFFER_BINDING, &crb ); CHECK_GL_ERROR(); glGenTextures( 1, &alloc->texture ); CHECK_GL_ERROR(); D_DEBUG_AT( GL, "%s glBindTexture (%d)\n", __FUNCTION__, alloc->texture ); glBindTexture( GL_TEXTURE_2D, alloc->texture ); CHECK_GL_ERROR(); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); CHECK_GL_ERROR(); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); CHECK_GL_ERROR(); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); CHECK_GL_ERROR(); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); CHECK_GL_ERROR(); glEGLImageTargetTexture2DOES( GL_TEXTURE_2D, alloc->image ); CHECK_GL_ERROR(); glGenRenderbuffers( 1, &alloc->depth_rb ); CHECK_GL_ERROR(); D_DEBUG_AT( GL, "%s glBindRenderbuffer (%d)\n", __FUNCTION__, alloc->depth_rb ); glBindRenderbuffer( GL_RENDERBUFFER, alloc->depth_rb ); CHECK_GL_ERROR(); glGenRenderbuffers( 1, &alloc->color_rb ); CHECK_GL_ERROR(); D_DEBUG_AT( GL, "%s glBindRenderbuffer (%d)\n", __FUNCTION__, alloc->color_rb ); glBindRenderbuffer( GL_RENDERBUFFER, alloc->color_rb ); CHECK_GL_ERROR(); glEGLImageTargetRenderbufferStorageOES( GL_RENDERBUFFER, alloc->image ); CHECK_GL_ERROR(); /* * Framebuffer */ glGenFramebuffers( 1, &alloc->fbo ); CHECK_GL_ERROR(); glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); CHECK_GL_ERROR(); if (!alloc->fb_ready) { D_DEBUG_AT( GL, "%s glFramebufferRenderbuffer (%d)\n", __FUNCTION__, alloc->color_rb ); glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, alloc->color_rb ); CHECK_GL_ERROR(); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { D_ERROR( "DirectFB/Mesa: Framebuffer not complete\n" ); } checkFramebufferStatus(); alloc->fb_ready = 1; } D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, fbo ); glBindFramebuffer( GL_FRAMEBUFFER, fbo ); CHECK_GL_ERROR(); D_DEBUG_AT( GL, "%s glBindTexture (%d)\n", __FUNCTION__, tex ); glBindTexture( GL_TEXTURE_2D, tex ); D_DEBUG_AT( GL, "%s glBindRenderbuffer (%d)\n", __FUNCTION__, crb ); glBindRenderbuffer( GL_RENDERBUFFER, crb ); allocation->size = alloc->size; #ifndef ANDROID_USE_FBO_FOR_PRIMARY alloc->layer_flip = 1; #endif D_MAGIC_SET( alloc, FBOAllocationData ); return DFB_OK; } static DFBResult fboDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; FBOAllocationData *alloc = alloc_data; (void) data; D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); D_MAGIC_ASSERT( alloc, FBOAllocationData ); glDeleteTextures( 1, &alloc->texture ); glDeleteFramebuffers( 1, &alloc->fbo ); AndroidFreeNativeBuffer( alloc ); D_MAGIC_CLEAR( alloc ); return DFB_OK; } static DFBResult fboMuckOut( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer ) { CoreSurface *surface; FBOPoolData *data = pool_data; FBOPoolLocalData *local = pool_local; (void) data; (void) local; D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, FBOPoolData ); D_MAGIC_ASSERT( local, FBOPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); return DFB_UNSUPPORTED; } static DFBResult fboLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { FBOPoolLocalData *local = pool_local; FBOAllocationData *alloc = alloc_data; (void) local; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, FBOAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( Android_FBO, "%s( %p, accessor 0x%02x, access 0x%02x )\n", __FUNCTION__, lock->buffer, lock->accessor, lock->access ); // if (!dfb_core_is_master(local->core)) // return DFB_UNSUPPORTED; lock->pitch = alloc->pitch; lock->offset = 0; lock->addr = NULL; lock->phys = 0; switch (lock->accessor) { case CSAID_CPU: if (alloc->gralloc_mod->lock(alloc->gralloc_mod, alloc->win_buf->handle, GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN, 0, 0, allocation->config.size.w, allocation->config.size.h, &lock->addr)) return DFB_ACCESSDENIED; break; case CSAID_GPU: case CSAID_LAYER0: if (lock->access & CSAF_WRITE) { if (allocation->type & CSTF_LAYER && alloc->layer_flip) { lock->handle = NULL; D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, 0 ); glBindFramebuffer( GL_FRAMEBUFFER, 0 ); } else { lock->handle = (void*) (long) alloc->fbo; D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, alloc->fbo ); glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); CHECK_GL_ERROR(); } } else { lock->handle = (void*) (long) alloc->texture; } break; default: D_BUG( "unsupported accessor %d", lock->accessor ); return DFB_BUG; } D_DEBUG_AT( Android_FBO, " -> offset %lu, pitch %d, addr %p, phys 0x%08lx\n", lock->offset, lock->pitch, lock->addr, lock->phys ); return DFB_OK; } static DFBResult fboUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { FBOAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, FBOAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, lock->buffer ); (void) alloc; switch (lock->accessor) { case CSAID_CPU: alloc->gralloc_mod->unlock(alloc->gralloc_mod, alloc->win_buf->handle); break; case CSAID_GPU: if (lock->access & CSAF_WRITE) { //glBindFramebuffer( GL_FRAMEBUFFER, 0 ); } break; default: break; } return DFB_OK; } static DFBResult fboRead( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, void *destination, int pitch, const DFBRectangle *rect ) { FBOAllocationData *alloc = alloc_data; GLuint *buff, *sline, *dline, *s, *d; GLuint pixel, w, h, pixels_per_line; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, FBOAllocationData ); D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, allocation->buffer ); (void) alloc; /* buff = (GLuint *)D_MALLOC(rect->w * rect->h * 4); if (!buff) { D_ERROR("EGL: failed to allocate %d bytes for texture download!\n", rect->w * rect->h); return D_OOM(); } */ int fbo; glGetIntegerv( GL_FRAMEBUFFER_BINDING, &fbo ); D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, alloc->fbo ); glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); glReadPixels(rect->x, rect->y, rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, destination); D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, fbo ); glBindFramebuffer( GL_FRAMEBUFFER, fbo ); /* pixels_per_line = pitch/4; sline = buff; dline = (GLuint *)destination + rect->x + (rect->y * pixels_per_line); h = rect->h; while (h--) { s = sline; d = dline; w = rect->w; while (w--) { pixel = *s++; *d++ = (pixel & 0xff00ff00) | ((pixel >> 16) & 0x000000ff) | ((pixel << 16) & 0x00ff0000); } sline += rect->w; dline += pixels_per_line; } D_FREE(buff); */ return DFB_OK; } static DFBResult fboWrite( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, const void *source, int pitch, const DFBRectangle *rect ) { FBOAllocationData *alloc = alloc_data; CoreSurface *surface; GLuint *buff, *sline, *dline, *s, *d; GLuint pixel, w, h, pixels_per_line; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, FBOAllocationData ); surface = allocation->surface; D_MAGIC_ASSERT( surface, CoreSurface ); D_DEBUG_AT( Android_FBO, "%s( %p )\n", __FUNCTION__, allocation->buffer ); EGLint err; int tex; glGetIntegerv( GL_TEXTURE_BINDING_2D, &tex ); D_DEBUG_AT( GL, "%s glBindTexture (%d)\n", __FUNCTION__, alloc->texture ); glBindTexture( GL_TEXTURE_2D, alloc->texture ); /* buff = (GLuint *)D_MALLOC(rect->w * rect->h * 4); if (!buff) { D_ERROR("EGL: failed to allocate %d bytes for texture upload!\n", rect->w * rect->h * 4); return D_OOM(); } pixels_per_line = pitch/4; sline = (GLuint *)source + rect->x + (rect->y * pixels_per_line); dline = buff; h = rect->h; while (h--) { s = sline; d = dline; w = rect->w; while (w--) { pixel = *s++; *d++ = (pixel & 0xff00ff00) | ((pixel >> 16) & 0x000000ff) | ((pixel << 16) & 0x00ff0000); } sline += pixels_per_line; dline += rect->w; } */ //glTexSubImage2D(GL_TEXTURE_2D, 0, // rect->x, rect->y, // rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, buff); // glTexImage2D(GL_TEXTURE_2D, 0, // GL_RGBA, rect->w, rect->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, buff); glPixelStorei( GL_UNPACK_ALIGNMENT, 8); //glTexImage2D(GL_TEXTURE_2D, 0, // GL_RGBA, rect->w, rect->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, source); //D_FREE(buff); D_DEBUG_AT( GL, "%s glTexSubImage2D\n", __FUNCTION__ ); glTexSubImage2D( GL_TEXTURE_2D, 0, rect->x, rect->y, rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, source ); if ((err = glGetError()) != 0) { D_ERROR( "DirectFB/PVR2D: glTexSubImage2D() failed! (error = %x)\n", err ); //return DFB_FAILURE; } D_DEBUG_AT( GL, "%s glBindTexture (%d)\n", __FUNCTION__, tex ); glBindTexture( GL_TEXTURE_2D, tex ); return DFB_OK; } const SurfacePoolFuncs androidSurfacePoolFuncs = { PoolDataSize: fboPoolDataSize, PoolLocalDataSize: fboPoolLocalDataSize, AllocationDataSize: fboAllocationDataSize, InitPool: fboInitPool, JoinPool: fboJoinPool, DestroyPool: fboDestroyPool, LeavePool: fboLeavePool, TestConfig: fboTestConfig, AllocateBuffer: fboAllocateBuffer, DeallocateBuffer: fboDeallocateBuffer, MuckOut: fboMuckOut, Lock: fboLock, Unlock: fboUnlock, Read: fboRead, Write: fboWrite, }; const SurfacePoolFuncs *fboSurfacePoolFuncs = &androidSurfacePoolFuncs; DirectFB-1.7.7/systems/android/android_system.h0000644000175000017500000000602212254435330016416 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __ANDROID_ANDROID_H__ #define __ANDROID_ANDROID_H__ #include #include #include #include #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "android-dfb", __VA_ARGS__)) #define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "android-dfb", __VA_ARGS__)) #define EGL_EGLEXT_PROTOTYPES #define GL_GLEXT_PROTOTYPES #include #include #ifndef GLAPIENTRY #define GLAPIENTRY #endif #include #include #ifdef GL_OES_EGL_image static PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES_func; #endif #include #include #include #include extern const SurfacePoolFuncs androidSurfacePoolFuncs; extern const ScreenFuncs *androidScreenFuncs; extern const DisplayLayerFuncs *androidLayerFuncs; typedef struct { FusionSHMPoolShared *shmpool; CoreSurfacePool *pool; DFBDimension screen_size; uint32_t native_pixelformat; } AndroidDataShared; typedef struct { AndroidDataShared *shared; CoreDFB *core; CoreScreen *screen; CoreLayer *layer; CoreInputDevice *input; JavaVM *java_vm; char *app_path; EGLDisplay dpy; EGLContext ctx; EGLSurface surface; } AndroidData; /** * Shared state for our app. */ typedef struct { struct android_app* app; ASensorManager* sensorManager; const ASensor* accelerometerSensor; ASensorEventQueue* sensorEventQueue; DirectThread *main_thread; } AndroidNativeData; #endif DirectFB-1.7.7/systems/android/idirectfbgl2.c0000644000175000017500000001415512254435330015733 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #define EGL_EGLEXT_PROTOTYPES #define GL_GLEXT_PROTOTYPES #include #include #include #include #include #include #include D_DEBUG_DOMAIN( IDFBGL_Android, "IDirectFBGL2/Android", "IDirectFBGL2 Android Implementation" ); static DirectResult Probe( void *ctx, ... ); static DirectResult Construct( void *interface, ... ); #include DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBGL2, Android ) /* * private data struct of IDirectFBGL2 */ typedef struct { int ref; /* reference counter */ CoreDFB *core; } IDirectFBGL2_data; static void IDirectFBGL2_Destruct( IDirectFBGL2 *thiz ) { // IDirectFBGL2_data *data = thiz->priv; DIRECT_DEALLOCATE_INTERFACE( thiz ); } static DirectResult IDirectFBGL2_AddRef( IDirectFBGL2 *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL2); data->ref++; return DFB_OK; } static DirectResult IDirectFBGL2_Release( IDirectFBGL2 *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL2) if (--data->ref == 0) IDirectFBGL2_Destruct( thiz ); return DFB_OK; } static DFBResult IDirectFBGL2_CreateContext( IDirectFBGL2 *thiz, const DFBGL2ContextDescription *desc, IDirectFBGL2Context **ret_context ) { DFBResult ret; DIRECT_INTERFACE_GET_DATA (IDirectFBGL2); D_DEBUG_AT( IDFBGL_Android, "%s()\n", __FUNCTION__ ); (void) desc; DirectInterfaceFuncs *funcs = NULL; ret = DirectGetInterface( &funcs, "IDirectFBGL2Context", "Android", DirectProbeInterface, NULL ); if (ret) return ret; IDirectFBGL2Context *context; ret = funcs->Allocate( (void**) &context ); if (ret) return ret; /* Construct the interface. */ ret = funcs->Construct( context, data->core ); if (ret) return ret; *ret_context = context; return DFB_OK; } static DFBResult IDirectFBGL2_GetProcAddress( IDirectFBGL2 *thiz, const char *name, void **ret_address ) { void *handle; DIRECT_INTERFACE_GET_DATA (IDirectFBGL2); D_DEBUG_AT( IDFBGL_Android, "%s()\n", __FUNCTION__ ); if (!name) return DFB_INVARG; if (!ret_address) return DFB_INVARG; handle = (void*) eglGetProcAddress( name ); if (!handle) return DFB_FAILURE; *ret_address = handle; return (*ret_address) ? DFB_OK : DFB_UNSUPPORTED; } static DFBResult IDirectFBGL2_TextureSurface( IDirectFBGL2 *thiz, int target, int level, IDirectFBSurface *surface ) { DFBResult ret; IDirectFBSurface_data *surface_data; CoreSurface *core_surface; CoreSurfaceBufferLock lock; DIRECT_INTERFACE_GET_DATA (IDirectFBGL2); D_DEBUG_AT( IDFBGL_Android, "%s( %d, %d, %p )\n", __FUNCTION__, target, level, (void *)surface ); if (level) return DFB_UNSUPPORTED; DIRECT_INTERFACE_GET_DATA_FROM (surface, surface_data, IDirectFBSurface); core_surface = surface_data->surface; if (!core_surface) return DFB_DESTROYED; /* Lock buffer */ ret = dfb_surface_lock_buffer( core_surface, CSBR_FRONT, CSAID_ACCEL1, CSAF_READ, &lock ); if (ret) { D_DERROR( ret, "IDirectFBGL2/Android: Could not lock texture buffer!\n" ); return ret; } glEGLImageTargetTexture2DOES( target, lock.handle ); dfb_surface_unlock_buffer( core_surface, &lock ); return DFB_OK; } /* exported symbols */ static DirectResult Probe( void *ctx, ... ) { D_DEBUG_AT( IDFBGL_Android, "%s()\n", __FUNCTION__ ); (void) ctx; /* ... */ return DFB_OK; } static DirectResult Construct( void *interface, ... ) { IDirectFB *dfb; IDirectFBGL2 *thiz = interface; CoreDFB *core; D_DEBUG_AT( IDFBGL_Android, "%s()\n", __FUNCTION__ ); va_list tag; va_start(tag, interface); dfb = va_arg(tag, IDirectFB *); core = va_arg(tag, CoreDFB *); va_end( tag ); /* Allocate interface data. */ DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IDirectFBGL2 ); /* Initialize interface data. */ data->core = core; data->ref = 1; /* Assign interface pointers. */ thiz->AddRef = IDirectFBGL2_AddRef; thiz->Release = IDirectFBGL2_Release; thiz->CreateContext = IDirectFBGL2_CreateContext; thiz->GetProcAddress = IDirectFBGL2_GetProcAddress; thiz->TextureSurface = IDirectFBGL2_TextureSurface; return DFB_OK; } DirectFB-1.7.7/systems/android/fbo_surface_pool.h0000644000175000017500000000362712254435330016711 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __ANDROID_FBO_SURFACE_POOL_H__ #define __ANDROID_FBO_SURFACE_POOL_H__ typedef struct { int magic; } FBOPoolData; typedef struct { int magic; CoreDFB *core; AndroidData *data; } FBOPoolLocalData; typedef struct { int magic; int pitch; int size; GLuint texture; GLuint fbo; GLuint color_rb; GLuint depth_rb; int fb_ready; int layer_flip; } FBOAllocationData; #endif DirectFB-1.7.7/systems/android/idirectfbgl2context.c0000644000175000017500000001706412254435330017342 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include "android_system.h" D_DEBUG_DOMAIN( IDFBGL_Android, "IDirectFBGL2Context/Android", "IDirectFBGL2Context Android Implementation" ); D_DEBUG_DOMAIN( GL, "GL", "GL" ); static DirectResult Probe( void *ctx, ... ); static DirectResult Construct( void *interface, ... ); #include DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBGL2Context, Android ) /* * private data struct of IDirectFBGL2Context */ typedef struct { int ref; /* reference counter */ CoreDFB *core; AndroidData *android; EGLDisplay eglDisplay; EGLContext eglContext; GLuint fbo; GLuint depth; bool locked; CoreSurface *surface; CoreSurfaceBufferLock lock; } IDirectFBGL2Context_data; static void IDirectFBGL2Context_Destruct( IDirectFBGL2Context *thiz ) { IDirectFBGL2Context_data *data = thiz->priv; if (data->locked) dfb_surface_unlock_buffer( data->surface, &data->lock ); DIRECT_DEALLOCATE_INTERFACE( thiz ); } static DirectResult IDirectFBGL2Context_AddRef( IDirectFBGL2Context *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL2Context); data->ref++; return DFB_OK; } static DirectResult IDirectFBGL2Context_Release( IDirectFBGL2Context *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL2Context) if (--data->ref == 0) IDirectFBGL2Context_Destruct( thiz ); return DFB_OK; } static DFBResult IDirectFBGL2Context_Bind( IDirectFBGL2Context *thiz, IDirectFBSurface *draw, IDirectFBSurface *read ) { DFBResult ret; IDirectFBSurface_data *draw_data; CoreSurface *surface; DIRECT_INTERFACE_GET_DATA (IDirectFBGL2Context); D_DEBUG_AT( IDFBGL_Android, "%s()\n", __FUNCTION__ ); if (!draw || !read) return DFB_INVARG; if (draw != read) return DFB_UNSUPPORTED; if (data->locked) return DFB_LOCKED; /* * Get destination and source core surfaces */ DIRECT_INTERFACE_GET_DATA_FROM( draw, draw_data, IDirectFBSurface ); surface = draw_data->surface; if (!surface) return DFB_DESTROYED; data->surface = surface; eglMakeCurrent( data->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, data->eglContext ); /* Lock destination buffer */ ret = dfb_surface_lock_buffer( surface, CSBR_BACK, CSAID_ACCEL1, CSAF_READ | CSAF_WRITE, &data->lock ); if (ret) { D_DERROR( ret, "IDirectFBGL2Context/Android: Could not lock destination buffer!\n" ); return ret; } D_DEBUG_AT( GL, "%s glBindRenderbuffer (%d)\n", __FUNCTION__, data->depth ); /* Update depth buffer */ glBindRenderbuffer( GL_RENDERBUFFER, data->depth ); glRenderbufferStorage( GL_RENDERBUFFER, GL_DEPTH_COMPONENT, surface->config.size.w, surface->config.size.h ); D_DEBUG_AT( GL, "%s glBindFramebuffer (%d)\n", __FUNCTION__, data->fbo ); /* Set color and depth buffers */ glBindFramebuffer( GL_FRAMEBUFFER, data->fbo ); D_DEBUG_AT( GL, "%s glFramebufferRenderbuffer (%d)\n", __FUNCTION__, data->depth ); glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, data->depth ); D_DEBUG_AT( GL, "%s glFramebufferRenderbuffer (%d)\n", __FUNCTION__, data->lock.handle ); glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, (GLuint) (long) data->lock.handle ); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { D_ERROR( "DirectFB/GLES2: Framebuffer not complete\n" ); } data->locked = true; return DFB_OK; } static DFBResult IDirectFBGL2Context_Unbind( IDirectFBGL2Context *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL2Context); D_DEBUG_AT( IDFBGL_Android, "%s()\n", __FUNCTION__ ); if (!data->locked) return DFB_BUFFEREMPTY; glFinish(); dfb_surface_unlock_buffer( data->surface, &data->lock ); eglMakeCurrent( data->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); data->locked = false; return DFB_OK; } static inline bool TestEGLError(const char* pszLocation) { EGLint iErr = eglGetError(); if (iErr != EGL_SUCCESS) { D_ERROR("DirectFB/Android: %s failed (%d).\n", pszLocation, iErr); return false; } return true; } /* exported symbols */ static DirectResult Probe( void *ctx, ... ) { D_DEBUG_AT( IDFBGL_Android, "%s()\n", __FUNCTION__ ); if (dfb_system_type() != CORE_ANDROID) return DFB_UNSUPPORTED; return DFB_OK; } static DirectResult Construct( void *interface, ... ) { IDirectFBGL2Context *thiz = interface; CoreDFB *core; AndroidData *android = dfb_system_data(); D_DEBUG_AT( IDFBGL_Android, "%s()\n", __FUNCTION__ ); va_list tag; va_start(tag, interface); core = va_arg(tag, CoreDFB *); va_end( tag ); /* Allocate interface data. */ DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IDirectFBGL2Context ); /* Initialize interface data. */ data->core = core; data->ref = 1; data->android = android; /* * Setup the OpenGL state */ data->eglDisplay = android->dpy; data->eglContext = eglCreateContext( android->dpy, NULL, android->ctx, NULL ); if (!TestEGLError("eglCreateContext")) return DFB_INIT; eglMakeCurrent( data->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, data->eglContext ); if (!TestEGLError("eglMakeCurrent")) return DFB_INIT; glGenFramebuffers( 1, &data->fbo ); glGenRenderbuffers( 1, &data->depth ); /* Assign interface pointers. */ thiz->AddRef = IDirectFBGL2Context_AddRef; thiz->Release = IDirectFBGL2Context_Release; thiz->Bind = IDirectFBGL2Context_Bind; thiz->Unbind = IDirectFBGL2Context_Unbind; return DFB_OK; } DirectFB-1.7.7/systems/mesa/0000755000175000017500000000000012466665353012625 500000000000000DirectFB-1.7.7/systems/mesa/mesa_system.h0000644000175000017500000000533712254435330015240 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __MESA_MESA_H__ #define __MESA_MESA_H__ #define EGL_EGLEXT_PROTOTYPES #define GL_GLEXT_PROTOTYPES #include #include #include #ifndef GLAPIENTRY #define GLAPIENTRY #endif #include #include #include #include #include #include #include #include #include "vt.h" extern const SurfacePoolFuncs mesaSurfacePoolFuncs; extern const ScreenFuncs *mesaScreenFuncs; extern const DisplayLayerFuncs *mesaLayerFuncs; typedef struct { FusionSHMPoolShared *shmpool; CoreSurfacePool *pool; } MesaDataShared; typedef struct { MesaDataShared *shared; CoreDFB *core; CoreScreen *screen; CoreLayer *layer; int fd; /* DRM file descriptor */ struct gbm_device *gbm; EGLDisplay dpy; EGLContext ctx; drmModeConnector *connector; drmModeEncoder *encoder; drmModeModeInfo mode; drmModeRes *resources; drmModeCrtcPtr saved_crtc; drmEventContext drmeventcontext; VirtualTerminal *vt; bool flip_pending; CoreSurfaceBuffer *buffer; DirectThread *thread; DirectMutex lock; DirectWaitQueue wq_event; DirectWaitQueue wq_flip; } MesaData; #endif DirectFB-1.7.7/systems/mesa/vt.c0000644000175000017500000004404712254435330013334 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include /* Needs to be included before dfb_types.h */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "vt.h" #include "mesa_system.h" D_DEBUG_DOMAIN( VT, "Mesa/VT", "Mesa System Module VT Handling" ); /* * FIXME: the following looks like a bad hack. * * SIGUNUSED is no longer unused, but is defined for backwards compatibility. * sparc, mips and alpha signal.h however do not define SIGUNUSED. */ #ifdef SIGUNUSED #define SIG_SWITCH_FROM (SIGUNUSED + 10) #define SIG_SWITCH_TO (SIGUNUSED + 11) #else #define SIG_SWITCH_FROM (31 + 10) #define SIG_SWITCH_TO (31 + 11) #endif #ifndef SI_KERNEL /* glibc 2.1.x doesn't have this in /usr/include/bits/siginfo.h */ #define SI_KERNEL 0x80 #endif extern MesaData *m_data; static VirtualTerminal *dfb_vt = NULL; static DFBResult vt_init_switching( void ); static void *vt_thread( DirectThread *thread, void *arg ); static void vt_start_flushing( void ); static void vt_stop_flushing( void ); static void *vt_flush_thread( DirectThread *thread, void *arg ); DFBResult dfb_vt_initialize( void ) { DFBResult ret; struct vt_stat vs; D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); dfb_vt = D_CALLOC( 1, sizeof(VirtualTerminal) ); if (!dfb_vt) return D_OOM(); setsid(); dfb_vt->fd0 = open( "/dev/tty0", O_RDONLY | O_NOCTTY ); if (dfb_vt->fd0 < 0) { if (errno == ENOENT) { dfb_vt->fd0 = open( "/dev/vc/0", O_RDONLY | O_NOCTTY ); if (dfb_vt->fd0 < 0) { if (errno == ENOENT) { D_PERROR( "DirectFB/core/vt: Couldn't open " "neither `/dev/tty0' nor `/dev/vc/0'!\n" ); } else { D_PERROR( "DirectFB/core/vt: " "Error opening `/dev/vc/0'!\n" ); } D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } } else { D_PERROR( "DirectFB/core/vt: Error opening `/dev/tty0'!\n"); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } } if (ioctl( dfb_vt->fd0, VT_GETSTATE, &vs ) < 0) { D_PERROR( "DirectFB/core/vt: VT_GETSTATE failed!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } dfb_vt->prev = vs.v_active; if (!dfb_config->vt_switch) { if (dfb_config->vt_num != -1) dfb_vt->num = dfb_config->vt_num; else dfb_vt->num = dfb_vt->prev; /* move vt to framebuffer */ // dfb_vt->old_fb = vt_get_fb( dfb_vt->num ); // vt_set_fb( dfb_vt->num, -1 ); } else { if (dfb_config->vt_num == -1) { int n; n = ioctl( dfb_vt->fd0, VT_OPENQRY, &dfb_vt->num ); if (n < 0 || dfb_vt->num == -1) { D_PERROR( "DirectFB/core/vt: Cannot allocate VT!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } } else { dfb_vt->num = dfb_config->vt_num; } /* move vt to framebuffer */ // dfb_vt->old_fb = vt_get_fb( dfb_vt->num ); // vt_set_fb( dfb_vt->num, -1 ); /* switch to vt */ while (ioctl( dfb_vt->fd0, VT_ACTIVATE, dfb_vt->num ) < 0) { if (errno == EINTR) continue; D_PERROR( "DirectFB/core/vt: VT_ACTIVATE failed!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } while (ioctl( dfb_vt->fd0, VT_WAITACTIVE, dfb_vt->num ) < 0) { if (errno == EINTR) continue; D_PERROR( "DirectFB/core/vt: VT_WAITACTIVE failed!\n" ); close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return DFB_INIT; } usleep( 40000 ); } ret = vt_init_switching(); if (ret) { if (dfb_config->vt_switch) { D_DEBUG_AT( VT, " -> switching back...\n" ); ioctl( dfb_vt->fd0, VT_ACTIVATE, dfb_vt->prev ); ioctl( dfb_vt->fd0, VT_WAITACTIVE, dfb_vt->prev ); D_DEBUG_AT( VT, " -> ...switched back\n" ); ioctl( dfb_vt->fd0, VT_DISALLOCATE, dfb_vt->num ); } close( dfb_vt->fd0 ); D_FREE( dfb_vt ); dfb_vt = NULL; return ret; } vt_start_flushing(); m_data->vt = dfb_vt; return DFB_OK; } DFBResult dfb_vt_join( void ) { D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); dfb_vt_detach( true ); return DFB_OK; } DFBResult dfb_vt_shutdown( bool emergency ) { const char cursoron_str[] = "\033[?0;0;0c"; const char blankon_str[] = "\033[9;10]"; int res; (void)res; D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); if (!dfb_vt) return DFB_OK; vt_stop_flushing(); if (dfb_config->vt_switching) { if (ioctl( dfb_vt->fd, VT_SETMODE, &dfb_vt->vt_mode ) < 0) D_PERROR( "DirectFB/fbdev/vt: Unable to restore VT mode!!!\n" ); sigaction( SIG_SWITCH_FROM, &dfb_vt->sig_usr1, NULL ); sigaction( SIG_SWITCH_TO, &dfb_vt->sig_usr2, NULL ); direct_thread_cancel( dfb_vt->thread ); direct_thread_join( dfb_vt->thread ); direct_thread_destroy( dfb_vt->thread ); pthread_mutex_destroy( &dfb_vt->lock ); pthread_cond_destroy( &dfb_vt->wait ); } if (dfb_config->kd_graphics) { if (ioctl( dfb_vt->fd, KDSETMODE, KD_TEXT ) < 0) D_PERROR( "DirectFB/fbdev/vt: KD_TEXT failed!\n" ); } else { res = write( dfb_vt->fd, blankon_str, sizeof(blankon_str) ); } res = write( dfb_vt->fd, cursoron_str, sizeof(cursoron_str) ); if (tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ) < 0) D_PERROR("DirectFB/fbdev/vt: tcsetattr for original values failed!\n"); if (ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ) < 0) D_PERROR( "DirectFB/fbdev/vt: K_XLATE failed!\n" ); if (dfb_config->vt_switch) { D_DEBUG_AT( VT, " -> switching back...\n" ); if (ioctl( dfb_vt->fd0, VT_ACTIVATE, dfb_vt->prev ) < 0) D_PERROR( "DirectFB/core/vt: VT_ACTIVATE" ); if (ioctl( dfb_vt->fd0, VT_WAITACTIVE, dfb_vt->prev ) < 0) D_PERROR( "DirectFB/core/vt: VT_WAITACTIVE" ); D_DEBUG_AT( VT, " -> switched back...\n" ); usleep( 40000 ); /* restore con2fbmap */ // vt_set_fb( dfb_vt->num, dfb_vt->old_fb ); if (close( dfb_vt->fd ) < 0) D_PERROR( "DirectFB/core/vt: Unable to " "close file descriptor of allocated VT!\n" ); if (ioctl( dfb_vt->fd0, VT_DISALLOCATE, dfb_vt->num ) < 0) D_PERROR( "DirectFB/core/vt: Unable to disallocate VT!\n" ); } else { /* restore con2fbmap */ // vt_set_fb( dfb_vt->num, dfb_vt->old_fb ); if (close( dfb_vt->fd ) < 0) D_PERROR( "DirectFB/core/vt: Unable to " "close file descriptor of current VT!\n" ); } if (close( dfb_vt->fd0 ) < 0) D_PERROR( "DirectFB/core/vt: Unable to " "close file descriptor of tty0!\n" ); D_FREE( dfb_vt ); dfb_vt = m_data->vt = NULL; return DFB_OK; } DFBResult dfb_vt_leave( bool emergency ) { D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); return DFB_OK; } DFBResult dfb_vt_detach( bool force ) { D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); if (dfb_config->vt_switch || force) { int fd; struct vt_stat vt_state; fd = open( "/dev/tty", O_RDONLY | O_NOCTTY ); if (fd < 0) { if (errno == ENXIO) return DFB_OK; D_PERROR( "DirectFB/VT: Opening /dev/tty failed!\n" ); return errno2result( errno ); } if (ioctl( fd, VT_GETSTATE, &vt_state )) { close( fd ); return DFB_OK; } if (ioctl( fd, TIOCNOTTY )) { D_PERROR( "DirectFB/VT: TIOCNOTTY on /dev/tty failed\n" ); close( fd ); return errno2result( errno ); } close( fd ); } return DFB_OK; } bool dfb_vt_switch( int num ) { D_DEBUG_AT( VT, "%s( %d )\n", __FUNCTION__, num ); if (!dfb_config->vt_switching) return false; D_DEBUG_AT( VT, " -> switching to vt %d...\n", num ); if (ioctl( dfb_vt->fd0, VT_ACTIVATE, num ) < 0) D_PERROR( "DirectFB/fbdev/vt: VT_ACTIVATE failed\n" ); return true; } static void * vt_thread( DirectThread *thread, void *arg ) { D_DEBUG_AT( VT, "%s( %p, %p )\n", __FUNCTION__, thread, arg ); pthread_mutex_lock( &dfb_vt->lock ); while (true) { direct_thread_testcancel( thread ); D_DEBUG_AT( VT, "...%s (signal %d)\n", __FUNCTION__, dfb_vt->vt_sig); switch (dfb_vt->vt_sig) { default: D_BUG( "unexpected vt_sig" ); /* fall through */ case -1: pthread_cond_wait( &dfb_vt->wait, &dfb_vt->lock ); continue; case SIG_SWITCH_FROM: if (dfb_core_suspend( m_data->core ) == DFB_OK) { if (ioctl( dfb_vt->fd, VT_RELDISP, VT_ACKACQ ) < 0) D_PERROR( "DirectFB/fbdev/vt: VT_RELDISP failed\n" ); } break; case SIG_SWITCH_TO: if (dfb_core_resume( m_data->core ) == DFB_OK) { if (ioctl( dfb_vt->fd, VT_RELDISP, VT_ACKACQ ) < 0) D_PERROR( "DirectFB/fbdev/vt: VT_RELDISP failed\n" ); if (dfb_config->kd_graphics) { if (ioctl( dfb_vt->fd, KDSETMODE, KD_GRAPHICS ) < 0) D_PERROR( "DirectFB/fbdev/vt: KD_GRAPHICS failed!\n" ); } } break; } dfb_vt->vt_sig = -1; pthread_cond_signal( &dfb_vt->wait ); } return NULL; } static void vt_switch_handler( int signum ) { D_DEBUG_AT( VT, "%s( %d )\n", __FUNCTION__, signum ); pthread_mutex_lock( &dfb_vt->lock ); while (dfb_vt->vt_sig != -1) pthread_cond_wait( &dfb_vt->wait, &dfb_vt->lock ); dfb_vt->vt_sig = signum; pthread_cond_signal( &dfb_vt->wait ); pthread_mutex_unlock( &dfb_vt->lock ); } static DFBResult vt_init_switching( void ) { struct termios ts; const char cursoroff_str[] = "\033[?1;0;0c"; const char blankoff_str[] = "\033[9;0]"; char buf[32]; int res; (void)res; D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ ); /* FIXME: Opening the device should be moved out of this function. */ snprintf(buf, 32, "/dev/tty%d", dfb_vt->num); dfb_vt->fd = open( buf, O_RDWR | O_NOCTTY ); if (dfb_vt->fd < 0) { if (errno == ENOENT) { snprintf(buf, 32, "/dev/vc/%d", dfb_vt->num); dfb_vt->fd = open( buf, O_RDWR | O_NOCTTY ); if (dfb_vt->fd < 0) { if (errno == ENOENT) { D_PERROR( "DirectFB/core/vt: Couldn't open " "neither `/dev/tty%d' nor `/dev/vc/%d'!\n", dfb_vt->num, dfb_vt->num ); } else { D_PERROR( "DirectFB/core/vt: " "Error opening `%s'!\n", buf ); } return errno2result( errno ); } } else { D_PERROR( "DirectFB/core/vt: Error opening `%s'!\n", buf ); return errno2result( errno ); } } /* attach to the new TTY before doing anything like KDSETMODE with it, otherwise we'd get access denied error: */ ioctl( dfb_vt->fd, TIOCSCTTY, 0 ); if (ioctl( dfb_vt->fd, KDSKBMODE, K_MEDIUMRAW ) < 0) { D_PERROR( "DirectFB/fbdev/vt: K_MEDIUMRAW failed!\n" ); close( dfb_vt->fd ); return DFB_INIT; } if (tcgetattr( dfb_vt->fd, &dfb_vt->old_ts ) < 0) { D_PERROR( "DirectFB/fbdev/vt: tcgetattr failed!\n" ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } ts = dfb_vt->old_ts; ts.c_cc[VTIME] = 0; ts.c_cc[VMIN] = 1; ts.c_lflag &= ~(ICANON|ECHO|ISIG); ts.c_iflag = 0; if (tcsetattr( dfb_vt->fd, TCSAFLUSH, &ts ) < 0) { D_PERROR( "DirectFB/fbdev/vt: tcsetattr for new values failed!\n" ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } res = write( dfb_vt->fd, cursoroff_str, sizeof(cursoroff_str) ); if (dfb_config->kd_graphics) { if (ioctl( dfb_vt->fd, KDSETMODE, KD_GRAPHICS ) < 0) { D_PERROR( "DirectFB/fbdev/vt: KD_GRAPHICS failed!\n" ); tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } } else { res = write( dfb_vt->fd, blankoff_str, sizeof(blankoff_str) ); } if (dfb_config->vt_switching) { struct vt_mode vt; struct sigaction sig_tty; memset( &sig_tty, 0, sizeof( sig_tty ) ); sig_tty.sa_handler = vt_switch_handler; sigfillset( &sig_tty.sa_mask ); if (sigaction( SIG_SWITCH_FROM, &sig_tty, &dfb_vt->sig_usr1 ) || sigaction( SIG_SWITCH_TO, &sig_tty, &dfb_vt->sig_usr2 )) { D_PERROR( "DirectFB/fbdev/vt: sigaction failed!\n" ); tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } vt.mode = VT_PROCESS; vt.waitv = 0; vt.relsig = SIG_SWITCH_FROM; vt.acqsig = SIG_SWITCH_TO; if (ioctl( dfb_vt->fd, VT_SETMODE, &vt ) < 0) { D_PERROR( "DirectFB/fbdev/vt: VT_SETMODE failed!\n" ); sigaction( SIG_SWITCH_FROM, &dfb_vt->sig_usr1, NULL ); sigaction( SIG_SWITCH_TO, &dfb_vt->sig_usr2, NULL ); tcsetattr( dfb_vt->fd, TCSAFLUSH, &dfb_vt->old_ts ); ioctl( dfb_vt->fd, KDSKBMODE, K_XLATE ); close( dfb_vt->fd ); return DFB_INIT; } direct_util_recursive_pthread_mutex_init( &dfb_vt->lock ); pthread_cond_init( &dfb_vt->wait, NULL ); dfb_vt->vt_sig = -1; dfb_vt->thread = direct_thread_create( DTT_CRITICAL, vt_thread, NULL, "VT Switcher" ); } return DFB_OK; } static void vt_start_flushing( void ) { dfb_vt->flush = true; dfb_vt->flush_thread = direct_thread_create( DTT_DEFAULT, vt_flush_thread, NULL, "VT Flusher" ); } static void vt_stop_flushing( void ) { dfb_vt->flush = false; direct_thread_cancel( dfb_vt->flush_thread ); direct_thread_join( dfb_vt->flush_thread ); direct_thread_destroy( dfb_vt->flush_thread ); dfb_vt->flush_thread = NULL; } /* * If the vt buffer in not kept clean the kernel may stop sleeping. */ static void * vt_flush_thread( DirectThread *thread, void *arg ) { D_DEBUG_AT( VT, "%s( %p, %p )\n", __FUNCTION__, thread, arg ); while (dfb_vt->flush) { fd_set set; int ret; FD_ZERO( &set ); FD_SET( dfb_vt->fd, &set ); ret = select( dfb_vt->fd + 1, &set, NULL, NULL, NULL ); if (ret < 0 && errno == EINTR) continue; if (ret < 0) break; tcflush( dfb_vt->fd, TCIFLUSH ); } return NULL; } DirectFB-1.7.7/systems/mesa/mesa_system.c0000644000175000017500000002360512254435330015231 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include "mesa_system.h" #include "vt.h" #include DFB_CORE_SYSTEM( mesa ) #define MESA_BUILD_GLES2 static const char device_name[] = "/dev/dri/card0"; /**********************************************************************************************************************/ MesaData *m_data; /* FIXME: Fix Core System API to pass data in all functions. */ /**********************************************************************************************************************/ static DFBResult InitLocal( MesaData *mesa ) { DFBResult ret; const char *ver; const char *extensions; EGLint major, minor; setenv( "EGL_PLATFORM","drm",1 ); mesa->fd = open( device_name, O_RDWR ); if (mesa->fd < 0) { ret = errno2result( errno ); D_PERROR( "DirectFB/Mesa: Failed to open '%s'!\n", device_name ); return ret; } mesa->gbm = gbm_create_device( mesa->fd ); mesa->dpy = eglGetDisplay( mesa->gbm ); if (mesa->dpy == EGL_NO_DISPLAY) { D_ERROR( "DirectFB/Mesa: eglGetDisplay() failed!\n" ); close( mesa->fd ); return DFB_INIT; } if (!eglInitialize(mesa->dpy, &major, &minor)) { D_ERROR( "DirectFB/Mesa: eglInitialize() failed!\n" ); close( mesa->fd ); return DFB_INIT; } ver = eglQueryString(mesa->dpy, EGL_VERSION); D_INFO( "DirectFB/Mesa: EGL_VERSION = %s\n", ver ); extensions = eglQueryString(mesa->dpy, EGL_EXTENSIONS); D_INFO( "DirectFB/Mesa: EGL_EXTENSIONS = %s\n", extensions ); if (!strstr(extensions, "EGL_KHR_surfaceless_opengl")) { D_ERROR( "DirectFB/Mesa: No support for EGL_KHR_surfaceless_opengl!\n" ); close( mesa->fd ); return DFB_UNSUPPORTED; } // if (!setup_kms(fd, &kms)) // return -1; #ifdef MESA_BUILD_GLES2 eglBindAPI(EGL_OPENGL_ES_API); #else eglBindAPI(EGL_OPENGL_API); #endif EGLint context_attribs[] = { #ifdef MESA_BUILD_GLES2 EGL_CONTEXT_CLIENT_VERSION, 2, #endif EGL_NONE }; mesa->ctx = eglCreateContext( mesa->dpy, NULL, EGL_NO_CONTEXT, context_attribs ); if (mesa->ctx == NULL) { D_ERROR("DirectFB/Mesa: Could not create context!\n"); return DFB_INIT; } eglMakeCurrent( mesa->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, mesa->ctx ); return DFB_OK; } /**********************************************************************************************************************/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_MESA; info->caps = CSCAPS_ACCELERATION | CSCAPS_SECURE_FUSION | CSCAPS_ALWAYS_INDIRECT; snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "Mesa" ); } static DFBResult system_initialize( CoreDFB *core, void **ret_data ) { DFBResult ret; MesaData *mesa; MesaDataShared *shared; FusionSHMPoolShared *pool; D_ASSERT( m_data == NULL ); mesa = D_CALLOC( 1, sizeof(MesaData) ); if (!mesa) return D_OOM(); mesa->core = core; pool = dfb_core_shmpool( core ); shared = SHCALLOC( pool, 1, sizeof(MesaDataShared) ); if (!shared) { D_FREE( mesa ); return D_OOSHM(); } shared->shmpool = pool; mesa->shared = shared; m_data = mesa; if (dfb_config->vt) { ret = dfb_vt_initialize(); if (ret) return DFB_INIT; } ret = InitLocal( mesa ); if (ret) { if (dfb_config->vt) dfb_vt_shutdown( false ); return ret; } *ret_data = m_data; dfb_surface_pool_initialize( core, &mesaSurfacePoolFuncs, &shared->pool ); mesa->screen = dfb_screens_register( NULL, mesa, mesaScreenFuncs ); mesa->layer = dfb_layers_register( mesa->screen, mesa, mesaLayerFuncs ); core_arena_add_shared_field( core, "mesa", shared ); return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **ret_data ) { DFBResult ret; void *tmp; MesaData *mesa; MesaDataShared *shared; D_ASSERT( m_data == NULL ); if (dfb_config->vt) { ret = dfb_vt_join(); if (ret) return DFB_INIT; } mesa = D_CALLOC( 1, sizeof(MesaData) ); if (!mesa) return D_OOM(); mesa->core = core; ret = core_arena_get_shared_field( core, "mesa", &tmp ); if (ret) { D_FREE( mesa ); return ret; } mesa->shared = shared = tmp; ret = InitLocal( mesa ); if (ret) return ret; *ret_data = m_data = mesa; dfb_surface_pool_join( core, shared->pool, &mesaSurfacePoolFuncs ); mesa->screen = dfb_screens_register( NULL, mesa, mesaScreenFuncs ); mesa->layer = dfb_layers_register( mesa->screen, mesa, mesaLayerFuncs ); return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { MesaDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_destroy( shared->pool ); if (m_data->saved_crtc) { drmModeSetCrtc( m_data->fd, m_data->saved_crtc->crtc_id, m_data->saved_crtc->buffer_id, m_data->saved_crtc->x, m_data->saved_crtc->y, &m_data->connector->connector_id, 1, &m_data->saved_crtc->mode ); drmModeFreeCrtc( m_data->saved_crtc ); } /* cleanup EGL related stuff */ eglMakeCurrent( m_data->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); eglDestroyContext( m_data->dpy, m_data->ctx ); eglTerminate( m_data->dpy ); if (m_data->resources) drmModeFreeResources( m_data->resources ); gbm_device_destroy( m_data->gbm ); /* close drm fd */ close( m_data->fd ); if (dfb_config->vt) dfb_vt_shutdown( emergency ); SHFREE( shared->shmpool, shared ); D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_leave( bool emergency ) { DFBResult ret; MesaDataShared *shared; D_ASSERT( m_data != NULL ); shared = m_data->shared; D_ASSERT( shared != NULL ); dfb_surface_pool_leave( shared->pool ); if (dfb_config->vt) { ret = dfb_vt_leave( emergency ); if (ret) return ret; } D_FREE( m_data ); m_data = NULL; return DFB_OK; } static DFBResult system_suspend( void ) { D_ASSERT( m_data != NULL ); return DFB_OK; } static DFBResult system_resume( void ) { D_ASSERT( m_data != NULL ); return DFB_OK; } static volatile void * system_map_mmio( unsigned int offset, int length ) { D_ASSERT( m_data != NULL ); return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator( void ) { return dfb_config->accelerator; } static VideoMode * system_get_modes( void ) { return NULL; } static VideoMode * system_get_current_mode( void ) { return NULL; } static DFBResult system_thread_init( void ) { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return dfb_config->video_phys + offset; } static void * system_video_memory_virtual( unsigned int offset ) { D_ASSERT( m_data != NULL ); return NULL; } static unsigned int system_videoram_length( void ) { return dfb_config->video_length; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length( void ) { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { return; } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ return; } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ return; } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { return; } DirectFB-1.7.7/systems/mesa/Makefile.am0000644000175000017500000000163012171403127014557 00000000000000## Makefile.am for DirectFB/systems/mesa INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(MESA_CFLAGS) internalincludedir = $(INTERNALINCLUDEDIR)/mesa_system internalinclude_HEADERS = \ mesa_system.h systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_mesa_system.o endif systems_LTLIBRARIES = libdirectfb_mesa_system.la libdirectfb_mesa_system_la_LDFLAGS = \ -avoid-version \ -module \ $(MESA_LIBS) libdirectfb_mesa_system_la_SOURCES = \ idirectfbgl2.c \ idirectfbgl2context.c \ mesa_layer.c \ mesa_screen.c \ mesa_system.c \ mesa_surface_pool.c \ vt.c \ vt.h libdirectfb_mesa_system_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/mesa/Makefile.in0000644000175000017500000007070712466665317014625 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ $(internalinclude_HEADERS) subdir = systems/mesa ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" \ "$(DESTDIR)$(internalincludedir)" LTLIBRARIES = $(systems_LTLIBRARIES) libdirectfb_mesa_system_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_mesa_system_la_OBJECTS = idirectfbgl2.lo \ idirectfbgl2context.lo mesa_layer.lo mesa_screen.lo \ mesa_system.lo mesa_surface_pool.lo vt.lo libdirectfb_mesa_system_la_OBJECTS = \ $(am_libdirectfb_mesa_system_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_mesa_system_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_mesa_system_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_mesa_system_la_SOURCES) DIST_SOURCES = $(libdirectfb_mesa_system_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systems_DATA) HEADERS = $(internalinclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ $(MESA_CFLAGS) internalincludedir = $(INTERNALINCLUDEDIR)/mesa_system internalinclude_HEADERS = \ mesa_system.h systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_mesa_system.o systems_LTLIBRARIES = libdirectfb_mesa_system.la libdirectfb_mesa_system_la_LDFLAGS = \ -avoid-version \ -module \ $(MESA_LIBS) libdirectfb_mesa_system_la_SOURCES = \ idirectfbgl2.c \ idirectfbgl2context.c \ mesa_layer.c \ mesa_screen.c \ mesa_system.c \ mesa_surface_pool.c \ vt.c \ vt.h libdirectfb_mesa_system_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/mesa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/mesa/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_mesa_system.la: $(libdirectfb_mesa_system_la_OBJECTS) $(libdirectfb_mesa_system_la_DEPENDENCIES) $(EXTRA_libdirectfb_mesa_system_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_mesa_system_la_LINK) -rpath $(systemsdir) $(libdirectfb_mesa_system_la_OBJECTS) $(libdirectfb_mesa_system_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbgl2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbgl2context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesa_layer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesa_screen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesa_surface_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesa_system.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vt.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) install-internalincludeHEADERS: $(internalinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(internalincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(internalincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(internalincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(internalincludedir)" || exit $$?; \ done uninstall-internalincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(internalinclude_HEADERS)'; test -n "$(internalincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(internalincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(internalincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-systemsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-internalincludeHEADERS install-systemsDATA \ install-systemsLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-internalincludeHEADERS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-systemsDATA install-systemsLTLIBRARIES \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-internalincludeHEADERS uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/mesa/mesa_screen.c0000644000175000017500000001110012254435330015147 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include "mesa_system.h" typedef struct { drmModeConnector *connector; drmModeEncoder *encoder; drmModeModeInfo mode; } MesaScreenData; /**********************************************************************************************************************/ static int mesaScreenDataSize( void ) { return sizeof(MesaScreenData); } static DFBResult mesaInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { MesaData *mesa = driver_data; description->caps = DSCCAPS_NONE; direct_snputs( description->name, "Mesa", DFB_SCREEN_DESC_NAME_LENGTH ); drmModeRes *resources; drmModeConnector *connector = NULL; drmModeEncoder *encoder = NULL; int i; resources = drmModeGetResources( mesa->fd ); if (!resources) { D_ERROR( "DirectFB/Mesa: drmModeGetResources() failed!\n" ); return DFB_INIT; } D_INFO( "DirectFB/Mesa: Got %d connectors, %d encoders\n", resources->count_connectors, resources->count_encoders ); for (i = resources->count_connectors-1; i >= 0; i--) { connector = drmModeGetConnector( mesa->fd, resources->connectors[i] ); if (connector == NULL) continue; if (connector->connection == DRM_MODE_CONNECTED && connector->count_modes > 0) break; drmModeFreeConnector(connector); } if (i == resources->count_connectors) { D_ERROR( "DirectFB/Mesa: No currently active connector found.\n" ); return DFB_INIT; } else D_INFO( "DirectFB/Mesa: using connector id %d.\n", connector->connector_id ); for (i = resources->count_encoders-1; i >= 0; i--) { encoder = drmModeGetEncoder( mesa->fd, resources->encoders[i] ); if (encoder == NULL) continue; if (encoder->encoder_id == connector->encoder_id) break; drmModeFreeEncoder(encoder); } D_INFO( "DirectFB/Mesa: using encoder id %d.\n", encoder->encoder_id ); D_INFO( "DirectFB/Mesa: using crtc id %d.\n", encoder->crtc_id ); mesa->connector = connector; mesa->encoder = encoder; mesa->mode = connector->modes[0]; D_INFO( "DirectFB/Mesa: Default mode is %dx%d\n", mesa->mode.hdisplay, mesa->mode.vdisplay ); mesa->resources = resources; mesa->saved_crtc = drmModeGetCrtc( mesa->fd, mesa->encoder->crtc_id ); return DFB_OK; } static DFBResult mesaGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { MesaScreenData *data = screen_data; *ret_width = data->mode.hdisplay; *ret_height = data->mode.vdisplay; return DFB_OK; } static const ScreenFuncs _mesaScreenFuncs = { .ScreenDataSize = mesaScreenDataSize, .InitScreen = mesaInitScreen, .GetScreenSize = mesaGetScreenSize }; const ScreenFuncs *mesaScreenFuncs = &_mesaScreenFuncs; DirectFB-1.7.7/systems/mesa/mesa_layer.c0000644000175000017500000001774212254435330015026 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include "mesa_system.h" D_DEBUG_DOMAIN( Mesa_Layer, "Mesa/Layer", "Mesa Layer" ); /**********************************************************************************************************************/ void page_flip_handler(int fd, unsigned int frame, unsigned int sec, unsigned int usec, void *driver_data); void page_flip_handler(int fd, unsigned int frame, unsigned int sec, unsigned int usec, void *driver_data) { MesaData *mesa = driver_data; CoreSurfaceBuffer *buffer = mesa->buffer; D_DEBUG_AT( Mesa_Layer, "%s()\n", __FUNCTION__ ); dfb_surface_notify_display( buffer->surface, buffer ); mesa->flip_pending = false; mesa->buffer = NULL; dfb_surface_buffer_unref( buffer ); } static void * Mesa_BufferThread_Main( DirectThread *thread, void *arg ) { MesaData *data = arg; D_DEBUG_AT( Mesa_Layer, "%s()\n", __FUNCTION__ ); while (true) { direct_mutex_lock( &data->lock ); while (!data->flip_pending) { D_DEBUG_AT( Mesa_Layer, " -> waiting for flip to be issued\n" ); direct_waitqueue_wait( &data->wq_flip, &data->lock ); } direct_mutex_unlock( &data->lock ); D_DEBUG_AT( Mesa_Layer, " -> waiting for flip to be done\n" ); drmHandleEvent( data->fd, &data->drmeventcontext ); direct_mutex_lock( &data->lock ); data->flip_pending = false; direct_waitqueue_broadcast( &data->wq_event ); direct_mutex_unlock( &data->lock ); } return NULL; } static DFBResult mesaInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { MesaData *mesa = driver_data; mesa->drmeventcontext.version = DRM_EVENT_CONTEXT_VERSION; mesa->drmeventcontext.vblank_handler = NULL; mesa->drmeventcontext.page_flip_handler = page_flip_handler; description->type = DLTF_GRAPHICS; description->caps = DLCAPS_SURFACE; description->surface_caps = DSCAPS_NONE; description->surface_accessor = CSAID_LAYER0; direct_snputs( description->name, "Mesa Layer", DFB_DISPLAY_LAYER_DESC_NAME_LENGTH ); config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT; config->width = dfb_config->mode.width ?: mesa->mode.hdisplay; config->height = dfb_config->mode.height ?: mesa->mode.vdisplay; config->pixelformat = dfb_config->mode.format ?: DSPF_ARGB; config->buffermode = DLBM_FRONTONLY; direct_mutex_init( &mesa->lock ); direct_waitqueue_init( &mesa->wq_event ); direct_waitqueue_init( &mesa->wq_flip ); mesa->thread = direct_thread_create( DTT_CRITICAL, Mesa_BufferThread_Main, mesa, "Mesa/Buffer" ); return DFB_OK; } static DFBResult mesaTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *ret_failed ) { if (ret_failed) *ret_failed = DLCONF_NONE; return DFB_OK; } static DFBResult mesaSetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { int ret; MesaData *mesa = driver_data; D_DEBUG_AT( Mesa_Layer, "%s()\n", __FUNCTION__ ); ret = drmModeSetCrtc( mesa->fd, mesa->encoder->crtc_id, (u32)(long)left_lock->handle, 0, 0, &mesa->connector->connector_id, 1, &mesa->mode ); if (ret) { D_PERROR( "DirectFB/Mesa: drmModeSetCrtc() failed! (%d)\n", ret ); return DFB_FAILURE; } return DFB_OK; } static DFBResult mesaFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { int ret; MesaData *mesa = driver_data; D_DEBUG_AT( Mesa_Layer, "%s()\n", __FUNCTION__ ); // ret = drmModeSetCrtc( mesa->fd, mesa->encoder->crtc_id, (u32)(long)left_lock->handle, 0, 0, // &mesa->connector->connector_id, 1, &mesa->mode ); direct_mutex_lock( &mesa->lock ); while (mesa->flip_pending) { D_DEBUG_AT( Mesa_Layer, " -> waiting for pending flip (previous)\n" ); direct_waitqueue_wait( &mesa->wq_event, &mesa->lock ); } direct_mutex_unlock( &mesa->lock ); D_ASSERT( mesa->buffer == NULL ); mesa->buffer = left_lock->buffer; dfb_surface_buffer_ref( mesa->buffer ); D_DEBUG_AT( Mesa_Layer, " -> calling drmModePageFlip()\n" ); ret = drmModePageFlip( mesa->fd, mesa->encoder->crtc_id, (u32)(long)left_lock->handle, DRM_MODE_PAGE_FLIP_EVENT, driver_data ); if (ret) { D_PERROR( "DirectFB/Mesa: drmModePageFlip() failed!\n" ); return DFB_FAILURE; } dfb_surface_flip( surface, false ); direct_mutex_lock( &mesa->lock ); mesa->flip_pending = true; direct_waitqueue_broadcast( &mesa->wq_flip ); if ((flags & DSFLIP_WAITFORSYNC) == DSFLIP_WAITFORSYNC) { while (mesa->flip_pending) { D_DEBUG_AT( Mesa_Layer, " -> waiting for pending flip (WAITFORSYNC)\n" ); direct_waitqueue_wait( &mesa->wq_event, &mesa->lock ); } } direct_mutex_unlock( &mesa->lock ); return DFB_OK; } static const DisplayLayerFuncs _mesaLayerFuncs = { .InitLayer = mesaInitLayer, .TestRegion = mesaTestRegion, .SetRegion = mesaSetRegion, .FlipRegion = mesaFlipRegion }; const DisplayLayerFuncs *mesaLayerFuncs = &_mesaLayerFuncs; DirectFB-1.7.7/systems/mesa/mesa_surface_pool.c0000644000175000017500000004453212254435330016370 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include "mesa_system.h" D_DEBUG_DOMAIN( Mesa_Surfaces, "Mesa/Surfaces", "Mesa Framebuffer Surface Pool" ); D_DEBUG_DOMAIN( Mesa_SurfLock, "Mesa/SurfLock", "Mesa Framebuffer Surface Pool Locks" ); /**********************************************************************************************************************/ typedef struct { int magic; } MesaPoolData; typedef struct { int magic; MesaData *mesa; } MesaPoolLocalData; typedef struct { int magic; int pitch; int size; EGLImageKHR image; EGLint handle; struct gbm_bo *bo; struct gbm_surface *gs; GLuint fbo; GLuint color_rb; GLuint texture; uint32_t fb_id; } MesaAllocationData; /**********************************************************************************************************************/ static int mesaPoolDataSize( void ) { return sizeof(MesaPoolData); } static int mesaPoolLocalDataSize( void ) { return sizeof(MesaPoolLocalData); } static int mesaAllocationDataSize( void ) { return sizeof(MesaAllocationData); } static DFBResult mesaInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { MesaPoolData *data = pool_data; MesaPoolLocalData *local = pool_local; MesaData *mesa = system_data; D_DEBUG_AT( Mesa_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( data != NULL ); D_ASSERT( local != NULL ); D_ASSERT( mesa != NULL ); D_ASSERT( mesa->shared != NULL ); D_ASSERT( ret_desc != NULL ); ret_desc->caps = CSPCAPS_VIRTUAL; // ret_desc->access[CSAID_CPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->access[CSAID_ACCEL1] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL; ret_desc->priority = CSPP_DEFAULT; ret_desc->size = dfb_config->video_length; /* For hardware layers */ ret_desc->access[CSAID_LAYER0] = CSAF_READ; ret_desc->access[CSAID_LAYER1] = CSAF_READ; ret_desc->access[CSAID_LAYER2] = CSAF_READ; ret_desc->access[CSAID_LAYER3] = CSAF_READ; ret_desc->access[CSAID_LAYER4] = CSAF_READ; ret_desc->access[CSAID_LAYER5] = CSAF_READ; ret_desc->access[CSAID_LAYER6] = CSAF_READ; ret_desc->access[CSAID_LAYER7] = CSAF_READ; ret_desc->access[CSAID_LAYER8] = CSAF_READ; ret_desc->access[CSAID_LAYER9] = CSAF_READ; ret_desc->access[CSAID_LAYER10] = CSAF_READ; ret_desc->access[CSAID_LAYER11] = CSAF_READ; ret_desc->access[CSAID_LAYER12] = CSAF_READ; ret_desc->access[CSAID_LAYER13] = CSAF_READ; ret_desc->access[CSAID_LAYER14] = CSAF_READ; ret_desc->access[CSAID_LAYER15] = CSAF_READ; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "Mesa" ); local->mesa = mesa; D_MAGIC_SET( data, MesaPoolData ); D_MAGIC_SET( local, MesaPoolLocalData ); return DFB_OK; } static DFBResult mesaJoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { MesaPoolData *data = pool_data; MesaPoolLocalData *local = pool_local; MesaData *mesa = system_data; D_DEBUG_AT( Mesa_Surfaces, "%s()\n", __FUNCTION__ ); D_ASSERT( core != NULL ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, MesaPoolData ); D_ASSERT( local != NULL ); D_ASSERT( mesa != NULL ); D_ASSERT( mesa->shared != NULL ); (void) data; local->mesa = mesa; D_MAGIC_SET( local, MesaPoolLocalData ); return DFB_OK; } static DFBResult mesaDestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { MesaPoolData *data = pool_data; MesaPoolLocalData *local = pool_local; D_DEBUG_AT( Mesa_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, MesaPoolData ); D_MAGIC_ASSERT( local, MesaPoolLocalData ); D_MAGIC_CLEAR( data ); D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult mesaLeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { MesaPoolData *data = pool_data; MesaPoolLocalData *local = pool_local; D_DEBUG_AT( Mesa_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, MesaPoolData ); D_MAGIC_ASSERT( local, MesaPoolLocalData ); (void) data; D_MAGIC_CLEAR( local ); return DFB_OK; } static DFBResult mesaTestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { CoreSurface *surface; MesaPoolData *data = pool_data; MesaPoolLocalData *local = pool_local; (void)data; (void)local; D_DEBUG_AT( Mesa_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, MesaPoolData ); D_MAGIC_ASSERT( local, MesaPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (surface->config.format != DSPF_ARGB) return DFB_UNSUPPORTED; return DFB_OK; } static DFBResult mesaAllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { int ret; CoreSurface *surface; MesaPoolData *data = pool_data; MesaPoolLocalData *local = pool_local; MesaAllocationData *alloc = alloc_data; MesaData *mesa; (void)data; (void)local; D_DEBUG_AT( Mesa_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, MesaPoolData ); D_MAGIC_ASSERT( local, MesaPoolLocalData ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); mesa = local->mesa; D_ASSERT( mesa != NULL ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); EGLContext context = eglGetCurrentContext(); eglMakeCurrent( mesa->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, mesa->ctx ); GLint texture, fbo, rbo; glGetIntegerv( GL_TEXTURE_BINDING_2D, &texture ); glGetIntegerv( GL_FRAMEBUFFER_BINDING, &fbo ); glGetIntegerv( GL_RENDERBUFFER_BINDING, &rbo ); alloc->bo = gbm_bo_create( mesa->gbm, surface->config.size.w, surface->config.size.h, GBM_BO_FORMAT_ARGB8888, GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING ); alloc->handle = gbm_bo_get_handle( alloc->bo ).u32; alloc->pitch = gbm_bo_get_stride( alloc->bo ); alloc->image = eglCreateImageKHR( mesa->dpy, NULL, EGL_NATIVE_PIXMAP_KHR, alloc->bo, NULL ); alloc->size = alloc->pitch * surface->config.size.h; D_DEBUG_AT( Mesa_Surfaces, " -> pitch %d, size %d\n", alloc->pitch, alloc->size ); allocation->size = alloc->size; /* * Color Render Buffer */ glGenRenderbuffers( 1, &alloc->color_rb ); glBindRenderbuffer( GL_RENDERBUFFER, alloc->color_rb ); glEGLImageTargetRenderbufferStorageOES( GL_RENDERBUFFER, alloc->image ); /* * Framebuffer */ glGenFramebuffers( 1, &alloc->fbo ); glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, alloc->color_rb ); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { D_ERROR( "DirectFB/Mesa: Framebuffer not complete\n" ); } /* * Texture */ glGenTextures( 1, &alloc->texture ); glBindTexture( GL_TEXTURE_2D, alloc->texture ); glEGLImageTargetTexture2DOES( GL_TEXTURE_2D, alloc->image ); /* * Restore */ glBindRenderbuffer( GL_RENDERBUFFER, rbo ); glBindFramebuffer( GL_FRAMEBUFFER, fbo ); glBindTexture( GL_TEXTURE_2D, texture ); eglMakeCurrent( mesa->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, context ); /* * Mode Framebuffer */ ret = drmModeAddFB( local->mesa->fd, surface->config.size.w, surface->config.size.h, 24, 32, alloc->pitch, alloc->handle, &alloc->fb_id ); if (ret) { D_ERROR( "DirectFB/Mesa: drmModeAddFB() failed!\n" ); // return DFB_FAILURE; } D_MAGIC_SET( alloc, MesaAllocationData ); return DFB_OK; } static DFBResult mesaDeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { MesaPoolData *data = pool_data; MesaAllocationData *alloc = alloc_data; MesaPoolLocalData *local = pool_local; (void)data; D_DEBUG_AT( Mesa_Surfaces, "%s( %p )\n", __FUNCTION__, buffer ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( data, MesaPoolData ); D_MAGIC_ASSERT( alloc, MesaAllocationData ); drmModeRmFB( local->mesa->fd, alloc->fb_id ); eglDestroyImageKHR( local->mesa->dpy, alloc->image ); gbm_bo_destroy( alloc->bo ); D_MAGIC_CLEAR( alloc ); return DFB_OK; } static DFBResult mesaLock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { MesaPoolLocalData *local = pool_local; MesaAllocationData *alloc = alloc_data; MesaData *mesa; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, MesaAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( Mesa_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); mesa = local->mesa; D_ASSERT( mesa != NULL ); lock->pitch = alloc->pitch; lock->offset = 0; lock->addr = NULL; lock->phys = 0; switch (lock->accessor) { case CSAID_GPU: if (lock->access & CSAF_WRITE) { eglMakeCurrent( mesa->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, mesa->ctx ); lock->handle = (void*) (long) alloc->color_rb; } else lock->handle = (void*) (long) alloc->texture; break; case CSAID_ACCEL1: if (lock->access & CSAF_WRITE) lock->handle = (void*) (long) alloc->color_rb; else lock->handle = (void*) (long) alloc->image; break; case CSAID_LAYER0: lock->handle = (void*) (long) alloc->fb_id; break; case CSAID_CPU: { struct drm_i915_gem_mmap_gtt arg; memset(&arg, 0, sizeof(arg)); arg.handle = alloc->handle; drmCommandWriteRead( local->mesa->fd, DRM_I915_GEM_MMAP_GTT, &arg, sizeof( arg ) ); lock->addr = mmap( 0, alloc->size, PROT_READ | PROT_WRITE, MAP_SHARED, local->mesa->fd, arg.offset ); } break; default: D_BUG( "unsupported accessor %d", lock->accessor ); break; } D_DEBUG_AT( Mesa_SurfLock, " -> offset %lu, pitch %d, addr %p, phys 0x%08lx\n", lock->offset, lock->pitch, lock->addr, lock->phys ); return DFB_OK; } static DFBResult mesaUnlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { MesaAllocationData *alloc = alloc_data; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, MesaAllocationData ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_DEBUG_AT( Mesa_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer ); (void) alloc; return DFB_OK; } static DFBResult mesaRead( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, void *destination, int pitch, const DFBRectangle *rect ) { MesaPoolLocalData *local = pool_local; MesaAllocationData *alloc = alloc_data; MesaData *mesa; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, MesaAllocationData ); D_DEBUG_AT( Mesa_SurfLock, "%s( %p )\n", __FUNCTION__, allocation ); mesa = local->mesa; D_ASSERT( mesa != NULL ); EGLContext context = eglGetCurrentContext(); eglMakeCurrent( mesa->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, mesa->ctx ); GLint fbo; glGetIntegerv( GL_FRAMEBUFFER_BINDING, &fbo ); glBindFramebuffer( GL_FRAMEBUFFER, alloc->fbo ); glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, alloc->color_rb ); glReadPixels( rect->x, rect->y, rect->w, rect->h, GL_BGRA_EXT, GL_UNSIGNED_BYTE, destination ); glBindFramebuffer( GL_FRAMEBUFFER, fbo ); eglMakeCurrent( mesa->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, context ); return DFB_OK; } static DFBResult mesaWrite( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, const void *source, int pitch, const DFBRectangle *rect ) { MesaPoolLocalData *local = pool_local; MesaAllocationData *alloc = alloc_data; CoreSurface *surface; MesaData *mesa; D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( alloc, MesaAllocationData ); surface = allocation->surface; D_MAGIC_ASSERT( surface, CoreSurface ); D_DEBUG_AT( Mesa_SurfLock, "%s( %p )\n", __FUNCTION__, allocation ); mesa = local->mesa; D_ASSERT( mesa != NULL ); EGLContext context = eglGetCurrentContext(); eglMakeCurrent( mesa->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, mesa->ctx ); GLint texture; glGetIntegerv( GL_TEXTURE_BINDING_2D, &texture ); glBindTexture( GL_TEXTURE_2D, alloc->texture ); glPixelStorei( GL_UNPACK_ALIGNMENT, 8); glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, surface->config.size.w, surface->config.size.h, GL_BGRA_EXT, GL_UNSIGNED_BYTE, source ); glBindTexture( GL_TEXTURE_2D, texture ); eglMakeCurrent( mesa->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, context ); return DFB_OK; } const SurfacePoolFuncs mesaSurfacePoolFuncs = { .PoolDataSize = mesaPoolDataSize, .PoolLocalDataSize = mesaPoolLocalDataSize, .AllocationDataSize = mesaAllocationDataSize, .InitPool = mesaInitPool, .JoinPool = mesaJoinPool, .DestroyPool = mesaDestroyPool, .LeavePool = mesaLeavePool, .TestConfig = mesaTestConfig, .AllocateBuffer = mesaAllocateBuffer, .DeallocateBuffer = mesaDeallocateBuffer, .Lock = mesaLock, .Unlock = mesaUnlock, .Read = mesaRead, .Write = mesaWrite, }; DirectFB-1.7.7/systems/mesa/idirectfbgl2.c0000644000175000017500000001414512254435330015237 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #define EGL_EGLEXT_PROTOTYPES #define GL_GLEXT_PROTOTYPES #include #include #include #include #include #include #include D_DEBUG_DOMAIN( IDFBGL_Mesa, "IDirectFBGL2/Mesa", "IDirectFBGL2 Mesa Implementation" ); static DirectResult Probe( void *ctx, ... ); static DirectResult Construct( void *interface, ... ); #include DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBGL2, Mesa ) /* * private data struct of IDirectFBGL2 */ typedef struct { int ref; /* reference counter */ CoreDFB *core; } IDirectFBGL2_data; static void IDirectFBGL2_Destruct( IDirectFBGL2 *thiz ) { // IDirectFBGL2_data *data = thiz->priv; DIRECT_DEALLOCATE_INTERFACE( thiz ); } static DirectResult IDirectFBGL2_AddRef( IDirectFBGL2 *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL2); data->ref++; return DFB_OK; } static DirectResult IDirectFBGL2_Release( IDirectFBGL2 *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL2) if (--data->ref == 0) IDirectFBGL2_Destruct( thiz ); return DFB_OK; } static DFBResult IDirectFBGL2_CreateContext( IDirectFBGL2 *thiz, const DFBGL2ContextDescription *desc, IDirectFBGL2Context **ret_context ) { DFBResult ret; DIRECT_INTERFACE_GET_DATA (IDirectFBGL2); D_DEBUG_AT( IDFBGL_Mesa, "%s()\n", __FUNCTION__ ); (void) desc; DirectInterfaceFuncs *funcs = NULL; ret = DirectGetInterface( &funcs, "IDirectFBGL2Context", "Mesa", DirectProbeInterface, NULL ); if (ret) return ret; IDirectFBGL2Context *context; ret = funcs->Allocate( (void**) &context ); if (ret) return ret; /* Construct the interface. */ ret = funcs->Construct( context, data->core ); if (ret) return ret; *ret_context = context; return DFB_OK; } static DFBResult IDirectFBGL2_GetProcAddress( IDirectFBGL2 *thiz, const char *name, void **ret_address ) { void *handle; DIRECT_INTERFACE_GET_DATA (IDirectFBGL2); D_DEBUG_AT( IDFBGL_Mesa, "%s()\n", __FUNCTION__ ); if (!name) return DFB_INVARG; if (!ret_address) return DFB_INVARG; handle = (void*) eglGetProcAddress( name ); if (!handle) return DFB_FAILURE; *ret_address = handle; return (*ret_address) ? DFB_OK : DFB_UNSUPPORTED; } static DFBResult IDirectFBGL2_TextureSurface( IDirectFBGL2 *thiz, int target, int level, IDirectFBSurface *surface ) { DFBResult ret; IDirectFBSurface_data *surface_data; CoreSurface *core_surface; CoreSurfaceBufferLock lock; DIRECT_INTERFACE_GET_DATA (IDirectFBGL2); D_DEBUG_AT( IDFBGL_Mesa, "%s( %d, %d, %p )\n", __FUNCTION__, target, level, (void *)surface ); if (level) return DFB_UNSUPPORTED; DIRECT_INTERFACE_GET_DATA_FROM (surface, surface_data, IDirectFBSurface); core_surface = surface_data->surface; if (!core_surface) return DFB_DESTROYED; /* Lock buffer */ ret = dfb_surface_lock_buffer( core_surface, CSBR_FRONT, CSAID_ACCEL1, CSAF_READ, &lock ); if (ret) { D_DERROR( ret, "IDirectFBGL2/Mesa: Could not lock texture buffer!\n" ); return ret; } glEGLImageTargetTexture2DOES( target, lock.handle ); dfb_surface_unlock_buffer( core_surface, &lock ); return DFB_OK; } /* exported symbols */ static DirectResult Probe( void *ctx, ... ) { D_DEBUG_AT( IDFBGL_Mesa, "%s()\n", __FUNCTION__ ); (void) ctx; /* ... */ return DFB_OK; } static DirectResult Construct( void *interface, ... ) { IDirectFB *dfb; IDirectFBGL2 *thiz = interface; CoreDFB *core; D_DEBUG_AT( IDFBGL_Mesa, "%s()\n", __FUNCTION__ ); va_list tag; va_start(tag, interface); dfb = va_arg(tag, IDirectFB *); core = va_arg(tag, CoreDFB *); va_end( tag ); (void)dfb; /* Allocate interface data. */ DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IDirectFBGL2 ); /* Initialize interface data. */ data->core = core; data->ref = 1; /* Assign interface pointers. */ thiz->AddRef = IDirectFBGL2_AddRef; thiz->Release = IDirectFBGL2_Release; thiz->CreateContext = IDirectFBGL2_CreateContext; thiz->GetProcAddress = IDirectFBGL2_GetProcAddress; thiz->TextureSurface = IDirectFBGL2_TextureSurface; return DFB_OK; } DirectFB-1.7.7/systems/mesa/idirectfbgl2context.c0000644000175000017500000001617212254435330016646 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include "mesa_system.h" D_DEBUG_DOMAIN( IDFBGL_Mesa, "IDirectFBGL2Context/Mesa", "IDirectFBGL2Context Mesa Implementation" ); static DirectResult Probe( void *ctx, ... ); static DirectResult Construct( void *interface, ... ); #include DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBGL2Context, Mesa ) /* * private data struct of IDirectFBGL2Context */ typedef struct { int ref; /* reference counter */ CoreDFB *core; MesaData *mesa; EGLDisplay eglDisplay; EGLContext eglContext; GLuint fbo; GLuint depth; bool locked; CoreSurface *surface; CoreSurfaceBufferLock lock; } IDirectFBGL2Context_data; static void IDirectFBGL2Context_Destruct( IDirectFBGL2Context *thiz ) { IDirectFBGL2Context_data *data = thiz->priv; if (data->locked) dfb_surface_unlock_buffer( data->surface, &data->lock ); DIRECT_DEALLOCATE_INTERFACE( thiz ); } static DirectResult IDirectFBGL2Context_AddRef( IDirectFBGL2Context *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL2Context); data->ref++; return DFB_OK; } static DirectResult IDirectFBGL2Context_Release( IDirectFBGL2Context *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL2Context) if (--data->ref == 0) IDirectFBGL2Context_Destruct( thiz ); return DFB_OK; } static DFBResult IDirectFBGL2Context_Bind( IDirectFBGL2Context *thiz, IDirectFBSurface *draw, IDirectFBSurface *read ) { DFBResult ret; IDirectFBSurface_data *draw_data; CoreSurface *surface; DIRECT_INTERFACE_GET_DATA (IDirectFBGL2Context); D_DEBUG_AT( IDFBGL_Mesa, "%s()\n", __FUNCTION__ ); if (!draw || !read) return DFB_INVARG; if (draw != read) return DFB_UNSUPPORTED; if (data->locked) return DFB_LOCKED; /* * Get destination and source core surfaces */ DIRECT_INTERFACE_GET_DATA_FROM( draw, draw_data, IDirectFBSurface ); surface = draw_data->surface; if (!surface) return DFB_DESTROYED; data->surface = surface; eglMakeCurrent( data->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, data->eglContext ); /* Lock destination buffer */ ret = dfb_surface_lock_buffer( surface, CSBR_BACK, CSAID_ACCEL1, CSAF_READ | CSAF_WRITE, &data->lock ); if (ret) { D_DERROR( ret, "IDirectFBGL2Context/Mesa: Could not lock destination buffer!\n" ); return ret; } /* Update depth buffer */ glBindRenderbuffer( GL_RENDERBUFFER, data->depth ); glRenderbufferStorage( GL_RENDERBUFFER, GL_DEPTH_COMPONENT, surface->config.size.w, surface->config.size.h ); /* Set color and depth buffers */ glBindFramebuffer( GL_FRAMEBUFFER, data->fbo ); glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, data->depth ); glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, (GLuint) (long) data->lock.handle ); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { D_ERROR( "DirectFB/GLES2: Framebuffer not complete\n" ); } data->locked = true; return DFB_OK; } static DFBResult IDirectFBGL2Context_Unbind( IDirectFBGL2Context *thiz ) { DIRECT_INTERFACE_GET_DATA (IDirectFBGL2Context); D_DEBUG_AT( IDFBGL_Mesa, "%s()\n", __FUNCTION__ ); if (!data->locked) return DFB_BUFFEREMPTY; glFinish(); dfb_surface_unlock_buffer( data->surface, &data->lock ); eglMakeCurrent( data->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); data->locked = false; return DFB_OK; } static inline bool TestEGLError(const char* pszLocation) { EGLint iErr = eglGetError(); if (iErr != EGL_SUCCESS) { D_ERROR("DirectFB/Mesa: %s failed (%d).\n", pszLocation, iErr); return false; } return true; } /* exported symbols */ static DirectResult Probe( void *ctx, ... ) { D_DEBUG_AT( IDFBGL_Mesa, "%s()\n", __FUNCTION__ ); if (dfb_system_type() != CORE_MESA) return DFB_UNSUPPORTED; return DFB_OK; } static DirectResult Construct( void *interface, ... ) { IDirectFBGL2Context *thiz = interface; CoreDFB *core; MesaData *mesa = dfb_system_data(); D_DEBUG_AT( IDFBGL_Mesa, "%s()\n", __FUNCTION__ ); va_list tag; va_start(tag, interface); core = va_arg(tag, CoreDFB *); va_end( tag ); /* Allocate interface data. */ DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IDirectFBGL2Context ); /* Initialize interface data. */ data->core = core; data->ref = 1; data->mesa = mesa; /* * Setup the OpenGL state */ data->eglDisplay = mesa->dpy; data->eglContext = eglCreateContext( mesa->dpy, NULL, mesa->ctx, NULL ); if (!TestEGLError("eglCreateContext")) return DFB_INIT; eglMakeCurrent( data->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, data->eglContext ); if (!TestEGLError("eglMakeCurrent")) return DFB_INIT; glGenFramebuffers( 1, &data->fbo ); glGenRenderbuffers( 1, &data->depth ); /* Assign interface pointers. */ thiz->AddRef = IDirectFBGL2Context_AddRef; thiz->Release = IDirectFBGL2Context_Release; thiz->Bind = IDirectFBGL2Context_Bind; thiz->Unbind = IDirectFBGL2Context_Unbind; return DFB_OK; } DirectFB-1.7.7/systems/mesa/vt.h0000644000175000017500000000537412254435330013341 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __VT_H__ #define __VT_H__ #include #include #include #include #include typedef struct { int fd0; /* file descriptor of /dev/tty0 */ int fd; /* file descriptor of /dev/ttyN where N is the number of the allocated VT, may be equal to 'fd0' if VT allocation is disabled by "--no-vt-switch" */ int num; /* number of vt where DirectFB runs */ int prev; /* number of vt DirectFB was started from */ int old_fb; /* original fb mapped to vt */ struct sigaction sig_usr1; /* previous signal handler for USR1 */ struct sigaction sig_usr2; /* previous signal handler for USR2 */ struct vt_mode vt_mode; /* previous VT mode */ DirectThread *thread; pthread_mutex_t lock; pthread_cond_t wait; int vt_sig; struct termios old_ts; bool flush; DirectThread *flush_thread; } VirtualTerminal; /* * allocates and switches to a new virtual terminal */ DFBResult dfb_vt_initialize( void ); DFBResult dfb_vt_join( void ); /* * deallocates virtual terminal */ DFBResult dfb_vt_shutdown( bool emergency ); DFBResult dfb_vt_leave( bool emergency ); DFBResult dfb_vt_detach( bool force ); bool dfb_vt_switch( int num ); #endif DirectFB-1.7.7/systems/x11vdpau/0000755000175000017500000000000012466665353013351 500000000000000DirectFB-1.7.7/systems/x11vdpau/x11vdpau_surface_pool.h0000644000175000017500000000311412254435330017634 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __X11SYSTEM__X11VDPAU_SURFACE_POOL_H__ #define __X11SYSTEM__X11VDPAU_SURFACE_POOL_H__ #include #include extern const SurfacePoolFuncs *x11vdpauSurfacePoolFuncs; typedef struct { int pitch; VdpOutputSurface surface; } x11vdpauAllocationData; #endif DirectFB-1.7.7/systems/x11vdpau/README0000644000175000017500000000043312171403127014127 00000000000000This is an X11 system in very early stages, it is not really usable yet. Tested with RGB16, ARGB1555 and ARGB mode. BUGS - occasional segfault during startup - does not work with multi-application core TODO - support for RGB32 - test RGB24, RGB332, and palette mode - code cleanup DirectFB-1.7.7/systems/x11vdpau/x11vdpau_surface_pool.c0000644000175000017500000004003312254435330017630 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include "x11.h" #include "x11vdpau_surface_pool.h" D_DEBUG_DOMAIN( X11VDPAU_Surfaces, "X11/VDPAU/Surfaces", "X11 VDPAU Surface Pool" ); /**********************************************************************************************************************/ typedef struct { } x11vdpauPoolData; typedef struct { DFBX11 *x11; DFBX11VDPAU *vdp; } x11vdpauPoolLocalData; /**********************************************************************************************************************/ static int x11vdpauPoolDataSize( void ) { return sizeof(x11vdpauPoolData); } static int x11vdpauPoolLocalDataSize( void ) { return sizeof(x11vdpauPoolLocalData); } static int x11vdpauAllocationDataSize( void ) { return sizeof(x11vdpauAllocationData); } static DFBResult x11InitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { x11vdpauPoolLocalData *local = pool_local; DFBX11 *x11 = system_data; DFBX11VDPAU *vdp = &x11->vdp; D_DEBUG_AT( X11VDPAU_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_ASSERT( ret_desc != NULL ); local->x11 = x11; local->vdp = vdp; ret_desc->caps = CSPCAPS_NONE; ret_desc->access[CSAID_GPU] = CSAF_READ | CSAF_WRITE | CSAF_SHARED; ret_desc->types = CSTF_LAYER | CSTF_WINDOW | CSTF_CURSOR | CSTF_FONT | CSTF_SHARED | CSTF_EXTERNAL | CSTF_PREALLOCATED; ret_desc->priority = CSPP_ULTIMATE; /* For showing our X11 window */ ret_desc->access[CSAID_LAYER0] = CSAF_READ; ret_desc->access[CSAID_LAYER1] = CSAF_READ; ret_desc->access[CSAID_LAYER2] = CSAF_READ; snprintf( ret_desc->name, DFB_SURFACE_POOL_DESC_NAME_LENGTH, "VDPAU Output Surface" ); return DFB_OK; } static DFBResult x11JoinPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data ) { x11vdpauPoolLocalData *local = pool_local; DFBX11 *x11 = system_data; DFBX11VDPAU *vdp = &x11->vdp; D_DEBUG_AT( X11VDPAU_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); local->x11 = x11; local->vdp = vdp; return DFB_OK; } static DFBResult x11DestroyPool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { D_DEBUG_AT( X11VDPAU_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); return DFB_OK; } static DFBResult x11LeavePool( CoreSurfacePool *pool, void *pool_data, void *pool_local ) { D_DEBUG_AT( X11VDPAU_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); return DFB_OK; } static DFBResult x11TestConfig( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, const CoreSurfaceConfig *config ) { switch (config->format) { case DSPF_ARGB: break; default: return DFB_UNSUPPORTED; } return DFB_OK; } static DFBResult x11AllocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { CoreSurface *surface; x11vdpauAllocationData *alloc = alloc_data; x11vdpauPoolLocalData *local = pool_local; DFBX11 *x11 = local->x11; D_DEBUG_AT( X11VDPAU_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (surface->type & CSTF_PREALLOCATED) { alloc->surface = (VdpOutputSurface)surface->config.preallocated[0].handle; D_DEBUG_AT( X11VDPAU_Surfaces, " -> preallocated from output surface %u\n", alloc->surface ); } else { DirectResult ret; int retval; DFBX11CallOutputSurfaceCreate create; create.rgba_format = VDP_RGBA_FORMAT_B8G8R8A8; create.width = surface->config.size.w; create.height = surface->config.size.h; ret = fusion_call_execute2( &x11->shared->call, FCEF_NONE, X11_VDPAU_OUTPUT_SURFACE_CREATE, &create, sizeof(create), &retval ); if (ret) { D_DERROR( ret, "DirectFB/X11/VDPAU: fusion_call_execute2() failed!\n" ); return ret; } if (!retval) { D_ERROR( "DirectFB/X11/VDPAU: OutputSurfaceCreate( ARGB %dx%d ) failed!\n", surface->config.size.w, surface->config.size.h ); return DFB_FAILURE; } alloc->surface = (VdpOutputSurface) retval; D_DEBUG_AT( X11VDPAU_Surfaces, " -> created output surface %u\n", alloc->surface ); } dfb_surface_calc_buffer_size( surface, 8, 2, &alloc->pitch, &allocation->size ); return DFB_OK; } static DFBResult x11DeallocateBuffer( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceBuffer *buffer, CoreSurfaceAllocation *allocation, void *alloc_data ) { CoreSurface *surface; x11vdpauAllocationData *alloc = alloc_data; x11vdpauPoolLocalData *local = pool_local; DFBX11 *x11 = local->x11; DFBX11VDPAU *vdp = local->vdp; D_DEBUG_AT( X11VDPAU_Surfaces, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer ); CORE_SURFACE_ALLOCATION_ASSERT( allocation ); surface = buffer->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (surface->type & CSTF_PREALLOCATED) { } else { DirectResult ret; int retval; DFBX11CallOutputSurfaceDestroy destroy; destroy.surface = alloc->surface; ret = fusion_call_execute2( &x11->shared->call, FCEF_NONE, X11_VDPAU_OUTPUT_SURFACE_DESTROY, &destroy, sizeof(destroy), &retval ); if (ret) { D_DERROR( ret, "DirectFB/X11/VDPAU: fusion_call_execute2() failed!\n" ); return ret; } if (retval) { D_ERROR( "DirectFB/X11/VDPAU: OutputSurfaceDestroy( %u ) failed (status %d, '%s'!\n", alloc->surface, retval, vdp->GetErrorString( retval ) ); return DFB_FAILURE; } } return DFB_OK; } static DFBResult x11Lock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { x11vdpauAllocationData *alloc = alloc_data; D_DEBUG_AT( X11VDPAU_Surfaces, "%s( %p )\n", __FUNCTION__, allocation ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); lock->handle = (void*) (unsigned long) alloc->surface; lock->pitch = alloc->pitch; return DFB_OK; } static DFBResult x11Unlock( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, CoreSurfaceBufferLock *lock ) { D_DEBUG_AT( X11VDPAU_Surfaces, "%s( %p )\n", __FUNCTION__, allocation ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); return DFB_OK; } static DFBResult x11Read( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, void *destination, int pitch, const DFBRectangle *rect ) { x11vdpauAllocationData *alloc = alloc_data; x11vdpauPoolLocalData *local = pool_local; DFBX11 *x11 = local->x11; DFBX11VDPAU *vdp = local->vdp; CoreSurface *surface; D_DEBUG_AT( X11VDPAU_Surfaces, "%s( %p )\n", __FUNCTION__, allocation ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); surface = allocation->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (dfb_core_is_master( x11->core )) { VdpStatus status; VdpRect src; void *ptrs[3]; uint32_t pitches[3]; ptrs[0] = destination; pitches[0] = pitch; src.x0 = rect->x; src.y0 = rect->y; src.x1 = rect->x + rect->w; src.y1 = rect->y + rect->h; XLockDisplay( x11->display ); status = vdp->OutputSurfaceGetBitsNative( alloc->surface, &src, ptrs, pitches ); XUnlockDisplay( x11->display ); if (status) { D_ERROR( "DirectFB/X11/VDPAU: OutputSurfaceGetBitsNative() failed (status %d, '%s')!\n", status, vdp->GetErrorString( status ) ); return DFB_FAILURE; } } else { DirectResult ret; int retval; DFBX11CallOutputSurfaceGetBitsNative get; get.surface = alloc->surface; get.ptr = destination; get.pitch = pitch; get.source_rect.x0 = rect->x; get.source_rect.y0 = rect->y; get.source_rect.x1 = rect->x + rect->w; get.source_rect.y1 = rect->y + rect->h; ret = fusion_call_execute2( &x11->shared->call, FCEF_NONE, X11_VDPAU_OUTPUT_SURFACE_GET_BITS_NATIVE, &get, sizeof(get), &retval ); if (ret) { D_DERROR( ret, "DirectFB/X11/VDPAU: fusion_call_execute2() failed!\n" ); return ret; } if (retval) { D_ERROR( "DirectFB/X11/VDPAU: OutputSurfaceGetBitsNative( %u ) failed (status %d, '%s'!\n", alloc->surface, retval, vdp->GetErrorString( retval ) ); return DFB_FAILURE; } } return DFB_OK; } static DFBResult x11Write( CoreSurfacePool *pool, void *pool_data, void *pool_local, CoreSurfaceAllocation *allocation, void *alloc_data, const void *source, int pitch, const DFBRectangle *rect ) { x11vdpauAllocationData *alloc = alloc_data; x11vdpauPoolLocalData *local = pool_local; DFBX11 *x11 = local->x11; DFBX11VDPAU *vdp = local->vdp; CoreSurface *surface; D_DEBUG_AT( X11VDPAU_Surfaces, "%s( %p )\n", __FUNCTION__, allocation ); D_MAGIC_ASSERT( pool, CoreSurfacePool ); D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation ); surface = allocation->surface; D_MAGIC_ASSERT( surface, CoreSurface ); if (dfb_core_is_master( x11->core )) { VdpStatus status; VdpRect dest; const void *ptrs[3]; uint32_t pitches[3]; ptrs[0] = source; pitches[0] = pitch; dest.x0 = rect->x; dest.y0 = rect->y; dest.x1 = rect->x + rect->w; dest.y1 = rect->y + rect->h; XLockDisplay( x11->display ); status = vdp->OutputSurfacePutBitsNative( alloc->surface, ptrs, pitches, &dest ); XUnlockDisplay( x11->display ); if (status) { D_ERROR( "DirectFB/X11/VDPAU: OutputSurfacePutBitsNative() failed (status %d, '%s')!\n", status, vdp->GetErrorString( status ) ); return DFB_FAILURE; } } else { DirectResult ret; int retval; DFBX11CallOutputSurfacePutBitsNative put; put.surface = alloc->surface; put.ptr = source; put.pitch = pitch; put.destination_rect.x0 = rect->x; put.destination_rect.y0 = rect->y; put.destination_rect.x1 = rect->x + rect->w; put.destination_rect.y1 = rect->y + rect->h; ret = fusion_call_execute2( &x11->shared->call, FCEF_NONE, X11_VDPAU_OUTPUT_SURFACE_PUT_BITS_NATIVE, &put, sizeof(put), &retval ); if (ret) { D_DERROR( ret, "DirectFB/X11/VDPAU: fusion_call_execute2() failed!\n" ); return ret; } if (retval) { D_ERROR( "DirectFB/X11/VDPAU: OutputSurfacePutBitsNative( %u ) failed (status %d, '%s'!\n", alloc->surface, retval, vdp->GetErrorString( retval ) ); return DFB_FAILURE; } } return DFB_OK; } static const SurfacePoolFuncs _x11vdpauSurfacePoolFuncs = { .PoolDataSize = x11vdpauPoolDataSize, .PoolLocalDataSize = x11vdpauPoolLocalDataSize, .AllocationDataSize = x11vdpauAllocationDataSize, .InitPool = x11InitPool, .JoinPool = x11JoinPool, .DestroyPool = x11DestroyPool, .LeavePool = x11LeavePool, .TestConfig = x11TestConfig, .AllocateBuffer = x11AllocateBuffer, .DeallocateBuffer = x11DeallocateBuffer, .Lock = x11Lock, .Unlock = x11Unlock, .Read = x11Read, .Write = x11Write, }; const SurfacePoolFuncs *x11vdpauSurfacePoolFuncs = &_x11vdpauSurfacePoolFuncs; DirectFB-1.7.7/systems/x11vdpau/x11input.c0000644000175000017500000006420012254435330015111 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "primary.h" #include "x11.h" #include D_DEBUG_DOMAIN( X11_Input, "X11/Input", "X11 Input/Key/Mouse handling" ); DFB_INPUT_DRIVER( x11inputvdpau ) /* * declaration of private data */ typedef struct { CoreInputDevice* device; DirectThread* thread; DFBX11* x11; bool stop; } X11InputData; static DFBInputEvent motionX = { .type = DIET_UNKNOWN, .axisabs = 0, }; static DFBInputEvent motionY = { .type = DIET_UNKNOWN, .axisabs = 0, }; static void motion_compress( int x, int y, const XEvent *xEvent ) { if (motionX.axisabs != x) { motionX.type = DIET_AXISMOTION; motionX.flags = DIEF_AXISABS | DIEF_TIMESTAMP; motionX.axis = DIAI_X; motionX.axisabs = x; motionX.timestamp.tv_sec = xEvent->xmotion.time / 1000; motionX.timestamp.tv_usec = (xEvent->xmotion.time % 1000) * 1000; } if (motionY.axisabs != y) { motionY.type = DIET_AXISMOTION; motionY.flags = DIEF_AXISABS | DIEF_TIMESTAMP; motionY.axis = DIAI_Y; motionY.axisabs = y; motionY.timestamp.tv_sec = xEvent->xmotion.time / 1000; motionY.timestamp.tv_usec = (xEvent->xmotion.time % 1000) * 1000; } } static void motion_realize( X11InputData *data ) { if (motionX.type != DIET_UNKNOWN) { if (motionY.type != DIET_UNKNOWN) motionX.flags |= DIEF_FOLLOW; dfb_input_dispatch( data->device, &motionX ); motionX.type = DIET_UNKNOWN; } if (motionY.type != DIET_UNKNOWN) { dfb_input_dispatch( data->device, &motionY ); motionY.type = DIET_UNKNOWN; } } static DFBInputDeviceKeyIdentifier xsymbol_to_id( KeySym xKeySymbol ) { switch (xKeySymbol) { case XK_a : return DIKI_A; case XK_b : return DIKI_B; case XK_c : return DIKI_C; case XK_d : return DIKI_D; case XK_e : return DIKI_E; case XK_f : return DIKI_F; case XK_g : return DIKI_G; case XK_h : return DIKI_H; case XK_i : return DIKI_I; case XK_j : return DIKI_J; case XK_k : return DIKI_K; case XK_l : return DIKI_L; case XK_m : return DIKI_M; case XK_n : return DIKI_N; case XK_o : return DIKI_O; case XK_p : return DIKI_P; case XK_q : return DIKI_Q; case XK_r : return DIKI_R; case XK_s : return DIKI_S; case XK_t : return DIKI_T; case XK_u : return DIKI_U; case XK_v : return DIKI_V; case XK_w : return DIKI_W; case XK_x : return DIKI_X; case XK_y : return DIKI_Y; case XK_z : return DIKI_Z; case XK_0 : return DIKI_0; case XK_1 : return DIKI_1; case XK_2 : return DIKI_2; case XK_3 : return DIKI_3; case XK_4 : return DIKI_4; case XK_5 : return DIKI_5; case XK_6 : return DIKI_6; case XK_7 : return DIKI_7; case XK_8 : return DIKI_8; case XK_9 : return DIKI_9; case XK_F1 : return DIKI_F1; case XK_F2 : return DIKI_F2; case XK_F3 : return DIKI_F3; case XK_F4 : return DIKI_F4; case XK_F5 : return DIKI_F5; case XK_F6 : return DIKI_F6; case XK_F7 : return DIKI_F7; case XK_F8 : return DIKI_F8; case XK_F9 : return DIKI_F9; case XK_F10 : return DIKI_F10; case XK_F11 : return DIKI_F11; case XK_F12 : return DIKI_F12; case XK_Shift_L : return DIKI_SHIFT_L; case XK_Shift_R : return DIKI_SHIFT_R; case XK_Control_L : return DIKI_CONTROL_L; case XK_Control_R : return DIKI_CONTROL_R; case XK_Alt_L : return DIKI_ALT_L; case XK_Alt_R : return DIKI_ALT_R; case XK_Meta_L : return DIKI_META_L; case XK_Meta_R : return DIKI_META_R; case XK_Super_L : return DIKI_SUPER_L; case XK_Super_R : return DIKI_SUPER_R; case XK_Hyper_L : return DIKI_HYPER_L; case XK_Hyper_R : return DIKI_HYPER_R; case XK_Mode_switch : return DIKI_ALT_R; case XK_Caps_Lock : return DIKI_CAPS_LOCK; case XK_Num_Lock : return DIKI_NUM_LOCK; case XK_Scroll_Lock : return DIKI_SCROLL_LOCK; case XK_Escape : return DIKI_ESCAPE; case XK_Left : return DIKI_LEFT; case XK_Right : return DIKI_RIGHT; case XK_Up : return DIKI_UP; case XK_Down : return DIKI_DOWN; case XK_Tab : return DIKI_TAB; case XK_ISO_Left_Tab : return DIKI_TAB; case XK_Return : return DIKI_ENTER; case XK_space : return DIKI_SPACE; case XK_BackSpace : return DIKI_BACKSPACE; case XK_Insert : return DIKI_INSERT; case XK_Delete : return DIKI_DELETE; case XK_Home : return DIKI_HOME; case XK_End : return DIKI_END; case XK_Page_Up : return DIKI_PAGE_UP; case XK_Page_Down : return DIKI_PAGE_DOWN; case XK_Print : return DIKI_PRINT; case XK_Pause : return DIKI_PAUSE; /* The labels on these keys depend on the type of keyboard. * We've choosen the names from a US keyboard layout. The * comments refer to the ISO 9995 terminology. */ case XK_quoteleft : return DIKI_QUOTE_LEFT; /* TLDE */ case XK_minus : return DIKI_MINUS_SIGN; /* AE11 */ case XK_equal : return DIKI_EQUALS_SIGN; /* AE12 */ case XK_bracketleft : return DIKI_BRACKET_LEFT; /* AD11 */ case XK_bracketright : return DIKI_BRACKET_RIGHT;/* AD12 */ case XK_backslash : return DIKI_BACKSLASH; /* BKSL */ case XK_semicolon : return DIKI_SEMICOLON; /* AC10 */ case XK_quoteright : return DIKI_QUOTE_RIGHT; /* AC11 */ case XK_comma : return DIKI_COMMA; /* AB08 */ case XK_period : return DIKI_PERIOD; /* AB09 */ case XK_slash : return DIKI_SLASH; /* AB10 */ case XK_less : return DIKI_LESS_SIGN; /* 103rd */ case XK_KP_Divide : return DIKI_KP_DIV; case XK_KP_Multiply : return DIKI_KP_MULT; case XK_KP_Subtract : return DIKI_KP_MINUS; case XK_KP_Add : return DIKI_KP_PLUS; case XK_KP_Enter : return DIKI_KP_ENTER; case XK_KP_Space : return DIKI_KP_SPACE; case XK_KP_Tab : return DIKI_KP_TAB; case XK_KP_F1 : return DIKI_KP_F1; case XK_KP_F2 : return DIKI_KP_F2; case XK_KP_F3 : return DIKI_KP_F3; case XK_KP_F4 : return DIKI_KP_F4; case XK_KP_Equal : return DIKI_KP_EQUAL; case XK_KP_Separator : return DIKI_KP_SEPARATOR; case XK_KP_Delete : return DIKI_KP_DECIMAL; case XK_KP_Insert : return DIKI_KP_0; case XK_KP_End : return DIKI_KP_1; case XK_KP_Down : return DIKI_KP_2; case XK_KP_Page_Down : return DIKI_KP_3; case XK_KP_Left : return DIKI_KP_4; case XK_KP_Begin : return DIKI_KP_5; case XK_KP_Right : return DIKI_KP_6; case XK_KP_Home : return DIKI_KP_7; case XK_KP_Up : return DIKI_KP_8; case XK_KP_Page_Up : return DIKI_KP_9; case XK_KP_Decimal : return DIKI_KP_DECIMAL; case XK_KP_0 : return DIKI_KP_0; case XK_KP_1 : return DIKI_KP_1; case XK_KP_2 : return DIKI_KP_2; case XK_KP_3 : return DIKI_KP_3; case XK_KP_4 : return DIKI_KP_4; case XK_KP_5 : return DIKI_KP_5; case XK_KP_6 : return DIKI_KP_6; case XK_KP_7 : return DIKI_KP_7; case XK_KP_8 : return DIKI_KP_8; case XK_KP_9 : return DIKI_KP_9; case 0 : break; default: D_DEBUG_AT( X11_Input, "Unknown key symbol 0x%lx\n", xKeySymbol); } return DIKI_UNKNOWN; } static DFBInputDeviceKeySymbol xsymbol_to_symbol( KeySym xKeySymbol ) { if (xKeySymbol >= 0x20 && xKeySymbol <= 0xff) return xKeySymbol; if (xKeySymbol >= XK_F1 && xKeySymbol <= XK_F35) return DFB_FUNCTION_KEY( xKeySymbol - XK_F1 + 1 ); switch (xKeySymbol) { case XK_Shift_L : return DIKS_SHIFT; case XK_Shift_R : return DIKS_SHIFT; case XK_Control_L : return DIKS_CONTROL; case XK_Control_R : return DIKS_CONTROL; case XK_Alt_L : return DIKS_ALT; case XK_Alt_R : return DIKS_ALT; case XK_Meta_L : return DIKS_META; case XK_Meta_R : return DIKS_META; case XK_Super_L : return DIKS_SUPER; case XK_Super_R : return DIKS_SUPER; case XK_Hyper_L : return DIKS_HYPER; case XK_Hyper_R : return DIKS_HYPER; case XK_Mode_switch : return DIKS_ALTGR; case XK_Caps_Lock : return DIKS_CAPS_LOCK; case XK_Num_Lock : return DIKS_NUM_LOCK; case XK_Scroll_Lock : return DIKS_SCROLL_LOCK; case XK_Escape : return DIKS_ESCAPE; case XK_Left : return DIKS_CURSOR_LEFT; case XK_Right : return DIKS_CURSOR_RIGHT; case XK_Up : return DIKS_CURSOR_UP; case XK_Down : return DIKS_CURSOR_DOWN; case XK_Tab : return DIKS_TAB; case XK_ISO_Left_Tab : return DIKS_TAB; case XK_Return : return DIKS_ENTER; case XK_space : return DIKS_SPACE; case XK_BackSpace : return DIKS_BACKSPACE; case XK_Insert : return DIKS_INSERT; case XK_Delete : return DIKS_DELETE; case XK_Home : return DIKS_HOME; case XK_End : return DIKS_END; case XK_Page_Up : return DIKS_PAGE_UP; case XK_Page_Down : return DIKS_PAGE_DOWN; case XK_Print : return DIKS_PRINT; case XK_Pause : return DIKS_PAUSE; case XK_KP_Divide : return DIKS_SLASH; case XK_KP_Multiply : return DIKS_ASTERISK; case XK_KP_Subtract : return DIKS_MINUS_SIGN; case XK_KP_Add : return DIKS_PLUS_SIGN; case XK_KP_Enter : return DIKS_ENTER; case XK_KP_Space : return DIKS_SPACE; case XK_KP_Tab : return DIKS_TAB; case XK_KP_F1 : return DIKS_F1; case XK_KP_F2 : return DIKS_F2; case XK_KP_F3 : return DIKS_F3; case XK_KP_F4 : return DIKS_F4; case XK_KP_Equal : return DIKS_EQUALS_SIGN; case XK_KP_Separator : return DIKS_COLON; /* FIXME: what is a separator */ case XK_KP_Delete : return DIKS_DELETE; case XK_KP_Insert : return DIKS_INSERT; case XK_KP_End : return DIKS_END; case XK_KP_Down : return DIKS_CURSOR_DOWN; case XK_KP_Page_Down : return DIKS_PAGE_DOWN; case XK_KP_Left : return DIKS_CURSOR_LEFT; case XK_KP_Begin : return DIKS_BEGIN; case XK_KP_Right : return DIKS_CURSOR_RIGHT; case XK_KP_Home : return DIKS_HOME; case XK_KP_Up : return DIKS_CURSOR_UP; case XK_KP_Page_Up : return DIKS_PAGE_UP; case XK_KP_Decimal : return DIKS_PERIOD; case XK_KP_0 : return DIKS_0; case XK_KP_1 : return DIKS_1; case XK_KP_2 : return DIKS_2; case XK_KP_3 : return DIKS_3; case XK_KP_4 : return DIKS_4; case XK_KP_5 : return DIKS_5; case XK_KP_6 : return DIKS_6; case XK_KP_7 : return DIKS_7; case XK_KP_8 : return DIKS_8; case XK_KP_9 : return DIKS_9; case 0 : break; default: D_DEBUG("X11: Unknown key symbol 0x%lx\n", xKeySymbol); } return DIKS_NULL; } static void handleMouseEvent(XEvent* pXEvent, X11InputData* pData) { static int iMouseEventCount = 0; DFBInputEvent dfbEvent; if (pXEvent->type == MotionNotify) { motion_compress( pXEvent->xmotion.x, pXEvent->xmotion.y, pXEvent ); ++iMouseEventCount; } if ( pXEvent->type == ButtonPress || pXEvent->type == ButtonRelease ) { if ( pXEvent->type == ButtonPress ) dfbEvent.type = DIET_BUTTONPRESS; else dfbEvent.type = DIET_BUTTONRELEASE; dfbEvent.flags = DIEF_TIMESTAMP; /* Get pressed button */ switch ( pXEvent->xbutton.button ) { case 1: dfbEvent.button = DIBI_LEFT; break; case 2: dfbEvent.button = DIBI_MIDDLE; break; case 3: dfbEvent.button = DIBI_RIGHT; break; //Wheel events case 4: /*up*/ case 5: /*down*/ case 6: /*left*/ case 7: /*right*/ if (pXEvent->type == ButtonPress) { dfbEvent.type = DIET_AXISMOTION; dfbEvent.flags = DIEF_AXISREL; dfbEvent.axis = DIAI_Z; /*SCROLL UP*/ if ( pXEvent->xbutton.button == 4 ) { dfbEvent.axisrel = -1; } /*SCROLL DOWN */ else if (pXEvent->xbutton.button == 5) { dfbEvent.axisrel = 1; } /*SCROLL LEFT*/ else if (pXEvent->xbutton.button == 6) { dfbEvent.axis = DIAI_X; dfbEvent.axisrel = -1; } /*SCROLL RIGHT*/ else if (pXEvent->xbutton.button == 7 ) { dfbEvent.axis = DIAI_X; dfbEvent.axisrel = 1; } } else return; break; default: break; } dfbEvent.timestamp.tv_sec = pXEvent->xbutton.time / 1000; dfbEvent.timestamp.tv_usec = (pXEvent->xbutton.time % 1000) * 1000; dfb_input_dispatch( pData->device, &dfbEvent ); ++iMouseEventCount; } } /* * Input thread reading from device. * Generates events on incoming data. */ static void* x11EventThread( DirectThread *thread, void *driver_data ) { X11InputData *data = driver_data; DFBX11 *x11 = data->x11; DFBX11Shared *shared = x11->shared; while (!data->stop) { unsigned int pull = 23; XEvent xEvent; DFBInputEvent dfbEvent; static int nextKeyIsRepeat = false; /* FIXME: Detect key repeats, we're receiving KeyPress, KeyRelease, KeyPress, KeyRelease... !!?? */ if (shared->window == 0) { /* no window, so no event */ usleep( 50000 ); continue; } usleep( 10000 ); XLockDisplay( x11->display ); while (!data->stop && pull-- && XPending( x11->display )) { XNextEvent( x11->display, &xEvent ); /* is this key repeat? idea from GII */ if ( (xEvent.type == KeyRelease) && (XPending( x11->display )) ) { XEvent peekEvent; XPeekEvent( x11->display, &peekEvent ); if ( (peekEvent.type == KeyPress) && (peekEvent.xkey.keycode == xEvent.xkey.keycode) && (peekEvent.xkey.time - xEvent.xkey.time < 2) ) { nextKeyIsRepeat = true; } } XUnlockDisplay( x11->display ); D_DEBUG_AT( X11_Input, "Event received: %d\n", xEvent.type ); switch (xEvent.type) { case ButtonPress: case ButtonRelease: motion_realize( data ); case MotionNotify: handleMouseEvent( &xEvent, data ); // crash ??? break; case KeyPress: case KeyRelease: { motion_realize( data ); dfbEvent.type = (xEvent.type == KeyPress) ? DIET_KEYPRESS : DIET_KEYRELEASE; dfbEvent.flags = DIEF_KEYCODE | DIEF_TIMESTAMP; dfbEvent.key_code = xEvent.xkey.keycode; dfbEvent.timestamp.tv_sec = xEvent.xkey.time / 1000; dfbEvent.timestamp.tv_usec = (xEvent.xkey.time % 1000) * 1000; if ( (xEvent.type == KeyPress) && nextKeyIsRepeat ) { nextKeyIsRepeat = false; dfbEvent.flags |= DIEF_REPEAT; } dfb_input_dispatch( data->device, &dfbEvent ); break; } case Expose: //handle_expose( &xEvent.xexpose ); break; case DestroyNotify: /* this event is mainly to unblock XNextEvent. */ break; default: break; } XLockDisplay( x11->display ); } XUnlockDisplay( x11->display ); if (!data->stop) motion_realize( data ); } return NULL; } /* exported symbols */ /* * Return the number of available devices. * Called once during initialization of DirectFB. */ static int driver_get_available( void ) { return dfb_system_type() == CORE_X11VDPAU; } /* * Fill out general information about this driver. * Called once during initialization of DirectFB. */ static void driver_get_info( InputDriverInfo *info ) { /* fill driver info structure */ snprintf ( info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "X11 Input Driver" ); snprintf ( info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "directfb.org" ); info->version.major = 0; info->version.minor = 1; } /* * Open the device, fill out information about it, * allocate and fill private data, start input thread. * Called during initialization, resuming or taking over mastership. */ static DFBResult driver_open_device( CoreInputDevice *device, unsigned int number, InputDeviceInfo *info, void **driver_data ) { X11InputData *data; DFBX11 *x11 = dfb_system_data(); DFBX11Shared *shared = x11->shared; D_DEBUG_AT( X11_Input, "%s()\n", __FUNCTION__ ); fusion_skirmish_prevail( &shared->lock ); fusion_skirmish_dismiss( &shared->lock ); /* set device vendor and name */ snprintf( info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "XServer" ); snprintf( info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "X11 Input" ); /* set one of the primary input device IDs */ info->prefered_id = DIDID_KEYBOARD; /* set type flags */ info->desc.type = DIDTF_JOYSTICK | DIDTF_KEYBOARD | DIDTF_MOUSE; /* set capabilities */ info->desc.caps = DICAPS_ALL; /* enable translation of fake raw hardware keycodes */ info->desc.min_keycode = 8; info->desc.max_keycode = 255; /* allocate and fill private data */ data = D_CALLOC( 1, sizeof(X11InputData) ); data->device = device; data->x11 = x11; /* start input thread */ data->thread = direct_thread_create( DTT_INPUT, x11EventThread, data, "X11 Input" ); /* set private data pointer */ *driver_data = data; return DFB_OK; } /* * Fetch one entry from the device's keymap if supported. * this does a fake mapping based on the orginal DFB code */ static DFBResult driver_get_keymap_entry( CoreInputDevice *device, void *driver_data, DFBInputDeviceKeymapEntry *entry ) { int i; X11InputData *data = driver_data; DFBX11 *x11 = data->x11; XLockDisplay( x11->display ); for (i=0; i<4; i++) { KeySym xSymbol = XkbKeycodeToKeysym( x11->display, entry->code, 0, i ); if (i == 0) entry->identifier = xsymbol_to_id( xSymbol ); entry->symbols[i] = xsymbol_to_symbol( xSymbol ); } XUnlockDisplay( x11->display ); /* is CapsLock effective? */ if (entry->identifier >= DIKI_A && entry->identifier <= DIKI_Z) entry->locks |= DILS_CAPS; /* is NumLock effective? */ if (entry->identifier >= DIKI_KP_DECIMAL && entry->identifier <= DIKI_KP_9) entry->locks |= DILS_NUM; return DFB_OK; } /* * End thread, close device and free private data. */ static void driver_close_device( void *driver_data ) { X11InputData *data = driver_data; D_DEBUG_AT( X11_Input, "%s()\n", __FUNCTION__ ); /* stop input thread */ data->stop = true; /* it is possible that this "close" function is called from the same * thread that the input device is actually running on. * This happens when you e.g. click the close box with your mouse. * As a fix, we check if we are this thread. */ if (data->thread != direct_thread_self()) { direct_thread_join( data->thread ); direct_thread_destroy( data->thread ); } /* free private data */ D_FREE ( data ); } DirectFB-1.7.7/systems/x11vdpau/primary.c0000644000175000017500000005262712254435330015115 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "x11.h" #include "primary.h" D_DEBUG_DOMAIN( X11_Layer, "X11/Layer", "X11 Layer" ); D_DEBUG_DOMAIN( X11_Update, "X11/Update", "X11 Update" ); /**********************************************************************************************************************/ static int error_code = 0; static int error_handler( Display *display, XErrorEvent *event ) { char buf[512]; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); XGetErrorText( display, event->error_code, buf, sizeof(buf) ); D_ERROR( "X11/Window: Error! %s\n", buf ); error_code = event->error_code; return 0; } static DFBResult primaryInitScreen( CoreScreen *screen, CoreGraphicsDevice *device, void *driver_data, void *screen_data, DFBScreenDescription *description ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; void *old_error_handler = 0; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); /* Set the screen capabilities. */ description->caps = DSCCAPS_OUTPUTS; description->outputs = 1; /* Set the screen name. */ snprintf( description->name, DFB_SCREEN_DESC_NAME_LENGTH, "X11/VDPAU Primary Screen" ); shared->depth = DefaultDepthOfScreen( x11->screenptr ); XSetWindowAttributes attr = { .background_pixmap = 0 }; attr.event_mask = ButtonPressMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask | KeyReleaseMask | ExposureMask | StructureNotifyMask; XLockDisplay( x11->display ); old_error_handler = XSetErrorHandler( error_handler ); error_code = 0; shared->window = XCreateWindow( x11->display, RootWindowOfScreen(x11->screenptr), 0, 0, shared->screen_size.w, shared->screen_size.h, 0, shared->depth, InputOutput, DefaultVisualOfScreen(x11->screenptr), CWEventMask, &attr ); XSync( x11->display, False ); if (!shared->window || error_code) { D_ERROR( "DirectFB/X11/VDPAU: XCreateWindow() failed!\n" ); XUnlockDisplay( x11->display ); return DFB_FAILURE; } XSelectInput( x11->display, shared->window, ButtonPressMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask | KeyReleaseMask | StructureNotifyMask ); XSizeHints Hints; /* * Here we inform the function of what we are going to change for the * window (there's also PPosition but it's obsolete) */ Hints.flags = PSize | PMinSize | PMaxSize; /* * Now we set the structure to the values we need for width & height. * For esthetic reasons we set Width=MinWidth=MaxWidth. * The same goes for Height. You can try whith differents values, or * let's use Hints.flags=Psize; and resize your window.. */ Hints.min_width = Hints.max_width = Hints.base_width = shared->screen_size.w; Hints.min_height = Hints.max_height = Hints.base_height = shared->screen_size.h; /* Now we can set the size hints for the specified window */ XSetWMNormalHints( x11->display, shared->window, &Hints ); /* We change the title of the window (default:Untitled) */ XStoreName( x11->display, shared->window, "DirectFB/VDPAU" ); /* maps the window and raises it to the top of the stack */ XMapRaised( x11->display, shared->window ); XSetErrorHandler( old_error_handler ); VdpStatus status; status = x11->vdp.PresentationQueueTargetCreateX11( x11->vdp.device, shared->window, &shared->vdp_target ); if (status) { D_ERROR( "DirectFB/X11/VDPAU: PresentationQueueTargetCreateX11() failed (status %d, '%s')!\n", status, x11->vdp.GetErrorString( status ) ); XUnlockDisplay( x11->display ); return DFB_FAILURE; } status = x11->vdp.PresentationQueueCreate( x11->vdp.device, shared->vdp_target, &shared->vdp_queue ); if (status) { D_ERROR( "DirectFB/X11/VDPAU: PresentationQueueCreate() failed (status %d, '%s')!\n", status, x11->vdp.GetErrorString( status ) ); XUnlockDisplay( x11->display ); return DFB_FAILURE; } status = x11->vdp.OutputSurfaceCreate( x11->vdp.device, VDP_RGBA_FORMAT_B8G8R8A8, shared->screen_size.w, shared->screen_size.h, &shared->vdp_surface ); if (status) { D_ERROR( "DirectFB/X11/VDPAU: OutputSurfaceCreate( RGBA %dx%d ) failed (status %d, '%s')!\n", shared->screen_size.w, shared->screen_size.h, status, x11->vdp.GetErrorString( status ) ); XUnlockDisplay( x11->display ); return DFB_FAILURE; } DFBResult ret; CoreSurfaceConfig config; config.flags = CSCONF_SIZE | CSCONF_FORMAT | CSCONF_CAPS | CSCONF_PREALLOCATED; config.size.w = shared->screen_size.w; config.size.h = shared->screen_size.h; config.format = DSPF_ARGB; config.caps = DSCAPS_VIDEOONLY; config.preallocated[0].addr = NULL; config.preallocated[0].handle = (void*)shared->vdp_surface; config.preallocated[0].pitch = shared->screen_size.w * 4; ret = dfb_surface_create( x11->core, &config, CSTF_EXTERNAL | CSTF_PREALLOCATED, shared->vdp_surface, NULL, &shared->vdp_core_surface ); if (ret) { D_DERROR( ret, "DirectFB/Xine/VDPAU: Could not create preallocated output surface!\n" ); XUnlockDisplay( x11->display ); return ret; } XUnlockDisplay( x11->display ); return DFB_OK; } static DFBResult primaryShutdownScreen( CoreScreen *screen, void *driver_data, void *screen_data ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; VdpStatus status; status = x11->vdp.PresentationQueueDestroy( shared->vdp_queue ); if (status) D_ERROR( "DirectFB/X11/VDPAU: PresentationQueueDestroy() failed (status %d, '%s')!\n", status, x11->vdp.GetErrorString( status ) ); status = x11->vdp.PresentationQueueTargetDestroy( shared->vdp_target ); if (status) D_ERROR( "DirectFB/X11/VDPAU: PresentationQueueTargetDestroy() failed (status %d, '%s')!\n", status, x11->vdp.GetErrorString( status ) ); XDestroyWindow( x11->display, shared->window ); return DFB_OK; } static DFBResult primaryGetScreenSize( CoreScreen *screen, void *driver_data, void *screen_data, int *ret_width, int *ret_height ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); *ret_width = shared->screen_size.w; *ret_height = shared->screen_size.h; return DFB_OK; } static DFBResult primaryInitOutput( CoreScreen *screen, void *driver_data, void *screen_data, int output, DFBScreenOutputDescription *description, DFBScreenOutputConfig *config ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; (void) shared; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); description->caps = DSOCAPS_RESOLUTION; config->flags |= DSOCONF_RESOLUTION; config->resolution = DSOR_UNKNOWN; return DFB_OK; } static DFBResult primaryTestOutputConfig( CoreScreen *screen, void *driver_data, void *screen_data, int output, const DFBScreenOutputConfig *config, DFBScreenOutputConfigFlags *failed ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; (void) shared; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); return DFB_OK; } static DFBResult primarySetOutputConfig( CoreScreen *screen, void *driver_data, void *screen_data, int output, const DFBScreenOutputConfig *config ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; int hor[] = { 640,720,720,800,1024,1152,1280,1280,1280,1280,1400,1600,1920 }; int ver[] = { 480,480,576,600, 768, 864, 720, 768, 960,1024,1050,1200,1080 }; int res; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); (void)output; /* all outputs are active */ /* we support screen resizing only */ if (config->flags != DSOCONF_RESOLUTION) return DFB_INVARG; res = D_BITn32(config->resolution); if ( (res == -1) || (res >= D_ARRAY_SIZE(hor)) ) return DFB_INVARG; shared->screen_size.w = hor[res]; shared->screen_size.h = ver[res]; // FIXME: recreate window/target etc. return DFB_OK; } static ScreenFuncs primaryScreenFuncs = { .InitScreen = primaryInitScreen, .ShutdownScreen = primaryShutdownScreen, .GetScreenSize = primaryGetScreenSize, .InitOutput = primaryInitOutput, .TestOutputConfig = primaryTestOutputConfig, .SetOutputConfig = primarySetOutputConfig }; ScreenFuncs *x11PrimaryScreenFuncs = &primaryScreenFuncs; /******************************************************************************/ static int primaryLayerDataSize( void ) { return sizeof(X11LayerData); } static int primaryRegionDataSize( void ) { return 0; } static DFBResult primaryInitLayer( CoreLayer *layer, void *driver_data, void *layer_data, DFBDisplayLayerDescription *description, DFBDisplayLayerConfig *config, DFBColorAdjustment *adjustment ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; char *name; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); { static int layer_counter = 0; X11LayerData *lds = layer_data; char *names[] = { "Primary", "Secondary", "Tertiary" }; name = "Other"; if( layer_counter < 3 ) name = names[layer_counter]; lds->layer_id = layer_counter; layer_counter++; } /* set capabilities and type */ description->caps = DLCAPS_SURFACE | DLCAPS_SCREEN_LOCATION | DLCAPS_ALPHACHANNEL; description->type = DLTF_GRAPHICS; /* set name */ snprintf( description->name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "X11 %s Layer", name ); /* fill out the default configuration */ config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; config->buffermode = DLBM_FRONTONLY; if (dfb_config->mode.width) config->width = dfb_config->mode.width; else config->width = shared->screen_size.w; if (dfb_config->mode.height) config->height = dfb_config->mode.height; else config->height = shared->screen_size.h; if (dfb_config->mode.format != DSPF_UNKNOWN) config->pixelformat = dfb_config->mode.format; else if (dfb_config->mode.depth > 0) config->pixelformat = dfb_pixelformat_for_depth( dfb_config->mode.depth ); else { int depth = DefaultDepthOfScreen( x11->screenptr ); switch (depth) { case 15: config->pixelformat = DSPF_RGB555; break; case 16: config->pixelformat = DSPF_RGB16; break; case 24: config->pixelformat = DSPF_RGB32; break; case 32: config->pixelformat = DSPF_ARGB; break; default: printf(" Unsupported X11 screen depth %d \n",depth); return DFB_UNSUPPORTED; } } return DFB_OK; } static DFBResult primaryTestRegion( CoreLayer *layer, void *driver_data, void *layer_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags *failed ) { CoreLayerRegionConfigFlags fail = 0; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); switch (config->buffermode) { case DLBM_FRONTONLY: case DLBM_BACKSYSTEM: case DLBM_BACKVIDEO: case DLBM_TRIPLE: break; default: fail |= CLRCF_BUFFERMODE; break; } switch (config->format) { case DSPF_ARGB: break; default: fail |= CLRCF_FORMAT; break; } if (config->options & ~(DLOP_ALPHACHANNEL)) fail |= CLRCF_OPTIONS; if (failed) *failed = fail; if (fail) return DFB_UNSUPPORTED; return DFB_OK; } static DFBResult primaryAddRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config ) { return DFB_OK; } static DFBResult DisplaySurface( DFBX11 *x11, X11LayerData *lds, VdpPresentationQueue queue, CoreSurfaceBufferLock *lock ) { DirectResult ret; DFBX11Shared *shared = x11->shared; DFBX11CallPresentationQueueDisplay display; display.presentation_queue = queue; display.clip_width = 0; display.clip_height = 0; display.earliest_presentation_time = 0; if (lock && lds->config.dest.x == 0 && lds->config.dest.y == 0 && lds->config.dest.w == shared->screen_size.w && lds->config.dest.h == shared->screen_size.h) { display.surface = (VdpOutputSurface) (unsigned long) lock->handle; } else { CardState state; DFBRectangle rect; dfb_state_init( &state, x11->core ); state.destination = shared->vdp_core_surface; state.source = lock ? lock->buffer->surface : NULL; state.clip.x1 = 0; state.clip.y1 = 0; state.clip.x2 = shared->screen_size.w - 1; state.clip.y2 = shared->screen_size.h - 1; rect.x = 0; rect.y = 0; rect.w = shared->screen_size.w; rect.h = shared->screen_size.h; dfb_gfxcard_fillrectangles( &rect, 1, &state ); if (lock) dfb_gfxcard_stretchblit( &lds->config.source, &lds->config.dest, &state ); dfb_gfxcard_sync(); state.destination = NULL; state.source = NULL; dfb_state_destroy( &state ); display.surface = shared->vdp_surface; } ret = fusion_call_execute2( &x11->shared->call, FCEF_ONEWAY, X11_VDPAU_PRESENTATION_QUEUE_DISPLAY, &display, sizeof(display), NULL ); if (ret) { D_DERROR( ret, "DirectFB/X11/VDPAU: fusion_call_execute2() failed!\n" ); return ret; } return DFB_OK; } static DFBResult primarySetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags updated, CoreSurface *surface, CorePalette *palette, CoreSurfaceBufferLock *left_lock, CoreSurfaceBufferLock *right_lock ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; X11LayerData *lds = layer_data; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); lds->config = *config; if (lds->shown) return DisplaySurface( x11, layer_data, shared->vdp_queue, left_lock ); return DFB_OK; } static DFBResult primaryRemoveRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; X11LayerData *lds = layer_data; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); lds->shown = false; return DisplaySurface( x11, layer_data, shared->vdp_queue, NULL ); } static DFBResult primaryFlipRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, DFBSurfaceFlipFlags flags, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; X11LayerData *lds = layer_data; D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); dfb_surface_flip( surface, false ); lds->shown = true; return DisplaySurface( x11, layer_data, shared->vdp_queue, left_lock ); } static DFBResult primaryUpdateRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreSurface *surface, const DFBRegion *left_update, CoreSurfaceBufferLock *left_lock, const DFBRegion *right_update, CoreSurfaceBufferLock *right_lock ) { DFBX11 *x11 = driver_data; DFBX11Shared *shared = x11->shared; X11LayerData *lds = layer_data; DFBRegion region = DFB_REGION_INIT_FROM_DIMENSION( &surface->config.size ); D_DEBUG_AT( X11_Layer, "%s()\n", __FUNCTION__ ); if (left_update && !dfb_region_region_intersect( ®ion, left_update )) return DFB_OK; lds->shown = true; return DisplaySurface( x11, layer_data, shared->vdp_queue, left_lock ); } static DisplayLayerFuncs primaryLayerFuncs = { .LayerDataSize = primaryLayerDataSize, .RegionDataSize = primaryRegionDataSize, .InitLayer = primaryInitLayer, .TestRegion = primaryTestRegion, .AddRegion = primaryAddRegion, .SetRegion = primarySetRegion, .RemoveRegion = primaryRemoveRegion, .FlipRegion = primaryFlipRegion, .UpdateRegion = primaryUpdateRegion, }; DisplayLayerFuncs *x11PrimaryLayerFuncs = &primaryLayerFuncs; DirectFB-1.7.7/systems/x11vdpau/x11.h0000644000175000017500000001271012254435330014035 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __X11SYSTEM__X11_H__ #define __X11SYSTEM__X11_H__ #include #include #include #include #include #include #include #include #include "x11types.h" typedef struct { VdpDevice device; uint32_t api_version; const char *information_string; VdpGetProcAddress *GetProcAddress; VdpGetErrorString *GetErrorString; VdpGetApiVersion *GetApiVersion; VdpGetInformationString *GetInformationString; VdpPresentationQueueTargetCreateX11 *PresentationQueueTargetCreateX11; VdpPresentationQueueTargetDestroy *PresentationQueueTargetDestroy; VdpOutputSurfaceCreate *OutputSurfaceCreate; VdpOutputSurfaceDestroy *OutputSurfaceDestroy; VdpOutputSurfaceGetBitsNative *OutputSurfaceGetBitsNative; VdpOutputSurfacePutBitsNative *OutputSurfacePutBitsNative; VdpOutputSurfaceRenderOutputSurface *OutputSurfaceRenderOutputSurface; VdpPresentationQueueCreate *PresentationQueueCreate; VdpPresentationQueueDestroy *PresentationQueueDestroy; VdpPresentationQueueDisplay *PresentationQueueDisplay; VdpPresentationQueueGetTime *PresentationQueueGetTime; VdpPresentationQueueBlockUntilSurfaceIdle *PresentationQueueBlockUntilSurfaceIdle; } DFBX11VDPAU; typedef struct { FusionSkirmish lock; FusionCall call; CoreSurfacePool *vdpau_pool; DFBDimension screen_size; Window window; int depth; VdpPresentationQueueTarget vdp_target; VdpPresentationQueue vdp_queue; VdpOutputSurface vdp_surface; CoreSurface *vdp_core_surface; } DFBX11Shared; struct __DFB_X11 { DFBX11Shared *shared; CoreDFB *core; CoreScreen *screen; Display *display; Screen *screenptr; int screennum; Visual *visuals[DFB_NUM_PIXELFORMATS]; DFBX11VDPAU vdp; }; typedef enum { X11_VDPAU_OUTPUT_SURFACE_CREATE, X11_VDPAU_OUTPUT_SURFACE_DESTROY, X11_VDPAU_OUTPUT_SURFACE_GET_BITS_NATIVE, X11_VDPAU_OUTPUT_SURFACE_PUT_BITS_NATIVE, X11_VDPAU_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE, X11_VDPAU_PRESENTATION_QUEUE_DISPLAY, } DFBX11Call; typedef struct { VdpRGBAFormat rgba_format; uint32_t width; uint32_t height; } DFBX11CallOutputSurfaceCreate; typedef struct { VdpOutputSurface surface; } DFBX11CallOutputSurfaceDestroy; typedef struct { VdpOutputSurface surface; VdpRect source_rect; void *ptr; unsigned int pitch; } DFBX11CallOutputSurfaceGetBitsNative; typedef struct { VdpOutputSurface surface; const void *ptr; unsigned int pitch; VdpRect destination_rect; } DFBX11CallOutputSurfacePutBitsNative; typedef struct { VdpOutputSurface destination_surface; VdpRect destination_rect; VdpOutputSurface source_surface; VdpRect source_rect; VdpColor color; VdpOutputSurfaceRenderBlendState blend_state; uint32_t flags; } DFBX11CallOutputSurfaceRenderOutputSurface; typedef struct { VdpPresentationQueue presentation_queue; VdpOutputSurface surface; uint32_t clip_width; uint32_t clip_height; VdpTime earliest_presentation_time; } DFBX11CallPresentationQueueDisplay; #endif //__X11SYSTEM__X11_H__ DirectFB-1.7.7/systems/x11vdpau/x11.c0000644000175000017500000005247112254435330014040 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "primary.h" #include "x11.h" #include "x11vdpau_surface_pool.h" #include D_DEBUG_DOMAIN( X11_Core, "X11/Core", "Main X11 system functions" ); DFB_CORE_SYSTEM( x11vdpau ) static VideoMode modes[] = { { .xres = 320, .yres = 200 }, { .xres = 320, .yres = 240 }, { .xres = 512, .yres = 384 }, { .xres = 640, .yres = 480 }, { .xres = 768, .yres = 576 }, { .xres = 1024, .yres = 576 }, // 16:9 { .xres = 1024, .yres = 600 }, // Where does that mode come from? :-) { .xres = 1024, .yres = 768 }, // 4:3 { .xres = 1280, .yres = 720 }, // 16:9 { .xres = 1280, .yres = 960 }, // 4:3 { .xres = 1280, .yres = 1024 }, // 5:4 { .xres = 1440, .yres = 810 }, // 16:9 { .xres = 1440, .yres = 1080 }, // 4:3 { .xres = 1600, .yres = 900 }, // 16:9, obviously :) { .xres = 1600, .yres = 1200 }, // 4:3 { .xres = 1920, .yres = 1080 }, // 16:9 { .xres = 1920, .yres = 1200 }, // 16:10 { .xres = 0, .yres = 0 } }; /**********************************************************************************************************************/ static FusionCallHandlerResult X11_VDPAU_Dispatch( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ); /**********************************************************************************************************************/ static DFBResult InitLocal( DFBX11 *x11, DFBX11Shared *shared, CoreDFB *core ) { int i, n, d; XInitThreads(); x11->shared = shared; x11->core = core; x11->display = XOpenDisplay(getenv("DISPLAY")); if (!x11->display) { D_ERROR("X11: Error in XOpenDisplay for '%s'\n", getenv("DISPLAY")); return DFB_INIT; } x11->screenptr = DefaultScreenOfDisplay(x11->display); x11->screennum = DefaultScreen(x11->display); d = DefaultDepthOfScreen(x11->screenptr); for (i=0; iscreenptr->ndepths; i++) { const Depth *depth = &x11->screenptr->depths[i]; for (n=0; nnvisuals; n++) { Visual *visual = &depth->visuals[n]; D_DEBUG_AT( X11_Core, "[Visual %d] ID 0x%02lx, depth %d, RGB 0x%06lx/0x%06lx/0x%06lx, %d bpRGB, %d entr.\n", n, visual->visualid, depth->depth, visual->red_mask, visual->green_mask, visual->blue_mask, visual->bits_per_rgb, visual->map_entries ); if (depth->depth != d) continue; switch (depth->depth) { case 32: if (visual->red_mask == 0xff0000 && visual->green_mask == 0x00ff00 && visual->blue_mask == 0x0000ff && !x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_ARGB)]) x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_ARGB)] = visual; break; case 24: if (visual->red_mask == 0xff0000 && visual->green_mask == 0x00ff00 && visual->blue_mask == 0x0000ff && !x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB32)]) x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB32)] = visual; break; case 16: if (visual->red_mask == 0xf800 && visual->green_mask == 0x07e0 && visual->blue_mask == 0x001f && !x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB16)]) x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB16)] = visual; break; case 15: if (visual->red_mask == 0x7c00 && visual->green_mask == 0x03e0 && visual->blue_mask == 0x001f && !x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB555)]) x11->visuals[DFB_PIXELFORMAT_INDEX(DSPF_RGB555)] = visual; break; } } } /* * VDPAU */ VdpStatus status; status = vdp_device_create_x11( x11->display, x11->screennum, &x11->vdp.device, &x11->vdp.GetProcAddress ); if (status) { D_ERROR( "DirectFB/X11/VDPAU: vdp_device_create_x11() failed (status %d)!\n", status ); return DFB_INIT; } struct { VdpFuncId name; void **func; } funcs[] = { { VDP_FUNC_ID_GET_ERROR_STRING, (void**) &x11->vdp.GetErrorString }, { VDP_FUNC_ID_GET_API_VERSION, (void**) &x11->vdp.GetApiVersion }, { VDP_FUNC_ID_GET_INFORMATION_STRING, (void**) &x11->vdp.GetInformationString }, { VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_CREATE_X11, (void**) &x11->vdp.PresentationQueueTargetCreateX11 }, { VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_DESTROY, (void**) &x11->vdp.PresentationQueueTargetDestroy }, { VDP_FUNC_ID_OUTPUT_SURFACE_CREATE, (void**) &x11->vdp.OutputSurfaceCreate }, { VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY, (void**) &x11->vdp.OutputSurfaceDestroy }, { VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE, (void**) &x11->vdp.OutputSurfaceGetBitsNative }, { VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_NATIVE, (void**) &x11->vdp.OutputSurfacePutBitsNative }, { VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE, (void**) &x11->vdp.OutputSurfaceRenderOutputSurface }, { VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE, (void**) &x11->vdp.PresentationQueueCreate }, { VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY, (void**) &x11->vdp.PresentationQueueDestroy }, { VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY, (void**) &x11->vdp.PresentationQueueDisplay }, { VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME, (void**) &x11->vdp.PresentationQueueGetTime }, { VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE, (void**) &x11->vdp.PresentationQueueBlockUntilSurfaceIdle }, }; for (i=0; ivdp.GetProcAddress( x11->vdp.device, funcs[i].name, funcs[i].func ); if (status) { D_ERROR( "DirectFB/X11/VDPAU: GetProcAddress( %u ) failed (status %d, '%s')!\n", funcs[i].name, status, (i > 0) ? x11->vdp.GetErrorString( status ) : "" ); return DFB_INIT; } } x11->vdp.GetApiVersion( &x11->vdp.api_version ); x11->vdp.GetInformationString( &x11->vdp.information_string ); D_INFO( "DirectFB/X11/VDPAU: API version %d - '%s'\n", x11->vdp.api_version, x11->vdp.information_string ); x11->screen = dfb_screens_register( NULL, x11, x11PrimaryScreenFuncs ); dfb_layers_register( x11->screen, x11, x11PrimaryLayerFuncs ); dfb_layers_register( x11->screen, x11, x11PrimaryLayerFuncs ); dfb_layers_register( x11->screen, x11, x11PrimaryLayerFuncs ); return DFB_OK; } /**********************************************************************************************************************/ static void system_get_info( CoreSystemInfo *info ) { info->type = CORE_X11VDPAU; info->caps = CSCAPS_ACCELERATION | CSCAPS_PREFER_SHM; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); snprintf( info->name, DFB_CORE_SYSTEM_INFO_NAME_LENGTH, "X11" ); } static DFBResult system_initialize( CoreDFB *core, void **data ) { DFBResult ret; DFBX11 *x11; DFBX11Shared *shared; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); x11 = D_CALLOC( 1, sizeof(DFBX11) ); if (!x11) return D_OOM(); shared = SHCALLOC( dfb_core_shmpool( core ), 1, sizeof(DFBX11Shared) ); if (!shared) { D_FREE( x11 ); return D_OOSHM(); } /* * Local init (master and slave) */ ret = InitLocal( x11, shared, core ); if (ret) { SHFREE( dfb_core_shmpool( core ), shared ); D_FREE( x11 ); return ret; } /* * Shared init (master only) */ shared->screen_size.w = dfb_config->mode.width ?: x11->screenptr->width; shared->screen_size.h = dfb_config->mode.height ?: x11->screenptr->height; fusion_skirmish_init( &shared->lock, "X11 System", dfb_core_world(core) ); fusion_call_init( &shared->call, X11_VDPAU_Dispatch, x11, dfb_core_world(core) ); /* * Must be set before initializing the pools! */ *data = x11; /* * Master init */ dfb_surface_pool_initialize( core, x11vdpauSurfacePoolFuncs, &shared->vdpau_pool ); core_arena_add_shared_field( core, "x11", shared ); return DFB_OK; } static DFBResult system_join( CoreDFB *core, void **data ) { DFBResult ret; void *ptr; DFBX11 *x11; DFBX11Shared *shared; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); x11 = D_CALLOC( 1, sizeof(DFBX11) ); if (!x11) return D_OOM(); core_arena_get_shared_field( core, "x11", &ptr ); shared = ptr; /* * Local init (master and slave) */ ret = InitLocal( x11, shared, core ); if (ret) { D_FREE( x11 ); return ret; } /* * Must be set before joining the pools! */ *data = x11; /* * Slave init */ if (shared->vdpau_pool) dfb_surface_pool_join( core, shared->vdpau_pool, x11vdpauSurfacePoolFuncs ); return DFB_OK; } static DFBResult system_shutdown( bool emergency ) { DFBX11 *x11 = dfb_system_data(); DFBX11Shared *shared = x11->shared; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); /* * Master deinit */ if (shared->vdpau_pool) dfb_surface_pool_destroy( shared->vdpau_pool ); /* * Shared deinit (master only) */ fusion_call_destroy( &shared->call ); fusion_skirmish_prevail( &shared->lock ); fusion_skirmish_destroy( &shared->lock ); SHFREE( dfb_core_shmpool( x11->core ), shared ); /* * Local deinit (master and slave) */ if (x11->display) XCloseDisplay( x11->display ); D_FREE( x11 ); return DFB_OK; } static DFBResult system_leave( bool emergency ) { DFBX11 *x11 = dfb_system_data(); DFBX11Shared *shared = x11->shared; D_DEBUG_AT( X11_Core, "%s()\n", __FUNCTION__ ); /* * Slave deinit */ if (shared->vdpau_pool) dfb_surface_pool_leave( shared->vdpau_pool ); /* * Local deinit (master and slave) */ if (x11->display) XCloseDisplay( x11->display ); D_FREE( x11 ); return DFB_OK; } static DFBResult system_suspend( void ) { return DFB_UNIMPLEMENTED; } static DFBResult system_resume( void ) { return DFB_UNIMPLEMENTED; } static volatile void * system_map_mmio( unsigned int offset, int length ) { return NULL; } static void system_unmap_mmio( volatile void *addr, int length ) { } static int system_get_accelerator( void ) { return dfb_config->accelerator; } static VideoMode * system_get_modes( void ) { return modes; } static VideoMode * system_get_current_mode( void ) { return &modes[0]; /* FIXME */ } static DFBResult system_thread_init( void ) { return DFB_OK; } static bool system_input_filter( CoreInputDevice *device, DFBInputEvent *event ) { return false; } static unsigned long system_video_memory_physical( unsigned int offset ) { return 0; } static void * system_video_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_videoram_length( void ) { return 0; } static unsigned long system_aux_memory_physical( unsigned int offset ) { return 0; } static void * system_aux_memory_virtual( unsigned int offset ) { return NULL; } static unsigned int system_auxram_length( void ) { return 0; } static void system_get_busid( int *ret_bus, int *ret_dev, int *ret_func ) { } static int system_surface_data_size( void ) { /* Return zero because shared surface data is unneeded. */ return 0; } static void system_surface_data_init( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } static void system_surface_data_destroy( CoreSurface *surface, void *data ) { /* Ignore since unneeded. */ } static void system_get_deviceid( unsigned int *ret_vendor_id, unsigned int *ret_device_id ) { } /**********************************************************************************************************************/ static int X11_VDPAU_Dispatch_OutputSurfaceCreate( DFBX11 *x11, DFBX11CallOutputSurfaceCreate *create ) { DFBX11VDPAU *vdp = &x11->vdp; VdpStatus status; VdpOutputSurface surface; status = vdp->OutputSurfaceCreate( vdp->device, create->rgba_format, create->width, create->height, &surface ); if (status) { D_ERROR( "DirectFB/X11/VDPAU: OutputSurfaceCreate( format %u, size %dx%d ) failed (status %d, '%s'!\n", create->rgba_format, create->width, create->height, status, vdp->GetErrorString( status ) ); return 0; } return (int) surface; } static int X11_VDPAU_Dispatch_OutputSurfaceDestroy( DFBX11 *x11, DFBX11CallOutputSurfaceDestroy *destroy ) { DFBX11VDPAU *vdp = &x11->vdp; VdpStatus status; status = vdp->OutputSurfaceDestroy( destroy->surface ); if (status) D_ERROR( "DirectFB/X11/VDPAU: OutputSurfaceDestroy( %u ) failed (status %d, '%s'!\n", destroy->surface, status, vdp->GetErrorString( status ) ); return (int) status; } static int X11_VDPAU_Dispatch_OutputSurfaceGetBitsNative( DFBX11 *x11, DFBX11CallOutputSurfaceGetBitsNative *get ) { if (!fusion_is_shared( dfb_core_world(x11->core), get->ptr )) { D_ERROR( "DirectFB/X11/VDPAU: Pointer (%p) is not shared, discarding OutputSurfaceGetBitsNative()!\n", get->ptr ); return 0; } DFBX11VDPAU *vdp = &x11->vdp; VdpStatus status; status = vdp->OutputSurfaceGetBitsNative( get->surface, &get->source_rect, &get->ptr, &get->pitch ); if (status) D_ERROR( "DirectFB/X11/VDPAU: OutputSurfaceGetBitsNative( surface %u ) failed (status %d, '%s'!\n", get->surface, status, vdp->GetErrorString( status ) ); return (int) status; } static int X11_VDPAU_Dispatch_OutputSurfacePutBitsNative( DFBX11 *x11, DFBX11CallOutputSurfacePutBitsNative *put ) { if (!fusion_is_shared( dfb_core_world(x11->core), put->ptr )) { D_ERROR( "DirectFB/X11/VDPAU: Pointer (%p) is not shared, discarding OutputSurfacePutBitsNative()!\n", put->ptr ); return 0; } DFBX11VDPAU *vdp = &x11->vdp; VdpStatus status; status = vdp->OutputSurfacePutBitsNative( put->surface, (void const * const *) &put->ptr, &put->pitch, &put->destination_rect ); if (status) D_ERROR( "DirectFB/X11/VDPAU: OutputSurfacePutBitsNative( surface %u ) failed (status %d, '%s'!\n", put->surface, status, vdp->GetErrorString( status ) ); return (int) status; } static int X11_VDPAU_Dispatch_OutputSurfaceRenderOutputSurface( DFBX11 *x11, DFBX11CallOutputSurfaceRenderOutputSurface *render ) { DFBX11VDPAU *vdp = &x11->vdp; VdpStatus status; status = vdp->OutputSurfaceRenderOutputSurface( render->destination_surface, &render->destination_rect, render->source_surface, &render->source_rect, &render->color, &render->blend_state, render->flags ); if (status) D_ERROR( "DirectFB/X11/VDPAU: OutputSurfaceRenderOutputSurface( dest %u, source %u ) failed (status %d, '%s'!\n", render->destination_surface, render->source_surface, status, vdp->GetErrorString( status ) ); return (int) status; } static int X11_VDPAU_Dispatch_PresentationQueueDisplay( DFBX11 *x11, DFBX11CallPresentationQueueDisplay *display ) { DFBX11VDPAU *vdp = &x11->vdp; VdpStatus status; status = vdp->PresentationQueueDisplay( display->presentation_queue, display->surface, display->clip_width, display->clip_height, display->earliest_presentation_time ); if (status) D_ERROR( "DirectFB/X11/VDPAU: PresentationQueueDisplay( queue %u, surface %u ) failed (status %d, '%s'!\n", display->presentation_queue, display->surface, status, vdp->GetErrorString( status ) ); return (int) status; } static FusionCallHandlerResult X11_VDPAU_Dispatch( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { DFBX11 *x11 = ctx; XLockDisplay( x11->display ); switch (call_arg) { case X11_VDPAU_OUTPUT_SURFACE_CREATE: *ret_val = X11_VDPAU_Dispatch_OutputSurfaceCreate( x11, call_ptr ); break; case X11_VDPAU_OUTPUT_SURFACE_DESTROY: *ret_val = X11_VDPAU_Dispatch_OutputSurfaceDestroy( x11, call_ptr ); break; case X11_VDPAU_OUTPUT_SURFACE_GET_BITS_NATIVE: *ret_val = X11_VDPAU_Dispatch_OutputSurfaceGetBitsNative( x11, call_ptr ); break; case X11_VDPAU_OUTPUT_SURFACE_PUT_BITS_NATIVE: *ret_val = X11_VDPAU_Dispatch_OutputSurfacePutBitsNative( x11, call_ptr ); break; case X11_VDPAU_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE: *ret_val = X11_VDPAU_Dispatch_OutputSurfaceRenderOutputSurface( x11, call_ptr ); break; case X11_VDPAU_PRESENTATION_QUEUE_DISPLAY: *ret_val = X11_VDPAU_Dispatch_PresentationQueueDisplay( x11, call_ptr ); break; default: D_BUG( "unknown call" ); *ret_val = DFB_BUG; break; } XUnlockDisplay( x11->display ); return FCHR_RETURN; } DirectFB-1.7.7/systems/x11vdpau/Makefile.am0000644000175000017500000000164212171403127015306 00000000000000# Makefile.am for DirectFB/systems/x11vdpau INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/gfxdrivers \ $(X11VDPAU_CFLAGS) x11vdpau_includedir = $(includedir)/directfb-internal/x11vdpau systemsdir = $(MODULEDIR)/systems if BUILD_STATIC systems_DATA = libdirectfb_x11vdpau.o endif systems_LTLIBRARIES = libdirectfb_x11vdpau.la libdirectfb_x11vdpau_la_LDFLAGS = \ $(X11VDPAU_LIBS) \ -avoid-version \ -module x11vdpau_include_HEADERS = \ primary.h \ x11.h \ x11vdpau_surface_pool.h \ x11types.h libdirectfb_x11vdpau_la_SOURCES = \ primary.c \ x11.c \ x11input.c \ x11vdpau_surface_pool.c libdirectfb_x11vdpau_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la include $(top_srcdir)/rules/libobject.make DirectFB-1.7.7/systems/x11vdpau/primary.h0000644000175000017500000000321112254435330015103 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __X11__PRIMARY_H__ #define __X11__PRIMARY_H__ #include #include extern ScreenFuncs *x11PrimaryScreenFuncs; extern DisplayLayerFuncs *x11PrimaryLayerFuncs; typedef struct { int layer_id; bool shown; CoreLayerRegionConfig config; } X11LayerData; #endif // __X11__PRIMARY_H__ DirectFB-1.7.7/systems/x11vdpau/Makefile.in0000644000175000017500000007031112466665317015340 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ # Makefile.am for DirectFB/systems/x11vdpau VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ $(x11vdpau_include_HEADERS) README subdir = systems/x11vdpau ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" \ "$(DESTDIR)$(x11vdpau_includedir)" LTLIBRARIES = $(systems_LTLIBRARIES) libdirectfb_x11vdpau_la_DEPENDENCIES = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la am_libdirectfb_x11vdpau_la_OBJECTS = primary.lo x11.lo x11input.lo \ x11vdpau_surface_pool.lo libdirectfb_x11vdpau_la_OBJECTS = \ $(am_libdirectfb_x11vdpau_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirectfb_x11vdpau_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdirectfb_x11vdpau_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirectfb_x11vdpau_la_SOURCES) DIST_SOURCES = $(libdirectfb_x11vdpau_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systems_DATA) HEADERS = $(x11vdpau_include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/gfxdrivers \ $(X11VDPAU_CFLAGS) x11vdpau_includedir = $(includedir)/directfb-internal/x11vdpau systemsdir = $(MODULEDIR)/systems @BUILD_STATIC_TRUE@systems_DATA = libdirectfb_x11vdpau.o systems_LTLIBRARIES = libdirectfb_x11vdpau.la libdirectfb_x11vdpau_la_LDFLAGS = \ $(X11VDPAU_LIBS) \ -avoid-version \ -module x11vdpau_include_HEADERS = \ primary.h \ x11.h \ x11vdpau_surface_pool.h \ x11types.h libdirectfb_x11vdpau_la_SOURCES = \ primary.c \ x11.c \ x11input.c \ x11vdpau_surface_pool.c libdirectfb_x11vdpau_la_LIBADD = \ $(top_builddir)/lib/direct/libdirect.la \ $(top_builddir)/lib/fusion/libfusion.la \ $(top_builddir)/src/libdirectfb.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systems/x11vdpau/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu systems/x11vdpau/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libobject.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-systemsLTLIBRARIES: $(systems_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(systemsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(systemsdir)"; \ } uninstall-systemsLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(systems_LTLIBRARIES)'; test -n "$(systemsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(systemsdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(systemsdir)/$$f"; \ done clean-systemsLTLIBRARIES: -test -z "$(systems_LTLIBRARIES)" || rm -f $(systems_LTLIBRARIES) @list='$(systems_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirectfb_x11vdpau.la: $(libdirectfb_x11vdpau_la_OBJECTS) $(libdirectfb_x11vdpau_la_DEPENDENCIES) $(EXTRA_libdirectfb_x11vdpau_la_DEPENDENCIES) $(AM_V_CCLD)$(libdirectfb_x11vdpau_la_LINK) -rpath $(systemsdir) $(libdirectfb_x11vdpau_la_OBJECTS) $(libdirectfb_x11vdpau_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11vdpau_surface_pool.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-systemsDATA: $(systems_DATA) @$(NORMAL_INSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemsdir)" || exit $$?; \ done uninstall-systemsDATA: @$(NORMAL_UNINSTALL) @list='$(systems_DATA)'; test -n "$(systemsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemsdir)'; $(am__uninstall_files_from_dir) install-x11vdpau_includeHEADERS: $(x11vdpau_include_HEADERS) @$(NORMAL_INSTALL) @list='$(x11vdpau_include_HEADERS)'; test -n "$(x11vdpau_includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(x11vdpau_includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(x11vdpau_includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(x11vdpau_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(x11vdpau_includedir)" || exit $$?; \ done uninstall-x11vdpau_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(x11vdpau_include_HEADERS)'; test -n "$(x11vdpau_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(x11vdpau_includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(systemsdir)" "$(DESTDIR)$(x11vdpau_includedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-systemsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-systemsDATA install-systemsLTLIBRARIES \ install-x11vdpau_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-systemsDATA uninstall-systemsLTLIBRARIES \ uninstall-x11vdpau_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-systemsLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip install-systemsDATA \ install-systemsLTLIBRARIES install-x11vdpau_includeHEADERS \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-systemsDATA \ uninstall-systemsLTLIBRARIES uninstall-x11vdpau_includeHEADERS %.o: .libs/%.a %.la rm -f $<.tmp/*.o if test -d $<.tmp; then rmdir $<.tmp; fi mkdir $<.tmp (cd $<.tmp && $(AR) x ../../$<) $(LD) -o $@ -r $<.tmp/*.o rm -f $<.tmp/*.o && rmdir $<.tmp .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) # 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: DirectFB-1.7.7/systems/x11vdpau/x11types.h0000644000175000017500000000261512254435330015125 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __SYSTEMS_X11TYPES_H__ #define __SYSTEMS_X11TYPES_H__ typedef struct __DFB_X11 DFBX11; #endif /* __SYSTEMS_X11TYPES_H__ */ DirectFB-1.7.7/tests/0000755000175000017500000000000012466665356011336 500000000000000DirectFB-1.7.7/tests/sample1.c0000644000175000017500000000760012254435330012745 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #define CHECK(x) \ do { \ DFBResult ret = (x); \ if (ret != DFB_OK) { \ DirectFBError(#x,ret); \ goto out; \ } \ } while (0) static DirectResult start_request( void *context, const char *name, pid_t *ret_pid ) { D_INFO( "SaWMan/Sample1: Start request for '%s'!\n", name ); return DFB_UNIMPLEMENTED; } static DirectResult stop_request( void *context, pid_t pid, FusionID caller ) { D_INFO( "SaWMan/Sample1: Stop request from Fusion ID 0x%lx for pid %d!\n", caller, pid ); return DFB_OK; } static DirectResult process_added( void *context, SaWManProcess *process ) { D_INFO( "SaWMan/Sample1: Process added (%d) [%lu]!\n", process->pid, process->fusion_id ); return DFB_OK; } static DirectResult process_removed( void *context, SaWManProcess *process ) { D_INFO( "SaWMan/Sample1: Process removed (%d) [%lu]!\n", process->pid, process->fusion_id ); return DFB_OK; } static const SaWManCallbacks callbacks = { Start: start_request, Stop: stop_request, ProcessAdded: process_added, ProcessRemoved: process_removed }; int main( int argc, char** argv ) { IDirectFB *dfb = NULL; ISaWMan *saw = NULL; ISaWManManager *manager = NULL; D_INFO( "SaWMan/Sample1: Initializing...\n" ); CHECK( DirectFBInit( &argc, &argv ) ); CHECK( DirectFBCreate( &dfb ) ); CHECK( SaWManCreate( &saw ) ); CHECK( saw->CreateManager( saw, &callbacks, NULL, &manager ) ); pause(); out: D_INFO( "SaWMan/Sample1: Shutting down...\n" ); if (manager) manager->Release( manager ); if (saw) saw->Release( saw ); if (dfb) dfb->Release( dfb ); return 0; } DirectFB-1.7.7/tests/coretest_task.cpp0000644000175000017500000001662412463500054014621 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include // include here to prevent it being included indirectly causing nested extern "C" #include extern "C" { #include #include #include #include #include #include #include #include #include } #include #include #include D_DEBUG_DOMAIN( Test_MyEngine, "Test/MyEngine", "Test MyEngine" ); D_DEBUG_DOMAIN( Test_MyTask, "Test/MyTask", "Test MyTask" ); class LockTask : public DirectFB::SurfaceTask { public: LockTask() : SurfaceTask( CSAID_CPU ), pushed( false ) { direct_mutex_init( &lock ); direct_waitqueue_init( &wq ); } virtual ~LockTask() { direct_mutex_deinit( &lock ); direct_waitqueue_deinit( &wq ); } void Wait() { direct_mutex_lock( &lock ); while (!pushed) direct_waitqueue_wait( &wq, &lock ); direct_mutex_unlock( &lock ); } protected: virtual DFBResult Push() { direct_mutex_lock( &lock ); pushed = true; direct_waitqueue_broadcast( &wq ); direct_mutex_unlock( &lock ); return DFB_OK; } virtual DFBResult Run() { return DFB_OK; } private: DirectMutex lock; DirectWaitQueue wq; bool pushed; }; int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb; DFBSurfaceDescription desc; IDirectFBSurface *dest; IDirectFBSurface_data *dest_data; CoreDFB *core; CoreSurface *dst; CardState state; DirectFB::Renderer *renderer; LockTask *lock_task; CoreSurfaceBuffer *buffer; CoreSurfaceAllocation *allocation; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "CoreTest/Blit2: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "CoreTest/Blit2: DirectFBCreate() failed!\n" ); return ret; } /* Fill description for a primary surface. */ desc.flags = (DFBSurfaceDescriptionFlags)( DSDESC_PIXELFORMAT | DSDESC_CAPS ); desc.caps = (DFBSurfaceCapabilities)( DSCAPS_PRIMARY | DSCAPS_FLIPPING ); desc.pixelformat = DSPF_ARGB; dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/FillRectangle: IDirectFB::CreateSurface() failed!\n" ); goto error_dest; } dest->GetSize( dest, &desc.width, &desc.height ); dest->GetPixelFormat( dest, &desc.pixelformat ); D_INFO( "DFBTest/FillRectangle: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); dfb_core_create( &core ); dest_data = (IDirectFBSurface_data *)dest->priv; dst = dest_data->surface; long long ms; ms = direct_clock_get_abs_millis(); while (true) { long long now; dfb_surface_lock( dst ); buffer = dfb_surface_get_buffer3( dst, CSBR_BACK, DSSE_LEFT, dst->flips ); dfb_surface_unlock( dst ); dfb_state_init( &state, core ); dfb_state_set_destination( &state, dst ); dfb_state_set_source( &state, dst ); renderer = new DirectFB::Renderer( &state, NULL ); for (int i=0; i<5; i++) { DFBColor color = { (u8)rand(), (u8)rand(), (u8)rand(), (u8)rand() }; dfb_state_set_color( &state, &color ); DFBRectangle rect = { rand()%100, rand()%100, rand()%100, rand()%100 }; renderer->FillRectangles( &rect, 1 ); } DFBRectangle rect = { rand()%100, rand()%100, rand()%100, rand()%100 }; DFBPoint point = { rand()%100, rand()%100 }; renderer->Blit( &rect, &point, 1 ); renderer->Flush(); dfb_surface_lock( dst ); allocation = dfb_surface_buffer_find_allocation( buffer, CSAID_CPU, CSAF_READ, true ); if (!allocation) { /* If no allocation exists, create one. */ ret = dfb_surface_pools_allocate( buffer, CSAID_CPU, CSAF_READ, &allocation ); if (ret) { D_DERROR( ret, "Core/SurfBuffer: Buffer allocation failed!\n" ); _exit(0); } } dfb_surface_unlock( dst ); lock_task = new LockTask(); lock_task->AddAccess( allocation, CSAF_READ ); lock_task->Flush(); D_INFO( "Waiting...\n" ); lock_task->Wait(); D_INFO( "Done.\n" ); lock_task->Done(); dest->Flip( dest, NULL, DSFLIP_NONE ); //sleep(5); now = direct_clock_get_abs_millis(); D_INFO( "Took %lld ms\n", now - ms ); ms = now; delete renderer; dfb_state_set_destination( &state, NULL ); dfb_state_set_source( &state, NULL ); dfb_state_destroy( &state ); } //error: dfb_core_destroy( core, false ); dest->Release( dest ); error_dest: /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_window_surface.c0000644000175000017500000000712112254435330016133 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb; IDirectFBDisplayLayer *layer; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Window_Surface: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "DFBTest/Window_Surface: DirectFBCreate() failed!\n" ); return ret; } dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ); while (true) { DFBWindowDescription desc; IDirectFBWindow *window; IDirectFBSurface *surface; desc.flags = DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_CAPS; desc.posx = 150; desc.posy = 150; desc.width = 300; desc.height = 300; desc.caps = DWCAPS_ALPHACHANNEL; ret = layer->CreateWindow( layer, &desc, &window ); if (ret) { D_DERROR( ret, "DFBTest/Window_Surface: CreateWindow() failed!\n" ); return ret; } window->GetSurface( window, &surface ); D_INFO( "Created window and surface, going to release window... (in 2 seconds)\n" ); direct_thread_sleep( 2000000 ); D_INFO("Releasing window...\n"); window->Release( window ); D_INFO("Window released, going to release surface... (in 2 seconds)\n"); direct_thread_sleep( 2000000 ); D_INFO("Releasing surface...\n"); surface->Release( surface ); D_INFO("Surface released, done.\n"); direct_thread_sleep( 5000000 ); } /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_init.c0000644000175000017500000000457212254435330014066 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Init: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "DFBTest/Init: DirectFBCreate() failed!\n" ); return ret; } /* Shutdown DirectFB. */ ret = dfb->Release( dfb ); if (ret) { D_DERROR( ret, "DFBTest/Init: IDirectFB::Release() failed!\n" ); return ret; } return 0; } DirectFB-1.7.7/tests/direct_test.c0000644000175000017500000001052212254435330013711 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include D_DEBUG_DOMAIN( Direct_Test, "Direct/Test", "Direct Test" ); /**********************************************************************************************************************/ static int show_usage( const char *name ) { fprintf( stderr, "Usage: %s [-f ] [-u :]\n", name ); return -1; } int main( int argc, char *argv[] ) { int i; DirectResult ret; DirectLogType log_type = DLT_STDERR; const char *log_param = NULL; DirectLog *log; for (i=1; idebug = true; direct_print_memleaks(); return 0; } DirectFB-1.7.7/tests/voodoo_bench_client.c0000644000175000017500000001025012254435330015400 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define BENCH_SYNC 0 #define VOODOOTEST_METHOD_ID_Push 1 #define VOODOOTEST_METHOD_ID_Sync 2 /**********************************************************************************************************************/ #if BENCH_SYNC #define NUM_ITEMS 200000 #else #define NUM_ITEMS 20000000 #endif int main( int argc, char *argv[] ) { DirectClock clock; int counter = 0; dfb_config_init( &argc, &argv ); /* Initialize libdirect. */ direct_initialize(); VoodooLink link; VoodooManager *manager; const char *hostname = argv[1] ?: "127.0.0.1"; voodoo_link_init_connect( &link, hostname, 23239, false ); voodoo_manager_create( &link, NULL, NULL, &manager ); direct_clock_start( &clock ); #if !BENCH_SYNC do { voodoo_manager_request( manager, 1, VOODOOTEST_METHOD_ID_Push, VREQ_QUEUE, NULL, VMBT_INT, counter++, VMBT_NONE ); } while (counter < NUM_ITEMS); #else do { VoodooResponseMessage *response; voodoo_manager_request( manager, 1, VOODOOTEST_METHOD_ID_Sync, VREQ_RESPOND, &response, VMBT_NONE ); voodoo_manager_finish_request( manager, response ); counter++; } while (counter < NUM_ITEMS); #endif { VoodooResponseMessage *response; voodoo_manager_request( manager, 1, VOODOOTEST_METHOD_ID_Sync, VREQ_RESPOND, &response, VMBT_NONE ); voodoo_manager_finish_request( manager, response ); } direct_clock_stop( &clock ); D_INFO( "Voodoo/Test: Stopped after %lld.%03lld seconds... (%lld items/sec)\n", DIRECT_CLOCK_DIFF_SEC_MS( &clock ), NUM_ITEMS * 1000000LL / direct_clock_diff( &clock ) ); /* Shutdown libdirect. */ direct_shutdown(); return 0; } DirectFB-1.7.7/tests/OneBench.c0000644000175000017500000002053212254435330013063 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "config.h" #include #include #include #include #include #include #include #include static int parse_cmdline ( int argc, char *argv[] ); static int show_usage ( void ); /**********************************************************************************************************************/ static OneQID queue_id; static bool server; static unsigned int data_length = 16000; typedef struct { OneQID response_qid; } TestRequest; typedef struct { DirectResult result; } TestResponse; #define NUM_ITEMS 30000 static void TestBandwidth( TestRequest *request ) { int i; DirectClock clock; char buf[512]; size_t received; long long KperSec; OneQID response_qid = request->response_qid; request->response_qid = 0; direct_clock_start( &clock ); for (i=0; iresponse_qid = response_qid; OneQueue_Dispatch( queue_id, request, sizeof(TestRequest) + data_length ); if (i == NUM_ITEMS-1) OneQueue_Receive( &request->response_qid, 1, buf, sizeof(buf), &received, false, 0 ); } direct_clock_stop( &clock ); KperSec = (long long) NUM_ITEMS * (long long) data_length * 1000LL / direct_clock_diff( &clock ); D_INFO( "OneBench/Bandwidth: Stopped after %lld.%03lld seconds... (%lld.%03lld MB/sec)\n", DIRECT_CLOCK_DIFF_SEC_MS( &clock ), KperSec / 1000, KperSec % 1000 ); } static void TestThroughputSync( TestRequest *request ) { int i; DirectClock clock; char buf[512]; size_t received; direct_clock_start( &clock ); for (i=0; iresponse_qid, 1, buf, sizeof(buf), &received, false, 0 ); } direct_clock_stop( &clock ); D_INFO( "OneBench/Throughput/Sync: Stopped after %lld.%03lld seconds... (%lld items/sec)\n", DIRECT_CLOCK_DIFF_SEC_MS( &clock ), NUM_ITEMS * 1000000ULL / direct_clock_diff( &clock ) ); } static void TestThroughputAsync( TestRequest *request ) { int i; DirectClock clock; char buf[512]; size_t received; OneQID response_qid = request->response_qid; request->response_qid = 0; direct_clock_start( &clock ); for (i=0; iresponse_qid = response_qid; OneQueue_Dispatch( queue_id, request, sizeof(TestRequest) ); if (i == NUM_ITEMS-1) OneQueue_Receive( &request->response_qid, 1, buf, sizeof(buf), &received, false, 0 ); } direct_clock_stop( &clock ); D_INFO( "OneBench/Throughput/Async: Stopped after %lld.%03lld seconds... (%lld items/sec)\n", DIRECT_CLOCK_DIFF_SEC_MS( &clock ), NUM_ITEMS * 1000000ULL / direct_clock_diff( &clock ) ); } static void TestLatency( TestRequest *request ) { int i, n; DirectClock clock; char buf[512]; size_t received; for (n=0; n<3; n++) { long long diff, best = 999999999; for (i=0; i<100; i++) { direct_clock_start( &clock ); OneQueue_DispatchReceive( queue_id, request, sizeof(TestRequest), &request->response_qid, 1, buf, sizeof(buf), &received, false, 0 ); direct_clock_stop( &clock ); diff = direct_clock_diff( &clock ); if (diff < best) best = diff; usleep( 10000 ); } D_INFO( "OneBench/Latency: Best latency %lld.%03lld milli seconds...\n", best / 1000, best % 1000 ); } } int main( int argc, char *argv[] ) { DirectResult ret; if (parse_cmdline( argc, argv )) return -1; ret = One_Initialize(); if (ret) return ret; if (queue_id && !server) { /* * Client mode */ TestRequest *request; request = D_MALLOC( sizeof(TestRequest) + data_length ); if (!request) return D_OOM(); ret = OneQueue_New( ONE_QUEUE_NO_FLAGS, ONE_QID_NONE, &request->response_qid ); if (ret) return ret; TestLatency( request ); TestThroughputSync( request ); TestThroughputAsync( request ); TestBandwidth( request ); } else { /* * Server mode */ size_t received; char *buf = malloc(128*1024); ret = OneQueue_New( ONE_QUEUE_NO_FLAGS, queue_id, &queue_id ); if (ret) { free( buf ); return ret; } D_INFO( "Server Queue ID %u, run client with '-q %u'\n", queue_id, queue_id ); while (true) { size_t i; ret = OneQueue_Receive( &queue_id, 1, buf, 128*1024, &received, false, 0 ); if (ret) { free( buf ); return ret; } for (i=0; isize + sizeof(OnePacketHeader); if (request->response_qid) { TestResponse response; response.result = DR_OK; OneQueue_Dispatch( request->response_qid, &response, sizeof(response) ); } } } free( buf ); } return 0; } /**********************************************************************************************************************/ static int parse_cmdline( int argc, char *argv[] ) { int i; for (i=1; i, Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include static void * window_loop1( DirectThread *thread, void *ctx ) { DFBResult ret; int i; DFBWindowDescription desc; IDirectFBDisplayLayer *layer = ctx; IDirectFBWindow *window; IDirectFBSurface *surface; D_INFO( "DFBTest/Window_FlipOnce: First thread starting...\n" ); desc.flags = DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_CAPS; desc.posx = 10; desc.posy = 10; desc.width = 400; desc.height = 400; desc.caps = DWCAPS_ALPHACHANNEL; ret = layer->CreateWindow( layer, &desc, &window ); if (ret) { D_DERROR( ret, "DFBTest/Window_FlipOnce: CreateWindow() failed!\n" ); return NULL; } window->GetSurface( window, &surface ); surface->Clear( surface, 0, 0, 0, 0 ); window->SetOpacity( window, 0xff ); sleep( 2 ); for (i=0; i<10; i++) { window->BeginUpdates( window, NULL ); surface->Clear( surface, 0xff, 0xff, 0xff, 0xff ); sleep( 1 ); surface->Clear( surface, 0xc0, 0x10, 0x40, 0xc0 ); surface->Flip( surface, NULL, DSFLIP_ONCE ); } surface->Release( surface ); window->Release( window ); D_INFO( "DFBTest/Window_FlipOnce: First thread stopped.\n" ); return NULL; } static void * window_loop2( DirectThread *thread, void *ctx ) { DFBResult ret; int i; DFBWindowDescription desc; IDirectFBDisplayLayer *layer = ctx; IDirectFBWindow *window; IDirectFBSurface *surface; D_INFO( "DFBTest/Window_FlipOnce: Second thread starting...\n" ); desc.flags = DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_CAPS; desc.posx = 150; desc.posy = 150; desc.width = 300; desc.height = 300; desc.caps = DWCAPS_ALPHACHANNEL; ret = layer->CreateWindow( layer, &desc, &window ); if (ret) { D_DERROR( ret, "DFBTest/Window_FlipOnce: CreateWindow() failed!\n" ); return NULL; } window->GetSurface( window, &surface ); surface->Clear( surface, 0, 0, 0, 0 ); window->SetOpacity( window, 0xff ); sleep( 1 ); for (i=0; i<10; i++) { window->BeginUpdates( window, NULL ); surface->Clear( surface, 0xff, 0xff, 0xff, 0xff ); sleep( 3 ); surface->Clear( surface, 0x10, 0x40, 0xc0, 0xc0 ); surface->Flip( surface, NULL, DSFLIP_ONCE ); } surface->Release( surface ); window->Release( window ); D_INFO( "DFBTest/Window_FlipOnce: Second thread stopped.\n" ); return NULL; } int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb; IDirectFBDisplayLayer *layer; DirectThread *thread1; DirectThread *thread2; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Window_FlipOnce: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "DFBTest/Window_FlipOnce: DirectFBCreate() failed!\n" ); return ret; } dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ); thread1 = direct_thread_create( DTT_DEFAULT, window_loop1, layer, "Window 1" ); thread2 = direct_thread_create( DTT_DEFAULT, window_loop2, layer, "Window 2" ); direct_thread_join( thread1 ); direct_thread_join( thread2 ); direct_thread_destroy( thread1 ); direct_thread_destroy( thread2 ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_gl2.c0000644000175000017500000006543612254435330013615 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #define GL_GLEXT_PROTOTYPES #include #define STRIPS_PER_TOOTH 7 #define VERTICES_PER_TOOTH 34 #define GEAR_VERTEX_STRIDE 6 /** * Struct describing the vertices in triangle strip */ struct vertex_strip { /** The first vertex in the strip */ GLint first; /** The number of consecutive vertices in the strip after the first */ GLint count; }; /* Each vertex consist of GEAR_VERTEX_STRIDE GLfloat attributes */ typedef GLfloat GearVertex[GEAR_VERTEX_STRIDE]; /** * Struct representing a gear. */ struct gear { /** The array of vertices comprising the gear */ GearVertex *vertices; /** The number of vertices comprising the gear */ int nvertices; /** The array of triangle strips comprising the gear */ struct vertex_strip *strips; /** The number of triangle strips comprising the gear */ int nstrips; /** The Vertex Buffer Object holding the vertices in the graphics card */ GLuint vbo; }; /** The view rotation [x, y, z] */ static GLfloat view_rot[3] = { 20.0, 30.0, 0.0 }; static GLfloat inc_rotx = 0, inc_roty = 0, inc_rotz = 0; /** The gears */ static struct gear *gear1, *gear2, *gear3; /** The current gear rotation angle */ static GLfloat angle = 0.0; /** The location of the shader uniforms */ static GLuint ModelViewProjectionMatrix_location, NormalMatrix_location, LightSourcePosition_location, MaterialColor_location; /** The projection matrix */ static GLfloat ProjectionMatrix[16]; /** The direction of the directional light for the scene */ static const GLfloat LightSourcePosition[4] = { 5.0, 5.0, 10.0, 1.0}; /** * Fills a gear vertex. * * @param v the vertex to fill * @param x the x coordinate * @param y the y coordinate * @param z the z coortinate * @param n pointer to the normal table * * @return the operation error code */ static GearVertex * vert(GearVertex *v, GLfloat x, GLfloat y, GLfloat z, GLfloat n[3]) { v[0][0] = x; v[0][1] = y; v[0][2] = z; v[0][3] = n[0]; v[0][4] = n[1]; v[0][5] = n[2]; return v + 1; } /** * Create a gear wheel. * * @param inner_radius radius of hole at center * @param outer_radius radius at center of teeth * @param width width of gear * @param teeth number of teeth * @param tooth_depth depth of tooth * * @return pointer to the constructed struct gear */ static struct gear * create_gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth) { GLfloat r0, r1, r2; GLfloat da; GearVertex *v; struct gear *gear; double s[5], c[5]; GLfloat normal[3]; int cur_strip = 0; int i; /* Allocate memory for the gear */ gear = malloc(sizeof *gear); if (gear == NULL) return NULL; /* Calculate the radii used in the gear */ r0 = inner_radius; r1 = outer_radius - tooth_depth / 2.0; r2 = outer_radius + tooth_depth / 2.0; da = 2.0 * M_PI / teeth / 4.0; /* Allocate memory for the triangle strip information */ gear->nstrips = STRIPS_PER_TOOTH * teeth; gear->strips = calloc(gear->nstrips, sizeof (*gear->strips)); /* Allocate memory for the vertices */ gear->vertices = calloc(VERTICES_PER_TOOTH * teeth, sizeof(*gear->vertices)); v = gear->vertices; for (i = 0; i < teeth; i++) { /* Calculate needed sin/cos for varius angles */ sincos(i * 2.0 * M_PI / teeth, &s[0], &c[0]); sincos(i * 2.0 * M_PI / teeth + da, &s[1], &c[1]); sincos(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]); sincos(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]); sincos(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]); /* A set of macros for making the creation of the gears easier */ #define GEAR_POINT(r, da) { (r) * c[(da)], (r) * s[(da)] } #define SET_NORMAL(x, y, z) do { \ normal[0] = (x); normal[1] = (y); normal[2] = (z); \ } while(0) #define GEAR_VERT(v, point, sign) vert((v), p[(point)].x, p[(point)].y, (sign) * width * 0.5, normal) #define START_STRIP do { \ gear->strips[cur_strip].first = v - gear->vertices; \ } while(0); #define END_STRIP do { \ int _tmp = (v - gear->vertices); \ gear->strips[cur_strip].count = _tmp - gear->strips[cur_strip].first; \ cur_strip++; \ } while (0) #define QUAD_WITH_NORMAL(p1, p2) do { \ SET_NORMAL((p[(p1)].y - p[(p2)].y), -(p[(p1)].x - p[(p2)].x), 0); \ v = GEAR_VERT(v, (p1), -1); \ v = GEAR_VERT(v, (p1), 1); \ v = GEAR_VERT(v, (p2), -1); \ v = GEAR_VERT(v, (p2), 1); \ } while(0) struct point { GLfloat x; GLfloat y; }; /* Create the 7 points (only x,y coords) used to draw a tooth */ struct point p[7] = { GEAR_POINT(r2, 1), // 0 GEAR_POINT(r2, 2), // 1 GEAR_POINT(r1, 0), // 2 GEAR_POINT(r1, 3), // 3 GEAR_POINT(r0, 0), // 4 GEAR_POINT(r1, 4), // 5 GEAR_POINT(r0, 4), // 6 }; /* Front face */ START_STRIP; SET_NORMAL(0, 0, 1.0); v = GEAR_VERT(v, 0, +1); v = GEAR_VERT(v, 1, +1); v = GEAR_VERT(v, 2, +1); v = GEAR_VERT(v, 3, +1); v = GEAR_VERT(v, 4, +1); v = GEAR_VERT(v, 5, +1); v = GEAR_VERT(v, 6, +1); END_STRIP; /* Inner face */ START_STRIP; QUAD_WITH_NORMAL(4, 6); END_STRIP; /* Back face */ START_STRIP; SET_NORMAL(0, 0, -1.0); v = GEAR_VERT(v, 6, -1); v = GEAR_VERT(v, 5, -1); v = GEAR_VERT(v, 4, -1); v = GEAR_VERT(v, 3, -1); v = GEAR_VERT(v, 2, -1); v = GEAR_VERT(v, 1, -1); v = GEAR_VERT(v, 0, -1); END_STRIP; /* Outer face */ START_STRIP; QUAD_WITH_NORMAL(0, 2); END_STRIP; START_STRIP; QUAD_WITH_NORMAL(1, 0); END_STRIP; START_STRIP; QUAD_WITH_NORMAL(3, 1); END_STRIP; START_STRIP; QUAD_WITH_NORMAL(5, 3); END_STRIP; } gear->nvertices = (v - gear->vertices); /* Store the vertices in a vertex buffer object (VBO) */ glGenBuffers(1, &gear->vbo); glBindBuffer(GL_ARRAY_BUFFER, gear->vbo); glBufferData(GL_ARRAY_BUFFER, gear->nvertices * sizeof(GearVertex), gear->vertices, GL_STATIC_DRAW); return gear; } /** * Multiplies two 4x4 matrices. * * The result is stored in matrix m. * * @param m the first matrix to multiply * @param n the second matrix to multiply */ static void multiply(GLfloat *m, const GLfloat *n) { GLfloat tmp[16]; const GLfloat *row, *column; div_t d; int i, j; for (i = 0; i < 16; i++) { tmp[i] = 0; d = div(i, 4); row = n + d.quot * 4; column = m + d.rem; for (j = 0; j < 4; j++) tmp[i] += row[j] * column[j * 4]; } memcpy(m, &tmp, sizeof tmp); } /** * Rotates a 4x4 matrix. * * @param[in,out] m the matrix to rotate * @param angle the angle to rotate * @param x the x component of the direction to rotate to * @param y the y component of the direction to rotate to * @param z the z component of the direction to rotate to */ static void rotate(GLfloat *m, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { double s, c; sincos(angle, &s, &c); GLfloat r[16] = { x * x * (1 - c) + c, y * x * (1 - c) + z * s, x * z * (1 - c) - y * s, 0, x * y * (1 - c) - z * s, y * y * (1 - c) + c, y * z * (1 - c) + x * s, 0, x * z * (1 - c) + y * s, y * z * (1 - c) - x * s, z * z * (1 - c) + c, 0, 0, 0, 0, 1 }; multiply(m, r); } /** * Translates a 4x4 matrix. * * @param[in,out] m the matrix to translate * @param x the x component of the direction to translate to * @param y the y component of the direction to translate to * @param z the z component of the direction to translate to */ static void translate(GLfloat *m, GLfloat x, GLfloat y, GLfloat z) { GLfloat t[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 1 }; multiply(m, t); } /** * Creates an identity 4x4 matrix. * * @param m the matrix make an identity matrix */ static void identity(GLfloat *m) { GLfloat t[16] = { 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, }; memcpy(m, t, sizeof(t)); } /** * Transposes a 4x4 matrix. * * @param m the matrix to transpose */ static void transpose(GLfloat *m) { GLfloat t[16] = { m[0], m[4], m[8], m[12], m[1], m[5], m[9], m[13], m[2], m[6], m[10], m[14], m[3], m[7], m[11], m[15]}; memcpy(m, t, sizeof(t)); } /** * Inverts a 4x4 matrix. * * This function can currently handle only pure translation-rotation matrices. * Read http://www.gamedev.net/community/forums/topic.asp?topic_id=425118 * for an explanation. */ static void invert(GLfloat *m) { GLfloat t[16]; identity(t); // Extract and invert the translation part 't'. The inverse of a // translation matrix can be calculated by negating the translation // coordinates. t[12] = -m[12]; t[13] = -m[13]; t[14] = -m[14]; // Invert the rotation part 'r'. The inverse of a rotation matrix is // equal to its transpose. m[12] = m[13] = m[14] = 0; transpose(m); // inv(m) = inv(r) * inv(t) multiply(m, t); } /** * Calculate a perspective projection transformation. * * @param m the matrix to save the transformation in * @param fovy the field of view in the y direction * @param aspect the view aspect ratio * @param zNear the near clipping plane * @param zFar the far clipping plane */ static void perspective(GLfloat *m, GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar) { GLfloat tmp[16]; identity(tmp); double sine, cosine, cotangent, deltaZ; GLfloat radians = fovy / 2 * M_PI / 180; deltaZ = zFar - zNear; sincos(radians, &sine, &cosine); if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) return; cotangent = cosine / sine; tmp[0] = cotangent / aspect; tmp[5] = cotangent; tmp[10] = -(zFar + zNear) / deltaZ; tmp[11] = -1; tmp[14] = -2 * zNear * zFar / deltaZ; tmp[15] = 0; memcpy(m, tmp, sizeof(tmp)); } /** * Draws a gear. * * @param gear the gear to draw * @param transform the current transformation matrix * @param x the x position to draw the gear at * @param y the y position to draw the gear at * @param angle the rotation angle of the gear * @param color the color of the gear */ static void draw_gear(struct gear *gear, GLfloat *transform, GLfloat x, GLfloat y, GLfloat angle, const GLfloat color[4]) { GLfloat model_view[16]; GLfloat normal_matrix[16]; GLfloat model_view_projection[16]; /* Translate and rotate the gear */ memcpy(model_view, transform, sizeof (model_view)); translate(model_view, x, y, 0); rotate(model_view, 2 * M_PI * angle / 360.0, 0, 0, 1); /* Create and set the ModelViewProjectionMatrix */ memcpy(model_view_projection, ProjectionMatrix, sizeof(model_view_projection)); multiply(model_view_projection, model_view); glUniformMatrix4fv(ModelViewProjectionMatrix_location, 1, GL_FALSE, model_view_projection); /* * Create and set the NormalMatrix. It's the inverse transpose of the * ModelView matrix. */ memcpy(normal_matrix, model_view, sizeof (normal_matrix)); invert(normal_matrix); transpose(normal_matrix); glUniformMatrix4fv(NormalMatrix_location, 1, GL_FALSE, normal_matrix); /* Set the gear color */ glUniform4fv(MaterialColor_location, 1, color); /* Set the vertex buffer object to use */ glBindBuffer(GL_ARRAY_BUFFER, gear->vbo); /* Set up the position of the attributes in the vertex buffer object */ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), NULL); glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLfloat *) 0 + 3); /* Enable the attributes */ glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); /* Draw the triangle strips that comprise the gear */ int n; for (n = 0; n < gear->nstrips; n++) glDrawArrays(GL_TRIANGLE_STRIP, gear->strips[n].first, gear->strips[n].count); /* Disable the attributes */ glDisableVertexAttribArray(1); glDisableVertexAttribArray(0); } /** * Draws the gears. */ static void gears_draw(void) { const static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 }; const static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 }; const static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 }; GLfloat transform[16]; identity(transform); glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* Translate and rotate the view */ translate(transform, 0, 0, -20); rotate(transform, 2 * M_PI * view_rot[0] / 360.0, 1, 0, 0); rotate(transform, 2 * M_PI * view_rot[1] / 360.0, 0, 1, 0); rotate(transform, 2 * M_PI * view_rot[2] / 360.0, 0, 0, 1); /* Draw the gears */ draw_gear(gear1, transform, -3.0, -2.0, angle, red); draw_gear(gear2, transform, 3.1, -2.0, -2 * angle - 9.0, green); draw_gear(gear3, transform, -3.1, 4.2, -2 * angle - 25.0, blue); } static const char vertex_shader[] = "attribute vec3 position;\n" "attribute vec3 normal;\n" "\n" "uniform mat4 ModelViewProjectionMatrix;\n" "uniform mat4 NormalMatrix;\n" "uniform vec4 LightSourcePosition;\n" "uniform vec4 MaterialColor;\n" "\n" "varying vec4 Color;\n" "\n" "void main(void)\n" "{\n" " // Transform the normal to eye coordinates\n" " vec3 N = normalize(vec3(NormalMatrix * vec4(normal, 1.0)));\n" "\n" " // The LightSourcePosition is actually its direction for directional light\n" " vec3 L = normalize(LightSourcePosition.xyz);\n" "\n" " // Multiply the diffuse value by the vertex color (which is fixed in this case)\n" " // to get the actual color that we will use to draw this vertex with\n" " float diffuse = max(dot(N, L), 0.0);\n" " Color = diffuse * MaterialColor;\n" "\n" " // Transform the position to clip coordinates\n" " gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0);\n" "}"; static const char fragment_shader[] = //"precision mediump float;\n" "varying vec4 Color;\n" "\n" "void main(void)\n" "{\n" " gl_FragColor = Color;\n" "}"; static void gears_init(void) { GLuint v, f, program; const char *p; char msg[512]; glEnable(GL_CULL_FACE); glEnable(GL_DEPTH_TEST); /* Compile the vertex shader */ p = vertex_shader; v = glCreateShader(GL_VERTEX_SHADER); glShaderSource(v, 1, &p, NULL); glCompileShader(v); glGetShaderInfoLog(v, sizeof msg, NULL, msg); printf("vertex shader info: %s\n", msg); /* Compile the fragment shader */ p = fragment_shader; f = glCreateShader(GL_FRAGMENT_SHADER); glShaderSource(f, 1, &p, NULL); glCompileShader(f); glGetShaderInfoLog(f, sizeof msg, NULL, msg); printf("fragment shader info: %s\n", msg); /* Create and link the shader program */ program = glCreateProgram(); glAttachShader(program, v); glAttachShader(program, f); glBindAttribLocation(program, 0, "position"); glBindAttribLocation(program, 1, "normal"); glLinkProgram(program); glGetProgramInfoLog(program, sizeof msg, NULL, msg); printf("info: %s\n", msg); /* Enable the shaders */ glUseProgram(program); /* Get the locations of the uniforms so we can access them */ ModelViewProjectionMatrix_location = glGetUniformLocation(program, "ModelViewProjectionMatrix"); NormalMatrix_location = glGetUniformLocation(program, "NormalMatrix"); LightSourcePosition_location = glGetUniformLocation(program, "LightSourcePosition"); MaterialColor_location = glGetUniformLocation(program, "MaterialColor"); /* Set the LightSourcePosition uniform which is constant throught the program */ glUniform4fv(LightSourcePosition_location, 1, LightSourcePosition); /* make the gears */ gear1 = create_gear(1.0, 4.0, 1.0, 20, 0.7); gear2 = create_gear(0.5, 2.0, 2.0, 10, 0.7); gear3 = create_gear(1.3, 2.0, 0.5, 10, 0.7); } /**********************************************************************************************************************/ /**********************************************************************************************************************/ typedef struct { IDirectFB *dfb; IDirectFBSurface *primary; IDirectFBGL2 *gl2; IDirectFBGL2Context *gl2context; IDirectFBEventBuffer *events; DFBDimension size; } Test; static DFBResult Initialize( Test *test, int *argc, char ***argv ) { DFBResult ret; DFBSurfaceDescription dsc; /* * Initialize DirectFB options */ ret = DirectFBInit( argc, argv ); if (ret) { D_DERROR( ret, "DirectFBInit() failed!\n" ); return ret; } /* * Create the super interface */ ret = DirectFBCreate( &test->dfb ); if (ret) { D_DERROR( ret, "DirectFBCreate() failed!\n" ); return ret; } /* * Retrieve the DirectFBGL2 API */ ret = test->dfb->GetInterface( test->dfb, "IDirectFBGL2", NULL, test->dfb, (void**) &test->gl2 ); if (ret) { D_DERROR( ret, "IDirectFB::GetInterface( 'IDirectFBGL2' ) failed!\n" ); return ret; } /* * Create an event buffer for all devices with these caps */ ret = test->dfb->CreateInputEventBuffer( test->dfb, DICAPS_KEYS | DICAPS_AXES, DFB_FALSE, &test->events ); if (ret) { D_DERROR( ret, "IDirectFB::CreateInputEventBuffer( DICAPS_KEYS | DICAPS_AXES ) failed!\n" ); return ret; } /* * Try to set our cooperative level to DFSCL_FULLSCREEN for exclusive access to the primary layer */ test->dfb->SetCooperativeLevel( test->dfb, DFSCL_FULLSCREEN ); /* * Create the primary surface */ dsc.flags = DSDESC_CAPS; dsc.caps = DSCAPS_PRIMARY | DSCAPS_TRIPLE; ret = test->dfb->CreateSurface( test->dfb, &dsc, &test->primary ); if (ret) { D_DERROR( ret, "IDirectFB::CreateSurface( DSCAPS_PRIMARY | DSCAPS_TRIPLE ) failed!\n" ); return ret; } /* * Get the size of the surface, clear and show it */ test->primary->GetSize( test->primary, &test->size.w, &test->size.h ); test->primary->Clear( test->primary, 0, 0, 0, 0 ); test->primary->Flip( test->primary, NULL, 0 ); /* * Create an OpenGL rendering context */ ret = test->gl2->CreateContext( test->gl2, NULL, &test->gl2context ); if (ret) { D_DERROR( ret, "IDirectFBGL2::CreateContext() failed!\n" ); return ret; } return DFB_OK; } static void Shutdown( Test *test ) { if (test->gl2context) test->gl2context->Release( test->gl2context ); if (test->gl2) test->gl2->Release( test->gl2 ); if (test->primary) test->primary->Release( test->primary ); if (test->events) test->events->Release( test->events ); if (test->dfb) test->dfb->Release( test->dfb ); } static DFBResult InitGL( Test *test ) { DFBResult ret; /* * Bind the OpenGL rendering context to our primary surface */ ret = test->gl2context->Bind( test->gl2context, test->primary, test->primary ); if (ret) { D_DERROR( ret, "IDirectFBGL2Context::Bind() failed!\n" ); return ret; } gears_init(); /* Update the projection matrix */ perspective(ProjectionMatrix, 60.0, test->size.w / (float)test->size.h, 1.0, 1024.0); /* Setup the viewport */ glViewport( 0, 0, (GLint) test->size.w, (GLint) test->size.h ); /* Unbind the OpenGL rendering context */ test->gl2context->Unbind( test->gl2context ); return DFB_OK; } static DFBResult RenderGL( Test *test ) { DFBResult ret; /* * Bind the OpenGL rendering context to our primary surface */ ret = test->gl2context->Bind( test->gl2context, test->primary, test->primary ); if (ret) { D_DERROR( ret, "IDirectFBGL2Context::Bind() failed!\n" ); return ret; } gears_draw(); /* Unbind the OpenGL rendering context */ test->gl2context->Unbind( test->gl2context ); return DFB_OK; } /**********************************************************************************************************************/ /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; bool quit = false; Test test; memset( &test, 0, sizeof(test) ); ret = Initialize( &test, &argc, &argv ); if (ret) goto error; ret = InitGL( &test ); if (ret) goto error; /* * Main Loop */ while (!quit) { static int frames = 0; static double tRot0 = -1.0, tRate0 = -1.0; double dt, t = direct_clock_get_millis() / 1000.0; if (tRot0 < 0.0) tRot0 = t; dt = t - tRot0; tRot0 = t; /* advance rotation for next frame */ angle += 70.0 * dt; /* 70 degrees per second */ if (angle > 3600.0) angle -= 3600.0; ret = RenderGL( &test ); if (ret) goto error; /* * Show the rendered buffer */ test.primary->Flip( test.primary, NULL, DSFLIP_ONSYNC ); frames++; if (tRate0 < 0.0) tRate0 = t; if (t - tRate0 >= 5.0) { GLfloat seconds = t - tRate0; GLfloat fps = frames / seconds; printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, fps); tRate0 = t; frames = 0; } DFBInputEvent evt; /* * Process events */ while (test.events->GetEvent( test.events, DFB_EVENT(&evt) ) == DFB_OK) { switch (evt.type) { case DIET_KEYPRESS: switch (evt.key_symbol) { case DIKS_ESCAPE: quit = true; break; case DIKS_CURSOR_UP: inc_rotx = 5.0; break; case DIKS_CURSOR_DOWN: inc_rotx = -5.0; break; case DIKS_CURSOR_LEFT: inc_roty = 5.0; break; case DIKS_CURSOR_RIGHT: inc_roty = -5.0; break; case DIKS_PAGE_UP: inc_rotz = 5.0; break; case DIKS_PAGE_DOWN: inc_rotz = -5.0; break; default: ; } break; case DIET_KEYRELEASE: switch (evt.key_symbol) { case DIKS_CURSOR_UP: inc_rotx = 0; break; case DIKS_CURSOR_DOWN: inc_rotx = 0; break; case DIKS_CURSOR_LEFT: inc_roty = 0; break; case DIKS_CURSOR_RIGHT: inc_roty = 0; break; case DIKS_PAGE_UP: inc_rotz = 0; break; case DIKS_PAGE_DOWN: inc_rotz = 0; break; default: ; } break; case DIET_AXISMOTION: if (evt.flags & DIEF_AXISREL) { switch (evt.axis) { case DIAI_X: view_rot[1] += evt.axisrel / 2.0; break; case DIAI_Y: view_rot[0] += evt.axisrel / 2.0; break; case DIAI_Z: view_rot[2] += evt.axisrel / 2.0; break; default: ; } } break; default: ; } } view_rot[0] += inc_rotx; view_rot[1] += inc_roty; view_rot[2] += inc_rotz; } error: Shutdown( &test ); return ret; } DirectFB-1.7.7/tests/testrun.c0000644000175000017500000000554012254435330013110 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #define CHECK(x) \ do { \ DFBResult ret = (x); \ if (ret != DFB_OK) { \ DirectFBError(#x,ret); \ goto out; \ } \ } while (0) int main( int argc, char** argv ) { IDirectFB *dfb = NULL; ISaWMan *saw = NULL; pid_t pid; D_INFO( "SaWMan/TestRun: Initializing...\n" ); CHECK( DirectFBInit( &argc, &argv ) ); CHECK( DirectFBCreate( &dfb ) ); CHECK( SaWManCreate( &saw ) ); CHECK( saw->Start( saw, ((argc > 1) && argv[1]) ? argv[1] : "Test Application", &pid ) ); D_INFO( "SaWMan/TestRun: New process has pid %d.\n", pid ); // sleep( 2 ); // CHECK( saw->Stop( saw, pid ) ); out: D_INFO( "SaWMan/TestRun: Shutting down...\n" ); if (saw) saw->Release( saw ); if (dfb) dfb->Release( dfb ); return 0; } DirectFB-1.7.7/tests/voodoo_bench_client_unix.c0000644000175000017500000001063212254435330016447 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define BENCH_SYNC 0 #define VOODOOTEST_METHOD_ID_Push 1 #define VOODOOTEST_METHOD_ID_Sync 2 /**********************************************************************************************************************/ #if BENCH_SYNC #define NUM_ITEMS 200000 #else #define NUM_ITEMS 20000000 #endif int main( int argc, char *argv[] ) { DirectClock clock; int counter = 0; dfb_config_init( &argc, &argv ); /* Initialize libdirect. */ direct_initialize(); // direct_config->log_level = DIRECT_LOG_ALL; direct_log_domain_config_level( "Voodoo/Input", DIRECT_LOG_DEBUG_9 ); direct_log_domain_config_level( "Voodoo/Output", DIRECT_LOG_DEBUG_9 ); direct_log_domain_config_level( "Voodoo/Dispatch", DIRECT_LOG_DEBUG_9 ); direct_log_domain_config_level( "Voodoo/Manager", DIRECT_LOG_DEBUG_9 ); VoodooLink link; VoodooManager *manager; voodoo_link_init_local( &link, "VoodooBench", false ); voodoo_manager_create( &link, NULL, NULL, &manager ); direct_clock_start( &clock ); #if !BENCH_SYNC do { voodoo_manager_request( manager, 1, VOODOOTEST_METHOD_ID_Push, VREQ_NONE, NULL, VMBT_INT, counter++, VMBT_NONE ); } while (counter < NUM_ITEMS); #else do { VoodooResponseMessage *response; voodoo_manager_request( manager, 1, VOODOOTEST_METHOD_ID_Sync, VREQ_RESPOND, &response, VMBT_NONE ); voodoo_manager_finish_request( manager, response ); counter++; } while (counter < NUM_ITEMS); #endif { VoodooResponseMessage *response; voodoo_manager_request( manager, 1, VOODOOTEST_METHOD_ID_Sync, VREQ_RESPOND, &response, VMBT_NONE ); voodoo_manager_finish_request( manager, response ); } direct_clock_stop( &clock ); D_INFO( "Voodoo/Test: Stopped after %lld.%03lld seconds... (%lld items/sec)\n", DIRECT_CLOCK_DIFF_SEC_MS( &clock ), NUM_ITEMS * 1000000ULL / direct_clock_diff( &clock ) ); /* Shutdown libdirect. */ direct_shutdown(); return 0; } DirectFB-1.7.7/tests/dfbtest_surface_updates.c0000644000175000017500000001266012254435330016275 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include /**********************************************************************************************************************/ static int print_usage( const char *prg ) { fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Surface Updates Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); return -1; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; int i; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBEventBuffer *events; IDirectFBSurface *surface = NULL; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceUpdates: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iCreateSurface( dfb, &desc, &surface ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceUpdates: IDirectFB::CreateSurface() failed!\n" ); goto out; } /* Create event buffer */ ret = surface->CreateEventBuffer( surface, &events ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceUpdates: IDirectFBSurface::CreateEventBuffer() failed!\n" ); goto out; } while (true) { DFBEvent event; surface->Flip( surface, NULL, DSFLIP_NONE ); while (events->GetEvent( events, &event ) == DFB_OK) { switch (event.clazz) { case DFEC_SURFACE: switch (event.surface.type) { case DSEVT_UPDATE: printf( "Update %4d,%4d-%4d,%4d\n", event.surface.update.x1, event.surface.update.y1, event.surface.update.x2, event.surface.update.y2 ); break; default: break; } break; default: break; } } } out: if (surface) surface->Release( surface ); if (events) events->Release( events ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_window_update.c0000644000175000017500000001444012254435330015767 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include static int show_usage( const char *prg ) { fprintf( stderr, "Usage: %s \n", prg ); return -1; } typedef struct { IDirectFBWindow *window; IDirectFBSurface *surface; int index; DFBDimension resolution; int anim_dirx; int anim_diry; int anim_x; int anim_y; } App; static DFBResult app_init( App *app, IDirectFBDisplayLayer *layer, int x, int y, int width, int height, int index ) { DFBResult ret; DFBWindowDescription desc; IDirectFBWindow *window; IDirectFBSurface *surface; desc.flags = DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_POSX | DWDESC_POSY | DWDESC_CAPS; desc.width = width; desc.height = height; desc.posx = x; desc.posy = y; desc.caps = DWCAPS_NONE; //| DWCAPS_ALPHACHANNEL | DWCAPS_DOUBLEBUFFER; /* Create a surface for the image. */ ret = layer->CreateWindow( layer, &desc, &window ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: IDirectFBDisplayLayer::CreateWindow() failed!\n" ); return ret; } /* Get the surface. */ ret = window->GetSurface( window, &surface ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: IDirectFBWindow::GetSurface() failed!\n" ); return ret; } surface->Clear( surface, 0xff, 0xff, 0xff, 0xff ); surface->Flip( surface, NULL, DSFLIP_NONE ); direct_thread_sleep( 2000000 ); D_INFO( "Showing window...\n" ); direct_thread_sleep( 500000 ); window->SetOpacity( window, 0xff ); direct_thread_sleep( 500000 ); D_INFO( "Done.\n" ); direct_thread_sleep( 1000000 ); app->window = window; app->surface = surface; app->index = index; app->resolution.w = width; app->resolution.h = height; app->anim_dirx = 5; app->anim_diry = 5; app->anim_x = 0; app->anim_y = 0; return DFB_OK; } static void app_update( App *app ) { static const DFBColor colors[3] = { { 0xff, 0x30, 0xc0, 0xff }, { 0xff, 0xff, 0xff, 0x30 }, { 0xff, 0x30, 0xff, 0xc0 } }; IDirectFBSurface *surface = app->surface; surface->Clear( surface, 0xff, 0xff, 0xff, 0x20 ); surface->SetColor( surface, colors[app->index].r, colors[app->index].g, colors[app->index].b, colors[app->index].a ); surface->FillRectangle( surface, app->anim_x, app->anim_y, 40, 300 ); surface->Flip( surface, NULL, DSFLIP_WAITFORSYNC ); app->anim_x += app->anim_dirx; if (app->anim_x >= app->resolution.w - 40) app->anim_dirx = -5; else if (app->anim_x <= 0) app->anim_dirx = 5; app->anim_y += app->anim_diry; if (app->anim_y >= app->resolution.h - 300) app->anim_diry = -5; else if (app->anim_y <= 0) app->anim_diry = 5; } int main( int argc, char *argv[] ) { int i; DFBResult ret; IDirectFB *dfb; IDirectFBDisplayLayer *layer = NULL; App apps[1]; DFBDisplayLayerConfig config; /* Parse arguments. */ for (i=1; iGetDisplayLayer( dfb, DLID_PRIMARY, &layer ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: IDirectFB::GetDisplayLayer( PRIMARY ) failed!\n" ); goto out; } layer->GetConfiguration( layer, &config ); app_init( &apps[0], layer, 100, 50, config.width-300, config.height-150, 0 ); while (true) { direct_thread_sleep( 1000000 ); app_update( &apps[0] ); } out: /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_sync.c0000644000175000017500000002446612254435330014103 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include static const DirectFBPixelFormatNames( format_names ); /**********************************************************************************************************************/ static DFBBoolean parse_format( const char *arg, DFBSurfacePixelFormat *_f ) { int i = 0; while (format_names[i].format != DSPF_UNKNOWN) { if (!strcasecmp( arg, format_names[i].name )) { *_f = format_names[i].format; return DFB_TRUE; } ++i; } fprintf (stderr, "\nInvalid format specified!\n\n" ); return DFB_FALSE; } static int print_usage( const char *prg ) { int i = 0; fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Blitting Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -s, --source Source pixel format\n"); fprintf (stderr, " -d, --dest Destination pixel format\n"); fprintf (stderr, " -r, --resize Set destination from source size\n"); fprintf (stderr, " -b, --benchmark Enable benchmarking mode\n"); fprintf (stderr, " -R, --rerender Rerender before every blit (benchmark)\n"); return -1; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { int i; DFBResult ret; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBImageProvider *provider = NULL; IDirectFBSurface *source = NULL; IDirectFBSurface *dest = NULL; const char *url = NULL; DFBSurfacePixelFormat source_format = DSPF_UNKNOWN; DFBSurfacePixelFormat dest_format = DSPF_UNKNOWN; bool dest_resize = false; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Blit: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iCreateImageProvider( dfb, url, &provider ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateImageProvider( '%s' ) failed!\n", url ); goto out; } /* Get the surface description. */ ret = provider->GetSurfaceDescription( provider, &desc ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFBImageProvider::GetSurfaceDescription() failed!\n" ); goto out; } if (source_format != DSPF_UNKNOWN) desc.pixelformat = source_format; D_INFO( "DFBTest/Blit: Source is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Create a surface for the image. */ ret = dfb->CreateSurface( dfb, &desc, &source ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateSurface() failed!\n" ); goto out; } ret = provider->RenderTo( provider, source, NULL ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFBImageProvider::RenderTo() failed!\n" ); goto out; } /* Fill description for a primary surface. */ desc.flags = DSDESC_CAPS; desc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING; if (dest_format != DSPF_UNKNOWN) { desc.flags |= DSDESC_PIXELFORMAT; desc.pixelformat = dest_format; } if (dest_resize) desc.flags |= DSDESC_WIDTH | DSDESC_HEIGHT; dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateSurface() failed!\n" ); goto out; } dest->GetSize( dest, &desc.width, &desc.height ); dest->GetPixelFormat( dest, &desc.pixelformat ); D_INFO( "DFBTest/Blit: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); for (i=0; i<100000; i++) { int j,n = rand()%100; for (j=0; jSetDrawingFlags( dest, rand() & (DSDRAW_BLEND) ); dest->FillRectangle( dest, rand()%100, rand()%100, rand()%100, rand()%100 ); break; case 1: dest->SetBlittingFlags( dest, rand() & (DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_BLEND_COLORALPHA | DSBLIT_COLORIZE | DSBLIT_ROTATE90) ); dest->Blit( dest, source, NULL, rand()%100, rand()%100 ); break; case 2: dest->SetBlittingFlags( dest, rand() & (DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_BLEND_COLORALPHA | DSBLIT_COLORIZE | DSBLIT_ROTATE90) ); dest->StretchBlit( dest, source, NULL, NULL ); break; } } dfb->WaitIdle( dfb ); dest->Flip( dest, NULL, DSFLIP_NONE ); } out: if (dest) dest->Release( dest ); if (source) source->Release( source ); if (provider) provider->Release( provider ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_gl3.c0000644000175000017500000007532412254435330013613 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #define GL_GLEXT_PROTOTYPES #include #define STRIPS_PER_TOOTH 7 #define VERTICES_PER_TOOTH 34 #define GEAR_VERTEX_STRIDE 8 /** * Struct describing the vertices in triangle strip */ struct vertex_strip { /** The first vertex in the strip */ GLint first; /** The number of consecutive vertices in the strip after the first */ GLint count; }; /* Each vertex consist of GEAR_VERTEX_STRIDE GLfloat attributes */ typedef GLfloat GearVertex[GEAR_VERTEX_STRIDE]; /** * Struct representing a gear. */ struct gear { /** The array of vertices comprising the gear */ GearVertex *vertices; /** The number of vertices comprising the gear */ int nvertices; /** The array of triangle strips comprising the gear */ struct vertex_strip *strips; /** The number of triangle strips comprising the gear */ int nstrips; /** The Vertex Buffer Object holding the vertices in the graphics card */ GLuint vbo; }; /** The view rotation [x, y, z] */ static GLfloat view_rot[3] = { 20.0, 30.0, 0.0 }; static GLfloat inc_rotx = 0, inc_roty = 0, inc_rotz = 0; /** The gears */ static struct gear *gear1, *gear2, *gear3; /** The current gear rotation angle */ static GLfloat angle = 0.0; /** The location of the shader uniforms */ static GLuint ModelViewProjectionMatrix_location, NormalMatrix_location, LightSourcePosition_location, MaterialColor_location, Sampler_location; /** The projection matrix */ static GLfloat ProjectionMatrix[16]; /** The direction of the directional light for the scene */ static const GLfloat LightSourcePosition[4] = { 5.0, 5.0, 10.0, 1.0}; /** * Fills a gear vertex. * * @param v the vertex to fill * @param x the x coordinate * @param y the y coordinate * @param z the z coortinate * @param n pointer to the normal table * * @return the operation error code */ static GearVertex * vert(GearVertex *v, GLfloat x, GLfloat y, GLfloat z, GLfloat n[3]) { v[0][0] = x; v[0][1] = y; v[0][2] = z; v[0][3] = n[0]; v[0][4] = n[1]; v[0][5] = n[2]; v[0][6] = x/4.0f; v[0][7] = y/4.0f; return v + 1; } /** * Create a gear wheel. * * @param inner_radius radius of hole at center * @param outer_radius radius at center of teeth * @param width width of gear * @param teeth number of teeth * @param tooth_depth depth of tooth * * @return pointer to the constructed struct gear */ static struct gear * create_gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth) { GLfloat r0, r1, r2; GLfloat da; GearVertex *v; struct gear *gear; double s[5], c[5]; GLfloat normal[3]; int cur_strip = 0; int i; /* Allocate memory for the gear */ gear = malloc(sizeof *gear); if (gear == NULL) return NULL; /* Calculate the radii used in the gear */ r0 = inner_radius; r1 = outer_radius - tooth_depth / 2.0; r2 = outer_radius + tooth_depth / 2.0; da = 2.0 * M_PI / teeth / 4.0; /* Allocate memory for the triangle strip information */ gear->nstrips = STRIPS_PER_TOOTH * teeth; gear->strips = calloc(gear->nstrips, sizeof (*gear->strips)); /* Allocate memory for the vertices */ gear->vertices = calloc(VERTICES_PER_TOOTH * teeth, sizeof(*gear->vertices)); v = gear->vertices; for (i = 0; i < teeth; i++) { /* Calculate needed sin/cos for varius angles */ sincos(i * 2.0 * M_PI / teeth, &s[0], &c[0]); sincos(i * 2.0 * M_PI / teeth + da, &s[1], &c[1]); sincos(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]); sincos(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]); sincos(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]); /* A set of macros for making the creation of the gears easier */ #define GEAR_POINT(r, da) { (r) * c[(da)], (r) * s[(da)] } #define SET_NORMAL(x, y, z) do { \ normal[0] = (x); normal[1] = (y); normal[2] = (z); \ } while(0) #define GEAR_VERT(v, point, sign) vert((v), p[(point)].x, p[(point)].y, (sign) * width * 0.5, normal) #define START_STRIP do { \ gear->strips[cur_strip].first = v - gear->vertices; \ } while(0); #define END_STRIP do { \ int _tmp = (v - gear->vertices); \ gear->strips[cur_strip].count = _tmp - gear->strips[cur_strip].first; \ cur_strip++; \ } while (0) #define QUAD_WITH_NORMAL(p1, p2) do { \ SET_NORMAL((p[(p1)].y - p[(p2)].y), -(p[(p1)].x - p[(p2)].x), 0); \ v = GEAR_VERT(v, (p1), -1); \ v = GEAR_VERT(v, (p1), 1); \ v = GEAR_VERT(v, (p2), -1); \ v = GEAR_VERT(v, (p2), 1); \ } while(0) struct point { GLfloat x; GLfloat y; }; /* Create the 7 points (only x,y coords) used to draw a tooth */ struct point p[7] = { GEAR_POINT(r2, 1), // 0 GEAR_POINT(r2, 2), // 1 GEAR_POINT(r1, 0), // 2 GEAR_POINT(r1, 3), // 3 GEAR_POINT(r0, 0), // 4 GEAR_POINT(r1, 4), // 5 GEAR_POINT(r0, 4), // 6 }; /* Front face */ START_STRIP; SET_NORMAL(0, 0, 1.0); v = GEAR_VERT(v, 0, +1); v = GEAR_VERT(v, 1, +1); v = GEAR_VERT(v, 2, +1); v = GEAR_VERT(v, 3, +1); v = GEAR_VERT(v, 4, +1); v = GEAR_VERT(v, 5, +1); v = GEAR_VERT(v, 6, +1); END_STRIP; /* Inner face */ START_STRIP; QUAD_WITH_NORMAL(4, 6); END_STRIP; /* Back face */ START_STRIP; SET_NORMAL(0, 0, -1.0); v = GEAR_VERT(v, 6, -1); v = GEAR_VERT(v, 5, -1); v = GEAR_VERT(v, 4, -1); v = GEAR_VERT(v, 3, -1); v = GEAR_VERT(v, 2, -1); v = GEAR_VERT(v, 1, -1); v = GEAR_VERT(v, 0, -1); END_STRIP; /* Outer face */ START_STRIP; QUAD_WITH_NORMAL(0, 2); END_STRIP; START_STRIP; QUAD_WITH_NORMAL(1, 0); END_STRIP; START_STRIP; QUAD_WITH_NORMAL(3, 1); END_STRIP; START_STRIP; QUAD_WITH_NORMAL(5, 3); END_STRIP; } gear->nvertices = (v - gear->vertices); /* Store the vertices in a vertex buffer object (VBO) */ glGenBuffers(1, &gear->vbo); glBindBuffer(GL_ARRAY_BUFFER, gear->vbo); glBufferData(GL_ARRAY_BUFFER, gear->nvertices * sizeof(GearVertex), gear->vertices, GL_STATIC_DRAW); return gear; } /** * Multiplies two 4x4 matrices. * * The result is stored in matrix m. * * @param m the first matrix to multiply * @param n the second matrix to multiply */ static void multiply(GLfloat *m, const GLfloat *n) { GLfloat tmp[16]; const GLfloat *row, *column; div_t d; int i, j; for (i = 0; i < 16; i++) { tmp[i] = 0; d = div(i, 4); row = n + d.quot * 4; column = m + d.rem; for (j = 0; j < 4; j++) tmp[i] += row[j] * column[j * 4]; } memcpy(m, &tmp, sizeof tmp); } /** * Rotates a 4x4 matrix. * * @param[in,out] m the matrix to rotate * @param angle the angle to rotate * @param x the x component of the direction to rotate to * @param y the y component of the direction to rotate to * @param z the z component of the direction to rotate to */ static void rotate(GLfloat *m, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { double s, c; sincos(angle, &s, &c); GLfloat r[16] = { x * x * (1 - c) + c, y * x * (1 - c) + z * s, x * z * (1 - c) - y * s, 0, x * y * (1 - c) - z * s, y * y * (1 - c) + c, y * z * (1 - c) + x * s, 0, x * z * (1 - c) + y * s, y * z * (1 - c) - x * s, z * z * (1 - c) + c, 0, 0, 0, 0, 1 }; multiply(m, r); } /** * Translates a 4x4 matrix. * * @param[in,out] m the matrix to translate * @param x the x component of the direction to translate to * @param y the y component of the direction to translate to * @param z the z component of the direction to translate to */ static void translate(GLfloat *m, GLfloat x, GLfloat y, GLfloat z) { GLfloat t[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 1 }; multiply(m, t); } /** * Creates an identity 4x4 matrix. * * @param m the matrix make an identity matrix */ static void identity(GLfloat *m) { GLfloat t[16] = { 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, }; memcpy(m, t, sizeof(t)); } /** * Transposes a 4x4 matrix. * * @param m the matrix to transpose */ static void transpose(GLfloat *m) { GLfloat t[16] = { m[0], m[4], m[8], m[12], m[1], m[5], m[9], m[13], m[2], m[6], m[10], m[14], m[3], m[7], m[11], m[15]}; memcpy(m, t, sizeof(t)); } /** * Inverts a 4x4 matrix. * * This function can currently handle only pure translation-rotation matrices. * Read http://www.gamedev.net/community/forums/topic.asp?topic_id=425118 * for an explanation. */ static void invert(GLfloat *m) { GLfloat t[16]; identity(t); // Extract and invert the translation part 't'. The inverse of a // translation matrix can be calculated by negating the translation // coordinates. t[12] = -m[12]; t[13] = -m[13]; t[14] = -m[14]; // Invert the rotation part 'r'. The inverse of a rotation matrix is // equal to its transpose. m[12] = m[13] = m[14] = 0; transpose(m); // inv(m) = inv(r) * inv(t) multiply(m, t); } /** * Calculate a perspective projection transformation. * * @param m the matrix to save the transformation in * @param fovy the field of view in the y direction * @param aspect the view aspect ratio * @param zNear the near clipping plane * @param zFar the far clipping plane */ static void perspective(GLfloat *m, GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar) { GLfloat tmp[16]; identity(tmp); double sine, cosine, cotangent, deltaZ; GLfloat radians = fovy / 2 * M_PI / 180; deltaZ = zFar - zNear; sincos(radians, &sine, &cosine); if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) return; cotangent = cosine / sine; tmp[0] = cotangent / aspect; tmp[5] = cotangent; tmp[10] = -(zFar + zNear) / deltaZ; tmp[11] = -1; tmp[14] = -2 * zNear * zFar / deltaZ; tmp[15] = 0; memcpy(m, tmp, sizeof(tmp)); } /** * Draws a gear. * * @param gear the gear to draw * @param transform the current transformation matrix * @param x the x position to draw the gear at * @param y the y position to draw the gear at * @param angle the rotation angle of the gear * @param color the color of the gear */ static void draw_gear(struct gear *gear, GLfloat *transform, GLfloat x, GLfloat y, GLfloat angle, const GLfloat color[4]) { GLfloat model_view[16]; GLfloat normal_matrix[16]; GLfloat model_view_projection[16]; /* Translate and rotate the gear */ memcpy(model_view, transform, sizeof (model_view)); translate(model_view, x, y, 0); rotate(model_view, 2 * M_PI * angle / 360.0, 0, 0, 1); /* Create and set the ModelViewProjectionMatrix */ memcpy(model_view_projection, ProjectionMatrix, sizeof(model_view_projection)); multiply(model_view_projection, model_view); glUniformMatrix4fv(ModelViewProjectionMatrix_location, 1, GL_FALSE, model_view_projection); /* * Create and set the NormalMatrix. It's the inverse transpose of the * ModelView matrix. */ memcpy(normal_matrix, model_view, sizeof (normal_matrix)); invert(normal_matrix); transpose(normal_matrix); glUniformMatrix4fv(NormalMatrix_location, 1, GL_FALSE, normal_matrix); /* Set the gear color */ glUniform4fv(MaterialColor_location, 1, color); /* Set the vertex buffer object to use */ glBindBuffer(GL_ARRAY_BUFFER, gear->vbo); /* Set up the position of the attributes in the vertex buffer object */ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, GEAR_VERTEX_STRIDE * sizeof(GLfloat), NULL); glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, GEAR_VERTEX_STRIDE * sizeof(GLfloat), (GLfloat *) 0 + 3); glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, GEAR_VERTEX_STRIDE * sizeof(GLfloat), (GLfloat *) 0 + 6); /* Enable the attributes */ glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); glEnableVertexAttribArray(2); /* Draw the triangle strips that comprise the gear */ int n; for (n = 0; n < gear->nstrips; n++) glDrawArrays(GL_TRIANGLE_STRIP, gear->strips[n].first, gear->strips[n].count); /* Disable the attributes */ glDisableVertexAttribArray(2); glDisableVertexAttribArray(1); glDisableVertexAttribArray(0); } /** * Draws the gears. */ static void gears_draw( bool real ) { const static GLfloat red[4] = { 0.9, 0.4, 0.2, 1.0 }; const static GLfloat green[4] = { 0.0, 0.9, 0.3, 1.0 }; const static GLfloat blue[4] = { 0.4, 0.4, 1.0, 1.0 }; GLfloat transform[16]; identity(transform); if (real) glClearColor(0.0, 0.0, 0.0, 0.0); else glClearColor(1.0, 1.0, 1.0, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* Translate and rotate the view */ translate(transform, 0, 0, -14); rotate(transform, 2 * M_PI * view_rot[0] / 360.0, 1, 0, 0); rotate(transform, 2 * M_PI * view_rot[1] / 360.0, 0, 1, 0); rotate(transform, 2 * M_PI * view_rot[2] / 360.0, 0, 0, 1); glEnable( GL_TEXTURE_2D ); /* Draw the gears */ draw_gear(gear1, transform, -3.0, -2.0, angle, red); draw_gear(gear2, transform, 3.1, -2.0, -2 * angle - 9.0, green); draw_gear(gear3, transform, -3.1, 4.2, -2 * angle - 25.0, blue); } static const char vertex_shader[] = "attribute vec3 position;\n" "attribute vec3 normal;\n" "attribute vec2 texcoords;\n" "\n" "uniform mat4 ModelViewProjectionMatrix;\n" "uniform mat4 NormalMatrix;\n" "uniform vec4 LightSourcePosition;\n" "uniform vec4 MaterialColor;\n" "\n" "varying vec4 Color;\n" "varying vec2 TexCoord;\n" "\n" "void main(void)\n" "{\n" " // Transform the normal to eye coordinates\n" " vec3 N = normalize(vec3(NormalMatrix * vec4(normal, 1.0)));\n" "\n" " // The LightSourcePosition is actually its direction for directional light\n" " vec3 L = normalize(LightSourcePosition.xyz);\n" "\n" " // Multiply the diffuse value by the vertex color (which is fixed in this case)\n" " // to get the actual color that we will use to draw this vertex with\n" " float diffuse = max(dot(N, L), 0.0);\n" " Color = diffuse * MaterialColor;\n" "\n" " // Transform the position to clip coordinates\n" " gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0);\n" "\n" " TexCoord.s = texcoords.x;\n" " TexCoord.t = texcoords.y;\n" "}"; static const char fragment_shader[] = //"precision mediump float;\n" "uniform sampler2D Sampler;\n" "varying vec4 Color;\n" "varying vec2 TexCoord;\n" "\n" "void main(void)\n" "{\n" " gl_FragColor = texture2D(Sampler, TexCoord);\n" " gl_FragColor *= Color;\n" "}"; static void gears_init(void) { GLuint v, f, program; const char *p; char msg[512]; glEnable(GL_CULL_FACE); glEnable(GL_DEPTH_TEST); /* Compile the vertex shader */ p = vertex_shader; v = glCreateShader(GL_VERTEX_SHADER); glShaderSource(v, 1, &p, NULL); glCompileShader(v); glGetShaderInfoLog(v, sizeof msg, NULL, msg); printf("vertex shader info: %s\n", msg); /* Compile the fragment shader */ p = fragment_shader; f = glCreateShader(GL_FRAGMENT_SHADER); glShaderSource(f, 1, &p, NULL); glCompileShader(f); glGetShaderInfoLog(f, sizeof msg, NULL, msg); printf("fragment shader info: %s\n", msg); /* Create and link the shader program */ program = glCreateProgram(); glAttachShader(program, v); glAttachShader(program, f); glBindAttribLocation(program, 0, "position"); glBindAttribLocation(program, 1, "normal"); glBindAttribLocation(program, 2, "texcoords"); glLinkProgram(program); glGetProgramInfoLog(program, sizeof msg, NULL, msg); printf("info: %s\n", msg); /* Enable the shaders */ glUseProgram(program); /* Get the locations of the uniforms so we can access them */ ModelViewProjectionMatrix_location = glGetUniformLocation(program, "ModelViewProjectionMatrix"); NormalMatrix_location = glGetUniformLocation(program, "NormalMatrix"); LightSourcePosition_location = glGetUniformLocation(program, "LightSourcePosition"); MaterialColor_location = glGetUniformLocation(program, "MaterialColor"); Sampler_location = glGetUniformLocation(program, "Sampler"); /* Set the LightSourcePosition uniform which is constant throught the program */ glUniform4fv(LightSourcePosition_location, 1, LightSourcePosition); glUniform1i(Sampler_location, 0); /* make the gears */ gear1 = create_gear(1.0, 4.0, 1.0, 20, 0.7); gear2 = create_gear(0.5, 2.0, 2.0, 10, 0.7); gear3 = create_gear(1.3, 2.0, 0.5, 10, 0.7); } /**********************************************************************************************************************/ /**********************************************************************************************************************/ typedef struct { IDirectFBSurface *surface; DFBDimension size; GLuint object; } Texture; typedef struct { IDirectFB *dfb; IDirectFBSurface *primary; IDirectFBGL2 *gl2; IDirectFBGL2Context *gl2context; IDirectFBEventBuffer *events; DFBDimension size; Texture texture; } Test; /**********************************************************************************************************************/ static DFBResult InitTexture( Test *test, Texture *texture, int width, int height ) { DFBResult ret; DFBSurfaceDescription dsc; memset( texture, 0, sizeof(*texture) ); texture->size.w = width; texture->size.h = height; /* * Create a surface */ dsc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT; dsc.width = width; dsc.height = height; dsc.pixelformat = DSPF_ARGB; ret = test->dfb->CreateSurface( test->dfb, &dsc, &texture->surface ); if (ret) { D_DERROR( ret, "IDirectFB::CreateSurface( 256x256 ARGB ) failed!\n" ); return ret; } /* * Bind the OpenGL rendering context to our primary surface */ ret = test->gl2context->Bind( test->gl2context, test->primary, test->primary ); if (ret) { D_DERROR( ret, "IDirectFBGL2Context::Bind() failed!\n" ); return ret; } /* * Create a texture object */ glGenTextures( 1, &texture->object ); glBindTexture( GL_TEXTURE_2D, texture->object ); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); /* * Use surface as storage for texture object */ ret = test->gl2->TextureSurface( test->gl2, GL_TEXTURE_2D, 0, texture->surface ); if (ret) { D_DERROR( ret, "IDirectFBGL2::TextureSurface( 256x256 ARGB ) failed!\n" ); return ret; } /* Unbind the OpenGL rendering context */ test->gl2context->Unbind( test->gl2context ); return DFB_OK; } /**********************************************************************************************************************/ static DFBResult Initialize( Test *test, int *argc, char ***argv ) { DFBResult ret; DFBSurfaceDescription dsc; memset( test, 0, sizeof(*test) ); /* * Initialize DirectFB options */ ret = DirectFBInit( argc, argv ); if (ret) { D_DERROR( ret, "DirectFBInit() failed!\n" ); return ret; } /* * Create the super interface */ ret = DirectFBCreate( &test->dfb ); if (ret) { D_DERROR( ret, "DirectFBCreate() failed!\n" ); return ret; } /* * Retrieve the DirectFBGL2 API */ ret = test->dfb->GetInterface( test->dfb, "IDirectFBGL2", NULL, test->dfb, (void**) &test->gl2 ); if (ret) { D_DERROR( ret, "IDirectFB::GetInterface( 'IDirectFBGL2' ) failed!\n" ); return ret; } /* * Create an event buffer for all devices with these caps */ ret = test->dfb->CreateInputEventBuffer( test->dfb, DICAPS_KEYS | DICAPS_AXES, DFB_FALSE, &test->events ); if (ret) { D_DERROR( ret, "IDirectFB::CreateInputEventBuffer( DICAPS_KEYS | DICAPS_AXES ) failed!\n" ); return ret; } /* * Try to set our cooperative level to DFSCL_FULLSCREEN for exclusive access to the primary layer */ test->dfb->SetCooperativeLevel( test->dfb, DFSCL_FULLSCREEN ); /* * Create the primary surface */ dsc.flags = DSDESC_CAPS; dsc.caps = DSCAPS_PRIMARY | DSCAPS_TRIPLE; ret = test->dfb->CreateSurface( test->dfb, &dsc, &test->primary ); if (ret) { D_DERROR( ret, "IDirectFB::CreateSurface( DSCAPS_PRIMARY | DSCAPS_TRIPLE ) failed!\n" ); return ret; } /* * Get the size of the surface, clear and show it */ test->primary->GetSize( test->primary, &test->size.w, &test->size.h ); test->primary->Clear( test->primary, 0, 0, 0, 0 ); test->primary->Flip( test->primary, NULL, 0 ); /* * Create an OpenGL rendering context */ ret = test->gl2->CreateContext( test->gl2, NULL, &test->gl2context ); if (ret) { D_DERROR( ret, "IDirectFBGL2::CreateContext() failed!\n" ); return ret; } return DFB_OK; } static void Shutdown( Test *test ) { if (test->gl2context) test->gl2context->Release( test->gl2context ); if (test->gl2) test->gl2->Release( test->gl2 ); if (test->primary) test->primary->Release( test->primary ); if (test->events) test->events->Release( test->events ); if (test->dfb) test->dfb->Release( test->dfb ); } static DFBResult InitGL( Test *test ) { DFBResult ret; /* * Bind the OpenGL rendering context to our primary surface */ ret = test->gl2context->Bind( test->gl2context, test->primary, test->primary ); if (ret) { D_DERROR( ret, "IDirectFBGL2Context::Bind() failed!\n" ); return ret; } gears_init(); /* Unbind the OpenGL rendering context */ test->gl2context->Unbind( test->gl2context ); return DFB_OK; } static DFBResult RenderGL( Test *test ) { DFBResult ret; /* * Bind the OpenGL rendering context to our primary surface */ ret = test->gl2context->Bind( test->gl2context, test->primary, test->primary ); if (ret) { D_DERROR( ret, "IDirectFBGL2Context::Bind() failed!\n" ); return ret; } /* Update the projection matrix */ perspective(ProjectionMatrix, 60.0, test->size.w / (float)test->size.h, 1.0, 1024.0); /* Setup the viewport */ glViewport( 0, 0, (GLint) test->size.w, (GLint) test->size.h ); gears_draw( true ); /* Unbind the OpenGL rendering context */ test->gl2context->Unbind( test->gl2context ); return DFB_OK; } static DFBResult RenderTexture( Test *test, Texture *texture ) { DFBResult ret; /* * Bind the OpenGL rendering context to our primary surface */ ret = test->gl2context->Bind( test->gl2context, texture->surface, texture->surface ); if (ret) { D_DERROR( ret, "IDirectFBGL2Context::Bind() failed!\n" ); return ret; } /* Update the projection matrix */ perspective(ProjectionMatrix, 60.0, texture->size.w / (float)texture->size.h, 1.0, 1024.0); /* Setup the viewport */ glViewport( 0, 0, (GLint) texture->size.w, (GLint) texture->size.h ); gears_draw( false ); /* Unbind the OpenGL rendering context */ test->gl2context->Unbind( test->gl2context ); return DFB_OK; } /**********************************************************************************************************************/ /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; bool quit = false; Test test; ret = Initialize( &test, &argc, &argv ); if (ret) goto error; ret = InitGL( &test ); if (ret) goto error; ret = InitTexture( &test, &test.texture, 256, 256 ); if (ret) goto error; /* * Main Loop */ while (!quit) { static int frames = 0; static double tRot0 = -1.0, tRate0 = -1.0; double dt, t = direct_clock_get_millis() / 1000.0; if (tRot0 < 0.0) tRot0 = t; dt = t - tRot0; tRot0 = t; /* advance rotation for next frame */ angle += 70.0 * dt; /* 70 degrees per second */ if (angle > 3600.0) angle -= 3600.0; ret = RenderTexture( &test, &test.texture ); if (ret) goto error; ret = RenderGL( &test ); if (ret) goto error; /* * Show the rendered buffer */ test.primary->Flip( test.primary, NULL, DSFLIP_ONSYNC ); frames++; if (tRate0 < 0.0) tRate0 = t; if (t - tRate0 >= 5.0) { GLfloat seconds = t - tRate0; GLfloat fps = frames / seconds; printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, fps); tRate0 = t; frames = 0; } DFBInputEvent evt; /* * Process events */ while (test.events->GetEvent( test.events, DFB_EVENT(&evt) ) == DFB_OK) { switch (evt.type) { case DIET_KEYPRESS: switch (evt.key_symbol) { case DIKS_ESCAPE: quit = true; break; case DIKS_CURSOR_UP: inc_rotx = 5.0; break; case DIKS_CURSOR_DOWN: inc_rotx = -5.0; break; case DIKS_CURSOR_LEFT: inc_roty = 5.0; break; case DIKS_CURSOR_RIGHT: inc_roty = -5.0; break; case DIKS_PAGE_UP: inc_rotz = 5.0; break; case DIKS_PAGE_DOWN: inc_rotz = -5.0; break; default: ; } break; case DIET_KEYRELEASE: switch (evt.key_symbol) { case DIKS_CURSOR_UP: inc_rotx = 0; break; case DIKS_CURSOR_DOWN: inc_rotx = 0; break; case DIKS_CURSOR_LEFT: inc_roty = 0; break; case DIKS_CURSOR_RIGHT: inc_roty = 0; break; case DIKS_PAGE_UP: inc_rotz = 0; break; case DIKS_PAGE_DOWN: inc_rotz = 0; break; default: ; } break; case DIET_AXISMOTION: if (evt.flags & DIEF_AXISREL) { switch (evt.axis) { case DIAI_X: view_rot[1] += evt.axisrel / 2.0; break; case DIAI_Y: view_rot[0] += evt.axisrel / 2.0; break; case DIAI_Z: view_rot[2] += evt.axisrel / 2.0; break; default: ; } } break; default: ; } } view_rot[0] += inc_rotx; view_rot[1] += inc_roty; view_rot[2] += inc_rotz; } error: Shutdown( &test ); return ret; } DirectFB-1.7.7/tests/dfbtest_waitserial.c0000644000175000017500000001671512254435330015271 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include static const DirectFBPixelFormatNames( format_names ); /**********************************************************************************************************************/ static DFBBoolean parse_format( const char *arg, DFBSurfacePixelFormat *_f ) { int i = 0; while (format_names[i].format != DSPF_UNKNOWN) { if (!strcasecmp( arg, format_names[i].name )) { *_f = format_names[i].format; return DFB_TRUE; } ++i; } fprintf (stderr, "\nInvalid format specified!\n\n" ); return DFB_FALSE; } static int print_usage( const char *prg ) { int i = 0; fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Blitting Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -d, --dest Destination pixel format\n"); return -1; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { int i; DFBResult ret; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBSurface *dest1 = NULL; IDirectFBSurface *dest2 = NULL; DFBSurfacePixelFormat dest_format = DSPF_UNKNOWN; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Blit: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iCreateSurface( dfb, &desc, &dest1 ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateSurface() failed!\n" ); goto out; } /* Create second surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest2 ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateSurface() failed!\n" ); goto out; } dest1->GetSize( dest1, &desc.width, &desc.height ); dest1->GetPixelFormat( dest1, &desc.pixelformat ); D_INFO( "DFBTest/Blit: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); direct_log_printf( NULL, "\nLock should take less than WaitIdle. WaitIdle should not take minimal amount of time.\n\n" ); for (i=0; i<100; i++) { int j, n = rand()%1000 + 100; void *ptr; int pitch; for (j=0; j<10; j++) dest1->FillRectangle( dest1, 0, 0, desc.width, desc.height ); for (j=0; jFillRectangle( dest2, 0, 0, desc.width, desc.height ); long long t1 = direct_clock_get_abs_micros(); dest1->Lock( dest1, DSLF_READ, &ptr, &pitch ); dest1->Unlock( dest1 ); long long t2 = direct_clock_get_abs_micros(); dfb->WaitIdle( dfb ); long long t3 = direct_clock_get_abs_micros(); direct_log_printf( NULL, "Lock took %lld us, WaitIdle took additional %lld us\n", t2 - t1, t3 - t2 ); } out: if (dest2) dest2->Release( dest2 ); if (dest1) dest1->Release( dest1 ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_window_flip.c0000644000175000017500000002170012254435330015434 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include typedef struct { int magic; int frames; float fps; long long fps_time; char fps_string[20]; } FPSData; static inline void fps_init( FPSData *data ) { D_ASSERT( data != NULL ); memset( data, 0, sizeof(FPSData) ); data->fps_time = direct_clock_get_millis(); D_MAGIC_SET( data, FPSData ); } static inline void fps_count( FPSData *data, int interval ) { long long diff; long long now = direct_clock_get_millis(); D_MAGIC_ASSERT( data, FPSData ); data->frames++; diff = now - data->fps_time; if (diff >= interval) { data->fps = data->frames * 1000 / (float) diff; snprintf( data->fps_string, sizeof(data->fps_string), "%.1f", data->fps ); data->fps_time = now; data->frames = 0; } } static int show_usage( const char *prg ) { fprintf( stderr, "Usage: %s \n", prg ); return -1; } static IDirectFBFont *font; typedef struct { IDirectFBWindow *window; IDirectFBSurface *surface; int index; FPSData fps; DFBDimension resolution; int anim_dirx; int anim_diry; int anim_x; int anim_y; } App; static DFBResult app_init( App *app, IDirectFBDisplayLayer *layer, int x, int y, int width, int height, int index ) { DFBResult ret; DFBWindowDescription desc; IDirectFBWindow *window; IDirectFBSurface *surface; desc.flags = DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_POSX | DWDESC_POSY | DWDESC_CAPS; desc.width = width; desc.height = height; desc.posx = x; desc.posy = y; desc.caps = DWCAPS_NONE; //| DWCAPS_ALPHACHANNEL | DWCAPS_DOUBLEBUFFER; /* Create a surface for the image. */ ret = layer->CreateWindow( layer, &desc, &window ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: IDirectFBDisplayLayer::CreateWindow() failed!\n" ); return ret; } /* Get the surface. */ ret = window->GetSurface( window, &surface ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: IDirectFBWindow::GetSurface() failed!\n" ); return ret; } surface->Clear( surface, 0, 0, 0, 0 ); window->SetOpacity( window, 0xff ); surface->Flip( surface, NULL, DSFLIP_NONE ); app->window = window; app->surface = surface; app->index = index; app->resolution.w = width; app->resolution.h = height; app->anim_dirx = 5; app->anim_diry = 5; app->anim_x = 0; app->anim_y = 0; fps_init( &app->fps ); return DFB_OK; } static void app_update( App *app ) { static const DFBColor colors[3] = { { 0xff, 0x30, 0xc0, 0xff }, { 0xff, 0xff, 0xff, 0x30 }, { 0xff, 0x30, 0xff, 0xc0 } }; static const DFBPoint offsets[3] = { { 10, 10 }, { 30, 20 }, { 50, 30 } }; IDirectFBSurface *surface = app->surface; surface->Clear( surface, 0xff, 0xff, 0xff, 0x20 ); surface->SetColor( surface, colors[app->index].r, colors[app->index].g, colors[app->index].b, colors[app->index].a ); surface->FillRectangle( surface, app->anim_x, app->anim_y, 40, 300 ); surface->SetFont( surface, font ); surface->SetColor( surface, colors[app->index].r/2, colors[app->index].g/2, colors[app->index].b/2, colors[app->index].a ); surface->DrawString( surface, app->fps.fps_string, -1, offsets[app->index].x + 30, offsets[app->index].y + 30, DSTF_TOPLEFT ); surface->Flip( surface, NULL, DSFLIP_WAITFORSYNC ); app->anim_x += app->anim_dirx; if (app->anim_x >= app->resolution.w - 40) app->anim_dirx = -5; else if (app->anim_x <= 0) app->anim_dirx = 5; app->anim_y += app->anim_diry; if (app->anim_y >= app->resolution.h - 300) app->anim_diry = -5; else if (app->anim_y <= 0) app->anim_diry = 5; fps_count( &app->fps, 1000 ); } void * app_thread( DirectThread *thread, void *arg ); void * app_thread( DirectThread *thread, void *arg ) { App *app = arg; while (true) { app_update( app ); // usleep( 10000 ); } } int main( int argc, char *argv[] ) { int i; DFBResult ret; IDirectFB *dfb; IDirectFBScreen *screen = NULL; IDirectFBDisplayLayer *layer = NULL; App apps[3]; DFBDisplayLayerConfig config; /* Parse arguments. */ for (i=1; iCreateFont( dfb, DATADIR "/decker.dgiff", &desc, &font ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: IDirectFB::CreateFont( " DATADIR "/decker.dgiff ) failed!\n" ); goto out; } /* Get primary screen. */ ret = dfb->GetScreen( dfb, DSCID_PRIMARY, &screen ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: IDirectFB::GetScreen( PRIMARY ) failed!\n" ); goto out; } /* Get primary layer. */ ret = dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: IDirectFB::GetDisplayLayer( PRIMARY ) failed!\n" ); goto out; } layer->GetConfiguration( layer, &config ); app_init( &apps[0], layer, 50, 50, config.width-400, config.height-100, 0 ); // app_init( &apps[1], layer, 0, 0, 300, 700, 1 ); // app_init( &apps[2], layer, width, height, 2 ); // while (1) { // app_update( &apps[0] ); // app_update( &apps[1] ); // app_update( &apps[2] ); // } direct_thread_create( DTT_DEFAULT, app_thread, &apps[0], "App 0" ); // direct_thread_create( DTT_DEFAULT, app_thread, &apps[1], "App 1" ); // direct_thread_create( DTT_DEFAULT, app_thread, &apps[2], "App 2" ); while (true) { sleep( 10 ); // IDirectFBSurface *surface; // layer->GetSurface( layer, &surface ); // surface->Dump( surface, "/", "dfbtest_tree" ); } out: /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/voodoo_bench_server_unix.c0000644000175000017500000001516412254435330016504 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define UNIX_PATH_MAX 108 #define VOODOOTEST_METHOD_ID_Push 1 #define VOODOOTEST_METHOD_ID_Sync 2 /**********************************************************************************************************************/ static DirectResult Dispatch_Push( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) { VoodooMessageParser parser; int counter; VOODOO_PARSER_BEGIN( parser, msg ); VOODOO_PARSER_GET_INT( parser, counter ); VOODOO_PARSER_END( parser ); (void)counter; return DR_OK; } static DirectResult Dispatch_Sync( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) { return voodoo_manager_respond( manager, true, msg->header.serial, DR_OK, VOODOO_INSTANCE_NONE, VMBT_NONE ); } static DirectResult Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) { D_DEBUG( "VoodooTest/Dispatch: " "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); switch (msg->method) { case VOODOOTEST_METHOD_ID_Push: return Dispatch_Push( dispatcher, real, manager, msg ); case VOODOOTEST_METHOD_ID_Sync: return Dispatch_Sync( dispatcher, real, manager, msg ); } return DR_NOSUCHMETHOD; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { static const int one = 1; dfb_config_init( &argc, &argv ); /* Initialize libdirect. */ direct_initialize(); // direct_config->log_level = DIRECT_LOG_ALL; direct_log_domain_config_level( "Voodoo/Input", DIRECT_LOG_DEBUG_9 ); direct_log_domain_config_level( "Voodoo/Output", DIRECT_LOG_DEBUG_9 ); direct_log_domain_config_level( "Voodoo/Dispatch", DIRECT_LOG_DEBUG_9 ); direct_log_domain_config_level( "Voodoo/Manager", DIRECT_LOG_DEBUG_9 ); int lfd; VoodooLink link; VoodooManager *manager; VoodooInstanceID instance; struct sockaddr_un addr; socklen_t addrlen = sizeof(addr); /* Create the player socket. */ lfd = socket( PF_UNIX, SOCK_STREAM, 0 ); if (lfd < 0) { D_PERROR( "Voodoo/Player: Could not create the Unix Domain socket!" ); return -1; } /* Allow reuse of local address. */ if (setsockopt( lfd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one) ) < 0) D_PERROR( "Voodoo/Player: Could not set SO_REUSEADDR on Unix Domain socket!\n" ); memset( &addr, 0, sizeof(addr) ); /* Bind the socket to the local port. */ addr.sun_family = AF_UNIX; snprintf( addr.sun_path + 1, UNIX_PATH_MAX - 1, "VoodooBench" ); if (bind( lfd, (struct sockaddr*) &addr, strlen(addr.sun_path+1)+1 + sizeof(addr.sun_family) )) { D_PERROR( "Voodoo/Player: Could not bind() the Unix Domain socket!\n" ); close( lfd ); return -2; } /* Start listening. */ if (listen( lfd, 4 )) { D_PERROR( "Voodoo/Server: Could not listen() to the socket!\n" ); return -3; } struct pollfd pf; int cfd = -1; pf.fd = lfd; pf.events = POLLIN; while (cfd == -1) { switch (poll( &pf, 1, 20000 )) { default: cfd = accept( lfd, &addr, &addrlen ); if (cfd < 0) { D_PERROR( "Voodoo/Server: Could not accept() incoming connection!\n" ); return -4; } break; case 0: D_ERROR( " -> Timeout during poll()!?\n" ); break; case -1: if (errno != EINTR) { D_PERROR( "Voodoo/Server: Could not poll() the socket!\n" ); return -5; } break; } } int fds[2] = { cfd, cfd }; voodoo_link_init_fd( &link, fds ); voodoo_manager_create( &link, NULL, NULL, &manager ); voodoo_manager_register_local( manager, VOODOO_INSTANCE_NONE, NULL, NULL, Dispatch, &instance ); pause(); /* Shutdown libdirect. */ direct_shutdown(); return 0; } DirectFB-1.7.7/tests/dfbtest_surface_compositor_threads.c0000644000175000017500000002752212254435330020543 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include typedef struct { int magic; int frames; float fps; long long fps_time; char fps_string[20]; } FPSData; static inline void fps_init( FPSData *data ) { D_ASSERT( data != NULL ); memset( data, 0, sizeof(FPSData) ); data->fps_time = direct_clock_get_millis(); D_MAGIC_SET( data, FPSData ); } static inline void fps_count( FPSData *data, int interval ) { long long diff; long long now = direct_clock_get_millis(); D_MAGIC_ASSERT( data, FPSData ); data->frames++; diff = now - data->fps_time; if (diff >= interval) { data->fps = data->frames * 1000 / (float) diff; snprintf( data->fps_string, sizeof(data->fps_string), "%.1f", data->fps ); data->fps_time = now; data->frames = 0; } } static int m_num = 2; /**********************************************************************************************************************/ static int print_usage( const char *prg ) { fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Surface Compositor Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -n, --num Number of surfaces to create\n"); return -1; } /**********************************************************************************************************************/ typedef struct { IDirectFBSurface *destination; IDirectFBSurface *source; DFBColor color; } BlittingThreadContext; static void * blitting_thread_render( DirectThread *thread, void *arg ) { int i; BlittingThreadContext *ctx = arg; while (true) { ctx->destination->Clear( ctx->destination, 0x22, 0x33, 0x44, 0xff ); for (i=0; i<200; i++) { ctx->destination->Blit( ctx->destination, ctx->source, NULL, i*2, i*2 ); } /* Flush (single buffered Flip just flushes) */ ctx->destination->Flip( ctx->destination, NULL, DSFLIP_NONE ); //usleep(1000); } return NULL; } int main( int argc, char *argv[] ) { DFBResult ret; int i, width, height; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBEventBuffer *events; IDirectFBSurface *primary = NULL; IDirectFBSurface **surfaces = NULL; bool update = true; DirectHash surface_map; IDirectFBSurface **sources = NULL; DirectThread **threads = NULL; BlittingThreadContext *contexts = NULL; FPSData fps; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceCompositor: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iCreateEventBuffer( dfb, &events ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceCompositor: IDirectFB::CreateEventBuffer() failed!\n" ); goto out; } surfaces = D_CALLOC( m_num, sizeof(IDirectFBSurface*) ); if (!surfaces) { ret = D_OOM(); goto out; } sources = D_CALLOC( m_num, sizeof(IDirectFBSurface*) ); if (!sources) { ret = D_OOM(); goto out; } threads = D_CALLOC( m_num, sizeof(DirectThread*) ); if (!threads) { ret = D_OOM(); goto out; } contexts = D_CALLOC( m_num, sizeof(BlittingThreadContext) ); if (!contexts) { ret = D_OOM(); goto out; } direct_hash_init( &surface_map, 17 ); dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Fill description for a primary surface. */ desc.flags = DSDESC_CAPS; desc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING; /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &primary ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceCompositor: IDirectFB::CreateSurface() failed!\n" ); goto out; } primary->GetSize( primary, &width, &height ); for (i=0; iCreateSurface( dfb, &desc, &surfaces[i] ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceCompositor: IDirectFB::CreateSurface() failed!\n" ); goto out; } surfaces[i]->MakeClient( surfaces[i] ); /* Create event buffer */ ret = surfaces[i]->AttachEventBuffer( surfaces[i], events ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceCompositor: IDirectFBSurface::AttachEventBuffer() failed!\n" ); goto out; } surfaces[i]->GetID( surfaces[i], &surface_id ); surfaces[i]->AllowAccess( surfaces[i], "*" ); D_INFO( "DFBTest/SurfaceCompositor: Surface %d has ID %d\n", i+1, surface_id ); direct_hash_insert( &surface_map, surface_id, surfaces[i] ); /* Fill description for a source surface. */ desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT; desc.width = 64; desc.height = 64; /* Create a source surface. */ ret = dfb->CreateSurface( dfb, &desc, &sources[i] ); if (ret) { D_DERROR( ret, "DFBTest/BlitThreads: IDirectFB::CreateSurface() failed!\n" ); goto out; } surfaces[i]->GetSubSurface( surfaces[i], NULL, &contexts[i].destination ); //contexts[i].destination = surfaces[i]; contexts[i].source = sources[i]; contexts[i].color = (DFBColor){ 0xff, 0x55 + i * 0x22, 0x11 + i * 0x77, 0xdd + i * 0x55 }; sources[i]->Clear( sources[i], contexts[i].color.r, contexts[i].color.g, contexts[i].color.b, contexts[i].color.a ); sources[i]->Flip( sources[i], NULL, DSFLIP_NONE ); threads[i] = direct_thread_create( DTT_DEFAULT, blitting_thread_render, &contexts[i], "Blit" ); } fps_init( &fps ); while (true) { DFBEvent event; IDirectFBSurface *surface; while (events->GetEvent( events, &event ) == DFB_OK) { switch (event.clazz) { case DFEC_SURFACE: switch (event.surface.type) { case DSEVT_UPDATE: update = true; surface = direct_hash_lookup( &surface_map, event.surface.surface_id ); if (surface) surface->FrameAck( surface, event.surface.flip_count ); else D_BUG( "Surface with ID %u not found", event.surface.surface_id ); break; default: break; } break; default: break; } } if (update) { primary->Clear( primary, 0, 0, 0, 0x80 ); for (i=0; iBlit( primary, surfaces[i], NULL, 20 + 20 * i, 20 + 20 * i ); } primary->Flip( primary, NULL, DSFLIP_NONE ); update = false; fps_count( &fps, 1000 ); if (!fps.frames) printf( "FPS: %s\n", fps.fps_string ); } } out: if (sources) { for (i=0; iRelease( sources[i] ); } D_FREE( sources ); } if (surfaces) { for (i=0; iRelease( surfaces[i] ); } D_FREE( surfaces ); } if (contexts) { for (i=0; iRelease( contexts[i].destination ); } D_FREE( contexts ); } if (threads) D_FREE( threads ); if (primary) primary->Release( primary ); if (events) events->Release( events ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/fdtest_init.c0000644000175000017500000001023512254435330013715 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include /**********************************************************************************************************************/ static bool parse_command_line( int argc, char *argv[] ); /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DirectResult ret; IFusionDale *dale = NULL; /* Initialize FusionDale including command line parsing. */ ret = FusionDaleInit( &argc, &argv ); if (ret) { D_DERROR( ret, "FusionDale/Master: FusionDaleInit() failed!\n" ); goto out; } /* Parse the command line. */ if (!parse_command_line( argc, argv )) goto out; /* Create the super interface. */ ret = FusionDaleCreate( &dale ); if (ret) { D_DERROR( ret, "FusionDale/Master: FusionDaleCreate() failed!\n" ); goto out; } /* Create the super interface. */ ret = FusionDaleCreate( &dale ); if (ret) { D_DERROR( ret, "FusionDale/Master: FusionDaleCreate() failed!\n" ); goto out; } sleep( 1 ); out: /* Release the super interface. */ if (dale) { dale->Release( dale ); dale->Release( dale ); } return ret; } /**********************************************************************************************************************/ static void print_usage (const char *prg_name) { fprintf (stderr, "\nFusionDale Init Test (version %s)\n\n", DIRECTFB_VERSION); fprintf (stderr, "Usage: %s [options]\n\n", prg_name); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h --help Show this help message\n"); fprintf (stderr, " -v --version Print version information\n"); fprintf (stderr, "\n"); } static bool parse_command_line( int argc, char *argv[] ) { int n; for (n = 1; n < argc; n++) { const char *arg = argv[n]; if (strcmp (arg, "-h") == 0 || strcmp (arg, "--help") == 0) { print_usage (argv[0]); return false; } if (strcmp (arg, "-v") == 0 || strcmp (arg, "--version") == 0) { fprintf (stderr, "fdtest_coma version %s\n", DIRECTFB_VERSION); return false; } print_usage (argv[0]); return false; } return true; } DirectFB-1.7.7/tests/voodoo_bench_server.c0000644000175000017500000001414512254435330015437 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define VOODOOTEST_METHOD_ID_Push 1 #define VOODOOTEST_METHOD_ID_Sync 2 /**********************************************************************************************************************/ static DirectResult Dispatch_Push( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) { VoodooMessageParser parser; int counter; VOODOO_PARSER_BEGIN( parser, msg ); VOODOO_PARSER_GET_INT( parser, counter ); VOODOO_PARSER_END( parser ); (void)counter; return DR_OK; } static DirectResult Dispatch_Sync( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) { return voodoo_manager_respond( manager, true, msg->header.serial, DR_OK, VOODOO_INSTANCE_NONE, VMBT_NONE ); } static DirectResult Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) { D_DEBUG( "VoodooTest/Dispatch: " "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); switch (msg->method) { case VOODOOTEST_METHOD_ID_Push: return Dispatch_Push( dispatcher, real, manager, msg ); case VOODOOTEST_METHOD_ID_Sync: return Dispatch_Sync( dispatcher, real, manager, msg ); } return DR_NOSUCHMETHOD; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { static const int one = 1; dfb_config_init( &argc, &argv ); /* Initialize libdirect. */ direct_initialize(); int lfd; VoodooLink link; VoodooManager *manager; VoodooInstanceID instance; struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); /* Create the server socket. */ lfd = socket( PF_INET, SOCK_STREAM, 0 ); if (lfd < 0) { D_PERROR( "Voodoo/Server: Could not create the socket via socket()!\n" ); return -1; } /* Allow reuse of local address. */ if (setsockopt( lfd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one) ) < 0) D_PERROR( "Voodoo/Server: Could not set SO_REUSEADDR!\n" ); /* Bind the socket to the local port. */ addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr( "0.0.0.0" ); addr.sin_port = htons( 23239 ); if (bind( lfd, &addr, sizeof(addr) )) { D_PERROR( "Voodoo/Server: Could not bind() the socket!\n" ); return -2; } /* Start listening. */ if (listen( lfd, 4 )) { D_PERROR( "Voodoo/Server: Could not listen() to the socket!\n" ); return -3; } struct pollfd pf; int cfd = -1; pf.fd = lfd; pf.events = POLLIN; while (cfd == -1) { switch (poll( &pf, 1, 20000 )) { default: cfd = accept( lfd, &addr, &addrlen ); if (cfd < 0) { D_PERROR( "Voodoo/Server: Could not accept() incoming connection!\n" ); return -4; } break; case 0: D_ERROR( " -> Timeout during poll()!?\n" ); break; case -1: if (errno != EINTR) { D_PERROR( "Voodoo/Server: Could not poll() the socket!\n" ); return -5; } break; } } int fds[2] = { cfd, cfd }; voodoo_link_init_fd( &link, fds ); voodoo_manager_create( &link, NULL, NULL, &manager ); voodoo_manager_register_local( manager, VOODOO_INSTANCE_NONE, NULL, NULL, Dispatch, &instance ); pause(); /* Shutdown libdirect. */ direct_shutdown(); return 0; } DirectFB-1.7.7/tests/dfbtest_video.c0000644000175000017500000001755412254435330014235 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include static const DirectFBPixelFormatNames( format_names ); /**********************************************************************************************************************/ static DFBBoolean parse_format( const char *arg, DFBSurfacePixelFormat *_f ) { int i = 0; while (format_names[i].format != DSPF_UNKNOWN) { if (!direct_strcasecmp( arg, format_names[i].name )) { *_f = format_names[i].format; return DFB_TRUE; } ++i; } fprintf (stderr, "\nInvalid format specified!\n\n" ); return DFB_FALSE; } static int print_usage( const char *prg ) { int i = 0; fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Video Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -f, --format Pixel format for output\n"); fprintf (stderr, " -l, --loop Looping playback\n"); return -1; } /**********************************************************************************************************************/ static void Frame_Callback( void *ctx ) { IDirectFBSurface *surface = ctx; surface->Flip( surface, NULL, DSFLIP_NONE ); } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { int i; DFBResult ret; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBVideoProvider *provider = NULL; IDirectFBSurface *dest = NULL; const char *url = NULL; DFBSurfacePixelFormat dest_format = DSPF_UNKNOWN; bool loop = false; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Video: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iCreateVideoProvider( dfb, url, &provider ); if (ret) { D_DERROR( ret, "DFBTest/Video: IDirectFB::CreateVideoProvider( '%s' ) failed!\n", url ); goto out; } /* Get the surface description. */ ret = provider->GetSurfaceDescription( provider, &desc ); if (ret) { D_DERROR( ret, "DFBTest/Video: IDirectFBVideoProvider::GetSurfaceDescription() failed!\n" ); goto out; } if (dest_format) desc.pixelformat = dest_format; D_INFO( "DFBTest/Video: Video is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Adjust description for a primary surface. */ desc.flags |= DSDESC_CAPS; desc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING; dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/Video: IDirectFB::CreateSurface() failed!\n" ); goto out; } D_INFO( "DFBTest/Blit: Playing...\n" ); provider->PlayTo( provider, dest, NULL, Frame_Callback, dest ); if (loop) { provider->SetPlaybackFlags( provider, DVPLAY_LOOPING ); pause(); } else { DFBVideoProviderStatus status; do { direct_thread_sleep( 100000 ); provider->GetStatus( provider, &status ); } while (status != DVSTATE_FINISHED); } out: if (dest) dest->Release( dest ); if (provider) provider->Release( provider ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_scale.c0000644000175000017500000001200712254435330014202 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include static int show_usage( const char *prg ) { fprintf( stderr, "Usage: %s \n", prg ); return -1; } int main( int argc, char *argv[] ) { int i; DFBResult ret; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBImageProvider *provider = NULL; IDirectFBSurface *source = NULL; IDirectFBSurface *dest = NULL; const char *url = NULL; /* Parse arguments. */ for (i=1; iCreateImageProvider( dfb, url, &provider ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFB::CreateImageProvider( '%s' ) failed!\n", url ); goto out; } /* Get the surface description. */ ret = provider->GetSurfaceDescription( provider, &desc ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFBImageProvider::GetSurfaceDescription() failed!\n" ); goto out; } desc.pixelformat = DSPF_LUT8; D_INFO( "DFBTest/Scale: Source is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Create a surface for the image. */ ret = dfb->CreateSurface( dfb, &desc, &source ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFB::CreateSurface() failed!\n" ); goto out; } ret = provider->RenderTo( provider, source, NULL ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFBImageProvider::RenderTo() failed!\n" ); goto out; } desc.width = desc.width * 3 / 4; desc.height = desc.height * 3 / 4; if (DFB_PIXELFORMAT_IS_INDEXED( desc.pixelformat )) desc.pixelformat = DSPF_ARGB; D_INFO( "DFBTest/Scale: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Create a surface for the image. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFB::CreateSurface() failed!\n" ); goto out; } dest->SetBlittingFlags( dest, DSBLIT_SRC_PREMULTIPLY ); dest->StretchBlit( dest, source, NULL, NULL ); dest->Dump( dest, "dfbtest_scale", NULL ); out: if (dest) dest->Release( dest ); if (source) source->Release( source ); if (provider) provider->Release( provider ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_stereo.c0000644000175000017500000001110412254435330014411 00000000000000#include #include #define APP "dfbtest_stereo" int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb = NULL; IDirectFBDisplayLayer *layer = NULL; IDirectFBSurface *surface = NULL; IDirectFBScreen *screen = NULL; int width, height; DFBDisplayLayerConfig layer_config; DFBScreenEncoderConfig encoder_config; ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, APP ": DirectFBInit() failed!\n" ); goto out; } ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, APP ": DirectFBCreate() failed!\n" ); goto out; } /* Wait for TV to sync and stuff. */ usleep(300000); /* Setup screen. */ ret = dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ); if (ret) { D_DERROR( ret, APP ": IDirectFB::GetDisplayLayer() failed!\n" ); goto out; } ret = layer->GetScreen( layer, &screen ); if (ret) { D_DERROR( ret, APP ": IDirectFBDisplayLayer::GetScreen() failed!\n" ); goto out; } encoder_config.flags = (DFBScreenEncoderConfigFlags)(DSECONF_TV_STANDARD | DSECONF_SCANMODE | DSECONF_FREQUENCY | DSECONF_CONNECTORS | DSECONF_RESOLUTION | DSECONF_FRAMING); encoder_config.tv_standard = DSETV_DIGITAL; encoder_config.out_connectors = (DFBScreenOutputConnectors)(DSOC_COMPONENT | DSOC_HDMI); encoder_config.scanmode = DSESM_PROGRESSIVE; encoder_config.frequency = DSEF_24HZ; encoder_config.framing = DSEPF_STEREO_FRAME_PACKING; encoder_config.resolution = DSOR_1920_1080; ret = screen->SetEncoderConfiguration( screen, 0, &encoder_config); if (ret) { encoder_config.frequency = DSEF_60HZ; encoder_config.framing = DSEPF_STEREO_SIDE_BY_SIDE_HALF; encoder_config.resolution = DSOR_1280_720; ret = screen->SetEncoderConfiguration( screen, 0, &encoder_config); if (ret) { D_DERROR( ret, APP ": IDirectFBScreen::TestEncoderConfig() failed!\n" ); goto out; } } /* * Setup primary layer as stereo. */ ret = layer->SetCooperativeLevel( layer, DLSCL_EXCLUSIVE ); if (ret) { D_DERROR( ret, APP ": IDirectFBDisplayLayer::SetCooperativeLevel() failed!\n" ); goto out; } layer_config.flags = (DFBDisplayLayerConfigFlags)(DLCONF_SURFACE_CAPS | DLCONF_OPTIONS | DLCONF_BUFFERMODE); layer_config.options = (DFBDisplayLayerOptions)(DLOP_STEREO | DLOP_ALPHACHANNEL); layer_config.surface_caps = (DFBSurfaceCapabilities)(DSCAPS_PREMULTIPLIED | DSCAPS_VIDEOONLY | DSCAPS_STEREO); layer_config.buffermode = DLBM_BACKVIDEO; ret = layer->SetConfiguration( layer, &layer_config ); if (ret) { D_DERROR( ret, APP ": IDirectFBDisplayLayer::SetConfiguration() failed!\n" ); goto out; } ret = layer->GetSurface( layer, &surface ); if (ret) { D_DERROR( ret, APP ": IDirectFBDisplayLayer::GetSurface() failed!\n" ); goto out; } surface->GetSize( surface, &width, &height ); printf( "Layer resolution is %dx%d\n", width, height ); while (true) { /* * Draw left */ surface->SetStereoEye( surface, DSSE_LEFT ); surface->Clear( surface, 0, 0, 0, 0 ); surface->SetColor( surface, 0xff, 0xff, 0xff, 0xff ); surface->FillRectangle( surface, 200, 200, 500, 500 ); surface->SetColor( surface, 0x00, 0x00, 0xff, 0xff ); surface->FillRectangle( surface, 310, 400, 500, 500 ); /* * Draw right */ surface->SetStereoEye( surface, DSSE_RIGHT ); surface->Clear( surface, 0, 0, 0, 0 ); surface->SetColor( surface, 0xff, 0xff, 0xff, 0xff ); // surface->FillRectangle( surface, 200, 200, 500, 500 ); surface->SetColor( surface, 0x00, 0x00, 0xff, 0xff ); surface->FillRectangle( surface, 290, 400, 500, 500 ); /* * Flip both */ surface->FlipStereo( surface, NULL, NULL, DSFLIP_WAITFORSYNC ); } out: if (screen) screen->Release( screen ); if (surface) surface->Release( surface ); if (layer) layer->Release( layer ); if (dfb) dfb->Release( dfb ); return 0; } DirectFB-1.7.7/tests/dfbtest_old_gl2.c0000644000175000017500000006430712254435330014447 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #define GL_GLEXT_PROTOTYPES #include #define STRIPS_PER_TOOTH 7 #define VERTICES_PER_TOOTH 34 #define GEAR_VERTEX_STRIDE 6 /** * Struct describing the vertices in triangle strip */ struct vertex_strip { /** The first vertex in the strip */ GLint first; /** The number of consecutive vertices in the strip after the first */ GLint count; }; /* Each vertex consist of GEAR_VERTEX_STRIDE GLfloat attributes */ typedef GLfloat GearVertex[GEAR_VERTEX_STRIDE]; /** * Struct representing a gear. */ struct gear { /** The array of vertices comprising the gear */ GearVertex *vertices; /** The number of vertices comprising the gear */ int nvertices; /** The array of triangle strips comprising the gear */ struct vertex_strip *strips; /** The number of triangle strips comprising the gear */ int nstrips; /** The Vertex Buffer Object holding the vertices in the graphics card */ GLuint vbo; }; /** The view rotation [x, y, z] */ static GLfloat view_rot[3] = { 20.0, 30.0, 0.0 }; static GLfloat inc_rotx = 0, inc_roty = 0, inc_rotz = 0; /** The gears */ static struct gear *gear1, *gear2, *gear3; /** The current gear rotation angle */ static GLfloat angle = 0.0; /** The location of the shader uniforms */ static GLuint ModelViewProjectionMatrix_location, NormalMatrix_location, LightSourcePosition_location, MaterialColor_location; /** The projection matrix */ static GLfloat ProjectionMatrix[16]; /** The direction of the directional light for the scene */ static const GLfloat LightSourcePosition[4] = { 5.0, 5.0, 10.0, 1.0}; /** * Fills a gear vertex. * * @param v the vertex to fill * @param x the x coordinate * @param y the y coordinate * @param z the z coortinate * @param n pointer to the normal table * * @return the operation error code */ static GearVertex * vert(GearVertex *v, GLfloat x, GLfloat y, GLfloat z, GLfloat n[3]) { v[0][0] = x; v[0][1] = y; v[0][2] = z; v[0][3] = n[0]; v[0][4] = n[1]; v[0][5] = n[2]; return v + 1; } /** * Create a gear wheel. * * @param inner_radius radius of hole at center * @param outer_radius radius at center of teeth * @param width width of gear * @param teeth number of teeth * @param tooth_depth depth of tooth * * @return pointer to the constructed struct gear */ static struct gear * create_gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth) { GLfloat r0, r1, r2; GLfloat da; GearVertex *v; struct gear *gear; double s[5], c[5]; GLfloat normal[3]; int cur_strip = 0; int i; /* Allocate memory for the gear */ gear = malloc(sizeof *gear); if (gear == NULL) return NULL; /* Calculate the radii used in the gear */ r0 = inner_radius; r1 = outer_radius - tooth_depth / 2.0; r2 = outer_radius + tooth_depth / 2.0; da = 2.0 * M_PI / teeth / 4.0; /* Allocate memory for the triangle strip information */ gear->nstrips = STRIPS_PER_TOOTH * teeth; gear->strips = calloc(gear->nstrips, sizeof (*gear->strips)); /* Allocate memory for the vertices */ gear->vertices = calloc(VERTICES_PER_TOOTH * teeth, sizeof(*gear->vertices)); v = gear->vertices; for (i = 0; i < teeth; i++) { /* Calculate needed sin/cos for varius angles */ sincos(i * 2.0 * M_PI / teeth, &s[0], &c[0]); sincos(i * 2.0 * M_PI / teeth + da, &s[1], &c[1]); sincos(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]); sincos(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]); sincos(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]); /* A set of macros for making the creation of the gears easier */ #define GEAR_POINT(r, da) { (r) * c[(da)], (r) * s[(da)] } #define SET_NORMAL(x, y, z) do { \ normal[0] = (x); normal[1] = (y); normal[2] = (z); \ } while(0) #define GEAR_VERT(v, point, sign) vert((v), p[(point)].x, p[(point)].y, (sign) * width * 0.5, normal) #define START_STRIP do { \ gear->strips[cur_strip].first = v - gear->vertices; \ } while(0); #define END_STRIP do { \ int _tmp = (v - gear->vertices); \ gear->strips[cur_strip].count = _tmp - gear->strips[cur_strip].first; \ cur_strip++; \ } while (0) #define QUAD_WITH_NORMAL(p1, p2) do { \ SET_NORMAL((p[(p1)].y - p[(p2)].y), -(p[(p1)].x - p[(p2)].x), 0); \ v = GEAR_VERT(v, (p1), -1); \ v = GEAR_VERT(v, (p1), 1); \ v = GEAR_VERT(v, (p2), -1); \ v = GEAR_VERT(v, (p2), 1); \ } while(0) struct point { GLfloat x; GLfloat y; }; /* Create the 7 points (only x,y coords) used to draw a tooth */ struct point p[7] = { GEAR_POINT(r2, 1), // 0 GEAR_POINT(r2, 2), // 1 GEAR_POINT(r1, 0), // 2 GEAR_POINT(r1, 3), // 3 GEAR_POINT(r0, 0), // 4 GEAR_POINT(r1, 4), // 5 GEAR_POINT(r0, 4), // 6 }; /* Front face */ START_STRIP; SET_NORMAL(0, 0, 1.0); v = GEAR_VERT(v, 0, +1); v = GEAR_VERT(v, 1, +1); v = GEAR_VERT(v, 2, +1); v = GEAR_VERT(v, 3, +1); v = GEAR_VERT(v, 4, +1); v = GEAR_VERT(v, 5, +1); v = GEAR_VERT(v, 6, +1); END_STRIP; /* Inner face */ START_STRIP; QUAD_WITH_NORMAL(4, 6); END_STRIP; /* Back face */ START_STRIP; SET_NORMAL(0, 0, -1.0); v = GEAR_VERT(v, 6, -1); v = GEAR_VERT(v, 5, -1); v = GEAR_VERT(v, 4, -1); v = GEAR_VERT(v, 3, -1); v = GEAR_VERT(v, 2, -1); v = GEAR_VERT(v, 1, -1); v = GEAR_VERT(v, 0, -1); END_STRIP; /* Outer face */ START_STRIP; QUAD_WITH_NORMAL(0, 2); END_STRIP; START_STRIP; QUAD_WITH_NORMAL(1, 0); END_STRIP; START_STRIP; QUAD_WITH_NORMAL(3, 1); END_STRIP; START_STRIP; QUAD_WITH_NORMAL(5, 3); END_STRIP; } gear->nvertices = (v - gear->vertices); /* Store the vertices in a vertex buffer object (VBO) */ glGenBuffers(1, &gear->vbo); glBindBuffer(GL_ARRAY_BUFFER, gear->vbo); glBufferData(GL_ARRAY_BUFFER, gear->nvertices * sizeof(GearVertex), gear->vertices, GL_STATIC_DRAW); return gear; } /** * Multiplies two 4x4 matrices. * * The result is stored in matrix m. * * @param m the first matrix to multiply * @param n the second matrix to multiply */ static void multiply(GLfloat *m, const GLfloat *n) { GLfloat tmp[16]; const GLfloat *row, *column; div_t d; int i, j; for (i = 0; i < 16; i++) { tmp[i] = 0; d = div(i, 4); row = n + d.quot * 4; column = m + d.rem; for (j = 0; j < 4; j++) tmp[i] += row[j] * column[j * 4]; } memcpy(m, &tmp, sizeof tmp); } /** * Rotates a 4x4 matrix. * * @param[in,out] m the matrix to rotate * @param angle the angle to rotate * @param x the x component of the direction to rotate to * @param y the y component of the direction to rotate to * @param z the z component of the direction to rotate to */ static void rotate(GLfloat *m, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { double s, c; sincos(angle, &s, &c); GLfloat r[16] = { x * x * (1 - c) + c, y * x * (1 - c) + z * s, x * z * (1 - c) - y * s, 0, x * y * (1 - c) - z * s, y * y * (1 - c) + c, y * z * (1 - c) + x * s, 0, x * z * (1 - c) + y * s, y * z * (1 - c) - x * s, z * z * (1 - c) + c, 0, 0, 0, 0, 1 }; multiply(m, r); } /** * Translates a 4x4 matrix. * * @param[in,out] m the matrix to translate * @param x the x component of the direction to translate to * @param y the y component of the direction to translate to * @param z the z component of the direction to translate to */ static void translate(GLfloat *m, GLfloat x, GLfloat y, GLfloat z) { GLfloat t[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 1 }; multiply(m, t); } /** * Creates an identity 4x4 matrix. * * @param m the matrix make an identity matrix */ static void identity(GLfloat *m) { GLfloat t[16] = { 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, }; memcpy(m, t, sizeof(t)); } /** * Transposes a 4x4 matrix. * * @param m the matrix to transpose */ static void transpose(GLfloat *m) { GLfloat t[16] = { m[0], m[4], m[8], m[12], m[1], m[5], m[9], m[13], m[2], m[6], m[10], m[14], m[3], m[7], m[11], m[15]}; memcpy(m, t, sizeof(t)); } /** * Inverts a 4x4 matrix. * * This function can currently handle only pure translation-rotation matrices. * Read http://www.gamedev.net/community/forums/topic.asp?topic_id=425118 * for an explanation. */ static void invert(GLfloat *m) { GLfloat t[16]; identity(t); // Extract and invert the translation part 't'. The inverse of a // translation matrix can be calculated by negating the translation // coordinates. t[12] = -m[12]; t[13] = -m[13]; t[14] = -m[14]; // Invert the rotation part 'r'. The inverse of a rotation matrix is // equal to its transpose. m[12] = m[13] = m[14] = 0; transpose(m); // inv(m) = inv(r) * inv(t) multiply(m, t); } /** * Calculate a perspective projection transformation. * * @param m the matrix to save the transformation in * @param fovy the field of view in the y direction * @param aspect the view aspect ratio * @param zNear the near clipping plane * @param zFar the far clipping plane */ static void perspective(GLfloat *m, GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar) { GLfloat tmp[16]; identity(tmp); double sine, cosine, cotangent, deltaZ; GLfloat radians = fovy / 2 * M_PI / 180; deltaZ = zFar - zNear; sincos(radians, &sine, &cosine); if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) return; cotangent = cosine / sine; tmp[0] = cotangent / aspect; tmp[5] = cotangent; tmp[10] = -(zFar + zNear) / deltaZ; tmp[11] = -1; tmp[14] = -2 * zNear * zFar / deltaZ; tmp[15] = 0; memcpy(m, tmp, sizeof(tmp)); } /** * Draws a gear. * * @param gear the gear to draw * @param transform the current transformation matrix * @param x the x position to draw the gear at * @param y the y position to draw the gear at * @param angle the rotation angle of the gear * @param color the color of the gear */ static void draw_gear(struct gear *gear, GLfloat *transform, GLfloat x, GLfloat y, GLfloat angle, const GLfloat color[4]) { GLfloat model_view[16]; GLfloat normal_matrix[16]; GLfloat model_view_projection[16]; /* Translate and rotate the gear */ memcpy(model_view, transform, sizeof (model_view)); translate(model_view, x, y, 0); rotate(model_view, 2 * M_PI * angle / 360.0, 0, 0, 1); /* Create and set the ModelViewProjectionMatrix */ memcpy(model_view_projection, ProjectionMatrix, sizeof(model_view_projection)); multiply(model_view_projection, model_view); glUniformMatrix4fv(ModelViewProjectionMatrix_location, 1, GL_FALSE, model_view_projection); /* * Create and set the NormalMatrix. It's the inverse transpose of the * ModelView matrix. */ memcpy(normal_matrix, model_view, sizeof (normal_matrix)); invert(normal_matrix); transpose(normal_matrix); glUniformMatrix4fv(NormalMatrix_location, 1, GL_FALSE, normal_matrix); /* Set the gear color */ glUniform4fv(MaterialColor_location, 1, color); /* Set the vertex buffer object to use */ glBindBuffer(GL_ARRAY_BUFFER, gear->vbo); /* Set up the position of the attributes in the vertex buffer object */ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), NULL); glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLfloat *) 0 + 3); /* Enable the attributes */ glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); /* Draw the triangle strips that comprise the gear */ int n; for (n = 0; n < gear->nstrips; n++) glDrawArrays(GL_TRIANGLE_STRIP, gear->strips[n].first, gear->strips[n].count); /* Disable the attributes */ glDisableVertexAttribArray(1); glDisableVertexAttribArray(0); } /** * Draws the gears. */ static void gears_draw(void) { const static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 }; const static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 }; const static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 }; GLfloat transform[16]; identity(transform); glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* Translate and rotate the view */ translate(transform, 0, 0, -20); rotate(transform, 2 * M_PI * view_rot[0] / 360.0, 1, 0, 0); rotate(transform, 2 * M_PI * view_rot[1] / 360.0, 0, 1, 0); rotate(transform, 2 * M_PI * view_rot[2] / 360.0, 0, 0, 1); /* Draw the gears */ draw_gear(gear1, transform, -3.0, -2.0, angle, red); draw_gear(gear2, transform, 3.1, -2.0, -2 * angle - 9.0, green); draw_gear(gear3, transform, -3.1, 4.2, -2 * angle - 25.0, blue); } static const char vertex_shader[] = "attribute vec3 position;\n" "attribute vec3 normal;\n" "\n" "uniform mat4 ModelViewProjectionMatrix;\n" "uniform mat4 NormalMatrix;\n" "uniform vec4 LightSourcePosition;\n" "uniform vec4 MaterialColor;\n" "\n" "varying vec4 Color;\n" "\n" "void main(void)\n" "{\n" " // Transform the normal to eye coordinates\n" " vec3 N = normalize(vec3(NormalMatrix * vec4(normal, 1.0)));\n" "\n" " // The LightSourcePosition is actually its direction for directional light\n" " vec3 L = normalize(LightSourcePosition.xyz);\n" "\n" " // Multiply the diffuse value by the vertex color (which is fixed in this case)\n" " // to get the actual color that we will use to draw this vertex with\n" " float diffuse = max(dot(N, L), 0.0);\n" " Color = diffuse * MaterialColor;\n" "\n" " // Transform the position to clip coordinates\n" " gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0);\n" "}"; static const char fragment_shader[] = "precision mediump float;\n" "varying vec4 Color;\n" "\n" "void main(void)\n" "{\n" " gl_FragColor = Color;\n" "}"; static void gears_init(void) { GLuint v, f, program; const char *p; char msg[512]; glEnable(GL_CULL_FACE); glEnable(GL_DEPTH_TEST); /* Compile the vertex shader */ p = vertex_shader; v = glCreateShader(GL_VERTEX_SHADER); glShaderSource(v, 1, &p, NULL); glCompileShader(v); glGetShaderInfoLog(v, sizeof msg, NULL, msg); printf("vertex shader info: %s\n", msg); /* Compile the fragment shader */ p = fragment_shader; f = glCreateShader(GL_FRAGMENT_SHADER); glShaderSource(f, 1, &p, NULL); glCompileShader(f); glGetShaderInfoLog(f, sizeof msg, NULL, msg); printf("fragment shader info: %s\n", msg); /* Create and link the shader program */ program = glCreateProgram(); glAttachShader(program, v); glAttachShader(program, f); glBindAttribLocation(program, 0, "position"); glBindAttribLocation(program, 1, "normal"); glLinkProgram(program); glGetProgramInfoLog(program, sizeof msg, NULL, msg); printf("info: %s\n", msg); /* Enable the shaders */ glUseProgram(program); /* Get the locations of the uniforms so we can access them */ ModelViewProjectionMatrix_location = glGetUniformLocation(program, "ModelViewProjectionMatrix"); NormalMatrix_location = glGetUniformLocation(program, "NormalMatrix"); LightSourcePosition_location = glGetUniformLocation(program, "LightSourcePosition"); MaterialColor_location = glGetUniformLocation(program, "MaterialColor"); /* Set the LightSourcePosition uniform which is constant throught the program */ glUniform4fv(LightSourcePosition_location, 1, LightSourcePosition); /* make the gears */ gear1 = create_gear(1.0, 4.0, 1.0, 20, 0.7); gear2 = create_gear(0.5, 2.0, 2.0, 10, 0.7); gear3 = create_gear(1.3, 2.0, 0.5, 10, 0.7); } /**********************************************************************************************************************/ /**********************************************************************************************************************/ typedef struct { IDirectFB *dfb; IDirectFBSurface *primary; IDirectFBGL *gl; IDirectFBEventBuffer *events; DFBDimension size; } Test; static DFBResult Initialize( Test *test, int *argc, char ***argv ) { DFBResult ret; DFBSurfaceDescription dsc; /* * Initialize DirectFB options */ ret = DirectFBInit( argc, argv ); if (ret) { D_DERROR( ret, "DirectFBInit() failed!\n" ); return ret; } /* * Create the super interface */ ret = DirectFBCreate( &test->dfb ); if (ret) { D_DERROR( ret, "DirectFBCreate() failed!\n" ); return ret; } /* * Create an event buffer for all devices with these caps */ ret = test->dfb->CreateInputEventBuffer( test->dfb, DICAPS_KEYS | DICAPS_AXES, DFB_FALSE, &test->events ); if (ret) { D_DERROR( ret, "IDirectFB::CreateInputEventBuffer( DICAPS_KEYS | DICAPS_AXES ) failed!\n" ); return ret; } /* * Try to set our cooperative level to DFSCL_FULLSCREEN for exclusive access to the primary layer */ test->dfb->SetCooperativeLevel( test->dfb, DFSCL_FULLSCREEN ); /* * Create the primary surface */ dsc.flags = DSDESC_CAPS; dsc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING | DSCAPS_GL; ret = test->dfb->CreateSurface( test->dfb, &dsc, &test->primary ); if (ret) { D_DERROR( ret, "IDirectFB::CreateSurface( DSCAPS_PRIMARY | DSCAPS_FLIPPING ) failed!\n" ); return ret; } /* * Retrieve the DirectFBGL API */ ret = test->primary->GetGL( test->primary, &test->gl ); if (ret) { D_DERROR( ret, "IDirectFBSurface::GetGL() failed!\n" ); return ret; } /* * Get the size of the surface, clear and show it */ test->primary->GetSize( test->primary, &test->size.w, &test->size.h ); test->primary->Clear( test->primary, 0, 0, 0, 0 ); test->primary->Flip( test->primary, NULL, 0 ); return DFB_OK; } static void Shutdown( Test *test ) { if (test->gl) test->gl->Release( test->gl ); if (test->primary) test->primary->Release( test->primary ); if (test->events) test->events->Release( test->events ); if (test->dfb) test->dfb->Release( test->dfb ); } static DFBResult InitGL( Test *test ) { DFBResult ret; /* * Bind the OpenGL rendering context to our primary surface */ ret = test->gl->Lock( test->gl ); if (ret) { D_DERROR( ret, "IDirectFBGL::Lock() failed!\n" ); return ret; } gears_init(); /* Update the projection matrix */ perspective(ProjectionMatrix, 60.0, test->size.w / (float)test->size.h, 1.0, 1024.0); /* Setup the viewport */ glViewport( 0, 0, (GLint) test->size.w, (GLint) test->size.h ); /* Unbind the OpenGL rendering context */ test->gl->Unlock( test->gl ); return DFB_OK; } static DFBResult RenderGL( Test *test ) { DFBResult ret; /* * Bind the OpenGL rendering context to our primary surface */ ret = test->gl->Lock( test->gl ); if (ret) { D_DERROR( ret, "IDirectFBGL::Lock() failed!\n" ); return ret; } gears_draw(); /* Unbind the OpenGL rendering context */ test->gl->Unlock( test->gl ); return DFB_OK; } /**********************************************************************************************************************/ /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; bool quit = false; Test test; memset( &test, 0, sizeof(test) ); ret = Initialize( &test, &argc, &argv ); if (ret) goto error; ret = InitGL( &test ); if (ret) goto error; /* * Main Loop */ while (!quit) { static int frames = 0; static double tRot0 = -1.0, tRate0 = -1.0; double dt, t = direct_clock_get_millis() / 1000.0; if (tRot0 < 0.0) tRot0 = t; dt = t - tRot0; tRot0 = t; /* advance rotation for next frame */ angle += 70.0 * dt; /* 70 degrees per second */ if (angle > 3600.0) angle -= 3600.0; ret = RenderGL( &test ); if (ret) goto error; /* * Show the rendered buffer */ test.primary->Flip( test.primary, NULL, DSFLIP_ONSYNC ); frames++; if (tRate0 < 0.0) tRate0 = t; if (t - tRate0 >= 5.0) { GLfloat seconds = t - tRate0; GLfloat fps = frames / seconds; printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, fps); tRate0 = t; frames = 0; } DFBInputEvent evt; /* * Process events */ while (test.events->GetEvent( test.events, DFB_EVENT(&evt) ) == DFB_OK) { switch (evt.type) { case DIET_KEYPRESS: switch (evt.key_symbol) { case DIKS_ESCAPE: quit = true; break; case DIKS_CURSOR_UP: inc_rotx = 5.0; break; case DIKS_CURSOR_DOWN: inc_rotx = -5.0; break; case DIKS_CURSOR_LEFT: inc_roty = 5.0; break; case DIKS_CURSOR_RIGHT: inc_roty = -5.0; break; case DIKS_PAGE_UP: inc_rotz = 5.0; break; case DIKS_PAGE_DOWN: inc_rotz = -5.0; break; default: ; } break; case DIET_KEYRELEASE: switch (evt.key_symbol) { case DIKS_CURSOR_UP: inc_rotx = 0; break; case DIKS_CURSOR_DOWN: inc_rotx = 0; break; case DIKS_CURSOR_LEFT: inc_roty = 0; break; case DIKS_CURSOR_RIGHT: inc_roty = 0; break; case DIKS_PAGE_UP: inc_rotz = 0; break; case DIKS_PAGE_DOWN: inc_rotz = 0; break; default: ; } break; case DIET_AXISMOTION: if (evt.flags & DIEF_AXISREL) { switch (evt.axis) { case DIAI_X: view_rot[1] += evt.axisrel / 2.0; break; case DIAI_Y: view_rot[0] += evt.axisrel / 2.0; break; case DIAI_Z: view_rot[2] += evt.axisrel / 2.0; break; default: ; } } break; default: ; } } view_rot[0] += inc_rotx; view_rot[1] += inc_roty; view_rot[2] += inc_rotz; } error: Shutdown( &test ); return ret; } DirectFB-1.7.7/tests/voodoo_bench.c0000644000175000017500000001507012254435330014047 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define BENCH_SYNC 1 #define VOODOOTEST_METHOD_ID_Push 1 #define VOODOOTEST_METHOD_ID_Sync 2 /**********************************************************************************************************************/ static DirectResult Dispatch_Push( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) { VoodooMessageParser parser; int counter; VOODOO_PARSER_BEGIN( parser, msg ); VOODOO_PARSER_GET_INT( parser, counter ); VOODOO_PARSER_END( parser ); (void)counter; return DR_OK; } static DirectResult Dispatch_Sync( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) { return voodoo_manager_respond( manager, true, msg->header.serial, DR_OK, VOODOO_INSTANCE_NONE, VMBT_NONE ); } static DirectResult Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) { D_DEBUG( "VoodooTest/Dispatch: " "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); switch (msg->method) { case VOODOOTEST_METHOD_ID_Push: return Dispatch_Push( dispatcher, real, manager, msg ); case VOODOOTEST_METHOD_ID_Sync: return Dispatch_Sync( dispatcher, real, manager, msg ); } return DR_NOSUCHMETHOD; } /**********************************************************************************************************************/ #if BENCH_SYNC #define NUM_ITEMS 2000000 #else #define NUM_ITEMS 20000000 #endif int main( int argc, char *argv[] ) { DirectClock clock; int counter = 0; int res; (void)res; /* Initialize libdirect. */ direct_initialize(); // direct_config->log_level = DIRECT_LOG_ALL; direct_log_domain_config_level( "Voodoo/Input", DIRECT_LOG_DEBUG_9 ); direct_log_domain_config_level( "Voodoo/Output", DIRECT_LOG_DEBUG_9 ); direct_log_domain_config_level( "Voodoo/Dispatch", DIRECT_LOG_DEBUG_9 ); direct_log_domain_config_level( "Voodoo/Manager", DIRECT_LOG_DEBUG_9 ); int pipe_1[2]; int pipe_2[2]; // int socket[2]; int fds_server[2]; int fds_client[2]; VoodooLink voodoo_link_server; VoodooLink voodoo_link_client; VoodooManager *manager_server; VoodooManager *manager_client; VoodooInstanceID instance; // socketpair( PF_LOCAL, SOCK_STREAM, 0, fd ); res = pipe( pipe_1 ); res = pipe( pipe_2 ); fds_server[0] = pipe_1[0]; fds_server[1] = pipe_2[1]; fds_client[0] = pipe_2[0]; fds_client[1] = pipe_1[1]; voodoo_link_init_fd( &voodoo_link_server, fds_server ); voodoo_manager_create( &voodoo_link_server, NULL, NULL, &manager_server ); voodoo_manager_register_local( manager_server, VOODOO_INSTANCE_NONE, NULL, NULL, Dispatch, &instance ); voodoo_link_init_fd( &voodoo_link_client, fds_client ); voodoo_manager_create( &voodoo_link_client, NULL, NULL, &manager_client ); direct_clock_start( &clock ); #if !BENCH_SYNC do { voodoo_manager_request( manager_client, instance, VOODOOTEST_METHOD_ID_Push, VREQ_NONE, NULL, VMBT_INT, counter++, VMBT_NONE ); } while (counter < NUM_ITEMS); #else do { VoodooResponseMessage *response; voodoo_manager_request( manager_client, instance, VOODOOTEST_METHOD_ID_Sync, VREQ_RESPOND, &response, VMBT_NONE ); voodoo_manager_finish_request( manager_client, response ); counter++; } while (counter < NUM_ITEMS); #endif { VoodooResponseMessage *response; voodoo_manager_request( manager_client, instance, VOODOOTEST_METHOD_ID_Sync, VREQ_RESPOND, &response, VMBT_NONE ); voodoo_manager_finish_request( manager_client, response ); } direct_clock_stop( &clock ); D_INFO( "Voodoo/Test: Stopped after %lld.%03lld seconds... (%lld items/sec)\n", DIRECT_CLOCK_DIFF_SEC_MS( &clock ), NUM_ITEMS * 1000000ULL / direct_clock_diff( &clock ) ); /* Shutdown libdirect. */ direct_shutdown(); return 0; } DirectFB-1.7.7/tests/OneTest.c0000644000175000017500000001147612254435330012772 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "config.h" #include #include #include #include #include #include #include #include #include static int parse_cmdline ( int argc, char *argv[] ); static int show_usage ( void ); /**********************************************************************************************************************/ static OneQID queue_id; static OneThread *thread; static DirectMutex lock; static DirectWaitQueue queue; static void TestDispatch( void *context, const OnePacketHeader *header, void *data, OneThread *thread ) { // D_INFO( "TestDispatch called\n" ); direct_mutex_lock( &lock ); direct_waitqueue_signal( &queue ); direct_mutex_unlock( &lock ); } static DirectResult TestWakeUp(void) { DirectResult ret; char buf[512]; int loops = 1000000; while (loops--) { ret = OneThread_AddQueue( thread, queue_id, TestDispatch, NULL ); if (ret) { D_DERROR( ret, "OneTest: AddQueue error!\n" ); return ret; } direct_mutex_lock( &lock ); ret = OneQueue_Dispatch( queue_id, buf, 12 ); if (ret) { D_DERROR( ret, "OneTest: Dispatch error!\n" ); direct_mutex_unlock( &lock ); return ret; } direct_waitqueue_wait( &queue, &lock ); direct_mutex_unlock( &lock ); ret = OneThread_RemoveQueue( thread, queue_id ); if (ret) { D_DERROR( ret, "OneTest: RemoveQueue error!\n" ); return ret; } } return DR_OK; } int main( int argc, char *argv[] ) { DirectResult ret; if (parse_cmdline( argc, argv )) return -1; direct_mutex_init( &lock ); direct_waitqueue_init( &queue ); ret = One_Initialize(); if (ret) return ret; ret = OneThread_Create( "OneTest", &thread ); if (ret) return ret; ret = OneQueue_New( ONE_QUEUE_NO_FLAGS, queue_id, &queue_id ); if (ret) return ret; D_INFO( "Queue ID %u\n", queue_id ); TestWakeUp(); direct_mutex_deinit( &lock ); direct_waitqueue_deinit( &queue ); return 0; } /**********************************************************************************************************************/ static int parse_cmdline( int argc, char *argv[] ) { int i; for (i=1; i, Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include static const s32 identity_matrix[9] = { 0x10000, 0x00000, 0x00000, 0x00000, 0x10000, 0x00000, 0x00000, 0x00000, 0x10000 }; static const s32 rotate_matrix[9] = { 0x0DDB3, -0x08000, 0x00000, 0x08000, 0x0DDB3, 0x00000, 0x00000, 0x00000, 0x10000 }; static const s32 translate_matrix[9] = { 0x10000, 0x00000, 0x80000, 0x00000, 0x10000, 0xF0000, 0x00000, 0x00000, 0x10000 }; static const s32 shear_matrix[9] = { 0x10000, 0x14000, 0x00000, 0x00000, 0x10000, 0x00000, 0x00000, 0x00000, 0x10000 }; static const DirectFBPixelFormatNames( format_names ); /**********************************************************************************************************************/ static DFBBoolean parse_format( const char *arg, DFBSurfacePixelFormat *_f ) { int i = 0; while (format_names[i].format != DSPF_UNKNOWN) { if (!strcasecmp( arg, format_names[i].name )) { *_f = format_names[i].format; return DFB_TRUE; } ++i; } fprintf (stderr, "\nInvalid format specified!\n\n" ); return DFB_FALSE; } static int print_usage( const char *prg ) { int i = 0; fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Blitting Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -s, --source Source pixel format\n"); fprintf (stderr, " -d, --dest Destination pixel format\n"); fprintf (stderr, " -r, --resize Set destination from source size\n"); fprintf (stderr, " -x, --scale Scale from source to destination\n"); fprintf (stderr, " -b, --benchmark Enable benchmarking mode\n"); fprintf (stderr, " -R, --rerender Rerender before every blit (benchmark)\n"); fprintf (stderr, " -t, --tile Perform a tile blit\n"); fprintf (stderr, " -X, --matrix-translate Enable Matrix translation during blit\n"); fprintf (stderr, " -O, --matrix-rotate Enable Matrix rotation during blit\n"); fprintf (stderr, " -S, --matrix-shear Enable Matrix shear during blit\n"); fprintf (stderr, " -k, --key Apply Source color key during blit (Transparancy Test)\n"); return -1; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { int i; DFBResult ret; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBImageProvider *provider = NULL; IDirectFBSurface *source = NULL; IDirectFBSurface *dest = NULL; const char *url = NULL; DFBSurfacePixelFormat source_format = DSPF_UNKNOWN; DFBSurfacePixelFormat dest_format = DSPF_UNKNOWN; bool dest_resize = false; bool benchmark = false; bool rerender = false; bool scale_enable = false; bool tile = false; bool matrix_translate = false; bool matrix_rotate = false; bool matrix_shear = false; bool key = false; DFBImageDescription image_dsc; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Blit: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iCreateImageProvider( dfb, url, &provider ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateImageProvider( '%s' ) failed!\n", url ); goto out; } /* Get the surface description. */ ret = provider->GetSurfaceDescription( provider, &desc ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFBImageProvider::GetSurfaceDescription() failed!\n" ); goto out; } if (source_format != DSPF_UNKNOWN) desc.pixelformat = source_format; D_INFO( "DFBTest/Blit: Source is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Create a surface for the image. */ ret = dfb->CreateSurface( dfb, &desc, &source ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateSurface() failed!\n" ); goto out; } ret = provider->RenderTo( provider, source, NULL ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFBImageProvider::RenderTo() failed!\n" ); goto out; } /* Fill description for a primary surface. */ desc.flags = DSDESC_CAPS; desc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING; if (dest_format != DSPF_UNKNOWN) { desc.flags |= DSDESC_PIXELFORMAT; desc.pixelformat = dest_format; } if (dest_resize) desc.flags |= DSDESC_WIDTH | DSDESC_HEIGHT; dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateSurface() failed!\n" ); goto out; } dest->GetSize( dest, &desc.width, &desc.height ); dest->GetPixelFormat( dest, &desc.pixelformat ); D_INFO( "DFBTest/Blit: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); dest->SetRenderOptions( dest, DSRO_MATRIX ); if (key) { provider->GetImageDescription( provider, &image_dsc); if (image_dsc.caps & DICAPS_COLORKEY) { D_INFO( "DFBTest/Blit: Applying Source Colorkey...\n" ); source->SetSrcColorKey( source, image_dsc.colorkey_r, image_dsc.colorkey_g, image_dsc.colorkey_b ); dest->SetBlittingFlags( dest, DSBLIT_SRC_COLORKEY ); } else { D_INFO( "DFBTest/Blit: Image Source Colorkey not available...\n" ); } } if (matrix_rotate) { dest->SetMatrix( dest, rotate_matrix ); } else if (matrix_translate) { dest->SetMatrix( dest, translate_matrix ); } else if (matrix_shear) { dest->SetMatrix( dest, shear_matrix ); } else { dest->SetMatrix( dest, identity_matrix ); } if (tile) dest->TileBlit( dest, source, NULL, 0, 0 ); else if (scale_enable) dest->StretchBlit( dest, source, NULL, NULL ); else dest->Blit( dest, source, NULL, 0, 0 ); dest->Flip( dest, NULL, DSFLIP_NONE ); if (benchmark) { int num = 0; long long start, diff = 0, speed; sync(); sleep( 1 ); dest->StretchBlit( dest, source, NULL, NULL ); D_INFO( "DFBTest/Blit: Benchmarking...\n" ); dfb->WaitIdle( dfb ); start = direct_clock_get_millis(); do { if (rerender) { ret = provider->RenderTo( provider, source, NULL ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFBImageProvider::RenderTo() failed!\n" ); goto out; } } dest->StretchBlit( dest, source, NULL, NULL ); if ((num & 7) == 7) diff = direct_clock_get_millis() - start; num++; } while (diff < 2300); dfb->WaitIdle( dfb ); diff = direct_clock_get_millis() - start; speed = (long long) num * desc.width * desc.height / diff; D_INFO( "DFBTest/Blit: Speed is %lld.%03lld MPixel/sec (%dx%d x %d in %lld.%03lld sec)\n", speed / 1000LL, speed % 1000LL, desc.width, desc.height, num, diff / 1000LL, diff % 1000LL ); } else sleep( 2 ); sleep(10); out: if (dest) dest->Release( dest ); if (source) source->Release( source ); if (provider) provider->Release( provider ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_water.c0000644000175000017500000006047712254435330014253 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include static const DirectFBPixelFormatNames( format_names ); static const DirectFBWaterElementTypeNames( m_element_types ); /**********************************************************************************************************************/ static int m_width; static int m_height; static DFBSurfacePixelFormat m_format; /**********************************************************************************************************************/ typedef DFBResult (*TestFunc)( IWater *water, IDirectFBSurface *surface ); /**********************************************************************************************************************/ static DFBResult Test_Simple ( IWater *water, IDirectFBSurface *surface ); static DFBResult Test_RenderElement ( IWater *water, IDirectFBSurface *surface ); static DFBResult Test_RenderElements( IWater *water, IDirectFBSurface *surface ); static DFBResult Test_RenderShape ( IWater *water, IDirectFBSurface *surface ); static DFBResult Test_RenderShapes ( IWater *water, IDirectFBSurface *surface ); /**********************************************************************************************************************/ static DFBResult RunTest( TestFunc func, IWater *water, IDirectFBSurface *surface ); /**********************************************************************************************************************/ static bool parse_command_line( int argc, char *argv[] ); /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBSurface *surface; IWater *water; D_INFO( "Tests/Water: Starting up...\n" ); /* Initialize DirectFB including command line parsing. */ ret = DirectFBInit( &argc, &argv ); if (ret) { DirectFBError( "DirectFBInit() failed", ret ); return -1; } /* Parse the command line. */ if (!parse_command_line( argc, argv )) return -2; /* Create the super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { DirectFBError( "DirectFBCreate() failed", ret ); return -3; } /* Fill surface description, flipping primary. */ desc.flags = DSDESC_CAPS; desc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING; /* Set width or height? */ if (m_width > 0) { desc.flags |= DSDESC_WIDTH; desc.width = m_width; } if (m_height > 0) { desc.flags |= DSDESC_HEIGHT; desc.height = m_height; } /* Set pixel format? */ if (m_format != DSPF_UNKNOWN) { desc.flags |= DSDESC_PIXELFORMAT; desc.pixelformat = m_format; } dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &surface ); if (ret) { D_DERROR( ret, "IDirectFB::CreateSurface() failed!\n" ); dfb->Release( dfb ); return -4; } /* Get the extended rendering interface. */ ret = dfb->GetInterface( dfb, "IWater", NULL, dfb, (void**) &water ); if (ret) { DirectFBError( "IDirectFB::GetInterface( 'IWater' ) failed", ret ); surface->Release( surface ); dfb->Release( dfb ); return -5; } D_INFO( "Tests/Water: Got render interface, running tests...\n" ); RunTest( Test_Simple, water, surface ); RunTest( Test_RenderElement, water, surface ); RunTest( Test_RenderElements, water, surface ); RunTest( Test_RenderShape, water, surface ); RunTest( Test_RenderShapes, water, surface ); D_INFO( "Tests/Water: Dumping surface...\n" ); unlink( "dfbrender.pgm" ); unlink( "dfbrender.ppm" ); surface->Dump( surface, "dfbrender", NULL ); D_INFO( "Tests/Water: Shutting down...\n" ); /* Release the render interface. */ water->Release( water ); /* Release the surface. */ surface->Release( surface ); /* Release the super interface. */ dfb->Release( dfb ); return EXIT_SUCCESS; } /**********************************************************************************************************************/ static void print_usage (const char *prg_name) { int i = 0; fprintf (stderr, "\nDirectFB Render Test (version %s)\n\n", DIRECTFB_VERSION); fprintf (stderr, "Usage: %s [options]\n\n", prg_name); fprintf (stderr, "Options:\n"); fprintf (stderr, " -m, --mode x Set test surface size (default 800x600)\n"); fprintf (stderr, " -f, --format Change the pixel format\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); } static DFBBoolean parse_mode( const char *arg ) { if (sscanf( arg, "%dx%d", &m_width, &m_height ) != 2 || m_width < 1 || m_height < 1) { fprintf (stderr, "\nInvalid mode specified!\n\n" ); return DFB_FALSE; } return DFB_TRUE; } static DFBBoolean parse_format( const char *arg ) { int i = 0; while (format_names[i].format != DSPF_UNKNOWN) { if (!strcasecmp( arg, format_names[i].name )) { m_format = format_names[i].format; return DFB_TRUE; } ++i; } fprintf (stderr, "\nInvalid format specified!\n\n" ); return DFB_FALSE; } static bool parse_command_line( int argc, char *argv[] ) { int n; for (n = 1; n < argc; n++) { const char *arg = argv[n]; if (strcmp (arg, "-h") == 0 || strcmp (arg, "--help") == 0) { print_usage (argv[0]); return false; } if (strcmp (arg, "-v") == 0 || strcmp (arg, "--version") == 0) { fprintf (stderr, "dfbg version %s\n", DIRECTFB_VERSION); return false; } if (strcmp (arg, "-m") == 0 || strcmp (arg, "--mode") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_mode( argv[n] )) return false; continue; } if (strcmp (arg, "-f") == 0 || strcmp (arg, "--format") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_format( argv[n] )) return false; continue; } print_usage (argv[0]); return false; } return true; } /**********************************************************************************************************************/ static DFBResult RunTest( TestFunc func, IWater *water, IDirectFBSurface *surface ) { /* Clear the buffer first... */ surface->Clear( surface, 0xc0, 0xb0, 0x90, 0xff ); /* Run the actual test... */ func( water, surface ); /* Show the buffer! */ surface->Flip( surface, NULL, DSFLIP_NONE ); sleep( 10 ); return DFB_OK; } /**********************************************************************************************************************/ #define _T(x...) \ do { \ DFBResult ret = x; \ \ if (ret) { \ D_DERROR( ret, "Tests/Water: '%s' failed!\n", #x ); \ /*return ret;*/ \ } \ } while (0) /**********************************************************************************************************************/ static DFBResult Test_Simple( IWater *water, IDirectFBSurface *surface ) { WaterScalar test_rect[4] = {{ 130 },{ 190 },{ 400 },{ 200 }}; D_INFO( "Tests/Water: Testing SetAttribute( COLOR ) and RenderElement( RECTANGLE )...\n" ); WaterAttributeHeader attribute; WaterElementHeader element; WaterColor fill_color = { 0xff, 0x20, 0x80, 0xff }; WaterColor draw_color = { 0xff, 0xf8, 0xf4, 0xd8 }; /* * Set the fill color via SetAttribute() */ attribute.type = WAT_FILL_COLOR; attribute.flags = WAF_NONE; _T( water->SetAttribute( water, &attribute, &fill_color ) ); /* * Set the draw color via SetAttribute() */ attribute.type = WAT_DRAW_COLOR; attribute.flags = WAF_NONE; _T( water->SetAttribute( water, &attribute, &draw_color ) ); /* * Render a rectangle via RenderElement() */ element.type = WET_RECTANGLE; element.flags = WEF_FILL | WEF_DRAW; element.scalar = WST_INTEGER; _T( water->RenderElement( water, surface, &element, test_rect, 4 ) ); return DFB_OK; } /**********************************************************************************************************************/ /* * X,Y values (5) for five points, a line strip/loop, a triangle strip, a rectangle strip, a polygon... */ static const WaterScalar m_xy_vals5[] = { { .i = 211 }, /* X */ { .i = 5 }, /* Y */ { .i = 400 }, /* X */ { .i = 588 }, /* Y */ { .i = 589 }, /* X */ { .i = 5 }, /* Y */ { .i = 93 }, /* X */ { .i = 366 }, /* Y */ { .i = 707 }, /* X */ { .i = 366 } /* Y */ }; /* * X,Y values (6) for six points, three lines, a line strip/loop, two triangles, a triangle fan, * three rectangles, a rectangle strip, a quadrangle strip, a polygon... */ static const WaterScalar m_xy_vals6[] = { { .i = 211 }, /* X */ { .i = 5 }, /* Y */ { .i = 400 }, /* X */ { .i = 588 }, /* Y */ { .i = 589 }, /* X */ { .i = 5 }, /* Y */ { .i = 93 }, /* X */ { .i = 366 }, /* Y */ { .i = 707 }, /* X */ { .i = 366 }, /* Y */ { .i = 211 }, /* X */ { .i = 5 }, /* Y */ }; /* * X,Y values (8) for eight points, four lines, a line strip/loop, a triangle fan, * four rectangles, a rectangle strip, two quadrangles, a quadrangle strip, a polygon... */ static const WaterScalar m_xy_vals8[] = { { .i = 211 }, /* X */ { .i = 5 }, /* Y */ { .i = 400 }, /* X */ { .i = 588 }, /* Y */ { .i = 589 }, /* X */ { .i = 5 }, /* Y */ { .i = 93 }, /* X */ { .i = 366 }, /* Y */ { .i = 707 }, /* X */ { .i = 366 }, /* Y */ { .i = 211 }, /* X */ { .i = 5 }, /* Y */ { .i = 400 }, /* X */ { .i = 150 }, /* Y */ { .i = 589 }, /* X */ { .i = 5 }, /* Y */ }; /* * X,Y,W,H values (5) for five rectangles... */ static const WaterScalar m_xywh_vals5[] = { { .i = 211 }, /* X */ { .i = 5 }, /* Y */ { .i = 12 }, /* W */ { .i = 20 }, /* H */ { .i = 400 }, /* X */ { .i = 588 }, /* Y */ { .i = 40 }, /* W */ { .i = 20 }, /* H */ { .i = 589 }, /* X */ { .i = 5 }, /* Y */ { .i = 12 }, /* W */ { .i = 20 }, /* H */ { .i = 93 }, /* X */ { .i = 366 }, /* Y */ { .i = 20 }, /* W */ { .i = 12 }, /* H */ { .i = 707 }, /* X */ { .i = 366 }, /* Y */ { .i = 20 }, /* W */ { .i = 12 } /* H */ }; /* * X,Y,L/R values (3) for three spans, a trapezoid strip, three circles... */ static const WaterScalar m_xyl_vals3[] = { { .i = 211 }, /* X */ { .i = 5 }, /* Y */ { .i = 100 }, /* Length / Radius */ { .i = 400 }, /* X */ { .i = 588 }, /* Y */ { .i = 200 }, /* Length / Radius */ { .i = 589 }, /* X */ { .i = 5 }, /* Y */ { .i = 100 }, /* Length / Radius */ }; /* * X,Y,L/R values (4) for four spans, two trapezoids, a trapezoid strip, four circles... */ static const WaterScalar m_xyl_vals4[] = { { .i = 211 }, /* X */ { .i = 5 }, /* Y */ { .i = 100 }, /* Length / Radius */ { .i = 400 }, /* X */ { .i = 588 }, /* Y */ { .i = 200 }, /* Length / Radius */ { .i = 589 }, /* X */ { .i = 5 }, /* Y */ { .i = 100 }, /* Length / Radius */ { .i = 400 }, /* X */ { .i = 150 }, /* Y */ { .i = 50 }, /* Length / Radius */ }; /* * X,Y,RX,RY values for three ellipses... */ static const WaterScalar m_xyrxry_vals3[] = { { .i = 211 }, /* X */ { .i = 5 }, /* Y */ { .i = 70 }, /* Radius X */ { .i = 100 }, /* Radius Y */ { .i = 400 }, /* X */ { .i = 588 }, /* Y */ { .i = 200 }, /* Radius X */ { .i = 50 }, /* Radius Y */ { .i = 589 }, /* X */ { .i = 5 }, /* Y */ { .i = 70 }, /* Radius X */ { .i = 100 }, /* Radius Y */ }; /* * Test elements, each one of a type. */ static const WaterElement m_test_elements[] = { /* * Basic types */ #if 0 { .etype = WET_POINT, .flags = WEF_DRAW, .values = m_xy_vals5, .num_values = D_ARRAY_SIZE(m_xy_vals5) }, { .etype = WET_SPAN, .flags = WEF_DRAW, .values = m_xyl_vals4, .num_values = D_ARRAY_SIZE(m_xyl_vals4) }, { .etype = WET_LINE, .flags = WEF_DRAW, .values = m_xy_vals6, .num_values = D_ARRAY_SIZE(m_xy_vals6) }, { .etype = WET_LINE_STRIP, .flags = WEF_DRAW, .values = m_xy_vals6, .num_values = D_ARRAY_SIZE(m_xy_vals6) }, { .etype = WET_LINE_LOOP, .flags = WEF_DRAW, .values = m_xy_vals5, .num_values = D_ARRAY_SIZE(m_xy_vals5) }, { .etype = WET_TRIANGLE, .flags = WEF_DRAW | WEF_FILL, .values = m_xy_vals6, .num_values = D_ARRAY_SIZE(m_xy_vals6) }, { .etype = WET_TRIANGLE_FAN, .flags = WEF_DRAW | WEF_FILL, .values = m_xy_vals5, .num_values = D_ARRAY_SIZE(m_xy_vals5) }, { .etype = WET_TRIANGLE_STRIP, .flags = WEF_DRAW | WEF_FILL, .values = m_xy_vals5, .num_values = D_ARRAY_SIZE(m_xy_vals5) }, { .etype = WET_RECTANGLE, .flags = WEF_DRAW | WEF_FILL, .values = m_xywh_vals5, .num_values = D_ARRAY_SIZE(m_xywh_vals5) }, { .etype = WET_RECTANGLE_STRIP, .flags = WEF_DRAW | WEF_FILL, .values = m_xy_vals5, .num_values = D_ARRAY_SIZE(m_xy_vals5) }, #endif { .header.type = WET_TRAPEZOID, .header.flags = WEF_DRAW | WEF_FILL, .values = m_xyl_vals4, .num_values = D_ARRAY_SIZE(m_xyl_vals4) }, { .header.type = WET_TRAPEZOID_STRIP, .header.flags = WEF_DRAW | WEF_FILL, .values = m_xyl_vals4, .num_values = D_ARRAY_SIZE(m_xyl_vals4) }, { .header.type = WET_QUADRANGLE, .header.flags = WEF_DRAW | WEF_FILL, .values = m_xy_vals8, .num_values = D_ARRAY_SIZE(m_xy_vals8) }, { .header.type = WET_QUADRANGLE_STRIP, .header.flags = WEF_DRAW | WEF_FILL, .values = m_xy_vals6, .num_values = D_ARRAY_SIZE(m_xy_vals6) }, { .header.type = WET_POLYGON, .header.flags = WEF_DRAW | WEF_FILL, .values = m_xy_vals5, .num_values = D_ARRAY_SIZE(m_xy_vals5) }, /* * Advanced types */ { .header.type = WET_CIRCLE, .header.flags = WEF_DRAW | WEF_FILL, .values = m_xyl_vals3, .num_values = D_ARRAY_SIZE(m_xyl_vals3) }, { .header.type = WET_ELLIPSE, .header.flags = WEF_DRAW | WEF_FILL, .values = m_xyrxry_vals3, .num_values = D_ARRAY_SIZE(m_xyrxry_vals3) }, /* TODO: arcs and curves */ }; static DFBResult Test_RenderElement( IWater *water, IDirectFBSurface *surface ) { int i; /* * Render elements */ for (i=0; iClear( surface, 0xc0, 0xb0, 0x90, 0xff ); D_INFO( "Tests/Water: Testing RenderElement( %s )...\n", m_element_types[index].name ); /* * Render element */ _T( water->RenderElements( water, surface, &m_test_elements[i], 1 ) ); surface->Flip( surface, NULL, DSFLIP_NONE ); sleep( 2 ); } return DFB_OK; } static DFBResult Test_RenderElements( IWater *water, IDirectFBSurface *surface ) { D_INFO( "Tests/Water: Testing RenderElements( %d )...\n", D_ARRAY_SIZE(m_test_elements) ); /* * Render elements */ _T( water->RenderElements( water, surface, m_test_elements, D_ARRAY_SIZE(m_test_elements) ) ); return DFB_OK; } /**********************************************************************************************************************/ /* Values for the Rectangle Element */ static const WaterScalar m_test_shape_rect_vals[] = { { .i = 100 }, { .i = 100 }, /* 100,100 */ { .i = 200 }, { .i = 200 }, /* 200x200 */ }; /* Values for the Triangle AND Line Strip Elements */ static const WaterScalar m_test_shape_tri_vals[] = { { .i = 150 }, { .i = 120 }, /* 150,120 */ { .i = 200 }, { .i = 190 }, /* 200,190 */ { .i = 100 }, { .i = 200 }, /* 100,200 */ { .i = 250 }, { .i = 220 }, /* 250,220 */ { .i = 300 }, { .i = 290 }, /* 300,290 */ { .i = 200 }, { .i = 300 }, /* 200,300 */ { .i = 350 }, { .i = 220 }, /* 350,220 */ { .i = 400 }, { .i = 290 }, /* 400,290 */ { .i = 300 }, { .i = 300 }, /* 300,300 */ }; /* -> Stream of Elements... */ static const WaterElement m_test_shape_elements[] = { { .header.type = WET_RECTANGLE, .header.flags = WEF_DRAW | WEF_FILL, .values = m_test_shape_rect_vals, .num_values = D_ARRAY_SIZE(m_test_shape_rect_vals) }, { .header.type = WET_TRIANGLE, .header.flags = WEF_DRAW | WEF_FILL, .values = m_test_shape_tri_vals, .num_values = D_ARRAY_SIZE(m_test_shape_tri_vals) }, { .header.type = WET_LINE_STRIP, .header.flags = WEF_DRAW, .values = m_test_shape_tri_vals, .num_values = D_ARRAY_SIZE(m_test_shape_tri_vals) }, }; static const WaterColor m_test_shape_attributes_red_fill = { 0xff, 0xff, 0x42, 0x23 }; static const WaterColor m_test_shape_attributes_red_draw = { 0xff, 0x23, 0x42, 0xff }; static const WaterRenderMode m_test_shape_attributes_red_render = WRM_ANTIALIAS; /* -> Stream of Attributes... */ static const WaterAttribute m_test_shape_attributes_red[] = { { .header.flags = WAF_NONE, .header.type = WAT_FILL_COLOR, .value = &m_test_shape_attributes_red_fill }, { .header.flags = WAF_NONE, .header.type = WAT_DRAW_COLOR, .value = &m_test_shape_attributes_red_draw }, { .header.flags = WAF_NONE, .header.type = WAT_RENDER_MODE, .value = &m_test_shape_attributes_red_render }, }; static DFBResult Test_RenderShape( IWater *water, IDirectFBSurface *surface ) { WaterShapeHeader header = { .flags = WSF_NONE, }; D_INFO( "Tests/Water: Testing RenderShape()...\n" ); /* * Render the shape defined by flags, opacity and a joint */ _T( water->RenderShape( water, surface, &header, m_test_shape_attributes_red, D_ARRAY_SIZE(m_test_shape_attributes_red), m_test_shape_elements, D_ARRAY_SIZE(m_test_shape_elements) ) ); return DFB_OK; } /**********************************************************************************************************************/ /* Test shapes */ static const WaterShape m_test_shapes[] = {{ .header.flags = WSF_NONE, .attributes = m_test_shape_attributes_red, .num_attributes = D_ARRAY_SIZE(m_test_shape_attributes_red), .elements = m_test_shape_elements, .num_elements = D_ARRAY_SIZE(m_test_shape_elements), }}; static DFBResult Test_RenderShapes( IWater *water, IDirectFBSurface *surface ) { D_INFO( "Tests/Water: Testing RenderShapes( %d )...\n", D_ARRAY_SIZE(m_test_shapes) ); /* * Render the shapes defined in the array */ _T( water->RenderShapes( water, surface, m_test_shapes, D_ARRAY_SIZE(m_test_shapes) ) ); return DFB_OK; } DirectFB-1.7.7/tests/dfbtest_clipboard.c0000644000175000017500000001221712254435330015055 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include /**********************************************************************************************************************/ static int print_usage( const char *prg ) { fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Clipboard Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); return -1; } /**********************************************************************************************************************/ static DFBResult Test_Clipboard_Set( IDirectFB *dfb, const char *mime_type, const char *data ) { DFBResult ret; struct timeval tv; gettimeofday( &tv, NULL ); direct_log_printf( NULL, "Setting clipboard data to mime type '%s' with data '%s' and timestamp %ld.%06ld\n", mime_type, data, tv.tv_sec, tv.tv_usec ); ret = dfb->SetClipboardData( dfb, mime_type, data, strlen(data) + 1, &tv ); if (ret) { D_DERROR( ret, "DFBTest/Clipboard: IDirectFB::SetClipboardData() failed!\n" ); return ret; } return ret; } static DFBResult Test_Clipboard_Get( IDirectFB *dfb ) { DFBResult ret; struct timeval tv; char *mime_type; void *data; unsigned int data_size; ret = dfb->GetClipboardTimeStamp( dfb, &tv ); if (ret) { D_DERROR( ret, "DFBTest/Clipboard: IDirectFB::GetClipboardTimeStamp() failed!\n" ); return ret; } ret = dfb->GetClipboardData( dfb, &mime_type, &data, &data_size ); if (ret) { D_DERROR( ret, "DFBTest/Clipboard: IDirectFB::GetClipboardData() failed!\n" ); return ret; } direct_log_printf( NULL, "Got clipboard data of mime type '%s' with data '%s'\n", mime_type, (const char*) data ); direct_log_printf( NULL, "Got clipboard timestamp %ld.%06ld\n", tv.tv_sec, tv.tv_usec ); return ret; } int main( int argc, char *argv[] ) { DFBResult ret; int i; IDirectFB *dfb; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Blit: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iRelease( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_input.c0000644000175000017500000001540012254435330014252 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include static DFBResult Test_Sensitivity( IDirectFB *dfb, DFBInputDeviceID device_id ) { DFBResult ret; IDirectFBInputDevice *device; IDirectFBEventBuffer *buffer; int i, n; int sensitivities[] = { 0x100, 0x200, 0x80 }; D_INFO( "DFBTest/Input: Testing sensitivity with input device %u...\n", device_id ); ret = dfb->GetInputDevice( dfb, device_id, &device ); if (ret) { D_DERROR( ret, "DFBTest/Input: GetInputDevice( %u ) failed!\n", device_id ); return ret; } ret = device->CreateEventBuffer( device, &buffer ); if (ret) { D_DERROR( ret, "DFBTest/Input: CreateEventBuffer() failed!\n" ); device->Release( device ); return ret; } for (i=0; iSetConfiguration( device, &config ); if (ret) { D_DERROR( ret, "DFBTest/Input: SetConfiguration() failed!\n" ); buffer->Release( buffer ); device->Release( device ); return ret; } buffer->Reset( buffer ); for (n=0; n<500; n++) { DFBInputEvent event; buffer->WaitForEvent( buffer ); buffer->GetEvent( buffer, DFB_EVENT(&event) ); switch (event.type) { case DIET_AXISMOTION: if (event.flags & DIEF_AXISREL) { //D_INFO( "DFBTest/Input: Motion (axis %d) by %d\n", event.axis, event.axisrel ); if (event.axisrel > 0) move += event.axisrel; else move -= event.axisrel; } break; default: break; } } D_INFO( "DFBTest/Input: Average movement %d.\n", move / n ); direct_thread_sleep( 1000000 ); } buffer->Release( buffer ); device->Release( device ); return DFB_OK; } /**********************************************************************************************************************/ static int print_usage( const char *prg ) { fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Input Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -d, --device Input device ID, default is 0\n"); return -1; } static DFBBoolean parse_id( const char *arg, unsigned int *_id ) { if (sscanf( arg, "%u", _id ) != 1) { fprintf (stderr, "\nInvalid ID specified!\n\n" ); return DFB_FALSE; } return DFB_TRUE; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; int i; IDirectFB *dfb; DFBInputDeviceID device_id = 0; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Input: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iRelease( dfb ); if (ret) { D_DERROR( ret, "DFBTest/Input: IDirectFB::Release() failed!\n" ); return ret; } return 0; } DirectFB-1.7.7/tests/dfbtest_alloc.c0000644000175000017500000001431412254435330014210 00000000000000#include #include #include #include #define ALLOC_COUNT 10000 #define WIDTH_MAX 1920 #define HEIGHT_MAX 1080 #define FONT DATADIR "/decker.dgiff" static unsigned int rand_pool = 0x12345678; static unsigned int rand_add = 0x87654321; static inline unsigned int myrand( void ) { rand_pool ^= ((rand_pool << 7) | (rand_pool >> 25)); rand_pool += rand_add; rand_add += rand_pool; return rand_pool; } static int print_usage( const char *prg ) { fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Memory Allocation Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -l, --local Force use of local (system) memory\n"); return -1; } /* Simple test to constantly allocate and deallocate a surface */ int main( int argc, char *argv[] ) { IDirectFB *dfb; IDirectFBDisplayLayer *primary_layer; IDirectFBSurface *primary, *image, *image2; IDirectFBFont *font; DFBFontDescription font_desc; DFBResult err; DFBDisplayLayerConfig config; DFBSurfaceDescription dsc, dsc2; int i, allocs, fontheight, pitch; void *ptr; bool local_mem = false; /* initalize DirectFB and pass arguments */ DirectFBInit( &argc, &argv ); DirectFBSetOption ("bg-none", NULL); DirectFBSetOption ("no-init-layer", NULL); /* Parse arguments. */ for (i=1; iSetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Get the primary surface, i.e. the surface of the primary layer. */ dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &primary_layer ); primary_layer->SetCooperativeLevel( primary_layer, DLSCL_EXCLUSIVE ); primary_layer->GetConfiguration (primary_layer , &config); config.flags = DLCONF_BUFFERMODE | DLCONF_SURFACE_CAPS; config.buffermode = DLBM_FRONTONLY; config.surface_caps = DSCAPS_PRIMARY; if (local_mem == true) config.surface_caps |= DSCAPS_SYSTEMONLY; primary_layer->SetConfiguration (primary_layer , &config); primary_layer->GetSurface( primary_layer, &primary); dsc.flags = DSDESC_CAPS | DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT; dsc.pixelformat = DSPF_ARGB; if (local_mem == true) dsc.caps = DSCAPS_SYSTEMONLY | DSCAPS_SHARED; else dsc.caps = DSCAPS_VIDEOONLY | DSCAPS_SHARED; dsc2.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT | DSDESC_CAPS; dsc2.pixelformat = DSPF_ARGB; dsc2.caps = dsc.caps; font_desc.flags = DFDESC_HEIGHT; font_desc.height = 24; dfb->CreateFont( dfb, FONT, &font_desc, &font ); font->GetHeight( font, &fontheight ); primary->SetFont( primary, font ); primary->Clear( primary, 0x20, 0x20, 0x20, 0xff ); primary->SetDrawingFlags( primary, DSDRAW_BLEND ); primary->SetColor( primary, 0xFF, 0xFF, 0xFF, 0xFF ); primary->DrawString( primary, "Testing Surface Allocation/Deallocation...", -1, 50, 50, DSTF_TOPLEFT ); sleep(2); for (allocs = 0; allocs < ALLOC_COUNT; allocs++) { dsc.width = myrand() & (WIDTH_MAX-1); dsc.height = myrand() & (HEIGHT_MAX-1); dsc.width = dsc.width ? dsc.width : 2; dsc.height = dsc.height ? dsc.height : 2; /* Create surface1 ... */ err = dfb->CreateSurface( dfb, &dsc, &image ); if (err) { fprintf(stderr, "ERROR: Could not create image1!\n"); break; } /* Now try and allocate surface1 by locking it...*/ err = image->Lock( image, DSLF_READ|DSLF_WRITE, &ptr, &pitch); if (err) { fprintf(stderr, "ERROR: Could not lock image1!\n"); break; } dsc2.width = myrand() & (WIDTH_MAX-1); dsc2.height = myrand() & (HEIGHT_MAX-1); dsc2.width = dsc2.width ? dsc2.width : 2; dsc2.height = dsc2.height ? dsc2.height : 2; /* Create surface2 ... */ err = dfb->CreateSurface( dfb, &dsc2, &image2 ); if (err) { fprintf(stderr, "ERROR: Could not create image2!\n"); image->Release( image ); break; } /* Now try and allocate surface2 by locking it...*/ err = image2->Lock( image2, DSLF_READ|DSLF_WRITE, &ptr, &pitch); if (err) { fprintf(stderr, "ERROR: Could not lock image2!\n"); break; } /* Now try and unlock the surfaces...*/ err = image->Unlock( image ); if (err) { fprintf(stderr, "ERROR: Could not unlock image1!\n"); break; } err = image2->Unlock( image2 ); if (err) { fprintf(stderr, "ERROR: Could not unlock image2!\n"); break; } /* Now release the surfaces... */ image->Release( image ); image2->Release( image2 ); } primary->Clear( primary, 0x20, 0x20, 0x20, 0xff ); if (allocs < ALLOC_COUNT) primary->DrawString( primary, "Test Failed :-(", -1, 50, 50, DSTF_TOPLEFT ); else primary->DrawString( primary, "Test Passed :-)", -1, 50, 50, DSTF_TOPLEFT ); sleep(2); primary->Release( primary ); dfb->Release( dfb ); return 0; } DirectFB-1.7.7/tests/dfbtest_prealloc.c0000644000175000017500000002550112254435330014717 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include static const DirectFBPixelFormatNames( format_names ); static DFBSurfaceCapabilities static_caps; /**********************************************************************************************************************/ static DFBBoolean parse_format( const char *arg, DFBSurfacePixelFormat *_f ) { int i = 0; while (format_names[i].format != DSPF_UNKNOWN) { if (!direct_strcasecmp( arg, format_names[i].name )) { *_f = format_names[i].format; return DFB_TRUE; } ++i; } fprintf (stderr, "\nInvalid format specified!\n\n" ); return DFB_FALSE; } static int print_usage( const char *prg ) { int i = 0; fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Fill Rectangle Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -d, --dest Destination pixel format\n"); fprintf (stderr, " -s, --static Use DSCAPS_STATIC_ALLOC\n"); return -1; } /**********************************************************************************************************************/ static void gen_pixels( void *ptr, int pitch, int height ) { int y; for (y=0; ySetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create an input buffer for key events */ dfb->CreateInputEventBuffer( dfb, DICAPS_KEYS, DFB_TRUE, &keybuffer); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/PreAlloc: IDirectFB::CreateSurface() for the destination failed!\n" ); goto out; } dest->GetSize( dest, &desc.width, &desc.height ); dest->GetPixelFormat( dest, &desc.pixelformat ); D_INFO( "DFBTest/PreAlloc: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Create a preallocated surface. */ desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT | DSDESC_CAPS | DSDESC_PREALLOCATED; desc.width = 100; desc.height = 100; desc.pixelformat = DSPF_ARGB; desc.caps = static_caps; desc.preallocated[0].data = pixel_buffer; desc.preallocated[0].pitch = 100 * 4; ret = dfb->CreateSurface( dfb, &desc, &source ); if (ret) { D_DERROR( ret, "DFBTest/PreAlloc: IDirectFB::CreateSurface() for the preallocated source failed!\n" ); goto out; } /* Before any other operation the pixel data can be written to without locking */ gen_pixels( pixel_buffer, 100 * 4, 100 ); while (!quit) { void *ptr; int pitch; /* Lock source surface for writing before making updates to the pixel buffer */ source->Lock( source, DSLF_WRITE, &ptr, &pitch ); if (ptr == pixel_buffer) D_INFO( "DFBTest/PreAlloc: Locking preallocated source gave original preallocated pixel buffer :-)\n" ); else { if (static_caps) D_INFO( "DFBTest/PreAlloc: Locking preallocated source gave different pixel buffer, ERROR with static alloc!\n" ); else D_INFO( "DFBTest/PreAlloc: Locking preallocated source gave different pixel buffer, but OK (no static alloc)\n" ); } update_pixels( ptr, pitch, 100 ); /* Unlock source surface after writing, before making further Blits, to have the buffer be transfered to master again */ source->Unlock( source ); dest->Clear( dest, 0, 0, 0, 0xff ); /* First Blit from preallocated source, data will be transfered to master */ dest->Blit( dest, source, NULL, 50, 50 ); /* Second Blit from preallocated source, data is already master */ dest->Blit( dest, source, NULL, 150, 150 ); dest->Flip( dest, NULL, DSFLIP_NONE ); /* This will upload again the preallocated buffer to the master, where it is modified and outdates the preallocated buffer. Now it depends on the static alloc flag whether the next Lock will directly go into the shared memory allocation or the preallocated buffer again (with a transfer back from master to us). */ source->FillRectangle( source, 0, 0, 10, 10 ); /* Process keybuffer */ while (keybuffer->GetEvent( keybuffer, DFB_EVENT(&evt)) == DFB_OK) { if (evt.type == DIET_KEYPRESS) { switch (DFB_LOWER_CASE(evt.key_symbol)) { case DIKS_ESCAPE: case DIKS_SMALL_Q: case DIKS_BACK: case DIKS_STOP: case DIKS_EXIT: /* Quit main loop & test thread */ quit = true; break; default: break; } } } if (!quit) sleep( 5 ); } out: if (source) source->Release( source ); if (dest) dest->Release( dest ); keybuffer->Release( keybuffer ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/fdtest_coma.c0000644000175000017500000001141512254435330013672 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include static char *enter_coma = "FDTestComa"; /**********************************************************************************************************************/ static bool parse_command_line( int argc, char *argv[] ); /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DirectResult ret; IFusionDale *dale = NULL; IComa *coma = NULL; void *mem; /* Initialize FusionDale including command line parsing. */ ret = FusionDaleInit( &argc, &argv ); if (ret) { D_DERROR( ret, "FusionDale/Master: FusionDaleInit() failed!\n" ); goto out; } /* Parse the command line. */ if (!parse_command_line( argc, argv )) goto out; /* Create the super interface. */ ret = FusionDaleCreate( &dale ); if (ret) { D_DERROR( ret, "FusionDale/Master: FusionDaleCreate() failed!\n" ); goto out; } ret = dale->EnterComa( dale, enter_coma, &coma ); if (ret) { D_DERROR( ret, "FusionDale/Master: IFusionDale::EnterComa( '%s' ) failed!\n", enter_coma ); goto out; } while (1) { coma->GetLocal( coma, 666, &mem ); coma->FreeLocal( coma ); } pause(); out: /* Release the component manager. */ if (coma) coma->Release( coma ); /* Release the super interface. */ if (dale) dale->Release( dale ); return ret; } /**********************************************************************************************************************/ static void print_usage (const char *prg_name) { fprintf (stderr, "\nFusionDale Coma Test (version %s)\n\n", DIRECTFB_VERSION); fprintf (stderr, "Usage: %s [options]\n\n", prg_name); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h --help Show this help message\n"); fprintf (stderr, " -v --version Print version information\n"); fprintf (stderr, " -c --coma Enter component manager\n"); fprintf (stderr, "\n"); } static bool parse_command_line( int argc, char *argv[] ) { int n; for (n = 1; n < argc; n++) { const char *arg = argv[n]; if (strcmp (arg, "-h") == 0 || strcmp (arg, "--help") == 0) { print_usage (argv[0]); return false; } if (strcmp (arg, "-v") == 0 || strcmp (arg, "--version") == 0) { fprintf (stderr, "fdtest_coma version %s\n", DIRECTFB_VERSION); return false; } if (strcmp (arg, "-c") == 0 || strcmp (arg, "--coma") == 0) { if (++n == argc) { print_usage( argv[0] ); return false; } enter_coma = argv[n]; continue; } print_usage (argv[0]); return false; } return true; } DirectFB-1.7.7/tests/dfbtest_reinit.c0000644000175000017500000000500212254435330014402 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Reinit: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "DFBTest/Reinit: 1st DirectFBCreate() failed!\n" ); return ret; } /* Shutdown DirectFB. */ dfb->Release( dfb ); /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "DFBTest/Reinit: 2nd DirectFBCreate() failed!\n" ); return ret; } /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_fillrect.c0000644000175000017500000001564612463500054014731 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include static const DirectFBPixelFormatNames( format_names ); /**********************************************************************************************************************/ static DFBBoolean parse_format( const char *arg, DFBSurfacePixelFormat *_f ) { int i = 0; while (format_names[i].format != DSPF_UNKNOWN) { if (!direct_strcasecmp( arg, format_names[i].name )) { *_f = format_names[i].format; return DFB_TRUE; } ++i; } fprintf (stderr, "\nInvalid format specified!\n\n" ); return DFB_FALSE; } static int print_usage( const char *prg ) { int i = 0; fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Fill Rectangle Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -d, --dest Destination pixel format\n"); return -1; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; int i; long long ms; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBSurface *dest = NULL; DFBSurfacePixelFormat dest_format = DSPF_UNKNOWN; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/FillRectangle: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iSetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/FillRectangle: IDirectFB::CreateSurface() failed!\n" ); goto out; } dest->GetSize( dest, &desc.width, &desc.height ); dest->GetPixelFormat( dest, &desc.pixelformat ); D_INFO( "DFBTest/FillRectangle: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); ms = direct_clock_get_abs_millis(); while (true) { long long now; dest->Clear( dest, 0, 0, 0, 0 ); for (i=0; i<100000; i++) { dest->SetColor( dest, rand()%256, rand()%256, rand()%256, rand()%256 ); dest->FillRectangle( dest, rand()%100, rand()%100, rand()%100, rand()%100 ); } dest->Flip( dest, NULL, DSFLIP_NONE ); now = direct_clock_get_abs_millis(); D_INFO( "Took %lld ms\n", now - ms ); ms = now; } out: if (dest) dest->Release( dest ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_scale_nv21.c0000644000175000017500000001325112254435330015052 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include static int show_usage( const char *prg ) { fprintf( stderr, "Usage: %s \n", prg ); return -1; } int main( int argc, char *argv[] ) { int i; DFBResult ret; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBImageProvider *provider = NULL; IDirectFBSurface *source = NULL; IDirectFBSurface *dest = NULL; IDirectFBSurface *dest2 = NULL; const char *url = NULL; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Scale: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iCreateImageProvider( dfb, url, &provider ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFB::CreateImageProvider( '%s' ) failed!\n", url ); goto out; } /* Get the surface description. */ ret = provider->GetSurfaceDescription( provider, &desc ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFBImageProvider::GetSurfaceDescription() failed!\n" ); goto out; } desc.pixelformat = DSPF_NV21; D_INFO( "DFBTest/Scale: Source is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Create a surface for the image. */ ret = dfb->CreateSurface( dfb, &desc, &source ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFB::CreateSurface() failed!\n" ); goto out; } ret = provider->RenderTo( provider, source, NULL ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFBImageProvider::RenderTo() failed!\n" ); goto out; } desc.width = desc.width * 3 / 4; desc.height = desc.height * 3 / 4; D_INFO( "DFBTest/Scale: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Create a surface for the image. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFB::CreateSurface() failed!\n" ); goto out; } DFBRectangle srect = { 10, 10, 200, 200 }; DFBRectangle drect = { 10, 10, 300, 300 }; DFBRegion clip = { 40, 40, 199, 199 }; dest->Clear( dest, 0xff, 0xff, 0xff, 0xff ); dest->SetClip( dest, &clip ); dest->StretchBlit( dest, source, &srect, &drect ); desc.pixelformat = DSPF_ARGB; D_INFO( "DFBTest/Scale: Destination2 is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Create a surface for the image. */ ret = dfb->CreateSurface( dfb, &desc, &dest2 ); if (ret) { D_DERROR( ret, "DFBTest/Scale: IDirectFB::CreateSurface() failed!\n" ); goto out; } dest2->Blit( dest2, dest, NULL, 0, 0 ); dest2->Dump( dest2, "dfbtest_scale_nv21", NULL ); out: if (dest2) dest2->Release( dest2 ); if (dest) dest->Release( dest ); if (source) source->Release( source ); if (provider) provider->Release( provider ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_surface_compositor.c0000644000175000017500000002011112254435330017014 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include static int m_num = 2; /**********************************************************************************************************************/ static int print_usage( const char *prg ) { fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Surface Compositor Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -n, --num Number of surfaces to create\n"); return -1; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; int i, width, height; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBEventBuffer *events; IDirectFBSurface *primary = NULL; IDirectFBSurface **surfaces = NULL; bool update = true; DirectHash surface_map; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceCompositor: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iCreateEventBuffer( dfb, &events ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceCompositor: IDirectFB::CreateEventBuffer() failed!\n" ); goto out; } surfaces = D_CALLOC( m_num, sizeof(IDirectFBSurface*) ); if (!surfaces) { ret = D_OOM(); goto out; } direct_hash_init( &surface_map, 17 ); dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Fill description for a primary surface. */ desc.flags = DSDESC_CAPS; desc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING; /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &primary ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceCompositor: IDirectFB::CreateSurface() failed!\n" ); goto out; } primary->GetSize( primary, &width, &height ); /* Fill description for a shared offscreen surface. */ desc.flags = DSDESC_CAPS | DSDESC_WIDTH | DSDESC_HEIGHT; desc.caps = DSCAPS_SHARED | DSCAPS_TRIPLE; desc.width = width - 20 * (m_num + 1); desc.height = height - 20 * (m_num + 1); for (i=0; iCreateSurface( dfb, &desc, &surfaces[i] ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceCompositor: IDirectFB::CreateSurface() failed!\n" ); goto out; } surfaces[i]->MakeClient( surfaces[i] ); /* Create event buffer */ ret = surfaces[i]->AttachEventBuffer( surfaces[i], events ); if (ret) { D_DERROR( ret, "DFBTest/SurfaceCompositor: IDirectFBSurface::AttachEventBuffer() failed!\n" ); goto out; } surfaces[i]->GetID( surfaces[i], &surface_id ); surfaces[i]->AllowAccess( surfaces[i], "*" ); D_INFO( "DFBTest/SurfaceCompositor: Surface %d has ID %d\n", i+1, surface_id ); direct_hash_insert( &surface_map, surface_id, surfaces[i] ); } while (true) { DFBEvent event; IDirectFBSurface *surface; while (events->GetEvent( events, &event ) == DFB_OK) { switch (event.clazz) { case DFEC_SURFACE: switch (event.surface.type) { case DSEVT_UPDATE: update = true; surface = direct_hash_lookup( &surface_map, event.surface.surface_id ); if (surface) surface->FrameAck( surface, event.surface.flip_count ); else D_BUG( "Surface with ID %u not found", event.surface.surface_id ); break; default: break; } break; default: break; } } if (update) { primary->Clear( primary, 0, 0, 0, 0x80 ); for (i=0; iBlit( primary, surfaces[i], NULL, 20 + 20 * i, 20 + 20 * i ); } primary->Flip( primary, NULL, DSFLIP_NONE ); update = false; } } out: if (surfaces) { for (i=0; iRelease( surfaces[i] ); } D_FREE( surfaces ); } if (primary) primary->Release( primary ); if (events) events->Release( events ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/Makefile.am0000644000175000017500000002116612463500054013274 00000000000000## Makefile.am for DirectFB/tests AM_CPPFLAGS = \ -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" \ -DFONT=\"@DATADIR@/decker.ttf\" if DIRECTFB_BUILD_ONE ONE_PROGS = \ OneBench \ OneTest endif if DIRECTFB_BUILD_VOODOO SUBDIRS = voodoo VOODOO_PROGS = \ voodoo_bench \ voodoo_bench_client \ voodoo_bench_server \ voodoo_bench_client_unix \ voodoo_bench_server_unix endif if ENABLE_SAWMAN SAWMAN_PROGS = \ sample1 \ testrun \ testman endif if ENABLE_DIVINE DIVINE_PROGS = \ divine_test endif if ENABLE_FUSIONDALE FUSIONDALE_PROGS = \ fdtest_bench \ fdtest_coma \ fdtest_init endif INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/One \ -I$(top_builddir)/lib/divine \ -I$(top_builddir)/lib/fusiondale \ -I$(top_builddir)/lib/sawman \ -I$(top_builddir)/src \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/One \ -I$(top_srcdir)/lib/divine \ -I$(top_srcdir)/lib/fusiondale \ -I$(top_srcdir)/lib/sawman \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include/++dfb \ -I$(top_srcdir)/examples/++dfb \ -DLINUX_2_6 GL_PROGS_ = \ dfbtest_gl1 \ dfbtest_gl2 \ dfbtest_gl3 \ dfbtest_old_gl2 if GFX_GL GL_PROGS = $(GL_PROGS_) endif if GFX_GLES2 GL_PROGS = $(GL_PROGS_) endif if DIRECTFB_BUILD_PURE_VOODOO NON_PURE_VOODOO_PROGS = else NON_PURE_VOODOO_PROGS = \ coretest_blit2 \ coretest_task \ coretest_task_fillrect \ fusion_call \ fusion_call_bench \ fusion_fork \ fusion_reactor \ fusion_skirmish \ fusion_stream endif bin_PROGRAMS = \ $(GL_PROGS) \ $(NON_PURE_VOODOO_PROGS) \ dfbtest_blit \ dfbtest_blit_multi \ dfbtest_blit_threads \ dfbtest_blit2 \ dfbtest_clipboard \ dfbtest_fillrect \ dfbtest_flip \ dfbtest_font \ dfbtest_font_blend \ dfbtest_init \ dfbtest_input \ dfbtest_layers \ dfbtest_mirror \ dfbtest_prealloc \ dfbtest_reinit \ dfbtest_resize \ dfbtest_scale \ dfbtest_scale_nv21 \ dfbtest_stereo_window \ dfbtest_surface_compositor \ dfbtest_surface_compositor_threads \ dfbtest_surface_updates \ dfbtest_sync \ dfbtest_video \ dfbtest_waitserial \ dfbtest_water \ dfbtest_window \ dfbtest_window_cursor \ dfbtest_window_flip \ dfbtest_window_flip_once \ dfbtest_window_surface \ dfbtest_window_update \ dfbtest_windows_watcher \ direct_stream \ direct_test \ dfbtest_alloc \ dfbtest_layer \ dfbtest_stereo \ $(ONE_PROGS) \ $(VOODOO_PROGS) \ $(SAWMAN_PROGS) \ $(DIVINE_PROGS) \ $(FUSIONDALE_PROGS) # for DFB_BASE_LIBS etc... include $(top_srcdir)/rules/libs_deps.make coretest_blit2_SOURCES = coretest_blit2.c coretest_blit2_LDADD = $(DFB_BASE_LIBS) coretest_task_SOURCES = coretest_task.cpp coretest_task_LDADD = $(DFB_BASE_LIBS) coretest_task_fillrect_SOURCES = coretest_task_fillrect.cpp coretest_task_fillrect_LDADD = $(DFB_BASE_LIBS) dfbtest_blit_SOURCES = dfbtest_blit.c dfbtest_blit_LDADD = $(DFB_BASE_LIBS) dfbtest_blit_multi_SOURCES = dfbtest_blit_multi.c dfbtest_blit_multi_LDADD = $(DFB_BASE_LIBS) dfbtest_blit_threads_SOURCES = dfbtest_blit_threads.c dfbtest_blit_threads_LDADD = $(DFB_BASE_LIBS) dfbtest_blit2_SOURCES = dfbtest_blit2.c dfbtest_blit2_LDADD = $(DFB_BASE_LIBS) dfbtest_clipboard_SOURCES = dfbtest_clipboard.c dfbtest_clipboard_LDADD = $(DFB_BASE_LIBS) dfbtest_fillrect_SOURCES = dfbtest_fillrect.c dfbtest_fillrect_LDADD = $(DFB_BASE_LIBS) dfbtest_flip_SOURCES = dfbtest_flip.c dfbtest_flip_LDADD = $(DFB_BASE_LIBS) dfbtest_font_SOURCES = dfbtest_font.c dfbtest_font_LDADD = $(DFB_BASE_LIBS) dfbtest_font_blend_SOURCES = dfbtest_font_blend.cpp ../examples/++dfb/dfbapp.cpp dfbtest_font_blend_LDADD = $(DFB_BASE_LIBS) $(libppdfb) dfbtest_init_SOURCES = dfbtest_init.c dfbtest_init_LDADD = $(DFB_BASE_LIBS) dfbtest_input_SOURCES = dfbtest_input.c dfbtest_input_LDADD = $(DFB_BASE_LIBS) dfbtest_layers_SOURCES = dfbtest_layers.c dfbtest_layers_LDADD = $(DFB_BASE_LIBS) dfbtest_gl1_SOURCES = dfbtest_gl1.c dfbtest_gl1_CFLAGS = $(GLES2_CFLAGS) dfbtest_gl1_LDADD = $(DFB_BASE_LIBS) $(GL_DFB_BASE_LIBS) $(GLES2_DFB_BASE_LIBS) dfbtest_gl2_SOURCES = dfbtest_gl2.c dfbtest_gl2_CFLAGS = $(GLES2_CFLAGS) dfbtest_gl2_LDADD = $(DFB_BASE_LIBS) $(GL_DFB_BASE_LIBS) $(GLES2_DFB_BASE_LIBS) $(LIBM) dfbtest_gl3_SOURCES = dfbtest_gl3.c dfbtest_gl3_CFLAGS = $(GLES2_CFLAGS) dfbtest_gl3_LDADD = $(DFB_BASE_LIBS) $(GL_DFB_BASE_LIBS) $(GLES2_DFB_BASE_LIBS) $(LIBM) dfbtest_old_gl2_SOURCES = dfbtest_old_gl2.c dfbtest_old_gl2_CFLAGS = $(GLES2_CFLAGS) dfbtest_old_gl2_LDADD = $(DFB_BASE_LIBS) $(GL_DFB_BASE_LIBS) $(GLES2_DFB_BASE_LIBS) $(LIBM) dfbtest_layer_SOURCES = dfbtest_layer.c dfbtest_layer_LDADD = $(DFB_BASE_LIBS) dfbtest_stereo_SOURCES = dfbtest_stereo.c dfbtest_stereo_LDADD = $(DFB_BASE_LIBS) dfbtest_alloc_SOURCES = dfbtest_alloc.c dfbtest_alloc_LDADD = $(DFB_BASE_LIBS) dfbtest_mirror_SOURCES = dfbtest_mirror.c dfbtest_mirror_LDADD = $(DFB_BASE_LIBS) dfbtest_prealloc_SOURCES = dfbtest_prealloc.c dfbtest_prealloc_LDADD = $(DFB_BASE_LIBS) dfbtest_reinit_SOURCES = dfbtest_reinit.c dfbtest_reinit_LDADD = $(DFB_BASE_LIBS) dfbtest_resize_SOURCES = dfbtest_resize.c dfbtest_resize_LDADD = $(DFB_BASE_LIBS) dfbtest_scale_SOURCES = dfbtest_scale.c dfbtest_scale_LDADD = $(DFB_BASE_LIBS) dfbtest_scale_nv21_SOURCES = dfbtest_scale_nv21.c dfbtest_scale_nv21_LDADD = $(DFB_BASE_LIBS) dfbtest_stereo_window_SOURCES = dfbtest_stereo_window.c dfbtest_stereo_window_LDADD = $(DFB_BASE_LIBS) dfbtest_surface_compositor_SOURCES = dfbtest_surface_compositor.c dfbtest_surface_compositor_LDADD = $(DFB_BASE_LIBS) dfbtest_surface_compositor_threads_SOURCES = dfbtest_surface_compositor_threads.c dfbtest_surface_compositor_threads_LDADD = $(DFB_BASE_LIBS) dfbtest_surface_updates_SOURCES = dfbtest_surface_updates.c dfbtest_surface_updates_LDADD = $(DFB_BASE_LIBS) dfbtest_sync_SOURCES = dfbtest_sync.c dfbtest_sync_LDADD = $(DFB_BASE_LIBS) dfbtest_video_SOURCES = dfbtest_video.c dfbtest_video_LDADD = $(DFB_BASE_LIBS) dfbtest_waitserial_SOURCES = dfbtest_waitserial.c dfbtest_waitserial_LDADD = $(DFB_BASE_LIBS) dfbtest_water_SOURCES = dfbtest_water.c dfbtest_water_LDADD = $(DFB_BASE_LIBS) dfbtest_window_SOURCES = dfbtest_window.c dfbtest_window_LDADD = $(DFB_BASE_LIBS) dfbtest_window_cursor_SOURCES = dfbtest_window_cursor.c dfbtest_window_cursor_LDADD = $(DFB_BASE_LIBS) dfbtest_window_flip_SOURCES = dfbtest_window_flip.c dfbtest_window_flip_LDADD = $(DFB_BASE_LIBS) dfbtest_window_flip_once_SOURCES = dfbtest_window_flip_once.c dfbtest_window_flip_once_LDADD = $(DFB_BASE_LIBS) dfbtest_window_surface_SOURCES = dfbtest_window_surface.c dfbtest_window_surface_LDADD = $(DFB_BASE_LIBS) dfbtest_window_update_SOURCES = dfbtest_window_update.c dfbtest_window_update_LDADD = $(DFB_BASE_LIBS) dfbtest_windows_watcher_SOURCES = dfbtest_windows_watcher.c dfbtest_windows_watcher_LDADD = $(DFB_BASE_LIBS) direct_stream_SOURCES = direct_stream.c direct_stream_LDADD = $(libdirect) direct_test_SOURCES = direct_test.c direct_test_LDADD = $(libdirect) fusion_call_SOURCES = fusion_call.c fusion_call_LDADD = $(DFB_BASE_LIBS) fusion_call_bench_SOURCES = fusion_call_bench.c fusion_call_bench_LDADD = $(DFB_BASE_LIBS) fusion_fork_SOURCES = fusion_fork.c fusion_fork_LDADD = $(DFB_BASE_LIBS) fusion_reactor_SOURCES = fusion_reactor.c fusion_reactor_LDADD = $(DFB_BASE_LIBS) fusion_skirmish_SOURCES = fusion_skirmish.c fusion_skirmish_LDADD = $(DFB_BASE_LIBS) fusion_stream_SOURCES = fusion_stream.c fusion_stream_LDADD = $(DFB_BASE_LIBS) OneBench_SOURCES = OneBench.c OneBench_LDADD = $(DFB_BASE_LIBS) OneTest_SOURCES = OneTest.c OneTest_LDADD = $(DFB_BASE_LIBS) voodoo_bench_SOURCES = voodoo_bench.c voodoo_bench_LDADD = $(DFB_BASE_LIBS) voodoo_bench_client_SOURCES = voodoo_bench_client.c voodoo_bench_client_LDADD = $(DFB_BASE_LIBS) voodoo_bench_server_SOURCES = voodoo_bench_server.c voodoo_bench_server_LDADD = $(DFB_BASE_LIBS) voodoo_bench_client_unix_SOURCES = voodoo_bench_client_unix.c voodoo_bench_client_unix_LDADD = $(DFB_BASE_LIBS) voodoo_bench_server_unix_SOURCES = voodoo_bench_server_unix.c voodoo_bench_server_unix_LDADD = $(DFB_BASE_LIBS) testman_SOURCES = testman.c testman_LDADD = $(DFB_BASE_LIBS) $(libsawman) testrun_SOURCES = testrun.c testrun_LDADD = $(DFB_BASE_LIBS) $(libsawman) sample1_SOURCES = sample1.c sample1_LDADD = $(DFB_BASE_LIBS) $(libsawman) divine_test_SOURCES = divine_test.c divine_test_LDADD = $(DFB_BASE_LIBS) $(libdivine) fdtest_bench_SOURCES = fdtest_bench.c fdtest_bench_LDADD = $(libfusion) $(libdirect) $(libfusiondale) fdtest_coma_SOURCES = fdtest_coma.c fdtest_coma_LDADD = $(libfusion) $(libdirect) $(libfusiondale) fdtest_init_SOURCES = fdtest_init.c fdtest_init_LDADD = $(libfusion) $(libdirect) $(libfusiondale) DirectFB-1.7.7/tests/dfbtest_resize.c0000644000175000017500000001462612254435330014425 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include static int quit = 0; static void * TestThread( DirectThread *thread, void *arg ) { DFBResult ret; IDirectFBSurface *surface = arg; DFBRectangle rect = { 0, 0, 500, 1 }; while (!quit) { void *data; int pitch; ret = surface->Lock( surface, DSLF_WRITE, &data, &pitch ); if (ret) { D_DERROR( ret, "DFBTest/Resize: Lock() failed!\n" ); return NULL; } if (!data) { D_DERROR( ret, "DFBTest/Resize:invalid pointer!\n" ); return NULL; } memset( data, 0, pitch * 400 ); surface->Unlock( surface ); data = malloc( pitch ); ret = surface->Read( surface, &rect, data, pitch ); if (ret) { D_DERROR( ret, "DFBTest/Resize: Read() failed!\n" ); free (data); return NULL; } ret = surface->Write( surface, &rect, data, pitch ); if (ret) { D_DERROR( ret, "DFBTest/Resize: Write() failed!\n" ); free(data); return NULL; } free(data); } return NULL; } static void TestResize( IDirectFB *dfb ) { DFBResult ret; DirectThread *thread; DFBWindowDescription desc; IDirectFBDisplayLayer *layer; IDirectFBWindow *window; IDirectFBSurface *surface; DFBInputEvent evt; IDirectFBEventBuffer *keybuffer; quit = 0; /* Create an input buffer for key events */ ret = dfb->CreateInputEventBuffer( dfb, DICAPS_KEYS, DFB_FALSE, &keybuffer); if (ret) { D_DERROR( ret, "DFBTest/Resize: CreateInputBuffer() failed!\n" ); return; } ret = dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ); if (ret) { D_DERROR( ret, "DFBTest/Resize: Failed to get display layer!\n" ); keybuffer->Release( keybuffer ); return; } desc.flags = DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_PIXELFORMAT; desc.width = 500; desc.height = 500; desc.pixelformat = DSPF_ARGB; ret = layer->CreateWindow( layer, &desc, &window ); if (ret) { D_DERROR( ret, "DFBTest/Resize: CreateWindow() failed!\n" ); keybuffer->Release( keybuffer ); layer->Release( layer ); return; } ret = window->GetSurface( window, &surface ); if (ret) { D_DERROR( ret, "DFBTest/Resize: GetSurface() failed!\n" ); keybuffer->Release( keybuffer ); window->Release( window ); layer->Release( layer ); return; } thread = direct_thread_create( DTT_DEFAULT, TestThread, surface, "Test" ); while (!quit) { ret = window->Resize( window, 500, 400 ); if (ret) D_DERROR( ret, "DFBTest/Resize: Resize() failed!\n" ); ret = window->Resize( window, 500, 500 ); if (ret) D_DERROR( ret, "DFBTest/Resize: Resize() failed!\n" ); /* Process keybuffer */ while (keybuffer->GetEvent( keybuffer, DFB_EVENT(&evt)) == DFB_OK) { if (evt.type == DIET_KEYPRESS) { switch (DFB_LOWER_CASE(evt.key_symbol)) { case DIKS_ESCAPE: case DIKS_SMALL_Q: case DIKS_BACK: case DIKS_STOP: case DIKS_EXIT: /* Quit main loop & test thread */ quit = 1; direct_thread_join(thread); break; default: break; } } } } keybuffer->Release( keybuffer ); surface->Release( surface ); window->Release( window ); layer->Release( layer ); } int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Resize: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "DFBTest/Resize: DirectFBCreate() failed!\n" ); return ret; } /* Required for keyboard access */ dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); TestResize( dfb ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_window_cursor.c0000644000175000017500000002124212361150102016006 00000000000000#include #include #include #include #include #include #include /**************************************************************************************************/ typedef struct { int magic; IDirectFBWindow *window; IDirectFBSurface *surface; DFBWindowID window_id; } DemoWindow; /**************************************************************************************************/ static IDirectFB *m_dfb = NULL; static IDirectFBDisplayLayer *m_layer = NULL; static IDirectFBEventBuffer *m_events = NULL; /**************************************************************************************************/ static DemoWindow windows[2]; /**************************************************************************************************/ static DFBResult init_directfb( int *pargc, char ***pargv ) { DFBResult ret; D_ASSERT( m_dfb == NULL ); D_ASSERT( m_layer == NULL ); D_ASSERT( m_events == NULL ); ret = DirectFBInit( pargc, pargv ); if (ret) { DirectFBError( "DirectFBInit() failed", ret ); return ret; } ret = DirectFBCreate( &m_dfb ); if (ret) { DirectFBError( "DirectFBCreate() failed", ret ); return ret; } ret = m_dfb->GetDisplayLayer( m_dfb, DLID_PRIMARY, &m_layer ); if (ret) { DirectFBError( "IDirectFB::GetDisplayLayer() failed", ret ); goto error; } ret = m_dfb->CreateEventBuffer( m_dfb, &m_events ); if (ret) { DirectFBError( "IDirectFB::CreateEventBuffer() failed", ret ); goto error; } return DFB_OK; error: if (m_layer) { m_layer->Release( m_layer ); m_layer = NULL; } if (m_dfb) { m_dfb->Release( m_dfb ); m_dfb = NULL; } return ret; } static void destroy_directfb( void ) { D_ASSERT( m_events != NULL ); D_ASSERT( m_layer != NULL ); D_ASSERT( m_dfb != NULL ); m_events->Release( m_events ); m_layer->Release( m_layer ); m_dfb->Release( m_dfb ); m_events = NULL; m_layer = NULL; m_dfb = NULL; } /**************************************************************************************************/ static void init_cursor( IDirectFBWindow *window ) { DFBSurfaceDescription desc; IDirectFBSurface *surface; desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT; desc.width = 100; desc.height = 100; desc.pixelformat = DSPF_ARGB; m_dfb->CreateSurface( m_dfb, &desc, &surface ); surface->Clear( surface, 0, 0, 0, 0 ); surface->SetColor( surface, 0xff, 0, 0, 0xff ); surface->DrawRectangle( surface, 0, 0, desc.width, desc.height ); window->SetCursorShape( window, surface, 50, 50 ); } static DFBResult init_window( DemoWindow *dw, const DFBRectangle *rect, u32 key, DFBWindowStackingClass stacking, DFBWindowCapabilities caps, DFBWindowOptions options, DemoWindow *parent ) { DFBResult ret; DFBWindowDescription desc; IDirectFBWindow *window; IDirectFBSurface *surface = NULL; D_ASSERT( dw != NULL ); DFB_RECTANGLE_ASSERT( rect ); D_MAGIC_ASSERT_IF( parent, DemoWindow ); /* Fill window description. */ desc.flags = DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_CAPS | DWDESC_STACKING | DWDESC_OPTIONS | DWDESC_POSX | DWDESC_POSY; desc.width = rect->w; desc.height = rect->h; desc.posx = rect->x; desc.posy = rect->y; desc.caps = caps; desc.stacking = stacking; desc.options = options;// | (key ? DWOP_COLORKEYING : DWOP_NONE); if (parent) { desc.flags |= DWDESC_PARENT; desc.parent_id = parent->window_id; } /* Create the window. */ ret = m_layer->CreateWindow( m_layer, &desc, &window ); if (ret) { DirectFBError( "IDirectFBDisplayLayer::CreateWindow() failed", ret ); return ret; } if (!(caps & DWCAPS_INPUTONLY)) { ret = window->GetSurface( window, &surface ); if (ret) { DirectFBError( "IDirectFBWindow::GetSurface() failed", ret ); window->Release( window ); return ret; } window->SetColorKey( window, (key >> 16) & 0xff, (key >> 8) & 0xff, key & 0xff ); surface->Clear( surface, (key >> 16) & 0xff, (key >> 8) & 0xff, key & 0xff, 0xff ); } window->AttachEventBuffer( window, m_events ); window->GetID( window, &dw->window_id ); init_cursor( window ); /* Return new interfaces. */ dw->window = window; dw->surface = surface; D_MAGIC_SET( dw, DemoWindow ); return DFB_OK; } static void show_window( DemoWindow *dw, bool visible ) { IDirectFBWindow *window; D_MAGIC_ASSERT( dw, DemoWindow ); window = dw->window; D_ASSERT( window != NULL ); window->SetOpacity( window, visible ? 0xff : 0x00 ); } static void destroy_window( DemoWindow *dw ) { IDirectFBSurface *surface; IDirectFBWindow *window; D_MAGIC_ASSERT( dw, DemoWindow ); surface = dw->surface; D_ASSERT( surface != NULL ); window = dw->window; D_ASSERT( window != NULL ); window->DetachEventBuffer( window, m_events ); surface->Release( surface ); window->Release( window ); dw->surface = NULL; dw->window = NULL; D_MAGIC_CLEAR( dw ); } /**************************************************************************************************/ static DFBBoolean dispatch_events( void ) { DFBWindowEvent event; while (m_events->GetEvent( m_events, DFB_EVENT(&event) ) == DFB_OK) { int i; switch (event.type) { case DWET_GOTFOCUS: for (i=0; i<2; i++) { if (windows[i].window_id == event.window_id) { windows[i].surface->Clear( windows[i].surface, 0xff, 0xff, 0xff, 0xff ); windows[i].surface->Flip( windows[i].surface, NULL, DSFLIP_NONE ); } } break; case DWET_LOSTFOCUS: for (i=0; i<2; i++) { if (windows[i].window_id == event.window_id) { windows[i].surface->Clear( windows[i].surface, 0x00, 0x00, 0x00, 0xff ); windows[i].surface->Flip( windows[i].surface, NULL, DSFLIP_NONE ); } } break; case DWET_KEYDOWN: switch (event.key_symbol) { case DIKS_1: windows[0].window->RequestFocus( windows[0].window ); break; case DIKS_2: windows[1].window->RequestFocus( windows[1].window ); break; case DIKS_SMALL_X: for (i=0; i<2; i++) { if (windows[i].window_id == event.window_id) windows[i].window->SetOpacity( windows[i].window, 0 ); } break; default: break; } break; default: break; } } return DFB_TRUE; } /**************************************************************************************************/ int main( int argc, char *argv[] ) { int i; DFBRectangle rects[2] = { { 100, 100, 200, 200 }, { 200, 400, 200, 200 } }; if (init_directfb( &argc, &argv )) return -1; for (i=0; i<2; i++) { if (init_window( &windows[i], &rects[i], 0x000400, DWSC_LOWER, DWCAPS_NONE, DWOP_NONE, NULL )) { destroy_directfb(); return -2; } show_window( &windows[i], true ); } windows[0].window->SetCursorFlags( windows[0].window, DWCF_NONE ); windows[1].window->SetCursorFlags( windows[1].window, DWCF_INVISIBLE ); windows[1].window->RequestFocus( windows[1].window ); while (dispatch_events()) m_events->WaitForEvent( m_events ); for (i=0; i<2; i++) { destroy_window( &windows[i] ); } destroy_directfb(); return 0; } DirectFB-1.7.7/tests/fusion_call.c0000644000175000017500000001456512254435330013711 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "config.h" #include #include #include #include #include #include #include #include #include #ifndef HAVE_FORK # define fork() -1 #endif /**********************************************************************************************************************/ static int parse_cmdline ( int argc, char *argv[] ); static int show_usage ( void ); /**********************************************************************************************************************/ #define MAX_PARTICIPANTS (20) static int participants = 2; static int participant; struct sharedData { volatile int initDone; FusionCall call[MAX_PARTICIPANTS+1]; /* 0 = empty. just being lazy. */ FusionSkirmish skirmish; }; /**********************************************************************************************************************/ static FusionCallHandlerResult call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { struct sharedData *shared = ctx; int ret = 0; fusion_skirmish_prevail( &shared->skirmish ); if (participant < participants) if (random() & 1) fusion_call_execute( &shared->call[participant+1], FCEF_NONE, 0, 0, &ret ); fusion_skirmish_dismiss( &shared->skirmish ); *ret_val = ret + 1; return FCHR_RETURN; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DirectResult ret; FusionWorld *world; FusionSHMPoolShared *pool; struct sharedData *shared; sigset_t block; int retcall; int i; if (parse_cmdline( argc, argv )) return -1; ret = fusion_enter( 0, 23, FER_ANY, &world ); if (ret) return ret; ret = fusion_shm_pool_create( world, "Shared Memory", 8192, false, &pool ); if (ret) return ret; ret = fusion_shm_pool_allocate( pool, sizeof(struct sharedData), true, true, (void**)&shared ); if (ret) return ret; /* * Do the fork() magic! */ fusion_world_set_fork_action( world, FFA_FORK ); for (i=1; icall[participant], call_handler, shared, world ); if (ret) return ret; shared->initDone++; /* wait a bit before start, make sure the calls exist */ while( shared->initDone != participants ) usleep(50000); if (participant == 1) { /* we generate a skirmish that will be transported along */ ret = fusion_skirmish_init( &shared->skirmish, "Test", world ); if (ret) return -1; fusion_skirmish_prevail( &shared->skirmish ); for(;;) { fusion_call_execute( &shared->call[2], FCEF_NONE, 0, 0, &retcall ); printf("pcp %d, result: %d\n", participant, retcall); } } /* we rely on exit() */ sigemptyset( &block ); sigsuspend( &block ); } /**********************************************************************************************************************/ static int parse_cmdline( int argc, char *argv[] ) { int i; char *end; for (i=1; i MAX_PARTICIPANTS) return show_usage(); } else return show_usage(); } } return 0; } static int show_usage( void ) { fprintf( stderr, "\n" "Usage:\n" " fusion_call [options]\n" "\n" "Options:\n" " -p <2-MAX> Number of participants\n" "\n" ); return -1; } DirectFB-1.7.7/tests/voodoo/0000755000175000017500000000000012466665356012643 500000000000000DirectFB-1.7.7/tests/voodoo/Makefile.am0000644000175000017500000000067212171403127014577 00000000000000## Makefile.am for DirectFB/tests/voodoo INCLUDES = \ -I$(top_builddir)/lib \ -I$(top_srcdir)/lib noinst_PROGRAMS = \ voodoo_client \ voodoo_server libvoodoo = $(top_builddir)/lib/voodoo/libvoodoo.la libdirect = $(top_builddir)/lib/direct/libdirect.la voodoo_client_SOURCES = voodoo_client.c voodoo_client_LDADD = $(libvoodoo) $(libdirect) voodoo_server_SOURCES = voodoo_server.c voodoo_server_LDADD = $(libvoodoo) $(libdirect) DirectFB-1.7.7/tests/voodoo/voodoo_server.c0000644000175000017500000000614612171403127015604 00000000000000#include #include #include #include #include #include #include "voodoo_test.h" /* * Server structure */ typedef struct { VoodooServer *server; unsigned int count; } VoodooTestServer; /* * Per client structure */ typedef struct { /* ignore */ IAny dummy; VoodooManager *manager; VoodooTestServer *server; } VoodooTestConnection; /* ignore */ static DirectResult DummyRelease( IAny *thiz ) { return DR_OK; } /* * Callback for handling incoming requests */ static DirectResult VoodooTestDispatch( void *dispatcher, /* context 1 */ void *real, /* context 2 */ VoodooManager *manager, VoodooRequestMessage *msg ) { VoodooTestConnection *connection = dispatcher; VoodooTestServer *server = connection->server; switch (msg->method) { case VOODOO_TEST_INCREASE: server->count++; break; case VOODOO_TEST_QUERY: voodoo_manager_respond( manager, true, msg->header.serial, DR_OK, VOODOO_INSTANCE_NONE, VMBT_UINT, server->count, VMBT_NONE ); break; } return DR_OK; } /* * Callback for creating a new instance on a connection */ static DirectResult VoodooTestConstruct( VoodooServer *_server, VoodooManager *manager, const char *name, void *ctx, /* context pointer */ VoodooInstanceID *ret_instance ) { VoodooTestServer *server = ctx; VoodooInstanceID instance_id; VoodooTestConnection *connection; connection = D_CALLOC( 1, sizeof(VoodooTestConnection) ); if (!connection) return D_OOM(); connection->manager = manager; connection->server = server; /* ignore */ connection->dummy.Release = DummyRelease; /* Create a new instance with our callback */ voodoo_manager_register_local( manager, VOODOO_INSTANCE_NONE, connection /* context 1 */, connection /* context 2 */, VoodooTestDispatch, &instance_id ); D_INFO( "Voodoo/Test: Created instance %u for client with manager %p...\n", instance_id, manager ); *ret_instance = instance_id; return DR_OK; } int main( int argc, char *argv[] ) { DirectResult ret; VoodooTestServer test = {0}; ret = voodoo_server_create( "127.0.0.1", 23456, false, &test.server ); if (ret) { D_DERROR( ret, "voodoo_server_create() failed!\n" ); return ret; } voodoo_server_register( test.server, "VoodooTest", VoodooTestConstruct, &test /* context pointer */ ); D_INFO( "Voodoo/Test: Running server...\n" ); voodoo_server_run( test.server ); voodoo_server_destroy( test.server ); return 0; } DirectFB-1.7.7/tests/voodoo/Makefile.in0000644000175000017500000005513312466665317014634 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ noinst_PROGRAMS = voodoo_client$(EXEEXT) voodoo_server$(EXEEXT) subdir = tests/voodoo DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_voodoo_client_OBJECTS = voodoo_client.$(OBJEXT) voodoo_client_OBJECTS = $(am_voodoo_client_OBJECTS) voodoo_client_DEPENDENCIES = $(libvoodoo) $(libdirect) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_voodoo_server_OBJECTS = voodoo_server.$(OBJEXT) voodoo_server_OBJECTS = $(am_voodoo_server_OBJECTS) voodoo_server_DEPENDENCIES = $(libvoodoo) $(libdirect) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(voodoo_client_SOURCES) $(voodoo_server_SOURCES) DIST_SOURCES = $(voodoo_client_SOURCES) $(voodoo_server_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/lib \ -I$(top_srcdir)/lib libvoodoo = $(top_builddir)/lib/voodoo/libvoodoo.la libdirect = $(top_builddir)/lib/direct/libdirect.la voodoo_client_SOURCES = voodoo_client.c voodoo_client_LDADD = $(libvoodoo) $(libdirect) voodoo_server_SOURCES = voodoo_server.c voodoo_server_LDADD = $(libvoodoo) $(libdirect) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/voodoo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/voodoo/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list voodoo_client$(EXEEXT): $(voodoo_client_OBJECTS) $(voodoo_client_DEPENDENCIES) $(EXTRA_voodoo_client_DEPENDENCIES) @rm -f voodoo_client$(EXEEXT) $(AM_V_CCLD)$(LINK) $(voodoo_client_OBJECTS) $(voodoo_client_LDADD) $(LIBS) voodoo_server$(EXEEXT): $(voodoo_server_OBJECTS) $(voodoo_server_DEPENDENCIES) $(EXTRA_voodoo_server_DEPENDENCIES) @rm -f voodoo_server$(EXEEXT) $(AM_V_CCLD)$(LINK) $(voodoo_server_OBJECTS) $(voodoo_server_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/voodoo_client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/voodoo_server.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # 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: DirectFB-1.7.7/tests/voodoo/voodoo_client.c0000644000175000017500000000420612171403127015547 00000000000000#include #include #include #include #include "voodoo_test.h" /* * Client structure */ typedef struct { VoodooClient *client; VoodooManager *manager; VoodooInstanceID instance_id; } VoodooTestClient; int main( int argc, char *argv[] ) { DirectResult ret; int i; VoodooTestClient test; D_INFO( "Voodoo/Test: Connecting to server on localhost...\n" ); ret = voodoo_client_create( "127.0.0.1", 23456, &test.client ); if (ret) { D_DERROR( ret, "voodoo_client_create() failed!\n" ); return ret; } test.manager = voodoo_client_manager( test.client ); /* Create a new instance on the connection */ ret = voodoo_manager_super( test.manager, "VoodooTest", &test.instance_id ); if (ret) { D_DERROR( ret, "voodoo_manager_super() failed!\n" ); return ret; } /* Call several times asynchronous increase... */ for (i=0; i<1000000000; i++) { ret = voodoo_manager_request( test.manager, test.instance_id, VOODOO_TEST_INCREASE, VREQ_QUEUE, NULL, VMBT_NONE ); if (ret) { D_DERROR( ret, "voodoo_manager_request( VOODOO_TEST_INCREASE ) failed!\n" ); return ret; } } /* Call query synchronously */ VoodooResponseMessage *response; ret = voodoo_manager_request( test.manager, test.instance_id, VOODOO_TEST_QUERY, VREQ_RESPOND, &response, VMBT_NONE ); if (ret) { D_DERROR( ret, "voodoo_manager_request( VOODOO_TEST_QUERY ) failed!\n" ); return ret; } /* Read contents of response */ VoodooMessageParser parser; unsigned int counter; VOODOO_PARSER_BEGIN( parser, response ); VOODOO_PARSER_GET_UINT( parser, counter ); VOODOO_PARSER_END( parser ); voodoo_manager_finish_request( test.manager, response ); D_INFO( "Voodoo/Test: Counter is now at %u\n", counter ); voodoo_client_destroy( test.client ); return 0; } DirectFB-1.7.7/tests/dfbtest_blit_multi.c0000644000175000017500000002625212254435330015266 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include static const DirectFBPixelFormatNames( format_names ); /**********************************************************************************************************************/ static DFBBoolean parse_format( const char *arg, DFBSurfacePixelFormat *_f ) { int i = 0; while (format_names[i].format != DSPF_UNKNOWN) { if (!direct_strcasecmp( arg, format_names[i].name )) { *_f = format_names[i].format; return DFB_TRUE; } ++i; } fprintf (stderr, "\nInvalid format specified!\n\n" ); return DFB_FALSE; } static int print_usage( const char *prg ) { int i = 0; fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Blitting Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -s, --source Source pixel format\n"); fprintf (stderr, " -d, --dest Destination pixel format\n"); fprintf (stderr, " -r, --resize Set destination from source size\n"); fprintf (stderr, " -b, --benchmark Enable benchmarking mode\n"); fprintf (stderr, " -R, --rerender Rerender before every blit (benchmark)\n"); return -1; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { int i; DFBResult ret; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBImageProvider *provider = NULL; IDirectFBSurface **sources = NULL; IDirectFBSurface *dest = NULL; const char *url = NULL; DFBSurfacePixelFormat source_format = DSPF_UNKNOWN; DFBSurfacePixelFormat dest_format = DSPF_UNKNOWN; bool dest_resize = false; bool benchmark = false; bool rerender = false; int num_sources = 100; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Blit: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iCreateImageProvider( dfb, url, &provider ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateImageProvider( '%s' ) failed!\n", url ); goto out; } /* Get the surface description. */ ret = provider->GetSurfaceDescription( provider, &desc ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFBImageProvider::GetSurfaceDescription() failed!\n" ); goto out; } if (source_format != DSPF_UNKNOWN) desc.pixelformat = source_format; D_INFO( "DFBTest/Blit: Source is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); desc.width = 10; desc.height = 10; for (i=0; iCreateSurface( dfb, &desc, &sources[i] ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateSurface() failed!\n" ); goto out; } ret = provider->RenderTo( provider, sources[i], NULL ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFBImageProvider::RenderTo() failed!\n" ); goto out; } } /* Fill description for a primary surface. */ desc.flags = DSDESC_CAPS; desc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING; if (dest_format != DSPF_UNKNOWN) { desc.flags |= DSDESC_PIXELFORMAT; desc.pixelformat = dest_format; } if (dest_resize) desc.flags |= DSDESC_WIDTH | DSDESC_HEIGHT; dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFB::CreateSurface() failed!\n" ); goto out; } dest->GetSize( dest, &desc.width, &desc.height ); dest->GetPixelFormat( dest, &desc.pixelformat ); D_INFO( "DFBTest/Blit: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); for (i=0; iStretchBlit( dest, sources[i], NULL, NULL ); dest->Flip( dest, NULL, DSFLIP_NONE ); while (benchmark) { int num = 0; long long start, diff = 0, speed; // direct_sync(); // direct_thread_sleep( 1000000 ); for (i=0; iStretchBlit( dest, sources[i], NULL, NULL ); D_INFO( "DFBTest/Blit: Benchmarking...\n" ); dfb->WaitIdle( dfb ); start = direct_clock_get_millis(); do { if (rerender) { for (i=0; iRenderTo( provider, sources[i], NULL ); if (ret) { D_DERROR( ret, "DFBTest/Blit: IDirectFBImageProvider::RenderTo() failed!\n" ); goto out; } } } for (i=0; iStretchBlit( dest, sources[i], NULL, NULL ); if ((num & 7) == 7) diff = direct_clock_get_millis() - start; num++; } while (diff < 2300); num *= num_sources; dfb->WaitIdle( dfb ); diff = direct_clock_get_millis() - start; speed = (long long) num * desc.width * desc.height / diff; D_INFO( "DFBTest/Blit: Speed is %lld.%03lld MPixel/sec (%dx%d x %d in %lld.%03lld sec)\n", speed / 1000LL, speed % 1000LL, desc.width, desc.height, num, diff / 1000LL, diff % 1000LL ); } // else // direct_thread_sleep( 2000000 ); out: if (dest) dest->Release( dest ); for (i=0; iRelease( sources[i] ); if (provider) provider->Release( provider ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/direct_stream.c0000644000175000017500000001050412254435330014225 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include D_DEBUG_DOMAIN( Direct_Cat, "Direct/Cat", "libdirect cat" ); static int show_usage( const char *prg ) { fprintf( stderr, "Usage: %s \n", prg ); return -1; } int main( int argc, char *argv[] ) { DirectResult ret; int i, fdo; DirectStream *stream; const char *url = NULL; /* Parse arguments. */ for (i=1; i, Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #ifndef HAVE_FORK # define fork() -1 #endif #if DIRECT_BUILD_DEBUGS #define MSG(x...) \ do { \ direct_log_printf( NULL, x ); \ } while (0) #else #define MSG(x...) \ do { \ } while (0) #endif typedef struct { unsigned int foo; } TestMessage; static FusionWorld *m_world; static ReactionResult reaction_callback( const void *msg_data, void *ctx ) { MSG( "Received message (FusionID %lu, pid %d)!\n", fusion_id( m_world ), getpid() ); return RS_REMOVE; } static FusionCallHandlerResult dispatch_callback (int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { MSG( "Got dispatch callback (FusionID %lu, pid %d)!\n", fusion_id( m_world ), getpid() ); return FCHR_RETURN; } int main( int argc, char *argv[] ) { DirectResult ret; pid_t child_pid; TestMessage message = {0}; FusionReactor *reactor; Reaction reaction; FusionCall call; DirectFBInit( &argc, &argv ); ret = fusion_enter( -1, 0, FER_MASTER, &m_world ); if (ret) { D_DERROR( ret, "fusion_enter() failed" ); return ret; } MSG( "Entered world %d as master (FusionID %lu, pid %d)\n", fusion_world_index( m_world ), fusion_id( m_world ), getpid() ); reactor = fusion_reactor_new( sizeof(TestMessage), "Test", m_world ); if (!reactor) { D_ERROR( "fusion_reactor_new() failed\n" ); return -1; } MSG( "Attaching to reactor...\n" ); ret = fusion_reactor_attach( reactor, reaction_callback, NULL, &reaction ); if (ret) { D_DERROR( ret, "fusion_reactor_attach() failed" ); return ret; } MSG( ".........FORKING NOW.........\n" ); fusion_world_set_fork_action( m_world, FFA_FORK ); child_pid = fork(); fusion_world_set_fork_action( m_world, FFA_CLOSE ); switch (child_pid) { case -1: D_PERROR( "fork() failed" ); break; case 0: setsid(); MSG( "...arrived after fork() in child (pid %d)..\n", getpid() ); MSG( "..child (FusionID %lu).\n", fusion_id( m_world ) ); usleep( 400000 ); break; default: usleep( 100000 ); MSG( "...returned from fork() in parent, child pid %d.\n", child_pid ); MSG( "Initializing dispatch callback...\n" ); ret = fusion_call_init( &call, dispatch_callback, NULL, m_world ); if (ret) { D_DERROR( ret, "fusion_call_init() failed" ); return ret; } MSG( "Setting dispatch callback...\n" ); ret = fusion_reactor_set_dispatch_callback( reactor, &call, NULL ); if (ret) { D_DERROR( ret, "fusion_reactor_set_dispatch_callback() failed" ); return ret; } MSG( "Sending message via reactor...\n" ); fusion_reactor_dispatch( reactor, &message, true, NULL ); usleep( 100000 ); MSG( "Destroying reactor...\n" ); fusion_reactor_destroy( reactor ); MSG( "...destroyed reactor!\n" ); usleep( 400000 ); MSG( "Freeing reactor...\n" ); fusion_reactor_free( reactor ); MSG( "...freed reactor!\n" ); break; } MSG( "Exiting from world %d (FusionID %lu, pid %d)...\n", fusion_world_index( m_world ), fusion_id( m_world ), getpid() ); fusion_exit( m_world, false ); return 0; } DirectFB-1.7.7/tests/dfbtest_stereo_window.c0000644000175000017500000001265212171403127016006 00000000000000#include #include #define APP "dfbtest_stereo_window" static DFBResult create_window( IDirectFBDisplayLayer *layer, int x, int y, IDirectFBWindow **ret_window, IDirectFBSurface **ret_surface ) { DFBResult ret; IDirectFBWindow *window; IDirectFBSurface *surface; DFBWindowDescription window_desc; window_desc.flags = DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_POSX | DWDESC_POSY | DWDESC_CAPS; window_desc.width = 400; window_desc.height = 300; window_desc.posx = x; window_desc.posy = y; window_desc.caps = DWCAPS_ALPHACHANNEL | DWCAPS_LR_MONO; ret = layer->CreateWindow( layer, &window_desc, &window ); if (ret) { D_DERROR( ret, APP ": IDirectFBDisplayLayer::CreateWindow() failed!\n" ); return ret; } ret = window->GetSurface( window, &surface ); if (ret) { D_DERROR( ret, APP ": IDirectFBWindow::GetSurface() failed!\n" ); return ret; } surface->Clear( surface, 0x00, 0x80, 0xa0, 0xd0 ); surface->SetColor( surface, 0x00, 0xc0, 0xff, 0xff ); surface->DrawRectangle( surface, 0, 0, 400, 300 ); surface->DrawRectangle( surface, 1, 1, 399, 299 ); surface->Flip( surface, NULL, DSFLIP_NONE ); window->SetOpacity( window, 0xff ); *ret_window = window; *ret_surface = surface; return DFB_OK; } int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb = NULL; IDirectFBDisplayLayer *layer = NULL; IDirectFBScreen *screen = NULL; IDirectFBWindow *window1 = NULL; IDirectFBWindow *window2 = NULL; IDirectFBSurface *surface1 = NULL; IDirectFBSurface *surface2 = NULL; DFBDisplayLayerConfig layer_config; DFBScreenEncoderConfig encoder_config; int z = 0; int zdir = -1; ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, APP ": DirectFBInit() failed!\n" ); goto out; } ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, APP ": DirectFBCreate() failed!\n" ); goto out; } /* Setup screen. */ ret = dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ); if (ret) { D_DERROR( ret, APP ": IDirectFB::GetDisplayLayer() failed!\n" ); goto out; } ret = layer->GetScreen( layer, &screen ); if (ret) { D_DERROR( ret, APP ": IDirectFBDisplayLayer::GetScreen() failed!\n" ); goto out; } encoder_config.flags = (DFBScreenEncoderConfigFlags)(DSECONF_TV_STANDARD | DSECONF_SCANMODE | DSECONF_FREQUENCY | DSECONF_CONNECTORS | DSECONF_RESOLUTION | DSECONF_FRAMING); encoder_config.tv_standard = DSETV_DIGITAL; encoder_config.out_connectors = (DFBScreenOutputConnectors)(DSOC_COMPONENT | DSOC_HDMI); encoder_config.scanmode = DSESM_PROGRESSIVE; encoder_config.frequency = DSEF_24HZ; encoder_config.framing = DSEPF_STEREO_FRAME_PACKING; encoder_config.resolution = DSOR_1920_1080; ret = screen->SetEncoderConfiguration( screen, 0, &encoder_config ); if (ret) { D_DERROR( ret, APP ": IDirectFBScreen::SetEncoderConfig() failed!\n" ); goto out; } /* * Setup primary layer as stereo. */ ret = layer->SetCooperativeLevel( layer, DLSCL_ADMINISTRATIVE ); if (ret) { D_DERROR( ret, APP ": IDirectFBDisplayLayer::SetCooperativeLevel() failed!\n" ); goto out; } layer_config.flags = (DFBDisplayLayerConfigFlags)(DLCONF_SURFACE_CAPS | DLCONF_OPTIONS | DLCONF_BUFFERMODE); layer_config.options = (DFBDisplayLayerOptions)(DLOP_STEREO | DLOP_ALPHACHANNEL); layer_config.surface_caps = (DFBSurfaceCapabilities)(DSCAPS_PREMULTIPLIED | DSCAPS_VIDEOONLY | DSCAPS_STEREO); layer_config.buffermode = DLBM_BACKVIDEO; ret = layer->SetConfiguration( layer, &layer_config ); if (ret) { D_DERROR( ret, APP ": IDirectFBDisplayLayer::SetConfiguration() failed!\n" ); goto out; } /* * Create first window. */ ret = create_window( layer, 200, 200, &window1, &surface1 ); if (ret) goto out; /* * Create second window. */ ret = create_window( layer, 300, 300, &window2, &surface2 ); if (ret) goto out; while (true) { z += zdir; if (z == 20) zdir = -1; else if (z == -20) zdir = 1; ret = window2->SetStereoDepth( window2, z ); if (ret) { D_DERROR( ret, APP ": IDirectFBWindow::SetStereoDepth() failed!\n" ); goto out; } usleep( 100000 ); } out: if (screen) screen->Release( screen ); if (surface2) surface2->Release( surface2 ); if (surface1) surface1->Release( surface1 ); if (window2) window2->Release( window2 ); if (window1) window1->Release( window1 ); if (layer) layer->Release( layer ); if (dfb) dfb->Release( dfb ); return 0; } DirectFB-1.7.7/tests/dfbtest_flip.c0000644000175000017500000003251512361250613014051 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include D_DEBUG_DOMAIN( DFBTest_Flip, "DFBTest/Flip", "DFBTest Flip" ); static const DirectFBPixelFormatNames( format_names ); /**********************************************************************************************************************/ static DFBBoolean parse_format( const char *arg, DFBSurfacePixelFormat *_f ) { int i = 0; while (format_names[i].format != DSPF_UNKNOWN) { if (!direct_strcasecmp( arg, format_names[i].name )) { *_f = format_names[i].format; return DFB_TRUE; } ++i; } fprintf (stderr, "\nInvalid format specified!\n\n" ); return DFB_FALSE; } static int print_usage( const char *prg ) { int i = 0; fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Flip Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -d, --dest Destination pixel format\n"); fprintf (stderr, " -t, --triple Use triple buffer\n"); fprintf (stderr, " -f, --frames Use frame base (instead of time base)\n"); fprintf (stderr, " -T, --frame-time Use frame time base (IDirectFBSurface::GetFrameTime)\n"); fprintf (stderr, " -n, --num Exit after num frames\n"); return -1; } /**********************************************************************************************************************/ typedef struct { char *name; long long stamps[1000]; size_t counts[1000]; size_t index; } Timings; static Timings m_timings[5]; static void timings_add( const char *name, long long stamp, size_t count ) { size_t i; //printf( "%-20s: %lld (count %zu)\n", name, stamp, count ); for (i=0; istamps); i++) { size_t index = (D_ARRAY_SIZE(timings->stamps) + timings->index - i) % D_ARRAY_SIZE(timings->stamps); long long stamp = timings->stamps[ index ]; //printf( "%4zu: %4zu %lld (%lld) count %zu\n", i, index, stamp, now, timings->counts[ index ] ); if (stamp >= now - 800000) { ret_stamps[num] = stamp; ret_counts[num] = timings->counts[ index ]; num++; } } *ret_num = num; } static void draw_timings( IDirectFBSurface *dest ) { long long now = direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ); long long stamps[1000]; size_t counts[1000]; size_t num, i, n, count0 = 0; for (i=0; iSetDrawingFlags( dest, DSDRAW_NOFX ); dest->SetColor( dest, 0xff, 0xff, 0xff, 0xff ); dest->DrawString( dest, m_timings[i].name, -1, 20, 200 + i*40 + 2, DSTF_TOPLEFT ); if (i == 0) count0 = counts[0]; for (n=0; nSetColor( dest, 100 * count, 133 * count, 199 * count, 0xff ); dest->FillRectangle( dest, 200 + (now - stamps[n]) / 1000LL, 200 + i*40, 1, 40 ); } } } int main( int argc, char *argv[] ) { DFBResult ret; int i; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBSurface *dest = NULL; IDirectFBFont *font = NULL; DFBSurfacePixelFormat dest_format = DSPF_UNKNOWN; bool triple = false; bool use_frame_time = false; bool frames = false; long long t0, count = 0; long long num = 0; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Flip: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iSetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/Flip: IDirectFB::CreateSurface() failed!\n" ); goto out; } dest->GetSize( dest, &desc.width, &desc.height ); dest->GetPixelFormat( dest, &desc.pixelformat ); D_INFO( "DFBTest/Flip: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Load the font. */ DFBFontDescription fdesc = { .flags = DFDESC_HEIGHT, .height = 36 }; ret = dfb->CreateFont( dfb, DATADIR "/decker.dgiff", &fdesc, &font ); if (ret) { D_DERROR( ret, "DFBTest/Flip: IDirectFB::CreateFont( " DATADIR "/decker.dgiff ) failed!\n" ); ret = dfb->CreateFont( dfb, DATADIR "/decker.ttf", &fdesc, &font ); if (ret) { D_DERROR( ret, "DFBTest/Flip: IDirectFB::CreateFont( " DATADIR "/decker.ttf ) failed!\n" ); goto out; } } dest->SetFont( dest, font ); t0 = direct_clock_get_abs_millis(); long long prev = 0; while (num <= 0 || count < num) { // long long t1, t2; long long base, frame_time = 0; long long now = direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ); timings_add( "loop start", now, count ); if (use_frame_time) { if (dest->GetFrameTime( dest, &frame_time )) break; D_DEBUG_AT( DFBTest_Flip, "Got frame time %lld (now %lld) with advance %lld (us in future)\n", frame_time, now, frame_time - now ); if (count % 120 == 0) D_INFO( "Got frame time %lld (now %lld) with advance %lld (us in future)\n", frame_time, now, frame_time - now ); base = frame_time * 5 / 17000; } else if (frames) { base = count * 5; } else { base = (direct_clock_get_abs_millis() - t0) * 5 / 17; } timings_add( "frametime", frame_time, count ); dest->Clear( dest, 0x33, 0x33, 0x33, 0xff ); draw_timings( dest ); dest->SetColor( dest, 0xff, 0xff, 0xff, 0xff ); //dest->FillRectangle( dest, base % (desc.width - 100), 100, 100, 10000 ); dest->FillRectangle( dest, base % (desc.width - 100), 0, 100, 20000 ); dest->SetColor( dest, 0x33, 0x55, 0xff, 0xff ); dest->DrawString( dest, D_String_PrintTLS( "Frame Time: %lld (%lld from now)", frame_time, frame_time - now ), -1, 10, 10, DSTF_TOPLEFT ); dest->DrawString( dest, D_String_PrintTLS( "Frame Diff: %lld (count %lld)", frame_time - prev, count ), -1, 10, 40, DSTF_TOPLEFT ); prev = frame_time; timings_add( "flip call", direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ), count ); //t1 = direct_clock_get_abs_millis(); dest->Flip( dest, NULL, triple ? DSFLIP_ONSYNC : DSFLIP_WAITFORSYNC ); //t2 = direct_clock_get_abs_millis(); timings_add( "flip done", direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ), count ); count++; // D_INFO( "Took %lld ms\n", t2 - t1 ); // sleep(15); } out: if (font) font->Release( font ); if (dest) dest->Release( dest ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_blit_threads.c0000644000175000017500000002352512254435330015566 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include static int m_num = 2; static bool m_render = false; static bool m_double = false; /**********************************************************************************************************************/ static int print_usage( const char *prg ) { fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Blit Threaded Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -n, --num Number of threads to create\n"); fprintf (stderr, " -r, --render Let threads render to source before blitting\n"); fprintf (stderr, " -d, --double Use double buffered source surface\n"); return -1; } /**********************************************************************************************************************/ typedef struct { IDirectFBSurface *destination; IDirectFBSurface *source; DFBColor color; } BlittingThreadContext; static void * blitting_thread( DirectThread *thread, void *arg ) { BlittingThreadContext *ctx = arg; while (true) { ctx->destination->Blit( ctx->destination, ctx->source, NULL, 0, 0 ); /* Flush (single buffered Flip just flushes) */ ctx->destination->Flip( ctx->destination, NULL, DSFLIP_NONE ); } return NULL; } static void * blitting_thread_render( DirectThread *thread, void *arg ) { BlittingThreadContext *ctx = arg; while (true) { // ctx->source->Clear( ctx->source, ctx->color.r, ctx->color.g, ctx->color.b, ctx->color.a ); ctx->source->Blit( ctx->source, ctx->source, NULL, 0, 0 ); /* Flush (single buffered Flip just flushes) */ ctx->source->Flip( ctx->source, NULL, DSFLIP_NONE ); sleep(1); } return NULL; } /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; int i, width, height; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBEventBuffer *events; IDirectFBSurface *primary = NULL; IDirectFBSurface **destinations = NULL; IDirectFBSurface **sources = NULL; DirectThread **threads = NULL; BlittingThreadContext *contexts = NULL; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/BlitThreads: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iCreateEventBuffer( dfb, &events ); if (ret) { D_DERROR( ret, "DFBTest/BlitThreads: IDirectFB::CreateEventBuffer() failed!\n" ); goto out; } sources = D_CALLOC( m_num, sizeof(IDirectFBSurface*) ); if (!sources) { ret = D_OOM(); goto out; } destinations = D_CALLOC( m_num, sizeof(IDirectFBSurface*) ); if (!destinations) { ret = D_OOM(); goto out; } threads = D_CALLOC( m_num, sizeof(DirectThread*) ); if (!threads) { ret = D_OOM(); goto out; } contexts = D_CALLOC( m_num, sizeof(BlittingThreadContext) ); if (!contexts) { ret = D_OOM(); goto out; } dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Fill description for a primary surface. */ desc.flags = DSDESC_CAPS; desc.caps = DSCAPS_PRIMARY; /* Create a single buffered primary surface (to see threads' output immediately without flip). */ ret = dfb->CreateSurface( dfb, &desc, &primary ); if (ret) { D_DERROR( ret, "DFBTest/BlitThreads: IDirectFB::CreateSurface() failed!\n" ); goto out; } primary->GetSize( primary, &width, &height ); /* Fill description for a source surface. */ desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_CAPS; desc.width = 64; desc.height = 64; desc.caps = m_double ? DSCAPS_DOUBLE : DSCAPS_NONE; for (i=0; iCreateSurface( dfb, &desc, &sources[i] ); if (ret) { D_DERROR( ret, "DFBTest/BlitThreads: IDirectFB::CreateSurface() failed!\n" ); goto out; } /* Create a sub surface as destination */ rect.x = 100 + 100 * (i % ((width - 250) / 100)); rect.y = 100 + 100 * (i / ((width - 250) / 100)); rect.w = 64; rect.h = 64; ret = primary->GetSubSurface( primary, &rect, &destinations[i] ); if (ret) { D_DERROR( ret, "DFBTest/BlitThreads: IDirectFBSurface::GetSubSurface() failed!\n" ); goto out; } contexts[i].destination = destinations[i]; contexts[i].source = sources[i]; contexts[i].color = (DFBColor){ 0xff, 0x55 + i * 0x22, 0x11 + i * 0x77, 0xdd + i * 0x55 }; sources[i]->Clear( sources[i], contexts[i].color.r, contexts[i].color.g, contexts[i].color.b, contexts[i].color.a ); sources[i]->Flip( sources[i], NULL, DSFLIP_NONE ); threads[i] = direct_thread_create( DTT_DEFAULT, m_render ? blitting_thread_render : blitting_thread, &contexts[i], "Blit" ); } while (true) { if (m_render) { for (i=0; iBlit( primary, sources[i], NULL, 100 + 100 * (i % ((width - 250) / 100)), 100 + 100 * (i / ((width - 250) / 100)) ); } primary->Flip( primary, NULL, DSFLIP_NONE ); //sleep(1); } else sleep(1); } out: if (sources) { for (i=0; iRelease( sources[i] ); } D_FREE( sources ); } if (destinations) { for (i=0; iRelease( destinations[i] ); } D_FREE( destinations ); } if (contexts) D_FREE( contexts ); if (threads) D_FREE( threads ); if (primary) primary->Release( primary ); if (events) events->Release( events ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/coretest_blit2.c0000644000175000017500000001472512254435330014335 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb; CoreDFB *core; CoreSurface *dst; CoreSurface *src; CoreSurface *src2; CardState state; DFBColor red = { 0xC0, 0xc0, 0x00, 0x00 }; // premultiplied DFBColor blue = { 0xC0, 0x00, 0x00, 0xc0 }; // " DFBColor white = { 0xFF, 0xff, 0xff, 0xff }; // " DFBRegion clip = { 0, 0, 99, 99 }; DFBRegion c150 = { 0, 0, 149, 149 }; DFBRectangle rect = { 0, 0, 100, 100 }; DFBRectangle r150 = { 0, 0, 150, 150 }; DFBPoint p_dst = { 0, 0 }; DFBPoint p_src = { 50, 50 }; CardState *statep = &state; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "CoreTest/Blit2: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "CoreTest/Blit2: DirectFBCreate() failed!\n" ); return ret; } dfb_core_create( &core ); /* * This test creates three surfaces: * * dst .--------. src .--------. src2 .-------------. * | | | | | | | * | | | red | | blue | | * | | | | | | | * '--------' '--------' |--------' | * | white | * 100x100 100x100 '-------------' * * 150x150 */ ret = dfb_surface_create_simple( core, 100, 100, DSPF_ARGB, DSCS_RGB, DSCAPS_NONE, CSTF_NONE, 0, NULL, &dst ); if (ret) { D_DERROR( ret, "CoreTest/Blit2: dfb_surface_create_simple(dst) failed!\n" ); goto error_dst; } ret = dfb_surface_create_simple( core, 100, 100, DSPF_ARGB, DSCS_RGB, DSCAPS_NONE, CSTF_NONE, 0, NULL, &src ); if (ret) { D_DERROR( ret, "CoreTest/Blit2: dfb_surface_create_simple(src) failed!\n" ); goto error_src; } ret = dfb_surface_create_simple( core, 150, 150, DSPF_ARGB, DSCS_RGB, DSCAPS_NONE, CSTF_NONE, 0, NULL, &src2 ); if (ret) { D_DERROR( ret, "CoreTest/Blit2: dfb_surface_create_simple(src2) failed!\n" ); goto error_src2; } /* Initialize state */ dfb_state_init( statep, core ); /* Fill source with red */ dfb_state_set_clip( statep, &clip ); dfb_state_set_destination( statep, src ); dfb_state_set_color( statep, &red ); dfb_gfxcard_fillrectangles( &rect, 1, statep ); dfb_surface_dump_buffer( src, CSBR_FRONT, "/", "coretest_blit2_src" ); /* Fill source2 with blue/white */ dfb_state_set_clip( statep, &c150 ); dfb_state_set_destination( statep, src2 ); dfb_state_set_color( statep, &white ); dfb_gfxcard_fillrectangles( &r150, 1, statep ); dfb_state_set_color( statep, &blue ); dfb_gfxcard_fillrectangles( &rect, 1, statep ); dfb_surface_dump_buffer( src2, CSBR_FRONT, "/", "coretest_blit2_src2" ); /* * Setup dual source blit */ dfb_state_set_clip( statep, &clip ); dfb_state_set_destination( statep, dst ); dfb_state_set_source( statep, src ); dfb_state_set_source2( statep, src2 ); dfb_state_set_blitting_flags( statep, DSBLIT_BLEND_ALPHACHANNEL ); dfb_state_set_src_blend( statep, DSBF_ONE ); dfb_state_set_dst_blend( statep, DSBF_INVSRCALPHA ); /* * Perform dual source blit * * 100x100 at 0,0 * * reading src at 0, 0 * reading src2 at 50,50 * * * Result should be: * * .-------------. * | red- | | * | blue | | * | | | * |------' | * | | * | red- | * | white | * '-------------' * * 100x100 */ dfb_gfxcard_batchblit2( &rect, &p_dst, &p_src, 1, statep ); dfb_surface_dump_buffer( dst, CSBR_BACK, "/", "coretest_blit2_dst" ); /* Shutdown state */ dfb_state_set_destination( statep, NULL ); dfb_state_set_source( statep, NULL ); dfb_state_set_source2( statep, NULL ); dfb_state_destroy( statep ); dfb_surface_unref( src2 ); error_src2: dfb_surface_unref( src ); error_src: dfb_surface_unref( dst ); error_dst: dfb_core_destroy( core, false ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_layer.c0000644000175000017500000001450612313366376014246 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include static int quit = 0; static IDirectFBEventBuffer *keybuffer; int main( int argc, char *argv[] ) { DFBResult ret; int i; int x, y; int dx, dy; int sw3, sh3; int opacity = 255; int opacity_delta = -1; IDirectFB *dfb; IDirectFBDisplayLayer *layer; IDirectFBSurface *surface; DFBDisplayLayerConfig config; DFBDimension size; DFBInputEvent evt; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Layer: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "DFBTest/Layer: DirectFBCreate() failed!\n" ); return ret; } dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ); /* Create an input buffer for key events */ dfb->CreateInputEventBuffer( dfb, DICAPS_KEYS, DFB_TRUE, &keybuffer); layer->SetCooperativeLevel( layer, DFSCL_EXCLUSIVE ); layer->GetConfiguration( layer, &config ); config.options = DLOP_OPACITY | DLOP_SRC_COLORKEY; config.buffermode = DLBM_FRONTONLY; layer->SetConfiguration( layer, &config ); layer->SetSrcColorKey( layer, 0x00, 0xff, 0x00 ); ret = layer->GetSurface( layer, &surface ); if (ret) { D_DERROR( ret, "DFBTest/Layer: GetSurface() failed!\n" ); dfb->Release( dfb ); return ret; } surface->GetSize( surface, &size.w, &size.h ); sw3 = ((size.w / 3) + 1) & ~1; sh3 = ((size.h / 3) + 1) & ~1; surface->Clear( surface, 0, 0, 0, 0xff ); for (i=0; i<10; i++) { surface->SetColor( surface, 0xff - i*16, 0xff - i*16, 0xff - i*16, 0xff ); surface->DrawRectangle( surface, i, i, size.w - i*2, size.h - i*2 ); } surface->FillRectangle( surface, 10, size.h/2, size.w - 20, 1 ); surface->FillRectangle( surface, size.w/2, 10, 1, size.h - 20 ); surface->SetColor( surface, 0xff, 0x00, 0x00, 0xff ); surface->FillRectangle( surface, size.w/3, size.h/3, size.w/3, size.h/3 ); surface->SetColor( surface, 0x00, 0xff, 0x00, 0xff ); surface->FillRectangle( surface, size.w/3 + size.w/9, size.h/3 + size.h/9, size.w/9, size.h/9 ); surface->Flip( surface, NULL, DSFLIP_NONE ); #ifdef BUILD_AUTOMATION sleep( 2 ); #else sleep( 12 ); #endif layer->SetSourceRectangle( layer, 0, 0, size.w - sw3, size.h - sh3 ); layer->SetScreenPosition( layer, 100, 100 ); layer->SetScreenRectangle( layer, 100, 100, size.w - sw3, size.h - sh3 ); sleep( 2 ); #ifdef BUILD_AUTOMATION sleep( 20 ); quit = 1; #endif for (x=0, y=0, dx=1, dy=1; !quit ; x+=dx, y+=dy) { layer->SetOpacity( layer, opacity ); if (opacity == 255) opacity_delta = -1; else if (opacity == 0) opacity_delta = 1; opacity += opacity_delta; layer->SetSourceRectangle( layer, x, y, size.w - sw3, size.h - sh3 ); surface->Flip( surface, NULL, DSFLIP_UPDATE ); if (dx > 0) { if (x == size.w/3) { dx = -1; usleep( 500000 ); } } else if (x == 0) { dx = 1; usleep( 500000 ); } if (dy > 0) { if (y == size.h/3) { dy = -1; usleep( 500000 ); } } else if (y == 0) { dy = 1; usleep( 500000 ); } usleep( 10000 ); /* Process keybuffer */ while (keybuffer->GetEvent( keybuffer, DFB_EVENT(&evt)) == DFB_OK) { if (evt.type == DIET_KEYPRESS) { switch (DFB_LOWER_CASE(evt.key_symbol)) { case DIKS_ESCAPE: case DIKS_SMALL_Q: case DIKS_BACK: case DIKS_STOP: case DIKS_EXIT: /* Quit main loop & test thread */ quit = 1; break; default: break; } } } } surface->Release( surface ); layer->Release( layer ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/Makefile.in0000644000175000017500000025572112466665317013334 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_3) dfbtest_blit$(EXEEXT) \ dfbtest_blit_multi$(EXEEXT) dfbtest_blit_threads$(EXEEXT) \ dfbtest_blit2$(EXEEXT) dfbtest_clipboard$(EXEEXT) \ dfbtest_fillrect$(EXEEXT) dfbtest_flip$(EXEEXT) \ dfbtest_font$(EXEEXT) dfbtest_font_blend$(EXEEXT) \ dfbtest_init$(EXEEXT) dfbtest_input$(EXEEXT) \ dfbtest_layers$(EXEEXT) dfbtest_mirror$(EXEEXT) \ dfbtest_prealloc$(EXEEXT) dfbtest_reinit$(EXEEXT) \ dfbtest_resize$(EXEEXT) dfbtest_scale$(EXEEXT) \ dfbtest_scale_nv21$(EXEEXT) dfbtest_stereo_window$(EXEEXT) \ dfbtest_surface_compositor$(EXEEXT) \ dfbtest_surface_compositor_threads$(EXEEXT) \ dfbtest_surface_updates$(EXEEXT) dfbtest_sync$(EXEEXT) \ dfbtest_video$(EXEEXT) dfbtest_waitserial$(EXEEXT) \ dfbtest_water$(EXEEXT) dfbtest_window$(EXEEXT) \ dfbtest_window_cursor$(EXEEXT) dfbtest_window_flip$(EXEEXT) \ dfbtest_window_flip_once$(EXEEXT) \ dfbtest_window_surface$(EXEEXT) dfbtest_window_update$(EXEEXT) \ dfbtest_windows_watcher$(EXEEXT) direct_stream$(EXEEXT) \ direct_test$(EXEEXT) dfbtest_alloc$(EXEEXT) \ dfbtest_layer$(EXEEXT) dfbtest_stereo$(EXEEXT) $(am__EXEEXT_4) \ $(am__EXEEXT_5) $(am__EXEEXT_6) $(am__EXEEXT_7) \ $(am__EXEEXT_8) DIST_COMMON = $(top_srcdir)/rules/libs_deps.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = dfbtest_gl1$(EXEEXT) dfbtest_gl2$(EXEEXT) \ dfbtest_gl3$(EXEEXT) dfbtest_old_gl2$(EXEEXT) @GFX_GLES2_FALSE@@GFX_GL_TRUE@am__EXEEXT_2 = $(am__EXEEXT_1) @GFX_GLES2_TRUE@am__EXEEXT_2 = $(am__EXEEXT_1) @DIRECTFB_BUILD_PURE_VOODOO_FALSE@am__EXEEXT_3 = \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ coretest_blit2$(EXEEXT) \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ coretest_task$(EXEEXT) \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ coretest_task_fillrect$(EXEEXT) \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_call$(EXEEXT) \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_call_bench$(EXEEXT) \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_fork$(EXEEXT) \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_reactor$(EXEEXT) \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_skirmish$(EXEEXT) \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_stream$(EXEEXT) @DIRECTFB_BUILD_ONE_TRUE@am__EXEEXT_4 = OneBench$(EXEEXT) \ @DIRECTFB_BUILD_ONE_TRUE@ OneTest$(EXEEXT) @DIRECTFB_BUILD_VOODOO_TRUE@am__EXEEXT_5 = voodoo_bench$(EXEEXT) \ @DIRECTFB_BUILD_VOODOO_TRUE@ voodoo_bench_client$(EXEEXT) \ @DIRECTFB_BUILD_VOODOO_TRUE@ voodoo_bench_server$(EXEEXT) \ @DIRECTFB_BUILD_VOODOO_TRUE@ voodoo_bench_client_unix$(EXEEXT) \ @DIRECTFB_BUILD_VOODOO_TRUE@ voodoo_bench_server_unix$(EXEEXT) @ENABLE_SAWMAN_TRUE@am__EXEEXT_6 = sample1$(EXEEXT) testrun$(EXEEXT) \ @ENABLE_SAWMAN_TRUE@ testman$(EXEEXT) @ENABLE_DIVINE_TRUE@am__EXEEXT_7 = divine_test$(EXEEXT) @ENABLE_FUSIONDALE_TRUE@am__EXEEXT_8 = fdtest_bench$(EXEEXT) \ @ENABLE_FUSIONDALE_TRUE@ fdtest_coma$(EXEEXT) \ @ENABLE_FUSIONDALE_TRUE@ fdtest_init$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_OneBench_OBJECTS = OneBench.$(OBJEXT) OneBench_OBJECTS = $(am_OneBench_OBJECTS) @DIRECTFB_BUILD_ONE_TRUE@am__DEPENDENCIES_1 = \ @DIRECTFB_BUILD_ONE_TRUE@ $(top_builddir)/lib/One/libone.la @DIRECTFB_BUILD_VOODOO_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/lib/voodoo/libvoodoo.la am__DEPENDENCIES_3 = $(libdirectfb) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) $(libfusion) $(libdirect) OneBench_DEPENDENCIES = $(am__DEPENDENCIES_3) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_OneTest_OBJECTS = OneTest.$(OBJEXT) OneTest_OBJECTS = $(am_OneTest_OBJECTS) OneTest_DEPENDENCIES = $(am__DEPENDENCIES_3) am_coretest_blit2_OBJECTS = coretest_blit2.$(OBJEXT) coretest_blit2_OBJECTS = $(am_coretest_blit2_OBJECTS) coretest_blit2_DEPENDENCIES = $(am__DEPENDENCIES_3) am_coretest_task_OBJECTS = coretest_task.$(OBJEXT) coretest_task_OBJECTS = $(am_coretest_task_OBJECTS) coretest_task_DEPENDENCIES = $(am__DEPENDENCIES_3) am_coretest_task_fillrect_OBJECTS = coretest_task_fillrect.$(OBJEXT) coretest_task_fillrect_OBJECTS = $(am_coretest_task_fillrect_OBJECTS) coretest_task_fillrect_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_alloc_OBJECTS = dfbtest_alloc.$(OBJEXT) dfbtest_alloc_OBJECTS = $(am_dfbtest_alloc_OBJECTS) dfbtest_alloc_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_blit_OBJECTS = dfbtest_blit.$(OBJEXT) dfbtest_blit_OBJECTS = $(am_dfbtest_blit_OBJECTS) dfbtest_blit_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_blit2_OBJECTS = dfbtest_blit2.$(OBJEXT) dfbtest_blit2_OBJECTS = $(am_dfbtest_blit2_OBJECTS) dfbtest_blit2_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_blit_multi_OBJECTS = dfbtest_blit_multi.$(OBJEXT) dfbtest_blit_multi_OBJECTS = $(am_dfbtest_blit_multi_OBJECTS) dfbtest_blit_multi_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_blit_threads_OBJECTS = dfbtest_blit_threads.$(OBJEXT) dfbtest_blit_threads_OBJECTS = $(am_dfbtest_blit_threads_OBJECTS) dfbtest_blit_threads_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_clipboard_OBJECTS = dfbtest_clipboard.$(OBJEXT) dfbtest_clipboard_OBJECTS = $(am_dfbtest_clipboard_OBJECTS) dfbtest_clipboard_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_fillrect_OBJECTS = dfbtest_fillrect.$(OBJEXT) dfbtest_fillrect_OBJECTS = $(am_dfbtest_fillrect_OBJECTS) dfbtest_fillrect_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_flip_OBJECTS = dfbtest_flip.$(OBJEXT) dfbtest_flip_OBJECTS = $(am_dfbtest_flip_OBJECTS) dfbtest_flip_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_font_OBJECTS = dfbtest_font.$(OBJEXT) dfbtest_font_OBJECTS = $(am_dfbtest_font_OBJECTS) dfbtest_font_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_font_blend_OBJECTS = dfbtest_font_blend.$(OBJEXT) \ dfbapp.$(OBJEXT) dfbtest_font_blend_OBJECTS = $(am_dfbtest_font_blend_OBJECTS) dfbtest_font_blend_DEPENDENCIES = $(am__DEPENDENCIES_3) $(libppdfb) am_dfbtest_gl1_OBJECTS = dfbtest_gl1-dfbtest_gl1.$(OBJEXT) dfbtest_gl1_OBJECTS = $(am_dfbtest_gl1_OBJECTS) am__DEPENDENCIES_4 = am__DEPENDENCIES_5 = $(am__DEPENDENCIES_4) dfbtest_gl1_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_5) \ $(am__DEPENDENCIES_5) dfbtest_gl1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dfbtest_gl1_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_dfbtest_gl2_OBJECTS = dfbtest_gl2-dfbtest_gl2.$(OBJEXT) dfbtest_gl2_OBJECTS = $(am_dfbtest_gl2_OBJECTS) dfbtest_gl2_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_5) \ $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_4) dfbtest_gl2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dfbtest_gl2_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_dfbtest_gl3_OBJECTS = dfbtest_gl3-dfbtest_gl3.$(OBJEXT) dfbtest_gl3_OBJECTS = $(am_dfbtest_gl3_OBJECTS) dfbtest_gl3_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_5) \ $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_4) dfbtest_gl3_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dfbtest_gl3_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_dfbtest_init_OBJECTS = dfbtest_init.$(OBJEXT) dfbtest_init_OBJECTS = $(am_dfbtest_init_OBJECTS) dfbtest_init_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_input_OBJECTS = dfbtest_input.$(OBJEXT) dfbtest_input_OBJECTS = $(am_dfbtest_input_OBJECTS) dfbtest_input_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_layer_OBJECTS = dfbtest_layer.$(OBJEXT) dfbtest_layer_OBJECTS = $(am_dfbtest_layer_OBJECTS) dfbtest_layer_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_layers_OBJECTS = dfbtest_layers.$(OBJEXT) dfbtest_layers_OBJECTS = $(am_dfbtest_layers_OBJECTS) dfbtest_layers_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_mirror_OBJECTS = dfbtest_mirror.$(OBJEXT) dfbtest_mirror_OBJECTS = $(am_dfbtest_mirror_OBJECTS) dfbtest_mirror_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_old_gl2_OBJECTS = \ dfbtest_old_gl2-dfbtest_old_gl2.$(OBJEXT) dfbtest_old_gl2_OBJECTS = $(am_dfbtest_old_gl2_OBJECTS) dfbtest_old_gl2_DEPENDENCIES = $(am__DEPENDENCIES_3) \ $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_5) \ $(am__DEPENDENCIES_4) dfbtest_old_gl2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(dfbtest_old_gl2_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am_dfbtest_prealloc_OBJECTS = dfbtest_prealloc.$(OBJEXT) dfbtest_prealloc_OBJECTS = $(am_dfbtest_prealloc_OBJECTS) dfbtest_prealloc_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_reinit_OBJECTS = dfbtest_reinit.$(OBJEXT) dfbtest_reinit_OBJECTS = $(am_dfbtest_reinit_OBJECTS) dfbtest_reinit_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_resize_OBJECTS = dfbtest_resize.$(OBJEXT) dfbtest_resize_OBJECTS = $(am_dfbtest_resize_OBJECTS) dfbtest_resize_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_scale_OBJECTS = dfbtest_scale.$(OBJEXT) dfbtest_scale_OBJECTS = $(am_dfbtest_scale_OBJECTS) dfbtest_scale_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_scale_nv21_OBJECTS = dfbtest_scale_nv21.$(OBJEXT) dfbtest_scale_nv21_OBJECTS = $(am_dfbtest_scale_nv21_OBJECTS) dfbtest_scale_nv21_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_stereo_OBJECTS = dfbtest_stereo.$(OBJEXT) dfbtest_stereo_OBJECTS = $(am_dfbtest_stereo_OBJECTS) dfbtest_stereo_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_stereo_window_OBJECTS = dfbtest_stereo_window.$(OBJEXT) dfbtest_stereo_window_OBJECTS = $(am_dfbtest_stereo_window_OBJECTS) dfbtest_stereo_window_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_surface_compositor_OBJECTS = \ dfbtest_surface_compositor.$(OBJEXT) dfbtest_surface_compositor_OBJECTS = \ $(am_dfbtest_surface_compositor_OBJECTS) dfbtest_surface_compositor_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_surface_compositor_threads_OBJECTS = \ dfbtest_surface_compositor_threads.$(OBJEXT) dfbtest_surface_compositor_threads_OBJECTS = \ $(am_dfbtest_surface_compositor_threads_OBJECTS) dfbtest_surface_compositor_threads_DEPENDENCIES = \ $(am__DEPENDENCIES_3) am_dfbtest_surface_updates_OBJECTS = \ dfbtest_surface_updates.$(OBJEXT) dfbtest_surface_updates_OBJECTS = \ $(am_dfbtest_surface_updates_OBJECTS) dfbtest_surface_updates_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_sync_OBJECTS = dfbtest_sync.$(OBJEXT) dfbtest_sync_OBJECTS = $(am_dfbtest_sync_OBJECTS) dfbtest_sync_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_video_OBJECTS = dfbtest_video.$(OBJEXT) dfbtest_video_OBJECTS = $(am_dfbtest_video_OBJECTS) dfbtest_video_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_waitserial_OBJECTS = dfbtest_waitserial.$(OBJEXT) dfbtest_waitserial_OBJECTS = $(am_dfbtest_waitserial_OBJECTS) dfbtest_waitserial_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_water_OBJECTS = dfbtest_water.$(OBJEXT) dfbtest_water_OBJECTS = $(am_dfbtest_water_OBJECTS) dfbtest_water_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_window_OBJECTS = dfbtest_window.$(OBJEXT) dfbtest_window_OBJECTS = $(am_dfbtest_window_OBJECTS) dfbtest_window_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_window_cursor_OBJECTS = dfbtest_window_cursor.$(OBJEXT) dfbtest_window_cursor_OBJECTS = $(am_dfbtest_window_cursor_OBJECTS) dfbtest_window_cursor_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_window_flip_OBJECTS = dfbtest_window_flip.$(OBJEXT) dfbtest_window_flip_OBJECTS = $(am_dfbtest_window_flip_OBJECTS) dfbtest_window_flip_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_window_flip_once_OBJECTS = \ dfbtest_window_flip_once.$(OBJEXT) dfbtest_window_flip_once_OBJECTS = \ $(am_dfbtest_window_flip_once_OBJECTS) dfbtest_window_flip_once_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_window_surface_OBJECTS = dfbtest_window_surface.$(OBJEXT) dfbtest_window_surface_OBJECTS = $(am_dfbtest_window_surface_OBJECTS) dfbtest_window_surface_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_window_update_OBJECTS = dfbtest_window_update.$(OBJEXT) dfbtest_window_update_OBJECTS = $(am_dfbtest_window_update_OBJECTS) dfbtest_window_update_DEPENDENCIES = $(am__DEPENDENCIES_3) am_dfbtest_windows_watcher_OBJECTS = \ dfbtest_windows_watcher.$(OBJEXT) dfbtest_windows_watcher_OBJECTS = \ $(am_dfbtest_windows_watcher_OBJECTS) dfbtest_windows_watcher_DEPENDENCIES = $(am__DEPENDENCIES_3) am_direct_stream_OBJECTS = direct_stream.$(OBJEXT) direct_stream_OBJECTS = $(am_direct_stream_OBJECTS) direct_stream_DEPENDENCIES = $(libdirect) am_direct_test_OBJECTS = direct_test.$(OBJEXT) direct_test_OBJECTS = $(am_direct_test_OBJECTS) direct_test_DEPENDENCIES = $(libdirect) am_divine_test_OBJECTS = divine_test.$(OBJEXT) divine_test_OBJECTS = $(am_divine_test_OBJECTS) divine_test_DEPENDENCIES = $(am__DEPENDENCIES_3) $(libdivine) am_fdtest_bench_OBJECTS = fdtest_bench.$(OBJEXT) fdtest_bench_OBJECTS = $(am_fdtest_bench_OBJECTS) fdtest_bench_DEPENDENCIES = $(libfusion) $(libdirect) $(libfusiondale) am_fdtest_coma_OBJECTS = fdtest_coma.$(OBJEXT) fdtest_coma_OBJECTS = $(am_fdtest_coma_OBJECTS) fdtest_coma_DEPENDENCIES = $(libfusion) $(libdirect) $(libfusiondale) am_fdtest_init_OBJECTS = fdtest_init.$(OBJEXT) fdtest_init_OBJECTS = $(am_fdtest_init_OBJECTS) fdtest_init_DEPENDENCIES = $(libfusion) $(libdirect) $(libfusiondale) am_fusion_call_OBJECTS = fusion_call.$(OBJEXT) fusion_call_OBJECTS = $(am_fusion_call_OBJECTS) fusion_call_DEPENDENCIES = $(am__DEPENDENCIES_3) am_fusion_call_bench_OBJECTS = fusion_call_bench.$(OBJEXT) fusion_call_bench_OBJECTS = $(am_fusion_call_bench_OBJECTS) fusion_call_bench_DEPENDENCIES = $(am__DEPENDENCIES_3) am_fusion_fork_OBJECTS = fusion_fork.$(OBJEXT) fusion_fork_OBJECTS = $(am_fusion_fork_OBJECTS) fusion_fork_DEPENDENCIES = $(am__DEPENDENCIES_3) am_fusion_reactor_OBJECTS = fusion_reactor.$(OBJEXT) fusion_reactor_OBJECTS = $(am_fusion_reactor_OBJECTS) fusion_reactor_DEPENDENCIES = $(am__DEPENDENCIES_3) am_fusion_skirmish_OBJECTS = fusion_skirmish.$(OBJEXT) fusion_skirmish_OBJECTS = $(am_fusion_skirmish_OBJECTS) fusion_skirmish_DEPENDENCIES = $(am__DEPENDENCIES_3) am_fusion_stream_OBJECTS = fusion_stream.$(OBJEXT) fusion_stream_OBJECTS = $(am_fusion_stream_OBJECTS) fusion_stream_DEPENDENCIES = $(am__DEPENDENCIES_3) am_sample1_OBJECTS = sample1.$(OBJEXT) sample1_OBJECTS = $(am_sample1_OBJECTS) sample1_DEPENDENCIES = $(am__DEPENDENCIES_3) $(libsawman) am_testman_OBJECTS = testman.$(OBJEXT) testman_OBJECTS = $(am_testman_OBJECTS) testman_DEPENDENCIES = $(am__DEPENDENCIES_3) $(libsawman) am_testrun_OBJECTS = testrun.$(OBJEXT) testrun_OBJECTS = $(am_testrun_OBJECTS) testrun_DEPENDENCIES = $(am__DEPENDENCIES_3) $(libsawman) am_voodoo_bench_OBJECTS = voodoo_bench.$(OBJEXT) voodoo_bench_OBJECTS = $(am_voodoo_bench_OBJECTS) voodoo_bench_DEPENDENCIES = $(am__DEPENDENCIES_3) am_voodoo_bench_client_OBJECTS = voodoo_bench_client.$(OBJEXT) voodoo_bench_client_OBJECTS = $(am_voodoo_bench_client_OBJECTS) voodoo_bench_client_DEPENDENCIES = $(am__DEPENDENCIES_3) am_voodoo_bench_client_unix_OBJECTS = \ voodoo_bench_client_unix.$(OBJEXT) voodoo_bench_client_unix_OBJECTS = \ $(am_voodoo_bench_client_unix_OBJECTS) voodoo_bench_client_unix_DEPENDENCIES = $(am__DEPENDENCIES_3) am_voodoo_bench_server_OBJECTS = voodoo_bench_server.$(OBJEXT) voodoo_bench_server_OBJECTS = $(am_voodoo_bench_server_OBJECTS) voodoo_bench_server_DEPENDENCIES = $(am__DEPENDENCIES_3) am_voodoo_bench_server_unix_OBJECTS = \ voodoo_bench_server_unix.$(OBJEXT) voodoo_bench_server_unix_OBJECTS = \ $(am_voodoo_bench_server_unix_OBJECTS) voodoo_bench_server_unix_DEPENDENCIES = $(am__DEPENDENCIES_3) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(OneBench_SOURCES) $(OneTest_SOURCES) \ $(coretest_blit2_SOURCES) $(coretest_task_SOURCES) \ $(coretest_task_fillrect_SOURCES) $(dfbtest_alloc_SOURCES) \ $(dfbtest_blit_SOURCES) $(dfbtest_blit2_SOURCES) \ $(dfbtest_blit_multi_SOURCES) $(dfbtest_blit_threads_SOURCES) \ $(dfbtest_clipboard_SOURCES) $(dfbtest_fillrect_SOURCES) \ $(dfbtest_flip_SOURCES) $(dfbtest_font_SOURCES) \ $(dfbtest_font_blend_SOURCES) $(dfbtest_gl1_SOURCES) \ $(dfbtest_gl2_SOURCES) $(dfbtest_gl3_SOURCES) \ $(dfbtest_init_SOURCES) $(dfbtest_input_SOURCES) \ $(dfbtest_layer_SOURCES) $(dfbtest_layers_SOURCES) \ $(dfbtest_mirror_SOURCES) $(dfbtest_old_gl2_SOURCES) \ $(dfbtest_prealloc_SOURCES) $(dfbtest_reinit_SOURCES) \ $(dfbtest_resize_SOURCES) $(dfbtest_scale_SOURCES) \ $(dfbtest_scale_nv21_SOURCES) $(dfbtest_stereo_SOURCES) \ $(dfbtest_stereo_window_SOURCES) \ $(dfbtest_surface_compositor_SOURCES) \ $(dfbtest_surface_compositor_threads_SOURCES) \ $(dfbtest_surface_updates_SOURCES) $(dfbtest_sync_SOURCES) \ $(dfbtest_video_SOURCES) $(dfbtest_waitserial_SOURCES) \ $(dfbtest_water_SOURCES) $(dfbtest_window_SOURCES) \ $(dfbtest_window_cursor_SOURCES) \ $(dfbtest_window_flip_SOURCES) \ $(dfbtest_window_flip_once_SOURCES) \ $(dfbtest_window_surface_SOURCES) \ $(dfbtest_window_update_SOURCES) \ $(dfbtest_windows_watcher_SOURCES) $(direct_stream_SOURCES) \ $(direct_test_SOURCES) $(divine_test_SOURCES) \ $(fdtest_bench_SOURCES) $(fdtest_coma_SOURCES) \ $(fdtest_init_SOURCES) $(fusion_call_SOURCES) \ $(fusion_call_bench_SOURCES) $(fusion_fork_SOURCES) \ $(fusion_reactor_SOURCES) $(fusion_skirmish_SOURCES) \ $(fusion_stream_SOURCES) $(sample1_SOURCES) $(testman_SOURCES) \ $(testrun_SOURCES) $(voodoo_bench_SOURCES) \ $(voodoo_bench_client_SOURCES) \ $(voodoo_bench_client_unix_SOURCES) \ $(voodoo_bench_server_SOURCES) \ $(voodoo_bench_server_unix_SOURCES) DIST_SOURCES = $(OneBench_SOURCES) $(OneTest_SOURCES) \ $(coretest_blit2_SOURCES) $(coretest_task_SOURCES) \ $(coretest_task_fillrect_SOURCES) $(dfbtest_alloc_SOURCES) \ $(dfbtest_blit_SOURCES) $(dfbtest_blit2_SOURCES) \ $(dfbtest_blit_multi_SOURCES) $(dfbtest_blit_threads_SOURCES) \ $(dfbtest_clipboard_SOURCES) $(dfbtest_fillrect_SOURCES) \ $(dfbtest_flip_SOURCES) $(dfbtest_font_SOURCES) \ $(dfbtest_font_blend_SOURCES) $(dfbtest_gl1_SOURCES) \ $(dfbtest_gl2_SOURCES) $(dfbtest_gl3_SOURCES) \ $(dfbtest_init_SOURCES) $(dfbtest_input_SOURCES) \ $(dfbtest_layer_SOURCES) $(dfbtest_layers_SOURCES) \ $(dfbtest_mirror_SOURCES) $(dfbtest_old_gl2_SOURCES) \ $(dfbtest_prealloc_SOURCES) $(dfbtest_reinit_SOURCES) \ $(dfbtest_resize_SOURCES) $(dfbtest_scale_SOURCES) \ $(dfbtest_scale_nv21_SOURCES) $(dfbtest_stereo_SOURCES) \ $(dfbtest_stereo_window_SOURCES) \ $(dfbtest_surface_compositor_SOURCES) \ $(dfbtest_surface_compositor_threads_SOURCES) \ $(dfbtest_surface_updates_SOURCES) $(dfbtest_sync_SOURCES) \ $(dfbtest_video_SOURCES) $(dfbtest_waitserial_SOURCES) \ $(dfbtest_water_SOURCES) $(dfbtest_window_SOURCES) \ $(dfbtest_window_cursor_SOURCES) \ $(dfbtest_window_flip_SOURCES) \ $(dfbtest_window_flip_once_SOURCES) \ $(dfbtest_window_surface_SOURCES) \ $(dfbtest_window_update_SOURCES) \ $(dfbtest_windows_watcher_SOURCES) $(direct_stream_SOURCES) \ $(direct_test_SOURCES) $(divine_test_SOURCES) \ $(fdtest_bench_SOURCES) $(fdtest_coma_SOURCES) \ $(fdtest_init_SOURCES) $(fusion_call_SOURCES) \ $(fusion_call_bench_SOURCES) $(fusion_fork_SOURCES) \ $(fusion_reactor_SOURCES) $(fusion_skirmish_SOURCES) \ $(fusion_stream_SOURCES) $(sample1_SOURCES) $(testman_SOURCES) \ $(testrun_SOURCES) $(voodoo_bench_SOURCES) \ $(voodoo_bench_client_SOURCES) \ $(voodoo_bench_client_unix_SOURCES) \ $(voodoo_bench_server_SOURCES) \ $(voodoo_bench_server_unix_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = voodoo DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = \ -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" \ -DFONT=\"@DATADIR@/decker.ttf\" @DIRECTFB_BUILD_ONE_TRUE@ONE_PROGS = \ @DIRECTFB_BUILD_ONE_TRUE@ OneBench \ @DIRECTFB_BUILD_ONE_TRUE@ OneTest @DIRECTFB_BUILD_VOODOO_TRUE@SUBDIRS = voodoo @DIRECTFB_BUILD_VOODOO_TRUE@VOODOO_PROGS = \ @DIRECTFB_BUILD_VOODOO_TRUE@ voodoo_bench \ @DIRECTFB_BUILD_VOODOO_TRUE@ voodoo_bench_client \ @DIRECTFB_BUILD_VOODOO_TRUE@ voodoo_bench_server \ @DIRECTFB_BUILD_VOODOO_TRUE@ voodoo_bench_client_unix \ @DIRECTFB_BUILD_VOODOO_TRUE@ voodoo_bench_server_unix @ENABLE_SAWMAN_TRUE@SAWMAN_PROGS = \ @ENABLE_SAWMAN_TRUE@ sample1 \ @ENABLE_SAWMAN_TRUE@ testrun \ @ENABLE_SAWMAN_TRUE@ testman @ENABLE_DIVINE_TRUE@DIVINE_PROGS = \ @ENABLE_DIVINE_TRUE@ divine_test @ENABLE_FUSIONDALE_TRUE@FUSIONDALE_PROGS = \ @ENABLE_FUSIONDALE_TRUE@ fdtest_bench \ @ENABLE_FUSIONDALE_TRUE@ fdtest_coma \ @ENABLE_FUSIONDALE_TRUE@ fdtest_init INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/One \ -I$(top_builddir)/lib/divine \ -I$(top_builddir)/lib/fusiondale \ -I$(top_builddir)/lib/sawman \ -I$(top_builddir)/src \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/One \ -I$(top_srcdir)/lib/divine \ -I$(top_srcdir)/lib/fusiondale \ -I$(top_srcdir)/lib/sawman \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include/++dfb \ -I$(top_srcdir)/examples/++dfb \ -DLINUX_2_6 GL_PROGS_ = \ dfbtest_gl1 \ dfbtest_gl2 \ dfbtest_gl3 \ dfbtest_old_gl2 @GFX_GLES2_TRUE@GL_PROGS = $(GL_PROGS_) @GFX_GL_TRUE@GL_PROGS = $(GL_PROGS_) @DIRECTFB_BUILD_PURE_VOODOO_FALSE@NON_PURE_VOODOO_PROGS = \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ coretest_blit2 \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ coretest_task \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ coretest_task_fillrect \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_call \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_call_bench \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_fork \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_reactor \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_skirmish \ @DIRECTFB_BUILD_PURE_VOODOO_FALSE@ fusion_stream @DIRECTFB_BUILD_PURE_VOODOO_TRUE@NON_PURE_VOODOO_PROGS = libdirect = $(top_builddir)/lib/direct/libdirect.la libfusion = $(top_builddir)/lib/fusion/libfusion.la libdirectfb = $(top_builddir)/src/libdirectfb.la libsawman = $(top_builddir)/lib/sawman/libsawman.la libdivine = $(top_builddir)/lib/divine/libdivine.la libfusiondale = $(top_builddir)/lib/fusiondale/libfusiondale.la libfusionsound = $(top_builddir)/lib/fusionsound/libfusionsound.la libppdfb = $(top_builddir)/lib/++dfb/lib++dfb.la @DIRECTFB_BUILD_VOODOO_FALSE@libvoodoo = @DIRECTFB_BUILD_VOODOO_TRUE@libvoodoo = $(top_builddir)/lib/voodoo/libvoodoo.la @DIRECTFB_BUILD_ONE_FALSE@libone = @DIRECTFB_BUILD_ONE_TRUE@libone = $(top_builddir)/lib/One/libone.la DFB_BASE_LIBS = $(libdirectfb) $(libone) $(libvoodoo) $(libfusion) $(libdirect) GL_DFB_BASE_LIBS = $(GL_LIBS) GLES2_DFB_BASE_LIBS = $(GLES2_LIBS) # for DFB_BASE_LIBS etc... coretest_blit2_SOURCES = coretest_blit2.c coretest_blit2_LDADD = $(DFB_BASE_LIBS) coretest_task_SOURCES = coretest_task.cpp coretest_task_LDADD = $(DFB_BASE_LIBS) coretest_task_fillrect_SOURCES = coretest_task_fillrect.cpp coretest_task_fillrect_LDADD = $(DFB_BASE_LIBS) dfbtest_blit_SOURCES = dfbtest_blit.c dfbtest_blit_LDADD = $(DFB_BASE_LIBS) dfbtest_blit_multi_SOURCES = dfbtest_blit_multi.c dfbtest_blit_multi_LDADD = $(DFB_BASE_LIBS) dfbtest_blit_threads_SOURCES = dfbtest_blit_threads.c dfbtest_blit_threads_LDADD = $(DFB_BASE_LIBS) dfbtest_blit2_SOURCES = dfbtest_blit2.c dfbtest_blit2_LDADD = $(DFB_BASE_LIBS) dfbtest_clipboard_SOURCES = dfbtest_clipboard.c dfbtest_clipboard_LDADD = $(DFB_BASE_LIBS) dfbtest_fillrect_SOURCES = dfbtest_fillrect.c dfbtest_fillrect_LDADD = $(DFB_BASE_LIBS) dfbtest_flip_SOURCES = dfbtest_flip.c dfbtest_flip_LDADD = $(DFB_BASE_LIBS) dfbtest_font_SOURCES = dfbtest_font.c dfbtest_font_LDADD = $(DFB_BASE_LIBS) dfbtest_font_blend_SOURCES = dfbtest_font_blend.cpp ../examples/++dfb/dfbapp.cpp dfbtest_font_blend_LDADD = $(DFB_BASE_LIBS) $(libppdfb) dfbtest_init_SOURCES = dfbtest_init.c dfbtest_init_LDADD = $(DFB_BASE_LIBS) dfbtest_input_SOURCES = dfbtest_input.c dfbtest_input_LDADD = $(DFB_BASE_LIBS) dfbtest_layers_SOURCES = dfbtest_layers.c dfbtest_layers_LDADD = $(DFB_BASE_LIBS) dfbtest_gl1_SOURCES = dfbtest_gl1.c dfbtest_gl1_CFLAGS = $(GLES2_CFLAGS) dfbtest_gl1_LDADD = $(DFB_BASE_LIBS) $(GL_DFB_BASE_LIBS) $(GLES2_DFB_BASE_LIBS) dfbtest_gl2_SOURCES = dfbtest_gl2.c dfbtest_gl2_CFLAGS = $(GLES2_CFLAGS) dfbtest_gl2_LDADD = $(DFB_BASE_LIBS) $(GL_DFB_BASE_LIBS) $(GLES2_DFB_BASE_LIBS) $(LIBM) dfbtest_gl3_SOURCES = dfbtest_gl3.c dfbtest_gl3_CFLAGS = $(GLES2_CFLAGS) dfbtest_gl3_LDADD = $(DFB_BASE_LIBS) $(GL_DFB_BASE_LIBS) $(GLES2_DFB_BASE_LIBS) $(LIBM) dfbtest_old_gl2_SOURCES = dfbtest_old_gl2.c dfbtest_old_gl2_CFLAGS = $(GLES2_CFLAGS) dfbtest_old_gl2_LDADD = $(DFB_BASE_LIBS) $(GL_DFB_BASE_LIBS) $(GLES2_DFB_BASE_LIBS) $(LIBM) dfbtest_layer_SOURCES = dfbtest_layer.c dfbtest_layer_LDADD = $(DFB_BASE_LIBS) dfbtest_stereo_SOURCES = dfbtest_stereo.c dfbtest_stereo_LDADD = $(DFB_BASE_LIBS) dfbtest_alloc_SOURCES = dfbtest_alloc.c dfbtest_alloc_LDADD = $(DFB_BASE_LIBS) dfbtest_mirror_SOURCES = dfbtest_mirror.c dfbtest_mirror_LDADD = $(DFB_BASE_LIBS) dfbtest_prealloc_SOURCES = dfbtest_prealloc.c dfbtest_prealloc_LDADD = $(DFB_BASE_LIBS) dfbtest_reinit_SOURCES = dfbtest_reinit.c dfbtest_reinit_LDADD = $(DFB_BASE_LIBS) dfbtest_resize_SOURCES = dfbtest_resize.c dfbtest_resize_LDADD = $(DFB_BASE_LIBS) dfbtest_scale_SOURCES = dfbtest_scale.c dfbtest_scale_LDADD = $(DFB_BASE_LIBS) dfbtest_scale_nv21_SOURCES = dfbtest_scale_nv21.c dfbtest_scale_nv21_LDADD = $(DFB_BASE_LIBS) dfbtest_stereo_window_SOURCES = dfbtest_stereo_window.c dfbtest_stereo_window_LDADD = $(DFB_BASE_LIBS) dfbtest_surface_compositor_SOURCES = dfbtest_surface_compositor.c dfbtest_surface_compositor_LDADD = $(DFB_BASE_LIBS) dfbtest_surface_compositor_threads_SOURCES = dfbtest_surface_compositor_threads.c dfbtest_surface_compositor_threads_LDADD = $(DFB_BASE_LIBS) dfbtest_surface_updates_SOURCES = dfbtest_surface_updates.c dfbtest_surface_updates_LDADD = $(DFB_BASE_LIBS) dfbtest_sync_SOURCES = dfbtest_sync.c dfbtest_sync_LDADD = $(DFB_BASE_LIBS) dfbtest_video_SOURCES = dfbtest_video.c dfbtest_video_LDADD = $(DFB_BASE_LIBS) dfbtest_waitserial_SOURCES = dfbtest_waitserial.c dfbtest_waitserial_LDADD = $(DFB_BASE_LIBS) dfbtest_water_SOURCES = dfbtest_water.c dfbtest_water_LDADD = $(DFB_BASE_LIBS) dfbtest_window_SOURCES = dfbtest_window.c dfbtest_window_LDADD = $(DFB_BASE_LIBS) dfbtest_window_cursor_SOURCES = dfbtest_window_cursor.c dfbtest_window_cursor_LDADD = $(DFB_BASE_LIBS) dfbtest_window_flip_SOURCES = dfbtest_window_flip.c dfbtest_window_flip_LDADD = $(DFB_BASE_LIBS) dfbtest_window_flip_once_SOURCES = dfbtest_window_flip_once.c dfbtest_window_flip_once_LDADD = $(DFB_BASE_LIBS) dfbtest_window_surface_SOURCES = dfbtest_window_surface.c dfbtest_window_surface_LDADD = $(DFB_BASE_LIBS) dfbtest_window_update_SOURCES = dfbtest_window_update.c dfbtest_window_update_LDADD = $(DFB_BASE_LIBS) dfbtest_windows_watcher_SOURCES = dfbtest_windows_watcher.c dfbtest_windows_watcher_LDADD = $(DFB_BASE_LIBS) direct_stream_SOURCES = direct_stream.c direct_stream_LDADD = $(libdirect) direct_test_SOURCES = direct_test.c direct_test_LDADD = $(libdirect) fusion_call_SOURCES = fusion_call.c fusion_call_LDADD = $(DFB_BASE_LIBS) fusion_call_bench_SOURCES = fusion_call_bench.c fusion_call_bench_LDADD = $(DFB_BASE_LIBS) fusion_fork_SOURCES = fusion_fork.c fusion_fork_LDADD = $(DFB_BASE_LIBS) fusion_reactor_SOURCES = fusion_reactor.c fusion_reactor_LDADD = $(DFB_BASE_LIBS) fusion_skirmish_SOURCES = fusion_skirmish.c fusion_skirmish_LDADD = $(DFB_BASE_LIBS) fusion_stream_SOURCES = fusion_stream.c fusion_stream_LDADD = $(DFB_BASE_LIBS) OneBench_SOURCES = OneBench.c OneBench_LDADD = $(DFB_BASE_LIBS) OneTest_SOURCES = OneTest.c OneTest_LDADD = $(DFB_BASE_LIBS) voodoo_bench_SOURCES = voodoo_bench.c voodoo_bench_LDADD = $(DFB_BASE_LIBS) voodoo_bench_client_SOURCES = voodoo_bench_client.c voodoo_bench_client_LDADD = $(DFB_BASE_LIBS) voodoo_bench_server_SOURCES = voodoo_bench_server.c voodoo_bench_server_LDADD = $(DFB_BASE_LIBS) voodoo_bench_client_unix_SOURCES = voodoo_bench_client_unix.c voodoo_bench_client_unix_LDADD = $(DFB_BASE_LIBS) voodoo_bench_server_unix_SOURCES = voodoo_bench_server_unix.c voodoo_bench_server_unix_LDADD = $(DFB_BASE_LIBS) testman_SOURCES = testman.c testman_LDADD = $(DFB_BASE_LIBS) $(libsawman) testrun_SOURCES = testrun.c testrun_LDADD = $(DFB_BASE_LIBS) $(libsawman) sample1_SOURCES = sample1.c sample1_LDADD = $(DFB_BASE_LIBS) $(libsawman) divine_test_SOURCES = divine_test.c divine_test_LDADD = $(DFB_BASE_LIBS) $(libdivine) fdtest_bench_SOURCES = fdtest_bench.c fdtest_bench_LDADD = $(libfusion) $(libdirect) $(libfusiondale) fdtest_coma_SOURCES = fdtest_coma.c fdtest_coma_LDADD = $(libfusion) $(libdirect) $(libfusiondale) fdtest_init_SOURCES = fdtest_init.c fdtest_init_LDADD = $(libfusion) $(libdirect) $(libfusiondale) all: all-recursive .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libs_deps.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/libs_deps.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list OneBench$(EXEEXT): $(OneBench_OBJECTS) $(OneBench_DEPENDENCIES) $(EXTRA_OneBench_DEPENDENCIES) @rm -f OneBench$(EXEEXT) $(AM_V_CCLD)$(LINK) $(OneBench_OBJECTS) $(OneBench_LDADD) $(LIBS) OneTest$(EXEEXT): $(OneTest_OBJECTS) $(OneTest_DEPENDENCIES) $(EXTRA_OneTest_DEPENDENCIES) @rm -f OneTest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(OneTest_OBJECTS) $(OneTest_LDADD) $(LIBS) coretest_blit2$(EXEEXT): $(coretest_blit2_OBJECTS) $(coretest_blit2_DEPENDENCIES) $(EXTRA_coretest_blit2_DEPENDENCIES) @rm -f coretest_blit2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(coretest_blit2_OBJECTS) $(coretest_blit2_LDADD) $(LIBS) coretest_task$(EXEEXT): $(coretest_task_OBJECTS) $(coretest_task_DEPENDENCIES) $(EXTRA_coretest_task_DEPENDENCIES) @rm -f coretest_task$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(coretest_task_OBJECTS) $(coretest_task_LDADD) $(LIBS) coretest_task_fillrect$(EXEEXT): $(coretest_task_fillrect_OBJECTS) $(coretest_task_fillrect_DEPENDENCIES) $(EXTRA_coretest_task_fillrect_DEPENDENCIES) @rm -f coretest_task_fillrect$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(coretest_task_fillrect_OBJECTS) $(coretest_task_fillrect_LDADD) $(LIBS) dfbtest_alloc$(EXEEXT): $(dfbtest_alloc_OBJECTS) $(dfbtest_alloc_DEPENDENCIES) $(EXTRA_dfbtest_alloc_DEPENDENCIES) @rm -f dfbtest_alloc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_alloc_OBJECTS) $(dfbtest_alloc_LDADD) $(LIBS) dfbtest_blit$(EXEEXT): $(dfbtest_blit_OBJECTS) $(dfbtest_blit_DEPENDENCIES) $(EXTRA_dfbtest_blit_DEPENDENCIES) @rm -f dfbtest_blit$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_blit_OBJECTS) $(dfbtest_blit_LDADD) $(LIBS) dfbtest_blit2$(EXEEXT): $(dfbtest_blit2_OBJECTS) $(dfbtest_blit2_DEPENDENCIES) $(EXTRA_dfbtest_blit2_DEPENDENCIES) @rm -f dfbtest_blit2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_blit2_OBJECTS) $(dfbtest_blit2_LDADD) $(LIBS) dfbtest_blit_multi$(EXEEXT): $(dfbtest_blit_multi_OBJECTS) $(dfbtest_blit_multi_DEPENDENCIES) $(EXTRA_dfbtest_blit_multi_DEPENDENCIES) @rm -f dfbtest_blit_multi$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_blit_multi_OBJECTS) $(dfbtest_blit_multi_LDADD) $(LIBS) dfbtest_blit_threads$(EXEEXT): $(dfbtest_blit_threads_OBJECTS) $(dfbtest_blit_threads_DEPENDENCIES) $(EXTRA_dfbtest_blit_threads_DEPENDENCIES) @rm -f dfbtest_blit_threads$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_blit_threads_OBJECTS) $(dfbtest_blit_threads_LDADD) $(LIBS) dfbtest_clipboard$(EXEEXT): $(dfbtest_clipboard_OBJECTS) $(dfbtest_clipboard_DEPENDENCIES) $(EXTRA_dfbtest_clipboard_DEPENDENCIES) @rm -f dfbtest_clipboard$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_clipboard_OBJECTS) $(dfbtest_clipboard_LDADD) $(LIBS) dfbtest_fillrect$(EXEEXT): $(dfbtest_fillrect_OBJECTS) $(dfbtest_fillrect_DEPENDENCIES) $(EXTRA_dfbtest_fillrect_DEPENDENCIES) @rm -f dfbtest_fillrect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_fillrect_OBJECTS) $(dfbtest_fillrect_LDADD) $(LIBS) dfbtest_flip$(EXEEXT): $(dfbtest_flip_OBJECTS) $(dfbtest_flip_DEPENDENCIES) $(EXTRA_dfbtest_flip_DEPENDENCIES) @rm -f dfbtest_flip$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_flip_OBJECTS) $(dfbtest_flip_LDADD) $(LIBS) dfbtest_font$(EXEEXT): $(dfbtest_font_OBJECTS) $(dfbtest_font_DEPENDENCIES) $(EXTRA_dfbtest_font_DEPENDENCIES) @rm -f dfbtest_font$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_font_OBJECTS) $(dfbtest_font_LDADD) $(LIBS) dfbtest_font_blend$(EXEEXT): $(dfbtest_font_blend_OBJECTS) $(dfbtest_font_blend_DEPENDENCIES) $(EXTRA_dfbtest_font_blend_DEPENDENCIES) @rm -f dfbtest_font_blend$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(dfbtest_font_blend_OBJECTS) $(dfbtest_font_blend_LDADD) $(LIBS) dfbtest_gl1$(EXEEXT): $(dfbtest_gl1_OBJECTS) $(dfbtest_gl1_DEPENDENCIES) $(EXTRA_dfbtest_gl1_DEPENDENCIES) @rm -f dfbtest_gl1$(EXEEXT) $(AM_V_CCLD)$(dfbtest_gl1_LINK) $(dfbtest_gl1_OBJECTS) $(dfbtest_gl1_LDADD) $(LIBS) dfbtest_gl2$(EXEEXT): $(dfbtest_gl2_OBJECTS) $(dfbtest_gl2_DEPENDENCIES) $(EXTRA_dfbtest_gl2_DEPENDENCIES) @rm -f dfbtest_gl2$(EXEEXT) $(AM_V_CCLD)$(dfbtest_gl2_LINK) $(dfbtest_gl2_OBJECTS) $(dfbtest_gl2_LDADD) $(LIBS) dfbtest_gl3$(EXEEXT): $(dfbtest_gl3_OBJECTS) $(dfbtest_gl3_DEPENDENCIES) $(EXTRA_dfbtest_gl3_DEPENDENCIES) @rm -f dfbtest_gl3$(EXEEXT) $(AM_V_CCLD)$(dfbtest_gl3_LINK) $(dfbtest_gl3_OBJECTS) $(dfbtest_gl3_LDADD) $(LIBS) dfbtest_init$(EXEEXT): $(dfbtest_init_OBJECTS) $(dfbtest_init_DEPENDENCIES) $(EXTRA_dfbtest_init_DEPENDENCIES) @rm -f dfbtest_init$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_init_OBJECTS) $(dfbtest_init_LDADD) $(LIBS) dfbtest_input$(EXEEXT): $(dfbtest_input_OBJECTS) $(dfbtest_input_DEPENDENCIES) $(EXTRA_dfbtest_input_DEPENDENCIES) @rm -f dfbtest_input$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_input_OBJECTS) $(dfbtest_input_LDADD) $(LIBS) dfbtest_layer$(EXEEXT): $(dfbtest_layer_OBJECTS) $(dfbtest_layer_DEPENDENCIES) $(EXTRA_dfbtest_layer_DEPENDENCIES) @rm -f dfbtest_layer$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_layer_OBJECTS) $(dfbtest_layer_LDADD) $(LIBS) dfbtest_layers$(EXEEXT): $(dfbtest_layers_OBJECTS) $(dfbtest_layers_DEPENDENCIES) $(EXTRA_dfbtest_layers_DEPENDENCIES) @rm -f dfbtest_layers$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_layers_OBJECTS) $(dfbtest_layers_LDADD) $(LIBS) dfbtest_mirror$(EXEEXT): $(dfbtest_mirror_OBJECTS) $(dfbtest_mirror_DEPENDENCIES) $(EXTRA_dfbtest_mirror_DEPENDENCIES) @rm -f dfbtest_mirror$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_mirror_OBJECTS) $(dfbtest_mirror_LDADD) $(LIBS) dfbtest_old_gl2$(EXEEXT): $(dfbtest_old_gl2_OBJECTS) $(dfbtest_old_gl2_DEPENDENCIES) $(EXTRA_dfbtest_old_gl2_DEPENDENCIES) @rm -f dfbtest_old_gl2$(EXEEXT) $(AM_V_CCLD)$(dfbtest_old_gl2_LINK) $(dfbtest_old_gl2_OBJECTS) $(dfbtest_old_gl2_LDADD) $(LIBS) dfbtest_prealloc$(EXEEXT): $(dfbtest_prealloc_OBJECTS) $(dfbtest_prealloc_DEPENDENCIES) $(EXTRA_dfbtest_prealloc_DEPENDENCIES) @rm -f dfbtest_prealloc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_prealloc_OBJECTS) $(dfbtest_prealloc_LDADD) $(LIBS) dfbtest_reinit$(EXEEXT): $(dfbtest_reinit_OBJECTS) $(dfbtest_reinit_DEPENDENCIES) $(EXTRA_dfbtest_reinit_DEPENDENCIES) @rm -f dfbtest_reinit$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_reinit_OBJECTS) $(dfbtest_reinit_LDADD) $(LIBS) dfbtest_resize$(EXEEXT): $(dfbtest_resize_OBJECTS) $(dfbtest_resize_DEPENDENCIES) $(EXTRA_dfbtest_resize_DEPENDENCIES) @rm -f dfbtest_resize$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_resize_OBJECTS) $(dfbtest_resize_LDADD) $(LIBS) dfbtest_scale$(EXEEXT): $(dfbtest_scale_OBJECTS) $(dfbtest_scale_DEPENDENCIES) $(EXTRA_dfbtest_scale_DEPENDENCIES) @rm -f dfbtest_scale$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_scale_OBJECTS) $(dfbtest_scale_LDADD) $(LIBS) dfbtest_scale_nv21$(EXEEXT): $(dfbtest_scale_nv21_OBJECTS) $(dfbtest_scale_nv21_DEPENDENCIES) $(EXTRA_dfbtest_scale_nv21_DEPENDENCIES) @rm -f dfbtest_scale_nv21$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_scale_nv21_OBJECTS) $(dfbtest_scale_nv21_LDADD) $(LIBS) dfbtest_stereo$(EXEEXT): $(dfbtest_stereo_OBJECTS) $(dfbtest_stereo_DEPENDENCIES) $(EXTRA_dfbtest_stereo_DEPENDENCIES) @rm -f dfbtest_stereo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_stereo_OBJECTS) $(dfbtest_stereo_LDADD) $(LIBS) dfbtest_stereo_window$(EXEEXT): $(dfbtest_stereo_window_OBJECTS) $(dfbtest_stereo_window_DEPENDENCIES) $(EXTRA_dfbtest_stereo_window_DEPENDENCIES) @rm -f dfbtest_stereo_window$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_stereo_window_OBJECTS) $(dfbtest_stereo_window_LDADD) $(LIBS) dfbtest_surface_compositor$(EXEEXT): $(dfbtest_surface_compositor_OBJECTS) $(dfbtest_surface_compositor_DEPENDENCIES) $(EXTRA_dfbtest_surface_compositor_DEPENDENCIES) @rm -f dfbtest_surface_compositor$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_surface_compositor_OBJECTS) $(dfbtest_surface_compositor_LDADD) $(LIBS) dfbtest_surface_compositor_threads$(EXEEXT): $(dfbtest_surface_compositor_threads_OBJECTS) $(dfbtest_surface_compositor_threads_DEPENDENCIES) $(EXTRA_dfbtest_surface_compositor_threads_DEPENDENCIES) @rm -f dfbtest_surface_compositor_threads$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_surface_compositor_threads_OBJECTS) $(dfbtest_surface_compositor_threads_LDADD) $(LIBS) dfbtest_surface_updates$(EXEEXT): $(dfbtest_surface_updates_OBJECTS) $(dfbtest_surface_updates_DEPENDENCIES) $(EXTRA_dfbtest_surface_updates_DEPENDENCIES) @rm -f dfbtest_surface_updates$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_surface_updates_OBJECTS) $(dfbtest_surface_updates_LDADD) $(LIBS) dfbtest_sync$(EXEEXT): $(dfbtest_sync_OBJECTS) $(dfbtest_sync_DEPENDENCIES) $(EXTRA_dfbtest_sync_DEPENDENCIES) @rm -f dfbtest_sync$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_sync_OBJECTS) $(dfbtest_sync_LDADD) $(LIBS) dfbtest_video$(EXEEXT): $(dfbtest_video_OBJECTS) $(dfbtest_video_DEPENDENCIES) $(EXTRA_dfbtest_video_DEPENDENCIES) @rm -f dfbtest_video$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_video_OBJECTS) $(dfbtest_video_LDADD) $(LIBS) dfbtest_waitserial$(EXEEXT): $(dfbtest_waitserial_OBJECTS) $(dfbtest_waitserial_DEPENDENCIES) $(EXTRA_dfbtest_waitserial_DEPENDENCIES) @rm -f dfbtest_waitserial$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_waitserial_OBJECTS) $(dfbtest_waitserial_LDADD) $(LIBS) dfbtest_water$(EXEEXT): $(dfbtest_water_OBJECTS) $(dfbtest_water_DEPENDENCIES) $(EXTRA_dfbtest_water_DEPENDENCIES) @rm -f dfbtest_water$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_water_OBJECTS) $(dfbtest_water_LDADD) $(LIBS) dfbtest_window$(EXEEXT): $(dfbtest_window_OBJECTS) $(dfbtest_window_DEPENDENCIES) $(EXTRA_dfbtest_window_DEPENDENCIES) @rm -f dfbtest_window$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_window_OBJECTS) $(dfbtest_window_LDADD) $(LIBS) dfbtest_window_cursor$(EXEEXT): $(dfbtest_window_cursor_OBJECTS) $(dfbtest_window_cursor_DEPENDENCIES) $(EXTRA_dfbtest_window_cursor_DEPENDENCIES) @rm -f dfbtest_window_cursor$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_window_cursor_OBJECTS) $(dfbtest_window_cursor_LDADD) $(LIBS) dfbtest_window_flip$(EXEEXT): $(dfbtest_window_flip_OBJECTS) $(dfbtest_window_flip_DEPENDENCIES) $(EXTRA_dfbtest_window_flip_DEPENDENCIES) @rm -f dfbtest_window_flip$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_window_flip_OBJECTS) $(dfbtest_window_flip_LDADD) $(LIBS) dfbtest_window_flip_once$(EXEEXT): $(dfbtest_window_flip_once_OBJECTS) $(dfbtest_window_flip_once_DEPENDENCIES) $(EXTRA_dfbtest_window_flip_once_DEPENDENCIES) @rm -f dfbtest_window_flip_once$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_window_flip_once_OBJECTS) $(dfbtest_window_flip_once_LDADD) $(LIBS) dfbtest_window_surface$(EXEEXT): $(dfbtest_window_surface_OBJECTS) $(dfbtest_window_surface_DEPENDENCIES) $(EXTRA_dfbtest_window_surface_DEPENDENCIES) @rm -f dfbtest_window_surface$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_window_surface_OBJECTS) $(dfbtest_window_surface_LDADD) $(LIBS) dfbtest_window_update$(EXEEXT): $(dfbtest_window_update_OBJECTS) $(dfbtest_window_update_DEPENDENCIES) $(EXTRA_dfbtest_window_update_DEPENDENCIES) @rm -f dfbtest_window_update$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_window_update_OBJECTS) $(dfbtest_window_update_LDADD) $(LIBS) dfbtest_windows_watcher$(EXEEXT): $(dfbtest_windows_watcher_OBJECTS) $(dfbtest_windows_watcher_DEPENDENCIES) $(EXTRA_dfbtest_windows_watcher_DEPENDENCIES) @rm -f dfbtest_windows_watcher$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfbtest_windows_watcher_OBJECTS) $(dfbtest_windows_watcher_LDADD) $(LIBS) direct_stream$(EXEEXT): $(direct_stream_OBJECTS) $(direct_stream_DEPENDENCIES) $(EXTRA_direct_stream_DEPENDENCIES) @rm -f direct_stream$(EXEEXT) $(AM_V_CCLD)$(LINK) $(direct_stream_OBJECTS) $(direct_stream_LDADD) $(LIBS) direct_test$(EXEEXT): $(direct_test_OBJECTS) $(direct_test_DEPENDENCIES) $(EXTRA_direct_test_DEPENDENCIES) @rm -f direct_test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(direct_test_OBJECTS) $(direct_test_LDADD) $(LIBS) divine_test$(EXEEXT): $(divine_test_OBJECTS) $(divine_test_DEPENDENCIES) $(EXTRA_divine_test_DEPENDENCIES) @rm -f divine_test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(divine_test_OBJECTS) $(divine_test_LDADD) $(LIBS) fdtest_bench$(EXEEXT): $(fdtest_bench_OBJECTS) $(fdtest_bench_DEPENDENCIES) $(EXTRA_fdtest_bench_DEPENDENCIES) @rm -f fdtest_bench$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fdtest_bench_OBJECTS) $(fdtest_bench_LDADD) $(LIBS) fdtest_coma$(EXEEXT): $(fdtest_coma_OBJECTS) $(fdtest_coma_DEPENDENCIES) $(EXTRA_fdtest_coma_DEPENDENCIES) @rm -f fdtest_coma$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fdtest_coma_OBJECTS) $(fdtest_coma_LDADD) $(LIBS) fdtest_init$(EXEEXT): $(fdtest_init_OBJECTS) $(fdtest_init_DEPENDENCIES) $(EXTRA_fdtest_init_DEPENDENCIES) @rm -f fdtest_init$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fdtest_init_OBJECTS) $(fdtest_init_LDADD) $(LIBS) fusion_call$(EXEEXT): $(fusion_call_OBJECTS) $(fusion_call_DEPENDENCIES) $(EXTRA_fusion_call_DEPENDENCIES) @rm -f fusion_call$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fusion_call_OBJECTS) $(fusion_call_LDADD) $(LIBS) fusion_call_bench$(EXEEXT): $(fusion_call_bench_OBJECTS) $(fusion_call_bench_DEPENDENCIES) $(EXTRA_fusion_call_bench_DEPENDENCIES) @rm -f fusion_call_bench$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fusion_call_bench_OBJECTS) $(fusion_call_bench_LDADD) $(LIBS) fusion_fork$(EXEEXT): $(fusion_fork_OBJECTS) $(fusion_fork_DEPENDENCIES) $(EXTRA_fusion_fork_DEPENDENCIES) @rm -f fusion_fork$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fusion_fork_OBJECTS) $(fusion_fork_LDADD) $(LIBS) fusion_reactor$(EXEEXT): $(fusion_reactor_OBJECTS) $(fusion_reactor_DEPENDENCIES) $(EXTRA_fusion_reactor_DEPENDENCIES) @rm -f fusion_reactor$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fusion_reactor_OBJECTS) $(fusion_reactor_LDADD) $(LIBS) fusion_skirmish$(EXEEXT): $(fusion_skirmish_OBJECTS) $(fusion_skirmish_DEPENDENCIES) $(EXTRA_fusion_skirmish_DEPENDENCIES) @rm -f fusion_skirmish$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fusion_skirmish_OBJECTS) $(fusion_skirmish_LDADD) $(LIBS) fusion_stream$(EXEEXT): $(fusion_stream_OBJECTS) $(fusion_stream_DEPENDENCIES) $(EXTRA_fusion_stream_DEPENDENCIES) @rm -f fusion_stream$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fusion_stream_OBJECTS) $(fusion_stream_LDADD) $(LIBS) sample1$(EXEEXT): $(sample1_OBJECTS) $(sample1_DEPENDENCIES) $(EXTRA_sample1_DEPENDENCIES) @rm -f sample1$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sample1_OBJECTS) $(sample1_LDADD) $(LIBS) testman$(EXEEXT): $(testman_OBJECTS) $(testman_DEPENDENCIES) $(EXTRA_testman_DEPENDENCIES) @rm -f testman$(EXEEXT) $(AM_V_CCLD)$(LINK) $(testman_OBJECTS) $(testman_LDADD) $(LIBS) testrun$(EXEEXT): $(testrun_OBJECTS) $(testrun_DEPENDENCIES) $(EXTRA_testrun_DEPENDENCIES) @rm -f testrun$(EXEEXT) $(AM_V_CCLD)$(LINK) $(testrun_OBJECTS) $(testrun_LDADD) $(LIBS) voodoo_bench$(EXEEXT): $(voodoo_bench_OBJECTS) $(voodoo_bench_DEPENDENCIES) $(EXTRA_voodoo_bench_DEPENDENCIES) @rm -f voodoo_bench$(EXEEXT) $(AM_V_CCLD)$(LINK) $(voodoo_bench_OBJECTS) $(voodoo_bench_LDADD) $(LIBS) voodoo_bench_client$(EXEEXT): $(voodoo_bench_client_OBJECTS) $(voodoo_bench_client_DEPENDENCIES) $(EXTRA_voodoo_bench_client_DEPENDENCIES) @rm -f voodoo_bench_client$(EXEEXT) $(AM_V_CCLD)$(LINK) $(voodoo_bench_client_OBJECTS) $(voodoo_bench_client_LDADD) $(LIBS) voodoo_bench_client_unix$(EXEEXT): $(voodoo_bench_client_unix_OBJECTS) $(voodoo_bench_client_unix_DEPENDENCIES) $(EXTRA_voodoo_bench_client_unix_DEPENDENCIES) @rm -f voodoo_bench_client_unix$(EXEEXT) $(AM_V_CCLD)$(LINK) $(voodoo_bench_client_unix_OBJECTS) $(voodoo_bench_client_unix_LDADD) $(LIBS) voodoo_bench_server$(EXEEXT): $(voodoo_bench_server_OBJECTS) $(voodoo_bench_server_DEPENDENCIES) $(EXTRA_voodoo_bench_server_DEPENDENCIES) @rm -f voodoo_bench_server$(EXEEXT) $(AM_V_CCLD)$(LINK) $(voodoo_bench_server_OBJECTS) $(voodoo_bench_server_LDADD) $(LIBS) voodoo_bench_server_unix$(EXEEXT): $(voodoo_bench_server_unix_OBJECTS) $(voodoo_bench_server_unix_DEPENDENCIES) $(EXTRA_voodoo_bench_server_unix_DEPENDENCIES) @rm -f voodoo_bench_server_unix$(EXEEXT) $(AM_V_CCLD)$(LINK) $(voodoo_bench_server_unix_OBJECTS) $(voodoo_bench_server_unix_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OneBench.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OneTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coretest_blit2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coretest_task.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coretest_task_fillrect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbapp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_alloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_blit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_blit2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_blit_multi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_blit_threads.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_clipboard.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_fillrect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_flip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_font.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_font_blend.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_gl1-dfbtest_gl1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_gl2-dfbtest_gl2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_gl3-dfbtest_gl3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_init.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_input.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_layer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_layers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_mirror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_old_gl2-dfbtest_old_gl2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_prealloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_reinit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_resize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_scale.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_scale_nv21.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_stereo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_stereo_window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_surface_compositor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_surface_compositor_threads.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_surface_updates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_sync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_video.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_waitserial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_water.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_window_cursor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_window_flip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_window_flip_once.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_window_surface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_window_update.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfbtest_windows_watcher.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/direct_stream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/direct_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/divine_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdtest_bench.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdtest_coma.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdtest_init.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fusion_call.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fusion_call_bench.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fusion_fork.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fusion_reactor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fusion_skirmish.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fusion_stream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testman.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrun.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/voodoo_bench.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/voodoo_bench_client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/voodoo_bench_client_unix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/voodoo_bench_server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/voodoo_bench_server_unix.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< dfbtest_gl1-dfbtest_gl1.o: dfbtest_gl1.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl1_CFLAGS) $(CFLAGS) -MT dfbtest_gl1-dfbtest_gl1.o -MD -MP -MF $(DEPDIR)/dfbtest_gl1-dfbtest_gl1.Tpo -c -o dfbtest_gl1-dfbtest_gl1.o `test -f 'dfbtest_gl1.c' || echo '$(srcdir)/'`dfbtest_gl1.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dfbtest_gl1-dfbtest_gl1.Tpo $(DEPDIR)/dfbtest_gl1-dfbtest_gl1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dfbtest_gl1.c' object='dfbtest_gl1-dfbtest_gl1.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl1_CFLAGS) $(CFLAGS) -c -o dfbtest_gl1-dfbtest_gl1.o `test -f 'dfbtest_gl1.c' || echo '$(srcdir)/'`dfbtest_gl1.c dfbtest_gl1-dfbtest_gl1.obj: dfbtest_gl1.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl1_CFLAGS) $(CFLAGS) -MT dfbtest_gl1-dfbtest_gl1.obj -MD -MP -MF $(DEPDIR)/dfbtest_gl1-dfbtest_gl1.Tpo -c -o dfbtest_gl1-dfbtest_gl1.obj `if test -f 'dfbtest_gl1.c'; then $(CYGPATH_W) 'dfbtest_gl1.c'; else $(CYGPATH_W) '$(srcdir)/dfbtest_gl1.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dfbtest_gl1-dfbtest_gl1.Tpo $(DEPDIR)/dfbtest_gl1-dfbtest_gl1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dfbtest_gl1.c' object='dfbtest_gl1-dfbtest_gl1.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl1_CFLAGS) $(CFLAGS) -c -o dfbtest_gl1-dfbtest_gl1.obj `if test -f 'dfbtest_gl1.c'; then $(CYGPATH_W) 'dfbtest_gl1.c'; else $(CYGPATH_W) '$(srcdir)/dfbtest_gl1.c'; fi` dfbtest_gl2-dfbtest_gl2.o: dfbtest_gl2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl2_CFLAGS) $(CFLAGS) -MT dfbtest_gl2-dfbtest_gl2.o -MD -MP -MF $(DEPDIR)/dfbtest_gl2-dfbtest_gl2.Tpo -c -o dfbtest_gl2-dfbtest_gl2.o `test -f 'dfbtest_gl2.c' || echo '$(srcdir)/'`dfbtest_gl2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dfbtest_gl2-dfbtest_gl2.Tpo $(DEPDIR)/dfbtest_gl2-dfbtest_gl2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dfbtest_gl2.c' object='dfbtest_gl2-dfbtest_gl2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl2_CFLAGS) $(CFLAGS) -c -o dfbtest_gl2-dfbtest_gl2.o `test -f 'dfbtest_gl2.c' || echo '$(srcdir)/'`dfbtest_gl2.c dfbtest_gl2-dfbtest_gl2.obj: dfbtest_gl2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl2_CFLAGS) $(CFLAGS) -MT dfbtest_gl2-dfbtest_gl2.obj -MD -MP -MF $(DEPDIR)/dfbtest_gl2-dfbtest_gl2.Tpo -c -o dfbtest_gl2-dfbtest_gl2.obj `if test -f 'dfbtest_gl2.c'; then $(CYGPATH_W) 'dfbtest_gl2.c'; else $(CYGPATH_W) '$(srcdir)/dfbtest_gl2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dfbtest_gl2-dfbtest_gl2.Tpo $(DEPDIR)/dfbtest_gl2-dfbtest_gl2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dfbtest_gl2.c' object='dfbtest_gl2-dfbtest_gl2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl2_CFLAGS) $(CFLAGS) -c -o dfbtest_gl2-dfbtest_gl2.obj `if test -f 'dfbtest_gl2.c'; then $(CYGPATH_W) 'dfbtest_gl2.c'; else $(CYGPATH_W) '$(srcdir)/dfbtest_gl2.c'; fi` dfbtest_gl3-dfbtest_gl3.o: dfbtest_gl3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl3_CFLAGS) $(CFLAGS) -MT dfbtest_gl3-dfbtest_gl3.o -MD -MP -MF $(DEPDIR)/dfbtest_gl3-dfbtest_gl3.Tpo -c -o dfbtest_gl3-dfbtest_gl3.o `test -f 'dfbtest_gl3.c' || echo '$(srcdir)/'`dfbtest_gl3.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dfbtest_gl3-dfbtest_gl3.Tpo $(DEPDIR)/dfbtest_gl3-dfbtest_gl3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dfbtest_gl3.c' object='dfbtest_gl3-dfbtest_gl3.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl3_CFLAGS) $(CFLAGS) -c -o dfbtest_gl3-dfbtest_gl3.o `test -f 'dfbtest_gl3.c' || echo '$(srcdir)/'`dfbtest_gl3.c dfbtest_gl3-dfbtest_gl3.obj: dfbtest_gl3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl3_CFLAGS) $(CFLAGS) -MT dfbtest_gl3-dfbtest_gl3.obj -MD -MP -MF $(DEPDIR)/dfbtest_gl3-dfbtest_gl3.Tpo -c -o dfbtest_gl3-dfbtest_gl3.obj `if test -f 'dfbtest_gl3.c'; then $(CYGPATH_W) 'dfbtest_gl3.c'; else $(CYGPATH_W) '$(srcdir)/dfbtest_gl3.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dfbtest_gl3-dfbtest_gl3.Tpo $(DEPDIR)/dfbtest_gl3-dfbtest_gl3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dfbtest_gl3.c' object='dfbtest_gl3-dfbtest_gl3.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_gl3_CFLAGS) $(CFLAGS) -c -o dfbtest_gl3-dfbtest_gl3.obj `if test -f 'dfbtest_gl3.c'; then $(CYGPATH_W) 'dfbtest_gl3.c'; else $(CYGPATH_W) '$(srcdir)/dfbtest_gl3.c'; fi` dfbtest_old_gl2-dfbtest_old_gl2.o: dfbtest_old_gl2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_old_gl2_CFLAGS) $(CFLAGS) -MT dfbtest_old_gl2-dfbtest_old_gl2.o -MD -MP -MF $(DEPDIR)/dfbtest_old_gl2-dfbtest_old_gl2.Tpo -c -o dfbtest_old_gl2-dfbtest_old_gl2.o `test -f 'dfbtest_old_gl2.c' || echo '$(srcdir)/'`dfbtest_old_gl2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dfbtest_old_gl2-dfbtest_old_gl2.Tpo $(DEPDIR)/dfbtest_old_gl2-dfbtest_old_gl2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dfbtest_old_gl2.c' object='dfbtest_old_gl2-dfbtest_old_gl2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_old_gl2_CFLAGS) $(CFLAGS) -c -o dfbtest_old_gl2-dfbtest_old_gl2.o `test -f 'dfbtest_old_gl2.c' || echo '$(srcdir)/'`dfbtest_old_gl2.c dfbtest_old_gl2-dfbtest_old_gl2.obj: dfbtest_old_gl2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_old_gl2_CFLAGS) $(CFLAGS) -MT dfbtest_old_gl2-dfbtest_old_gl2.obj -MD -MP -MF $(DEPDIR)/dfbtest_old_gl2-dfbtest_old_gl2.Tpo -c -o dfbtest_old_gl2-dfbtest_old_gl2.obj `if test -f 'dfbtest_old_gl2.c'; then $(CYGPATH_W) 'dfbtest_old_gl2.c'; else $(CYGPATH_W) '$(srcdir)/dfbtest_old_gl2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dfbtest_old_gl2-dfbtest_old_gl2.Tpo $(DEPDIR)/dfbtest_old_gl2-dfbtest_old_gl2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dfbtest_old_gl2.c' object='dfbtest_old_gl2-dfbtest_old_gl2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dfbtest_old_gl2_CFLAGS) $(CFLAGS) -c -o dfbtest_old_gl2-dfbtest_old_gl2.obj `if test -f 'dfbtest_old_gl2.c'; then $(CYGPATH_W) 'dfbtest_old_gl2.c'; else $(CYGPATH_W) '$(srcdir)/dfbtest_old_gl2.c'; fi` .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< dfbapp.o: ../examples/++dfb/dfbapp.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dfbapp.o -MD -MP -MF $(DEPDIR)/dfbapp.Tpo -c -o dfbapp.o `test -f '../examples/++dfb/dfbapp.cpp' || echo '$(srcdir)/'`../examples/++dfb/dfbapp.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dfbapp.Tpo $(DEPDIR)/dfbapp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../examples/++dfb/dfbapp.cpp' object='dfbapp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dfbapp.o `test -f '../examples/++dfb/dfbapp.cpp' || echo '$(srcdir)/'`../examples/++dfb/dfbapp.cpp dfbapp.obj: ../examples/++dfb/dfbapp.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dfbapp.obj -MD -MP -MF $(DEPDIR)/dfbapp.Tpo -c -o dfbapp.obj `if test -f '../examples/++dfb/dfbapp.cpp'; then $(CYGPATH_W) '../examples/++dfb/dfbapp.cpp'; else $(CYGPATH_W) '$(srcdir)/../examples/++dfb/dfbapp.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dfbapp.Tpo $(DEPDIR)/dfbapp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../examples/++dfb/dfbapp.cpp' object='dfbapp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dfbapp.obj `if test -f '../examples/++dfb/dfbapp.cpp'; then $(CYGPATH_W) '../examples/++dfb/dfbapp.cpp'; else $(CYGPATH_W) '$(srcdir)/../examples/++dfb/dfbapp.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-binPROGRAMS clean-generic clean-libtool \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS # 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: DirectFB-1.7.7/tests/dfbtest_font.c0000644000175000017500000002157712254435330014075 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include static const DirectFBPixelFormatNames( format_names ); /**********************************************************************************************************************/ static int print_usage( const char *prg ) { int i = 0; fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Font Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options] \n", prg); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -o, --outline Render outlined fonts\n"); fprintf (stderr, " -ow, --outline-width Change outline width (default 1)\n"); fprintf (stderr, " -oo, --outline-opacity Change outline opacity (default 255)\n"); return -1; } /**********************************************************************************************************************/ static IDirectFBFont * CreateFont( IDirectFB *dfb, const char *url, int size, DFBFontAttributes attributes, int outline_width, int outline_opacity ) { DFBResult ret; DFBFontDescription fdesc; IDirectFBFont *font; /* Create the font. */ fdesc.flags = DFDESC_HEIGHT | DFDESC_ATTRIBUTES | DFDESC_OUTLINE_WIDTH | DFDESC_OUTLINE_OPACITY; fdesc.height = size; fdesc.attributes = attributes; fdesc.outline_width = outline_width; fdesc.outline_opacity = outline_opacity; ret = dfb->CreateFont( dfb, url, &fdesc, &font ); if (ret) { D_DERROR( ret, "DFBTest/Font: IDirectFB::CreateFont( '%s' ) failed!\n", url ); return NULL; } return font; } static void RenderChecker( IDirectFBSurface *surface, int tile_width, int tile_height ) { int width, height; int x, y; surface->GetSize( surface, &width, &height ); for (y=0; ySetColor( surface, 0x55, 0x55, 0x55, 0xff ); else surface->SetColor( surface, 0x99, 0x99, 0x99, 0xff ); surface->FillRectangle( surface, x, y, tile_width, tile_height ); } } } int main( int argc, char *argv[] ) { int i; DFBResult ret; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBSurface *dest = NULL; const char *url = NULL; DFBFontAttributes attributes = DFFA_NONE; DFBSurfaceTextFlags text_flags = DSTF_TOPLEFT; int outline_width = 0x10000; int outline_opacity = 255; const DFBColorID color_ids[2] = { DCID_PRIMARY, DCID_OUTLINE }; const DFBColor colors[2] = { { 0xff, 0xff, 0xff, 0xff }, { 0xff, 0x00, 0x80, 0xff } }; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Font: DirectFBInit() failed!\n" ); return ret; } /* Parse arguments. */ for (i=1; iSetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/Font: IDirectFB::CreateSurface() failed!\n" ); goto out; } dest->GetSize( dest, &desc.width, &desc.height ); dest->GetPixelFormat( dest, &desc.pixelformat ); D_INFO( "DFBTest/Font: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); for (i=10; i<50; i++) { IDirectFBFont *font; font = CreateFont( dfb, url, i, attributes, outline_width, outline_opacity ); RenderChecker( dest, 64, 64 ); dest->SetColors( dest, color_ids, colors, 2 ); dest->SetFont( dest, font ); dest->DrawString( dest, "Test String AVAWA", -1, 100, 100, text_flags ); dest->Flip( dest, NULL, DSFLIP_NONE ); font->Release( font ); usleep( 500000 ); } out: if (dest) dest->Release( dest ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/coretest_task_fillrect.cpp0000644000175000017500000001614212463500054016500 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include // include here to prevent it being included indirectly causing nested extern "C" #include extern "C" { #include #include #include #include #include #include #include #include #include } #include #include #include D_DEBUG_DOMAIN( Test_MyEngine, "Test/MyEngine", "Test MyEngine" ); D_DEBUG_DOMAIN( Test_MyTask, "Test/MyTask", "Test MyTask" ); class LockTask : public DirectFB::SurfaceTask { public: LockTask() : SurfaceTask( CSAID_CPU ), pushed( false ) { direct_mutex_init( &lock ); direct_waitqueue_init( &wq ); } virtual ~LockTask() { direct_mutex_deinit( &lock ); direct_waitqueue_deinit( &wq ); } void Wait() { direct_mutex_lock( &lock ); while (!pushed) direct_waitqueue_wait( &wq, &lock ); direct_mutex_unlock( &lock ); } protected: virtual DFBResult Push() { direct_mutex_lock( &lock ); pushed = true; direct_waitqueue_broadcast( &wq ); direct_mutex_unlock( &lock ); return DFB_OK; } virtual DFBResult Run() { return DFB_OK; } private: DirectMutex lock; DirectWaitQueue wq; bool pushed; }; int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb; DFBSurfaceDescription desc; IDirectFBSurface *dest; IDirectFBSurface_data *dest_data; CoreDFB *core; CoreSurface *dst; CardState state; DirectFB::Renderer *renderer; LockTask *lock_task; CoreSurfaceBuffer *buffer; CoreSurfaceAllocation *allocation; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "CoreTest/Blit2: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "CoreTest/Blit2: DirectFBCreate() failed!\n" ); return ret; } /* Fill description for a primary surface. */ desc.flags = (DFBSurfaceDescriptionFlags)( DSDESC_PIXELFORMAT | DSDESC_CAPS ); desc.caps = (DFBSurfaceCapabilities)( DSCAPS_PRIMARY | DSCAPS_FLIPPING ); desc.pixelformat = DSPF_ARGB; dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ); /* Create a primary surface. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/FillRectangle: IDirectFB::CreateSurface() failed!\n" ); goto error_dest; } dest->GetSize( dest, &desc.width, &desc.height ); dest->GetPixelFormat( dest, &desc.pixelformat ); D_INFO( "DFBTest/FillRectangle: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); dfb_core_create( &core ); dest_data = (IDirectFBSurface_data *)dest->priv; dst = dest_data->surface; long long ms; ms = direct_clock_get_abs_millis(); while (true) { long long now; dfb_surface_lock( dst ); buffer = dfb_surface_get_buffer3( dst, CSBR_BACK, DSSE_LEFT, dst->flips ); dfb_surface_unlock( dst ); dfb_state_init( &state, core ); dfb_state_set_destination( &state, dst ); renderer = new DirectFB::Renderer( &state, NULL ); for (int i=0; i<100000; i++) { DFBColor color = { (u8)rand(), (u8)rand(), (u8)rand(), (u8)rand() }; dfb_state_set_color( &state, &color ); DFBRectangle rect = { (u8)rand()%100, (u8)rand()%100, (u8)rand()%100, (u8)rand()%100 }; renderer->FillRectangles( &rect, 1 ); } renderer->Flush(); dfb_surface_lock( dst ); allocation = dfb_surface_buffer_find_allocation( buffer, CSAID_CPU, CSAF_READ, true ); if (!allocation) { /* If no allocation exists, create one. */ ret = dfb_surface_pools_allocate( buffer, CSAID_CPU, CSAF_READ, &allocation ); if (ret) { D_DERROR( ret, "Core/SurfBuffer: Buffer allocation failed!\n" ); _exit(0); } } dfb_surface_unlock( dst ); lock_task = new LockTask(); lock_task->AddAccess( allocation, CSAF_READ ); lock_task->Flush(); D_INFO( "Waiting...\n" ); lock_task->Wait(); D_INFO( "Done.\n" ); lock_task->Done(); dest->Flip( dest, NULL, DSFLIP_NONE ); //sleep(5); now = direct_clock_get_abs_millis(); D_INFO( "Took %lld ms\n", now - ms ); ms = now; delete renderer; dfb_state_set_destination( &state, NULL ); dfb_state_destroy( &state ); } //error: dfb_core_destroy( core, false ); dest->Release( dest ); error_dest: /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_windows_watcher.c0000644000175000017500000001704512254435330016331 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include static const DirectFBPixelFormatNames( format_names ); static const DirectFBWindowCapabilitiesNames( caps_names ); static const DirectFBWindowOptionsNames( options_names ); /**********************************************************************************************************************/ static bool parse_command_line( int argc, char *argv[] ); /**********************************************************************************************************************/ static void dump_config( const DFBWindowConfig *config ) { D_INFO( " -> bounds %d,%d-%dx%d\n", DFB_RECTANGLE_VALS( &config->bounds ) ); D_INFO( " -> opacity %d\n", config->opacity ); D_INFO( " -> cursor flags 0x%08x\n", config->cursor_flags ); } /**********************************************************************************************************************/ static void Test_Watcher_WindowAdd( void *context, const DFBWindowInfo *info ) { D_INFO( "%s( ID %u )\n", __FUNCTION__, info->window_id ); D_INFO( " -> caps 0x%08x\n", info->caps ); D_INFO( " -> resource id 0x%016llx\n", (unsigned long long) info->resource_id ); D_INFO( " -> process id %d\n", info->process_id ); D_INFO( " -> instance id %d\n", info->instance_id ); D_INFO( " -> state 0x%08x\n", info->state.flags ); dump_config( &info->config ); } static void Test_Watcher_WindowRemove( void *context, DFBWindowID window_id ) { D_INFO( "%s( ID %u )\n", __FUNCTION__, window_id ); } static void Test_Watcher_WindowConfig( void *context, DFBWindowID window_id, const DFBWindowConfig *config, DFBWindowConfigFlags flags ) { D_INFO( "%s( ID %u )\n", __FUNCTION__, window_id ); D_INFO( " -> flags 0x%08x\n", flags ); D_INFO( " -> cursor flags 0x%08x\n", config->cursor_flags ); dump_config( config ); } static void Test_Watcher_WindowState( void *context, DFBWindowID window_id, const DFBWindowState *state ) { D_INFO( "%s( ID %u )\n", __FUNCTION__, window_id ); D_INFO( " -> flags 0x%08x\n", state->flags ); } static void Test_Watcher_WindowRestack( void *context, DFBWindowID window_id, unsigned int index ) { D_INFO( "%s( ID %u )\n", __FUNCTION__, window_id ); D_INFO( " -> index %u\n", index ); } static void Test_Watcher_WindowFocus( void *context, DFBWindowID window_id ) { D_INFO( "%s( ID %u )\n", __FUNCTION__, window_id ); } static DFBWindowsWatcher watcher = { .WindowAdd = Test_Watcher_WindowAdd, .WindowRemove = Test_Watcher_WindowRemove, .WindowConfig = Test_Watcher_WindowConfig, .WindowState = Test_Watcher_WindowState, .WindowRestack = Test_Watcher_WindowRestack, .WindowFocus = Test_Watcher_WindowFocus, }; /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb; IDirectFBWindows *windows; /* Initialize DirectFB including command line parsing. */ ret = DirectFBInit( &argc, &argv ); if (ret) { DirectFBError( "DirectFBInit() failed", ret ); return -1; } /* Parse the command line. */ if (!parse_command_line( argc, argv )) return -2; /* Create the super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { DirectFBError( "DirectFBCreate() failed", ret ); return -3; } ret = dfb->GetInterface( dfb, "IDirectFBWindows", NULL, NULL, (void**) &windows ); if (ret) { D_DERROR( ret, "IDirectFB::GetInterface( 'IDirectFBWindows' ) failed!\n" ); return -4; } ret = windows->RegisterWatcher( windows, &watcher, NULL ); if (ret) { D_DERROR( ret, "IDirectFBWindows::RegisterWatcher() failed!\n" ); return -5; } pause(); /* Release the windows interface. */ windows->Release( windows ); /* Release the super interface. */ dfb->Release( dfb ); return EXIT_SUCCESS; } /**********************************************************************************************************************/ static void print_usage (const char *prg_name) { fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Windows Watcher Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg_name); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, "\n"); } static bool parse_command_line( int argc, char *argv[] ) { int n; for (n = 1; n < argc; n++) { const char *arg = argv[n]; if (strcmp (arg, "-h") == 0 || strcmp (arg, "--help") == 0) { print_usage (argv[0]); return false; } if (strcmp (arg, "-v") == 0 || strcmp (arg, "--version") == 0) { fprintf (stderr, "dfbg version %s\n", DIRECTFB_VERSION); return false; } print_usage (argv[0]); return false; } return true; } DirectFB-1.7.7/tests/dfbtest_gl1.c0000644000175000017500000001606612254435330013607 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include typedef struct { IDirectFB *dfb; IDirectFBSurface *primary; IDirectFBGL2 *gl2; IDirectFBGL2Context *gl2context; IDirectFBEventBuffer *events; DFBDimension size; } Test; static DFBResult Initialize( Test *test, int *argc, char ***argv ) { DFBResult ret; DFBSurfaceDescription dsc; /* * Initialize DirectFB options */ ret = DirectFBInit( argc, argv ); if (ret) { D_DERROR( ret, "DirectFBInit() failed!\n" ); return ret; } /* * Create the super interface */ ret = DirectFBCreate( &test->dfb ); if (ret) { D_DERROR( ret, "DirectFBCreate() failed!\n" ); return ret; } /* * Retrieve the DirectFBGL2 API */ ret = test->dfb->GetInterface( test->dfb, "IDirectFBGL2", NULL, test->dfb, (void**) &test->gl2 ); if (ret) { D_DERROR( ret, "IDirectFB::GetInterface( 'IDirectFBGL2' ) failed!\n" ); return ret; } /* * Create an event buffer for all devices with these caps */ ret = test->dfb->CreateInputEventBuffer( test->dfb, DICAPS_KEYS | DICAPS_AXES, DFB_FALSE, &test->events ); if (ret) { D_DERROR( ret, "IDirectFB::CreateInputEventBuffer( DICAPS_KEYS | DICAPS_AXES ) failed!\n" ); return ret; } /* * Try to set our cooperative level to DFSCL_FULLSCREEN for exclusive access to the primary layer */ test->dfb->SetCooperativeLevel( test->dfb, DFSCL_FULLSCREEN ); /* * Create the primary surface */ dsc.flags = DSDESC_CAPS; dsc.caps = DSCAPS_PRIMARY | DSCAPS_TRIPLE; ret = test->dfb->CreateSurface( test->dfb, &dsc, &test->primary ); if (ret) { D_DERROR( ret, "IDirectFB::CreateSurface( DSCAPS_PRIMARY | DSCAPS_TRIPLE ) failed!\n" ); return ret; } /* * Get the size of the surface, clear and show it */ test->primary->GetSize( test->primary, &test->size.w, &test->size.h ); test->primary->Clear( test->primary, 0, 0, 0, 0 ); test->primary->Flip( test->primary, NULL, 0 ); /* * Create an OpenGL rendering context */ ret = test->gl2->CreateContext( test->gl2, NULL, &test->gl2context ); if (ret) { D_DERROR( ret, "IDirectFBGL2::CreateContext() failed!\n" ); return ret; } return DFB_OK; } static void Shutdown( Test *test ) { if (test->gl2context) test->gl2context->Release( test->gl2context ); if (test->gl2) test->gl2->Release( test->gl2 ); if (test->primary) test->primary->Release( test->primary ); if (test->events) test->events->Release( test->events ); if (test->dfb) test->dfb->Release( test->dfb ); } static DFBResult InitGL( Test *test ) { DFBResult ret; /* * Bind the OpenGL rendering context to our primary surface */ ret = test->gl2context->Bind( test->gl2context, test->primary, test->primary ); if (ret) { D_DERROR( ret, "IDirectFBGL2Context::Bind() failed!\n" ); return ret; } /* Set the clear color */ glClearColor( 1.0, 1.0, 1.0, 1.0 ); /* Setup the viewport */ glViewport( 0, 0, (GLint) test->size.w, (GLint) test->size.h ); /* Unbind the OpenGL rendering context */ test->gl2context->Unbind( test->gl2context ); return DFB_OK; } static DFBResult RenderGL( Test *test ) { DFBResult ret; /* * Bind the OpenGL rendering context to our primary surface */ ret = test->gl2context->Bind( test->gl2context, test->primary, test->primary ); if (ret) { D_DERROR( ret, "IDirectFBGL2Context::Bind() failed!\n" ); return ret; } /* Clear the buffer */ glClear( GL_COLOR_BUFFER_BIT ); /* Unbind the OpenGL rendering context */ test->gl2context->Unbind( test->gl2context ); return DFB_OK; } int main( int argc, char *argv[] ) { DFBResult ret; bool quit = false; Test test; memset( &test, 0, sizeof(test) ); ret = Initialize( &test, &argc, &argv ); if (ret) goto error; ret = InitGL( &test ); if (ret) goto error; /* * Main Loop */ while (!quit) { DFBInputEvent evt; ret = RenderGL( &test ); if (ret) goto error; /* * Show the rendered buffer */ test.primary->Flip( test.primary, NULL, DSFLIP_ONSYNC ); /* * Process events */ while (test.events->GetEvent( test.events, DFB_EVENT(&evt) ) == DFB_OK) { switch (evt.type) { case DIET_KEYPRESS: switch (evt.key_symbol) { case DIKS_ESCAPE: quit = true; break; default: ; } break; default: ; } } } error: Shutdown( &test ); return ret; } DirectFB-1.7.7/tests/dfbtest_mirror.c0000644000175000017500000001246412254435330014434 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include static int show_usage( const char *prg ) { fprintf( stderr, "Usage: %s \n", prg ); return -1; } int main( int argc, char *argv[] ) { int i; DFBResult ret; DFBSurfaceDescription desc; IDirectFB *dfb; IDirectFBImageProvider *provider = NULL; IDirectFBSurface *source = NULL; IDirectFBSurface *dest = NULL; const char *url = NULL; /* Parse arguments. */ for (i=1; iCreateImageProvider( dfb, url, &provider ); if (ret) { D_DERROR( ret, "DFBTest/Mirror: IDirectFB::CreateImageProvider( '%s' ) failed!\n", url ); goto out; } /* Get the surface description. */ ret = provider->GetSurfaceDescription( provider, &desc ); if (ret) { D_DERROR( ret, "DFBTest/Mirror: IDirectFBImageProvider::GetSurfaceDescription() failed!\n" ); goto out; } D_INFO( "DFBTest/Mirror: Source is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Create a surface for the image. */ ret = dfb->CreateSurface( dfb, &desc, &source ); if (ret) { D_DERROR( ret, "DFBTest/Mirror: IDirectFB::CreateSurface() failed!\n" ); goto out; } ret = provider->RenderTo( provider, source, NULL ); if (ret) { D_DERROR( ret, "DFBTest/Mirror: IDirectFBImageProvider::RenderTo() failed!\n" ); goto out; } desc.width = desc.width * 4 / 3; desc.height = desc.height * 4 / 3; D_INFO( "DFBTest/Mirror: Destination is %dx%d using %s\n", desc.width, desc.height, dfb_pixelformat_name(desc.pixelformat) ); /* Create a surface for the image. */ ret = dfb->CreateSurface( dfb, &desc, &dest ); if (ret) { D_DERROR( ret, "DFBTest/Mirror: IDirectFB::CreateSurface() failed!\n" ); goto out; } dest->Clear( dest, 0, 0, 0, 0 ); dest->SetColor( dest, 0xff, 0, 0, 0xff ); dest->FillRectangle( dest, 0, desc.height / 3, desc.width, desc.height / 3 ); dest->SetColor( dest, 0xff, 0xff, 0xff, 0xff ); dest->FillRectangle( dest, 0, desc.height / 3 * 2, desc.width, desc.height / 3 ); dest->SetDstColorKey( dest, 0xff, 0, 0 ); dest->SetBlittingFlags( dest, DSBLIT_FLIP_VERTICAL | DSBLIT_DST_COLORKEY ); //dest->Blit( dest, source, NULL, 0, 0 ); dest->StretchBlit( dest, source, NULL, NULL ); dest->Dump( dest, ".", "dfbtest_mirror" ); out: if (dest) dest->Release( dest ); if (source) source->Release( source ); if (provider) provider->Release( provider ); /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/dfbtest_layers.c0000644000175000017500000001640312313366376014427 00000000000000#include #include #include #include #include #include #include #include #define FONT DATADIR "/decker.dgiff" static IDirectFB *g_dfb; static IDirectFBScreen *g_screen; static IDirectFBFont *g_font; static DFBDimension g_screen_size; typedef struct { IDirectFBDisplayLayer *layer; IDirectFBSurface *surface; int dx; int dy; int x; int y; int width; int height; } Plane; static Plane g_planes[64]; static int g_plane_count; static DFBResult InitializeLayer( DFBDisplayLayerID layer_id, int width, int height, Plane *plane ) { static DFBColor colors[8] = { { 0xff, 0x00, 0x00, 0xff }, { 0xff, 0xff, 0x00, 0x00 }, { 0xff, 0xff, 0xff, 0x00 }, { 0xff, 0x00, 0xff, 0x00 }, { 0xff, 0xff, 0x00, 0xff }, { 0xff, 0x00, 0xff, 0xff }, { 0xff, 0xff, 0xff, 0xff }, { 0xff, 0x80, 0x80, 0x80 } }; DFBResult ret; DFBDisplayLayerConfig config; IDirectFBDisplayLayer *layer = NULL; IDirectFBSurface *surface = NULL; char buf[256]; DFBSurfacePixelFormat format = 0; D_INFO( "dfbtest_layers: Initializing layer with ID %d...\n", layer_id ); ret = g_dfb->GetDisplayLayer( g_dfb, layer_id, &layer ); if (ret) { D_DERROR( ret, "dfbtest_layers: IDirectFB::GetDisplayLayer() failed!\n" ); goto error; } ret = layer->SetCooperativeLevel( layer, DLSCL_EXCLUSIVE ); if (ret) { D_DERROR( ret, "dfbtest_layers: IDirectFBDisplayLayer::SetCooperativeLevel() failed!\n" ); goto error; } config.flags = DLCONF_PIXELFORMAT; // if ( layer_id == 1) // config.pixelformat = DSPF_NV12; // else config.pixelformat = DSPF_ARGB; if (layer->TestConfiguration( layer, &config, NULL ) == DFB_OK) format = config.pixelformat; else format = DSPF_RGB32; // if (layer->TestConfiguration( layer, &config, NULL ) == DFB_OK) { // format = DSPF_ARGB; // // config.options = DLOP_ALPHACHANNEL; // } // else config.options = DLOP_NONE; /* Fill in configuration. */ config.flags = DLCONF_BUFFERMODE | DLCONF_OPTIONS | DLCONF_SURFACE_CAPS; if (width && height) { config.flags |= DLCONF_WIDTH | DLCONF_HEIGHT; config.width = width; config.height = height; plane->x = (layer_id * 200) % (g_screen_size.w - width); plane->y = (layer_id * 200) % (g_screen_size.h - height); } else { plane->x = 0; plane->y = 0; } config.buffermode = DLBM_FRONTONLY; config.surface_caps = DSCAPS_NONE; if (format) { config.flags |= DLCONF_PIXELFORMAT; config.pixelformat = format; } /* Set new configuration. */ ret = layer->SetConfiguration( layer, &config ); if (ret) { D_DERROR( ret, "dfbtest_layers: IDirectFBDisplayLayer::SetConfiguration() failed!\n" ); goto error; } layer->SetOpacity( layer, 0xbb ); /* Get the layer surface. */ ret = layer->GetSurface( layer, &surface ); if (ret) { D_DERROR( ret, "dfbtest_layers: IDirectFBDisplayLayer::GetSurface() failed!\n" ); goto error; } surface->GetPixelFormat( surface, &format ); surface->GetSize( surface, &width, &height ); surface->SetDrawingFlags( surface, DSDRAW_SRC_PREMULTIPLY ); surface->SetColor( surface, colors[layer_id].r, colors[layer_id].g, colors[layer_id].b, 0xbb ); surface->FillRectangle( surface, 0, 0, width, height ); surface->SetColor( surface, colors[layer_id].r, colors[layer_id].g, colors[layer_id].b, 0x99 ); surface->FillRectangle( surface, 100, 100, width - 200, height - 200 ); surface->SetColor( surface, 0xff, 0xff, 0xff, 0xff ); surface->SetFont( surface, g_font ); snprintf( buf, sizeof(buf), "Plane %u %dx%d (%s)", layer_id, width, height, dfb_pixelformat_name(format) ); surface->DrawString( surface, buf, -1, 20, 20, DSTF_TOPLEFT ); surface->Flip( surface, NULL, DSFLIP_NONE ); plane->layer = layer; plane->surface = surface; plane->dx = (layer_id & 1) ? 1 : -1; plane->dy = (layer_id & 2) ? 1 : -1; plane->width = width; plane->height = height; return DFB_OK; error: if (layer) layer->Release( layer ); return ret; } static DFBEnumerationResult DisplayLayerCallback( DFBDisplayLayerID layer_id, DFBDisplayLayerDescription desc, void *callbackdata ) { if (InitializeLayer( layer_id, 400, 400, &g_planes[g_plane_count] ) == DFB_OK) { g_plane_count++; } else { D_INFO( "Layer id %d could not be set to 400x400, trying fullscreen\n", layer_id ); if (InitializeLayer( layer_id, 0, 0, &g_planes[g_plane_count] ) == DFB_OK) g_plane_count++; } return DFENUM_OK; } static void TickPlane( Plane *plane ) { if (plane->x == g_screen_size.w - plane->width) plane->dx = -1; else if (plane->x == 0) plane->dx = 1; if (plane->y == g_screen_size.h - plane->height) plane->dy = -1; else if (plane->y == 0) plane->dy = 1; plane->x += plane->dx; plane->y += plane->dy; plane->layer->SetScreenPosition( plane->layer, plane->x, plane->y ); plane->surface->Flip( plane->surface, 0, 0); } int main( int argc, char *argv[] ) { DFBResult ret; DFBFontDescription fdsc; int i; direct_initialize(); D_INFO( "dfbtest_layers: Starting test program...\n" ); ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "dfbtest_layers: DirectFBInit() failed!\n" ); return ret; } ret = DirectFBCreate( &g_dfb ); if (ret) { D_DERROR( ret, "dfbtest_layers: DirectFBCreate() failed!\n" ); return ret; } ret = g_dfb->GetScreen( g_dfb, DSCID_PRIMARY, &g_screen ); if (ret) { D_DERROR( ret, "dfbtest_layers: IDirectFB::GetScreen( PRIMARY ) failed!\n" ); return ret; } g_screen->GetSize( g_screen, &g_screen_size.w, &g_screen_size.h ); D_INFO( "dfbtest_layers: Screen size is %ux%u\n", g_screen_size.w, g_screen_size.h ); fdsc.flags = DFDESC_HEIGHT; fdsc.height = 18; ret = g_dfb->CreateFont( g_dfb, FONT, &fdsc, &g_font ); if (ret) { D_DERROR( ret, "dfbtest_layers: IDirectFB::CreateFont( %s ) failed!\n", FONT ); return ret; } g_dfb->EnumDisplayLayers( g_dfb, DisplayLayerCallback, NULL ); while (1) { for (i=0; iRelease( g_font ); g_dfb->Release( g_dfb ); direct_shutdown(); return 0; } DirectFB-1.7.7/tests/fusion_stream.c0000644000175000017500000004061112254435330014260 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef HAVE_FORK # define fork() -1 #endif #define MAX_NUM_BLOCKS 10000 #define SIZE_ALIGNMASK 0x3 #define ALIGN_SIZE(s) (((s) + SIZE_ALIGNMASK) & ~SIZE_ALIGNMASK) /**********************************************************************************************************************/ static int parse_cmdline ( int argc, char *argv[] ); static int show_usage ( void ); /**********************************************************************************************************************/ static inline unsigned long get_millis( void ) { struct timeval tv; gettimeofday( &tv, NULL ); return tv.tv_sec * 1000 + tv.tv_usec / 1000; } /**********************************************************************************************************************/ static unsigned int bit_rate; static bool run_busy; static bool do_fork; static bool do_thread; /**********************************************************************************************************************/ static long block_size = 184; static long num_blocks = 16; /**********************************************************************************************************************/ static int fuser, fnice, fsystem, fidle, ftotal; static int cuser, cnice, csystem, cidle, ctotal; static int puser, pnice, psystem, pidle, ptotal; static int duser, dnice, dsystem, didle, dtotal; static int read_stat( void ) { char dummy[4]; int wa = 0, hi = 0, si = 0; FILE *file; puser = cuser; pnice = cnice; psystem = csystem; pidle = cidle; ptotal = ctotal; file = fopen( "/proc/stat", "r" ); if (!file) { perror( "Could not open '/proc/stat'" ); return 0; } if (fscanf( file, "%3s %d %d %d %d %d %d %d", dummy, &cuser, &cnice, &csystem, &cidle, &wa, &hi, &si ) < 4) { fprintf( stderr, "Parsing '/proc/stat' failed!\n" ); return 0; } fclose( file ); /* Compatibility with 2.6 split up idle times. */ cidle += wa + hi + si; /* Count nice as idle. */ cidle += cnice; cnice = 0; ctotal = cuser + cnice + csystem + cidle; duser = cuser - puser; dnice = cnice - pnice; dsystem = csystem - psystem; didle = cidle - pidle; dtotal = ctotal - ptotal; if (!ftotal) { fuser = cuser; fnice = cnice; fsystem = csystem; fidle = cidle; ftotal = ctotal; } return 1; } /**********************************************************************************************************************/ static pthread_t busy_thread; static pthread_mutex_t busy_lock = PTHREAD_MUTEX_INITIALIZER; static unsigned int busy_alive = 1; static unsigned int busy_count; static void * busy_loop( void *arg ) { setpriority( PRIO_PROCESS, 0, 19 ); while (busy_alive) { int i; for (i=0; i<100000; i++); pthread_mutex_lock( &busy_lock ); busy_count++; pthread_mutex_unlock( &busy_lock ); } return NULL; } /**********************************************************************************************************************/ static FusionCallHandlerResult call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { static u32 checksum = 0; int i; const u32 *values = call_ptr; for (i=0; i MAX_NUM_BLOCKS) num_blocks = MAX_NUM_BLOCKS; if (!num_blocks) { num_blocks = 1; delay = 970 * block_size / (bit_rate * 1024 / 8) * 1000 - 2000; } } sync(); if (run_busy) { pthread_create( &busy_thread, NULL, busy_loop, NULL ); printf( "Calibrating...\n" ); pthread_mutex_lock( &busy_lock ); for (i=0; i<7; i++) { int busy_rate; busy_count = 0; t1 = get_millis(); pthread_mutex_unlock( &busy_lock ); usleep( 300000 ); pthread_mutex_lock( &busy_lock ); t2 = get_millis(); busy_rate = busy_count * 1000 / (t2 - t1); if (busy_rate > max_busy) max_busy = busy_rate; } printf( "Calibrating done. (%d busy counts/sec)\n", max_busy ); } ret = fusion_enter( -1, 23, FER_MASTER, &world ); if (ret) return ret; ret = fusion_call_init( &call, call_handler, NULL, world ); if (ret) return ret; ret = fusion_shm_pool_create( world, "Stream Buffer", block_size + 8192, false, &pool ); if (ret) return ret; ret = fusion_shm_pool_allocate( pool, block_size, false, true, &buffer ); if (ret) return ret; /* * Do the fork() magic! */ if (do_fork) { fusion_world_set_fork_action( world, FFA_FORK ); switch (fork()) { case -1: D_PERROR( "fork() failed!\n" ); return -1; case 0: /* child continues as the producer */ run_busy = false; break; default: /* parent is the consumer (callback in Fusion Dispatch thread) */ produce = false; usleep( 50000 ); } fusion_world_set_fork_action( world, FFA_CLOSE ); } start = t1 = get_millis(); if (run_busy) { busy_count = 0; pthread_mutex_unlock( &busy_lock ); } #ifdef LINUX_2_4 delay -= 10000; #endif do { if (bit_rate || !produce) { if (delay > 10) usleep( delay ); } if (produce) { for (i=0; i 2000) { if (produce) { long long kbits = 0, avgkbits, total_time, diff_time, diff_bytes; printf( "\n\n\n" ); total_time = t2 - start; diff_time = t2 - t1; diff_bytes = bytes - last_bytes; avgkbits = (long long)bytes * 8LL * 1000LL / (long long)total_time / 1024LL; if (diff_time) kbits = (long long)diff_bytes * 8LL * 1000LL / (long long)diff_time / 1024LL; printf( "Total Time: %7lld ms\n", total_time ); printf( "Stream Size: %7lld kb\n", bytes / 1024 ); printf( "Stream Rate: %7lld kb/sec -> %lld.%03lld MBit (avg. %lld.%03lld MBit)\n", kbits / 8, (kbits * 1000 / 1024) / 1000, (kbits * 1000 / 1024) % 1000, (avgkbits * 1000 / 1024) / 1000, (avgkbits * 1000 / 1024) % 1000 ); printf( "\n" ); if (last_bytes && bit_rate) { long long diff_bytes = (bytes - last_bytes) * 1000 / (t2 - t1); long long need_bytes = bit_rate * 1024 / 8; if (diff_bytes) { int new_blocks = (num_blocks * need_bytes + diff_bytes/2) / diff_bytes; num_blocks = (new_blocks + num_blocks + 1) / 2; if (num_blocks > MAX_NUM_BLOCKS) num_blocks = MAX_NUM_BLOCKS; } } read_stat(); if (ftotal != ctotal && dtotal) { int load, aload; load = 1000 - didle * 1000 / dtotal; aload = 1000 - (cidle - fidle) * 1000 / (ctotal - ftotal); printf( "Overall Stats\n" ); printf( " Total Time: %7lld ms\n", t2 - start ); printf( " Block Size: %7ld\n", block_size ); printf( " Blocks/cycle: %7ld\n", num_blocks ); printf( " Blocks/second: %7lld\n", (blocks - last_blocks) * 1000 / diff_time ); printf( " Delay: %7d\n", delay ); printf( " CPU Load: %5d.%d %% (avg. %d.%d %%)\n", load / 10, load % 10, aload / 10, aload % 10 ); } last_bytes = bytes; last_blocks = blocks; } if (run_busy) { pthread_mutex_lock( &busy_lock ); if (last_busy) { int busy_diff; int busy_rate, busy_load; int abusy_rate, abusy_load; busy_diff = busy_count - last_busy; busy_rate = max_busy - (busy_diff * 1000 / (t2 - t1)); busy_load = busy_rate * 1000 / max_busy; abusy_rate = max_busy - (busy_count * 1000 / (t2 - start)); abusy_load = abusy_rate * 1000 / max_busy; printf( " Real CPU Load: %5d.%d %% (avg. %d.%d %%)\n", busy_load / 10, busy_load % 10, abusy_load / 10, abusy_load % 10 ); } last_busy = busy_count; pthread_mutex_unlock( &busy_lock ); } t1 = t2; } } while (active > 0); if (run_busy) { busy_alive = 0; pthread_join( busy_thread, NULL ); } return -1; } /**********************************************************************************************************************/ static int parse_cmdline( int argc, char *argv[] ) { int i; char *end; for (i=1; i Size of each block of data\n" " -b <0-n> Designated bit rate in kbit (0 = unlimited)\n" " -B <0-n> Designated bit rate in Mbit (0 = unlimited)\n" " -c Run busy loop counting spare CPU cycles to get real CPU load\n" " -f Fork to have the producer in a separate process\n" " -t Force calls to be handled in a separate thread\n" "\n" ); return -1; } DirectFB-1.7.7/tests/dfbtest_font_blend.cpp0000644000175000017500000000277012313366376015604 00000000000000 #include <++dfb.h> #include "dfbapp.h" class DFBTestFontBlend : public DFBApp { private: IDirectFBFont font; /* called after initialization */ virtual bool Setup( int width, int height ) { DFBFontDescription desc; desc.flags = DFDESC_HEIGHT; desc.height = 256; font = m_dfb.CreateFont( FONT, desc ); return true; } /* render callback */ virtual void Render( IDirectFBSurface &surface ) { surface.Clear( 0, 0, 255, 255 ); surface.SetFont( font ); surface.SetColor( 0, 0, 0, 255 ); surface.SetSrcBlendFunction( DSBF_INVSRCALPHA ); surface.SetDstBlendFunction( DSBF_INVSRCALPHA ); surface.DrawString( "Test Text", -1, 10, 10, (DFBSurfaceTextFlags)(DSTF_TOPLEFT | DSTF_BLEND_FUNCS) ); } }; int main( int argc, char *argv[] ) { DFBTestFontBlend app; try { /* Initialize DirectFB command line parsing. */ DirectFB::Init( &argc, &argv ); /* Parse remaining arguments and run. */ if (app.Init( argc, argv )) app.Run(); } catch (DFBException *ex) { /* * Exception has been caught, destructor of 'app' will deinitialize * anything at return time (below) that got initialized until now. */ std::cerr << std::endl; std::cerr << "Caught exception!" << std::endl; std::cerr << " -- " << ex << std::endl; } return 0; } DirectFB-1.7.7/tests/dfbtest_window.c0000644000175000017500000011437712254435330014437 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include static const DirectFBPixelFormatNames( format_names ); static const DirectFBWindowCapabilitiesNames( caps_names ); static const DirectFBWindowOptionsNames( options_names ); /**********************************************************************************************************************/ static DFBWindowDescription m_desc_top = { /* .flags =*/ DWDESC_CAPS | DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_PIXELFORMAT | DWDESC_OPTIONS, /* .caps =*/ DWCAPS_NONE, /* .width =*/ 200, /* .height =*/ 200, /* .pixelformat =*/ DSPF_UNKNOWN, /* .posx =*/ 100, /* .posy =*/ 100, }; static DFBWindowDescription m_desc_sub = { /* .flags =*/ DWDESC_CAPS | DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_PIXELFORMAT | DWDESC_OPTIONS | DWDESC_TOPLEVEL_ID, /* .caps =*/ DWCAPS_NONE, /* .width =*/ 120, /* .height =*/ 120, /* .pixelformat =*/ DSPF_UNKNOWN, /* .posx =*/ 40, /* .posy =*/ 40, }; static struct { bool valid; DFBColor color; } m_topcolor, m_subcolor; static IDirectFBWindow *m_toplevel = NULL; static DFBWindowID m_toplevel_id = 0; static IDirectFBWindow *m_subwindow = NULL; static DFBWindowID m_subwindow_id = 0; static DFBBoolean m_wait_at_end = DFB_FALSE; /**********************************************************************************************************************/ typedef DFBResult (*TestFunc)( IDirectFBDisplayLayer *layer, void *arg ); /**********************************************************************************************************************/ static DFBResult Test_CreateWindow( IDirectFBDisplayLayer *layer, void *arg ); static DFBResult Test_CreateSubWindow( IDirectFBDisplayLayer *layer, void *arg ); /**********************************************************************************************************************/ static DFBResult Test_WarpCursor( IDirectFBDisplayLayer *layer, void *arg ); /**********************************************************************************************************************/ static DFBResult Test_MoveWindow( IDirectFBDisplayLayer *layer, void *arg ); static DFBResult Test_ScaleWindow( IDirectFBDisplayLayer *layer, void *arg ); /**********************************************************************************************************************/ static DFBResult Test_RestackWindow( IDirectFBDisplayLayer *layer, void *arg ); /**********************************************************************************************************************/ static DFBResult Test_SrcGeometry( IDirectFBDisplayLayer *layer, void *arg ); static DFBResult Test_DstGeometry( IDirectFBDisplayLayer *layer, void *arg ); /**********************************************************************************************************************/ static DFBResult Test_HideWindow( IDirectFBDisplayLayer *layer, void *arg ); static DFBResult Test_DestroyWindow( IDirectFBDisplayLayer *layer, void *arg ); /**********************************************************************************************************************/ typedef struct { const char *name; TestFunc func; bool run_top; bool run_sub; } Test; static Test m_tests[] = { { "WarpCursor", Test_WarpCursor }, { "Restack", Test_RestackWindow }, { "Move", Test_MoveWindow }, { "Scale", Test_ScaleWindow }, { "SrcGeometry", Test_SrcGeometry }, { "DstGeometry", Test_DstGeometry }, { "Hide", Test_HideWindow }, { "Destroy", Test_DestroyWindow }, }; /**********************************************************************************************************************/ static DFBResult RunTest( TestFunc func, const char *func_name, IDirectFBDisplayLayer *layer, void *arg ); /**********************************************************************************************************************/ static void ShowMessage( unsigned int ms, const char *name, const char *prefix, const char *format, ... ) D_FORMAT_PRINTF(4); #define SHOW_TEST(...) ShowMessage( 2000, __FUNCTION__, \ "===============================================================\n\n", __VA_ARGS__ ) #define SHOW_INFO(...) ShowMessage( 500, __FUNCTION__, "", __VA_ARGS__ ) #define SHOW_RESULT(...) ShowMessage( 3000, __FUNCTION__, "", __VA_ARGS__ ) /**********************************************************************************************************************/ static bool parse_command_line( int argc, char *argv[] ); /**********************************************************************************************************************/ int main( int argc, char *argv[] ) { DFBResult ret; int i; IDirectFB *dfb; IDirectFBDisplayLayer *layer; /* Initialize DirectFB including command line parsing. */ ret = DirectFBInit( &argc, &argv ); if (ret) { DirectFBError( "DirectFBInit() failed", ret ); return -1; } /* Parse the command line. */ if (!parse_command_line( argc, argv )) return -2; SHOW_INFO( "Starting up..." ); /* Create the super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { DirectFBError( "DirectFBCreate() failed", ret ); return -3; } /* Get the primary layer interface. */ ret = dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ); if (ret) { D_DERROR( ret, "IDirectFB::GetDisplayLayer() failed!\n" ); dfb->Release( dfb ); return -4; } if (!m_toplevel_id) RunTest( Test_CreateWindow, "CreateWindow", layer, NULL ); RunTest( Test_CreateSubWindow, "CreateSubWindow", layer, NULL ); for (i=0; iRelease( m_subwindow ); /* Release the top level. */ if (m_toplevel) m_toplevel->Release( m_toplevel ); /* Release the layer. */ layer->Release( layer ); /* Release the super interface. */ dfb->Release( dfb ); return EXIT_SUCCESS; } /**********************************************************************************************************************/ static void print_usage (const char *prg_name) { int i = 0; fprintf (stderr, "\n"); fprintf (stderr, "== DirectFB Window Test (version %s) ==\n", DIRECTFB_VERSION); fprintf (stderr, "\n"); fprintf (stderr, "Known pixel formats:\n"); while (format_names[i].format != DSPF_UNKNOWN) { DFBSurfacePixelFormat format = format_names[i].format; fprintf (stderr, " %-10s %2d bits, %d bytes", format_names[i].name, DFB_BITS_PER_PIXEL(format), DFB_BYTES_PER_PIXEL(format)); if (DFB_PIXELFORMAT_HAS_ALPHA(format)) fprintf (stderr, " ALPHA"); if (DFB_PIXELFORMAT_IS_INDEXED(format)) fprintf (stderr, " INDEXED"); if (DFB_PLANAR_PIXELFORMAT(format)) { int planes = DFB_PLANE_MULTIPLY(format, 1000); fprintf (stderr, " PLANAR (x%d.%03d)", planes / 1000, planes % 1000); } fprintf (stderr, "\n"); ++i; } fprintf (stderr, "\n"); fprintf (stderr, "Known window capabilities:\n"); for (i=0; caps_names[i].capability != DWCAPS_NONE; i++) fprintf (stderr, " %s\n", caps_names[i].name); fprintf (stderr, "\n"); fprintf (stderr, "Known window options:\n"); for (i=0; options_names[i].option != DWOP_NONE; i++) fprintf (stderr, " %s\n", options_names[i].name); fprintf (stderr, "\n"); fprintf (stderr, "\n"); fprintf (stderr, "Usage: %s [options]\n", prg_name); fprintf (stderr, "\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -h, --help Show this help message\n"); fprintf (stderr, " -v, --version Print version information\n"); fprintf (stderr, " -T, --top-level WindowID (skips top creation)\n"); fprintf (stderr, " -W, --wait-at-end Wait at the end (don't exit)\n"); fprintf (stderr, "\n"); fprintf (stderr, "Top window:\n"); fprintf (stderr, " -r, --run Run test (see list below)\n"); fprintf (stderr, " -p, --pos , Position (%d,%d)\n", m_desc_top.posx, m_desc_top.posy); fprintf (stderr, " -s, --size x Size (%dx%d)\n", m_desc_top.width, m_desc_top.height); fprintf (stderr, " -f, --format Pixel Format (%s)\n", dfb_pixelformat_name(m_desc_top.pixelformat)); fprintf (stderr, " -c, --caps Capabilities (NONE)\n"); fprintf (stderr, " -l, --color Fixed Color (NONE)\n"); fprintf (stderr, " -o, --option Options (NONE)\n"); fprintf (stderr, " -a, --associate Association (N/A)\n"); fprintf (stderr, "\n"); fprintf (stderr, "Sub window:\n"); fprintf (stderr, " -R, --sub-run Run test (see list below)\n"); fprintf (stderr, " -P, --sub-pos , Position (%d,%d)\n", m_desc_sub.posx, m_desc_sub.posy); fprintf (stderr, " -S, --sub-size x Size (%dx%d)\n", m_desc_sub.width, m_desc_sub.height); fprintf (stderr, " -F, --sub-format Format (%s)\n", dfb_pixelformat_name(m_desc_sub.pixelformat)); fprintf (stderr, " -C, --sub-caps Capabilities (NONE)\n"); fprintf (stderr, " -L, --sub-color Fixed Color (NONE)\n"); fprintf (stderr, " -O, --sub-option Options (NONE)\n"); fprintf (stderr, " -A, --sub-associate Association (N/A)\n"); fprintf (stderr, "\n"); fprintf (stderr, "Available tests:\n"); for (i=0; i8 || (end && *end!=0) ) { fprintf (stderr, "\nInvalid color specified!\n\n" ); return DFB_FALSE; } c.a = (l >> 24) ; c.r = (l >> 16) & 0xff; c.g = (l >> 8) & 0xff; c.b = (l ) & 0xff; *_c = c; return DFB_TRUE; } static DFBBoolean parse_option( const char *arg, DFBWindowOptions *_o ) { int i = 0; while (options_names[i].option != DWOP_NONE) { if (!direct_strncasecmp( arg, options_names[i].name, strlen(arg) )) { *_o |= options_names[i].option; return DFB_TRUE; } ++i; } fprintf (stderr, "\nInvalid options specified!\n\n" ); return DFB_FALSE; } static DFBBoolean parse_id( const char *arg, unsigned int *_id ) { if (sscanf( arg, "%u", _id ) != 1) { fprintf (stderr, "\nInvalid ID specified!\n\n" ); return DFB_FALSE; } return DFB_TRUE; } static bool parse_command_line( int argc, char *argv[] ) { int n; for (n = 1; n < argc; n++) { const char *arg = argv[n]; if (strcmp (arg, "-h") == 0 || strcmp (arg, "--help") == 0) { print_usage (argv[0]); return false; } if (strcmp (arg, "-v") == 0 || strcmp (arg, "--version") == 0) { fprintf (stderr, "dfbg version %s\n", DIRECTFB_VERSION); return false; } if (strcmp (arg, "-T") == 0 || strcmp (arg, "--top-level") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_id( argv[n], &m_toplevel_id )) return false; continue; } if (strcmp (arg, "-W") == 0 || strcmp (arg, "--wait-at-end") == 0) { m_wait_at_end = DFB_TRUE; continue; } if (strcmp (arg, "-r") == 0 || strcmp (arg, "--run") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_test( argv[n], false )) return false; continue; } if (strcmp (arg, "-p") == 0 || strcmp (arg, "--pos") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_position( argv[n], &m_desc_top.posx, &m_desc_top.posy )) return false; continue; } if (strcmp (arg, "-s") == 0 || strcmp (arg, "--size") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_size( argv[n], &m_desc_top.width, &m_desc_top.height )) return false; continue; } if (strcmp (arg, "-f") == 0 || strcmp (arg, "--format") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_format( argv[n], &m_desc_top.pixelformat )) return false; continue; } if (strcmp (arg, "-c") == 0 || strcmp (arg, "--caps") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_caps( argv[n], &m_desc_top.caps )) return false; continue; } if (strcmp (arg, "-l") == 0 || strcmp (arg, "--color") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_color( argv[n], &m_topcolor.color )) return false; m_topcolor.valid = true; continue; } if (strcmp (arg, "-o") == 0 || strcmp (arg, "--option") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_option( argv[n], &m_desc_top.options )) return false; continue; } if (strcmp (arg, "-a") == 0 || strcmp (arg, "--associate") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_id( argv[n], &m_desc_top.parent_id )) return false; // m_desc_top.flags |= DWDESC_PARENT; m_desc_top.options |= DWOP_FOLLOW_BOUNDS; continue; } if (strcmp (arg, "-R") == 0 || strcmp (arg, "--sub-run") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_test( argv[n], true )) return false; continue; } if (strcmp (arg, "-P") == 0 || strcmp (arg, "--sub-pos") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_position( argv[n], &m_desc_sub.posx, &m_desc_sub.posy )) return false; continue; } if (strcmp (arg, "-S") == 0 || strcmp (arg, "--sub-size") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_size( argv[n], &m_desc_sub.width, &m_desc_sub.height )) return false; continue; } if (strcmp (arg, "-F") == 0 || strcmp (arg, "--sub-format") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_format( argv[n], &m_desc_sub.pixelformat )) return false; continue; } if (strcmp (arg, "-C") == 0 || strcmp (arg, "--sub-caps") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_caps( argv[n], &m_desc_sub.caps )) return false; continue; } if (strcmp (arg, "-L") == 0 || strcmp (arg, "--sub-color") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_color( argv[n], &m_subcolor.color )) return false; m_subcolor.valid = true; continue; } if (strcmp (arg, "-O") == 0 || strcmp (arg, "--sub-option") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_option( argv[n], &m_desc_sub.options )) return false; continue; } if (strcmp (arg, "-A") == 0 || strcmp (arg, "--sub-associate") == 0) { if (++n == argc) { print_usage (argv[0]); return false; } if (!parse_id( argv[n], &m_desc_sub.parent_id )) return false; // m_desc_sub.flags |= DWDESC_PARENT; m_desc_sub.options |= DWOP_FOLLOW_BOUNDS; continue; } print_usage (argv[0]); return false; } return true; } /**********************************************************************************************************************/ static DFBResult RunTest( TestFunc func, const char *test_name, IDirectFBDisplayLayer *layer, void *arg ) { DFBResult ret; /* Run the actual test... */ ret = func( layer, arg ); if (ret) D_DERROR( ret, "RunTest: '%s' failed!\n", test_name ); return ret; } /**********************************************************************************************************************/ static void ShowMessage( unsigned int ms, const char *name, const char *prefix, const char *format, ... ) { char buf[512]; va_list ap; va_start( ap, format ); vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); direct_log_printf( NULL, "%s [[ %-30s ]] %s\n", prefix, name, buf ); direct_thread_sleep( ms * 1000 ); } /**********************************************************************************************************************/ #define _T(...) \ do { \ DFBResult ret = __VA_ARGS__; \ \ if (ret) { \ D_DERROR( ret, "Tests/Window: '%s' failed!\n", #__VA_ARGS__ ); \ return ret; \ } \ } while (0) /**********************************************************************************************************************/ static DFBResult Test_CreateWindow( IDirectFBDisplayLayer *layer, void *arg ) { IDirectFBSurface *surface = NULL; IDirectFBWindow *window; DFBWindowID window_id; DFBDimension size = { m_desc_top.width, m_desc_top.height }; D_ASSERT( m_toplevel_id == 0 ); /* * Create a new top level window */ SHOW_TEST( "CreateWindow( %d,%d - %dx%d %s, options 0x%08x )...", m_desc_top.posx, m_desc_top.posy, m_desc_top.width, m_desc_top.height, dfb_pixelformat_name( m_desc_top.pixelformat ), m_desc_top.options ); _T( layer->CreateWindow( layer, &m_desc_top, &window ) ); if (m_topcolor.valid) { DFBColor c = m_topcolor.color; SHOW_INFO( " - SetColor( 0x%02x, 0x%02x, 0x%02x, 0x%02x )...", c.r, c.g, c.b, c.a ); _T( window->SetColor( window, c.r, c.g, c.b, c.a ) ); } /* * Query its surface and clear it with light blue (if not input or color only) */ if (!(m_desc_top.caps & (DWCAPS_INPUTONLY | DWCAPS_COLOR) )) { SHOW_INFO( " - GetSurface()..." ); _T( window->GetSurface( window, &surface ) ); SHOW_INFO( " - Clear( 0x20, 0x50, 0xC0, 0xFF )..." ); _T( surface->Clear( surface, 0x20, 0x50, 0xC0, 0xFF ) ); _T( surface->SetColor( surface, 0x90, 0xF0, 0xC0, 0xFF ) ); _T( surface->DrawRectangle( surface, 0, 0, size.w, size.h ) ); _T( surface->FillRectangle( surface, size.w / 2, 1, 1, size.h - 2 ) ); _T( surface->FillRectangle( surface, 1, size.h / 2, size.w - 2, 1 ) ); } /* * Show the window */ SHOW_INFO( " - SetOpacity( 255 )..." ); _T( window->SetOpacity( window, 0xff ) ); /* * Query and print ID of new window */ SHOW_INFO( " - GetID()..." ); _T( window->GetID( window, &window_id ) ); /* * Set association of new window */ if (m_desc_top.parent_id) { SHOW_INFO( " - SetAssociation( %u )...", m_desc_top.parent_id ); _T( window->SetAssociation( window, m_desc_top.parent_id ) ); } /* * Set top level window ID (user hasn't specified one) */ m_toplevel_id = window_id; m_toplevel = window; SHOW_RESULT( "...CreateWindow( %d,%d - %dx%d %s ) done. => Top Window ID %u", m_desc_top.posx, m_desc_top.posy, m_desc_top.width, m_desc_top.height, dfb_pixelformat_name( m_desc_top.pixelformat ), window_id ); if (surface) surface->Release( surface ); return DFB_OK; } static DFBResult Test_CreateSubWindow( IDirectFBDisplayLayer *layer, void *arg ) { IDirectFBWindow *window; DFBWindowID window_id; DFBDimension size = { m_desc_sub.width, m_desc_sub.height }; D_ASSERT( m_toplevel_id != 0 ); /* Write window ID of top level into description */ m_desc_sub.toplevel_id = m_toplevel_id; /* * Create a new sub window with 75% width/height and positioned at 20,20 within top level window */ SHOW_TEST( "CreateWindow( %d,%d - %dx%d %s + toplevel ID %u, options 0x%08x )...", m_desc_sub.posx, m_desc_sub.posy, m_desc_sub.width, m_desc_sub.height, dfb_pixelformat_name( m_desc_sub.pixelformat ), m_desc_sub.toplevel_id, m_desc_top.options ); _T( layer->CreateWindow( layer, &m_desc_sub, &window ) ); if (m_subcolor.valid) { DFBColor c = m_subcolor.color; SHOW_INFO( " - SetColor( 0x%02x, 0x%02x, 0x%02x, 0x%02x )...", c.r, c.g, c.b, c.a ); _T( window->SetColor( window, c.r, c.g, c.b, c.a ) ); } /* * Query its surface and clear it with light gray (if not input or color only) */ if (!(m_desc_sub.caps & (DWCAPS_INPUTONLY | DWCAPS_COLOR) )) { IDirectFBSurface *surface; SHOW_INFO( " - GetSurface()..." ); _T( window->GetSurface( window, &surface ) ); SHOW_INFO( " - Clear( 0xC0, 0xC0, 0xC0, 0xFF )..." ); _T( surface->Clear( surface, 0xC0, 0xC0, 0xC0, 0xFF ) ); _T( surface->DrawRectangle( surface, 0, 0, size.w, size.h ) ); _T( surface->FillRectangle( surface, size.w / 2, 1, 1, size.h - 2 ) ); _T( surface->FillRectangle( surface, 1, size.h / 2, size.w - 2, 1 ) ); surface->Release( surface ); } /* * Show the window */ SHOW_INFO( " - SetOpacity( 255 )..." ); _T( window->SetOpacity( window, 0xff ) ); /* * Query and print ID of new window */ SHOW_INFO( " - GetID()..." ); _T( window->GetID( window, &window_id ) ); /* * Set association of new window */ if (m_desc_sub.parent_id) { SHOW_INFO( " - SetAssociation( %u )...", m_desc_sub.parent_id ); _T( window->SetAssociation( window, m_desc_sub.parent_id ) ); } /* * Set top level window ID (user hasn't specified one) */ m_subwindow_id = window_id; m_subwindow = window; SHOW_RESULT( "...CreateWindow( %d,%d - %dx%d %s + toplevel ID %u ) done. => Sub Window ID %u", m_desc_sub.posx, m_desc_sub.posy, m_desc_sub.width, m_desc_sub.height, dfb_pixelformat_name( m_desc_sub.pixelformat ), m_desc_sub.toplevel_id, window_id ); return DFB_OK; } static DFBResult Test_WarpCursor( IDirectFBDisplayLayer *layer, void *arg ) { int i; DFBPoint pos; /* * Warp the cursor */ _T( layer->SetCooperativeLevel( layer, DLSCL_ADMINISTRATIVE ) ); _T( layer->GetCursorPosition( layer, &pos.x, &pos.y ) ); { DFBPoint poss[] = { { pos.x - 40, pos.y - 40 }, { pos.x + 40, pos.y - 40 }, { pos.x + 40, pos.y + 40 }, { pos.x - 40, pos.y + 40 }, { pos.x , pos.y } }; for (i=0; iWarpCursor( layer, poss[i].x, poss[i].y ) ); SHOW_RESULT( "...WarpCursor( %4d,%4d - [%02d] ) done.", poss[i].x, poss[i].y, i ); } } return DFB_OK; } static DFBResult Test_MoveWindow( IDirectFBDisplayLayer *layer, void *arg ) { int i; DFBPoint pos; IDirectFBWindow *window; D_ASSERT( m_toplevel_id != 0 ); /* * Get the top level window */ _T( layer->GetWindow( layer, arg ? (unsigned long) arg : m_toplevel_id, &window ) ); window->GetPosition( window, &pos.x, &pos.y ); /* * Move the window */ { DFBPoint poss[] = { { pos.x - 40, pos.y - 40 }, { pos.x + 40, pos.y - 40 }, { pos.x + 40, pos.y + 40 }, { pos.x - 40, pos.y + 40 }, { pos.x , pos.y } }; for (i=0; iMoveTo( window, poss[i].x, poss[i].y ) ); SHOW_RESULT( "...MoveTo( %4d,%4d - [%02d] ) done.", poss[i].x, poss[i].y, i ); } } window->Release( window ); return DFB_OK; } static DFBResult Test_ScaleWindow( IDirectFBDisplayLayer *layer, void *arg ) { int i; IDirectFBWindow *window; DFBWindowOptions opts; DFBDimension size; D_ASSERT( m_toplevel_id != 0 ); /* * Get the top level window */ _T( layer->GetWindow( layer, arg ? (unsigned long) arg : m_toplevel_id, &window ) ); window->GetSize( window, &size.w, &size.h ); /* * Enable scaling */ _T( window->GetOptions( window, &opts ) ); _T( window->SetOptions( window, opts | DWOP_SCALE ) ); /* * Scale the window */ { DFBDimension sizes[] = { { size.w + 40, size.h }, { size.w + 40, size.h + 40 }, { size.w, size.h + 40 }, { size.w + 40, size.h - 40 }, { size.w - 40, size.h + 40 }, { size.w, size.h } }; for (i=0; iResize( window, sizes[i].w, sizes[i].h ) ); SHOW_RESULT( "...Resize( %4d,%4d - [%02d] ) done.", sizes[i].w, sizes[i].h, i ); } } /* * Restore options */ _T( window->SetOptions( window, opts ) ); window->Release( window ); return DFB_OK; } static DFBResult Test_RestackWindow( IDirectFBDisplayLayer *layer, void *arg ) { int i; IDirectFBWindow *window; D_ASSERT( m_toplevel_id != 0 ); /* * Get the top level window */ _T( layer->GetWindow( layer, arg ? (unsigned long) arg : m_toplevel_id, &window ) ); /* * Lower it a few times */ for (i=0; i<2; i++) { SHOW_TEST( "Lower() #%d...", i+1 ); _T( window->Lower( window ) ); SHOW_RESULT( "...Lower() #%d done.", i+1 ); } /* * Raise it a few times */ for (i=0; i<2; i++) { SHOW_TEST( "Raise() #%d...", i+1 ); _T( window->Raise( window ) ); SHOW_RESULT( "...Raise() #%d done.", i+1 ); } /* * Lower it to the bottom */ SHOW_TEST( "LowerToBottom()..." ); _T( window->LowerToBottom( window ) ); SHOW_RESULT( "...LowerToBottom() done." ); /* * Raise it to the top */ SHOW_TEST( "RaiseToTop()..." ); _T( window->RaiseToTop( window ) ); SHOW_RESULT( "...RaiseToTop() done." ); window->Release( window ); return DFB_OK; } static DFBResult Test_SrcGeometry( IDirectFBDisplayLayer *layer, void *arg ) { int i; IDirectFBWindow *window; DFBWindowGeometry geometry; DFBDimension size; D_ASSERT( m_toplevel_id != 0 ); /* * Get the top level window */ _T( layer->GetWindow( layer, arg ? (unsigned long) arg : m_toplevel_id, &window ) ); window->GetSize( window, &size.w, &size.h ); /* * Change source geometry */ { DFBRectangle rects[] = { { 0, 0, size.w / 2, size.h / 2 }, { size.w / 2, 0, size.w / 2, size.h / 2 }, { size.w / 2, size.h / 2, size.w / 2, size.h / 2 }, { 0, size.h / 2, size.w / 2, size.h / 2 } }; for (i=0; iSetSrcGeometry( window, &geometry ) ); SHOW_RESULT( "...SetSrcGeometry( %4d,%4d-%4dx%4d - [%02d] ) done.", DFB_RECTANGLE_VALS(&rects[i]), i ); } } SHOW_TEST( "SetSrcGeometry( DEFAULT )..." ); geometry.mode = DWGM_DEFAULT; _T( window->SetSrcGeometry( window, &geometry ) ); SHOW_RESULT( "...SetSrcGeometry( DEFAULT ) done." ); window->Release( window ); return DFB_OK; } static DFBResult Test_DstGeometry( IDirectFBDisplayLayer *layer, void *arg ) { int i; IDirectFBWindow *window; DFBWindowGeometry geometry; DFBDimension size; D_ASSERT( m_toplevel_id != 0 ); /* * Get the top level window */ _T( layer->GetWindow( layer, arg ? (unsigned long) arg : m_toplevel_id, &window ) ); window->GetSize( window, &size.w, &size.h ); /* * Change destination geometry */ { DFBRectangle rects[] = { { 0, 0, size.w / 2, size.h / 2 }, { size.w / 2, 0, size.w / 2, size.h / 2 }, { size.w / 2, size.h / 2, size.w / 2, size.h / 2 }, { 0, size.h / 2, size.w / 2, size.h / 2 } }; for (i=0; iSetDstGeometry( window, &geometry ) ); SHOW_RESULT( "...SetDstGeometry( %4d,%4d-%4dx%4d - [%02d] ) done.", DFB_RECTANGLE_VALS(&rects[i]), i ); } } SHOW_TEST( "SetDstGeometry( DEFAULT )..." ); geometry.mode = DWGM_DEFAULT; _T( window->SetDstGeometry( window, &geometry ) ); SHOW_RESULT( "...SetDstGeometry( DEFAULT ) done." ); window->Release( window ); return DFB_OK; } static DFBResult Test_HideWindow( IDirectFBDisplayLayer *layer, void *arg ) { IDirectFBWindow *window; D_ASSERT( m_toplevel_id != 0 ); /* * Get the top level window */ _T( layer->GetWindow( layer, arg ? (unsigned long) arg : m_toplevel_id, &window ) ); /* * Hide it */ SHOW_TEST( "SetOpacity( 0 )..." ); _T( window->SetOpacity( window, 0 ) ); SHOW_RESULT( "...SetOpacity( 0 ) done." ); /* * Show it again */ SHOW_TEST( "SetOpacity( 0xff )..." ); _T( window->SetOpacity( window, 0xff ) ); SHOW_RESULT( "...SetOpacity( 0xff ) done." ); window->Release( window ); return DFB_OK; } static DFBResult Test_DestroyWindow( IDirectFBDisplayLayer *layer, void *arg ) { IDirectFBWindow *window; D_ASSERT( m_toplevel_id != 0 ); /* * Get the top level window */ _T( layer->GetWindow( layer, arg ? (unsigned long) arg : m_toplevel_id, &window ) ); /* * Destroy it */ SHOW_TEST( "Destroy()..." ); _T( window->Destroy( window ) ); SHOW_RESULT( "...Destroy() done." ); window->Release( window ); return DFB_OK; } DirectFB-1.7.7/tests/fusion_skirmish.c0000644000175000017500000000725012254435330014620 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #if DIRECT_BUILD_DEBUGS #define MSG(x...) \ do { \ direct_log_printf( NULL, x ); \ } while (0) #else #define MSG(x...) \ do { \ } while (0) #endif static FusionWorld *m_world; int main( int argc, char *argv[] ) { DirectResult ret; FusionSkirmish skirmish; DirectFBInit( &argc, &argv ); ret = fusion_enter( -1, 0, FER_MASTER, &m_world ); if (ret) { D_DERROR( ret, "fusion_enter() failed" ); return ret; } MSG( "Entered world %d as master (FusionID %lu, pid %d)\n", fusion_world_index( m_world ), fusion_id( m_world ), getpid() ); MSG( "Initializing skirmish...\n" ); ret = fusion_skirmish_init( &skirmish, "Test", m_world ); if (ret) { D_DERROR( ret, "fusion_skirmish_init() failed\n" ); return -1; } MSG( "Locking skirmish...\n" ); ret = fusion_skirmish_prevail( &skirmish ); if (ret) { D_DERROR( ret, "fusion_skirmish_prevail() failed!\n" ); return -2; } MSG( "Waiting at skirmish...\n" ); ret = fusion_skirmish_wait( &skirmish, 10 ); if (ret != DR_TIMEOUT) { D_DERROR( ret, "fusion_skirmish_wait() did not timeout!\n" ); return -3; } MSG( "Unlocking skirmish...\n" ); ret = fusion_skirmish_dismiss( &skirmish ); if (ret) { D_DERROR( ret, "fusion_skirmish_dismiss() failed!\n" ); return -4; } MSG( "Exiting from world %d (FusionID %lu, pid %d)...\n", fusion_world_index( m_world ), fusion_id( m_world ), getpid() ); fusion_exit( m_world, false ); return 0; } DirectFB-1.7.7/tests/testman.c0000644000175000017500000006123212254435330013057 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #define MAX_WINDOWS 4 #define MAX_LAYOUTS 4 #define CHECK(x) \ do { \ DFBResult ret = (x); \ if (ret != DFB_OK) { \ DirectFBError(#x,ret); \ goto out; \ } \ } while (0) typedef struct __TestMan_TestManager TestManager; typedef struct __TestMan_Layout Layout; typedef struct __TestMan_Application Application; /**********************************************************************************************************************/ struct __TestMan_TestManager { int magic; IDirectFB *dfb; ISaWMan *saw; ISaWManManager *manager; SaWManScalingMode scaling_mode; SaWManWindowHandle windows[MAX_WINDOWS]; int num_windows; SaWManWindowHandle focus_window; const Layout *layouts[MAX_LAYOUTS]; int num_layouts; int current_layout; DirectLink *applications; }; struct __TestMan_Layout { void *data; void (*Relayout) ( TestManager *tm, void *layout_data ); void (*AddWindow) ( TestManager *tm, void *layout_data, SaWManWindowHandle window ); void (*RemoveWindow)( TestManager *tm, void *layout_data, SaWManWindowHandle window, int index ); }; struct __TestMan_Application { DirectLink link; int magic; const char *name; const char *program; const char *args; bool started; long long start_time; pid_t pid; SaWManProcess *process; }; /**********************************************************************************************************************/ static void AddApplication( TestManager *tm, const char *name, const char *program, const char *args ) { Application *app; D_MAGIC_ASSERT( tm, TestManager ); D_ASSERT( name != NULL ); D_ASSERT( program != NULL ); app = D_CALLOC( 1, sizeof(Application) ); if (!app) { D_OOM(); return; } app->name = name; app->program = program; app->args = args; direct_list_append( &tm->applications, &app->link ); D_MAGIC_SET( app, Application ); } static Application * LookupApplication( TestManager *tm, const char *name ) { Application *app; D_MAGIC_ASSERT( tm, TestManager ); D_ASSERT( name != NULL ); direct_list_foreach (app, tm->applications) { D_MAGIC_ASSERT( app, Application ); if (!strcmp( app->name, name )) return app; } return NULL; } static Application * LookupApplicationByPID( TestManager *tm, pid_t pid ) { Application *app; D_MAGIC_ASSERT( tm, TestManager ); direct_list_foreach (app, tm->applications) { D_MAGIC_ASSERT( app, Application ); if (app->pid == pid) return app; } return NULL; } /**********************************************************************************************************************/ static void MosaicRelayout( TestManager *tm, void *layout_data ) { int i; int hcenter; int vcenter; ISaWManManager *manager; DFBRectangle bounds[4]; DFBDimension size; D_MAGIC_ASSERT( tm, TestManager ); if (!tm->num_windows) return; manager = tm->manager; D_ASSERT( manager != NULL ); manager->Lock( manager ); manager->GetSize( manager, DWSC_MIDDLE, &size ); hcenter = (size.w / 2) & ~1; vcenter = size.h / 2; switch (tm->num_windows) { case 0: case 1: bounds[0].x = 0; bounds[0].y = 0; bounds[0].w = size.w; bounds[0].h = size.h; break; case 2: bounds[0].x = 0; bounds[0].y = 0; bounds[0].w = hcenter; bounds[0].h = size.h; bounds[1].x = hcenter; bounds[1].y = 0; bounds[1].w = size.w - hcenter; bounds[1].h = size.h; break; case 3: bounds[0].x = 0; bounds[0].y = 0; bounds[0].w = hcenter; bounds[0].h = vcenter; bounds[1].x = 0; bounds[1].y = vcenter; bounds[1].w = hcenter; bounds[1].h = size.h - vcenter; bounds[2].x = hcenter; bounds[2].y = 0; bounds[2].w = size.w - hcenter; bounds[2].h = size.h; break; case 4: bounds[0].x = 0; bounds[0].y = 0; bounds[0].w = hcenter; bounds[0].h = vcenter; bounds[1].x = 0; bounds[1].y = vcenter; bounds[1].w = hcenter; bounds[1].h = size.h - vcenter; bounds[2].x = hcenter; bounds[2].y = 0; bounds[2].w = size.w - hcenter; bounds[2].h = vcenter; bounds[3].x = hcenter; bounds[3].y = vcenter; bounds[3].w = size.w - hcenter; bounds[3].h = size.h - vcenter; break; default: D_BUG( "invalid number of windows (%d)", tm->num_windows ); break; } for (i=0; inum_windows; i++) { SaWManWindowHandle window = tm->windows[i]; SaWManWindowConfig config; SaWManWindowConfigFlags flags; flags = SWMCF_POSITION | SWMCF_SIZE; config.bounds = bounds[i]; manager->SetWindowConfig( manager, window, flags, &config ); } manager->QueueUpdate( manager, DWSC_MIDDLE, NULL ); manager->Unlock( manager ); } static void MosaicAddWindow( TestManager *tm, void *layout_data, SaWManWindowHandle window ) { ISaWManManager *manager; D_MAGIC_ASSERT( tm, TestManager ); manager = tm->manager; D_ASSERT( manager != NULL ); manager->Lock( manager ); tm->windows[tm->num_windows++] = window; manager->InsertWindow( manager, window, SAWMAN_WINDOW_NONE, SWMWR_TOP ); MosaicRelayout( tm, layout_data ); manager->Unlock( manager ); } static void MosaicRemoveWindow( TestManager *tm, void *layout_data, SaWManWindowHandle window, int index ) { ISaWManManager *manager; D_MAGIC_ASSERT( tm, TestManager ); manager = tm->manager; D_ASSERT( manager != NULL ); manager->Lock( manager ); /* Remove window from layout. */ manager->RemoveWindow( manager, window ); MosaicRelayout( tm, layout_data ); manager->Unlock( manager ); } static const Layout mosaic_layout = { data: NULL, Relayout: MosaicRelayout, AddWindow: MosaicAddWindow, RemoveWindow: MosaicRemoveWindow }; /**********************************************************************************************************************/ static DFBResult LayoutWindowAdd( TestManager *tm, SaWManWindowHandle window ) { const Layout *layout; D_MAGIC_ASSERT( tm, TestManager ); D_ASSERT( tm->current_layout >= 0 ); D_ASSERT( tm->current_layout < tm->num_layouts ); layout = tm->layouts[tm->current_layout]; D_ASSERT( layout != NULL ); D_ASSERT( layout->AddWindow != NULL ); if (tm->num_windows == MAX_WINDOWS) { D_WARN( "maximum number (%d) of managed windows exceeded", MAX_WINDOWS ); return DFB_LIMITEXCEEDED; } /* Set some default borders. */ //window->border_normal = 2; //window->border_fullscreen = 4; /* Call the layout implementation. */ layout->AddWindow( tm, layout->data, window ); return DFB_OK; } static DFBResult LayoutWindowRemove( TestManager *tm, SaWManWindowHandle window ) { int i; const Layout *layout; D_MAGIC_ASSERT( tm, TestManager ); D_ASSERT( tm->current_layout >= 0 ); D_ASSERT( tm->current_layout < tm->num_layouts ); layout = tm->layouts[tm->current_layout]; D_ASSERT( layout != NULL ); D_ASSERT( layout->RemoveWindow != NULL ); for (i=0; inum_windows; i++) { if (tm->windows[i] == window) break; } if (i == MAX_WINDOWS) { D_BUG( "could not find window %lx", window ); return DFB_BUG; } /* Remove window from our own list of managed windows. */ for (; inum_windows-1; i++) tm->windows[i] = tm->windows[i+1]; tm->windows[i] = SAWMAN_WINDOW_NONE; tm->num_windows--; /* Call the layout implementation. */ layout->RemoveWindow( tm, layout->data, window, i ); return DFB_OK; } /**********************************************************************************************************************/ static DirectResult start_request( void *context, const char *name, pid_t *ret_pid ) { TestManager *tm = context; Application *app; pid_t pid; const char *args[3]; D_INFO( "SaWMan/TestMan: Start request for '%s'!\n", name ); D_MAGIC_ASSERT( tm, TestManager ); D_ASSERT( name != NULL ); D_ASSERT( ret_pid != NULL ); app = LookupApplication( tm, name ); if (!app) return DFB_ITEMNOTFOUND; if (app->started && !waitpid( app->pid, NULL, WNOHANG )) { D_DEBUG( "Already running '%s' (%d)!", name, app->pid ); return DFB_BUSY; } app->started = true; app->start_time = direct_clock_get_millis(); pid = vfork(); switch (pid) { case -1: perror("vfork"); return DFB_FAILURE; case 0: setsid(); args[0] = app->program; args[1] = app->args; args[2] = NULL; execvp( app->program, (char**) args ); perror("execvp"); _exit(0); default: app->pid = pid; break; } *ret_pid = pid; return DFB_OK; } static DirectResult stop_request( void *context, pid_t pid, FusionID caller ) { TestManager *tm = context; Application *app; D_INFO( "SaWMan/TestMan: Stop request from Fusion ID 0x%lx for pid %d!\n", caller, pid ); D_MAGIC_ASSERT( tm, TestManager ); app = LookupApplicationByPID( tm, pid ); if (!app) return DFB_ITEMNOTFOUND; /* Already died before attaching? */ if (waitpid( app->pid, NULL, WNOHANG )) { app->started = false; app->pid = 0; return DFB_OK; } /* Not attached yet? */ if (!app->process) { D_ERROR( "Application with pid %d did not attach yet!\n", app->pid ); return DFB_NOCONTEXT; } /* FIXME: avoid signals */ kill( app->pid, 9 ); return DFB_OK; } static DirectResult process_added( void *context, SaWManProcess *process ) { TestManager *tm = context; Application *app; D_INFO( "SaWMan/TestMan: Process added (%d) [%lu]!\n", process->pid, process->fusion_id ); D_MAGIC_ASSERT( tm, TestManager ); app = LookupApplicationByPID( tm, process->pid ); if (!app) return DFB_ITEMNOTFOUND; if (app->process) { D_BUG( "Already attached '%s' (%d)!", app->name, app->pid ); return DFB_BUG; } app->process = process; return DFB_OK; } static DirectResult process_removed( void *context, SaWManProcess *process ) { TestManager *tm = context; Application *app; D_INFO( "SaWMan/TestMan: Process removed (%d) [%lu]!\n", process->pid, process->fusion_id ); D_MAGIC_ASSERT( tm, TestManager ); app = LookupApplicationByPID( tm, process->pid ); if (!app) return DFB_ITEMNOTFOUND; if (app->process != process) { D_BUG( "Process mismatch %p != %p of '%s' (%d)!", app->process, process, app->name, app->pid ); return DFB_BUG; } if (waitpid( app->pid, NULL, 0 ) < 0) perror("waitpid"); app->process = NULL; app->started = false; app->pid = 0; return DFB_OK; } static DirectResult input_filter( void *context, DFBInputEvent *event ) { int i; TestManager *tm = context; ISaWManManager *manager; // D_INFO( "SaWMan/TestMan: Input filter (%x)!\n", event->type ); D_MAGIC_ASSERT( tm, TestManager ); manager = tm->manager; D_ASSERT( manager != NULL ); manager->Lock( manager ); switch (event->type) { case DIET_KEYPRESS: switch (event->key_symbol) { case DIKS_F9: if (tm->num_windows > 1) { for (i=0; inum_windows; i++) { SaWManWindowHandle window = tm->windows[i]; if (window == tm->focus_window) { window = tm->windows[(i+1) % tm->num_windows]; manager->SwitchFocus( manager, window ); break; } } } manager->Unlock( manager ); return DFB_BUSY; case DIKS_F10: if (tm->num_layouts > 1) { const Layout *layout; if (++tm->current_layout == tm->num_layouts) tm->current_layout = 0; layout = tm->layouts[tm->current_layout]; D_ASSERT( layout != NULL ); D_ASSERT( layout->Relayout != NULL ); layout->Relayout( tm, layout->data ); } manager->Unlock( manager ); return DFB_BUSY; case DIKS_F11: tm->scaling_mode = (tm->scaling_mode == SWMSM_SMOOTH) ? SWMSM_STANDARD : SWMSM_SMOOTH; manager->SetScalingMode( manager, tm->scaling_mode ); manager->Unlock( manager ); return DFB_BUSY; default: break; } case DIET_KEYRELEASE: switch (event->key_symbol) { case DIKS_F9: case DIKS_F10: case DIKS_F11: manager->Unlock( manager ); return DFB_BUSY; default: break; } default: break; } manager->Unlock( manager ); return DFB_OK; } static DirectResult window_preconfig( void *context, SaWManWindowConfig *config ) { D_INFO( "SaWMan/TestMan: Window preconfig (%d,%d-%dx%d)!\n", DFB_RECTANGLE_VALS( &config->bounds ) ); return DFB_OK; } static DirectResult window_added( void *context, SaWManWindowInfo *info ) { DFBResult ret; TestManager *tm = context; D_MAGIC_ASSERT( tm, TestManager ); D_INFO( "SaWMan/TestMan: Window added (%d,%d-%dx%d)!\n", DFB_RECTANGLE_VALS( &info->config.bounds ) ); if (info->caps & DWCAPS_NODECORATION) return DFB_NOIMPL; /* to let sawman insert the window */ /* Already showing window? (reattaching) */ if (info->config.opacity) { /* Activate scaling. */ info->config.options |= DWOP_SCALE; ret = LayoutWindowAdd( tm, info->handle ); if (ret) return ret; } return DFB_OK; } static DirectResult window_removed( void *context, SaWManWindowInfo *info ) { D_INFO( "SaWMan/TestMan: Window removed (%d,%d-%dx%d)!\n", DFB_RECTANGLE_VALS( &info->config.bounds ) ); return DFB_OK; } static DirectResult window_reconfig( void *context, SaWManWindowReconfig *reconfig ) { DFBResult ret; TestManager *tm = context; SaWManWindowConfig *current; SaWManWindowConfig *request; D_MAGIC_ASSERT( tm, TestManager ); if (reconfig->caps & DWCAPS_NODECORATION) return DFB_OK; current = &reconfig->current; request = &reconfig->request; if (reconfig->flags & SWMCF_POSITION) { D_INFO( "SaWMan/TestMan: Window config - ignoring position (%d,%d)!\n", request->bounds.x, request->bounds.y ); reconfig->flags &= ~SWMCF_POSITION; } if (reconfig->flags & SWMCF_SIZE) { D_INFO( "SaWMan/TestMan: Window config - ignoring size (%dx%d)!\n", request->bounds.w, request->bounds.h ); reconfig->flags &= ~SWMCF_SIZE; } if (reconfig->flags & SWMCF_STACKING) { D_INFO( "SaWMan/TestMan: Window config - ignoring stacking (%d)!\n", request->stacking ); reconfig->flags &= ~SWMCF_STACKING; } if (reconfig->flags & SWMCF_OPACITY) { D_INFO( "SaWMan/TestMan: Window config - opacity change %d\n", request->opacity ); /* Show? */ if (request->opacity && !current->opacity) { /* Activate scaling. */ if ( !(reconfig->flags & SWMCF_OPTIONS) ) request->options = 0; /* if a flag is not set, corresponding field may not be initialised */ reconfig->flags |= SWMCF_OPTIONS; request->options |= DWOP_SCALE; ret = LayoutWindowAdd( tm, reconfig->handle ); if (ret) return ret; } /* Hide? */ else if (!request->opacity && current->opacity) { LayoutWindowRemove( tm, reconfig->handle ); } } return DFB_OK; } static DirectResult window_restack( void *context, SaWManWindowHandle handle, SaWManWindowHandle relative, SaWManWindowRelation relation ) { //~ if (window->caps & DWCAPS_NODECORATION) //~ return DFB_OK; D_INFO( "SaWMan/TestMan: Window restack - refusing!\n" ); return DFB_ACCESSDENIED; } static DirectResult switch_focus( void *context, SaWManWindowHandle window ) { TestManager *tm = context; D_MAGIC_ASSERT( tm, TestManager ); D_INFO( "SaWMan/TestMan: Switching focus to %lx\n", window ); tm->focus_window = window; return DFB_OK; } static DirectResult layer_reconfig( void *context, SaWManLayerReconfig *reconfig ) { TestManager *tm = context; DFBDisplayLayerConfig *config; DFBResult res; D_MAGIC_ASSERT( tm, TestManager ); D_ASSERT( reconfig ); config = &reconfig->config; D_INFO( "SaWMan/TestMan: Layer Reconfig signalled on layer %d:\n", reconfig->layer_id ); if (reconfig->single) { SaWManWindowInfo info; D_INFO( " going to single mode, window: %p\n", (void*)(reconfig->single) ); res = tm->manager->GetWindowInfo( tm->manager, reconfig->single, &info ); if (res == DFB_OK) D_INFO( " size: %dx%d\n", info.config.bounds.w, info.config.bounds.h ); } D_INFO( " requested layer size: %dx%d\n", config->width, config->height ); return DFB_OK; } static DirectResult application_id_changed( void *context, SaWManWindowInfo *info ) { TestManager *tm = context; D_MAGIC_ASSERT( tm, TestManager ); D_INFO( "SaWMan/TestMan: Application ID switched to %ld\n", info->application_id ); return DFB_OK; } static DirectResult change_focus( void *context, SaWManWindowHandle window, SaWManChangeFocusReason reason ) { TestManager *tm = context; D_MAGIC_ASSERT( tm, TestManager ); D_INFO( "SaWMan/TestMan: Changing focus (to %lx, reason %d)\n", window, reason ); tm->focus_window = window; return DFB_OK; } static const SaWManCallbacks callbacks = { Start: start_request, Stop: stop_request, ProcessAdded: process_added, ProcessRemoved: process_removed, InputFilter: input_filter, WindowPreConfig: window_preconfig, WindowAdded: window_added, WindowRemoved: window_removed, WindowReconfig: window_reconfig, WindowRestack: window_restack, //~ StackResized SwitchFocus: switch_focus, LayerReconfig: layer_reconfig, ApplicationIDChanged: application_id_changed, ChangeFocus: change_focus }; int main( int argc, char** argv ) { TestManager tm; D_INFO( "SaWMan/TestMan: Initializing...\n" ); memset( &tm, 0, sizeof(tm) ); tm.layouts[tm.num_layouts++] = &mosaic_layout; D_MAGIC_SET( &tm, TestManager ); AddApplication( &tm, "Penguins", "df_andi", "--dfb:mode=640x480,force-windowed" ); AddApplication( &tm, "Penguins2","df_andi", "--dfb:mode=640x480,force-windowed" ); AddApplication( &tm, "Penguins3","df_andi", "--dfb:mode=640x480,force-windowed" ); AddApplication( &tm, "Penguins4","df_andi", "--dfb:mode=640x480,force-windowed" ); AddApplication( &tm, "Windows", "df_window", NULL ); CHECK( DirectFBInit( &argc, &argv ) ); CHECK( DirectFBCreate( &tm.dfb ) ); CHECK( SaWManInit( &argc, &argv ) ); CHECK( SaWManCreate( &tm.saw ) ); CHECK( tm.saw->CreateManager( tm.saw, &callbacks, &tm, &tm.manager ) ); pause(); out: D_INFO( "SaWMan/TestMan: Shutting down...\n" ); if (tm.manager) tm.manager->Release( tm.manager ); if (tm.saw) tm.saw->Release( tm.saw ); if (tm.dfb) tm.dfb->Release( tm.dfb ); D_MAGIC_CLEAR( &tm ); return 0; } DirectFB-1.7.7/tests/dfbtest_blit2.c0000644000175000017500000001261012254435330014127 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include int main( int argc, char *argv[] ) { DFBResult ret; IDirectFB *dfb; DFBSurfaceDescription desc; IDirectFBSurface *dst; IDirectFBSurface *src; IDirectFBSurface *src2; DFBColor red = { 0xC0, 0xc0, 0x00, 0x00 }; // premultiplied DFBColor blue = { 0xC0, 0x00, 0x00, 0xc0 }; // " DFBColor white = { 0xFF, 0xff, 0xff, 0xff }; // " DFBRectangle rect = { 0, 0, 100, 100 }; DFBPoint p_dst = { 0, 0 }; DFBPoint p_src = { 50, 50 }; /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/Blit2: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "DFBTest/Blit2: DirectFBCreate() failed!\n" ); return ret; } /* * This test creates three surfaces: * * dst .--------. src .--------. src2 .-------------. * | | | | | | | * | | | red | | blue | | * | | | | | | | * '--------' '--------' |--------' | * | white | * 100x100 100x100 '-------------' * * 150x150 */ desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT; desc.width = 100; desc.height = 100; desc.pixelformat = DSPF_ARGB; ret = dfb->CreateSurface( dfb, &desc, &dst ); if (ret) { D_DERROR( ret, "DFBTest/Blit2: CreateSurface(dst) failed!\n" ); goto error_dst; } dst->Clear( dst, 0, 0, 0, 0 ); ret = dfb->CreateSurface( dfb, &desc, &src ); if (ret) { D_DERROR( ret, "DFBTest/Blit2: CreateSurface(src) failed!\n" ); goto error_src; } desc.width = 150; desc.height = 150; ret = dfb->CreateSurface( dfb, &desc, &src2 ); if (ret) { D_DERROR( ret, "DFBTest/Blit2: CreateSurface(src2) failed!\n" ); goto error_src2; } /* Fill source with red */ src->Clear( src, red.r, red.g, red.b, red.a ); src->Dump( src, "/", "dfbtest_blit2_src" ); /* Fill source2 with blue/white */ src2->Clear( src2, white.r, white.g, white.b, white.a ); src2->SetColor( src2, blue.r, blue.g, blue.b, blue.a ); src2->FillRectangles( src2, &rect, 1 ); src2->Dump( src2, "/", "dfbtest_blit2_src2" ); /* * Setup dual source blit */ dst->SetBlittingFlags( dst, DSBLIT_BLEND_ALPHACHANNEL ); dst->SetPorterDuff( dst, DSPD_SRC_OVER ); /* * Perform dual source blit * * 100x100 at 0,0 * * reading src at 0, 0 * reading src2 at 50,50 * * * Result should be: * * .-------------. * | red- | | * | blue | | * | | | * |------' | * | | * | red- | * | white | * '-------------' * * 100x100 */ dst->BatchBlit2( dst, src, src2, &rect, &p_dst, &p_src, 1 ); dst->Dump( dst, "/", "dfbtest_blit2_dst" ); src2->Release( src2 ); error_src2: src->Release( src ); error_src: dst->Release( dst ); error_dst: /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; } DirectFB-1.7.7/tests/fdtest_bench.c0000644000175000017500000001030412254435330014026 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include static char *enter_coma = "FDTestComa"; /**********************************************************************************************************************/ static void method_func( void *ctx, ComaMethodID method, void *arg, unsigned int magic ) { IComaComponent **component = ctx; (*component)->Return( (*component), 0, magic ); } /**********************************************************************************************************************/ #define NUM_ITEMS 2000000 int main( int argc, char *argv[] ) { DirectResult ret; IFusionDale *dale = NULL; IComa *coma = NULL; IComaComponent *component = NULL; /* Initialize FusionDale including command line parsing. */ ret = FusionDaleInit( &argc, &argv ); if (ret) { D_DERROR( ret, "FusionDale/Master: FusionDaleInit() failed!\n" ); goto out; } /* Create the super interface. */ ret = FusionDaleCreate( &dale ); if (ret) { D_DERROR( ret, "FusionDale/Master: FusionDaleCreate() failed!\n" ); goto out; } ret = dale->EnterComa( dale, enter_coma, &coma ); if (ret) { D_DERROR( ret, "FusionDale/Master: IFusionDale::EnterComa( '%s' ) failed!\n", enter_coma ); goto out; } if (argc > 1) { coma->GetComponent( coma, "Test", 5000, &component ); void *mem; coma->GetLocal( coma, 99, &mem ); DirectClock clock; int counter = 0; int retval; direct_clock_start( &clock ); do { component->Call( component, 1, mem, &retval ); counter++; } while (counter < NUM_ITEMS); direct_clock_stop( &clock ); D_INFO( "Voodoo/Test: Stopped after %lld.%03lld seconds... (%lld items/sec)\n", DIRECT_CLOCK_DIFF_SEC_MS( &clock ), NUM_ITEMS * 1000000ULL / direct_clock_diff( &clock ) ); coma->FreeLocal( coma ); } else { coma->CreateComponent( coma, "Test", method_func, 0, &component, &component ); component->Activate( component ); pause(); } out: /* Release the component manager. */ if (coma) coma->Release( coma ); /* Release the super interface. */ if (dale) dale->Release( dale ); return ret; } DirectFB-1.7.7/tests/divine_test.c0000644000175000017500000000141612254435330013717 00000000000000#include #include #include int main( int argc, char *argv[] ) { int i; DiVine *divine; const char *msg = "DiVine Test!"; int len = strlen( msg ); /* open the connection to the input driver */ divine = divine_open( "/tmp/divine" ); if (!divine) return -1; /* wait a bit */ sleep( 3 ); /* write a string */ for (i=0; i, Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #ifndef HAVE_FORK # define fork() -1 #endif #define MSG(x...) \ do { \ direct_log_printf( NULL, "- " x ); \ } while (0) typedef struct { unsigned int foo; } TestMessage; static FusionWorld *m_world; static FusionRef m_ref; static FusionReactor *m_reactor; static Reaction m_reaction; static ReactionResult reaction_callback( const void *msg_data, void *ctx ) { MSG( "Received message (FusionID %lu, pid %d)!\n", fusion_id( m_world ), getpid() ); return RS_OK; } int main( int argc, char *argv[] ) { DirectResult ret; pid_t child_pid; TestMessage message = {0}; DirectFBInit( &argc, &argv ); ret = fusion_enter( -1, 0, FER_MASTER, &m_world ); if (ret) { D_DERROR( ret, "fusion_enter() failed" ); return ret; } MSG( "Entered world %d as master (FusionID %lu, pid %d)\n", fusion_world_index( m_world ), fusion_id( m_world ), getpid() ); ret = fusion_ref_init( &m_ref, "Test", m_world ); if (ret) { D_DERROR( ret, "fusion_ref_init() failed" ); return -1; } MSG( "Adding local reference...\n" ); fusion_ref_up( &m_ref, false ); m_reactor = fusion_reactor_new( sizeof(TestMessage), "Test", m_world ); if (!m_reactor) { D_ERROR( "fusion_reactor_new() failed\n" ); return -1; } MSG( "Attaching to reactor...\n" ); ret = fusion_reactor_attach( m_reactor, reaction_callback, NULL, &m_reaction ); if (ret) { D_DERROR( ret, "fusion_reactor_attach() failed" ); return ret; } MSG( ".........FORKING NOW.........\n" ); fusion_world_set_fork_action( m_world, FFA_FORK ); child_pid = fork(); fusion_world_set_fork_action( m_world, FFA_CLOSE ); switch (child_pid) { case -1: D_PERROR( "fork() failed" ); break; case 0: setsid(); MSG( "...arrived after fork() in child (pid %d)..\n", getpid() ); MSG( "..child (FusionID %lu).\n", fusion_id( m_world ) ); break; default: usleep( 200000 ); MSG( "...returned from fork() in parent, child pid %d.\n", child_pid ); break; } MSG( "Sending message via reactor...\n" ); fusion_reactor_dispatch( m_reactor, &message, true, NULL ); usleep( 200000 ); MSG( "Removing local reference...\n" ); fusion_ref_down( &m_ref, false ); usleep( 200000 ); MSG( "Exiting from world %d (FusionID %lu, pid %d)...\n", fusion_world_index( m_world ), fusion_id( m_world ), getpid() ); fusion_exit( m_world, false ); return 0; } DirectFB-1.7.7/tests/fusion_call_bench.c0000644000175000017500000001141512254435330015037 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This file is subject to the terms and conditions of the MIT License: 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "config.h" #include #include #include #include #include #include #include #include #include #ifndef HAVE_FORK # define fork() -1 #endif static bool sync_calls; /**********************************************************************************************************************/ static int parse_cmdline ( int argc, char *argv[] ); static int show_usage ( void ); /**********************************************************************************************************************/ static FusionCallHandlerResult call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { *ret_val = 0; // if (call_arg) // exit(0); return FCHR_RETURN; } /**********************************************************************************************************************/ #define NUM_ITEMS 300000 int main( int argc, char *argv[] ) { DirectResult ret; DirectClock clock; FusionWorld *world; sigset_t block; FusionCall call = { 0 }; int retcall; int i; if (parse_cmdline( argc, argv )) return -1; ret = fusion_enter( 0, 23, FER_ANY, &world ); if (ret) return ret; ret = fusion_call_init( &call, call_handler, NULL, world ); if (ret) return ret; /* * Do the fork() magic! */ fusion_world_set_fork_action( world, FFA_FORK ); pid_t f = fork(); if (f == -1) { D_PERROR( "fork() failed!\n" ); return -1; } fusion_world_set_fork_action( world, FFA_CLOSE ); if (f) { /* we rely on exit() */ sigemptyset( &block ); sigsuspend( &block ); } direct_clock_start( &clock ); for (i=0; i/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="include/directfb.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS BUILD_DVC_FALSE BUILD_DVC_TRUE SYSCONFDIR GENERIC_INCLUDEDIR INTERNALINCLUDEDIR INCLUDEDIR MODULEDIRNAME MODULEDIR DATADIR FREETYPE_PROVIDER PNG_PROVIDER LIBMNG MNG_PROVIDER LIBJPEG JPEG_PROVIDER GIF_PROVIDER DFB_INTERNAL_CFLAGS DFB_LDFLAGS DFB_CFLAGS_OMIT_FRAME_POINTER HAVE_LINUX SOPATH BUILD_STATIC_FALSE BUILD_STATIC_TRUE BUILD_SHARED_FALSE BUILD_SHARED_TRUE CROSS_COMPILING_FALSE CROSS_COMPILING_TRUE BUILD_TOOLS_FALSE BUILD_TOOLS_TRUE BUILD_TESTS_FALSE BUILD_TESTS_TRUE WM97XX_TS_FALSE WM97XX_TS_TRUE UCB1X00_TS_FALSE UCB1X00_TS_TRUE TSLIB_FALSE TSLIB_TRUE SONYPI_FALSE SONYPI_TRUE SERIAL_MOUSE_INPUT_FALSE SERIAL_MOUSE_INPUT_TRUE PS2MOUSE_INPUT_FALSE PS2MOUSE_INPUT_TRUE PENMOUNT_TS_FALSE PENMOUNT_TS_TRUE ZYTRONIC_TS_FALSE ZYTRONIC_TS_TRUE MUTOUCH_TS_FALSE MUTOUCH_TS_TRUE LIRC_INPUT_FALSE LIRC_INPUT_TRUE LINUX_INPUT_FALSE LINUX_INPUT_TRUE KEYBOARD_INPUT_FALSE KEYBOARD_INPUT_TRUE JOYSTICK_INPUT_FALSE JOYSTICK_INPUT_TRUE INPUT_HUB_FALSE INPUT_HUB_TRUE H3600_TS_FALSE H3600_TS_TRUE GUNZE_INPUT_FALSE GUNZE_INPUT_TRUE ELO_INPUT_FALSE ELO_INPUT_TRUE DYNAPRO_INPUT_FALSE DYNAPRO_INPUT_TRUE DREAMBOXREMOTE_FALSE DREAMBOXREMOTE_TRUE DBOX2REMOTE_FALSE DBOX2REMOTE_TRUE SH772X_SHJPEG_FALSE SH772X_SHJPEG_TRUE GFX_VDPAU_FALSE GFX_VDPAU_TRUE GFX_VMWARE_FALSE GFX_VMWARE_TRUE GFX_UNICHROME_FALSE GFX_UNICHROME_TRUE GFX_TDFX_FALSE GFX_TDFX_TRUE GFX_SIS315_FALSE GFX_SIS315_TRUE GFX_SH772X_FALSE GFX_SH772X_TRUE GFX_SAVAGE_FALSE GFX_SAVAGE_TRUE GFX_RADEON_FALSE GFX_RADEON_TRUE GFX_PXA3XX_FALSE GFX_PXA3XX_TRUE GFX_PVR2D_FALSE GFX_PVR2D_TRUE GFX_OMAP_FALSE GFX_OMAP_TRUE GFX_NVIDIA_FALSE GFX_NVIDIA_TRUE GFX_NSC_FALSE GFX_NSC_TRUE GFX_NEOMAGIC_FALSE GFX_NEOMAGIC_TRUE GFX_MATROX_FALSE GFX_MATROX_TRUE GFX_MACH64_FALSE GFX_MACH64_TRUE GFX_I830_FALSE GFX_I830_TRUE GFX_I810_FALSE GFX_I810_TRUE GFX_GLX_FALSE GFX_GLX_TRUE GFX_GLES2_FALSE GFX_GLES2_TRUE GFX_GL_FALSE GFX_GL_TRUE GFX_GP2D_FALSE GFX_GP2D_TRUE GFX_EP9X_FALSE GFX_EP9X_TRUE GFX_DAVINCI_FALSE GFX_DAVINCI_TRUE GFX_CYBER5K_FALSE GFX_CYBER5K_TRUE GFX_CLE266_FALSE GFX_CLE266_TRUE GFX_ATI128_FALSE GFX_ATI128_TRUE DIRECTFB_CSOURCE RUNTIME_SYSROOT FUSION_MESSAGE_SIZE FLUXED_ARGS_BYTES VOODOO_BUILD_NO_SETSOCKOPT DFB_SMOOTH_SCALING SOFTWARE_RENDERING_FALSE SOFTWARE_RENDERING_TRUE TSLIB_LIBS TSLIB_CFLAGS SH772X_SHJPEG_DEP_LIBS SH772X_SHJPEG_DEP_CFLAGS SH772X_DEP_LIBS SH772X_DEP_CFLAGS GLES2_CFLAGS GLES2_LIBS GL_LIBS GP2D_CFLAGS GP2D_LIBS WEBP_PROVIDER_FALSE WEBP_PROVIDER_TRUE LIBWEBP_LIBS LIBWEBP_CFLAGS V4L_PROVIDER_FALSE V4L_PROVIDER_TRUE LINOTYPE_PROVIDER_FALSE LINOTYPE_PROVIDER_TRUE LINOTYPE_LIBS LINOTYPE_CFLAGS FREETYPE_PROVIDER_FALSE FREETYPE_PROVIDER_TRUE FREETYPE_LIBS FREETYPE_CFLAGS BUILD_FFMPEG_FALSE BUILD_FFMPEG_TRUE FFMPEG_PROVIDER_FALSE FFMPEG_PROVIDER_TRUE FFMPEG_LIBS FFMPEG_CFLAGS SWFDEC_PROVIDER_FALSE SWFDEC_PROVIDER_TRUE SWFDEC_LIBS SWFDEC_CFLAGS XINE_VDPAU_PROVIDER_FALSE XINE_VDPAU_PROVIDER_TRUE XINE_VDPAU_PLUGINDIR XINE_VDPAU_LIBS XINE_VDPAU_CFLAGS XINE_PROVIDER_FALSE XINE_PROVIDER_TRUE XINE_PLUGINDIR XINE_LIBS XINE_CFLAGS XINE_CONFIG FLASH_PROVIDER_FALSE FLASH_PROVIDER_TRUE FLASH_LIBS LIBMPEG3_LIBS LIBMPEG3_PROVIDER_FALSE LIBMPEG3_PROVIDER_TRUE AVIFILE_PROVIDER_FALSE AVIFILE_PROVIDER_TRUE AVIFILE_LIBS AVIFILE_CFLAGS AVIFILE_CONFIG OPENQUICKTIME_PROVIDER_FALSE OPENQUICKTIME_PROVIDER_TRUE OPENQUICKTIME_LIBS JPEG2000_FALSE JPEG2000_TRUE JASPER_LIBS BMP_FALSE BMP_TRUE MPEG2_FALSE MPEG2_TRUE SVG_FALSE SVG_TRUE SVG_LIBS SVG_CFLAGS PNM_FALSE PNM_TRUE IMLIB2_FALSE IMLIB2_TRUE IMLIB2_CFLAGS IMLIB2_LIBS IMLIB2_CONFIG TIFF_PROVIDER_FALSE TIFF_PROVIDER_TRUE LIBTIFF_LIBS LIBTIFF_CFLAGS GIF_PROVIDER_FALSE GIF_PROVIDER_TRUE GSTREAMER_INCL GSTREAMER_LIBS GSTREAMER_PROVIDER_FALSE GSTREAMER_PROVIDER_TRUE MNG_PROVIDER_FALSE MNG_PROVIDER_TRUE BUILD_DIRECTFB_CSOURCE_FALSE BUILD_DIRECTFB_CSOURCE_TRUE PNG_PROVIDER_FALSE PNG_PROVIDER_TRUE LIBPNG_LIBS LIBPNG_CFLAGS ZLIB_LIBS JPEG_PROVIDER_FALSE JPEG_PROVIDER_TRUE DRMKMS_CORE_FALSE DRMKMS_CORE_TRUE DRMKMS_LIBS DRMKMS_CFLAGS MESA_CORE_FALSE MESA_CORE_TRUE MESA_LIBS MESA_CFLAGS VNC_CFLAGS VNC_LIBS VNC_CORE_FALSE VNC_CORE_TRUE VNC_CONFIG SDL_CORE_FALSE SDL_CORE_TRUE OSX_LIBS SDL_LIBS SDL_CFLAGS FBDEV_CORE_FALSE FBDEV_CORE_TRUE DEVMEM_CORE_FALSE DEVMEM_CORE_TRUE IDIRECTFBGL_EGL_FALSE IDIRECTFBGL_EGL_TRUE EGL_CORE_FALSE EGL_CORE_TRUE EGL_LIBS EGL_CFLAGS PVR2D_CFLAGS PVR2D_LIBS PVR2D_CORE_FALSE PVR2D_CORE_TRUE BUILDMMX_FALSE BUILDMMX_TRUE CXXSTD ENABLE_UNIQUE_FALSE ENABLE_UNIQUE_TRUE ENABLE_DIVINE_FALSE ENABLE_DIVINE_TRUE ENABLE_FUSIONSOUND_FALSE ENABLE_FUSIONSOUND_TRUE ENABLE_FUSIONDALE_FALSE ENABLE_FUSIONDALE_TRUE ENABLE_SAWMAN_FALSE ENABLE_SAWMAN_TRUE ENABLE_VOODOO_FALSE ENABLE_VOODOO_TRUE ENABLE_ONE_FALSE ENABLE_ONE_TRUE FUSION_BUILD_KERNEL FUSION_BUILD_MULTI ENABLE_MULTI_FALSE ENABLE_MULTI_TRUE LIBM DEP_VOODOO DEP_ONE DIRECTFB_BUILD_PURE_VOODOO_FALSE DIRECTFB_BUILD_PURE_VOODOO_TRUE DIRECTFB_BUILD_PURE_VOODOO DIRECTFB_BUILD_VOODOO_FALSE DIRECTFB_BUILD_VOODOO_TRUE DIRECTFB_BUILD_VOODOO DIRECTFB_BUILD_ONE_FALSE DIRECTFB_BUILD_ONE_TRUE DIRECTFB_BUILD_ONE BUILD_PLAYLIST_FALSE BUILD_PLAYLIST_TRUE BUILD_CDDA_FALSE BUILD_CDDA_TRUE CDDB_LIBS CDDB_CFLAGS BUILD_MAD_FALSE BUILD_MAD_TRUE MAD_LIBS BUILD_VORBIS_FALSE BUILD_VORBIS_TRUE VORBISFILE_LIBS VORBISFILE_CFLAGS BUILD_TIMIDITY_FALSE BUILD_TIMIDITY_TRUE TIMIDITY_LIBS TIMIDITY_CFLAGS BUILD_WAVE_FALSE BUILD_WAVE_TRUE BUILD_ALSA_FALSE BUILD_ALSA_TRUE BUILD_OSS_FALSE BUILD_OSS_TRUE ALSA_LIBS ALSA_CFLAGS FS_MAX_CHANNELS DIRECT_BUILD_OSTYPE DIRECT_BUILD_GCC_ATOMICS DIRECT_BUILD_MULTICORE DIRECT_BUILD_DYNLOAD DIRECT_BUILD_STDBOOL DIRECT_BUILD_NETWORK DIRECT_BUILD_GETTID DIRECT_BUILD_TEXT DIRECT_BUILD_TRACE ENABLE_TRACE_FALSE ENABLE_TRACE_TRUE DIRECT_BUILD_DEBUGS ENABLE_DEBUGS_FALSE ENABLE_DEBUGS_TRUE DIRECT_BUILD_DEBUG ENABLE_DEBUG_FALSE ENABLE_DEBUG_TRUE ASFLAGS AS DYNLIB RTLIB THREADLIB THREADFLAGS BUILDARMASM_FALSE BUILDARMASM_TRUE BUILDPPCASM_FALSE BUILDPPCASM_TRUE HAVE_LINUX_FALSE HAVE_LINUX_TRUE X11VDPAU_CORE_FALSE X11VDPAU_CORE_TRUE X11VDPAU_LIBS X11VDPAU_CFLAGS X11_CORE_FALSE X11_CORE_TRUE X11_LIBS X11_CFLAGS OSX_CORE_FALSE OSX_CORE_TRUE FLUXCOMP HAVE_MAN2HTML_FALSE HAVE_MAN2HTML_TRUE MAN2HTML PERL CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build LT_AGE LT_REVISION LT_BINARY LT_CURRENT LT_RELEASE DIRECTFB_VERSION_VENDOR DIRECTFB_VERSION DIRECTFB_BINARY_AGE DIRECTFB_INTERFACE_AGE DIRECTFB_MICRO_VERSION DIRECTFB_MINOR_VERSION DIRECTFB_MAJOR_VERSION target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_static enable_dependency_tracking enable_shared with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_osx enable_x11 enable_x11vdpau enable_extra_warnings enable_profiling enable_debug enable_debug_support enable_trace enable_text enable_gettid enable_network enable_dynload enable_multicore enable_gcc_atomics enable_multi enable_multi_kernel enable_one enable_voodoo enable_pure_voodoo enable_divine enable_sawman enable_fusiondale enable_fusionsound enable_fs_ieee_floats enable_fs_precision enable_fs_linear_filter enable_fs_multichannel with_fs_drivers with_timidity with_wave with_vorbis with_tremor with_mad with_cdda with_playlist enable_unique with_cxxstd enable_mmx enable_sse enable_pvr2d enable_egl enable_idirectfbgl_egl enable_devmem enable_fbdev enable_sdl enable_vnc enable_mesa enable_drmkms enable_jpeg enable_zlib enable_png enable_mng enable_gstreamer enable_gif enable_tiff enable_imlib2 enable_pnm enable_svg enable_mpeg2 enable_bmp enable_jpeg2000 enable_openquicktime enable_avifile enable_libmpeg3 enable_flash enable_xine enable_xine_vdpau enable_swfdec enable_ffmpeg enable_freetype enable_linotype enable_video4linux enable_video4linux2 enable_webp with_gfxdrivers with_inputdrivers with_software with_smooth_scaling with_dither_rgb16 with_dither with_setsockopt with_tests with_args_size with_message_size with_tools with_runtime_sysroot ' ac_precious_vars='build_alias host_alias target_alias PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CCAS CCASFLAGS CPP CXXCPP X11_CFLAGS X11_LIBS X11VDPAU_CFLAGS X11VDPAU_LIBS EGL_CFLAGS EGL_LIBS SDL_CFLAGS SDL_LIBS MESA_CFLAGS MESA_LIBS DRMKMS_CFLAGS DRMKMS_LIBS LIBPNG_CFLAGS LIBPNG_LIBS LIBTIFF_CFLAGS LIBTIFF_LIBS FREETYPE_CFLAGS FREETYPE_LIBS LINOTYPE_CFLAGS LINOTYPE_LIBS LIBWEBP_CFLAGS LIBWEBP_LIBS SH772X_DEP_CFLAGS SH772X_DEP_LIBS SH772X_SHJPEG_DEP_CFLAGS SH772X_SHJPEG_DEP_LIBS TSLIB_CFLAGS TSLIB_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-static[=PKGS] build static libraries [default=no] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-osx build with Mac OS X support [default=auto] --enable-x11 build with X11 support [default=auto] --enable-x11vdpau build with X11/VDPAU support [default=auto] --enable-extra-warnings enable extra warnings [default=no] --enable-profiling enable profiling support [default=no] --enable-debug enable debugging [default=no] --enable-debug-support enable debugging support [default=yes] --enable-trace enable call tracing [default=no] --enable-text enable text output [default=yes] --enable-gettid enable usage of gettid() [default=yes] --enable-network enable network support [default=yes] --enable-dynload enable dynload support [default=yes] --enable-multicore enable multicore support [default=yes] --enable-gcc-atomics force GCC atomics usage (prefer over arch specific) [default=no] --disable-multi disable multi application core [default=no] --enable-multi-kernel enable multi app linux fusion kernel device [default=yes] --enable-one enable One (IPC) [default=no] --enable-voodoo enable Voodoo (network support) [default=no] --enable-pure-voodoo enable pure Voodoo mode [default=no] --enable-divine enable DiVine [default=no] --enable-sawman enable SaWMan (window manager and application mananger) [default=no] --enable-fusiondale enable FusionDale [default=no] --enable-fusionsound enable FusionSound [default=no] --enable-fs-ieee-floats enable using IEEE floats for internal mixing routines [default=no] --enable-fs-precision privilege precision over speed [default=auto] --enable-fs-linear-filter enable linear filtering [default=yes] --disable-fs-multichannel disable support for more than 2 channels [default=no] --enable-unique enable Unique (WM Module) [default=no] --enable-mmx enable MMX support [default=auto] --enable-sse enable SSE support [default=auto] --enable-pvr2d build with PVR2D support [default=yes] --enable-egl build with EGL support [default=no] --enable-idirectfbgl-egl build with EGL support [default=no] --enable-devmem build with generic /dev/mem support [default=yes] --enable-fbdev build with linux fbdev support [default=auto] --enable-sdl build with SDL support [default=no] --enable-vnc build with VNC support [default=auto] --enable-mesa build with Mesa support [default=auto] --enable-drmkms build with DRM/KMS support [default=auto] --enable-jpeg build JPEG image provider [default=yes] --enable-zlib use zlib, e.g. for screen shots [default=no] --enable-png build PNG image provider, [default=yes] --enable-mng build MNG video provider [default=no] --enable-gstreamer build gstreamer video provider [default=no] --enable-gif build GIF image/video provider [default=yes] --enable-tiff build TIFF image provider, [default=auto] --enable-imlib2 build Imlib2 image provider [default=no] --enable-pnm build PNM (PBM/PGM/PPM) image provider [default=yes] --enable-svg build SVG image provider [default=no] --enable-mpeg2 build MPEG2 image provider [default=yes] --enable-bmp build BMP image provider [default=yes] --enable-jpeg2000 build JPEG2000 image provider [default=yes] --enable-openquicktime build OpenQuicktime video provider [default=no] --enable-avifile build AviFile video provider [default=no] --enable-libmpeg3 build Libmpeg3 video provider [default=no] --enable-flash build Flash media provider [default=no] --enable-xine build Xine video provider [default=no] --enable-xine-vdpau build Xine/VDPAU video provider [default=no] --enable-swfdec build Swfdec (Flash decoder) video provider [default=no] --enable-ffmpeg build FFmpeg video provider [default=no] --enable-freetype build FreeType2 font provider [default=yes] --enable-linotype build LinoType font provider [default=yes] --enable-video4linux build Video4Linux video provider [default=yes] --enable-video4linux2 build with Video4Linux2 support [default=no] --enable-webp build WebP image provider, [default=auto] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-fs-drivers=LIST LIST is a comma separated selection of fusionsound drivers to build. Possible drivers are: all (builds all drivers), none (builds none), oss, alsa, wave. [default=all] --with-timidity build Timidity music provider [default=yes] --with-wave build Wave music provider [default=yes] --with-vorbis build Ogg/Vorbis music provider [default=yes] --with-tremor build Ogg/Vorbis music provider using Tremor [default=no] --with-mad build MAD MP3 music provider [default=yes] --with-cdda build CD-DA music provider [default=yes] --with-playlist build Playlist music provider [default=yes] --with-cxxstd select C++ standard for compiler [default=c++0x] --with-gfxdrivers=LIST LIST is a comma separated selection of gfxdrivers to build. Possible gfxdrivers are: all (builds most drivers), none (builds none), ati128, cle266, cyber5k, davinci, ep9x, gp2d, gl, gles2, i810, i830, mach64, matrox, neomagic, nsc, nvidia, omap, pvr2d, pxa3xx, radeon, savage, sh772x, sis315, tdfx, unichrome, vdpau, vmware. [default=all] --with-inputdrivers=LIST LIST is a comma separated selection of inputdrivers to build. Possible inputdrivers are: all (builds all drivers), none (builds none), dbox2remote, dreamboxremote, dynapro, elo-input, gunze, h3600_ts, input_hub, joystick, keyboard, linuxinput, lirc, mutouch, penmount, ps2mouse, serialmouse, sonypijogdial, tslib, ucb1x00, wm97xx, zytronic. [default=all] --without-software build without software rendering (can decrease binary size by >100k) --with-smooth-scaling build with smooth software scaling code (can increase binary size by >100k) --with-dither-rgb16=TYPE dithering to use when loading images into RGB16 surfaces. Possible values for TYPE are: none (no dithering), simple (simple dithering, which increases the data section by 256 bytes), advanced (advanced dithering, which increases the data section by 64 KBytes). [default=none] --with-dither=TYPE dithering to use when loading images into non-RGB16 surfaces. Possible values for TYPE are: none (no dithering), simple (simple dithering, which increases the data section by 64 bytes), advanced (advanced dithering, which increases the data section by 16 KBytes). [default=none] --without-setsockopt build without setsockopt --with-tests build test programs --with-args-size=SIZE allow static args up to SIZE bytes [default=1024] --with-message-size=SIZE allow fusion messages up to SIZE bytes [default=16384] --without-tools do not build any tools --with-runtime-sysroot=DIR search for lib/share et al within DIR at runtime, e.g. when loading modules Some influential environment variables: PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) CPP C preprocessor CXXCPP C++ preprocessor X11_CFLAGS C compiler flags for X11, overriding pkg-config X11_LIBS linker flags for X11, overriding pkg-config X11VDPAU_CFLAGS C compiler flags for X11VDPAU, overriding pkg-config X11VDPAU_LIBS linker flags for X11VDPAU, overriding pkg-config EGL_CFLAGS C compiler flags for EGL, overriding pkg-config EGL_LIBS linker flags for EGL, overriding pkg-config SDL_CFLAGS C compiler flags for SDL, overriding pkg-config SDL_LIBS linker flags for SDL, overriding pkg-config MESA_CFLAGS C compiler flags for MESA, overriding pkg-config MESA_LIBS linker flags for MESA, overriding pkg-config DRMKMS_CFLAGS C compiler flags for DRMKMS, overriding pkg-config DRMKMS_LIBS linker flags for DRMKMS, overriding pkg-config LIBPNG_CFLAGS C compiler flags for LIBPNG, overriding pkg-config LIBPNG_LIBS linker flags for LIBPNG, overriding pkg-config LIBTIFF_CFLAGS C compiler flags for LIBTIFF, overriding pkg-config LIBTIFF_LIBS linker flags for LIBTIFF, overriding pkg-config FREETYPE_CFLAGS C compiler flags for FREETYPE, overriding pkg-config FREETYPE_LIBS linker flags for FREETYPE, overriding pkg-config LINOTYPE_CFLAGS C compiler flags for LINOTYPE, overriding pkg-config LINOTYPE_LIBS linker flags for LINOTYPE, overriding pkg-config LIBWEBP_CFLAGS C compiler flags for LIBWEBP, overriding pkg-config LIBWEBP_LIBS linker flags for LIBWEBP, overriding pkg-config SH772X_DEP_CFLAGS C compiler flags for SH772X_DEP, overriding pkg-config SH772X_DEP_LIBS linker flags for SH772X_DEP, overriding pkg-config SH772X_SHJPEG_DEP_CFLAGS C compiler flags for SH772X_SHJPEG_DEP, overriding pkg-config SH772X_SHJPEG_DEP_LIBS linker flags for SH772X_SHJPEG_DEP, overriding pkg-config TSLIB_CFLAGS C compiler flags for TSLIB, overriding pkg-config TSLIB_LIBS linker flags for TSLIB, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # # Making releases: # DIRECTFB_MICRO_VERSION += 1; # DIRECTFB_INTERFACE_AGE += 1; # DIRECTFB_BINARY_AGE += 1; # if any functions have been added, set DIRECTFB_INTERFACE_AGE to 0. # if backwards compatibility has been broken, # set DIRECTFB_BINARY_AGE and DIRECTFB_INTERFACE_AGE to 0. # # DIRECTFB_MAJOR_VERSION=1 DIRECTFB_MINOR_VERSION=7 DIRECTFB_MICRO_VERSION=7 DIRECTFB_INTERFACE_AGE=0 DIRECTFB_BINARY_AGE=0 DIRECTFB_VERSION=$DIRECTFB_MAJOR_VERSION.$DIRECTFB_MINOR_VERSION.$DIRECTFB_MICRO_VERSION #fluxcomp 1.4.2 FLUXCOMP_REQUIRED_VERSIONCODE=1004002 cat >>confdefs.h <<_ACEOF #define DIRECTFB_VERSION "$DIRECTFB_VERSION" _ACEOF # # DirectFB Vendor Version: # DIRECTFB_VERSION_VENDOR=$DIRECTFB_VERSION_VENDOR cat >>confdefs.h <<_ACEOF #define DIRECTFB_VERSION_VENDOR "$DIRECTFB_VERSION_VENDOR" _ACEOF # libtool versioning LT_RELEASE=$DIRECTFB_MAJOR_VERSION.$DIRECTFB_MINOR_VERSION LT_CURRENT=`expr $DIRECTFB_MICRO_VERSION - $DIRECTFB_INTERFACE_AGE` LT_BINARY=`expr $DIRECTFB_MICRO_VERSION - $DIRECTFB_BINARY_AGE` LT_REVISION=$DIRECTFB_INTERFACE_AGE LT_AGE=`expr $DIRECTFB_BINARY_AGE - $DIRECTFB_INTERFACE_AGE` # The earliest version that this release has binary compatibility with. # This is used for module locations. BINARY_VERSION=$DIRECTFB_MAJOR_VERSION.$DIRECTFB_MINOR_VERSION-$LT_BINARY VERSION=$DIRECTFB_VERSION PACKAGE=DirectFB ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi 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 # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi 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 # Define the identity of the package. PACKAGE=$PACKAGE VERSION=$VERSION # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi ac_config_headers="$ac_config_headers config.h" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi case x"$target" in xNONE | x) target_or_host="$host" ;; *) target_or_host="$target" ;; esac case "$target_or_host" in *-cygwin) ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else 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". rm -rf conftest.dir 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_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # 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. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else 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". rm -rf conftest.dir 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_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # 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. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else 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". rm -rf conftest.dir 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_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # 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. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi # By default we simply use the C compiler to build assembly code. test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else 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". rm -rf conftest.dir 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_CCAS_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # 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. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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_CCAS_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CCAS_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then am__fastdepCCAS_TRUE= am__fastdepCCAS_FALSE='#' else am__fastdepCCAS_TRUE='#' am__fastdepCCAS_FALSE= fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if ${ac_cv_search_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_strerror+:} false; then : break fi done if ${ac_cv_search_strerror+:} false; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 $as_echo "$ac_cv_sizeof_long_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF for ac_func in fork do : ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork" if test "x$ac_cv_func_fork" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FORK 1 _ACEOF fi done ## Work around libstuhl during cross build... if test "$host" != "$build"; then sys_lib_dlsearch_path_spec="" sys_lib_search_path_spec="" fi for ac_prog in perl5 perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PERL" && break done # Extract the first word of "man2html", so it can be a program name with args. set dummy man2html; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MAN2HTML+:} false; then : $as_echo_n "(cached) " >&6 else case $MAN2HTML in [\\/]* | ?:[\\/]*) ac_cv_path_MAN2HTML="$MAN2HTML" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MAN2HTML="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MAN2HTML" && ac_cv_path_MAN2HTML="no" ;; esac fi MAN2HTML=$ac_cv_path_MAN2HTML if test -n "$MAN2HTML"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAN2HTML" >&5 $as_echo "$MAN2HTML" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MAN2HTML" != "no"; then HAVE_MAN2HTML_TRUE= HAVE_MAN2HTML_FALSE='#' else HAVE_MAN2HTML_TRUE='#' HAVE_MAN2HTML_FALSE= fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}fluxcomp", so it can be a program name with args. set dummy ${ac_tool_prefix}fluxcomp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_FLUXCOMP+:} false; then : $as_echo_n "(cached) " >&6 else case $FLUXCOMP in [\\/]* | ?:[\\/]*) ac_cv_path_FLUXCOMP="$FLUXCOMP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_FLUXCOMP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi FLUXCOMP=$ac_cv_path_FLUXCOMP if test -n "$FLUXCOMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLUXCOMP" >&5 $as_echo "$FLUXCOMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_FLUXCOMP"; then ac_pt_FLUXCOMP=$FLUXCOMP # Extract the first word of "fluxcomp", so it can be a program name with args. set dummy fluxcomp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_FLUXCOMP+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_FLUXCOMP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_FLUXCOMP="$ac_pt_FLUXCOMP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_FLUXCOMP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_FLUXCOMP=$ac_cv_path_ac_pt_FLUXCOMP if test -n "$ac_pt_FLUXCOMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_FLUXCOMP" >&5 $as_echo "$ac_pt_FLUXCOMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_FLUXCOMP" = x; then FLUXCOMP="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FLUXCOMP=$ac_pt_FLUXCOMP fi else FLUXCOMP="$ac_cv_path_FLUXCOMP" fi if test -z "$FLUXCOMP"; then if ! test -e $srcdir/src/core/CoreDFB.cpp; then as_fn_error $? " *** DirectFB compilation requires fluxcomp *** Unless you are compiling from a distributed tarball you need fluxcomp available from git://git.directfb.org/git/directfb/core/flux installed in your PATH. " "$LINENO" 5 fi else FLUXCOMP_VERSIONCODE=`$FLUXCOMP -V` if test $FLUXCOMP_VERSIONCODE -lt $FLUXCOMP_REQUIRED_VERSIONCODE ; then as_fn_error $? " *** DirectFB compilation requires a newer fluxcomp *** available from git://git.directfb.org/git/directfb/core/flux " "$LINENO" 5 fi fi # Check whether --enable-osx was given. if test "${enable_osx+set}" = set; then : enableval=$enable_osx; else enable_osx=yes fi if test "$enable_osx" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default" if test "x$ac_cv_header_Carbon_Carbon_h" = xyes; then : osx_found=yes else osx_found=no fi if test "$osx_found" = no; then enable_osx=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no Carbon/Carbon.h found -- building without Mac OS X support." >&5 $as_echo "$as_me: WARNING: *** no Carbon/Carbon.h found -- building without Mac OS X support." >&2;} else OSX_LIBS="-framework Carbon" fi fi if test "$enable_osx" = "yes"; then OSX_CORE_TRUE= OSX_CORE_FALSE='#' else OSX_CORE_TRUE='#' OSX_CORE_FALSE= fi # Check whether --enable-x11 was given. if test "${enable_x11+set}" = set; then : enableval=$enable_x11; else enable_x11=yes fi if test "$enable_x11" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11" >&5 $as_echo_n "checking for X11... " >&6; } if test -n "$X11_CFLAGS"; then pkg_cv_X11_CFLAGS="$X11_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto x11 xext\""; } >&5 ($PKG_CONFIG --exists --print-errors "xproto x11 xext") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X11_CFLAGS=`$PKG_CONFIG --cflags "xproto x11 xext" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$X11_LIBS"; then pkg_cv_X11_LIBS="$X11_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto x11 xext\""; } >&5 ($PKG_CONFIG --exists --print-errors "xproto x11 xext") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X11_LIBS=`$PKG_CONFIG --libs "xproto x11 xext" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xproto x11 xext" 2>&1` else X11_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xproto x11 xext" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$X11_PKG_ERRORS" >&5 enable_x11="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no X11 found -- building without X11 support" >&5 $as_echo "$as_me: WARNING: *** no X11 found -- building without X11 support" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_x11="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no X11 found -- building without X11 support" >&5 $as_echo "$as_me: WARNING: *** no X11 found -- building without X11 support" >&2;} else X11_CFLAGS=$pkg_cv_X11_CFLAGS X11_LIBS=$pkg_cv_X11_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_x11="yes" fi fi if test "$enable_x11" = "yes"; then X11_CORE_TRUE= X11_CORE_FALSE='#' else X11_CORE_TRUE='#' X11_CORE_FALSE= fi # Check whether --enable-x11vdpau was given. if test "${enable_x11vdpau+set}" = set; then : enableval=$enable_x11vdpau; else enable_x11vdpau=yes fi if test "$enable_x11vdpau" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11VDPAU" >&5 $as_echo_n "checking for X11VDPAU... " >&6; } if test -n "$X11VDPAU_CFLAGS"; then pkg_cv_X11VDPAU_CFLAGS="$X11VDPAU_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto x11 xext vdpau\""; } >&5 ($PKG_CONFIG --exists --print-errors "xproto x11 xext vdpau") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X11VDPAU_CFLAGS=`$PKG_CONFIG --cflags "xproto x11 xext vdpau" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$X11VDPAU_LIBS"; then pkg_cv_X11VDPAU_LIBS="$X11VDPAU_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto x11 xext vdpau\""; } >&5 ($PKG_CONFIG --exists --print-errors "xproto x11 xext vdpau") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X11VDPAU_LIBS=`$PKG_CONFIG --libs "xproto x11 xext vdpau" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then X11VDPAU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xproto x11 xext vdpau" 2>&1` else X11VDPAU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xproto x11 xext vdpau" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$X11VDPAU_PKG_ERRORS" >&5 enable_x11vdpau="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no X11/VDPAU found -- building without X11/VDPAU support" >&5 $as_echo "$as_me: WARNING: *** no X11/VDPAU found -- building without X11/VDPAU support" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_x11vdpau="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no X11/VDPAU found -- building without X11/VDPAU support" >&5 $as_echo "$as_me: WARNING: *** no X11/VDPAU found -- building without X11/VDPAU support" >&2;} else X11VDPAU_CFLAGS=$pkg_cv_X11VDPAU_CFLAGS X11VDPAU_LIBS=$pkg_cv_X11VDPAU_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_x11vdpau="yes" fi fi if test "$enable_x11vdpau" = "yes"; then X11VDPAU_CORE_TRUE= X11VDPAU_CORE_FALSE='#' else X11VDPAU_CORE_TRUE='#' X11VDPAU_CORE_FALSE= fi for ac_header in linux/compiler.h linux/unistd.h asm/page.h signal.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test x"$CFLAGS" = x"-g -O2"; then CFLAGS= fi CFLAGS="-ffast-math -pipe $CFLAGS" DFB_INTERNAL_CFLAGS="-D_GNU_SOURCE $DFB_INTERNAL_CFLAGS" # Check whether --enable-extra-warnings was given. if test "${enable_extra_warnings+set}" = set; then : enableval=$enable_extra_warnings; else enable_extra_warnings=no fi if test "$enable_extra_warnings" = "yes"; then CFLAGS="-W -Wno-sign-compare -Wno-unused-parameter -Wundef -Wcast-qual -Wcast-align -Waggregate-return -Wmissing-declarations -Winline $CFLAGS" fi # FIXME #if test "$GCC" = "yes"; then # CFLAGS="-Wall -Wno-strict-aliasing $CFLAGS" #fi if test "$GCC" = "yes"; then CFLAGS_STD="-std=gnu99" fi # # check target architecture # have_x86=no have_x86_64=no have_arm=no have_mips=no have_ppc=no have_sh=no have_sh3=no have_sh4=no case "$target_or_host" in i*86-*-*) have_x86=yes $as_echo "#define ARCH_X86 1" >>confdefs.h ;; x86_64-*) have_x86=yes have_x86_64=yes $as_echo "#define ARCH_X86_64 1" >>confdefs.h ;; *arm*) have_arm=yes $as_echo "#define ARCH_ARM 1" >>confdefs.h if test -n "`echo $CFLAGS | grep 'march=armv7\-a'`"; then $as_echo "#define ARCH_ARMv7 1" >>confdefs.h fi ;; *mips*) have_mips=yes $as_echo "#define ARCH_MIPS 1" >>confdefs.h ;; ppc-*-linux* | powerpc-*) have_ppc=yes $as_echo "#define ARCH_PPC 1" >>confdefs.h ;; sh3-*) have_sh=yes have_sh3=yes $as_echo "#define ARCH_SH 1" >>confdefs.h $as_echo "#define ARCH_SH3 1" >>confdefs.h ;; sh4-* | sh-*) have_sh=yes have_sh4=yes $as_echo "#define ARCH_SH 1" >>confdefs.h $as_echo "#define ARCH_SH4 1" >>confdefs.h ;; *) ;; esac have_linux=no have_cygwin=no have_kos=no need_libc_r=no need_libdl=yes need_librt=no want_ppcasm=yes want_armasm=yes case "$target_or_host" in *-*linux*) have_linux=yes need_librt=yes ;; *-cygwin) have_cygwin=yes need_libdl=no ;; *-freebsd*) need_libc_r=yes need_libdl=no want_ppcasm=yes want_armasm=yes CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" ;; *-openbsd*) need_libc_r=yes need_libdl=no want_ppcasm=no want_armasm=no CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" ;; *-netbsd*) need_libc_r=no need_libdl=no want_ppcasm=yes want_armasm=yes CPPFLAGS="$CPPFLAGS -I/usr/pkg/include" LDFLAGS="$LDFLAGS -L/usr/pkg/lib" ;; *-darwin*) need_libc_r=no need_libdl=yes want_ppcasm=no want_armasm=no CPPFLAGS="$CPPFLAGS -I/sw/include" LDFLAGS="$LDFLAGS -L/sw/lib" ;; sh-*-elf) if test "$CC" = "kos-cc"; then need_libc_r=no need_libdl=no have_kos=yes fi ;; esac if test "$have_linux" = "yes"; then HAVE_LINUX_TRUE= HAVE_LINUX_FALSE='#' else HAVE_LINUX_TRUE='#' HAVE_LINUX_FALSE= fi if test "$have_ppc" = "yes" && test "$want_ppcasm" = "yes"; then BUILDPPCASM_TRUE= BUILDPPCASM_FALSE='#' else BUILDPPCASM_TRUE='#' BUILDPPCASM_FALSE= fi if test "$have_ppc" = "yes" && test "$want_ppcasm" = "yes"; then $as_echo "#define USE_PPCASM 1" >>confdefs.h fi if test "$have_arm" = "yes" && test "$want_armasm" = "yes"; then BUILDARMASM_TRUE= BUILDARMASM_FALSE='#' else BUILDARMASM_TRUE='#' BUILDARMASM_FALSE= fi if test "$have_arm" = "yes" && test "$want_armasm" = "yes"; then $as_echo "#define USE_ARMASM 1" >>confdefs.h fi if test "$have_kos" = "yes"; then $as_echo "#define USE_KOS 1" >>confdefs.h fi THREADFLAGS="-D_REENTRANT" if test "$have_kos" = "no"; then if test "$need_libc_r" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_init in -lc_r" >&5 $as_echo_n "checking for pthread_attr_init in -lc_r... " >&6; } if ${ac_cv_lib_c_r_pthread_attr_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_init (); int main () { return pthread_attr_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_r_pthread_attr_init=yes else ac_cv_lib_c_r_pthread_attr_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_attr_init" >&5 $as_echo "$ac_cv_lib_c_r_pthread_attr_init" >&6; } if test "x$ac_cv_lib_c_r_pthread_attr_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBC_R 1 _ACEOF LIBS="-lc_r $LIBS" else as_fn_error $? " *** DirectFB requires phtreads in libc_r." "$LINENO" 5 fi THREADLIB="-lc_r" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_init in -lpthread" >&5 $as_echo_n "checking for pthread_attr_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_attr_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_init (); int main () { return pthread_attr_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_attr_init=yes else ac_cv_lib_pthread_pthread_attr_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_attr_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_attr_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" else as_fn_error $? " *** DirectFB requires libpthread." "$LINENO" 5 fi THREADLIB="-lpthread" fi fi ac_fn_c_check_decl "$LINENO" "PTHREAD_MUTEX_RECURSIVE" "ac_cv_have_decl_PTHREAD_MUTEX_RECURSIVE" " #define _GNU_SOURCE #include " if test "x$ac_cv_have_decl_PTHREAD_MUTEX_RECURSIVE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PTHREAD_MUTEX_RECURSIVE $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** PTHREAD_MUTEX_RECURSIVE is not defined! Dead locks might occur!" >&5 $as_echo "$as_me: WARNING: *** PTHREAD_MUTEX_RECURSIVE is not defined! Dead locks might occur!" >&2;} fi ac_fn_c_check_decl "$LINENO" "PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP" "ac_cv_have_decl_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP" " #define _GNU_SOURCE #include " if test "x$ac_cv_have_decl_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not defined! Dead locks might occur!" >&5 $as_echo "$as_me: WARNING: *** PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not defined! Dead locks might occur!" >&2;} fi CPPFLAGS="$THREADFLAGS $CPPFLAGS" RTLIB="" if test "$need_librt" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" else as_fn_error $? " *** DirectFB requires librt." "$LINENO" 5 fi RTLIB="-lrt" fi DYNLIB="" if test "$need_libdl" = "yes"; then if test "$enable_shared" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" else as_fn_error $? " *** DirectFB requires libdl." "$LINENO" 5 fi DYNLIB="-ldl" fi fi if test "$have_x86" = "yes"; then ## ## HACK HACK HACK automake uses @AS@ like a gcc ## AS=$CC ASFLAGS=$CFLAGS $as_echo "#define HAVE_INB_OUTB_IOPL 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/io.h" >&5 $as_echo_n "checking for sys/io.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char x = inb(0); (void)x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_SYSIO 1" >>confdefs.h have_sysio=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else have_sysio=no fi # Check whether --enable-profiling was given. if test "${enable_profiling+set}" = set; then : enableval=$enable_profiling; else enable_profiling=no fi if test "$enable_profiling" = "yes"; then CFLAGS="$CFLAGS -pg -g3" else DFB_CFLAGS_OMIT_FRAME_POINTER="-fomit-frame-pointer" fi # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; else enable_debug=no fi if test "$enable_debug" = "yes"; then CFLAGS="-g3 -O0 -fno-inline -Wno-inline $CFLAGS" DIRECT_BUILD_DEBUG=1 else DIRECT_BUILD_DEBUG=0 fi if test "$enable_debug" = "yes"; then ENABLE_DEBUG_TRUE= ENABLE_DEBUG_FALSE='#' else ENABLE_DEBUG_TRUE='#' ENABLE_DEBUG_FALSE= fi # Check whether --enable-debug-support was given. if test "${enable_debug_support+set}" = set; then : enableval=$enable_debug_support; else enable_debug_support=yes fi if test "$enable_debug_support" = "yes" || test "$enable_debug" = "yes"; then enable_debug_support=yes if test "$enable_debug" = "no"; then CFLAGS="-g2 $CFLAGS" fi CFLAGS="-O3 $CFLAGS" DIRECT_BUILD_DEBUGS=1 else CFLAGS="-O3 -g0 $CFLAGS" DIRECT_BUILD_DEBUGS=0 fi if test "$enable_debug_support" = "yes"; then ENABLE_DEBUGS_TRUE= ENABLE_DEBUGS_FALSE='#' else ENABLE_DEBUGS_TRUE='#' ENABLE_DEBUGS_FALSE= fi # Check whether --enable-trace was given. if test "${enable_trace+set}" = set; then : enableval=$enable_trace; else enable_trace=no fi if test "$enable_trace" = "yes"; then DFB_INTERNAL_CFLAGS="$DFB_INTERNAL_CFLAGS -finstrument-functions" DIRECT_BUILD_TRACE=1 else DIRECT_BUILD_TRACE=0 fi if test "$enable_trace" = "yes"; then ENABLE_TRACE_TRUE= ENABLE_TRACE_FALSE='#' else ENABLE_TRACE_TRUE='#' ENABLE_TRACE_FALSE= fi # Check whether --enable-text was given. if test "${enable_text+set}" = set; then : enableval=$enable_text; else enable_text=yes fi if test "$enable_text" = "no"; then DIRECT_BUILD_TEXT=0 else DIRECT_BUILD_TEXT=1 fi # Check whether --enable-gettid was given. if test "${enable_gettid+set}" = set; then : enableval=$enable_gettid; else enable_gettid=yes fi if test "$enable_gettid" = "no"; then DIRECT_BUILD_GETTID=0 else DIRECT_BUILD_GETTID=1 fi # Check whether --enable-network was given. if test "${enable_network+set}" = set; then : enableval=$enable_network; else enable_network=yes fi if test "$enable_network" = "no"; then DIRECT_BUILD_NETWORK=0 else DIRECT_BUILD_NETWORK=1 fi ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" if test "x$ac_cv_header_stdbool_h" = xyes; then : DIRECT_BUILD_STDBOOL=1 else DIRECT_BUILD_STDBOOL=0 fi # Check whether --enable-dynload was given. if test "${enable_dynload+set}" = set; then : enableval=$enable_dynload; else enable_dynload=yes fi if test "$enable_dynload" = "no"; then DIRECT_BUILD_DYNLOAD=0 else DIRECT_BUILD_DYNLOAD=1 fi # Check whether --enable-multicore was given. if test "${enable_multicore+set}" = set; then : enableval=$enable_multicore; else enable_multicore=yes fi if test "$enable_multicore" = "no"; then DIRECT_BUILD_MULTICORE=0 else DIRECT_BUILD_MULTICORE=1 fi # Check whether --enable-gcc-atomics was given. if test "${enable_gcc_atomics+set}" = set; then : enableval=$enable_gcc_atomics; else enable_gcc_atomics=no fi if test "$enable_gcc_atomics" = "no"; then DIRECT_BUILD_GCC_ATOMICS=0 else DIRECT_BUILD_GCC_ATOMICS=1 fi DIRECT_BUILD_OSTYPE=DIRECT_OS_LINUX_GNU_LIBC # Check whether --enable-multi was given. if test "${enable_multi+set}" = set; then : enableval=$enable_multi; else enable_multi=no fi if test "$enable_multi" = "yes"; then FUSION_BUILD_MULTI=1 else FUSION_BUILD_MULTI=0 enable_multi=no fi # Check whether --enable-multi-kernel was given. if test "${enable_multi_kernel+set}" = set; then : enableval=$enable_multi_kernel; else enable_multi_kernel=yes fi if test "$enable_multi" = "yes"; then if test "$enable_multi_kernel" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "linux/fusion.h" "ac_cv_header_linux_fusion_h" "$ac_includes_default" if test "x$ac_cv_header_linux_fusion_h" = xyes; then : else enable_multi_kernel=no fi if test "$enable_multi_kernel" = "no"; then as_fn_error $? " *** Linux-Fusion header not found. Required for --enable-multi-kernel option! *** " "$LINENO" 5 fi fi fi if test "$enable_multi_kernel" = "yes"; then FUSION_BUILD_KERNEL=1 else FUSION_BUILD_KERNEL=0 enable_multi_kernel=no fi # Check whether --enable-one was given. if test "${enable_one+set}" = set; then : enableval=$enable_one; else enable_one=no fi if test "$enable_one" = "yes"; then DIRECTFB_BUILD_ONE=1 DEP_ONE=one else DIRECTFB_BUILD_ONE=0 enable_one=no DEP_ONE= fi # Check whether --enable-voodoo was given. if test "${enable_voodoo+set}" = set; then : enableval=$enable_voodoo; else enable_voodoo=no fi if test "$enable_voodoo" = "yes"; then DIRECTFB_BUILD_VOODOO=1 DEP_VOODOO=voodoo else DIRECTFB_BUILD_VOODOO=0 enable_voodoo=no DEP_VOODOO= fi # Check whether --enable-pure_voodoo was given. if test "${enable_pure_voodoo+set}" = set; then : enableval=$enable_pure_voodoo; else enable_pure_voodoo=no fi if test "$enable_pure_voodoo" = "yes"; then enable_voodoo=yes DIRECTFB_BUILD_VOODOO=1 DIRECTFB_BUILD_PURE_VOODOO=1 DEP_VOODOO=voodoo enable_multi=no DIRECTFB_BUILD_ONE=0 enable_one=no FUSION_BUILD_MULTI=0 FUSION_BUILD_KERNEL=0 else DIRECTFB_BUILD_PURE_VOODOO=0 enable_pure_voodoo=no fi # Check whether --enable-divine was given. if test "${enable_divine+set}" = set; then : enableval=$enable_divine; else enable_divine=no fi # Check whether --enable-sawman was given. if test "${enable_sawman+set}" = set; then : enableval=$enable_sawman; else enable_sawman=no fi # Check whether --enable-fusiondale was given. if test "${enable_fusiondale+set}" = set; then : enableval=$enable_fusiondale; else enable_fusiondale=no fi # Check whether --enable-fusionsound was given. if test "${enable_fusionsound+set}" = set; then : enableval=$enable_fusionsound; else enable_fusionsound=no fi if test "$enable_fusionsound" = "yes"; then $as_echo "#define HAVE_FUSIONSOUND 1" >>confdefs.h fi # # fusionsound options # # Check whether --enable-fs-ieee-floats was given. if test "${enable_fs_ieee_floats+set}" = set; then : enableval=$enable_fs_ieee_floats; else enable_fs_ieee_floats=no fi if test "x$enable_fs_ieee_floats" = xyes; then $as_echo "#define FS_USE_IEEE_FLOATS 1" >>confdefs.h fi # Check whether --enable-fs-precision was given. if test "${enable_fs_precision+set}" = set; then : enableval=$enable_fs_precision; else enable_fs_precision=auto fi if test "x$enable_fs_precision" = xauto; then if test "x$have_x86" = xyes || test "x$have_ppc" = xyes; then enable_fs_precision=yes else enable_fs_precision=no fi fi if test "x$enable_fs_precision" = xyes; then $as_echo "#define FS_ENABLE_PRECISION 1" >>confdefs.h fi # Check whether --enable-fs-linear-filter was given. if test "${enable_fs_linear_filter+set}" = set; then : enableval=$enable_fs_linear_filter; else enable_fs_linear_filter=yes fi if test "x$enable_fs_linear_filter" = xyes; then $as_echo "#define FS_ENABLE_LINEAR_FILTER 1" >>confdefs.h fi # Check whether --enable-fs-multichannel was given. if test "${enable_fs_multichannel+set}" = set; then : enableval=$enable_fs_multichannel; else enable_fs_multichannel=yes fi if test "x$enable_fs_multichannel" = xyes; then FS_MAX_CHANNELS=6 else FS_MAX_CHANNELS=2 fi # Check for fusionsound drivers # fsdriver_oss=no fsdriver_alsa=no fsdriver_wave=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking which fusionsound drivers should be built" >&5 $as_echo_n "checking which fusionsound drivers should be built... " >&6; } # Check whether --with-fs-drivers was given. if test "${with_fs_drivers+set}" = set; then : withval=$with_fs_drivers; fsdrivers="$withval" else fsdrivers=all fi if test "$fsdrivers" = "all"; then checkfor_oss=yes checkfor_alsa=yes checkfor_wave=yes else if test "$fsdrivers" != "none"; then fsdrivers=`echo $fsdrivers | sed 's/,/ /g'` for fsdriver in $fsdrivers do case "$fsdriver" in oss) checkfor_oss=yes ;; alsa) checkfor_alsa=yes ;; wave) checkfor_wave=yes ;; *) ;; esac done fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fsdrivers" >&5 $as_echo "$fsdrivers" >&6; } if test "x$checkfor_oss" = "xyes"; then ac_fn_c_check_header_mongrel "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default" if test "x$ac_cv_header_sys_soundcard_h" = xyes; then : fsdriver_oss=yes else fsdriver_oss=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** OSS driver will not be built." >&5 $as_echo "$as_me: WARNING: *** OSS driver will not be built." >&2;} fi fi if test "x$checkfor_alsa" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alsa >= 0.9" >&5 $as_echo_n "checking for alsa >= 0.9... " >&6; } if $PKG_CONFIG --atleast-version 0.9 alsa; then ALSA_CFLAGS=`$PKG_CONFIG --cflags alsa` ALSA_LIBS=`$PKG_CONFIG --libs alsa` fsdriver_alsa=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "x$checkfor_wave" = "xyes"; then fsdriver_wave=yes fi if test "x$fsdriver_oss" = "xyes"; then BUILD_OSS_TRUE= BUILD_OSS_FALSE='#' else BUILD_OSS_TRUE='#' BUILD_OSS_FALSE= fi if test "x$fsdriver_alsa" = "xyes"; then BUILD_ALSA_TRUE= BUILD_ALSA_FALSE='#' else BUILD_ALSA_TRUE='#' BUILD_ALSA_FALSE= fi if test "x$fsdriver_wave" = "xyes"; then BUILD_WAVE_TRUE= BUILD_WAVE_FALSE='#' else BUILD_WAVE_TRUE='#' BUILD_WAVE_FALSE= fi # fusionsound music providers # # Check for Timidity # timidity="no" # Check whether --with-timidity was given. if test "${with_timidity+set}" = set; then : withval=$with_timidity; else with_timidity=yes fi if test "x$with_timidity" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libtimidity >= 0.1.0" >&5 $as_echo_n "checking for libtimidity >= 0.1.0... " >&6; } if $PKG_CONFIG --atleast-version=0.1.0 libtimidity; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } timidity="yes" TIMIDITY_CFLAGS=`$PKG_CONFIG --cflags libtimidity` TIMIDITY_LIBS=`$PKG_CONFIG --libs libtimidity` else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libtimidity is required - Timidity music provider will not be built." >&5 $as_echo "$as_me: WARNING: *** libtimidity is required - Timidity music provider will not be built." >&2;} fi fi if test "x$timidity" = "xyes"; then BUILD_TIMIDITY_TRUE= BUILD_TIMIDITY_FALSE='#' else BUILD_TIMIDITY_TRUE='#' BUILD_TIMIDITY_FALSE= fi # # Check for Wave # # Check whether --with-wave was given. if test "${with_wave+set}" = set; then : withval=$with_wave; if test $fsdriver_wave != yes ; then with_wave="$withval" else with_wave=yes fi else with_wave=yes fi if test "x$with_wave" = "xyes"; then BUILD_WAVE_TRUE= BUILD_WAVE_FALSE='#' else BUILD_WAVE_TRUE='#' BUILD_WAVE_FALSE= fi # # Check for Vorbis # vorbis="no" tremor="no" # Check whether --with-vorbis was given. if test "${with_vorbis+set}" = set; then : withval=$with_vorbis; else with_vorbis=yes fi # Check whether --with-tremor was given. if test "${with_tremor+set}" = set; then : withval=$with_tremor; else with_tremor=no fi if test "x$with_vorbis" = "xyes"; then if test "x$with_tremor" = "xyes"; then ac_fn_c_check_header_mongrel "$LINENO" "tremor/ivorbiscodec.h" "ac_cv_header_tremor_ivorbiscodec_h" "$ac_includes_default" if test "x$ac_cv_header_tremor_ivorbiscodec_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ov_clear in -lvorbisidec" >&5 $as_echo_n "checking for ov_clear in -lvorbisidec... " >&6; } if ${ac_cv_lib_vorbisidec_ov_clear+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lvorbisidec $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ov_clear (); int main () { return ov_clear (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_vorbisidec_ov_clear=yes else ac_cv_lib_vorbisidec_ov_clear=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vorbisidec_ov_clear" >&5 $as_echo "$ac_cv_lib_vorbisidec_ov_clear" >&6; } if test "x$ac_cv_lib_vorbisidec_ov_clear" = xyes; then : tremor="yes" fi fi if test "x$tremor" = "xyes"; then vorbis="yes" VORBISFILE_CFLAGS="" VORBISFILE_LIBS="-lvorbisidec" $as_echo "#define USE_TREMOR 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Tremor is required - Ogg/Vorbis music provider will not be built." >&5 $as_echo "$as_me: WARNING: *** Tremor is required - Ogg/Vorbis music provider will not be built." >&2;} fi else VORBIS_REQUIRED_VERSION=1.0.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vorbisfile >= $VORBIS_REQUIRED_VERSION" >&5 $as_echo_n "checking for vorbisfile >= $VORBIS_REQUIRED_VERSION... " >&6; } if $PKG_CONFIG --atleast-version $VORBIS_REQUIRED_VERSION vorbisfile; then vorbis="yes" VORBISFILE_CFLAGS=`$PKG_CONFIG --cflags vorbisfile` VORBISFILE_LIBS=`$PKG_CONFIG --libs vorbisfile` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** vorbisfile $VORBIS_REQUIRED_VERSION or newer is required - Ogg/Vorbis music provider will not be built." >&5 $as_echo "$as_me: WARNING: *** vorbisfile $VORBIS_REQUIRED_VERSION or newer is required - Ogg/Vorbis music provider will not be built." >&2;} fi fi fi if test "x$vorbis" = "xyes"; then BUILD_VORBIS_TRUE= BUILD_VORBIS_FALSE='#' else BUILD_VORBIS_TRUE='#' BUILD_VORBIS_FALSE= fi # # Check for MAD # mad="no" # Check whether --with-mad was given. if test "${with_mad+set}" = set; then : withval=$with_mad; else with_mad=yes fi if test "x$with_mad" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mad_timer_add in -lmad" >&5 $as_echo_n "checking for mad_timer_add in -lmad... " >&6; } if ${ac_cv_lib_mad_mad_timer_add+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmad $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mad_timer_add (); int main () { return mad_timer_add (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mad_mad_timer_add=yes else ac_cv_lib_mad_mad_timer_add=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mad_mad_timer_add" >&5 $as_echo "$ac_cv_lib_mad_mad_timer_add" >&6; } if test "x$ac_cv_lib_mad_mad_timer_add" = xyes; then : mad="yes" else mad="no" fi if test "x$mad" = "xyes"; then ac_fn_c_check_header_mongrel "$LINENO" "mad.h" "ac_cv_header_mad_h" "$ac_includes_default" if test "x$ac_cv_header_mad_h" = xyes; then : mad="yes" else mad="no" fi if test "x$mad" = "xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** MAD header not found - MAD music provider will not be built." >&5 $as_echo "$as_me: WARNING: *** MAD header not found - MAD music provider will not be built." >&2;} else MAD_LIBS="-lmad" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** MAD library not found - MAD music provider will not be built." >&5 $as_echo "$as_me: WARNING: *** MAD library not found - MAD music provider will not be built." >&2;} fi fi if test "x$mad" = "xyes"; then BUILD_MAD_TRUE= BUILD_MAD_FALSE='#' else BUILD_MAD_TRUE='#' BUILD_MAD_FALSE= fi # # Check for CD-DA # cdda="no" # Check whether --with-cdda was given. if test "${with_cdda+set}" = set; then : withval=$with_cdda; else with_cdda=yes fi if test "x$with_cdda" = "xyes"; then cdda="yes" if $PKG_CONFIG --atleast-version 1.0.0 libcddb; then $as_echo "#define HAVE_CDDB 1" >>confdefs.h CDDB_CFLAGS=`$PKG_CONFIG --cflags libcddb` CDDB_LIBS=`$PKG_CONFIG --libs libcddb` else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libcddb 1.0.0 or newer not found - CD-DA Music Provider will be built without CDDB support." >&5 $as_echo "$as_me: WARNING: *** libcddb 1.0.0 or newer not found - CD-DA Music Provider will be built without CDDB support." >&2;} fi fi if test "x$cdda" = "xyes"; then BUILD_CDDA_TRUE= BUILD_CDDA_FALSE='#' else BUILD_CDDA_TRUE='#' BUILD_CDDA_FALSE= fi # # Check for Playlist # # Check whether --with-playlist was given. if test "${with_playlist+set}" = set; then : withval=$with_playlist; else with_playlist=yes fi if test "x$with_playlist" = "xyes"; then BUILD_PLAYLIST_TRUE= BUILD_PLAYLIST_FALSE='#' else BUILD_PLAYLIST_TRUE='#' BUILD_PLAYLIST_FALSE= fi # fusionsound music providers end if test "$DIRECTFB_BUILD_ONE" = "1"; then DIRECTFB_BUILD_ONE_TRUE= DIRECTFB_BUILD_ONE_FALSE='#' else DIRECTFB_BUILD_ONE_TRUE='#' DIRECTFB_BUILD_ONE_FALSE= fi if test "$DIRECTFB_BUILD_VOODOO" = "1"; then DIRECTFB_BUILD_VOODOO_TRUE= DIRECTFB_BUILD_VOODOO_FALSE='#' else DIRECTFB_BUILD_VOODOO_TRUE='#' DIRECTFB_BUILD_VOODOO_FALSE= fi if test "$DIRECTFB_BUILD_PURE_VOODOO" = "1"; then DIRECTFB_BUILD_PURE_VOODOO_TRUE= DIRECTFB_BUILD_PURE_VOODOO_FALSE='#' else DIRECTFB_BUILD_PURE_VOODOO_TRUE='#' DIRECTFB_BUILD_PURE_VOODOO_FALSE= fi LIBM="" if test "$enable_pure_voodoo" = "no"; then safe_LIBS=$LIBS save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-error" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sqrt" >&5 $as_echo_n "checking for library containing sqrt... " >&6; } if ${ac_cv_search_sqrt+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sqrt (); int main () { return sqrt (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sqrt=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sqrt+:} false; then : break fi done if ${ac_cv_search_sqrt+:} false; then : else ac_cv_search_sqrt=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sqrt" >&5 $as_echo "$ac_cv_search_sqrt" >&6; } ac_res=$ac_cv_search_sqrt if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" LIBM=$ac_cv_search_sqrt else LIBM=no fi CFLAGS="$save_CFLAGS" LIBS=$safe_LIBS if test "$LIBM" = "none required" ; then LIBM="" elif test "$LIBM" = "no" ; then as_fn_error $? "*** DirectFB requires libm." "$LINENO" 5 fi fi if test "$enable_multi" = "yes"; then ENABLE_MULTI_TRUE= ENABLE_MULTI_FALSE='#' else ENABLE_MULTI_TRUE='#' ENABLE_MULTI_FALSE= fi if test "$enable_one" = "yes"; then ENABLE_ONE_TRUE= ENABLE_ONE_FALSE='#' else ENABLE_ONE_TRUE='#' ENABLE_ONE_FALSE= fi if test "$enable_voodoo" = "yes"; then ENABLE_VOODOO_TRUE= ENABLE_VOODOO_FALSE='#' else ENABLE_VOODOO_TRUE='#' ENABLE_VOODOO_FALSE= fi if test "$enable_sawman" = "yes"; then ENABLE_SAWMAN_TRUE= ENABLE_SAWMAN_FALSE='#' else ENABLE_SAWMAN_TRUE='#' ENABLE_SAWMAN_FALSE= fi if test "$enable_fusiondale" = "yes"; then ENABLE_FUSIONDALE_TRUE= ENABLE_FUSIONDALE_FALSE='#' else ENABLE_FUSIONDALE_TRUE='#' ENABLE_FUSIONDALE_FALSE= fi if test "$enable_fusionsound" = "yes"; then ENABLE_FUSIONSOUND_TRUE= ENABLE_FUSIONSOUND_FALSE='#' else ENABLE_FUSIONSOUND_TRUE='#' ENABLE_FUSIONSOUND_FALSE= fi if test "$enable_divine" = "yes"; then ENABLE_DIVINE_TRUE= ENABLE_DIVINE_FALSE='#' else ENABLE_DIVINE_TRUE='#' ENABLE_DIVINE_FALSE= fi # Check whether --enable-unique was given. if test "${enable_unique+set}" = set; then : enableval=$enable_unique; else enable_unique=no fi if test "$enable_unique" = "yes"; then ENABLE_UNIQUE_TRUE= ENABLE_UNIQUE_FALSE='#' else ENABLE_UNIQUE_TRUE='#' ENABLE_UNIQUE_FALSE= fi # Check whether --with-cxxstd was given. if test "${with_cxxstd+set}" = set; then : withval=$with_cxxstd; cxxstd="$withval" else cxxstd="c++0x" fi test x"$cxxstd" = x"no" && cxxstd="c++0x" CXXSTD="$cxxstd" # Check whether --enable-mmx was given. if test "${enable_mmx+set}" = set; then : enableval=$enable_mmx; else enable_mmx=$have_x86 fi # Check whether --enable-sse was given. if test "${enable_sse+set}" = set; then : enableval=$enable_sse; else enable_sse=$have_x86 fi if test "$enable_mmx" = "yes"; then save_ac_ext="$ac_ext" ac_ext=S { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the binutils support MMX" >&5 $as_echo_n "checking whether the binutils support MMX... " >&6; } echo " movq 0, %mm0" > conftest.S if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then $as_echo "#define USE_MMX 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } if test "$enable_sse" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the binutils support SSE" >&5 $as_echo_n "checking whether the binutils support SSE... " >&6; } echo " movntps %xmm0, 0" > conftest.S if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then $as_echo "#define USE_SSE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else enable_sse=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: **************************************************************** The installed assembler does not support the SSE command set. Update your binutils package, if you want to compile SSE code. ****************************************************************" >&5 $as_echo "$as_me: WARNING: **************************************************************** The installed assembler does not support the SSE command set. Update your binutils package, if you want to compile SSE code. ****************************************************************" >&2;} fi fi else enable_mmx=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: **************************************************************** The installed assembler does not support the MMX command set. Update your binutils package, if you want to compile MMX code. ****************************************************************" >&5 $as_echo "$as_me: WARNING: **************************************************************** The installed assembler does not support the MMX command set. Update your binutils package, if you want to compile MMX code. ****************************************************************" >&2;} fi rm conftest* ac_ext="$save_ac_ext" else enable_sse=no fi if test "$enable_mmx" = "yes"; then BUILDMMX_TRUE= BUILDMMX_FALSE='#' else BUILDMMX_TRUE='#' BUILDMMX_FALSE= fi # Check whether --enable-pvr2d was given. if test "${enable_pvr2d+set}" = set; then : enableval=$enable_pvr2d; else enable_pvr2d=no fi if test "$enable_pvr2d" = "yes"; then PVR2D_CORE_TRUE= PVR2D_CORE_FALSE='#' else PVR2D_CORE_TRUE='#' PVR2D_CORE_FALSE= fi # Check whether --enable-egl was given. if test "${enable_egl+set}" = set; then : enableval=$enable_egl; else enable_egl=no fi if test "$enable_egl" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGL" >&5 $as_echo_n "checking for EGL... " >&6; } if test -n "$EGL_CFLAGS"; then pkg_cv_EGL_CFLAGS="$EGL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl egl\""; } >&5 ($PKG_CONFIG --exists --print-errors "gl egl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_EGL_CFLAGS=`$PKG_CONFIG --cflags "gl egl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$EGL_LIBS"; then pkg_cv_EGL_LIBS="$EGL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl egl\""; } >&5 ($PKG_CONFIG --exists --print-errors "gl egl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_EGL_LIBS=`$PKG_CONFIG --libs "gl egl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then EGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gl egl" 2>&1` else EGL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gl egl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$EGL_PKG_ERRORS" >&5 enable_egl=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** gl egl packages not found -- Building without EGL support." >&5 $as_echo "$as_me: WARNING: *** gl egl packages not found -- Building without EGL support." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_egl=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** gl egl packages not found -- Building without EGL support." >&5 $as_echo "$as_me: WARNING: *** gl egl packages not found -- Building without EGL support." >&2;} else EGL_CFLAGS=$pkg_cv_EGL_CFLAGS EGL_LIBS=$pkg_cv_EGL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_egl=yes fi fi if test "$enable_egl" = "yes"; then EGL_CORE_TRUE= EGL_CORE_FALSE='#' else EGL_CORE_TRUE='#' EGL_CORE_FALSE= fi # Check whether --enable-idirectfbgl-egl was given. if test "${enable_idirectfbgl_egl+set}" = set; then : enableval=$enable_idirectfbgl_egl; else enable_idirectfbgl_egl=no fi if test "$enable_idirectfbgl_egl" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGL" >&5 $as_echo_n "checking for EGL... " >&6; } if test -n "$EGL_CFLAGS"; then pkg_cv_EGL_CFLAGS="$EGL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl egl\""; } >&5 ($PKG_CONFIG --exists --print-errors "gl egl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_EGL_CFLAGS=`$PKG_CONFIG --cflags "gl egl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$EGL_LIBS"; then pkg_cv_EGL_LIBS="$EGL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl egl\""; } >&5 ($PKG_CONFIG --exists --print-errors "gl egl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_EGL_LIBS=`$PKG_CONFIG --libs "gl egl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then EGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gl egl" 2>&1` else EGL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gl egl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$EGL_PKG_ERRORS" >&5 enable_idirectfbgl_egl=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** gl egl packages not found -- Building without IDirectFBGL-EGL support." >&5 $as_echo "$as_me: WARNING: *** gl egl packages not found -- Building without IDirectFBGL-EGL support." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_idirectfbgl_egl=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** gl egl packages not found -- Building without IDirectFBGL-EGL support." >&5 $as_echo "$as_me: WARNING: *** gl egl packages not found -- Building without IDirectFBGL-EGL support." >&2;} else EGL_CFLAGS=$pkg_cv_EGL_CFLAGS EGL_LIBS=$pkg_cv_EGL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_idirectfbgl_egl=yes fi fi if test "$enable_idirectfbgl_egl" = "yes"; then IDIRECTFBGL_EGL_TRUE= IDIRECTFBGL_EGL_FALSE='#' else IDIRECTFBGL_EGL_TRUE='#' IDIRECTFBGL_EGL_FALSE= fi # Check whether --enable-devmem was given. if test "${enable_devmem+set}" = set; then : enableval=$enable_devmem; else enable_devmem=yes fi if test "$enable_devmem" = "yes"; then DEVMEM_CORE_TRUE= DEVMEM_CORE_FALSE='#' else DEVMEM_CORE_TRUE='#' DEVMEM_CORE_FALSE= fi # Check whether --enable-fbdev was given. if test "${enable_fbdev+set}" = set; then : enableval=$enable_fbdev; else enable_fbdev=yes fi if test "$have_linux" = "no"; then enable_fbdev=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no linux kernel -- building without linux fbdev support." >&5 $as_echo "$as_me: WARNING: *** no linux kernel -- building without linux fbdev support." >&2;} fi if test "$enable_fbdev" = "yes"; then FBDEV_CORE_TRUE= FBDEV_CORE_FALSE='#' else FBDEV_CORE_TRUE='#' FBDEV_CORE_FALSE= fi # Check whether --enable-sdl was given. if test "${enable_sdl+set}" = set; then : enableval=$enable_sdl; else enable_sdl=no fi if test "$enable_sdl" = "yes"; then if test "$enable_osx" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** SDL is now unsupported on OSX." >&5 $as_echo "$as_me: WARNING: *** SDL is now unsupported on OSX." >&2;} enable_sdl=no else pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } if test -n "$SDL_CFLAGS"; then pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SDL_LIBS"; then pkg_cv_SDL_LIBS="$SDL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sdl" 2>&1` else SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sdl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 enable_sdl=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no sdl -- building without SDL support." >&5 $as_echo "$as_me: WARNING: *** no sdl -- building without SDL support." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_sdl=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no sdl -- building without SDL support." >&5 $as_echo "$as_me: WARNING: *** no sdl -- building without SDL support." >&2;} else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_sdl=yes fi fi fi if test "$enable_sdl" = "yes"; then SDL_CORE_TRUE= SDL_CORE_FALSE='#' else SDL_CORE_TRUE='#' SDL_CORE_FALSE= fi # Check whether --enable-vnc was given. if test "${enable_vnc+set}" = set; then : enableval=$enable_vnc; else enable_vnc=yes fi if test "$enable_vnc" = "yes"; then # Extract the first word of "libvncserver-config", so it can be a program name with args. set dummy libvncserver-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_VNC_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $VNC_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_VNC_CONFIG="$VNC_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_VNC_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_VNC_CONFIG" && ac_cv_path_VNC_CONFIG="no" ;; esac fi VNC_CONFIG=$ac_cv_path_VNC_CONFIG if test -n "$VNC_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VNC_CONFIG" >&5 $as_echo "$VNC_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$VNC_CONFIG" = "no"; then enable_vnc=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libvncserver-config not found -- building without VNC support. See http://libvncserver.sourceforge.net" >&5 $as_echo "$as_me: WARNING: *** libvncserver-config not found -- building without VNC support. See http://libvncserver.sourceforge.net" >&2;} else VNC_CFLAGS=`$VNC_CONFIG --cflags` VNC_LIBS=`$VNC_CONFIG --libs` fi fi if test "$enable_vnc" = "yes"; then VNC_CORE_TRUE= VNC_CORE_FALSE='#' else VNC_CORE_TRUE='#' VNC_CORE_FALSE= fi # Check whether --enable-mesa was given. if test "${enable_mesa+set}" = set; then : enableval=$enable_mesa; else enable_mesa=yes fi if test "$enable_mesa" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MESA" >&5 $as_echo_n "checking for MESA... " >&6; } if test -n "$MESA_CFLAGS"; then pkg_cv_MESA_CFLAGS="$MESA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glesv2 egl libdrm gbm\""; } >&5 ($PKG_CONFIG --exists --print-errors "glesv2 egl libdrm gbm") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MESA_CFLAGS=`$PKG_CONFIG --cflags "glesv2 egl libdrm gbm" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$MESA_LIBS"; then pkg_cv_MESA_LIBS="$MESA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glesv2 egl libdrm gbm\""; } >&5 ($PKG_CONFIG --exists --print-errors "glesv2 egl libdrm gbm") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MESA_LIBS=`$PKG_CONFIG --libs "glesv2 egl libdrm gbm" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then MESA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glesv2 egl libdrm gbm" 2>&1` else MESA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glesv2 egl libdrm gbm" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$MESA_PKG_ERRORS" >&5 enable_mesa=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** gl egl libdrm gbm packages not found -- Building without MESA support." >&5 $as_echo "$as_me: WARNING: *** gl egl libdrm gbm packages not found -- Building without MESA support." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_mesa=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** gl egl libdrm gbm packages not found -- Building without MESA support." >&5 $as_echo "$as_me: WARNING: *** gl egl libdrm gbm packages not found -- Building without MESA support." >&2;} else MESA_CFLAGS=$pkg_cv_MESA_CFLAGS MESA_LIBS=$pkg_cv_MESA_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_mesa=yes fi fi if test "$enable_mesa" = "yes"; then MESA_CORE_TRUE= MESA_CORE_FALSE='#' else MESA_CORE_TRUE='#' MESA_CORE_FALSE= fi # Check whether --enable-drmkms was given. if test "${enable_drmkms+set}" = set; then : enableval=$enable_drmkms; else enable_drmkms=yes fi if test "$enable_drmkms" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRMKMS" >&5 $as_echo_n "checking for DRMKMS... " >&6; } if test -n "$DRMKMS_CFLAGS"; then pkg_cv_DRMKMS_CFLAGS="$DRMKMS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm libkms\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm libkms") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRMKMS_CFLAGS=`$PKG_CONFIG --cflags "libdrm libkms" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$DRMKMS_LIBS"; then pkg_cv_DRMKMS_LIBS="$DRMKMS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm libkms\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm libkms") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRMKMS_LIBS=`$PKG_CONFIG --libs "libdrm libkms" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DRMKMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm libkms" 2>&1` else DRMKMS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm libkms" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DRMKMS_PKG_ERRORS" >&5 enable_drmkms=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libdrm gbm packages not found -- Building without DRM/KMS support." >&5 $as_echo "$as_me: WARNING: *** libdrm gbm packages not found -- Building without DRM/KMS support." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_drmkms=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libdrm gbm packages not found -- Building without DRM/KMS support." >&5 $as_echo "$as_me: WARNING: *** libdrm gbm packages not found -- Building without DRM/KMS support." >&2;} else DRMKMS_CFLAGS=$pkg_cv_DRMKMS_CFLAGS DRMKMS_LIBS=$pkg_cv_DRMKMS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_drmkms=yes fi fi if test "$enable_drmkms" = "yes"; then DRMKMS_CORE_TRUE= DRMKMS_CORE_FALSE='#' else DRMKMS_CORE_TRUE='#' DRMKMS_CORE_FALSE= fi JPEG=no # Check whether --enable-jpeg was given. if test "${enable_jpeg+set}" = set; then : enableval=$enable_jpeg; else enable_jpeg=yes fi if test "$enable_jpeg" = "yes"; then if test -z "$LIBJPEG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_decompress in -ljpeg" >&5 $as_echo_n "checking for jpeg_destroy_decompress in -ljpeg... " >&6; } if ${ac_cv_lib_jpeg_jpeg_destroy_decompress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char jpeg_destroy_decompress (); int main () { return jpeg_destroy_decompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jpeg_jpeg_destroy_decompress=yes else ac_cv_lib_jpeg_jpeg_destroy_decompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_decompress" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_decompress" >&6; } if test "x$ac_cv_lib_jpeg_jpeg_destroy_decompress" = xyes; then : jpeg_ok=yes else jpeg_ok=no fi if test "$jpeg_ok" = yes; then ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default" if test "x$ac_cv_header_jpeglib_h" = xyes; then : jpeg_ok=yes else jpeg_ok=no fi if test "$jpeg_ok" = yes; then JPEG=yes LIBJPEG='-ljpeg' else JPEG=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** JPEG header files not found. JPEG image provider will not be built." >&5 $as_echo "$as_me: WARNING: *** JPEG header files not found. JPEG image provider will not be built." >&2;} fi else JPEG=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** JPEG library not found. JPEG image provider will not be built." >&5 $as_echo "$as_me: WARNING: *** JPEG library not found. JPEG image provider will not be built." >&2;} fi else JPEG=yes fi fi if test "$JPEG" = "yes"; then JPEG_PROVIDER_TRUE= JPEG_PROVIDER_FALSE='#' else JPEG_PROVIDER_TRUE='#' JPEG_PROVIDER_FALSE= fi if test "$enable_jpeg" != "no" && test "$JPEG" != "yes"; then jpeg_warning=" JPEG support is missing - many applications won't work correctly!" fi # Check whether --enable-zlib was given. if test "${enable_zlib+set}" = set; then : enableval=$enable_zlib; else enable_zlib=no fi use_zlib=no ZLIB_LIBS= if test "$enable_zlib" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzsetparams in -lz" >&5 $as_echo_n "checking for gzsetparams in -lz... " >&6; } if ${ac_cv_lib_z_gzsetparams+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gzsetparams (); int main () { return gzsetparams (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_gzsetparams=yes else ac_cv_lib_z_gzsetparams=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzsetparams" >&5 $as_echo "$ac_cv_lib_z_gzsetparams" >&6; } if test "x$ac_cv_lib_z_gzsetparams" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : use_zlib=yes $as_echo "#define USE_ZLIB 1" >>confdefs.h ZLIB_LIBS='-lz' else as_fn_error $? " *** libz header files not found." "$LINENO" 5 fi else as_fn_error $? " *** libz not found." "$LINENO" 5 fi fi PNG=no # Check whether --enable-png was given. if test "${enable_png+set}" = set; then : enableval=$enable_png; else enable_png=yes fi if test "$enable_png" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPNG" >&5 $as_echo_n "checking for LIBPNG... " >&6; } if test -n "$LIBPNG_CFLAGS"; then pkg_cv_LIBPNG_CFLAGS="$LIBPNG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.2.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng >= 1.2.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBPNG_CFLAGS=`$PKG_CONFIG --cflags "libpng >= 1.2.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBPNG_LIBS"; then pkg_cv_LIBPNG_LIBS="$LIBPNG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.2.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng >= 1.2.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBPNG_LIBS=`$PKG_CONFIG --libs "libpng >= 1.2.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBPNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpng >= 1.2.2" 2>&1` else LIBPNG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpng >= 1.2.2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBPNG_PKG_ERRORS" >&5 PNG=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** PNG library not found. PNG image provider will not be built." >&5 $as_echo "$as_me: WARNING: *** PNG library not found. PNG image provider will not be built." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PNG=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** PNG library not found. PNG image provider will not be built." >&5 $as_echo "$as_me: WARNING: *** PNG library not found. PNG image provider will not be built." >&2;} else LIBPNG_CFLAGS=$pkg_cv_LIBPNG_CFLAGS LIBPNG_LIBS=$pkg_cv_LIBPNG_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } PNG=yes fi fi if test "$PNG" = "yes"; then PNG_PROVIDER_TRUE= PNG_PROVIDER_FALSE='#' else PNG_PROVIDER_TRUE='#' PNG_PROVIDER_FALSE= fi if test "$PNG" = "yes"; then BUILD_DIRECTFB_CSOURCE_TRUE= BUILD_DIRECTFB_CSOURCE_FALSE='#' else BUILD_DIRECTFB_CSOURCE_TRUE='#' BUILD_DIRECTFB_CSOURCE_FALSE= fi if test "$enable_png" != "no" && test "$PNG" != "yes"; then png_warning=" PNG support is missing - many applications won't work correctly!" fi MNG=no # Check whether --enable-mng was given. if test "${enable_mng+set}" = set; then : enableval=$enable_mng; else enable_mng=no fi if test "$enable_mng" = "yes"; then if test -z "$LIBMNG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mng_version_text in -lmng" >&5 $as_echo_n "checking for mng_version_text in -lmng... " >&6; } if ${ac_cv_lib_mng_mng_version_text+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmng $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mng_version_text (); int main () { return mng_version_text (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mng_mng_version_text=yes else ac_cv_lib_mng_mng_version_text=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mng_mng_version_text" >&5 $as_echo "$ac_cv_lib_mng_mng_version_text" >&6; } if test "x$ac_cv_lib_mng_mng_version_text" = xyes; then : mng_ok=yes else mng_ok=no fi if test "$mng_ok" = yes; then ac_fn_c_check_header_mongrel "$LINENO" "libmng.h" "ac_cv_header_libmng_h" "$ac_includes_default" if test "x$ac_cv_header_libmng_h" = xyes; then : mng_ok=yes else mng_ok=no fi if test "$mng_ok" = yes; then MNG=yes LIBMNG='-lmng' else MNG=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** MNG header files not found. MNG video provider will not be built." >&5 $as_echo "$as_me: WARNING: *** MNG header files not found. MNG video provider will not be built." >&2;} fi else MNG=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** MNG library not found. MNG video provider will not be built." >&5 $as_echo "$as_me: WARNING: *** MNG library not found. MNG video provider will not be built." >&2;} fi else MNG=yes fi fi if test "$MNG" = "yes"; then MNG_PROVIDER_TRUE= MNG_PROVIDER_FALSE='#' else MNG_PROVIDER_TRUE='#' MNG_PROVIDER_FALSE= fi gstreamer=no # Check whether --enable-gstreamer was given. if test "${enable_gstreamer+set}" = set; then : enableval=$enable_gstreamer; else enable_gstreamer=no fi if test "$enable_gstreamer" = "yes"; then GSTREAMER_PROVIDER_TRUE= GSTREAMER_PROVIDER_FALSE='#' else GSTREAMER_PROVIDER_TRUE='#' GSTREAMER_PROVIDER_FALSE= fi HAVE_GSTREAMER_1_0=no if test "x$enable_gstreamer" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gstreamer >= 1.0" >&5 $as_echo_n "checking for Gstreamer >= 1.0... " >&6; } if $PKG_CONFIG --atleast-version "0.11" gstreamer-app-1.0 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } HAVE_GSTREAMER_1_0=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } fi if test "$HAVE_GSTREAMER_1_0" = "no"; then GSTREAMER_INCL=`$PKG_CONFIG --cflags-only-I gstreamer-app-0.10` GSTREAMER_LIBS=`$PKG_CONFIG --libs gstreamer-app-0.10` else GSTREAMER_INCL=`$PKG_CONFIG --cflags-only-I gstreamer-app-1.0` GSTREAMER_INCL="$GSTREAMER_INCL -DHAVE_GSTREAMER_1_0_API" GSTREAMER_LIBS=`$PKG_CONFIG --libs gstreamer-app-1.0` fi gstreamer=yes else GSTREAMER_INCL= GSTREAMER_LIBS= fi # Check whether --enable-gif was given. if test "${enable_gif+set}" = set; then : enableval=$enable_gif; else enable_gif=yes fi if test "$enable_gif" = "yes"; then GIF_PROVIDER_TRUE= GIF_PROVIDER_FALSE='#' else GIF_PROVIDER_TRUE='#' GIF_PROVIDER_FALSE= fi tiff="no" # Check whether --enable-tiff was given. if test "${enable_tiff+set}" = set; then : enableval=$enable_tiff; else enable_tiff=yes fi if test "$enable_tiff" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBTIFF" >&5 $as_echo_n "checking for LIBTIFF... " >&6; } if test -n "$LIBTIFF_CFLAGS"; then pkg_cv_LIBTIFF_CFLAGS="$LIBTIFF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtiff-4\""; } >&5 ($PKG_CONFIG --exists --print-errors "libtiff-4") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBTIFF_CFLAGS=`$PKG_CONFIG --cflags "libtiff-4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBTIFF_LIBS"; then pkg_cv_LIBTIFF_LIBS="$LIBTIFF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtiff-4\""; } >&5 ($PKG_CONFIG --exists --print-errors "libtiff-4") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBTIFF_LIBS=`$PKG_CONFIG --libs "libtiff-4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBTIFF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtiff-4" 2>&1` else LIBTIFF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtiff-4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBTIFF_PKG_ERRORS" >&5 tiff=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** TIFF library not found. TIFF image provider will not be built." >&5 $as_echo "$as_me: WARNING: *** TIFF library not found. TIFF image provider will not be built." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } tiff=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** TIFF library not found. TIFF image provider will not be built." >&5 $as_echo "$as_me: WARNING: *** TIFF library not found. TIFF image provider will not be built." >&2;} else LIBTIFF_CFLAGS=$pkg_cv_LIBTIFF_CFLAGS LIBTIFF_LIBS=$pkg_cv_LIBTIFF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } tiff=yes fi fi if test "$tiff" = "yes"; then TIFF_PROVIDER_TRUE= TIFF_PROVIDER_FALSE='#' else TIFF_PROVIDER_TRUE='#' TIFF_PROVIDER_FALSE= fi imlib2="no" # Check whether --enable-imlib2 was given. if test "${enable_imlib2+set}" = set; then : enableval=$enable_imlib2; else enable_imlib2=no fi if test "x$enable_imlib2" = "xyes"; then # Extract the first word of "imlib2-config", so it can be a program name with args. set dummy imlib2-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_IMLIB2_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $IMLIB2_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_IMLIB2_CONFIG="$IMLIB2_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_IMLIB2_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_IMLIB2_CONFIG" && ac_cv_path_IMLIB2_CONFIG="no" ;; esac fi IMLIB2_CONFIG=$ac_cv_path_IMLIB2_CONFIG if test -n "$IMLIB2_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMLIB2_CONFIG" >&5 $as_echo "$IMLIB2_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$IMLIB2_CONFIG" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Imlib2 library not found, building without Imlib2 support ***" >&5 $as_echo "$as_me: WARNING: *** Imlib2 library not found, building without Imlib2 support ***" >&2;} imlib2="no" else IMLIB2_CFLAGS=`imlib2-config --cflags` IMLIB2_LIBS=`imlib2-config --libs` imlib2="yes" fi fi if test "x$imlib2" = xyes; then IMLIB2_TRUE= IMLIB2_FALSE='#' else IMLIB2_TRUE='#' IMLIB2_FALSE= fi # Check whether --enable-pnm was given. if test "${enable_pnm+set}" = set; then : enableval=$enable_pnm; else enable_pnm=yes fi if test "x$enable_pnm" = "xyes"; then PNM_TRUE= PNM_FALSE='#' else PNM_TRUE='#' PNM_FALSE= fi SVGCAIRO_REQUIRED_VERSION=0.1.6 svg="no" # Check whether --enable-svg was given. if test "${enable_svg+set}" = set; then : enableval=$enable_svg; else enable_svg=no fi if test "x$enable_svg" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsvg-cairo >= $SVGCAIRO_REQUIRED_VERSION" >&5 $as_echo_n "checking for libsvg-cairo >= $SVGCAIRO_REQUIRED_VERSION... " >&6; } if $PKG_CONFIG --atleast-version=$SVGCAIRO_REQUIRED_VERSION libsvg-cairo; then SVG_CFLAGS=`$PKG_CONFIG --cflags libsvg-cairo` SVG_LIBS=`$PKG_CONFIG --libs libsvg-cairo` SVG_VERSION=`$PKG_CONFIG --modversion libsvg-cairo` { $as_echo "$as_me:${as_lineno-$LINENO}: result: found (version $SVG_VERSION)" >&5 $as_echo "found (version $SVG_VERSION)" >&6; } svg="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** SVG-Cairo at least $SVGCAIRO_REQUIRED_VERSION not found -- SVG image provider will not be built." >&5 $as_echo "$as_me: WARNING: *** SVG-Cairo at least $SVGCAIRO_REQUIRED_VERSION not found -- SVG image provider will not be built." >&2;} fi fi if test "x$svg" = "xyes"; then SVG_TRUE= SVG_FALSE='#' else SVG_TRUE='#' SVG_FALSE= fi # Check whether --enable-mpeg2 was given. if test "${enable_mpeg2+set}" = set; then : enableval=$enable_mpeg2; else enable_mpeg2=yes fi if test "x$enable_mpeg2" = "xyes"; then MPEG2_TRUE= MPEG2_FALSE='#' else MPEG2_TRUE='#' MPEG2_FALSE= fi # Check whether --enable-bmp was given. if test "${enable_bmp+set}" = set; then : enableval=$enable_bmp; else enable_bmp=yes fi if test "x$enable_bmp" = "xyes"; then BMP_TRUE= BMP_FALSE='#' else BMP_TRUE='#' BMP_FALSE= fi # Check whether --enable-jpeg2000 was given. if test "${enable_jpeg2000+set}" = set; then : enableval=$enable_jpeg2000; else enable_jpeg2000=yes fi if test "$enable_jpeg2000" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jas_image_decode in -ljasper" >&5 $as_echo_n "checking for jas_image_decode in -ljasper... " >&6; } if ${ac_cv_lib_jasper_jas_image_decode+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljasper -lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char jas_image_decode (); int main () { return jas_image_decode (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jasper_jas_image_decode=yes else ac_cv_lib_jasper_jas_image_decode=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jasper_jas_image_decode" >&5 $as_echo "$ac_cv_lib_jasper_jas_image_decode" >&6; } if test "x$ac_cv_lib_jasper_jas_image_decode" = xyes; then : jasper="yes" else jasper="no" fi if test "$jasper" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "jasper/jasper.h" "ac_cv_header_jasper_jasper_h" "$ac_includes_default" if test "x$ac_cv_header_jasper_jasper_h" = xyes; then : else jasper="no" fi fi if test "$jasper" == "yes"; then JASPER_LIBS="-ljasper -lm -ljpeg" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Jasper not found. JPEG2000 image provider will not be built." >&5 $as_echo "$as_me: WARNING: *** Jasper not found. JPEG2000 image provider will not be built." >&2;} enable_jpeg2000="no" fi fi if test "x$enable_jpeg2000" = "xyes"; then JPEG2000_TRUE= JPEG2000_FALSE='#' else JPEG2000_TRUE='#' JPEG2000_FALSE= fi # # OpenQuicktime check # openquicktime="no" # Check whether --enable-openquicktime was given. if test "${enable_openquicktime+set}" = set; then : enableval=$enable_openquicktime; else enable_openquicktime=no fi if test "x$enable_openquicktime" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quicktime_open in -lopenquicktime" >&5 $as_echo_n "checking for quicktime_open in -lopenquicktime... " >&6; } if ${ac_cv_lib_openquicktime_quicktime_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lopenquicktime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char quicktime_open (); int main () { return quicktime_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_openquicktime_quicktime_open=yes else ac_cv_lib_openquicktime_quicktime_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openquicktime_quicktime_open" >&5 $as_echo "$ac_cv_lib_openquicktime_quicktime_open" >&6; } if test "x$ac_cv_lib_openquicktime_quicktime_open" = xyes; then : openquicktime="yes" else openquicktime="no" fi if test "x$openquicktime" = xyes; then OPENQUICKTIME_LIBS="-lopenquicktime" ac_fn_c_check_header_mongrel "$LINENO" "openquicktime/openquicktime.h" "ac_cv_header_openquicktime_openquicktime_h" "$ac_includes_default" if test "x$ac_cv_header_openquicktime_openquicktime_h" = xyes; then : else openquicktime="no" fi if test "x$openquicktime" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** OpenQuicktime header not found, building without OpenQuicktime support ***" >&5 $as_echo "$as_me: WARNING: *** OpenQuicktime header not found, building without OpenQuicktime support ***" >&2;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** OpenQuicktime library not found, building without OpenQuicktime support ***" >&5 $as_echo "$as_me: WARNING: *** OpenQuicktime library not found, building without OpenQuicktime support ***" >&2;} fi fi if test "x$openquicktime" = xyes; then OPENQUICKTIME_PROVIDER_TRUE= OPENQUICKTIME_PROVIDER_FALSE='#' else OPENQUICKTIME_PROVIDER_TRUE='#' OPENQUICKTIME_PROVIDER_FALSE= fi # # Avifile check # avifile=no # Check whether --enable-avifile was given. if test "${enable_avifile+set}" = set; then : enableval=$enable_avifile; else enable_avifile=no fi if test x$enable_avifile = xyes; then # Extract the first word of "avifile-config", so it can be a program name with args. set dummy avifile-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_AVIFILE_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $AVIFILE_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_AVIFILE_CONFIG="$AVIFILE_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AVIFILE_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_AVIFILE_CONFIG" && ac_cv_path_AVIFILE_CONFIG="no" ;; esac fi AVIFILE_CONFIG=$ac_cv_path_AVIFILE_CONFIG if test -n "$AVIFILE_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AVIFILE_CONFIG" >&5 $as_echo "$AVIFILE_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$AVIFILE_CONFIG = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** avifile-config not found -- AVI media provider will not be built." >&5 $as_echo "$as_me: WARNING: *** avifile-config not found -- AVI media provider will not be built." >&2;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else 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". rm -rf conftest.dir 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_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # 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. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi avifile=yes AVIFILE_CFLAGS=`$AVIFILE_CONFIG --cflags` AVIFILE_LIBS="`$AVIFILE_CONFIG --libs` -lstdc++" fi fi if test x$avifile = xyes; then AVIFILE_PROVIDER_TRUE= AVIFILE_PROVIDER_FALSE='#' else AVIFILE_PROVIDER_TRUE='#' AVIFILE_PROVIDER_FALSE= fi # # libmpeg3 check # mpeg3=no # Check whether --enable-libmpeg3 was given. if test "${enable_libmpeg3+set}" = set; then : enableval=$enable_libmpeg3; else enable_libmpeg3=no fi if test x$enable_libmpeg3 = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpeg3_open in -lmpeg3" >&5 $as_echo_n "checking for mpeg3_open in -lmpeg3... " >&6; } if ${ac_cv_lib_mpeg3_mpeg3_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpeg3 -lm -lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mpeg3_open (); int main () { return mpeg3_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mpeg3_mpeg3_open=yes else ac_cv_lib_mpeg3_mpeg3_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpeg3_mpeg3_open" >&5 $as_echo "$ac_cv_lib_mpeg3_mpeg3_open" >&6; } if test "x$ac_cv_lib_mpeg3_mpeg3_open" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "libmpeg3.h" "ac_cv_header_libmpeg3_h" "$ac_includes_default" if test "x$ac_cv_header_libmpeg3_h" = xyes; then : mpeg3=yes LIBMPEG3_LIBS='-lmpeg3' else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libmpeg3 headers not found -- Libmpeg3 video provider will not be built." >&5 $as_echo "$as_me: WARNING: *** libmpeg3 headers not found -- Libmpeg3 video provider will not be built." >&2;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libmpeg3 not found -- Libmpeg3 video provider will not be build." >&5 $as_echo "$as_me: WARNING: *** libmpeg3 not found -- Libmpeg3 video provider will not be build." >&2;} fi fi if test x$mpeg3 = xyes; then LIBMPEG3_PROVIDER_TRUE= LIBMPEG3_PROVIDER_FALSE='#' else LIBMPEG3_PROVIDER_TRUE='#' LIBMPEG3_PROVIDER_FALSE= fi # # Libflash check # flash=no # Check whether --enable-flash was given. if test "${enable_flash+set}" = set; then : enableval=$enable_flash; else enable_flash=no fi if test x$enable_flash = xyes; then ac_fn_c_check_header_mongrel "$LINENO" "flash.h" "ac_cv_header_flash_h" "$ac_includes_default" if test "x$ac_cv_header_flash_h" = xyes; then : ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else 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". rm -rf conftest.dir 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_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # 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. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzsetparams in -lz" >&5 $as_echo_n "checking for gzsetparams in -lz... " >&6; } if ${ac_cv_lib_z_gzsetparams+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gzsetparams (); int main () { return gzsetparams (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_z_gzsetparams=yes else ac_cv_lib_z_gzsetparams=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzsetparams" >&5 $as_echo "$ac_cv_lib_z_gzsetparams" >&6; } if test "x$ac_cv_lib_z_gzsetparams" = xyes; then : LIBZ=-lz fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_decompress in -ljpeg" >&5 $as_echo_n "checking for jpeg_destroy_decompress in -ljpeg... " >&6; } if ${ac_cv_lib_jpeg_jpeg_destroy_decompress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char jpeg_destroy_decompress (); int main () { return jpeg_destroy_decompress (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_jpeg_jpeg_destroy_decompress=yes else ac_cv_lib_jpeg_jpeg_destroy_decompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_decompress" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_decompress" >&6; } if test "x$ac_cv_lib_jpeg_jpeg_destroy_decompress" = xyes; then : LIBJPEG=-ljpeg fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FlashGetInfo in -lflash" >&5 $as_echo_n "checking for FlashGetInfo in -lflash... " >&6; } if ${ac_cv_lib_flash_FlashGetInfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lflash $LIBJPEG $LIBZ -lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char FlashGetInfo (); int main () { return FlashGetInfo (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_flash_FlashGetInfo=yes else ac_cv_lib_flash_FlashGetInfo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_flash_FlashGetInfo" >&5 $as_echo "$ac_cv_lib_flash_FlashGetInfo" >&6; } if test "x$ac_cv_lib_flash_FlashGetInfo" = xyes; then : flash=yes FLASH_LIBS="-lflash $LIBJPEG $LIBZ -lm" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libflash not found -- Flash media provider will not be built." >&5 $as_echo "$as_me: WARNING: *** libflash not found -- Flash media provider will not be built." >&2;} fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libflash headers not found -- Flash media provider will not be built." >&5 $as_echo "$as_me: WARNING: *** libflash headers not found -- Flash media provider will not be built." >&2;} fi fi if test x$flash = xyes; then FLASH_PROVIDER_TRUE= FLASH_PROVIDER_FALSE='#' else FLASH_PROVIDER_TRUE='#' FLASH_PROVIDER_FALSE= fi # # Xine check # xine="no" # Check whether --enable-xine was given. if test "${enable_xine+set}" = set; then : enableval=$enable_xine; else enable_xine=no fi if test "x$enable_xine" = "xyes"; then # Extract the first word of "xine-config", so it can be a program name with args. set dummy xine-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XINE_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $XINE_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_XINE_CONFIG="$XINE_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XINE_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_XINE_CONFIG" && ac_cv_path_XINE_CONFIG="no" ;; esac fi XINE_CONFIG=$ac_cv_path_XINE_CONFIG if test -n "$XINE_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XINE_CONFIG" >&5 $as_echo "$XINE_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$XINE_CONFIG" = "xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** xine-config not found -- Xine video provider will not be built." >&5 $as_echo "$as_me: WARNING: *** xine-config not found -- Xine video provider will not be built." >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xine-lib >= 1.0.0" >&5 $as_echo_n "checking for xine-lib >= 1.0.0... " >&6; } XINE_VERSION=`$XINE_CONFIG --version` case $XINE_VERSION in 1.*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } xine="yes" XINE_CFLAGS=`$XINE_CONFIG --cflags` XINE_LIBS=`$XINE_CONFIG --libs` XINE_PLUGINDIR=`$XINE_CONFIG --plugindir` ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** xine-lib 1.0.0 or newer is required - Xine video provider will not be built." >&5 $as_echo "$as_me: WARNING: *** xine-lib 1.0.0 or newer is required - Xine video provider will not be built." >&2;} ;; esac fi fi if test "x$xine" = "xyes"; then XINE_PROVIDER_TRUE= XINE_PROVIDER_FALSE='#' else XINE_PROVIDER_TRUE='#' XINE_PROVIDER_FALSE= fi # # Xine/VDPAU check # xine_vdpau="no" # Check whether --enable-xine-vdpau was given. if test "${enable_xine_vdpau+set}" = set; then : enableval=$enable_xine_vdpau; else enable_xine_vdpau=no fi if test "x$enable_xine_vdpau" = "xyes"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$PKG_CONFIG" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** pkg-config not found -- Xine/VDPAU video provider will not be built." >&5 $as_echo "$as_me: WARNING: *** pkg-config not found -- Xine/VDPAU video provider will not be built." >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xine-lib >= 1.1.90" >&5 $as_echo_n "checking for xine-lib >= 1.1.90... " >&6; } if $PKG_CONFIG --atleast-version 1.1.90 libxine; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdpau >= 0.3" >&5 $as_echo_n "checking for vdpau >= 0.3... " >&6; } if $PKG_CONFIG --atleast-version 0.3 vdpau; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } xine_vdpau="yes" XINE_VDPAU_CFLAGS=`$PKG_CONFIG --cflags libxine vdpau` XINE_VDPAU_LIBS=`$PKG_CONFIG --libs libxine vdpau` XINE_VDPAU_PLUGINDIR=`$PKG_CONFIG --variable=plugindir libxine` else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** vdpau 0.3 or newer is required - Xine/VDPAU video provider will not be built." >&5 $as_echo "$as_me: WARNING: *** vdpau 0.3 or newer is required - Xine/VDPAU video provider will not be built." >&2;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** xine-lib 1.1.90 or newer is required - Xine/VDPAU video provider will not be built." >&5 $as_echo "$as_me: WARNING: *** xine-lib 1.1.90 or newer is required - Xine/VDPAU video provider will not be built." >&2;} fi fi fi if test "x$xine_vdpau" = "xyes"; then XINE_VDPAU_PROVIDER_TRUE= XINE_VDPAU_PROVIDER_FALSE='#' else XINE_VDPAU_PROVIDER_TRUE='#' XINE_VDPAU_PROVIDER_FALSE= fi # # Swfdec check # swfdec="no" # Check whether --enable-swfdec was given. if test "${enable_swfdec+set}" = set; then : enableval=$enable_swfdec; else enable_swfdec=no fi if test "x$enable_swfdec" = "xyes"; then swfdec_pc="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libswfdec >= 0.5.0" >&5 $as_echo_n "checking for libswfdec >= 0.5.0... " >&6; } for i in "swfdec" "swfdec-0.5"; do if $PKG_CONFIG --atleast-version=0.5.0 $i; then swfdec_pc=$i fi done if test "x$swfdec_pc" != "xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } swfdec="yes" SWFDEC_CFLAGS=`$PKG_CONFIG --cflags $swfdec_pc` SWFDEC_LIBS=`$PKG_CONFIG --libs $swfdec_pc` else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Swfdec 0.5.0 or newer is required - Swfdec video provider will not be built." >&5 $as_echo "$as_me: WARNING: *** Swfdec 0.5.0 or newer is required - Swfdec video provider will not be built." >&2;} fi fi if test "x$swfdec" = "xyes"; then SWFDEC_PROVIDER_TRUE= SWFDEC_PROVIDER_FALSE='#' else SWFDEC_PROVIDER_TRUE='#' SWFDEC_PROVIDER_FALSE= fi # # FFmpeg check # ffmpeg="no" # Check whether --enable-ffmpeg was given. if test "${enable_ffmpeg+set}" = set; then : enableval=$enable_ffmpeg; else enable_ffmpeg=no fi if test "x$enable_ffmpeg" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libavcodec/libavformat/libavutil/libswscale" >&5 $as_echo_n "checking for libavcodec/libavformat/libavutil/libswscale... " >&6; } if $PKG_CONFIG libavcodec libavformat libavutil libswscale; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ffmpeg="yes" FFMPEG_CFLAGS=`$PKG_CONFIG --cflags libavcodec libavformat libavutil libswscale` FFMPEG_LIBS=`$PKG_CONFIG --libs libavcodec libavformat libavutil libswscale` else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libavcodec/libavformat/libavutil are required - FFmpeg video provider and music provider will not be built." >&5 $as_echo "$as_me: WARNING: *** libavcodec/libavformat/libavutil are required - FFmpeg video provider and music provider will not be built." >&2;} fi fi if test "x$ffmpeg" = "xyes"; then FFMPEG_PROVIDER_TRUE= FFMPEG_PROVIDER_FALSE='#' else FFMPEG_PROVIDER_TRUE='#' FFMPEG_PROVIDER_FALSE= fi if test "x$ffmpeg" = "xyes"; then BUILD_FFMPEG_TRUE= BUILD_FFMPEG_FALSE='#' else BUILD_FFMPEG_TRUE='#' BUILD_FFMPEG_FALSE= fi # Check whether --enable-freetype was given. if test "${enable_freetype+set}" = set; then : enableval=$enable_freetype; else enable_freetype=yes fi if test "$enable_freetype" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5 $as_echo_n "checking for FREETYPE... " >&6; } if test -n "$FREETYPE_CFLAGS"; then pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$FREETYPE_LIBS"; then pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freetype2" 2>&1` else FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freetype2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$FREETYPE_PKG_ERRORS" >&5 FREETYPE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no freetype -- FreeType font provider will not be built." >&5 $as_echo "$as_me: WARNING: *** no freetype -- FreeType font provider will not be built." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } FREETYPE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no freetype -- FreeType font provider will not be built." >&5 $as_echo "$as_me: WARNING: *** no freetype -- FreeType font provider will not be built." >&2;} else FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FREETYPE="yes" fi fi if test "$FREETYPE" = "yes"; then FREETYPE_PROVIDER_TRUE= FREETYPE_PROVIDER_FALSE='#' else FREETYPE_PROVIDER_TRUE='#' FREETYPE_PROVIDER_FALSE= fi if test "$enable_freetype" != "no" && test "$FREETYPE" != "yes"; then freetype_warning=" FreeType2 support is missing - many applications won't work correctly!" fi # Check whether --enable-linotype was given. if test "${enable_linotype+set}" = set; then : enableval=$enable_linotype; fi if test "x$enable_linotype" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LINOTYPE" >&5 $as_echo_n "checking for LINOTYPE... " >&6; } if test -n "$LINOTYPE_CFLAGS"; then pkg_cv_LINOTYPE_CFLAGS="$LINOTYPE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"linotype\""; } >&5 ($PKG_CONFIG --exists --print-errors "linotype") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LINOTYPE_CFLAGS=`$PKG_CONFIG --cflags "linotype" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LINOTYPE_LIBS"; then pkg_cv_LINOTYPE_LIBS="$LINOTYPE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"linotype\""; } >&5 ($PKG_CONFIG --exists --print-errors "linotype") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LINOTYPE_LIBS=`$PKG_CONFIG --libs "linotype" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LINOTYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "linotype" 2>&1` else LINOTYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "linotype" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LINOTYPE_PKG_ERRORS" >&5 LINOTYPE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no linotype -- LinoType font provider will not be built." >&5 $as_echo "$as_me: WARNING: *** no linotype -- LinoType font provider will not be built." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LINOTYPE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no linotype -- LinoType font provider will not be built." >&5 $as_echo "$as_me: WARNING: *** no linotype -- LinoType font provider will not be built." >&2;} else LINOTYPE_CFLAGS=$pkg_cv_LINOTYPE_CFLAGS LINOTYPE_LIBS=$pkg_cv_LINOTYPE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LINOTYPE="yes" fi fi if test "$LINOTYPE" = "yes"; then LINOTYPE_PROVIDER_TRUE= LINOTYPE_PROVIDER_FALSE='#' else LINOTYPE_PROVIDER_TRUE='#' LINOTYPE_PROVIDER_FALSE= fi V4L=no if test "$have_linux" = "yes"; then # Check whether --enable-video4linux was given. if test "${enable_video4linux+set}" = set; then : enableval=$enable_video4linux; else enable_video4linux=yes fi if test "$enable_video4linux" = "yes"; then V4L=yes fi fi if test "$V4L" = "yes"; then V4L_PROVIDER_TRUE= V4L_PROVIDER_FALSE='#' else V4L_PROVIDER_TRUE='#' V4L_PROVIDER_FALSE= fi V4L2=no if test "$V4L" = "yes"; then # Check whether --enable-video4linux2 was given. if test "${enable_video4linux2+set}" = set; then : enableval=$enable_video4linux2; else enable_video4linux2=no fi if test "$enable_video4linux2" = "yes"; then V4L2=yes $as_echo "#define DFB_HAVE_V4L2 1" >>confdefs.h fi fi webp=no # Check whether --enable-webp was given. if test "${enable_webp+set}" = set; then : enableval=$enable_webp; else enable_webp=yes fi if test "$enable_webp" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBWEBP" >&5 $as_echo_n "checking for LIBWEBP... " >&6; } if test -n "$LIBWEBP_CFLAGS"; then pkg_cv_LIBWEBP_CFLAGS="$LIBWEBP_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwebp >= 0.2.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "libwebp >= 0.2.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBWEBP_CFLAGS=`$PKG_CONFIG --cflags "libwebp >= 0.2.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBWEBP_LIBS"; then pkg_cv_LIBWEBP_LIBS="$LIBWEBP_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwebp >= 0.2.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "libwebp >= 0.2.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBWEBP_LIBS=`$PKG_CONFIG --libs "libwebp >= 0.2.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBWEBP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libwebp >= 0.2.1" 2>&1` else LIBWEBP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libwebp >= 0.2.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBWEBP_PKG_ERRORS" >&5 webp=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** WebP library not found. WEBP image provider will not be built." >&5 $as_echo "$as_me: WARNING: *** WebP library not found. WEBP image provider will not be built." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } webp=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** WebP library not found. WEBP image provider will not be built." >&5 $as_echo "$as_me: WARNING: *** WebP library not found. WEBP image provider will not be built." >&2;} else LIBWEBP_CFLAGS=$pkg_cv_LIBWEBP_CFLAGS LIBWEBP_LIBS=$pkg_cv_LIBWEBP_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } webp=yes fi fi if test "$webp" = "yes"; then WEBP_PROVIDER_TRUE= WEBP_PROVIDER_FALSE='#' else WEBP_PROVIDER_TRUE='#' WEBP_PROVIDER_FALSE= fi ati128=no cle266=no cyber5k=no davinci=no ep9x=no gp2d=no gl=no gles2=no glx=no i810=no i830=no mach64=no matrox=no neomagic=no nsc=no nvidia=no omap=no pvr2d=no egl=no pxa3xx=no radeon=no savage=no sh772x=no sis315=no tdfx=no unichrome=no vdpau=no vmware=no if test "$have_linux" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking which gfxdrivers should be built" >&5 $as_echo_n "checking which gfxdrivers should be built... " >&6; } # Check whether --with-gfxdrivers was given. if test "${with_gfxdrivers+set}" = set; then : withval=$with_gfxdrivers; gfxdrivers="$withval" else gfxdrivers=all fi if test "$gfxdrivers" = "all"; then checkfor_ati128=yes checkfor_cle266=no checkfor_cyber5k=no checkfor_davinci="$have_arm" checkfor_ep9x=yes checkfor_gp2d=no checkfor_gl=yes checkfor_gles2=yes checkfor_i810=yes checkfor_i830=yes checkfor_mach64=yes checkfor_matrox=yes checkfor_neomagic=yes checkfor_nsc=yes checkfor_nvidia=yes checkfor_omap="$have_arm" checkfor_pvr2d=yes checkfor_pxa3xx=yes checkfor_radeon=no checkfor_savage=no checkfor_sh772x=yes checkfor_sis315=yes checkfor_tdfx=yes checkfor_unichrome=no checkfor_vdpau=yes checkfor_vmware=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: all" >&5 $as_echo "all" >&6; } else if test "$gfxdrivers" != "none"; then gfxdrivers=`echo $gfxdrivers | sed 's/,/ /g'` for gfxdriver in $gfxdrivers do case "$gfxdriver" in ati128) checkfor_ati128=yes ;; cle266) checkfor_cle266=yes ;; cyber5k) checkfor_cyber5k=yes ;; davinci) checkfor_davinci=yes ;; ep9x) checkfor_ep9x=yes ;; gp2d) checkfor_gp2d=yes ;; gl) checkfor_gl=yes ;; gles2) checkfor_gles2=yes ;; i810) checkfor_i810=yes ;; i830) checkfor_i830=yes ;; mach64) checkfor_mach64=yes ;; matrox) checkfor_matrox=yes ;; neomagic) checkfor_neomagic=yes ;; nsc) checkfor_nsc=yes ;; nvidia) checkfor_nvidia=yes ;; omap) checkfor_omap=yes ;; pvr2d) checkfor_pvr2d=yes ;; pxa3xx) checkfor_pxa3xx=yes ;; radeon) checkfor_radeon=yes ;; savage) checkfor_savage=yes ;; sh772x) checkfor_sh772x=yes ;; sis315) checkfor_sis315=yes ;; tdfx) checkfor_tdfx=yes ;; unichrome) checkfor_unichrome=yes ;; vmware) checkfor_vmware=yes ;; vdpau) checkfor_vdpau=yes ;; *) echo "Unknown gfxdriver $gfxdriver, exiting!" exit 1 ;; esac done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gfxdrivers" >&5 $as_echo "$gfxdrivers" >&6; } fi fi if test "$checkfor_ati128" = "yes"; then ati128=yes fi if test "$checkfor_cle266" = "yes" && test "$have_sysio" = "yes"; then cle266=yes fi if test "$checkfor_cyber5k" = "yes"; then cyber5k=yes fi if test "$checkfor_davinci" = "yes"; then davinci=yes fi if test "$checkfor_ep9x" = "yes"; then ep9x=yes fi if test "$checkfor_gp2d" = "yes"; then gp2d=yes fi if test "$checkfor_gl" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" if test "x$ac_cv_header_GL_gl_h" = xyes; then : gl=yes fi ac_fn_c_check_header_mongrel "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "$ac_includes_default" if test "x$ac_cv_header_GL_glx_h" = xyes; then : glx=yes $as_echo "#define USE_GLX 1" >>confdefs.h fi GL_LIBS="-lGL" fi if test "$checkfor_gles2" = "yes"; then if test "$enable_egl" = "yes"; then GLES2_CFLAGS="$GLES2_CFLAGS $EGL_CFLAGS -DGLES2_EGL" GLES2_LIBS="$GLES2_LIBS $EGL_LIBS" fi if test "$enable_mesa" = "yes"; then GLES2_CFLAGS="$GLES2_CFLAGS $MESA_CFLAGS -DGLES2_MESA" GLES2_LIBS="$GLES2_LIBS $MESA_LIBS" fi if test "$enable_pvr2d" = "yes"; then GLES2_CFLAGS="$GLES2_CFLAGS $PVR2D_CFLAGS -DGLES2_PVR2D" GLES2_LIBS="$GLES2_LIBS $PVR2D_LIBS" fi if test -n "$GLES2_CFLAGS"; then gles2=yes fi fi if test "$checkfor_i810" = "yes" && test "$have_sysio" = "yes"; then i810=yes fi if test "$checkfor_i830" = "yes" && test "$have_sysio" = "yes"; then i830=yes fi if test "$checkfor_mach64" = "yes"; then mach64=yes fi if test "$checkfor_matrox" = "yes"; then matrox=yes fi if test "$checkfor_neomagic" = "yes" && test "$have_sysio" = "yes"; then neomagic=yes fi if test "$checkfor_nsc" = "yes"; then nsc=yes fi if test "$checkfor_nvidia" = "yes"; then nvidia=yes fi if test "$checkfor_omap" = "yes"; then omap=yes fi if test "$checkfor_pvr2d" = "yes"; then if test "$enable_pvr2d" = "yes"; then pvr2d=yes fi fi if test "$checkfor_pxa3xx" = "yes"; then pxa3xx=yes fi if test "$checkfor_radeon" = "yes"; then radeon=yes fi if test "$checkfor_savage" = "yes" && test "$have_sysio" = "yes"; then savage=yes fi if test "$checkfor_sh772x" = "yes" && test "$have_sh4" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH772X_DEP" >&5 $as_echo_n "checking for SH772X_DEP... " >&6; } if test -n "$SH772X_DEP_CFLAGS"; then pkg_cv_SH772X_DEP_CFLAGS="$SH772X_DEP_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uiomux >= 1.5.0 shbeu >= 1.0.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "uiomux >= 1.5.0 shbeu >= 1.0.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SH772X_DEP_CFLAGS=`$PKG_CONFIG --cflags "uiomux >= 1.5.0 shbeu >= 1.0.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SH772X_DEP_LIBS"; then pkg_cv_SH772X_DEP_LIBS="$SH772X_DEP_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uiomux >= 1.5.0 shbeu >= 1.0.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "uiomux >= 1.5.0 shbeu >= 1.0.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SH772X_DEP_LIBS=`$PKG_CONFIG --libs "uiomux >= 1.5.0 shbeu >= 1.0.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SH772X_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "uiomux >= 1.5.0 shbeu >= 1.0.2" 2>&1` else SH772X_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "uiomux >= 1.5.0 shbeu >= 1.0.2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SH772X_DEP_PKG_ERRORS" >&5 sh772x=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } sh772x=no else SH772X_DEP_CFLAGS=$pkg_cv_SH772X_DEP_CFLAGS SH772X_DEP_LIBS=$pkg_cv_SH772X_DEP_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } sh772x=yes fi if test "$sh772x" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Missing UIOMUX or SHBEU library -- sh772x driver will not be built." >&5 $as_echo "$as_me: WARNING: *** Missing UIOMUX or SHBEU library -- sh772x driver will not be built." >&2;} fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH772X_SHJPEG_DEP" >&5 $as_echo_n "checking for SH772X_SHJPEG_DEP... " >&6; } if test -n "$SH772X_SHJPEG_DEP_CFLAGS"; then pkg_cv_SH772X_SHJPEG_DEP_CFLAGS="$SH772X_SHJPEG_DEP_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"shjpeg >= 1.3.3\""; } >&5 ($PKG_CONFIG --exists --print-errors "shjpeg >= 1.3.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SH772X_SHJPEG_DEP_CFLAGS=`$PKG_CONFIG --cflags "shjpeg >= 1.3.3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SH772X_SHJPEG_DEP_LIBS"; then pkg_cv_SH772X_SHJPEG_DEP_LIBS="$SH772X_SHJPEG_DEP_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"shjpeg >= 1.3.3\""; } >&5 ($PKG_CONFIG --exists --print-errors "shjpeg >= 1.3.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SH772X_SHJPEG_DEP_LIBS=`$PKG_CONFIG --libs "shjpeg >= 1.3.3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SH772X_SHJPEG_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "shjpeg >= 1.3.3" 2>&1` else SH772X_SHJPEG_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "shjpeg >= 1.3.3" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SH772X_SHJPEG_DEP_PKG_ERRORS" >&5 sh772x_shjpeg=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } sh772x_shjpeg=no else SH772X_SHJPEG_DEP_CFLAGS=$pkg_cv_SH772X_SHJPEG_DEP_CFLAGS SH772X_SHJPEG_DEP_LIBS=$pkg_cv_SH772X_SHJPEG_DEP_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } sh772x_shjpeg=yes fi if test "$sh772x_shjpeg" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Missing SHJPEG library -- sh772x driver will be build without shjpeg support." >&5 $as_echo "$as_me: WARNING: *** Missing SHJPEG library -- sh772x driver will be build without shjpeg support." >&2;} fi fi if test "$sh772x" = "yes"; then $as_echo "#define HAVE_GFX_SH772X /**/" >>confdefs.h fi if test "$checkfor_sis315" = "yes"; then sis315=yes fi if test "$checkfor_tdfx" = "yes"; then tdfx=yes fi if test "$checkfor_unichrome" = "yes" && test "$have_sysio" = "yes"; then unichrome=yes fi if test "$checkfor_vmware" = "yes"; then vmware=yes fi if test "$checkfor_vdpau" = "yes"; then if test "$enable_x11vdpau" = "yes"; then vdpau=yes fi fi # lets check for input driver checkfor_dbox2remote=no checkfor_dreamboxremote=no checkfor_dynapro=no checkfor_elo=no checkfor_gunze=no checkfor_h3600ts=no checkfor_input_hub=no checkfor_joystick=no checkfor_keyboard=no checkfor_linux_input=no checkfor_lirc=no checkfor_mutouch=no checkfor_zytronic=no checkfor_penmount=no checkfor_ps2mouse=no checkfor_serialmouse=no checkfor_sonypijogdial=no checkfor_tslib=no checkfor_ucb1x00=no checkfor_wm97xx=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking which inputdrivers should be built" >&5 $as_echo_n "checking which inputdrivers should be built... " >&6; } # Check whether --with-inputdrivers was given. if test "${with_inputdrivers+set}" = set; then : withval=$with_inputdrivers; inputdrivers="$withval" else inputdrivers=all fi if test "$inputdrivers" = "all"; then checkfor_dbox2remote=yes checkfor_dreamboxremote=yes checkfor_dynapro=no checkfor_elo=no checkfor_gunze=no checkfor_h3600ts=yes checkfor_input_hub=yes checkfor_joystick=yes checkfor_keyboard=yes checkfor_linux_input=yes checkfor_lirc=yes checkfor_mutouch=yes checkfor_zytronic=yes checkfor_penmount=yes checkfor_ps2mouse=yes checkfor_serialmouse=yes checkfor_sonypijogdial=yes checkfor_tslib=yes checkfor_ucb1x00="$have_arm" checkfor_wm97xx=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: all" >&5 $as_echo "all" >&6; } else if test "$inputdrivers" != "none"; then inputdrivers=`echo $inputdrivers | sed 's/,/ /g'` for inputdriver in $inputdrivers do case "$inputdriver" in dbox2remote) checkfor_dbox2remote=yes ;; dreamboxremote) checkfor_dreamboxremote=yes ;; dynapro) checkfor_dynapro=yes ;; elo-input) checkfor_elo=yes ;; gunze) checkfor_gunze=yes ;; h3600_ts) checkfor_h3600ts=yes ;; input_hub) checkfor_input_hub=yes ;; joystick) checkfor_joystick=yes ;; keyboard) checkfor_keyboard=yes ;; linuxinput) checkfor_linux_input=yes ;; lirc) checkfor_lirc=yes ;; mutouch) checkfor_mutouch=yes ;; zytronic) checkfor_zytronic=yes ;; penmount) checkfor_penmount=yes ;; ps2mouse) checkfor_ps2mouse=yes ;; serialmouse) checkfor_serialmouse=yes ;; sonypijogdial) checkfor_sonypijogdial=yes ;; tslib) checkfor_tslib=yes ;; ucb1x00) checkfor_ucb1x00=yes ;; wm97xx) checkfor_wm97xx=yes ;; *) echo "Unknown inputdriver $inputdriver, exiting!" exit 1 ;; esac done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $inputdrivers" >&5 $as_echo "$inputdrivers" >&6; } fi fi enable_dbox2remote=no if test "$checkfor_dbox2remote" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "dbox/fp.h" "ac_cv_header_dbox_fp_h" "$ac_includes_default" if test "x$ac_cv_header_dbox_fp_h" = xyes; then : enable_dbox2remote=yes else enable_dbox2remote=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** DBox2 Remote input driver will not be built." >&5 $as_echo "$as_me: WARNING: *** DBox2 Remote input driver will not be built." >&2;} fi fi enable_dreamboxremote=no if test "$checkfor_dreamboxremote" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "dbox/fp.h" "ac_cv_header_dbox_fp_h" "$ac_includes_default" if test "x$ac_cv_header_dbox_fp_h" = xyes; then : enable_dreamboxremote=yes else enable_dreamboxremote=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** DreamBox Remote input driver will not be built." >&5 $as_echo "$as_me: WARNING: *** DreamBox Remote input driver will not be built." >&2;} fi fi enable_dynapro_ts=no if test "$checkfor_dynapro" = "yes"; then enable_dynapro_ts=yes fi enable_elo_input=no if test "$checkfor_elo" = "yes"; then enable_elo_input=yes fi enable_gunze_input=no if test "$checkfor_gunze" = "yes"; then enable_gunze_input=yes fi enable_h3600_ts=no if test "$checkfor_h3600ts" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "linux/h3600_ts.h" "ac_cv_header_linux_h3600_ts_h" "$ac_includes_default" if test "x$ac_cv_header_linux_h3600_ts_h" = xyes; then : enable_h3600_ts=yes else enable_h3600_ts=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** H3600 Touchscreen driver will not be built." >&5 $as_echo "$as_me: WARNING: *** H3600 Touchscreen driver will not be built." >&2;} fi fi enable_input_hub=no if test "$checkfor_input_hub" = "yes"; then enable_input_hub=yes fi enable_joystick=no if test "$checkfor_joystick" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "linux/joystick.h" "ac_cv_header_linux_joystick_h" "$ac_includes_default" if test "x$ac_cv_header_linux_joystick_h" = xyes; then : enable_joystick=yes else enable_joystick=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no linux/joystick.h -- Joystick driver will not be built." >&5 $as_echo "$as_me: WARNING: *** no linux/joystick.h -- Joystick driver will not be built." >&2;} fi fi enable_keyboard=no if test "$checkfor_keyboard" = "yes"; then enable_keyboard=yes fi enable_linux_input=no if test "$checkfor_linux_input" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default" if test "x$ac_cv_header_linux_input_h" = xyes; then : enable_linux_input=yes else enable_linux_input=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no linux/input.h -- Linux Input driver will not be built." >&5 $as_echo "$as_me: WARNING: *** no linux/input.h -- Linux Input driver will not be built." >&2;} fi if test "$enable_linux_input" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct input_absinfo in linux/input.h" >&5 $as_echo_n "checking for struct input_absinfo in linux/input.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct input_absinfo x; (void)x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_INPUT_ABSINFO 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi enable_lirc=no if test "$checkfor_lirc" = "yes"; then enable_lirc=yes fi enable_mutouch=no if test "$checkfor_mutouch" = "yes"; then enable_mutouch=yes fi enable_zytronic=no if test "$checkfor_zytronic" = "yes"; then enable_zytronic=yes fi enable_penmount=no if test "$checkfor_penmount" = "yes"; then enable_penmount=yes fi enable_ps2mouse=no if test "$checkfor_ps2mouse" = "yes"; then enable_ps2mouse=yes fi enable_serial_mouse=no if test "$checkfor_serialmouse" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "linux/serial.h" "ac_cv_header_linux_serial_h" "$ac_includes_default" if test "x$ac_cv_header_linux_serial_h" = xyes; then : enable_serial_mouse=yes else enable_serial_mouse=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no linux/serial.h -- serial mouse driver will not be built." >&5 $as_echo "$as_me: WARNING: *** no linux/serial.h -- serial mouse driver will not be built." >&2;} fi fi enable_sonypi_jogdial=no if test "$checkfor_sonypijogdial" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "linux/sonypi.h" "ac_cv_header_linux_sonypi_h" "$ac_includes_default" if test "x$ac_cv_header_linux_sonypi_h" = xyes; then : enable_sonypi_jogdial=yes else enable_sonypi_jogdial=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no linux/sonypi.h -- SonyPI Jogdial driver will not be built." >&5 $as_echo "$as_me: WARNING: *** no linux/sonypi.h -- SonyPI Jogdial driver will not be built." >&2;} fi fi enable_tslib=no if test "$checkfor_tslib" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TSLIB" >&5 $as_echo_n "checking for TSLIB... " >&6; } if test -n "$TSLIB_CFLAGS"; then pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib-1.0 >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "tslib-1.0 >= 1.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_TSLIB_CFLAGS=`$PKG_CONFIG --cflags "tslib-1.0 >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$TSLIB_LIBS"; then pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib-1.0 >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "tslib-1.0 >= 1.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_TSLIB_LIBS=`$PKG_CONFIG --libs "tslib-1.0 >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "tslib-1.0 >= 1.0.0" 2>&1` else TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "tslib-1.0 >= 1.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TSLIB_PKG_ERRORS" >&5 enable_tslib=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_tslib=no else TSLIB_CFLAGS=$pkg_cv_TSLIB_CFLAGS TSLIB_LIBS=$pkg_cv_TSLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_tslib=yes fi if test "$enable_tslib" = "no"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TSLIB" >&5 $as_echo_n "checking for TSLIB... " >&6; } if test -n "$TSLIB_CFLAGS"; then pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_TSLIB_CFLAGS=`$PKG_CONFIG --cflags "tslib-0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$TSLIB_LIBS"; then pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_TSLIB_LIBS=`$PKG_CONFIG --libs "tslib-0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "tslib-0.0" 2>&1` else TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "tslib-0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TSLIB_PKG_ERRORS" >&5 enable_tslib=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no tslib -- tslib driver will not be built." >&5 $as_echo "$as_me: WARNING: *** no tslib -- tslib driver will not be built." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_tslib=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** no tslib -- tslib driver will not be built." >&5 $as_echo "$as_me: WARNING: *** no tslib -- tslib driver will not be built." >&2;} else TSLIB_CFLAGS=$pkg_cv_TSLIB_CFLAGS TSLIB_LIBS=$pkg_cv_TSLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_tslib=yes fi fi fi enable_ucb1x00_ts=no if test "$checkfor_ucb1x00" = "yes"; then enable_ucb1x00_ts=yes fi enable_wm97xx_ts=no if test "$checkfor_wm97xx" = "yes"; then enable_wm97xx_ts=yes fi fi # Check whether --with-software was given. if test "${with_software+set}" = set; then : withval=$with_software; fi if test "$with_software" != "no"; then with_software=yes fi if test "$with_software" != "no"; then SOFTWARE_RENDERING_TRUE= SOFTWARE_RENDERING_FALSE='#' else SOFTWARE_RENDERING_TRUE='#' SOFTWARE_RENDERING_FALSE= fi # Check whether --with-smooth-scaling was given. if test "${with_smooth_scaling+set}" = set; then : withval=$with_smooth_scaling; fi if test "$with_smooth_scaling" != "yes" -o "$with_software" != "yes"; then with_smooth_scaling=no else $as_echo "#define DFB_SMOOTH_SCALING 1" >>confdefs.h fi $as_echo "#define DFB_DITHER_SIMPLE 1" >>confdefs.h $as_echo "#define DFB_DITHER_ADVANCED 2" >>confdefs.h # Check whether --with-dither-rgb16 was given. if test "${with_dither_rgb16+set}" = set; then : withval=$with_dither_rgb16; else with_dither_rgb16=none fi case x"$with_dither_rgb16" in x | xnone) with_dither_rgb16=none ;; xsimple) $as_echo "#define DFB_DITHER565 DFB_DITHER_SIMPLE" >>confdefs.h ;; xadvanced) $as_echo "#define DFB_DITHER565 DFB_DITHER_ADVANCED" >>confdefs.h ;; *) echo "Unknown dithering type $with_dither_rgb16, exiting!" exit 1 ;; esac # Check whether --with-dither was given. if test "${with_dither+set}" = set; then : withval=$with_dither; else with_dither=none fi case x"$with_dither" in x | xnone) with_dither=none ;; xsimple) $as_echo "#define DFB_DITHER DFB_DITHER_SIMPLE" >>confdefs.h ;; xadvanced) $as_echo "#define DFB_DITHER DFB_DITHER_ADVANCED" >>confdefs.h ;; *) echo "Unknown dithering type $with_dither, exiting!" exit 1 ;; esac # Check whether --with-setsockopt was given. if test "${with_setsockopt+set}" = set; then : withval=$with_setsockopt; fi if test "$with_setsockopt" != "no"; then with_setsockopt=yes VOODOO_BUILD_NO_SETSOCKOPT=0 else VOODOO_BUILD_NO_SETSOCKOPT=1 fi # Check whether --with-tests was given. if test "${with_tests+set}" = set; then : withval=$with_tests; fi if test "$with_tests" != "yes"; then with_tests=no fi # How big of a buffer fluxed code uses for static args (times two with return) # Check whether --with-args-size was given. if test "${with_args_size+set}" = set; then : withval=$with_args_size; else with_args_size=no fi test x"$with_args_size" = x"no" && with_args_size=1024 FLUXED_ARGS_BYTES=$with_args_size # How big of a buffer fusion uses to read messages from the fusion device # Check whether --with-message-size was given. if test "${with_message_size+set}" = set; then : withval=$with_message_size; else with_message_size=no fi test x"$with_message_size" = x"no" && with_message_size=16384 FUSION_MESSAGE_SIZE=$with_message_size # Build tools? # Check whether --with-tools was given. if test "${with_tools+set}" = set; then : withval=$with_tools; fi if test "$with_tools" != "no"; then with_tools=yes fi # Sysroot used for runtime module loading, etc. # Check whether --with-runtime-sysroot was given. if test "${with_runtime_sysroot+set}" = set; then : withval=$with_runtime_sysroot; RUNTIME_SYSROOT="$withval" else RUNTIME_SYSROOT= fi test x"$RUNTIME_SYSROOT" = x"no" && RUNTIME_SYSROOT= if test "$enable_unique" = "yes"; then if test "$cross_compiling" = "yes" || test "$with_tools" = "no"; then # Extract the first word of "directfb-csource", so it can be a program name with args. set dummy directfb-csource; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DIRECTFB_CSOURCE+:} false; then : $as_echo_n "(cached) " >&6 else case $DIRECTFB_CSOURCE in [\\/]* | ?:[\\/]*) ac_cv_path_DIRECTFB_CSOURCE="$DIRECTFB_CSOURCE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DIRECTFB_CSOURCE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_DIRECTFB_CSOURCE" && ac_cv_path_DIRECTFB_CSOURCE="no" ;; esac fi DIRECTFB_CSOURCE=$ac_cv_path_DIRECTFB_CSOURCE if test -n "$DIRECTFB_CSOURCE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRECTFB_CSOURCE" >&5 $as_echo "$DIRECTFB_CSOURCE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$DIRECTFB_CSOURCE" = "xno"; then as_fn_error $? "Could not find a directfb-csource in your PATH" "$LINENO" 5 fi fi fi if test "$ati128" = "yes"; then GFX_ATI128_TRUE= GFX_ATI128_FALSE='#' else GFX_ATI128_TRUE='#' GFX_ATI128_FALSE= fi if test "$cle266" = "yes"; then GFX_CLE266_TRUE= GFX_CLE266_FALSE='#' else GFX_CLE266_TRUE='#' GFX_CLE266_FALSE= fi if test "$cyber5k" = "yes"; then GFX_CYBER5K_TRUE= GFX_CYBER5K_FALSE='#' else GFX_CYBER5K_TRUE='#' GFX_CYBER5K_FALSE= fi if test "$davinci" = "yes"; then GFX_DAVINCI_TRUE= GFX_DAVINCI_FALSE='#' else GFX_DAVINCI_TRUE='#' GFX_DAVINCI_FALSE= fi if test "$ep9x" = "yes"; then GFX_EP9X_TRUE= GFX_EP9X_FALSE='#' else GFX_EP9X_TRUE='#' GFX_EP9X_FALSE= fi if test "$gp2d" = "yes"; then GFX_GP2D_TRUE= GFX_GP2D_FALSE='#' else GFX_GP2D_TRUE='#' GFX_GP2D_FALSE= fi if test "$gl" = "yes"; then GFX_GL_TRUE= GFX_GL_FALSE='#' else GFX_GL_TRUE='#' GFX_GL_FALSE= fi if test "$gles2" = "yes"; then GFX_GLES2_TRUE= GFX_GLES2_FALSE='#' else GFX_GLES2_TRUE='#' GFX_GLES2_FALSE= fi if test "$glx" = "yes"; then GFX_GLX_TRUE= GFX_GLX_FALSE='#' else GFX_GLX_TRUE='#' GFX_GLX_FALSE= fi if test "$i810" = "yes"; then GFX_I810_TRUE= GFX_I810_FALSE='#' else GFX_I810_TRUE='#' GFX_I810_FALSE= fi if test "$i830" = "yes"; then GFX_I830_TRUE= GFX_I830_FALSE='#' else GFX_I830_TRUE='#' GFX_I830_FALSE= fi if test "$mach64" = "yes"; then GFX_MACH64_TRUE= GFX_MACH64_FALSE='#' else GFX_MACH64_TRUE='#' GFX_MACH64_FALSE= fi if test "$matrox" = "yes"; then GFX_MATROX_TRUE= GFX_MATROX_FALSE='#' else GFX_MATROX_TRUE='#' GFX_MATROX_FALSE= fi if test "$neomagic" = "yes"; then GFX_NEOMAGIC_TRUE= GFX_NEOMAGIC_FALSE='#' else GFX_NEOMAGIC_TRUE='#' GFX_NEOMAGIC_FALSE= fi if test "$nsc" = "yes"; then GFX_NSC_TRUE= GFX_NSC_FALSE='#' else GFX_NSC_TRUE='#' GFX_NSC_FALSE= fi if test "$nvidia" = "yes"; then GFX_NVIDIA_TRUE= GFX_NVIDIA_FALSE='#' else GFX_NVIDIA_TRUE='#' GFX_NVIDIA_FALSE= fi if test "$omap" = "yes"; then GFX_OMAP_TRUE= GFX_OMAP_FALSE='#' else GFX_OMAP_TRUE='#' GFX_OMAP_FALSE= fi if test "$pvr2d" = "yes"; then GFX_PVR2D_TRUE= GFX_PVR2D_FALSE='#' else GFX_PVR2D_TRUE='#' GFX_PVR2D_FALSE= fi if test "$pxa3xx" = "yes"; then GFX_PXA3XX_TRUE= GFX_PXA3XX_FALSE='#' else GFX_PXA3XX_TRUE='#' GFX_PXA3XX_FALSE= fi if test "$radeon" = "yes"; then GFX_RADEON_TRUE= GFX_RADEON_FALSE='#' else GFX_RADEON_TRUE='#' GFX_RADEON_FALSE= fi if test "$savage" = "yes"; then GFX_SAVAGE_TRUE= GFX_SAVAGE_FALSE='#' else GFX_SAVAGE_TRUE='#' GFX_SAVAGE_FALSE= fi if test "$sh772x" = "yes"; then GFX_SH772X_TRUE= GFX_SH772X_FALSE='#' else GFX_SH772X_TRUE='#' GFX_SH772X_FALSE= fi if test "$sis315" = "yes"; then GFX_SIS315_TRUE= GFX_SIS315_FALSE='#' else GFX_SIS315_TRUE='#' GFX_SIS315_FALSE= fi if test "$tdfx" = "yes"; then GFX_TDFX_TRUE= GFX_TDFX_FALSE='#' else GFX_TDFX_TRUE='#' GFX_TDFX_FALSE= fi if test "$unichrome" = "yes"; then GFX_UNICHROME_TRUE= GFX_UNICHROME_FALSE='#' else GFX_UNICHROME_TRUE='#' GFX_UNICHROME_FALSE= fi if test "$vmware" = "yes"; then GFX_VMWARE_TRUE= GFX_VMWARE_FALSE='#' else GFX_VMWARE_TRUE='#' GFX_VMWARE_FALSE= fi if test "$vdpau" = "yes"; then GFX_VDPAU_TRUE= GFX_VDPAU_FALSE='#' else GFX_VDPAU_TRUE='#' GFX_VDPAU_FALSE= fi if test "$sh772x_shjpeg" = "yes"; then SH772X_SHJPEG_TRUE= SH772X_SHJPEG_FALSE='#' else SH772X_SHJPEG_TRUE='#' SH772X_SHJPEG_FALSE= fi if test "$enable_dbox2remote" = "yes"; then DBOX2REMOTE_TRUE= DBOX2REMOTE_FALSE='#' else DBOX2REMOTE_TRUE='#' DBOX2REMOTE_FALSE= fi if test "$enable_dreamboxremote" = "yes"; then DREAMBOXREMOTE_TRUE= DREAMBOXREMOTE_FALSE='#' else DREAMBOXREMOTE_TRUE='#' DREAMBOXREMOTE_FALSE= fi if test "$enable_dynapro_ts" = "yes"; then DYNAPRO_INPUT_TRUE= DYNAPRO_INPUT_FALSE='#' else DYNAPRO_INPUT_TRUE='#' DYNAPRO_INPUT_FALSE= fi if test "$enable_elo_input" = "yes"; then ELO_INPUT_TRUE= ELO_INPUT_FALSE='#' else ELO_INPUT_TRUE='#' ELO_INPUT_FALSE= fi if test "$enable_gunze_input" = "yes"; then GUNZE_INPUT_TRUE= GUNZE_INPUT_FALSE='#' else GUNZE_INPUT_TRUE='#' GUNZE_INPUT_FALSE= fi if test "$enable_h3600_ts" = "yes"; then H3600_TS_TRUE= H3600_TS_FALSE='#' else H3600_TS_TRUE='#' H3600_TS_FALSE= fi if test "$enable_input_hub" = "yes"; then INPUT_HUB_TRUE= INPUT_HUB_FALSE='#' else INPUT_HUB_TRUE='#' INPUT_HUB_FALSE= fi if test "$enable_joystick" = "yes"; then JOYSTICK_INPUT_TRUE= JOYSTICK_INPUT_FALSE='#' else JOYSTICK_INPUT_TRUE='#' JOYSTICK_INPUT_FALSE= fi if test "$enable_keyboard" = "yes"; then KEYBOARD_INPUT_TRUE= KEYBOARD_INPUT_FALSE='#' else KEYBOARD_INPUT_TRUE='#' KEYBOARD_INPUT_FALSE= fi if test "$enable_linux_input" = "yes"; then LINUX_INPUT_TRUE= LINUX_INPUT_FALSE='#' else LINUX_INPUT_TRUE='#' LINUX_INPUT_FALSE= fi if test "$enable_lirc" = "yes"; then LIRC_INPUT_TRUE= LIRC_INPUT_FALSE='#' else LIRC_INPUT_TRUE='#' LIRC_INPUT_FALSE= fi if test "$enable_mutouch" = "yes"; then MUTOUCH_TS_TRUE= MUTOUCH_TS_FALSE='#' else MUTOUCH_TS_TRUE='#' MUTOUCH_TS_FALSE= fi if test "$enable_zytronic" = "yes"; then ZYTRONIC_TS_TRUE= ZYTRONIC_TS_FALSE='#' else ZYTRONIC_TS_TRUE='#' ZYTRONIC_TS_FALSE= fi if test "$enable_penmount" = "yes" ; then PENMOUNT_TS_TRUE= PENMOUNT_TS_FALSE='#' else PENMOUNT_TS_TRUE='#' PENMOUNT_TS_FALSE= fi if test "$enable_ps2mouse" = "yes"; then PS2MOUSE_INPUT_TRUE= PS2MOUSE_INPUT_FALSE='#' else PS2MOUSE_INPUT_TRUE='#' PS2MOUSE_INPUT_FALSE= fi if test "$enable_serial_mouse" = "yes"; then SERIAL_MOUSE_INPUT_TRUE= SERIAL_MOUSE_INPUT_FALSE='#' else SERIAL_MOUSE_INPUT_TRUE='#' SERIAL_MOUSE_INPUT_FALSE= fi if test "$enable_sonypi_jogdial" = "yes"; then SONYPI_TRUE= SONYPI_FALSE='#' else SONYPI_TRUE='#' SONYPI_FALSE= fi if test "$enable_tslib" = "yes"; then TSLIB_TRUE= TSLIB_FALSE='#' else TSLIB_TRUE='#' TSLIB_FALSE= fi if test "$enable_ucb1x00_ts" = "yes"; then UCB1X00_TS_TRUE= UCB1X00_TS_FALSE='#' else UCB1X00_TS_TRUE='#' UCB1X00_TS_FALSE= fi if test "$enable_wm97xx_ts" = "yes"; then WM97XX_TS_TRUE= WM97XX_TS_FALSE='#' else WM97XX_TS_TRUE='#' WM97XX_TS_FALSE= fi if test "$with_tests" = "yes"; then BUILD_TESTS_TRUE= BUILD_TESTS_FALSE='#' else BUILD_TESTS_TRUE='#' BUILD_TESTS_FALSE= fi if test "$with_tools" = "yes"; then BUILD_TOOLS_TRUE= BUILD_TOOLS_FALSE='#' else BUILD_TOOLS_TRUE='#' BUILD_TOOLS_FALSE= fi if test "$cross_compiling" = "yes"; then CROSS_COMPILING_TRUE= CROSS_COMPILING_FALSE='#' else CROSS_COMPILING_TRUE='#' CROSS_COMPILING_FALSE= fi CFLAGS="$CFLAGS $DFB_INTERNAL_CFLAGS" CXXFLAGS="$CXXFLAGS ${CFLAGS//-Werror-implicit-function-declaration/}" DFB_LDFLAGS="$LDFLAGS $ZLIB_LIBS" CFLAGS="$CFLAGS $CFLAGS_STD" # Honor aclocal flags ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" if test "$enable_shared" = "yes"; then BUILD_SHARED_TRUE= BUILD_SHARED_FALSE='#' else BUILD_SHARED_TRUE='#' BUILD_SHARED_FALSE= fi if test "$enable_static" = "yes"; then BUILD_STATIC_TRUE= BUILD_STATIC_FALSE='#' else BUILD_STATIC_TRUE='#' BUILD_STATIC_FALSE= fi # Change the module directory only for builds that don't *support* debug if test "$enable_debug_support" = "no"; then MODULEDIRNAME=directfb-$BINARY_VERSION-pure else MODULEDIRNAME=directfb-$BINARY_VERSION fi MODULEDIR=$libdir/$MODULEDIRNAME DATADIR=$datadir/directfb-$VERSION INCLUDEDIR=$includedir/directfb INTERNALINCLUDEDIR=$includedir/directfb-internal GENERIC_INCLUDEDIR=$includedir SOPATH=$libdir/libdirectfb-$LT_RELEASE.so.$LT_CURRENT EXP_VAR=SYSCONFDIR FROM_VAR=$sysconfdir prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var SYSCONFDIR="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save CFLAGS="$CFLAGS -Werror-implicit-function-declaration" # Check whether --enable-extra-warnings was given. if test "${enable_extra_warnings+set}" = set; then : enableval=$enable_extra_warnings; else enable_extra_warnings=no fi if test "$enable_extra_warnings" = "yes"; then CFLAGS="-W -Wno-sign-compare -Wno-unused-parameter -Wundef -Wcast-qual -Wcast-align -Waggregate-return -Wmissing-declarations -Winline $CFLAGS" fi if test "$GCC" = "yes"; then CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing -Werror-implicit-function-declaration $CFLAGS" CXXFLAGS="-Wall -Wno-strict-aliasing -std=$CXXSTD $CXXFLAGS" fi if test "x$ffmpeg" = "xyes"; then BUILD_DVC_TRUE= BUILD_DVC_FALSE='#' else BUILD_DVC_TRUE='#' BUILD_DVC_FALSE= fi ac_config_files="$ac_config_files build-android/Makefile directfb-config directfb.pc directfb-internal.pc directfb.spec Makefile include/Makefile include/directfb_build.h include/directfb_version.h include/++dfb/Makefile lib/Makefile lib/direct/Makefile lib/direct/build.h lib/direct/direct.pc lib/direct/os/Makefile lib/direct/os/linux/glibc/Makefile lib/fusion/Makefile lib/fusion/build.h lib/fusion/fusion.pc lib/fusion/shm/Makefile lib/One/Makefile lib/One/one.pc lib/voodoo/Makefile lib/voodoo/build.h lib/voodoo/unix/Makefile lib/voodoo/voodoo.pc lib/sawman/Makefile lib/sawman/sawman.pc lib/fusiondale/Makefile lib/fusiondale/coma/Makefile lib/fusiondale/core/Makefile lib/fusiondale/messenger/Makefile lib/fusiondale/misc/Makefile lib/fusiondale/one/Makefile lib/fusiondale/fusiondale.pc lib/fusiondale/fusiondale_version.h lib/fusionsound/Makefile lib/fusionsound/core/Makefile lib/fusionsound/drivers/Makefile lib/fusionsound/media/Makefile lib/fusionsound/misc/Makefile lib/fusionsound/fusionsound.pc lib/fusionsound/fusionsound-internal.pc lib/fusionsound/fusionsound_limits.h lib/fusionsound/fusionsound_version.h lib/divine/Makefile lib/divine/divine.pc lib/dvc/Makefile lib/++dfb/Makefile lib/++dfb/++dfb.pc patches/Makefile proxy/Makefile proxy/compressor/Makefile proxy/dispatcher/Makefile proxy/requestor/Makefile rules/Makefile src/Makefile src/core/Makefile src/display/Makefile src/gfx/Makefile src/gfx/generic/Makefile src/input/Makefile src/media/Makefile src/misc/Makefile src/windows/Makefile systems/Makefile systems/android/Makefile systems/devmem/Makefile systems/dummy/Makefile systems/fbdev/Makefile systems/mesa/Makefile systems/drmkms/Makefile systems/pvr2d/Makefile systems/egl/Makefile systems/x11/Makefile systems/x11vdpau/Makefile systems/osx/Makefile systems/sdl/Makefile systems/vnc/Makefile wm/Makefile wm/default/Makefile wm/unique/Makefile wm/unique/classes/Makefile wm/unique/data/Makefile wm/unique/devices/Makefile wm/sawman/Makefile gfxdrivers/Makefile gfxdrivers/ati128/Makefile gfxdrivers/cle266/Makefile gfxdrivers/cyber5k/Makefile gfxdrivers/davinci/Makefile gfxdrivers/ep9x/Makefile gfxdrivers/gp2d/Makefile gfxdrivers/gl/Makefile gfxdrivers/gles2/Makefile gfxdrivers/i810/Makefile gfxdrivers/i830/Makefile gfxdrivers/mach64/Makefile gfxdrivers/matrox/Makefile gfxdrivers/neomagic/Makefile gfxdrivers/nsc/Makefile gfxdrivers/nsc/include/Makefile gfxdrivers/nvidia/Makefile gfxdrivers/omap/Makefile gfxdrivers/pvr2d/Makefile gfxdrivers/pxa3xx/Makefile gfxdrivers/radeon/Makefile gfxdrivers/savage/Makefile gfxdrivers/sh772x/Makefile gfxdrivers/sis315/Makefile gfxdrivers/tdfx/Makefile gfxdrivers/unichrome/Makefile gfxdrivers/vdpau/Makefile gfxdrivers/vmware/Makefile inputdrivers/Makefile inputdrivers/dbox2remote/Makefile inputdrivers/divine/Makefile inputdrivers/dreamboxremote/Makefile inputdrivers/dynapro/Makefile inputdrivers/elo/Makefile inputdrivers/gunze/Makefile inputdrivers/h3600_ts/Makefile inputdrivers/input_hub/Makefile inputdrivers/joystick/Makefile inputdrivers/keyboard/Makefile inputdrivers/linux_input/Makefile inputdrivers/lirc/Makefile inputdrivers/mutouch/Makefile inputdrivers/zytronic/Makefile inputdrivers/penmount/Makefile inputdrivers/ps2mouse/Makefile inputdrivers/serialmouse/Makefile inputdrivers/sonypi/Makefile inputdrivers/tslib/Makefile inputdrivers/ucb1x00_ts/Makefile inputdrivers/wm97xx_ts/Makefile interfaces/Makefile interfaces/ICoreResourceManager/Makefile interfaces/IDirectFBFont/Makefile interfaces/IDirectFBGL/Makefile interfaces/IDirectFBGL/EGL/Makefile interfaces/IDirectFBImageProvider/Makefile interfaces/IDirectFBImageProvider/mpeg2/Makefile interfaces/IDirectFBVideoProvider/Makefile interfaces/IDirectFBVideoProvider/video_out_dfb/Makefile interfaces/IDirectFBWindows/Makefile interfaces/IFusionSound/Makefile interfaces/IFusionSoundMusicProvider/Makefile interfaces/IWater/Makefile data/Makefile tests/Makefile tests/voodoo/Makefile tools/Makefile examples/fusiondale/Makefile examples/fusionsound/Makefile examples/++dfb/Makefile examples/++dfb/tests/Makefile examples/++dfb/tests/data/Makefile docs/Makefile docs/dfbg.1 docs/directfb-csource.1 docs/directfbrc.5 docs/html/Makefile" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -z "${HAVE_MAN2HTML_TRUE}" && test -z "${HAVE_MAN2HTML_FALSE}"; then as_fn_error $? "conditional \"HAVE_MAN2HTML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OSX_CORE_TRUE}" && test -z "${OSX_CORE_FALSE}"; then as_fn_error $? "conditional \"OSX_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${X11_CORE_TRUE}" && test -z "${X11_CORE_FALSE}"; then as_fn_error $? "conditional \"X11_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${X11VDPAU_CORE_TRUE}" && test -z "${X11VDPAU_CORE_FALSE}"; then as_fn_error $? "conditional \"X11VDPAU_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LINUX_TRUE}" && test -z "${HAVE_LINUX_FALSE}"; then as_fn_error $? "conditional \"HAVE_LINUX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILDPPCASM_TRUE}" && test -z "${BUILDPPCASM_FALSE}"; then as_fn_error $? "conditional \"BUILDPPCASM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILDARMASM_TRUE}" && test -z "${BUILDARMASM_FALSE}"; then as_fn_error $? "conditional \"BUILDARMASM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DEBUGS_TRUE}" && test -z "${ENABLE_DEBUGS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DEBUGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_TRACE_TRUE}" && test -z "${ENABLE_TRACE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_TRACE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_OSS_TRUE}" && test -z "${BUILD_OSS_FALSE}"; then as_fn_error $? "conditional \"BUILD_OSS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ALSA_TRUE}" && test -z "${BUILD_ALSA_FALSE}"; then as_fn_error $? "conditional \"BUILD_ALSA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_WAVE_TRUE}" && test -z "${BUILD_WAVE_FALSE}"; then as_fn_error $? "conditional \"BUILD_WAVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_TIMIDITY_TRUE}" && test -z "${BUILD_TIMIDITY_FALSE}"; then as_fn_error $? "conditional \"BUILD_TIMIDITY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_WAVE_TRUE}" && test -z "${BUILD_WAVE_FALSE}"; then as_fn_error $? "conditional \"BUILD_WAVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_VORBIS_TRUE}" && test -z "${BUILD_VORBIS_FALSE}"; then as_fn_error $? "conditional \"BUILD_VORBIS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_MAD_TRUE}" && test -z "${BUILD_MAD_FALSE}"; then as_fn_error $? "conditional \"BUILD_MAD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CDDA_TRUE}" && test -z "${BUILD_CDDA_FALSE}"; then as_fn_error $? "conditional \"BUILD_CDDA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_PLAYLIST_TRUE}" && test -z "${BUILD_PLAYLIST_FALSE}"; then as_fn_error $? "conditional \"BUILD_PLAYLIST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DIRECTFB_BUILD_ONE_TRUE}" && test -z "${DIRECTFB_BUILD_ONE_FALSE}"; then as_fn_error $? "conditional \"DIRECTFB_BUILD_ONE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DIRECTFB_BUILD_VOODOO_TRUE}" && test -z "${DIRECTFB_BUILD_VOODOO_FALSE}"; then as_fn_error $? "conditional \"DIRECTFB_BUILD_VOODOO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DIRECTFB_BUILD_PURE_VOODOO_TRUE}" && test -z "${DIRECTFB_BUILD_PURE_VOODOO_FALSE}"; then as_fn_error $? "conditional \"DIRECTFB_BUILD_PURE_VOODOO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_MULTI_TRUE}" && test -z "${ENABLE_MULTI_FALSE}"; then as_fn_error $? "conditional \"ENABLE_MULTI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_ONE_TRUE}" && test -z "${ENABLE_ONE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_ONE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_VOODOO_TRUE}" && test -z "${ENABLE_VOODOO_FALSE}"; then as_fn_error $? "conditional \"ENABLE_VOODOO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_SAWMAN_TRUE}" && test -z "${ENABLE_SAWMAN_FALSE}"; then as_fn_error $? "conditional \"ENABLE_SAWMAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_FUSIONDALE_TRUE}" && test -z "${ENABLE_FUSIONDALE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_FUSIONDALE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_FUSIONSOUND_TRUE}" && test -z "${ENABLE_FUSIONSOUND_FALSE}"; then as_fn_error $? "conditional \"ENABLE_FUSIONSOUND\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DIVINE_TRUE}" && test -z "${ENABLE_DIVINE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DIVINE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_UNIQUE_TRUE}" && test -z "${ENABLE_UNIQUE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_UNIQUE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILDMMX_TRUE}" && test -z "${BUILDMMX_FALSE}"; then as_fn_error $? "conditional \"BUILDMMX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PVR2D_CORE_TRUE}" && test -z "${PVR2D_CORE_FALSE}"; then as_fn_error $? "conditional \"PVR2D_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EGL_CORE_TRUE}" && test -z "${EGL_CORE_FALSE}"; then as_fn_error $? "conditional \"EGL_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IDIRECTFBGL_EGL_TRUE}" && test -z "${IDIRECTFBGL_EGL_FALSE}"; then as_fn_error $? "conditional \"IDIRECTFBGL_EGL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DEVMEM_CORE_TRUE}" && test -z "${DEVMEM_CORE_FALSE}"; then as_fn_error $? "conditional \"DEVMEM_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FBDEV_CORE_TRUE}" && test -z "${FBDEV_CORE_FALSE}"; then as_fn_error $? "conditional \"FBDEV_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SDL_CORE_TRUE}" && test -z "${SDL_CORE_FALSE}"; then as_fn_error $? "conditional \"SDL_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${VNC_CORE_TRUE}" && test -z "${VNC_CORE_FALSE}"; then as_fn_error $? "conditional \"VNC_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MESA_CORE_TRUE}" && test -z "${MESA_CORE_FALSE}"; then as_fn_error $? "conditional \"MESA_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DRMKMS_CORE_TRUE}" && test -z "${DRMKMS_CORE_FALSE}"; then as_fn_error $? "conditional \"DRMKMS_CORE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${JPEG_PROVIDER_TRUE}" && test -z "${JPEG_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"JPEG_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PNG_PROVIDER_TRUE}" && test -z "${PNG_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"PNG_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DIRECTFB_CSOURCE_TRUE}" && test -z "${BUILD_DIRECTFB_CSOURCE_FALSE}"; then as_fn_error $? "conditional \"BUILD_DIRECTFB_CSOURCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MNG_PROVIDER_TRUE}" && test -z "${MNG_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"MNG_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GSTREAMER_PROVIDER_TRUE}" && test -z "${GSTREAMER_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"GSTREAMER_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GIF_PROVIDER_TRUE}" && test -z "${GIF_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"GIF_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TIFF_PROVIDER_TRUE}" && test -z "${TIFF_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"TIFF_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IMLIB2_TRUE}" && test -z "${IMLIB2_FALSE}"; then as_fn_error $? "conditional \"IMLIB2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PNM_TRUE}" && test -z "${PNM_FALSE}"; then as_fn_error $? "conditional \"PNM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SVG_TRUE}" && test -z "${SVG_FALSE}"; then as_fn_error $? "conditional \"SVG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MPEG2_TRUE}" && test -z "${MPEG2_FALSE}"; then as_fn_error $? "conditional \"MPEG2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BMP_TRUE}" && test -z "${BMP_FALSE}"; then as_fn_error $? "conditional \"BMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${JPEG2000_TRUE}" && test -z "${JPEG2000_FALSE}"; then as_fn_error $? "conditional \"JPEG2000\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OPENQUICKTIME_PROVIDER_TRUE}" && test -z "${OPENQUICKTIME_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"OPENQUICKTIME_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AVIFILE_PROVIDER_TRUE}" && test -z "${AVIFILE_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"AVIFILE_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LIBMPEG3_PROVIDER_TRUE}" && test -z "${LIBMPEG3_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"LIBMPEG3_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FLASH_PROVIDER_TRUE}" && test -z "${FLASH_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"FLASH_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XINE_PROVIDER_TRUE}" && test -z "${XINE_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"XINE_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XINE_VDPAU_PROVIDER_TRUE}" && test -z "${XINE_VDPAU_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"XINE_VDPAU_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SWFDEC_PROVIDER_TRUE}" && test -z "${SWFDEC_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"SWFDEC_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FFMPEG_PROVIDER_TRUE}" && test -z "${FFMPEG_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"FFMPEG_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_FFMPEG_TRUE}" && test -z "${BUILD_FFMPEG_FALSE}"; then as_fn_error $? "conditional \"BUILD_FFMPEG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FREETYPE_PROVIDER_TRUE}" && test -z "${FREETYPE_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"FREETYPE_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINOTYPE_PROVIDER_TRUE}" && test -z "${LINOTYPE_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"LINOTYPE_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${V4L_PROVIDER_TRUE}" && test -z "${V4L_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"V4L_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WEBP_PROVIDER_TRUE}" && test -z "${WEBP_PROVIDER_FALSE}"; then as_fn_error $? "conditional \"WEBP_PROVIDER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SOFTWARE_RENDERING_TRUE}" && test -z "${SOFTWARE_RENDERING_FALSE}"; then as_fn_error $? "conditional \"SOFTWARE_RENDERING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_ATI128_TRUE}" && test -z "${GFX_ATI128_FALSE}"; then as_fn_error $? "conditional \"GFX_ATI128\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_CLE266_TRUE}" && test -z "${GFX_CLE266_FALSE}"; then as_fn_error $? "conditional \"GFX_CLE266\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_CYBER5K_TRUE}" && test -z "${GFX_CYBER5K_FALSE}"; then as_fn_error $? "conditional \"GFX_CYBER5K\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_DAVINCI_TRUE}" && test -z "${GFX_DAVINCI_FALSE}"; then as_fn_error $? "conditional \"GFX_DAVINCI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_EP9X_TRUE}" && test -z "${GFX_EP9X_FALSE}"; then as_fn_error $? "conditional \"GFX_EP9X\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_GP2D_TRUE}" && test -z "${GFX_GP2D_FALSE}"; then as_fn_error $? "conditional \"GFX_GP2D\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_GL_TRUE}" && test -z "${GFX_GL_FALSE}"; then as_fn_error $? "conditional \"GFX_GL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_GLES2_TRUE}" && test -z "${GFX_GLES2_FALSE}"; then as_fn_error $? "conditional \"GFX_GLES2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_GLX_TRUE}" && test -z "${GFX_GLX_FALSE}"; then as_fn_error $? "conditional \"GFX_GLX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_I810_TRUE}" && test -z "${GFX_I810_FALSE}"; then as_fn_error $? "conditional \"GFX_I810\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_I830_TRUE}" && test -z "${GFX_I830_FALSE}"; then as_fn_error $? "conditional \"GFX_I830\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_MACH64_TRUE}" && test -z "${GFX_MACH64_FALSE}"; then as_fn_error $? "conditional \"GFX_MACH64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_MATROX_TRUE}" && test -z "${GFX_MATROX_FALSE}"; then as_fn_error $? "conditional \"GFX_MATROX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_NEOMAGIC_TRUE}" && test -z "${GFX_NEOMAGIC_FALSE}"; then as_fn_error $? "conditional \"GFX_NEOMAGIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_NSC_TRUE}" && test -z "${GFX_NSC_FALSE}"; then as_fn_error $? "conditional \"GFX_NSC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_NVIDIA_TRUE}" && test -z "${GFX_NVIDIA_FALSE}"; then as_fn_error $? "conditional \"GFX_NVIDIA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_OMAP_TRUE}" && test -z "${GFX_OMAP_FALSE}"; then as_fn_error $? "conditional \"GFX_OMAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_PVR2D_TRUE}" && test -z "${GFX_PVR2D_FALSE}"; then as_fn_error $? "conditional \"GFX_PVR2D\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_PXA3XX_TRUE}" && test -z "${GFX_PXA3XX_FALSE}"; then as_fn_error $? "conditional \"GFX_PXA3XX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_RADEON_TRUE}" && test -z "${GFX_RADEON_FALSE}"; then as_fn_error $? "conditional \"GFX_RADEON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_SAVAGE_TRUE}" && test -z "${GFX_SAVAGE_FALSE}"; then as_fn_error $? "conditional \"GFX_SAVAGE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_SH772X_TRUE}" && test -z "${GFX_SH772X_FALSE}"; then as_fn_error $? "conditional \"GFX_SH772X\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_SIS315_TRUE}" && test -z "${GFX_SIS315_FALSE}"; then as_fn_error $? "conditional \"GFX_SIS315\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_TDFX_TRUE}" && test -z "${GFX_TDFX_FALSE}"; then as_fn_error $? "conditional \"GFX_TDFX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_UNICHROME_TRUE}" && test -z "${GFX_UNICHROME_FALSE}"; then as_fn_error $? "conditional \"GFX_UNICHROME\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_VMWARE_TRUE}" && test -z "${GFX_VMWARE_FALSE}"; then as_fn_error $? "conditional \"GFX_VMWARE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GFX_VDPAU_TRUE}" && test -z "${GFX_VDPAU_FALSE}"; then as_fn_error $? "conditional \"GFX_VDPAU\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SH772X_SHJPEG_TRUE}" && test -z "${SH772X_SHJPEG_FALSE}"; then as_fn_error $? "conditional \"SH772X_SHJPEG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBOX2REMOTE_TRUE}" && test -z "${DBOX2REMOTE_FALSE}"; then as_fn_error $? "conditional \"DBOX2REMOTE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DREAMBOXREMOTE_TRUE}" && test -z "${DREAMBOXREMOTE_FALSE}"; then as_fn_error $? "conditional \"DREAMBOXREMOTE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DYNAPRO_INPUT_TRUE}" && test -z "${DYNAPRO_INPUT_FALSE}"; then as_fn_error $? "conditional \"DYNAPRO_INPUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ELO_INPUT_TRUE}" && test -z "${ELO_INPUT_FALSE}"; then as_fn_error $? "conditional \"ELO_INPUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GUNZE_INPUT_TRUE}" && test -z "${GUNZE_INPUT_FALSE}"; then as_fn_error $? "conditional \"GUNZE_INPUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${H3600_TS_TRUE}" && test -z "${H3600_TS_FALSE}"; then as_fn_error $? "conditional \"H3600_TS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INPUT_HUB_TRUE}" && test -z "${INPUT_HUB_FALSE}"; then as_fn_error $? "conditional \"INPUT_HUB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${JOYSTICK_INPUT_TRUE}" && test -z "${JOYSTICK_INPUT_FALSE}"; then as_fn_error $? "conditional \"JOYSTICK_INPUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${KEYBOARD_INPUT_TRUE}" && test -z "${KEYBOARD_INPUT_FALSE}"; then as_fn_error $? "conditional \"KEYBOARD_INPUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINUX_INPUT_TRUE}" && test -z "${LINUX_INPUT_FALSE}"; then as_fn_error $? "conditional \"LINUX_INPUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LIRC_INPUT_TRUE}" && test -z "${LIRC_INPUT_FALSE}"; then as_fn_error $? "conditional \"LIRC_INPUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MUTOUCH_TS_TRUE}" && test -z "${MUTOUCH_TS_FALSE}"; then as_fn_error $? "conditional \"MUTOUCH_TS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ZYTRONIC_TS_TRUE}" && test -z "${ZYTRONIC_TS_FALSE}"; then as_fn_error $? "conditional \"ZYTRONIC_TS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PENMOUNT_TS_TRUE}" && test -z "${PENMOUNT_TS_FALSE}"; then as_fn_error $? "conditional \"PENMOUNT_TS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PS2MOUSE_INPUT_TRUE}" && test -z "${PS2MOUSE_INPUT_FALSE}"; then as_fn_error $? "conditional \"PS2MOUSE_INPUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SERIAL_MOUSE_INPUT_TRUE}" && test -z "${SERIAL_MOUSE_INPUT_FALSE}"; then as_fn_error $? "conditional \"SERIAL_MOUSE_INPUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SONYPI_TRUE}" && test -z "${SONYPI_FALSE}"; then as_fn_error $? "conditional \"SONYPI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TSLIB_TRUE}" && test -z "${TSLIB_FALSE}"; then as_fn_error $? "conditional \"TSLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${UCB1X00_TS_TRUE}" && test -z "${UCB1X00_TS_FALSE}"; then as_fn_error $? "conditional \"UCB1X00_TS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WM97XX_TS_TRUE}" && test -z "${WM97XX_TS_FALSE}"; then as_fn_error $? "conditional \"WM97XX_TS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_TESTS_TRUE}" && test -z "${BUILD_TESTS_FALSE}"; then as_fn_error $? "conditional \"BUILD_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_TOOLS_TRUE}" && test -z "${BUILD_TOOLS_FALSE}"; then as_fn_error $? "conditional \"BUILD_TOOLS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_SHARED_TRUE}" && test -z "${BUILD_SHARED_FALSE}"; then as_fn_error $? "conditional \"BUILD_SHARED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_STATIC_TRUE}" && test -z "${BUILD_STATIC_FALSE}"; then as_fn_error $? "conditional \"BUILD_STATIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DVC_TRUE}" && test -z "${BUILD_DVC_FALSE}"; then as_fn_error $? "conditional \"BUILD_DVC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "build-android/Makefile") CONFIG_FILES="$CONFIG_FILES build-android/Makefile" ;; "directfb-config") CONFIG_FILES="$CONFIG_FILES directfb-config" ;; "directfb.pc") CONFIG_FILES="$CONFIG_FILES directfb.pc" ;; "directfb-internal.pc") CONFIG_FILES="$CONFIG_FILES directfb-internal.pc" ;; "directfb.spec") CONFIG_FILES="$CONFIG_FILES directfb.spec" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "include/directfb_build.h") CONFIG_FILES="$CONFIG_FILES include/directfb_build.h" ;; "include/directfb_version.h") CONFIG_FILES="$CONFIG_FILES include/directfb_version.h" ;; "include/++dfb/Makefile") CONFIG_FILES="$CONFIG_FILES include/++dfb/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/direct/Makefile") CONFIG_FILES="$CONFIG_FILES lib/direct/Makefile" ;; "lib/direct/build.h") CONFIG_FILES="$CONFIG_FILES lib/direct/build.h" ;; "lib/direct/direct.pc") CONFIG_FILES="$CONFIG_FILES lib/direct/direct.pc" ;; "lib/direct/os/Makefile") CONFIG_FILES="$CONFIG_FILES lib/direct/os/Makefile" ;; "lib/direct/os/linux/glibc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/direct/os/linux/glibc/Makefile" ;; "lib/fusion/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusion/Makefile" ;; "lib/fusion/build.h") CONFIG_FILES="$CONFIG_FILES lib/fusion/build.h" ;; "lib/fusion/fusion.pc") CONFIG_FILES="$CONFIG_FILES lib/fusion/fusion.pc" ;; "lib/fusion/shm/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusion/shm/Makefile" ;; "lib/One/Makefile") CONFIG_FILES="$CONFIG_FILES lib/One/Makefile" ;; "lib/One/one.pc") CONFIG_FILES="$CONFIG_FILES lib/One/one.pc" ;; "lib/voodoo/Makefile") CONFIG_FILES="$CONFIG_FILES lib/voodoo/Makefile" ;; "lib/voodoo/build.h") CONFIG_FILES="$CONFIG_FILES lib/voodoo/build.h" ;; "lib/voodoo/unix/Makefile") CONFIG_FILES="$CONFIG_FILES lib/voodoo/unix/Makefile" ;; "lib/voodoo/voodoo.pc") CONFIG_FILES="$CONFIG_FILES lib/voodoo/voodoo.pc" ;; "lib/sawman/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sawman/Makefile" ;; "lib/sawman/sawman.pc") CONFIG_FILES="$CONFIG_FILES lib/sawman/sawman.pc" ;; "lib/fusiondale/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusiondale/Makefile" ;; "lib/fusiondale/coma/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusiondale/coma/Makefile" ;; "lib/fusiondale/core/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusiondale/core/Makefile" ;; "lib/fusiondale/messenger/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusiondale/messenger/Makefile" ;; "lib/fusiondale/misc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusiondale/misc/Makefile" ;; "lib/fusiondale/one/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusiondale/one/Makefile" ;; "lib/fusiondale/fusiondale.pc") CONFIG_FILES="$CONFIG_FILES lib/fusiondale/fusiondale.pc" ;; "lib/fusiondale/fusiondale_version.h") CONFIG_FILES="$CONFIG_FILES lib/fusiondale/fusiondale_version.h" ;; "lib/fusionsound/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusionsound/Makefile" ;; "lib/fusionsound/core/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusionsound/core/Makefile" ;; "lib/fusionsound/drivers/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusionsound/drivers/Makefile" ;; "lib/fusionsound/media/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusionsound/media/Makefile" ;; "lib/fusionsound/misc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fusionsound/misc/Makefile" ;; "lib/fusionsound/fusionsound.pc") CONFIG_FILES="$CONFIG_FILES lib/fusionsound/fusionsound.pc" ;; "lib/fusionsound/fusionsound-internal.pc") CONFIG_FILES="$CONFIG_FILES lib/fusionsound/fusionsound-internal.pc" ;; "lib/fusionsound/fusionsound_limits.h") CONFIG_FILES="$CONFIG_FILES lib/fusionsound/fusionsound_limits.h" ;; "lib/fusionsound/fusionsound_version.h") CONFIG_FILES="$CONFIG_FILES lib/fusionsound/fusionsound_version.h" ;; "lib/divine/Makefile") CONFIG_FILES="$CONFIG_FILES lib/divine/Makefile" ;; "lib/divine/divine.pc") CONFIG_FILES="$CONFIG_FILES lib/divine/divine.pc" ;; "lib/dvc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dvc/Makefile" ;; "lib/++dfb/Makefile") CONFIG_FILES="$CONFIG_FILES lib/++dfb/Makefile" ;; "lib/++dfb/++dfb.pc") CONFIG_FILES="$CONFIG_FILES lib/++dfb/++dfb.pc" ;; "patches/Makefile") CONFIG_FILES="$CONFIG_FILES patches/Makefile" ;; "proxy/Makefile") CONFIG_FILES="$CONFIG_FILES proxy/Makefile" ;; "proxy/compressor/Makefile") CONFIG_FILES="$CONFIG_FILES proxy/compressor/Makefile" ;; "proxy/dispatcher/Makefile") CONFIG_FILES="$CONFIG_FILES proxy/dispatcher/Makefile" ;; "proxy/requestor/Makefile") CONFIG_FILES="$CONFIG_FILES proxy/requestor/Makefile" ;; "rules/Makefile") CONFIG_FILES="$CONFIG_FILES rules/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/core/Makefile") CONFIG_FILES="$CONFIG_FILES src/core/Makefile" ;; "src/display/Makefile") CONFIG_FILES="$CONFIG_FILES src/display/Makefile" ;; "src/gfx/Makefile") CONFIG_FILES="$CONFIG_FILES src/gfx/Makefile" ;; "src/gfx/generic/Makefile") CONFIG_FILES="$CONFIG_FILES src/gfx/generic/Makefile" ;; "src/input/Makefile") CONFIG_FILES="$CONFIG_FILES src/input/Makefile" ;; "src/media/Makefile") CONFIG_FILES="$CONFIG_FILES src/media/Makefile" ;; "src/misc/Makefile") CONFIG_FILES="$CONFIG_FILES src/misc/Makefile" ;; "src/windows/Makefile") CONFIG_FILES="$CONFIG_FILES src/windows/Makefile" ;; "systems/Makefile") CONFIG_FILES="$CONFIG_FILES systems/Makefile" ;; "systems/android/Makefile") CONFIG_FILES="$CONFIG_FILES systems/android/Makefile" ;; "systems/devmem/Makefile") CONFIG_FILES="$CONFIG_FILES systems/devmem/Makefile" ;; "systems/dummy/Makefile") CONFIG_FILES="$CONFIG_FILES systems/dummy/Makefile" ;; "systems/fbdev/Makefile") CONFIG_FILES="$CONFIG_FILES systems/fbdev/Makefile" ;; "systems/mesa/Makefile") CONFIG_FILES="$CONFIG_FILES systems/mesa/Makefile" ;; "systems/drmkms/Makefile") CONFIG_FILES="$CONFIG_FILES systems/drmkms/Makefile" ;; "systems/pvr2d/Makefile") CONFIG_FILES="$CONFIG_FILES systems/pvr2d/Makefile" ;; "systems/egl/Makefile") CONFIG_FILES="$CONFIG_FILES systems/egl/Makefile" ;; "systems/x11/Makefile") CONFIG_FILES="$CONFIG_FILES systems/x11/Makefile" ;; "systems/x11vdpau/Makefile") CONFIG_FILES="$CONFIG_FILES systems/x11vdpau/Makefile" ;; "systems/osx/Makefile") CONFIG_FILES="$CONFIG_FILES systems/osx/Makefile" ;; "systems/sdl/Makefile") CONFIG_FILES="$CONFIG_FILES systems/sdl/Makefile" ;; "systems/vnc/Makefile") CONFIG_FILES="$CONFIG_FILES systems/vnc/Makefile" ;; "wm/Makefile") CONFIG_FILES="$CONFIG_FILES wm/Makefile" ;; "wm/default/Makefile") CONFIG_FILES="$CONFIG_FILES wm/default/Makefile" ;; "wm/unique/Makefile") CONFIG_FILES="$CONFIG_FILES wm/unique/Makefile" ;; "wm/unique/classes/Makefile") CONFIG_FILES="$CONFIG_FILES wm/unique/classes/Makefile" ;; "wm/unique/data/Makefile") CONFIG_FILES="$CONFIG_FILES wm/unique/data/Makefile" ;; "wm/unique/devices/Makefile") CONFIG_FILES="$CONFIG_FILES wm/unique/devices/Makefile" ;; "wm/sawman/Makefile") CONFIG_FILES="$CONFIG_FILES wm/sawman/Makefile" ;; "gfxdrivers/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/Makefile" ;; "gfxdrivers/ati128/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/ati128/Makefile" ;; "gfxdrivers/cle266/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/cle266/Makefile" ;; "gfxdrivers/cyber5k/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/cyber5k/Makefile" ;; "gfxdrivers/davinci/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/davinci/Makefile" ;; "gfxdrivers/ep9x/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/ep9x/Makefile" ;; "gfxdrivers/gp2d/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/gp2d/Makefile" ;; "gfxdrivers/gl/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/gl/Makefile" ;; "gfxdrivers/gles2/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/gles2/Makefile" ;; "gfxdrivers/i810/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/i810/Makefile" ;; "gfxdrivers/i830/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/i830/Makefile" ;; "gfxdrivers/mach64/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/mach64/Makefile" ;; "gfxdrivers/matrox/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/matrox/Makefile" ;; "gfxdrivers/neomagic/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/neomagic/Makefile" ;; "gfxdrivers/nsc/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/nsc/Makefile" ;; "gfxdrivers/nsc/include/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/nsc/include/Makefile" ;; "gfxdrivers/nvidia/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/nvidia/Makefile" ;; "gfxdrivers/omap/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/omap/Makefile" ;; "gfxdrivers/pvr2d/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/pvr2d/Makefile" ;; "gfxdrivers/pxa3xx/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/pxa3xx/Makefile" ;; "gfxdrivers/radeon/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/radeon/Makefile" ;; "gfxdrivers/savage/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/savage/Makefile" ;; "gfxdrivers/sh772x/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/sh772x/Makefile" ;; "gfxdrivers/sis315/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/sis315/Makefile" ;; "gfxdrivers/tdfx/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/tdfx/Makefile" ;; "gfxdrivers/unichrome/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/unichrome/Makefile" ;; "gfxdrivers/vdpau/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/vdpau/Makefile" ;; "gfxdrivers/vmware/Makefile") CONFIG_FILES="$CONFIG_FILES gfxdrivers/vmware/Makefile" ;; "inputdrivers/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/Makefile" ;; "inputdrivers/dbox2remote/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/dbox2remote/Makefile" ;; "inputdrivers/divine/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/divine/Makefile" ;; "inputdrivers/dreamboxremote/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/dreamboxremote/Makefile" ;; "inputdrivers/dynapro/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/dynapro/Makefile" ;; "inputdrivers/elo/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/elo/Makefile" ;; "inputdrivers/gunze/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/gunze/Makefile" ;; "inputdrivers/h3600_ts/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/h3600_ts/Makefile" ;; "inputdrivers/input_hub/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/input_hub/Makefile" ;; "inputdrivers/joystick/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/joystick/Makefile" ;; "inputdrivers/keyboard/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/keyboard/Makefile" ;; "inputdrivers/linux_input/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/linux_input/Makefile" ;; "inputdrivers/lirc/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/lirc/Makefile" ;; "inputdrivers/mutouch/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/mutouch/Makefile" ;; "inputdrivers/zytronic/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/zytronic/Makefile" ;; "inputdrivers/penmount/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/penmount/Makefile" ;; "inputdrivers/ps2mouse/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/ps2mouse/Makefile" ;; "inputdrivers/serialmouse/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/serialmouse/Makefile" ;; "inputdrivers/sonypi/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/sonypi/Makefile" ;; "inputdrivers/tslib/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/tslib/Makefile" ;; "inputdrivers/ucb1x00_ts/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/ucb1x00_ts/Makefile" ;; "inputdrivers/wm97xx_ts/Makefile") CONFIG_FILES="$CONFIG_FILES inputdrivers/wm97xx_ts/Makefile" ;; "interfaces/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/Makefile" ;; "interfaces/ICoreResourceManager/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/ICoreResourceManager/Makefile" ;; "interfaces/IDirectFBFont/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IDirectFBFont/Makefile" ;; "interfaces/IDirectFBGL/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IDirectFBGL/Makefile" ;; "interfaces/IDirectFBGL/EGL/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IDirectFBGL/EGL/Makefile" ;; "interfaces/IDirectFBImageProvider/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IDirectFBImageProvider/Makefile" ;; "interfaces/IDirectFBImageProvider/mpeg2/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IDirectFBImageProvider/mpeg2/Makefile" ;; "interfaces/IDirectFBVideoProvider/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IDirectFBVideoProvider/Makefile" ;; "interfaces/IDirectFBVideoProvider/video_out_dfb/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IDirectFBVideoProvider/video_out_dfb/Makefile" ;; "interfaces/IDirectFBWindows/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IDirectFBWindows/Makefile" ;; "interfaces/IFusionSound/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IFusionSound/Makefile" ;; "interfaces/IFusionSoundMusicProvider/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IFusionSoundMusicProvider/Makefile" ;; "interfaces/IWater/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/IWater/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/voodoo/Makefile") CONFIG_FILES="$CONFIG_FILES tests/voodoo/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "examples/fusiondale/Makefile") CONFIG_FILES="$CONFIG_FILES examples/fusiondale/Makefile" ;; "examples/fusionsound/Makefile") CONFIG_FILES="$CONFIG_FILES examples/fusionsound/Makefile" ;; "examples/++dfb/Makefile") CONFIG_FILES="$CONFIG_FILES examples/++dfb/Makefile" ;; "examples/++dfb/tests/Makefile") CONFIG_FILES="$CONFIG_FILES examples/++dfb/tests/Makefile" ;; "examples/++dfb/tests/data/Makefile") CONFIG_FILES="$CONFIG_FILES examples/++dfb/tests/data/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/dfbg.1") CONFIG_FILES="$CONFIG_FILES docs/dfbg.1" ;; "docs/directfb-csource.1") CONFIG_FILES="$CONFIG_FILES docs/directfb-csource.1" ;; "docs/directfbrc.5") CONFIG_FILES="$CONFIG_FILES docs/directfbrc.5" ;; "docs/html/Makefile") CONFIG_FILES="$CONFIG_FILES docs/html/Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "default":C) chmod +x directfb-config ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi eval eval_moduledir=$MODULEDIR eval eval_moduledir=$eval_moduledir eval eval_moduledir=$eval_moduledir { $as_echo "$as_me:${as_lineno-$LINENO}: result: Build options: Version $VERSION Linux powered $have_linux Install prefix $prefix Config files in $SYSCONFDIR Build shared libs $enable_shared Build static libs $enable_static Module directory $eval_moduledir CC $CC CXX $CXX LD $LD CPPFLAGS $CPPFLAGS CFLAGS $CFLAGS CXXFLAGS $CXXFLAGS LDFLAGS $LDFLAGS LIBS $LIBS DYNLIB $DYNLIB RTLIB $RTLIB THREADFLAGS $THREADFLAGS THREADLIB $THREADLIB Misc options: Multi Application Core $enable_multi Fusion Kernel Device $enable_multi_kernel Fusion message size $with_message_size Fluxed args size $with_args_size One (IPC) $enable_one Voodoo (network support) $enable_voodoo Pure Voodoo (net only) $enable_pure_voodoo DiVine (virtual input) $enable_divine FusionDale $enable_fusiondale Debug supported $enable_debug_support Debug enabled $enable_debug Trace support $enable_trace MMX support $enable_mmx SSE support $enable_sse GCC Atomics usage $enable_gcc_atomics Network support $enable_network Include all strings $enable_text Software Rendering $with_software Smooth SW Scaling $with_smooth_scaling Dithering $with_dither Dithering 565 $with_dither_rgb16 zlib compression $use_zlib $ZLIB_LIBS Using setsockopt $with_setsockopt Building Tests $with_tests Building Tools $with_tools Building System Modules: Linux FBDev support $enable_fbdev Generic /dev/mem support $enable_devmem Mesa/DRM/KMS support $enable_mesa $MESA_CFLAGS $MESA_LIBS DRM/KMS support $enable_drmkms $DRMKMS_CFLAGS $DRMKMS_LIBS PVR2D $enable_pvr2d $PVR2D_CFLAGS $PVR2D_LIBS EGL $enable_egl $EGL_CFLAGS $EGL_LIBS X11 support $enable_x11 $X11_CFLAGS $X11_LIBS X11/VDPAU support $enable_x11vdpau $X11VDPAU_CFLAGS $X11VDPAU_LIBS OSX support $enable_osx $OSX_CFLAGS $OSX_LIBS SDL support $enable_sdl $SDL_CFLAGS $SDL_LIBS VNC support $enable_vnc $VNC_CFLAGS $VNC_LIBS Building Window Manager Modules: Default yes UniQuE $enable_unique SaWMan $enable_sawman Building Image Provider Modules: GIF $enable_gif JPEG $JPEG $LIBJPEG PNG $PNG $LIBPNG_CFLAGS $LIBPNG_LIBS Imlib2 $imlib2 $IMLIB2_CFLAGS $IMLIB2_LIBS PNM $enable_pnm SVG $svg $LIBSVG_CFLAGS $LIBSVG_LIBS BMP $enable_bmp WEBP $webp $LIBWEBP_CFLAGS $LIBWEBP_LIBS JPEG2000 $enable_jpeg2000 $JASPER_LIBS MPEG2 $enable_mpeg2 TIFF $tiff $LIBTIFF_CFLAGS $LIBTIFF_LIBS Building Video Provider Modules: GIF $enable_gif Video4Linux $V4L (v2: $V4L2) MNG $MNG $LIBMNG_CFLAGS $LIBMNG_LIBS Gstreamer $gstreamer (v1: $HAVE_GSTREAMER_1_0) $GSTREAMER_INCL $GSTREAMER_LIBS with FusionSound $enable_fusionsound AviFile $avifile Flash $flash Libmpeg3 $mpeg3 OpenQuicktime $openquicktime Xine $xine Xine/VDPAU $xine_vdpau Swfdec $swfdec FFmpeg $ffmpeg Building Font Modules: FreeType2 $FREETYPE $FREETYPE_CFLAGS $FREETYPE_LIBS LinoType $LINOTYPE $LINOTYPE_CFLAGS $LINOTYPE_LIBS Default font yes Building FusionSound $enable_fusionsound" >&5 $as_echo " Build options: Version $VERSION Linux powered $have_linux Install prefix $prefix Config files in $SYSCONFDIR Build shared libs $enable_shared Build static libs $enable_static Module directory $eval_moduledir CC $CC CXX $CXX LD $LD CPPFLAGS $CPPFLAGS CFLAGS $CFLAGS CXXFLAGS $CXXFLAGS LDFLAGS $LDFLAGS LIBS $LIBS DYNLIB $DYNLIB RTLIB $RTLIB THREADFLAGS $THREADFLAGS THREADLIB $THREADLIB Misc options: Multi Application Core $enable_multi Fusion Kernel Device $enable_multi_kernel Fusion message size $with_message_size Fluxed args size $with_args_size One (IPC) $enable_one Voodoo (network support) $enable_voodoo Pure Voodoo (net only) $enable_pure_voodoo DiVine (virtual input) $enable_divine FusionDale $enable_fusiondale Debug supported $enable_debug_support Debug enabled $enable_debug Trace support $enable_trace MMX support $enable_mmx SSE support $enable_sse GCC Atomics usage $enable_gcc_atomics Network support $enable_network Include all strings $enable_text Software Rendering $with_software Smooth SW Scaling $with_smooth_scaling Dithering $with_dither Dithering 565 $with_dither_rgb16 zlib compression $use_zlib $ZLIB_LIBS Using setsockopt $with_setsockopt Building Tests $with_tests Building Tools $with_tools Building System Modules: Linux FBDev support $enable_fbdev Generic /dev/mem support $enable_devmem Mesa/DRM/KMS support $enable_mesa $MESA_CFLAGS $MESA_LIBS DRM/KMS support $enable_drmkms $DRMKMS_CFLAGS $DRMKMS_LIBS PVR2D $enable_pvr2d $PVR2D_CFLAGS $PVR2D_LIBS EGL $enable_egl $EGL_CFLAGS $EGL_LIBS X11 support $enable_x11 $X11_CFLAGS $X11_LIBS X11/VDPAU support $enable_x11vdpau $X11VDPAU_CFLAGS $X11VDPAU_LIBS OSX support $enable_osx $OSX_CFLAGS $OSX_LIBS SDL support $enable_sdl $SDL_CFLAGS $SDL_LIBS VNC support $enable_vnc $VNC_CFLAGS $VNC_LIBS Building Window Manager Modules: Default yes UniQuE $enable_unique SaWMan $enable_sawman Building Image Provider Modules: GIF $enable_gif JPEG $JPEG $LIBJPEG PNG $PNG $LIBPNG_CFLAGS $LIBPNG_LIBS Imlib2 $imlib2 $IMLIB2_CFLAGS $IMLIB2_LIBS PNM $enable_pnm SVG $svg $LIBSVG_CFLAGS $LIBSVG_LIBS BMP $enable_bmp WEBP $webp $LIBWEBP_CFLAGS $LIBWEBP_LIBS JPEG2000 $enable_jpeg2000 $JASPER_LIBS MPEG2 $enable_mpeg2 TIFF $tiff $LIBTIFF_CFLAGS $LIBTIFF_LIBS Building Video Provider Modules: GIF $enable_gif Video4Linux $V4L (v2: $V4L2) MNG $MNG $LIBMNG_CFLAGS $LIBMNG_LIBS Gstreamer $gstreamer (v1: $HAVE_GSTREAMER_1_0) $GSTREAMER_INCL $GSTREAMER_LIBS with FusionSound $enable_fusionsound AviFile $avifile Flash $flash Libmpeg3 $mpeg3 OpenQuicktime $openquicktime Xine $xine Xine/VDPAU $xine_vdpau Swfdec $swfdec FFmpeg $ffmpeg Building Font Modules: FreeType2 $FREETYPE $FREETYPE_CFLAGS $FREETYPE_LIBS LinoType $LINOTYPE $LINOTYPE_CFLAGS $LINOTYPE_LIBS Default font yes Building FusionSound $enable_fusionsound" >&6; }; if test "$enable_fusionsound" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Options: IEEE floats: $enable_fs_ieee_floats Precision: $enable_fs_precision Linear filter: $enable_fs_linear_filter Multichannel $enable_fs_multichannel Drivers: OSS $fsdriver_oss ALSA $fsdriver_alsa WAVE $fsdriver_wave Music Providers: Timidity $timidity Wave $with_wave Ogg/Vorbis $vorbis MAD $mad CD-DA $cdda FFmpeg $ffmpeg Playlist $with_playlist" >&5 $as_echo " Options: IEEE floats: $enable_fs_ieee_floats Precision: $enable_fs_precision Linear filter: $enable_fs_linear_filter Multichannel $enable_fs_multichannel Drivers: OSS $fsdriver_oss ALSA $fsdriver_alsa WAVE $fsdriver_wave Music Providers: Timidity $timidity Wave $with_wave Ogg/Vorbis $vorbis MAD $mad CD-DA $cdda FFmpeg $ffmpeg Playlist $with_playlist" >&6; }; fi if test "$have_linux" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Building Graphics Drivers: 3Dfx Voodoo $tdfx ATI Mach64 $mach64 ATI Rage 128 $ati128 ATI Radeon $radeon Cirrus EP9X $ep9x Intel i810 $i810 Intel i830 $i830 Matrox $matrox NeoMagic $neomagic NSC Geode $nsc nVidia $nvidia PVR2D $pvr2d PXA 3xx $pxa3xx Renesas R-Car GP2D $gp2d $GP2D_CFLAGS $GP2D_LIBS Renesas SH7722/SH7723 $sh772x S3 Savage $savage SiS 315 $sis315 TI Davinci $davinci TI OMAP $omap TVIA CyberPro $cyber5k VIA CLE266 $cle266 VIA UniChrome $unichrome VMWare $vmware VDPAU $vdpau -- OpenGL $gl (GLX: $glx) OpenGL ES 2.0 $gles2 (Mesa: $enable_mesa, PVR2D: $enable_pvr2d) $GLES2_CFLAGS $GLES2_LIBS IDirectFBGL-EGL $enable_idirectfbgl_egl $EGL_CFLAGS $EGL_LIBS Building Input Drivers: DBox2 Remote $enable_dbox2remote DreamBox Remote $enable_dreamboxremote Dynapro Touchscreen $enable_dynapro_ts ELO Touchscreen $enable_elo_input Gunze Touchscreen $enable_gunze_input H3600 Touchscreen $enable_h3600_ts Input Hub $enable_input_hub Joystick $enable_joystick Keyboard $enable_keyboard Linux Input $enable_linux_input LiRC $enable_lirc MuTouch touchscreen $enable_mutouch Zytronic touchscreen $enable_zytronic PS/2 Mouse $enable_ps2mouse Serial Mouse $enable_serial_mouse SonyPI Jogdial $enable_sonypi_jogdial tslib $enable_tslib $TSLIB_CFLAGS $TSLIB_LIBS ucb1x00 Touchscreen $enable_ucb1x00_ts WM97xx Touchscreen $enable_wm97xx_ts" >&5 $as_echo " Building Graphics Drivers: 3Dfx Voodoo $tdfx ATI Mach64 $mach64 ATI Rage 128 $ati128 ATI Radeon $radeon Cirrus EP9X $ep9x Intel i810 $i810 Intel i830 $i830 Matrox $matrox NeoMagic $neomagic NSC Geode $nsc nVidia $nvidia PVR2D $pvr2d PXA 3xx $pxa3xx Renesas R-Car GP2D $gp2d $GP2D_CFLAGS $GP2D_LIBS Renesas SH7722/SH7723 $sh772x S3 Savage $savage SiS 315 $sis315 TI Davinci $davinci TI OMAP $omap TVIA CyberPro $cyber5k VIA CLE266 $cle266 VIA UniChrome $unichrome VMWare $vmware VDPAU $vdpau -- OpenGL $gl (GLX: $glx) OpenGL ES 2.0 $gles2 (Mesa: $enable_mesa, PVR2D: $enable_pvr2d) $GLES2_CFLAGS $GLES2_LIBS IDirectFBGL-EGL $enable_idirectfbgl_egl $EGL_CFLAGS $EGL_LIBS Building Input Drivers: DBox2 Remote $enable_dbox2remote DreamBox Remote $enable_dreamboxremote Dynapro Touchscreen $enable_dynapro_ts ELO Touchscreen $enable_elo_input Gunze Touchscreen $enable_gunze_input H3600 Touchscreen $enable_h3600_ts Input Hub $enable_input_hub Joystick $enable_joystick Keyboard $enable_keyboard Linux Input $enable_linux_input LiRC $enable_lirc MuTouch touchscreen $enable_mutouch Zytronic touchscreen $enable_zytronic PS/2 Mouse $enable_ps2mouse Serial Mouse $enable_serial_mouse SonyPI Jogdial $enable_sonypi_jogdial tslib $enable_tslib $TSLIB_CFLAGS $TSLIB_LIBS ucb1x00 Touchscreen $enable_ucb1x00_ts WM97xx Touchscreen $enable_wm97xx_ts" >&6; }; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $png_warning $jpeg_warning $freetype_warning " >&5 $as_echo "$png_warning $jpeg_warning $freetype_warning " >&6; }; DirectFB-1.7.7/config.sub0000755000175000017500000010577512466665307012112 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-09-11' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: DirectFB-1.7.7/INSTALL0000644000175000017500000003661012466665307011147 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command `./configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. 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, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. 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 you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' 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. Running `configure' might take a while. 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, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. 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. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. 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 can use 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 `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer 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. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' 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. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= 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'. 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. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS 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 machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. 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. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--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. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. DirectFB-1.7.7/fb.modes0000644000175000017500000000354512171403127011516 00000000000000# # DirectFB video modes, should be placed into "/etc" # mode "640x480 75Hz 16bit" # D: 31.50 MHz, H: 37.500 kHz, V: 75.00 Hz geometry 640 480 640 480 16 timings 31747 120 16 16 1 64 3 endmode mode "720x576 50Hz 16bit" geometry 720 576 720 576 16 timings 31208 144 40 32 10 128 3 endmode mode "768x576 75Hz 16bit" # D: 49.188 MHz, H: 46.580 kHz, V: 75.008 Hz geometry 768 576 768 576 16 timings 20330 128 32 32 8 128 5 endmode mode "800x600 75Hz 16bit" # D: 49.50 MHz, H: 46.875 kHz, V: 75.00 Hz geometry 800 600 800 600 16 timings 20203 160 16 21 1 80 3 hsync high vsync high endmode mode "1024x768 72Hz 16bit" # D: 75.00 MHz, H: 58.230 kHz, V: 72.245 Hz geometry 1024 768 1024 768 16 timings 13334 104 24 29 3 136 6 endmode mode "1280x1024-75" # D: 134.880 MHz, H: 79.905 kHz, V: 74.958 Hz geometry 1280 1024 1280 3264 16 timings 7414 232 64 38 1 112 3 hsync high vsync high endmode mode "1280x1024 60Hz 16bit" # D: 108.00 MHz, H: 63.981 kHz, V: 60.02 Hz geometry 1280 1024 1280 1024 16 timings 9260 248 48 38 1 112 3 hsync high vsync high endmode mode "1600x1200 60Hz 16bit" # D: 156.00 MHz, H: 76.200 kHz, V: 60.00 Hz geometry 1600 1200 1600 1200 16 timings 6411 256 32 52 10 160 8 endmode mode "640x400 93Hz 16bit" geometry 640 400 640 400 16 timings 28272 48 32 17 22 128 12 endmode mode "400x300 100Hz 16bit" geometry 400 300 400 300 16 timings 31747 40 16 16 1 40 3 double true endmode mode "320x240 85Hz 16bit" geometry 320 240 320 240 16 timings 51383 32 32 20 4 48 1 double true endmode mode "320x200 85Hz 16bit" geometry 320 200 320 200 16 timings 60440 32 32 20 4 48 1 double true endmode mode "2048x480 60Hz 16bit" geometry 2048 480 2048 480 16 timings 6411 256 32 52 10 160 8 endmode DirectFB-1.7.7/missing0000755000175000017500000001533012466665307011511 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 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, see . # 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 case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." 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 # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: DirectFB-1.7.7/config.h.in0000644000175000017500000001273512466665306012142 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define to 1 if you are compiling for ARM. */ #undef ARCH_ARM /* Define to 1 if you are compiling for ARMv7. */ #undef ARCH_ARMv7 /* Define to 1 if you are compiling for MIPS. */ #undef ARCH_MIPS /* Define to 1 if you are compiling for PowerPC. */ #undef ARCH_PPC /* Define to 1 if you are compiling for SuperH. */ #undef ARCH_SH /* Define to 1 if you are compiling for SH3. */ #undef ARCH_SH3 /* Define to 1 if you are compiling for SH4. */ #undef ARCH_SH4 /* Define to 1 if you are compiling for ix86. */ #undef ARCH_X86 /* Define to 1 if you are compiling for AMD64. */ #undef ARCH_X86_64 /* Dithering to use when rendering to non-RGB16 surfaces */ #undef DFB_DITHER /* Dithering to use when rendering to RGB16 surfaces */ #undef DFB_DITHER565 /* Advanced dithering, uses large dither table */ #undef DFB_DITHER_ADVANCED /* Simple dithering, uses small dither table */ #undef DFB_DITHER_SIMPLE /* Define to 1 if Video4Linux 2 is supported. */ #undef DFB_HAVE_V4L2 /* Define to 1 if smooth scaling code should be built. */ #undef DFB_SMOOTH_SCALING /* The DirectFB version */ #undef DIRECTFB_VERSION /* Vendor specific version */ #undef DIRECTFB_VERSION_VENDOR /* Define to 1 to enable linear filter. */ #undef FS_ENABLE_LINEAR_FILTER /* Define to 1 to enable precision. */ #undef FS_ENABLE_PRECISION /* Define to 1 to enable IEEE floats for mixing routines. */ #undef FS_USE_IEEE_FLOATS /* Define to 1 if you have the header file. */ #undef HAVE_ASM_PAGE_H /* Define to 1 if you have libcddb. */ #undef HAVE_CDDB /* Define to 1 if you have the declaration of `PTHREAD_MUTEX_RECURSIVE', and to 0 if you don't. */ #undef HAVE_DECL_PTHREAD_MUTEX_RECURSIVE /* Define to 1 if you have the declaration of `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP', and to 0 if you don't. */ #undef HAVE_DECL_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you want FusionSound support. */ #undef HAVE_FUSIONSOUND /* Define to 1 if sh772x */ #undef HAVE_GFX_SH772X /* Define to 1 if inb, outb and iopl are available. */ #undef HAVE_INB_OUTB_IOPL /* Define to 1 if struct input_absinfo is defined in linux/input.h. */ #undef HAVE_INPUT_ABSINFO /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `c_r' library (-lc_r). */ #undef HAVE_LIBC_R /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_COMPILER_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYSIO /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if arm assembly is available. */ #undef USE_ARMASM /* Define to 1 if GLX has been selected or detected */ #undef USE_GLX /* Define to 1 if compiling on KallistiOS. */ #undef USE_KOS /* Define to 1 if MMX assembly is available. */ #undef USE_MMX /* Define to 1 if ppc assembly is available. */ #undef USE_PPCASM /* Define to 1 if SSE assembly is available. */ #undef USE_SSE /* Define to 1 to use Tremor Ogg/Vorbis decoder. */ #undef USE_TREMOR /* Define to 1 to build with zlib compression. */ #undef USE_ZLIB /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif DirectFB-1.7.7/lib/0000755000175000017500000000000012466665353010737 500000000000000DirectFB-1.7.7/lib/direct/0000755000175000017500000000000012466665351012207 500000000000000DirectFB-1.7.7/lib/direct/Performer.h0000644000175000017500000000370512313366376014242 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 ___Direct__Performer__H___ #define ___Direct__Performer__H___ #include #ifdef __cplusplus extern "C" { #endif #include #ifdef __cplusplus } #include namespace Direct { class PerfCounter { public: DirectPerfCounterInstallation counter; PerfCounter( const Direct::String &name = Direct::String(), bool reset_on_dump = false ) { counter.counter_id = 0; counter.reset_on_dump = reset_on_dump; direct_snputs( counter.name, name.buffer(), sizeof(counter.name) ); } }; class Performer { public: Performer() { } protected: }; } #endif // __cplusplus #endif DirectFB-1.7.7/lib/direct/direct_result.c0000644000175000017500000001040612267766104015141 00000000000000#include #include /* * Generated by mkresult.sh */ #include static const char *DirectResult__strings[DR__RESULT_END - DR__RESULT_BASE]; static DirectResultType DirectResult__type = { 0, 0, DR__RESULT_BASE, DirectResult__strings, sizeof(DirectResult__strings) / sizeof(char*) }; void DirectResult__init(void); void DirectResult__init(void) { DirectResult__strings[0] = "DirectResult"; DirectResult__strings[D_RESULT_INDEX(DR_FAILURE)] = "A general or unknown error occured"; DirectResult__strings[D_RESULT_INDEX(DR_INIT)] = "A general initialization error occured"; DirectResult__strings[D_RESULT_INDEX(DR_BUG)] = "Internal bug or inconsistency has been detected"; DirectResult__strings[D_RESULT_INDEX(DR_DEAD)] = "Interface has a zero reference counter (available in debug mode)"; DirectResult__strings[D_RESULT_INDEX(DR_UNSUPPORTED)] = "The requested operation or an argument is (currently) not supported"; DirectResult__strings[D_RESULT_INDEX(DR_UNIMPLEMENTED)] = "The requested operation is not implemented, yet"; DirectResult__strings[D_RESULT_INDEX(DR_ACCESSDENIED)] = "Access to the resource is denied"; DirectResult__strings[D_RESULT_INDEX(DR_INVAREA)] = "An invalid area has been specified or detected"; DirectResult__strings[D_RESULT_INDEX(DR_INVARG)] = "An invalid argument has been specified"; DirectResult__strings[D_RESULT_INDEX(DR_NOLOCALMEMORY)] = "There's not enough local system memory"; DirectResult__strings[D_RESULT_INDEX(DR_NOSHAREDMEMORY)] = "There's not enough shared system memory"; DirectResult__strings[D_RESULT_INDEX(DR_LOCKED)] = "The resource is (already) locked"; DirectResult__strings[D_RESULT_INDEX(DR_BUFFEREMPTY)] = "The buffer is empty"; DirectResult__strings[D_RESULT_INDEX(DR_FILENOTFOUND)] = "The specified file has not been found"; DirectResult__strings[D_RESULT_INDEX(DR_IO)] = "A general I/O error occured"; DirectResult__strings[D_RESULT_INDEX(DR_BUSY)] = "The resource or device is busy"; DirectResult__strings[D_RESULT_INDEX(DR_NOIMPL)] = "No implementation for this interface or content type has been found"; DirectResult__strings[D_RESULT_INDEX(DR_TIMEOUT)] = "The operation timed out"; DirectResult__strings[D_RESULT_INDEX(DR_THIZNULL)] = "'thiz' pointer is NULL"; DirectResult__strings[D_RESULT_INDEX(DR_IDNOTFOUND)] = "No resource has been found by the specified id"; DirectResult__strings[D_RESULT_INDEX(DR_DESTROYED)] = "The requested object has been destroyed"; DirectResult__strings[D_RESULT_INDEX(DR_FUSION)] = "Internal fusion error detected, most likely related to IPC resources"; DirectResult__strings[D_RESULT_INDEX(DR_BUFFERTOOLARGE)] = "Buffer is too large"; DirectResult__strings[D_RESULT_INDEX(DR_INTERRUPTED)] = "The operation has been interrupted"; DirectResult__strings[D_RESULT_INDEX(DR_NOCONTEXT)] = "No context available"; DirectResult__strings[D_RESULT_INDEX(DR_TEMPUNAVAIL)] = "Temporarily unavailable"; DirectResult__strings[D_RESULT_INDEX(DR_LIMITEXCEEDED)] = "Attempted to exceed limit, i.e. any kind of maximum size, count etc"; DirectResult__strings[D_RESULT_INDEX(DR_NOSUCHMETHOD)] = "Requested method is not known"; DirectResult__strings[D_RESULT_INDEX(DR_NOSUCHINSTANCE)] = "Requested instance is not known"; DirectResult__strings[D_RESULT_INDEX(DR_ITEMNOTFOUND)] = "No such item found"; DirectResult__strings[D_RESULT_INDEX(DR_VERSIONMISMATCH)] = "Some versions didn't match"; DirectResult__strings[D_RESULT_INDEX(DR_EOF)] = "Reached end of file"; DirectResult__strings[D_RESULT_INDEX(DR_SUSPENDED)] = "The requested object is suspended"; DirectResult__strings[D_RESULT_INDEX(DR_INCOMPLETE)] = "The operation has been executed, but not completely"; DirectResult__strings[D_RESULT_INDEX(DR_NOCORE)] = "Core part not available"; DirectResult__strings[D_RESULT_INDEX(DR_SIGNALLED)] = "Received a signal, e.g. while waiting"; DirectResult__strings[D_RESULT_INDEX(DR_TASK_NOT_FOUND)] = "The corresponding task has not been found"; DirectResultTypeRegister( &DirectResult__type ); } void DirectResult__deinit(void); void DirectResult__deinit(void) { DirectResultTypeUnregister( &DirectResult__type ); } DirectFB-1.7.7/lib/direct/processor.c0000644000175000017500000002451412254435330014303 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include D_LOG_DOMAIN( Direct_Processor, "Direct/Processor", "Direct Processor" ); D_LOG_DOMAIN( Direct_Processor_Alloc, "Direct/Processor/Alloc", "Direct Processor Allocation" ); D_LOG_DOMAIN( Direct_Processor_Post, "Direct/Processor/Post", "Direct Processor Posting" ); D_LOG_DOMAIN( Direct_Processor_Recycle, "Direct/Processor/Recycle", "Direct Processor Recycling" ); /**********************************************************************************************************************/ typedef struct { DirectFifoItem item; int magic; } ProcessorCommand; /**********************************************************************************************************************/ static void * processor_thread( DirectThread *thread, void *ctx ) { DirectResult ret; bool started = false; DirectProcessor *processor = ctx; const DirectProcessorFuncs *funcs; D_DEBUG_AT( Direct_Processor, "%s( %p, %p )...\n", __FUNCTION__, thread, ctx ); D_MAGIC_ASSERT( processor, DirectProcessor ); funcs = processor->funcs; D_ASSERT( funcs != NULL ); D_ASSERT( funcs->Process != NULL ); while (!processor->stop) { ProcessorCommand *command = direct_fifo_pull( &processor->commands ); if (command) { D_DEBUG_AT( Direct_Processor, "=---### %p - %p (%s)\n", command, command + 1, processor->name ); D_MAGIC_ASSERT( command, ProcessorCommand ); if (!started) { if (funcs->Start) funcs->Start( processor, processor->context ); started = true; } ret = funcs->Process( processor, command + 1, processor->context ); if (ret) D_DERROR( ret, "Direct/Processor: Processing failed! (%s)\n", processor->name ); } else { if (started) { if (funcs->Stop) funcs->Stop( processor, processor->context ); started = false; } #if 0 while (processor->lock) { direct_mutex_lock( &processor->lock_mutex ); processor->locked = true; direct_waitqueue_signal( &processor->lock_cond ); while (processor->lock) direct_waitqueue_wait( &processor->lock_cond, &processor->lock_mutex ); processor->locked = false; direct_waitqueue_signal( &processor->lock_cond ); direct_mutex_unlock( &processor->lock_mutex ); } #endif if (processor->idle_ms) { while (direct_fifo_wait_timed( &processor->commands, processor->idle_ms ) == DR_TIMEOUT) { if (funcs->Idle) funcs->Idle( processor, processor->context ); } } else { if (funcs->Idle) funcs->Idle( processor, processor->context ); direct_fifo_wait( &processor->commands ); } } } return NULL; } /**********************************************************************************************************************/ DirectResult direct_processor_init( DirectProcessor *processor, const char *name, const DirectProcessorFuncs *funcs, unsigned int data_size, void *context, int idle_ms ) { D_ASSERT( processor != NULL ); D_ASSERT( name != NULL ); D_ASSERT( funcs != NULL ); D_ASSERT( funcs->Process != NULL ); D_ASSERT( data_size > 0 ); D_DEBUG_AT( Direct_Processor, "%s( %p, %p, %p, %u, %p )\n", __FUNCTION__, processor, name, funcs, data_size, context ); processor->name = D_STRDUP( name ); if (!processor->name) return D_OOM(); processor->funcs = funcs; processor->data_size = data_size; processor->context = context; processor->idle_ms = idle_ms; processor->max_recycled = (8000 / data_size) + 1; direct_fifo_init( &processor->commands ); direct_fifo_init( &processor->recycled ); #if 0 direct_waitqueue_init( &processor->lock_cond, NULL ); direct_mutex_init( &processor->lock_mutex, NULL ); #endif D_MAGIC_SET( processor, DirectProcessor ); processor->thread = direct_thread_create( DTT_DEFAULT, processor_thread, processor, name ); if (!processor->thread) { D_MAGIC_CLEAR( processor ); direct_fifo_destroy( &processor->commands ); direct_fifo_destroy( &processor->recycled ); D_FREE( processor->name ); return DR_INIT; } return DR_OK; } DirectResult direct_processor_destroy( DirectProcessor *processor ) { void *item; D_MAGIC_ASSERT( processor, DirectProcessor ); D_DEBUG_AT( Direct_Processor, "%s( %p '%s' )\n", __FUNCTION__, processor, processor->name ); processor->stop = true; direct_thread_terminate( processor->thread ); direct_fifo_wakeup( &processor->commands ); direct_fifo_wakeup( &processor->recycled ); direct_thread_join( processor->thread ); direct_thread_destroy( processor->thread ); while ((item = direct_fifo_pull( &processor->commands )) != NULL) D_FREE( item ); direct_fifo_destroy( &processor->commands ); while ((item = direct_fifo_pull( &processor->recycled )) != NULL) D_FREE( item ); direct_fifo_destroy( &processor->recycled ); #if 0 direct_waitqueue_deinit( &processor->lock_cond ); direct_mutex_deinit( &processor->lock_mutex ); #endif D_FREE( processor->name ); D_MAGIC_CLEAR( processor ); return DR_OK; } void * direct_processor_allocate( DirectProcessor *processor ) { ProcessorCommand *command; D_MAGIC_ASSERT( processor, DirectProcessor ); D_DEBUG_AT( Direct_Processor_Alloc, "%s( %p '%s' )\n", __FUNCTION__, processor, processor->name ); command = direct_fifo_pop( &processor->recycled ); if (command) { D_MAGIC_ASSERT( command, ProcessorCommand ); } else { command = D_CALLOC( 1, sizeof(ProcessorCommand) + processor->data_size ); if (!command) { D_OOM(); return NULL; } D_MAGIC_SET( command, ProcessorCommand ); } D_DEBUG_AT( Direct_Processor_Alloc, " -> %p - %p\n", command, command + 1 ); return command + 1; } void direct_processor_post( DirectProcessor *processor, void *data ) { ProcessorCommand *command = (ProcessorCommand*) data - 1; D_MAGIC_ASSERT( processor, DirectProcessor ); D_MAGIC_ASSERT( command, ProcessorCommand ); D_DEBUG_AT( Direct_Processor_Post, "%s( %p '%s' <---= %p )\n", __FUNCTION__, processor, processor->name, data ); if (processor->direct) { DirectResult ret; const DirectProcessorFuncs *funcs; // D_ASSUME( !processor->commands.count ); funcs = processor->funcs; D_ASSERT( funcs != NULL ); D_ASSERT( funcs->Process != NULL ); ret = funcs->Process( processor, data, processor->context ); if (ret) D_DERROR( ret, "Direct/Processor: Processing directly failed! (%s)\n", processor->name ); } else direct_fifo_push( &processor->commands, &command->item ); } void direct_processor_recycle( DirectProcessor *processor, void *data ) { ProcessorCommand *command = (ProcessorCommand*) data - 1; D_MAGIC_ASSERT( processor, DirectProcessor ); D_MAGIC_ASSERT( command, ProcessorCommand ); D_DEBUG_AT( Direct_Processor_Recycle, "%s( %p '%s' <- %p )\n", __FUNCTION__, processor, processor->name, data ); // if (processor->recycled.count < processor->max_recycled) direct_fifo_push( &processor->recycled, &command->item ); /* else { D_MAGIC_CLEAR( command ); D_FREE( command ); }*/ } #if 0 void direct_processor_lock( DirectProcessor *processor ) { direct_mutex_lock( &processor->lock_mutex ); processor->lock++; while (!processor->locked) { direct_fifo_wakeup( &processor->commands ); direct_waitqueue_wait( &processor->lock_cond, &processor->lock_mutex ); } direct_mutex_unlock( &processor->lock_mutex ); } void direct_processor_unlock( DirectProcessor *processor ) { direct_mutex_lock( &processor->lock_mutex ); if (! --processor->lock && processor->locked) direct_waitqueue_signal( &processor->lock_cond ); direct_mutex_unlock( &processor->lock_mutex ); } #endif DirectFB-1.7.7/lib/direct/signals.c0000644000175000017500000004504012463500054013717 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include D_LOG_DOMAIN( Direct_Signals, "Direct/Signals", "Signal handling" ); #define SIG_CLOSE_SIGHANDLER SIGUNUSED #define SIG_DUMP_STACK SIGPIPE //(SIGUNUSED-1) struct __D_DirectSignalHandler { DirectLink link; int magic; int num; DirectSignalHandlerFunc func; void *ctx; bool removed; }; /**************************************************************************************************/ typedef struct { int signum; struct sigaction old_action; struct sigaction new_action; } SigHandled; static int sigs_to_handle[] = { /*SIGALRM,*/ SIGHUP, SIGINT, /*SIGPIPE,*/ /*SIGPOLL,*/ SIGTERM, /*SIGUSR1, SIGUSR2,*/ /*SIGVTALRM,*/ /*SIGSTKFLT,*/ SIGABRT, SIGFPE, SIGILL, SIGQUIT, SIGSEGV, SIGTRAP, /*SIGSYS, SIGEMT,*/ SIGBUS, SIGXCPU, SIGXFSZ, SIG_CLOSE_SIGHANDLER, SIG_DUMP_STACK }; #define NUM_SIGS_TO_HANDLE ((int)D_ARRAY_SIZE( sigs_to_handle )) static SigHandled sigs_handled[NUM_SIGS_TO_HANDLE]; static DirectLink *handlers = NULL; static DirectMutex handlers_lock; static DirectThread *sighandler_thread = NULL; /**************************************************************************************************/ #ifndef ANDROID_NDK static void *handle_signals( DirectThread *thread, void *ptr ); #endif static void install_handlers( void ); static void remove_handlers( void ); /**************************************************************************************************/ DirectResult direct_signals_initialize( void ) { #ifndef ANDROID_NDK sigset_t mask; int i; #endif D_DEBUG_AT( Direct_Signals, "Initializing...\n" ); direct_recursive_mutex_init( &handlers_lock ); #ifdef ANDROID_NDK install_handlers(); #else if (direct_config->sighandler) { if (direct_config->sighandler_thread) { sigemptyset( &mask ); for (i=0; isighandler_thread) { if (sighandler_thread) { direct_thread_kill( sighandler_thread, SIG_CLOSE_SIGHANDLER ); direct_thread_join( sighandler_thread ); direct_thread_destroy( sighandler_thread ); sighandler_thread = NULL; } } else remove_handlers(); #endif direct_mutex_deinit( &handlers_lock ); return DR_OK; } void direct_signals_block_all( void ) { sigset_t signals; D_DEBUG_AT( Direct_Signals, "Blocking all signals from now on!\n" ); sigfillset( &signals ); direct_sigprocmask( SIG_BLOCK, &signals, NULL ); } DirectResult direct_signal_handler_add( int num, DirectSignalHandlerFunc func, void *ctx, DirectSignalHandler **ret_handler ) { DirectSignalHandler *handler; D_ASSERT( func != NULL ); D_ASSERT( ret_handler != NULL ); D_DEBUG_AT( Direct_Signals, "Adding handler %p for signal %d with context %p...\n", func, num, ctx ); handler = D_CALLOC( 1, sizeof(DirectSignalHandler) ); if (!handler) { D_WARN( "out of memory" ); return DR_NOLOCALMEMORY; } handler->num = num; handler->func = func; handler->ctx = ctx; D_MAGIC_SET( handler, DirectSignalHandler ); direct_mutex_lock( &handlers_lock ); direct_list_append( &handlers, &handler->link ); direct_mutex_unlock( &handlers_lock ); *ret_handler = handler; return DR_OK; } DirectResult direct_signal_handler_remove( DirectSignalHandler *handler ) { D_MAGIC_ASSERT( handler, DirectSignalHandler ); D_DEBUG_AT( Direct_Signals, "Removing handler %p for signal %d with context %p...\n", handler->func, handler->num, handler->ctx ); if (direct_mutex_trylock( &handlers_lock )) handler->removed = true; else { direct_list_remove( &handlers, &handler->link ); direct_mutex_unlock( &handlers_lock ); D_MAGIC_CLEAR( handler ); D_FREE( handler ); } return DR_OK; } /**************************************************************************************************/ #ifdef DIRECT_BUILD_NO_SA_SIGINFO #undef SA_SIGINFO #endif #ifdef SA_SIGINFO #include static bool show_segv( const siginfo_t *info, ucontext_t *uctx ) { switch (info->si_code) { #ifdef SEGV_MAPERR case SEGV_MAPERR: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, invalid address) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef SEGV_ACCERR case SEGV_ACCERR: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, invalid permissions) <--\n", info->si_signo, info->si_addr ); return true; #endif } return false; } static bool show_bus( const siginfo_t *info, ucontext_t *uctx ) { switch (info->si_code) { #ifdef BUG_ADRALN case BUS_ADRALN: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, invalid address alignment) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef BUS_ADRERR case BUS_ADRERR: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, non-existent physical address) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef BUS_OBJERR case BUS_OBJERR: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, object specific hardware error) <--\n", info->si_signo, info->si_addr ); return true; #endif } return false; } static bool show_ill( const siginfo_t *info, ucontext_t *uctx ) { switch (info->si_code) { #ifdef ILL_ILLOPC case ILL_ILLOPC: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, illegal opcode) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef ILL_ILLOPN case ILL_ILLOPN: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, illegal operand) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef ILL_ILLADR case ILL_ILLADR: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, illegal addressing mode) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef ILL_ILLTRP case ILL_ILLTRP: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, illegal trap) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef ILL_PRVOPC case ILL_PRVOPC: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, privileged opcode) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef ILL_PRVREG case ILL_PRVREG: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, privileged register) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef ILL_COPROC case ILL_COPROC: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, coprocessor error) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef ILL_BADSTK case ILL_BADSTK: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, internal stack error) <--\n", info->si_signo, info->si_addr ); return true; #endif } return false; } static bool show_fpe( const siginfo_t *info, ucontext_t *uctx ) { switch (info->si_code) { #ifdef FPE_INTDIV case FPE_INTDIV: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, integer divide by zero) <--\n", info->si_signo, info->si_addr ); return true; #endif #ifdef FPE_FLTDIV case FPE_FLTDIV: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p, floating point divide by zero) <--\n", info->si_signo, info->si_addr ); return true; #endif } D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (at %p) <--\n", info->si_signo, info->si_addr ); return true; } static bool show_any( const siginfo_t *info, ucontext_t *uctx ) { switch (info->si_code) { #ifdef SI_USER case SI_USER: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (sent by pid %d, uid %d) <--\n", info->si_signo, info->si_pid, info->si_uid ); return true; #endif #ifdef SI_QUEUE case SI_QUEUE: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (queued by pid %d, uid %d, val %d, uctx %p) <--\n", info->si_signo, info->si_pid, info->si_uid, info->si_int, uctx ); return true; #endif #ifdef SI_KERNEL case SI_KERNEL: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (sent by the kernel) <--\n", info->si_signo ); return true; #endif } return false; } #endif static void call_handlers( int num, void *addr ) { DirectLink *l, *n; if (num == SIG_DUMP_STACK) num = DIRECT_SIGNAL_DUMP_STACK; /* Loop through all handlers. */ direct_mutex_lock( &handlers_lock ); direct_list_foreach_safe (l, n, handlers) { DirectSignalHandler *handler = (DirectSignalHandler*) l; if (handler->removed) { direct_list_remove( &handlers, &handler->link ); D_MAGIC_CLEAR( handler ); D_FREE( handler ); continue; } D_LOG( Direct_Signals, FATAL, " --> %d\n", handler->num ); if (handler->num != num && handler->num != DIRECT_SIGNAL_ANY) continue; if (handler->num == DIRECT_SIGNAL_ANY && num == DIRECT_SIGNAL_DUMP_STACK) continue; switch (handler->func( num, addr, handler->ctx )) { case DSHR_OK: break; case DSHR_REMOVE: direct_list_remove( &handlers, &handler->link ); D_MAGIC_CLEAR( handler ); D_FREE( handler ); break; case DSHR_RESUME: D_LOG( Direct_Signals, FATAL, " '-> cured!\n" ); direct_mutex_unlock( &handlers_lock ); return; default: D_BUG( "unknown result" ); break; } } direct_mutex_unlock( &handlers_lock ); } #ifdef SA_SIGINFO static void signal_handler( int num, siginfo_t *info, void *foo ) { ucontext_t *uctx = foo; #else static void signal_handler( int num ) { #endif void *addr = NULL; sigset_t mask; #ifndef SA_SIGINFO D_LOG( Direct_Signals, FATAL, " --> Caught signal %d <--\n", num ); #else if (info && info > (siginfo_t*) 0x100) { bool shown = false; /* Kernel genrated signal? */ if (info->si_code > 0 && info->si_code < 0x80) { addr = info->si_addr; switch (num) { case SIGSEGV: shown = show_segv( info, uctx ); break; case SIGBUS: shown = show_bus( info, uctx ); break; case SIGILL: shown = show_ill( info, uctx ); break; case SIGFPE: shown = show_fpe( info, uctx ); break; default: D_LOG( Direct_Signals, FATAL, " --> Caught signal %d <--\n", info->si_signo ); addr = NULL; shown = true; break; } } else shown = show_any( info, uctx ); if (!shown) D_LOG( Direct_Signals, FATAL, " --> Caught signal %d (unknown origin) <--\n", info->si_signo ); } else D_LOG( Direct_Signals, FATAL, " --> Caught signal %d, no siginfo available <--\n", num ); #endif direct_trace_print_stacks(); call_handlers( num, addr ); #ifdef ANDROID_NDK remove_handlers(); raise( num ); abort(); exit( -num ); #else sigemptyset( &mask ); sigaddset( &mask, num ); pthread_sigmask( SIG_UNBLOCK, &mask, NULL ); direct_trap( "SigHandler", num ); pthread_sigmask( SIG_BLOCK, &mask, NULL ); #endif } /**************************************************************************************************/ #ifndef ANDROID_NDK static void * handle_signals( DirectThread *thread, void *ptr ) { int i; int res; siginfo_t info; sigset_t mask; sigemptyset( &mask ); for (i=0; isighandler && !sigismember( &direct_config->dont_catch, sigs_to_handle[i] )) sigaddset( &mask, sigs_to_handle[i] ); } sigaddset( &mask, SIG_CLOSE_SIGHANDLER ); sigaddset( &mask, SIG_DUMP_STACK ); direct_sigprocmask( SIG_BLOCK, &mask, NULL ); while (1) { D_DEBUG_AT( Direct_Signals, "%s() -> waiting for a signal...\n", __FUNCTION__ ); res = sigwaitinfo( &mask, &info ); if ( -1 == res ) { //error D_DEBUG_AT( Direct_Signals, "%s() -> got error %d (%s)\n", __FUNCTION__, errno, strerror(errno) ); } else { if (SIG_CLOSE_SIGHANDLER == info.si_signo) { D_DEBUG_AT( Direct_Signals, " -> got close signal %d (me %d, from %d)\n", SIG_CLOSE_SIGHANDLER, direct_getpid(), info.si_pid ); if (direct_getpid() == info.si_pid) break; D_DEBUG_AT( Direct_Signals, " -> not stopping signal handler from other process' signal\n" ); } else if (SIG_DUMP_STACK == info.si_signo) { D_DEBUG_AT( Direct_Signals, " -> got dump signal %d (me %d, from %d)\n", SIG_DUMP_STACK, direct_getpid(), info.si_pid ); call_handlers( info.si_signo, NULL ); direct_print_memleaks(); direct_print_interface_leaks(); direct_trace_print_stacks(); } else { #ifdef SA_SIGINFO signal_handler( info.si_signo, &info, NULL ); #else signal_handler( info.si_signo ); #endif } } } D_DEBUG_AT( Direct_Signals, " -> returning from signal handler thread\n" ); return NULL; } #endif static void install_handlers( void ) { int i; for (i=0; isighandler && !sigismember( &direct_config->dont_catch, sigs_to_handle[i] )) { struct sigaction action; int signum = sigs_to_handle[i]; #ifdef SA_SIGINFO action.sa_sigaction = signal_handler; action.sa_flags = SA_SIGINFO; #else action.sa_handler = signal_handler; action.sa_flags = 0; #endif if (signum != SIGSEGV) action.sa_flags |= SA_NODEFER; sigemptyset( &action.sa_mask ); if (sigaction( signum, &action, &sigs_handled[i].old_action )) { D_PERROR( "Direct/Signals: " "Unable to install signal handler for signal %d!\n", signum ); continue; } sigs_handled[i].signum = signum; } } } static void remove_handlers( void ) { int i; for (i=0; i, Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include D_LOG_DOMAIN( Direct_Hash, "Direct/Hash", "Hash table implementation" ); /**********************************************************************************************************************/ static const unsigned int primes[] = { 11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237, 1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627, 47431, 71143, 106721, 160073, 240101, 360163, 540217, 810343, 1215497, 1823231, 2734867, 4102283, 6153409, 9230113, 13845163, }; static const unsigned int nprimes = D_ARRAY_SIZE( primes ); static unsigned int spaced_primes_closest (unsigned int num) { unsigned int i; for (i = 0; i < nprimes; i++) if (primes[i] > num) return primes[i]; return primes[nprimes - 1]; } #define DIRECT_HASH_MIN_SIZE 11 #define DIRECT_HASH_MAX_SIZE 13845163 /**********************************************************************************************************************/ static __inline__ int locate_key( const DirectHash *hash, unsigned long key ) { int pos; const DirectHashElement *element; D_MAGIC_ASSERT( hash, DirectHash ); D_ASSERT( hash->size > 0 ); D_ASSERT( hash->Elements != NULL ); pos = key % hash->size; element = &hash->Elements[pos]; while (element->value) { if (element->value != DIRECT_HASH_ELEMENT_REMOVED && element->key == key) return pos; if (++pos == hash->size) pos = 0; element = &hash->Elements[pos]; } return -1; } /**********************************************************************************************************************/ DirectResult direct_hash_create( int size, DirectHash **ret_hash ) { DirectHash *hash; hash = D_CALLOC( 1, sizeof (DirectHash) ); if (!hash) return D_OOM(); direct_hash_init( hash, size ); *ret_hash = hash; return DR_OK; } void direct_hash_destroy( DirectHash *hash ) { D_MAGIC_ASSERT( hash, DirectHash ); direct_hash_deinit( hash ); D_FREE( hash ); } /**********************************************************************************************************************/ void direct_hash_init( DirectHash *hash, int size ) { if (size < DIRECT_HASH_MIN_SIZE) size = DIRECT_HASH_MIN_SIZE; D_DEBUG_AT( Direct_Hash, "Creating hash table with initial capacity of %d...\n", size ); hash->size = size; hash->Elements = NULL; D_MAGIC_SET( hash, DirectHash ); } void direct_hash_deinit( DirectHash *hash ) { D_MAGIC_ASSERT( hash, DirectHash ); D_MAGIC_CLEAR( hash ); if (hash->Elements) { if (hash->disable_debugging_alloc) direct_free( hash->Elements ); else D_FREE( hash->Elements ); hash->Elements = NULL; } } /**********************************************************************************************************************/ int direct_hash_count( DirectHash *hash ) { D_MAGIC_ASSERT( hash, DirectHash ); return hash->count; } DirectResult direct_hash_insert( DirectHash *hash, unsigned long key, void *value ) { int pos; DirectHashElement *element; D_MAGIC_ASSERT( hash, DirectHash ); D_ASSERT( hash->size > 0 ); D_ASSERT( value != NULL ); if (!hash->Elements) { if (hash->disable_debugging_alloc) hash->Elements = direct_calloc( hash->size, sizeof(DirectHashElement) ); else hash->Elements = D_CALLOC( hash->size, sizeof(DirectHashElement) ); if (!hash->Elements) return D_OOM(); } /* Need to resize the hash table? */ if ((hash->count + hash->removed) > hash->size / 2) { int i, size; DirectHashElement *elements; size = spaced_primes_closest( hash->size ); if (size > DIRECT_HASH_MAX_SIZE) size = DIRECT_HASH_MAX_SIZE; if (size < DIRECT_HASH_MIN_SIZE) size = DIRECT_HASH_MIN_SIZE; D_DEBUG_AT( Direct_Hash, "Resizing from %d to %d... (count %d, removed %d)\n", hash->size, size, hash->count, hash->removed ); if (hash->disable_debugging_alloc) elements = direct_calloc( size, sizeof(DirectHashElement) ); else elements = D_CALLOC( size, sizeof(DirectHashElement) ); if (!elements) { D_WARN( "out of memory" ); return DR_NOLOCALMEMORY; } for (i=0; isize; i++) { DirectHashElement *element = &hash->Elements[i]; DirectHashElement *insertElement; if (element->value && element->value != DIRECT_HASH_ELEMENT_REMOVED) { pos = element->key % size; insertElement = &elements[pos]; while (insertElement->value && insertElement->value != DIRECT_HASH_ELEMENT_REMOVED) { if (++pos == size) pos = 0; insertElement = &elements[pos]; } elements[pos] = *element; } } if (hash->disable_debugging_alloc) direct_free( hash->Elements ); else D_FREE( hash->Elements ); hash->size = size; hash->Elements = elements; hash->removed = 0; } pos = key % hash->size; D_DEBUG_AT( Direct_Hash, "Attempting to insert key 0x%08lx at position %d...\n", key, pos ); element = &hash->Elements[pos]; while (element->value && element->value != DIRECT_HASH_ELEMENT_REMOVED) { if (element->key == key) { D_BUG( "key already exists" ); return DR_BUG; } if (++pos == hash->size) pos = 0; element = &hash->Elements[pos]; } if (element->value == DIRECT_HASH_ELEMENT_REMOVED) hash->removed--; element->key = key; element->value = value; hash->count++; D_DEBUG_AT( Direct_Hash, "...inserted at %d, new count = %d, removed = %d, size = %d, key = 0x%08lx.\n", pos, hash->count, hash->removed, hash->size, key ); return DR_OK; } DirectResult direct_hash_remove( DirectHash *hash, unsigned long key ) { int pos; D_MAGIC_ASSERT( hash, DirectHash ); if (!hash->Elements) return DR_BUFFEREMPTY; pos = locate_key( hash, key ); if (pos == -1) { D_WARN( "key not found" ); return DR_ITEMNOTFOUND; } hash->Elements[pos].value = DIRECT_HASH_ELEMENT_REMOVED; hash->count--; hash->removed++; D_DEBUG_AT( Direct_Hash, "Removed key 0x%08lx at %d, new count = %d, removed = %d, size = %d.\n", key, pos, hash->count, hash->removed, hash->size ); // direct_futex_wake( &hash->count, INT_MAX ); // FIXME: only wake if waiting return DR_OK; } void * direct_hash_lookup( const DirectHash *hash, unsigned long key ) { int pos; D_MAGIC_ASSERT( hash, DirectHash ); if (!hash->Elements) return NULL; pos = locate_key( hash, key ); return (pos != -1) ? hash->Elements[pos].value : NULL; } void direct_hash_iterate( DirectHash *hash, DirectHashIteratorFunc func, void *ctx ) { int i; D_MAGIC_ASSERT( hash, DirectHash ); if (!hash->Elements) return; for (i=0; isize; i++) { DirectHashElement *element = &hash->Elements[i]; if (!element->value || element->value == DIRECT_HASH_ELEMENT_REMOVED) continue; if (!func( hash, element->key, element->value, ctx ) ) return; } } DirectFB-1.7.7/lib/direct/TLSObject.h0000644000175000017500000001005612313366376014067 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 ___Direct__TLSObject__H___ #define ___Direct__TLSObject__H___ #include #ifdef __cplusplus extern "C" { #endif #include #ifdef __cplusplus } #include #include namespace Direct { template class TLSObject { private: void *ctx; DirectTLS tls; public: TLSObject( void *ctx ) : ctx( ctx ) { direct_tls_register( &tls, Host::tls_destroy ); } ~TLSObject() { direct_tls_unregister( &tls ); } Object *Get( Params ¶ms ) { Object *obj = (Object*) direct_tls_get( tls ); if (!obj) { obj = Host::tls_create( ctx, params ); if (!obj) return NULL; direct_tls_set( tls, obj ); } return obj; } void Delete() { Object *obj = (Object*) direct_tls_get( tls ); if (obj) { direct_tls_set( tls, NULL ); delete obj; } } }; template class TLSObject2 { private: void *ctx; DirectTLS tls; Mutex lock; std::list list; public: TLSObject2( void *ctx = NULL ) : ctx( ctx ) { direct_tls_register( &tls, TLSObject2::destructor ); } ~TLSObject2() { direct_tls_unregister( &tls ); } Object *Get( void *params = NULL ) { Object *obj = (Object*) direct_tls_get( tls ); if (!obj) { obj = Creator::create( ctx, params ); if (!obj) return NULL; lock.lock(); list.push_back( obj ); lock.unlock(); direct_tls_set( tls, obj ); } return obj; } void Delete() { Object *obj = (Object*) direct_tls_get( tls ); if (obj) { direct_tls_set( tls, NULL ); lock.lock(); list.remove( obj ); lock.unlock(); delete obj; } } void DeleteAll() { lock.lock(); std::list list_copy = list; list.clear(); direct_tls_unregister( &tls ); direct_tls_register( &tls, TLSObject2::destructor ); lock.unlock(); for (typename std::list::iterator it=list_copy.begin(); it!=list_copy.end(); it++) delete *it; } private: static void destructor( void *ptr ) { Destroyer::destroy( NULL, (Object*) ptr ); } }; } #endif // __cplusplus #endif DirectFB-1.7.7/lib/direct/String.h0000644000175000017500000001355512463500054013540 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 ___Direct__String__H___ #define ___Direct__String__H___ #ifdef __cplusplus #include extern "C" { #endif #include #include #include // C Wrapper __dfb_no_instrument_function__ D_String *D_String_NewEmpty( void ); __dfb_no_instrument_function__ size_t D_String_PrintF( D_String *str, const char *format, ... ) D_FORMAT_PRINTF(2); __dfb_no_instrument_function__ size_t D_String_PrintV( D_String *str, const char *format, va_list args ); __dfb_no_instrument_function__ const char *D_String_Buffer( D_String *str ); __dfb_no_instrument_function__ size_t D_String_Length( D_String *str ); __dfb_no_instrument_function__ void D_String_Delete( D_String *str ); __dfb_no_instrument_function__ const char *D_String_CopyTLS( D_String *str ); __dfb_no_instrument_function__ const char *D_String_PrintTLS( const char *format, ... ) D_FORMAT_PRINTF(1); #ifdef __cplusplus } #include #include #include namespace Direct { template class StringBase { private: std::basic_string<_CharT> _str; std::basic_string<_CharT> &str; public: StringBase() : str( _str ) { } StringBase( const StringBase<_CharT> &other ) : _str( other.str ), str( _str ) { } StringBase( std::string &str ) : str( str ) { } StringBase( const _CharT *str ) : _str( str ), str( _str ) { } /* * Copies the string to a TLS buffer using fixed number of 32 buffers used in a circular way, so it should * fit even for the heaviest legacy print (in C without management of String objects in parameter list). */ const _CharT *CopyTLS(); StringBase & PrintF( const _CharT *format, ... ) D_FORMAT_PRINTF(2); StringBase & PrintF( const _CharT *format, va_list args, size_t stack_buffer = 300 ); static StringBase F( const _CharT *format, ... ) D_FORMAT_PRINTF(1); void Clear(); StringsBase<_CharT> GetTokens( const StringBase<_CharT> &delimiter ) const; inline std::string & string() { return str; } inline const _CharT * buffer() const { return str.c_str(); } inline size_t length() const { return str.size(); } /* * Use */ inline operator const std::string& () const { return str; } inline const _CharT * operator *() const { return buffer(); } inline bool operator ==(const _CharT *buf) const { return !strcmp( buffer(), buf ); } /* * Assign */ inline StringBase& operator= (const _CharT *buf) { str = buf; return *this; } inline StringBase& operator= (const StringBase &other) { _str = other.str; str = _str; return *this; } /* * Append */ inline StringBase& operator+= (const StringBase &other) { str.append( other.str ); return *this; } inline StringBase& operator+= (const _CharT *buf) { str.append( buf ); return *this; } inline StringBase operator+ (const _CharT *buf) { StringBase<_CharT> result = *this; result.str.append( buf ); return result; } /* * Streams */ friend std::ostream &operator << (std::ostream &stream, const StringBase<_CharT> &string) { stream << string.str; return stream; } friend DirectLog *operator << (DirectLog *log, const StringBase<_CharT> &string) { direct_log_write( log, string.buffer(), string.length() ); return log; } friend DirectLogDomain &operator << (DirectLogDomain &domain, const StringBase<_CharT> &string) { direct_log_domain_log( &domain, DIRECT_LOG_VERBOSE, __FUNCTION__, __FILE__, __LINE__, "%s", string.buffer() ); return domain; } }; template class StringsBase : public std::vector > { public: Direct::String Concatenated( const Direct::String &space ) const { Direct::String result; const char *s = ""; for (typename StringsBase::const_iterator it = this->begin(); it != this->end(); it++) { result.PrintF( "%s%s", s, **it ); s = *space; } return result; } }; } #endif // __cplusplus #endif DirectFB-1.7.7/lib/direct/stream.c0000644000175000017500000021037412361150102013546 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include D_LOG_DOMAIN( Direct_Stream, "Direct/Stream", "Stream wrapper" ); #if DIRECT_BUILD_NETWORK #include #include #include #include #endif struct __D_DirectStream { int magic; int ref; int fd; DirectFile file; off_t offset; ssize_t length; char *mime; /* cache for piped streams */ void *cache; unsigned int cache_size; #if DIRECT_BUILD_NETWORK /* remote streams data */ struct { int sd; char *host; int port; struct addrinfo *addr; char *user; char *pass; char *auth; char *path; int redirects; void *data; bool real_rtsp; bool real_pack; } remote; #endif DirectResult (*wait) ( DirectStream *stream, unsigned int length, struct timeval *tv ); DirectResult (*peek) ( DirectStream *stream, unsigned int length, int offset, void *buf, unsigned int *read_out ); DirectResult (*read) ( DirectStream *stream, unsigned int length, void *buf, unsigned int *read_out ); DirectResult (*seek) ( DirectStream *stream, unsigned int offset ); }; static void direct_stream_close( DirectStream *stream ); /************************** Begin Network Support ***************************/ #if DIRECT_BUILD_NETWORK #define NET_TIMEOUT 15 #define HTTP_PORT 80 #define FTP_PORT 21 #define RTSP_PORT 554 #define HTTP_MAX_REDIRECTS 15 static DirectResult http_open( DirectStream *stream, const char *filename ); static DirectResult ftp_open ( DirectStream *stream, const char *filename ); static DirectResult rtsp_open( DirectStream *stream, const char *filename ); static inline char* trim( char *s ) { char *e; #define space( c ) ((c) == ' ' || (c) == '\t' || \ (c) == '\r' || (c) == '\n' || \ (c) == '"' || (c) == '\'') for (; space(*s); s++); e = s + strlen(s) - 1; for (; e > s && space(*e); *e-- = '\0'); #undef space return s; } static void parse_url( const char *url, char **ret_host, int *ret_port, char **ret_user, char **ret_pass, char **ret_path ) { char *host = NULL; int port = 0; char *user = NULL; char *pass = NULL; char *path; char *tmp; tmp = strchr( url, '/' ); if (tmp) { host = alloca( tmp - url + 1 ); memcpy( host, url, tmp - url ); host[tmp-url] = '\0'; path = tmp; } else { host = alloca( strlen( url ) + 1 ); memcpy( host, url, strlen( url ) + 1 ); path = "/"; } tmp = strrchr( host, '@' ); if (tmp) { *tmp = '\0'; pass = strchr( host, ':' ); if (pass) { *pass = '\0'; pass++; } user = host; host = tmp + 1; } tmp = strchr( host, ':' ); if (tmp) { port = strtol( tmp+1, NULL, 10 ); *tmp = '\0'; } /* IPv6 variant (host within brackets) */ if (*host == '[') { host++; tmp = strchr( host, ']' ); if (tmp) *tmp = '\0'; } if (ret_host) *ret_host = D_STRDUP( host ); if (ret_port && port) *ret_port = port; if (ret_user && user) *ret_user = D_STRDUP( user ); if (ret_pass && pass) *ret_pass = D_STRDUP( pass ); if (ret_path) *ret_path = D_STRDUP( path ); } /*****************************************************************************/ static int net_response( DirectStream *stream, char *buf, size_t size ) { fd_set set; struct timeval tv; int i; FD_ZERO( &set ); FD_SET( stream->remote.sd, &set ); for (i = 0; i < size-1; i++) { tv.tv_sec = NET_TIMEOUT; tv.tv_usec = 0; select( stream->remote.sd+1, &set, NULL, NULL, &tv ); if (recv( stream->remote.sd, buf+i, 1, 0 ) != 1) break; if (buf[i] == '\n') { if (i > 0 && buf[i-1] == '\r') i--; break; } } buf[i] = '\0'; D_DEBUG_AT( Direct_Stream, "got [%s].\n", buf ); return i; } static int net_command( DirectStream *stream, char *buf, size_t size ) { fd_set s; struct timeval t; int status; int version; char space; FD_ZERO( &s ); FD_SET( stream->remote.sd, &s ); t.tv_sec = NET_TIMEOUT; t.tv_usec = 0; switch (select( stream->remote.sd+1, NULL, &s, NULL, &t )) { case 0: D_DEBUG_AT( Direct_Stream, "Timeout!\n" ); case -1: return -1; } send( stream->remote.sd, buf, strlen(buf), 0 ); send( stream->remote.sd, "\r\n", 2, 0 ); D_DEBUG_AT( Direct_Stream, "sent [%s].\n", buf ); while (net_response( stream, buf, size ) > 0) { status = 0; if (sscanf( buf, "HTTP/1.%d %3d", &version, &status ) == 2 || sscanf( buf, "RTSP/1.%d %3d", &version, &status ) == 2 || sscanf( buf, "ICY %3d", &status ) == 1 || sscanf( buf, "%3d%[ ]", &status, &space ) == 2) return status; } return 0; } static DirectResult net_wait( DirectStream *stream, unsigned int length, struct timeval *tv ) { fd_set s; if (stream->cache_size >= length) return DR_OK; if (stream->fd == -1) return DR_EOF; FD_ZERO( &s ); FD_SET( stream->fd, &s ); switch (select( stream->fd+1, &s, NULL, NULL, tv )) { case 0: if (!tv && !stream->cache_size) return DR_EOF; return DR_TIMEOUT; case -1: return errno2result( errno ); } return DR_OK; } static DirectResult net_peek( DirectStream *stream, unsigned int length, int offset, void *buf, unsigned int *read_out ) { char *tmp; int size; if (offset < 0) return DR_UNSUPPORTED; tmp = alloca( length + offset ); size = recv( stream->fd, tmp, length+offset, MSG_PEEK ); switch (size) { case 0: return DR_EOF; case -1: if (errno == EAGAIN || errno == EWOULDBLOCK) return DR_BUFFEREMPTY; return errno2result( errno ); default: if (size < offset) return DR_BUFFEREMPTY; size -= offset; break; } direct_memcpy( buf, tmp+offset, size ); if (read_out) *read_out = size; return DR_OK; } static DirectResult net_read( DirectStream *stream, unsigned int length, void *buf, unsigned int *read_out ) { int size; size = recv( stream->fd, buf, length, 0 ); switch (size) { case 0: return DR_EOF; case -1: if (errno == EAGAIN || errno == EWOULDBLOCK) return DR_BUFFEREMPTY; return errno2result( errno ); } stream->offset += size; if (read_out) *read_out = size; return DR_OK; } static DirectResult net_connect( struct addrinfo *addr, int sock, int proto, int *ret_fd ) { DirectResult ret = DR_OK; int fd = -1; struct addrinfo *tmp; D_ASSERT( addr != NULL ); D_ASSERT( ret_fd != NULL ); for (tmp = addr; tmp; tmp = tmp->ai_next) { int err; fd = socket( tmp->ai_family, sock, proto ); if (fd < 0) { ret = errno2result( errno ); D_DEBUG_AT( Direct_Stream, "failed to create socket!\n\t->%s", strerror(errno) ); continue; } fcntl( fd, F_SETFL, fcntl( fd, F_GETFL ) | O_NONBLOCK ); D_DEBUG_AT( Direct_Stream, "connecting to %s...\n", tmp->ai_canonname ); if (proto == IPPROTO_UDP) err = bind( fd, tmp->ai_addr, tmp->ai_addrlen ); else err = connect( fd, tmp->ai_addr, tmp->ai_addrlen ); if (err == 0 || errno == EINPROGRESS) { struct timeval t = { NET_TIMEOUT, 0 }; fd_set s; /* Join multicast group? */ if (tmp->ai_addr->sa_family == AF_INET) { struct sockaddr_in *saddr = (struct sockaddr_in *) tmp->ai_addr; if (IN_MULTICAST( ntohl(saddr->sin_addr.s_addr) )) { struct ip_mreq req; D_DEBUG_AT( Direct_Stream, "joining multicast group (%u.%u.%u.%u)...\n", (u8)tmp->ai_addr->sa_data[2], (u8)tmp->ai_addr->sa_data[3], (u8)tmp->ai_addr->sa_data[4], (u8)tmp->ai_addr->sa_data[5] ); req.imr_multiaddr.s_addr = saddr->sin_addr.s_addr; req.imr_interface.s_addr = 0; err = setsockopt( fd, SOL_IP, IP_ADD_MEMBERSHIP, &req, sizeof(req) ); if (err < 0) { ret = errno2result( errno ); D_PERROR( "Direct/Stream: Could not join multicast group (%u.%u.%u.%u)!\n", (u8)tmp->ai_addr->sa_data[2], (u8)tmp->ai_addr->sa_data[3], (u8)tmp->ai_addr->sa_data[4], (u8)tmp->ai_addr->sa_data[5] ); close( fd ); continue; } setsockopt( fd, SOL_SOCKET, SO_REUSEADDR, saddr, sizeof(*saddr) ); } } FD_ZERO( &s ); FD_SET( fd, &s ); err = select( fd+1, NULL, &s, NULL, &t ); if (err < 1) { D_DEBUG_AT( Direct_Stream, "...connection failed.\n" ); close( fd ); fd = -1; if (err == 0) { ret = DR_TIMEOUT; continue; } else { ret = errno2result( errno ); break; } } D_DEBUG_AT( Direct_Stream, "...connected.\n" ); ret = DR_OK; break; } } *ret_fd = fd; return ret; } static DirectResult net_open( DirectStream *stream, const char *filename, int proto ) { DirectResult ret = DR_OK; int sock = (proto == IPPROTO_TCP) ? SOCK_STREAM : SOCK_DGRAM; struct addrinfo hints; char port[16]; parse_url( filename, &stream->remote.host, &stream->remote.port, &stream->remote.user, &stream->remote.pass, &stream->remote.path ); direct_snprintf( port, sizeof(port), "%d", stream->remote.port ); memset( &hints, 0, sizeof(hints) ); hints.ai_flags = AI_CANONNAME; hints.ai_socktype = sock; hints.ai_family = PF_UNSPEC; if (getaddrinfo( stream->remote.host, port, &hints, &stream->remote.addr )) { /* give it a second chance without AI_CANONNAME which fails on some platforms */ hints.ai_flags = 0; if (getaddrinfo( stream->remote.host, port, &hints, &stream->remote.addr )) { D_ERROR( "Direct/Stream: failed to resolve host '%s'!\n", stream->remote.host ); return DR_FAILURE; } } ret = net_connect( stream->remote.addr, sock, proto, &stream->remote.sd ); if (ret) return ret; stream->fd = stream->remote.sd; stream->length = -1; stream->wait = net_wait; stream->peek = net_peek; stream->read = net_read; return ret; } /*****************************************************************************/ static DirectResult http_seek( DirectStream *stream, unsigned int offset ) { DirectResult ret; char buf[1280]; int status, len; close( stream->remote.sd ); stream->remote.sd = -1; ret = net_connect( stream->remote.addr, SOCK_STREAM, IPPROTO_TCP, &stream->remote.sd ); if (ret) return ret; stream->fd = stream->remote.sd; len = direct_snprintf( buf, sizeof(buf), "GET %s HTTP/1.0\r\n" "Host: %s:%d\r\n", stream->remote.path, stream->remote.host, stream->remote.port ); if (stream->remote.auth) { len += direct_snprintf( buf+len, sizeof(buf)-len, "Authorization: Basic %s\r\n", stream->remote.auth ); } direct_snprintf( buf+len, sizeof(buf)-len, "User-Agent: DirectFB/%s\r\n" "Accept: */*\r\n" "Range: bytes=%d-\r\n" "Connection: Close\r\n", DIRECTFB_VERSION, offset ); status = net_command( stream, buf, sizeof(buf) ); switch (status) { case 200 ... 299: stream->offset = offset; break; default: if (status) D_DEBUG_AT( Direct_Stream, "server returned status %d.\n", status ); return DR_FAILURE; } /* discard remaining headers */ while (net_response( stream, buf, sizeof(buf) ) > 0); return DR_OK; } static DirectResult http_open( DirectStream *stream, const char *filename ) { DirectResult ret; char buf[1280]; int status, len; stream->remote.port = HTTP_PORT; ret = net_open( stream, filename, IPPROTO_TCP ); if (ret) return ret; if (stream->remote.user) { char *tmp; if (stream->remote.pass) { tmp = alloca( strlen( stream->remote.user ) + strlen( stream->remote.pass ) + 2 ); len = sprintf( tmp, "%s:%s", stream->remote.user, stream->remote.pass ); } else { tmp = alloca( strlen( stream->remote.user ) + 2 ); len = sprintf( tmp, "%s:", stream->remote.user ); } stream->remote.auth = direct_base64_encode( tmp, len ); } len = direct_snprintf( buf, sizeof(buf), "GET %s HTTP/1.0\r\n" "Host: %s:%d\r\n", stream->remote.path, stream->remote.host, stream->remote.port ); if (stream->remote.auth) { len += direct_snprintf( buf+len, sizeof(buf)-len, "Authorization: Basic %s\r\n", stream->remote.auth ); } direct_snprintf( buf+len, sizeof(buf)-len, "User-Agent: DirectFB/%s\r\n" "Accept: */*\r\n" "Connection: Close\r\n", DIRECTFB_VERSION ); status = net_command( stream, buf, sizeof(buf) ); while (net_response( stream, buf, sizeof(buf) ) > 0) { if (!strncasecmp( buf, "Accept-Ranges:", 14 )) { if (strcmp( trim( buf+14 ), "none" )) stream->seek = http_seek; } else if (!strncasecmp( buf, "Content-Type:", 13 )) { char *mime = trim( buf+13 ); char *tmp = strchr( mime, ';' ); if (tmp) *tmp = '\0'; if (stream->mime) D_FREE( stream->mime ); stream->mime = D_STRDUP( mime ); } else if (!strncasecmp( buf, "Content-Length:", 15 )) { char *tmp = trim( buf+15 ); if (sscanf( tmp, "%zd", &stream->length ) < 1) sscanf( tmp, "bytes=%zd", &stream->length ); } else if (!strncasecmp( buf, "Location:", 9 )) { direct_stream_close( stream ); stream->seek = NULL; if (++stream->remote.redirects > HTTP_MAX_REDIRECTS) { D_ERROR( "Direct/Stream: " "reached maximum number of redirects (%d).\n", HTTP_MAX_REDIRECTS ); return DR_LIMITEXCEEDED; } filename = trim( buf+9 ); if (!strncmp( filename, "http://", 7 )) return http_open( stream, filename+7 ); if (!strncmp( filename, "ftp://", 6 )) return ftp_open( stream, filename+6 ); if (!strncmp( filename, "rtsp://", 7 )) return rtsp_open( stream, filename+7 ); return DR_UNSUPPORTED; } } switch (status) { case 200 ... 299: break; default: if (status) D_DEBUG_AT( Direct_Stream, "server returned status %d.\n", status ); return (status == 404) ? DR_FILENOTFOUND : DR_FAILURE; } return DR_OK; } /*****************************************************************************/ static DirectResult ftp_open_pasv( DirectStream *stream, char *buf, size_t size ) { DirectResult ret; int i, len; direct_snprintf( buf, size, "PASV" ); if (net_command( stream, buf, size ) != 227) return DR_FAILURE; /* parse IP and port for passive mode */ for (i = 4; buf[i]; i++) { unsigned int d[6]; if (sscanf( &buf[i], "%u,%u,%u,%u,%u,%u", &d[0], &d[1], &d[2], &d[3], &d[4], &d[5] ) == 6) { struct addrinfo hints, *addr; /* address */ len = direct_snprintf( buf, size, "%u.%u.%u.%u", d[0], d[1], d[2], d[3] ); /* port */ direct_snprintf( buf+len+1, size-len-1, "%u", ((d[4] & 0xff) << 8) | (d[5] & 0xff) ); memset( &hints, 0, sizeof(hints) ); hints.ai_flags = AI_CANONNAME; hints.ai_socktype = SOCK_STREAM; hints.ai_family = PF_UNSPEC; if (getaddrinfo( buf, buf+len+1, &hints, &addr )) { /* give it a second chance without AI_CANONNAME which fails on some platforms */ hints.ai_flags = 0; if (getaddrinfo( buf, buf+len+1, &hints, &addr )) { D_DEBUG_AT( Direct_Stream, "failed to resolve host '%s'.\n", buf ); return DR_FAILURE; } } ret = net_connect( addr, SOCK_STREAM, IPPROTO_TCP, &stream->fd ); freeaddrinfo( addr ); return ret; } } return DR_FAILURE; } static DirectResult ftp_seek( DirectStream *stream, unsigned int offset ) { DirectResult ret = DR_OK; char buf[512]; if (stream->fd > 0) { int status; close( stream->fd ); stream->fd = -1; /* ignore response */ while (net_response( stream, buf, sizeof(buf) ) > 0) { if (sscanf( buf, "%3d%[ ]", &status, buf ) == 2) break; } } ret = ftp_open_pasv( stream, buf, sizeof(buf) ); if (ret) return ret; direct_snprintf( buf, sizeof(buf), "REST %d", offset ); if (net_command( stream, buf, sizeof(buf) ) != 350) goto error; direct_snprintf( buf, sizeof(buf), "RETR %s", stream->remote.path ); switch (net_command( stream, buf, sizeof(buf) )) { case 150: case 125: break; default: goto error; } stream->offset = offset; return DR_OK; error: close( stream->fd ); stream->fd = -1; return DR_FAILURE; } static DirectResult ftp_open( DirectStream *stream, const char *filename ) { DirectResult ret; int status = 0; char buf[512]; stream->remote.port = FTP_PORT; ret = net_open( stream, filename, IPPROTO_TCP ); if (ret) return ret; while (net_response( stream, buf, sizeof(buf) ) > 0) { if (sscanf( buf, "%3d%[ ]", &status, buf ) == 2) break; } if (status != 220) return DR_FAILURE; /* login */ direct_snprintf( buf, sizeof(buf), "USER %s", stream->remote.user ? : "anonymous" ); switch (net_command( stream, buf, sizeof(buf) )) { case 230: case 331: break; default: return DR_FAILURE; } if (stream->remote.pass) { direct_snprintf( buf, sizeof(buf), "PASS %s", stream->remote.pass ); if (net_command( stream, buf, sizeof(buf) ) != 230) return DR_FAILURE; } /* enter binary mode */ direct_snprintf( buf, sizeof(buf), "TYPE I" ); if (net_command( stream, buf, sizeof(buf) ) != 200) return DR_FAILURE; /* get file size */ direct_snprintf( buf, sizeof(buf), "SIZE %s", stream->remote.path ); if (net_command( stream, buf, sizeof(buf) ) == 213) stream->length = strtol( buf+4, NULL, 10 ); /* enter passive mode by default */ ret = ftp_open_pasv( stream, buf, sizeof(buf) ); if (ret) return ret; /* retrieve file */ direct_snprintf( buf, sizeof(buf), "RETR %s", stream->remote.path ); switch (net_command( stream, buf, sizeof(buf) )) { case 125: case 150: break; default: return DR_FAILURE; } stream->seek = ftp_seek; return DR_OK; } /*****************************************************************************/ typedef struct { s8 pt; // payload type (-1: dymanic) u8 type; // codec type const char *name; const char *mime; u32 fcc; } RTPPayload; typedef struct { char *control; int pt; const RTPPayload *payload; int dur; // duration int abr; // avg bitrate int mbr; // max bitrate int aps; // avg packet size int mps; // max packet size int str; // start time int prl; // preroll char *mime; int mime_size; void *data; int data_size; } SDPStreamDesc; #define PAYLOAD_VIDEO 1 #define PAYLOAD_AUDIO 2 #define FCC( a, b, c, d ) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24)) static const RTPPayload payloads[] = { { 31, PAYLOAD_VIDEO, "H261", "video/h261", FCC('H','2','6','1') }, { 34, PAYLOAD_VIDEO, "H263", "video/h263", FCC('H','2','6','3') }, //{ -1, PAYLOAD_VIDEO, "H264", "video/h264", FCC('H','2','6','4') }, { 32, PAYLOAD_VIDEO, "MPV", "video/mpeg", FCC('M','P','E','G') }, { 33, 0, "MP2T", "video/mpegts", 0 }, { -1, PAYLOAD_VIDEO, "MP4V-ES", "video/mpeg4", FCC('M','P','4','S') }, { 14, PAYLOAD_AUDIO, "MPA", "audio/mpeg", 0x0055 }, //{ -1, PAYLOAD_AUDIO, "mpeg4-generic", "audio/aac", 0x00ff }, }; #define NUM_PAYLOADS D_ARRAY_SIZE( payloads ) static DirectResult sdp_parse( DirectStream *stream, int length, SDPStreamDesc **ret_streams, int *ret_num ) { char *buf, *tmp; SDPStreamDesc *desc = NULL; int num = 0; fd_set set; struct timeval tv; int i; buf = D_CALLOC( 1, length+1 ); if (!buf) return D_OOM(); FD_ZERO( &set ); FD_SET( stream->remote.sd, &set ); for (tmp = buf; length;) { int size; tv.tv_sec = NET_TIMEOUT; tv.tv_usec = 0; select( stream->remote.sd+1, &set, NULL, NULL, &tv ); size = recv( stream->remote.sd, tmp, length, MSG_WAITALL ); if (size < 1) break; tmp += size; length -= size; } for (tmp = buf; tmp && *tmp;) { char *end; end = strchr( tmp, '\n' ); if (end) { if (end > tmp && *(end-1) == '\r') *(end-1) = '\0'; *end = '\0'; } D_DEBUG_AT( Direct_Stream, "SDP [%s]\n", tmp ); switch (*tmp) { case 'm': /* media */ if (*(tmp+1) == '=') { desc = D_REALLOC( desc, ++num*sizeof(SDPStreamDesc) ); memset( &desc[num-1], 0, sizeof(SDPStreamDesc) ); tmp += 2; if (sscanf( tmp, "audio %d RTP/AVP %d", &i, &desc[num-1].pt ) == 2 || sscanf( tmp, "video %d RTP/AVP %d", &i, &desc[num-1].pt ) == 2) { for (i = 0; i < NUM_PAYLOADS; i++) { if (desc[num-1].pt == payloads[i].pt) { desc[num-1].payload = &payloads[i]; desc[num-1].mime = D_STRDUP( payloads[i].mime ); desc[num-1].mime_size = strlen( payloads[i].mime ); break; } } } } break; case 'a': /* attribute */ if (*(tmp+1) == '=' && num) { tmp += 2; if (!strncmp( tmp, "control:", 8 )) { desc[num-1].control = D_STRDUP( trim( tmp+8 ) ); } else if (!strncmp( tmp, "rtpmap:", 7 )) { if (!desc[num-1].payload && desc[num-1].pt) { char *sep; tmp = strchr( trim( tmp+7 ), ' ' ); if (!tmp) break; sep = strchr( ++tmp, '/' ); if (sep) *sep = '\0'; for (i = 0; i < NUM_PAYLOADS; i++) { if (strcmp( tmp, payloads[i].name )) continue; desc[num-1].payload = &payloads[i]; desc[num-1].mime = D_STRDUP( payloads[i].mime ); desc[num-1].mime_size = strlen( payloads[i].mime ); break; } } } else if (!strncmp( tmp, "length:npt=", 11 )) { double val = atof( tmp+11 ); desc[num-1].dur = val * 1000.0; } else if (!strncmp( tmp, "mimetype:string;", 16 )) { if (desc[num-1].mime) D_FREE( desc[num-1].mime ); desc[num-1].mime = D_STRDUP( trim( tmp+16 ) ); desc[num-1].mime_size = strlen( desc[num-1].mime ); } else if (!strncmp( tmp, "AvgBitRate:", 11 )) { sscanf( tmp+11, "integer;%d", &desc[num-1].abr ); } else if (!strncmp( tmp, "MaxBitRate:", 11 )) { sscanf( tmp+11, "integer;%d", &desc[num-1].mbr ); } else if (!strncmp( tmp, "AvgPacketSize:", 14 )) { sscanf( tmp+14, "integer;%d", &desc[num-1].aps ); } else if (!strncmp( tmp, "MaxPacketSize:", 14 )) { sscanf( tmp+14, "integer;%d", &desc[num-1].mps ); } else if (!strncmp( tmp, "StartTime:", 10 )) { sscanf( tmp+10, "integer;%d", &desc[num-1].str ); } else if (!strncmp( tmp, "Preroll:", 8 )) { sscanf( tmp+8, "integer;%d", &desc[num-1].prl ); } else if (!strncmp( tmp, "OpaqueData:buffer;", 18 )) { desc[num-1].data = direct_base64_decode( trim( tmp+18 ), &desc[num-1].data_size ); } } break; default: break; } tmp = end; if (tmp) tmp++; } D_FREE( buf ); *ret_streams = desc; *ret_num = num; return desc ? DR_OK : DR_EOF; } static void sdp_free( SDPStreamDesc *streams, int num ) { int i; for (i = 0; i < num; i++) { if (streams[i].control) D_FREE( streams[i].control ); if (streams[i].mime) D_FREE( streams[i].mime ); if (streams[i].data) D_FREE( streams[i].data ); } D_FREE( streams ); } static DirectResult rmf_write_header( SDPStreamDesc *streams, int n_streams, void **ret_buf, unsigned int *ret_size ) { unsigned char *dst, *tmp; int abr = 0; int mbr = 0; int aps = 0; int mps = 0; int str = 0; int prl = 0; int dur = 0; int i, len; len = 86 + n_streams*46; for (i = 0; i < n_streams; i++) { abr += streams[i].abr; aps += streams[i].aps; if (mbr < streams[i].mbr) mbr = streams[i].mbr; if (mps < streams[i].mps) mps = streams[i].mps; if (dur < streams[i].dur) dur = streams[i].dur; if (streams[i].mime) len += streams[i].mime_size; if (streams[i].data) len += streams[i].data_size; else if (streams[i].payload) len += 74; } *ret_buf = dst = D_MALLOC( len ); if (!dst) return D_OOM(); *ret_size = len; /* RMF */ dst[0] = '.'; dst[1] = 'R', dst[2] = 'M'; dst[3] = 'F'; dst[4] = dst[5] = dst[6] = 0; dst[7] = 18; // size dst[8] = dst[9] = 0; // version dst[10] = dst[11] = dst[12] = dst[13] = 0; // ?? dst[14] = dst[15] = dst[16] = 0; dst[17] = 4+n_streams; // num streams dst += 18; /* PROP */ dst[0] = 'P'; dst[1] = 'R'; dst[2] = 'O'; dst[3] = 'P'; dst[4] = dst[5] = dst[6] = 0; dst[7] = 50; dst[8] = dst[9] = 0; dst[10] = mbr>>24; dst[11] = mbr>>16; dst[12] = mbr>>8; dst[13] = mbr; dst[14] = abr>>24; dst[15] = abr>>16; dst[16] = abr>>8; dst[17] = abr; dst[18] = mps>>24; dst[19] = mps>>16; dst[20] = mps>>8; dst[21] = mps; dst[22] = aps>>24; dst[23] = aps>>16; dst[24] = aps>>8; dst[25] = aps; dst[26] = dst[27] = dst[28] = dst[29] = 0; // num packets dst[30] = dur>>24; dst[31] = dur>>16; dst[32] = dur>>8; dst[33] = dur; dst[34] = dst[35] = dst[36] = dst[37] = 0; // preroll dst[38] = dst[39] = dst[40] = dst[41] = 0; // index offset dst[42] = len>>24; dst[43] = len>>16; dst[44] = len>>8; dst[45] = len; dst[46] = 0; dst[47] = n_streams; // num streams dst[48] = 0; dst[49] = 7; // flags dst += 50; for (i = 0; i < n_streams; i++) { len = 46 + streams[i].mime_size; if (streams[i].data) len += streams[i].data_size; else if (streams[i].payload) len += 74; abr = streams[i].abr; mbr = streams[i].mbr; aps = streams[i].aps; mps = streams[i].mps; str = streams[i].str; prl = streams[i].prl; dur = streams[i].dur; /* MDPR */ dst[0] = 'M'; dst[1] = 'D'; dst[2] = 'P'; dst[3] = 'R'; dst[4] = len>>24; dst[5] = len>>16; dst[6] = len>>8; dst[7] = len; dst[8] = dst[9] = 0; dst[10] = 0; dst[11] = i; dst[12] = mbr>>24; dst[13] = mbr>>16; dst[14] = mbr>>8; dst[15] = mbr; dst[16] = abr>>24; dst[17] = abr>>16; dst[18] = abr>>8; dst[19] = abr; dst[20] = mps>>24; dst[21] = mps>>16; dst[22] = mps>>8; dst[23] = mps; dst[24] = aps>>24; dst[25] = aps>>16; dst[26] = aps>>8; dst[27] = aps; dst[28] = str>>24; dst[29] = str>>16; dst[30] = str>>8; dst[31] = str; dst[32] = prl>>24; dst[33] = prl>>16; dst[34] = prl>>8; dst[35] = prl; dst[36] = dur>>24; dst[37] = dur>>16; dst[38] = dur>>8; dst[39] = dur; dst += 40; /* description */ *dst++ = 0; /* mimetype */ *dst++ = streams[i].mime_size; for (tmp = (unsigned char*)streams[i].mime; tmp && *tmp;) *dst++ = *tmp++; /* codec data */ if (streams[i].data) { len = streams[i].data_size; dst[0] = len>>24; dst[1] = len>>16; dst[2] = len>>8; dst[3] = len; direct_memcpy( dst+4, streams[i].data, streams[i].data_size ); dst += len+4; } else if (streams[i].payload) { u32 fcc = streams[i].payload->fcc; dst[0] = dst[1] = dst[2] = 0; dst[3] = 74; dst += 4; memset( dst, 0, 74 ); if (streams[i].payload->type == PAYLOAD_AUDIO) { dst[0] = '.'; dst[1] = 'r'; dst[2] = 'a'; dst[3] = 0xfd; dst[4] = 0; dst[5] = 5; // version dst[66] = fcc; dst[67] = fcc>>8; dst[68] = fcc>>16; dst[69] = fcc>>24; } else { dst[0] = dst[1] = dst[2] = 0; dst[3] = 34; dst[4] = 'V'; dst[5] = 'I'; dst[6] = 'D'; dst[7] = 'O'; dst[8] = fcc; dst[9] = fcc>>8; dst[10] = fcc>>16; dst[11] = fcc>>24; dst[30] = 0x10; } dst += 74; } else { dst[0] = dst[1] = dst[2] = dst[3] = 0; dst += 4; } } /* DATA */ dst[0] = 'D'; dst[1] = 'A'; dst[2] = 'T'; dst[3] = 'A'; dst[4] = dst[5] = dst[6] = 0; dst[7] = 18; // size dst[8] = dst[9] = 0; // version dst[10] = dst[11] = dst[12] = dst[13] = 0; // num packets dst[14] = dst[15] = dst[16] = dst[17] = 0; // next data return DR_OK; } static int rmf_write_pheader( unsigned char *dst, int id, int sz, unsigned int ts ) { /* version */ dst[0] = dst[1] = 0; /* length */ dst[2] = (sz+12)>>8; dst[3] = sz+12; /* indentifier */ dst[4] = id>>8; dst[5] = id; /* timestamp */ dst[6] = ts>>24; dst[7] = ts>>16; dst[8] = ts>>8; dst[9] = ts; /* reserved */ dst[10] = 0; /* flags */ dst[11] = 0; return 12; } static void real_calc_challenge2( char response[64], char checksum[32], char *challenge ) { const unsigned char xor_table[37] = { 0x05, 0x18, 0x74, 0xd0, 0x0d, 0x09, 0x02, 0x53, 0xc0, 0x01, 0x05, 0x05, 0x67, 0x03, 0x19, 0x70, 0x08, 0x27, 0x66, 0x10, 0x10, 0x72, 0x08, 0x09, 0x63, 0x11, 0x03, 0x71, 0x08, 0x08, 0x70, 0x02, 0x10, 0x57, 0x05, 0x18, 0x54 }; char buf[128]; char md5[16]; int len; int i; memset( response, 0, 64 ); memset( checksum, 0, 32 ); buf[0] = 0xa1; buf[1] = 0xe9; buf[2] = 0x14; buf[3] = 0x9d; buf[4] = 0x0e; buf[5] = 0x6b; buf[6] = 0x3b; buf[7] = 0x59; memset( buf+8, 0, 120 ); len = strlen( challenge ); if (len == 40) { challenge[32] = '\0'; len = 32; } memcpy( buf+8, challenge, MAX(len,56) ); for (i = 0; i < 37; i++) buf[8+i] ^= xor_table[i]; /* compute response */ direct_md5_sum( md5, buf, 64 ); /* convert to ascii */ for (i = 0; i < 16; i++) { char a, b; a = (md5[i] >> 4) & 15; b = md5[i] & 15; response[i*2+0] = ((a < 10) ? (a + 48) : (a + 87)) & 255; response[i*2+1] = ((b < 10) ? (b + 48) : (b + 87)) & 255; } /* tail */ len = strlen( response ); direct_snputs( &response[len], "01d0a8e3", 64-len ); /* compute checksum */ for (i = 0; i < len/4; i++) checksum[i] = response[i*4]; } static DirectResult rtsp_session_open( DirectStream *stream ) { DirectResult ret; int status; int cseq = 0; SDPStreamDesc *streams = NULL; int n_streams = 0; char session[32] = {0, }; char challen[64] = {0, }; char buf[1280]; int i, len; direct_snprintf( buf, sizeof(buf), "OPTIONS rtsp://%s:%d RTSP/1.0\r\n" "CSeq: %d\r\n" "User-Agent: DirectFB/%s\r\n" "ClientChallenge: 9e26d33f2984236010ef6253fb1887f7\r\n" "PlayerStarttime: [28/03/2003:22:50:23 00:00]\r\n" "CompanyID: KnKV4M4I/B2FjJ1TToLycw==\r\n" "GUID: 00000000-0000-0000-0000-000000000000\r\n" "RegionData: 0\r\n", stream->remote.host, stream->remote.port, ++cseq, DIRECTFB_VERSION ); if (net_command( stream, buf, sizeof(buf) ) != 200) return DR_FAILURE; while (net_response( stream, buf, sizeof(buf) ) > 0) { if (!strncmp( buf, "RealChallenge1:", 15 )) { direct_snprintf( challen, sizeof(challen), "%s", trim( buf+15 ) ); stream->remote.real_rtsp = true; } } len = direct_snprintf( buf, sizeof(buf), "DESCRIBE rtsp://%s:%d%s RTSP/1.0\r\n" "CSeq: %d\r\n" "Accept: application/sdp\r\n" "Bandwidth: 10485800\r\n", stream->remote.host, stream->remote.port, stream->remote.path, ++cseq ); if (stream->remote.real_rtsp) { direct_snprintf( buf+len, sizeof(buf)-len, "GUID: 00000000-0000-0000-0000-000000000000\r\n" "RegionData: 0\r\n" "ClientID: Linux_2.4_6.0.9.1235_play32_RN01_EN_586\r\n" "SupportsMaximumASMBandwidth: 1\r\n" "Require: com.real.retain-entity-for-setup\r\n" ); } status = net_command( stream, buf, sizeof(buf) ); if (status != 200) return (status == 404) ? DR_FILENOTFOUND : DR_FAILURE; len = 0; while (net_response( stream, buf, sizeof(buf) ) > 0) { if (!strncasecmp( buf, "ETag:", 5 )) { direct_snprintf( session, sizeof(session), "%s", trim( buf+5 ) ); } else if (!strncasecmp( buf, "Content-Length:", 15 )) { char *tmp = trim( buf+15 ); if (sscanf( tmp, "%d", &len ) != 1) sscanf( tmp, "bytes=%d", &len ); } } if (!len) { D_DEBUG_AT( Direct_Stream, "Couldn't get sdp length!\n" ); return DR_FAILURE; } ret = sdp_parse( stream, len, &streams, &n_streams ); if (ret) return ret; for (i = 0; i < n_streams; i++) { /* skip unhandled payload types */ if (!stream->remote.real_rtsp && !streams[i].payload) continue; len = direct_snprintf( buf, sizeof(buf), "SETUP rtsp://%s:%d%s/%s RTSP/1.0\r\n" "CSeq: %d\r\n", stream->remote.host, stream->remote.port, stream->remote.path, streams[i].control, ++cseq ); if (*session) { if (*challen) { char response[64]; char checksum[32]; real_calc_challenge2( response, checksum, challen ); len += direct_snprintf( buf+len, sizeof(buf)-len, "RealChallenge2: %s, sd=%s\r\n", response, checksum ); *challen = '\0'; } len += direct_snprintf( buf+len, sizeof(buf)-len, "%s: %s\r\n", i ? "Session" : "If-Match", session ); } direct_snprintf( buf+len, sizeof(buf)-len, "Transport: %s\r\n", stream->remote.real_rtsp ? "x-pn-tng/tcp;mode=play,rtp/avp/tcp;unicast;mode=play" : "RTP/AVP/TCP;unicast" ); if (net_command( stream, buf, sizeof(buf) ) != 200) { sdp_free( streams, n_streams ); return DR_FAILURE; } while (net_response( stream, buf, sizeof(buf) ) > 0) { if (!strncmp( buf, "Session:", 8 )) direct_snprintf( session, sizeof(session), "%s", trim( buf+8 ) ); } } len = direct_snprintf( buf, sizeof(buf), "PLAY rtsp://%s:%d%s RTSP/1.0\r\n" "CSeq: %d\r\n", stream->remote.host, stream->remote.port, stream->remote.path, ++cseq ); if (*session) { len += direct_snprintf( buf+len, sizeof(buf)-len, "Session: %s\r\n", session ); } direct_snprintf( buf+len, sizeof(buf)-len, "Range: npt=0-\r\n" "Connection: Close\r\n" ); if (net_command( stream, buf, sizeof(buf) ) != 200) { sdp_free( streams, n_streams ); return DR_FAILURE; } /* discard remaining headers */ while (net_response( stream, buf, sizeof(buf) ) > 0); /* revert to blocking mode */ fcntl( stream->fd, F_SETFL, fcntl( stream->fd, F_GETFL ) & ~O_NONBLOCK ); if (!stream->remote.real_rtsp) { RTPPayload *p; stream->remote.data = D_CALLOC( 1, (n_streams+1)*sizeof(RTPPayload) ); if (!stream->remote.data) { sdp_free( streams, n_streams ); return D_OOM(); } p = (RTPPayload*) stream->remote.data; for (i = 0; i < n_streams; i++) { if (streams[i].payload) { *p = *(streams[i].payload); p->pt = streams[i].pt; p++; } } } stream->remote.real_pack = true; if (n_streams == 1 && streams[0].mime) { if (!strcmp( streams[0].mime, "audio/mpeg" ) || !strcmp( streams[0].mime, "audio/aac" ) || !strcmp( streams[0].mime, "video/mpeg" ) || !strcmp( streams[0].mime, "video/mpegts" )) { stream->mime = D_STRDUP( streams[0].mime ); stream->remote.real_pack = false; } } if (stream->remote.real_pack) { ret = rmf_write_header( streams, n_streams, &stream->cache, &stream->cache_size ); if (ret) { sdp_free( streams, n_streams ); return ret; } stream->mime = D_STRDUP( "application/vnd.rn-realmedia" ); } sdp_free( streams, n_streams ); return DR_OK; } static DirectResult rvp_read_packet( DirectStream *stream ) { unsigned char buf[9]; int size; int len; unsigned char id; unsigned int ts; while (1) { do { size = recv( stream->fd, buf, 1, MSG_WAITALL ); if (size < 1) return DR_EOF; } while (buf[0] != '$'); size = recv( stream->fd, buf, 7, MSG_WAITALL ); if (size < 7) return DR_EOF; len = (buf[0] << 16) + (buf[1] << 8) + buf[2]; id = buf[3]; if (id != 0x40 && id != 0x42) { if (buf[5] == 0x06) // EOS return DR_EOF; size = recv( stream->fd, buf, 9, MSG_WAITALL ); if (size < 9) return DR_EOF; id = buf[5]; len -= 9; } id = (id >> 1) & 1; size = recv( stream->fd, buf, 6, MSG_WAITALL ); if (size < 6) return DR_EOF; ts = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; len -= 10; if (len > 0) { unsigned char *dst; size = len + 12; stream->cache = D_REALLOC( stream->cache, stream->cache_size+size ); if (!stream->cache) return D_OOM(); dst = stream->cache+stream->cache_size; stream->cache_size += size; dst += rmf_write_pheader( dst, id, len, ts ); while (len) { size = recv( stream->fd, dst, len, MSG_WAITALL ); if (size < 1) return DR_EOF; dst += size; len -= size; } break; } } return DR_OK; } static DirectResult rtp_read_packet( DirectStream *stream ) { RTPPayload *payloads = (RTPPayload*)stream->remote.data; unsigned char buf[12]; int size; int len; unsigned char id; unsigned short seq; unsigned int ts; int skip; while (1) { RTPPayload *p; do { size = recv( stream->fd, buf, 1, MSG_WAITALL ); if (size < 1) return DR_EOF; } while (buf[0] != '$'); size = recv( stream->fd, buf, 3, MSG_WAITALL ); if (size < 3) return DR_EOF; id = buf[0]; len = (buf[1] << 8) | buf[2]; if (len < 12) continue; size = recv( stream->fd, buf, 12, MSG_WAITALL ); if (size < 12) return DR_EOF; len -= 12; if ((buf[0] & 0xc0) != (2 << 6)) D_DEBUG_AT( Direct_Stream, "Bad RTP version %d!\n", buf[0] ); seq = (buf[2] << 8) | buf[3]; ts = (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7]; for (p = payloads; p->pt; p++) { if (p->pt == (buf[1] & 0x7f)) break; } switch (p->pt) { case 0: // Unhandled skip = len; break; case 14: // MPEG Audio skip = 4; break; case 32: // MPEG Video size = recv( stream->fd, buf, 1, MSG_WAITALL ); if (size < 1) return DR_EOF; len--; skip = 3; if (buf[0] & (1 << 2)) skip += 4; break; case 34: // H263 size = recv( stream->fd, buf, 1, MSG_WAITALL ); if (size < 1) return DR_EOF; len--; skip = 3; if (buf[0] & (1 << 7)) skip += 4; if (buf[0] & (1 << 6)) skip += 4; break; default: skip = 0; break; } while (skip) { size = recv( stream->fd, buf, MIN(skip,12), MSG_WAITALL ); if (size < 1) return DR_EOF; len -= size; skip -= size; } if (len > 0) { unsigned char *dst; size = len; if (stream->remote.real_pack) { size += 12; if (p->type == PAYLOAD_VIDEO) size += 7; } stream->cache = D_REALLOC( stream->cache, stream->cache_size+size ); if (!stream->cache) return D_OOM(); dst = stream->cache+stream->cache_size; stream->cache_size += size; if (stream->remote.real_pack) { if (p->type == PAYLOAD_VIDEO) { dst += rmf_write_pheader( dst, id, len+7, ts ); dst[0] = 0x81; dst[1] = 0x01; dst[2] = (len | 0x4000)>>8; dst[3] = len; dst[4] = (len | 0x4000)>>8; dst[5] = len; dst[6] = seq; dst += 7; } else { dst += rmf_write_pheader( dst, id, len, ts ); } } while (len) { size = recv( stream->fd, dst, len, MSG_WAITALL ); if (size < 1) return DR_EOF; dst += size; len -= size; } break; } } return DR_OK; } static DirectResult rtsp_peek( DirectStream *stream, unsigned int length, int offset, void *buf, unsigned int *read_out ) { DirectResult ret; unsigned int len; if (offset < 0) return DR_UNSUPPORTED; len = length + offset; while (len > stream->cache_size) { ret = (stream->remote.real_rtsp) ? rvp_read_packet( stream ) : rtp_read_packet( stream ); if (ret) { if (stream->cache_size < offset) return ret; break; } } len = MIN( stream->cache_size-offset, length ); direct_memcpy( buf, stream->cache+offset, len ); if (read_out) *read_out = len; return DR_OK; } static DirectResult rtsp_read( DirectStream *stream, unsigned int length, void *buf, unsigned int *read_out ) { DirectResult ret; unsigned int size = 0; while (size < length) { if (stream->cache_size) { unsigned int len = MIN( stream->cache_size, length-size ); direct_memcpy( buf+size, stream->cache, len ); size += len; stream->cache_size -= len; if (stream->cache_size) { direct_memcpy( stream->cache, stream->cache+len, stream->cache_size ); } else { D_FREE( stream->cache ); stream->cache = NULL; } } if (size < length) { ret = (stream->remote.real_rtsp) ? rvp_read_packet( stream ) : rtp_read_packet( stream ); if (ret) { if (!size) return ret; break; } } } stream->offset += size; if (read_out) *read_out = size; return DR_OK; } static DirectResult rtsp_open( DirectStream *stream, const char *filename ) { DirectResult ret; stream->remote.port = RTSP_PORT; ret = net_open( stream, filename, IPPROTO_TCP ); if (ret) return ret; ret = rtsp_session_open( stream ); if (ret) { close( stream->remote.sd ); return ret; } stream->peek = rtsp_peek; stream->read = rtsp_read; return DR_OK; } #endif /* DIRECT_BUILD_NETWORK */ /************************** End of Network Support ***************************/ #ifndef WIN32 static DirectResult pipe_wait( DirectStream *stream, unsigned int length, struct timeval *tv ) { fd_set s; if (stream->cache_size >= length) return DR_OK; FD_ZERO( &s ); FD_SET( stream->fd, &s ); switch (select( stream->fd+1, &s, NULL, NULL, tv )) { case 0: if (!tv && !stream->cache_size) return DR_EOF; return DR_TIMEOUT; case -1: return errno2result( errno ); } return DR_OK; } static DirectResult pipe_peek( DirectStream *stream, unsigned int length, int offset, void *buf, unsigned int *read_out ) { unsigned int size = length; int len; if (offset < 0) return DR_UNSUPPORTED; len = length + offset; if (len > stream->cache_size) { ssize_t s; stream->cache = D_REALLOC( stream->cache, len ); if (!stream->cache) { stream->cache_size = 0; return D_OOM(); } s = read( stream->fd, stream->cache + stream->cache_size, len - stream->cache_size ); if (s < 0) { if (errno != EAGAIN || stream->cache_size == 0) return errno2result( errno ); s = 0; } stream->cache_size += s; if (stream->cache_size <= offset) return DR_BUFFEREMPTY; size = stream->cache_size - offset; } direct_memcpy( buf, stream->cache+offset, size ); if (read_out) *read_out = size; return DR_OK; } static DirectResult pipe_read( DirectStream *stream, unsigned int length, void *buf, unsigned int *read_out ) { unsigned int size = 0; if (stream->cache_size) { size = MIN( stream->cache_size, length ); direct_memcpy( buf, stream->cache, size ); length -= size; stream->cache_size -= size; if (stream->cache_size) { direct_memcpy( stream->cache, stream->cache+size, stream->cache_size ); } else { D_FREE( stream->cache ); stream->cache = NULL; } } if (length) { ssize_t s; s = read( stream->fd, buf+size, length-size ); switch (s) { case 0: if (!size) return DR_EOF; break; case -1: if (!size) { return (errno == EAGAIN) ? DR_BUFFEREMPTY : errno2result( errno ); } break; default: size += s; break; } } stream->offset += size; if (read_out) *read_out = size; return DR_OK; } #endif /*****************************************************************************/ #ifndef WIN32 static DirectResult file_peek( DirectStream *stream, unsigned int length, int offset, void *buf, unsigned int *read_out ) { DirectResult ret = DR_OK; ssize_t size; if (lseek( stream->fd, offset, SEEK_CUR ) < 0) return DR_FAILURE; size = read( stream->fd, buf, length ); switch (size) { case 0: ret = DR_EOF; break; case -1: ret = (errno == EAGAIN) ? DR_BUFFEREMPTY : errno2result( errno ); size = 0; break; } if (lseek( stream->fd, - offset - size, SEEK_CUR ) < 0) return DR_FAILURE; if (read_out) *read_out = size; return ret; } static DirectResult file_read( DirectStream *stream, unsigned int length, void *buf, unsigned int *read_out ) { ssize_t size; size = read( stream->fd, buf, length ); switch (size) { case 0: return DR_EOF; case -1: if (errno == EAGAIN) return DR_BUFFEREMPTY; return errno2result( errno ); } stream->offset += size; if (read_out) *read_out = size; return DR_OK; } static DirectResult file_seek( DirectStream *stream, unsigned int offset ) { off_t off; off = lseek( stream->fd, offset, SEEK_SET ); if (off < 0) return DR_FAILURE; stream->offset = off; return DR_OK; } #else static DirectResult file_peek( DirectStream *stream, unsigned int length, int offset, void *buf, unsigned int *read_out ) { DirectResult ret = DR_OK; size_t size; ret = direct_file_seek( &stream->file, offset ); if (ret) return ret; ret = direct_file_read( &stream->file, buf, length, &size ); if (ret) return ret; ret = direct_file_seek( &stream->file, - offset - size ); if (ret) return ret; if (read_out) *read_out = size; return ret; } static DirectResult file_read( DirectStream *stream, unsigned int length, void *buf, unsigned int *read_out ) { DirectResult ret; size_t size; ret = direct_file_read( &stream->file, buf, length, &size ); if (ret) return ret; stream->offset += size; if (read_out) *read_out = size; return DR_OK; } static DirectResult file_seek( DirectStream *stream, unsigned int offset ) { DirectResult ret; ret = direct_file_seek_to( &stream->file, offset ); if (ret) return ret; stream->offset = offset; return DR_OK; } #endif static DirectResult file_open( DirectStream *stream, const char *filename, int fileno ) { #ifndef WIN32 if (filename) { stream->fd = open( filename, O_RDONLY | O_NONBLOCK ); } else { stream->fd = dup( fileno ); if (stream->fd < 0) return errno2result( errno ); fcntl( stream->fd, F_SETFL, fcntl( stream->fd, F_GETFL ) | O_NONBLOCK ); } if (lseek( stream->fd, 0, SEEK_CUR ) < 0 && errno == ESPIPE) { stream->length = -1; stream->wait = pipe_wait; stream->peek = pipe_peek; stream->read = pipe_read; } else { struct stat s; if (fstat( stream->fd, &s ) < 0) return errno2result( errno ); stream->length = s.st_size; stream->peek = file_peek; stream->read = file_read; stream->seek = file_seek; } #else DirectResult ret; DirectFileInfo info; if (filename) { ret = direct_file_open( &stream->file, filename, O_RDONLY | O_NONBLOCK, 0644 ); if (ret) return ret; } else { D_UNIMPLEMENTED(); return DR_UNIMPLEMENTED; } ret = direct_file_get_info( &stream->file, &info ); if (ret) { direct_file_close( &stream->file ); return ret; } stream->length = info.size; stream->peek = file_peek; stream->read = file_read; stream->seek = file_seek; #endif return DR_OK; } /*****************************************************************************/ DirectResult direct_stream_create( const char *filename, DirectStream **ret_stream ) { DirectStream *stream; DirectResult ret; D_ASSERT( filename != NULL ); D_ASSERT( ret_stream != NULL ); D_DEBUG_AT( Direct_Stream, "%s( '%s' )\n", __FUNCTION__, filename ); stream = D_CALLOC( 1, sizeof(DirectStream) ); if (!stream) return D_OOM(); D_MAGIC_SET( stream, DirectStream ); stream->ref = 1; stream->fd = -1; #ifndef WIN32 if (!strncmp( filename, "stdin:/", 7 )) { ret = file_open( stream, NULL, STDIN_FILENO ); } else #endif if (!strncmp( filename, "file:/", 6 )) { ret = file_open( stream, filename+6, -1 ); } else if (!strncmp( filename, "fd:/", 4 )) { ret = (filename[4] >= '0' && filename[4] <= '9') ? file_open( stream, NULL, atoi(filename+4) ) : DR_INVARG; } #if DIRECT_BUILD_NETWORK else if (!strncmp( filename, "http://", 7 ) || !strncmp( filename, "unsv://", 7 )) { ret = http_open( stream, filename+7 ); } else if (!strncmp( filename, "https://", 8 )) { ret = http_open( stream, filename+8 ); } else if (!strncmp( filename, "ftp://", 6 )) { ret = ftp_open( stream, filename+6 ); } else if (!strncmp( filename, "rtsp://", 7 )) { ret = rtsp_open( stream, filename+7 ); } else if (!strncmp( filename, "tcp://", 6 )) { ret = net_open( stream, filename+6, IPPROTO_TCP ); } else if (!strncmp( filename, "udp://", 6 )) { ret = net_open( stream, filename+6, IPPROTO_UDP ); } #endif else { ret = file_open( stream, filename, -1 ); } if (ret) { direct_stream_close( stream ); D_FREE( stream ); return ret; } *ret_stream = stream; return DR_OK; } DirectStream* direct_stream_dup( DirectStream *stream ) { D_ASSERT( stream != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); stream->ref++; return stream; } int direct_stream_fileno( DirectStream *stream ) { D_ASSERT( stream != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); return stream->fd; } bool direct_stream_seekable( DirectStream *stream ) { D_ASSERT( stream != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); return stream->seek ? true : false; } bool direct_stream_remote( DirectStream *stream ) { D_ASSERT( stream != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); #if DIRECT_BUILD_NETWORK if (stream->remote.host) return true; #endif return false; } const char* direct_stream_mime( DirectStream *stream ) { D_ASSERT( stream != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); return stream->mime; } unsigned int direct_stream_offset( DirectStream *stream ) { D_ASSERT( stream != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); return stream->offset; } unsigned int direct_stream_length( DirectStream *stream ) { D_ASSERT( stream != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); return (unsigned int)((stream->length >= 0) ? stream->length : stream->offset); } DirectResult direct_stream_wait( DirectStream *stream, unsigned int length, struct timeval *tv ) { D_ASSERT( stream != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); if (length && stream->wait) return stream->wait( stream, length, tv ); return DR_OK; } DirectResult direct_stream_peek( DirectStream *stream, unsigned int length, int offset, void *buf, unsigned int *read_out ) { D_ASSERT( stream != NULL ); D_ASSERT( length != 0 ); D_ASSERT( buf != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); if (stream->length >= 0 && (stream->offset + offset) >= stream->length) return DR_EOF; if (stream->peek) return stream->peek( stream, length, offset, buf, read_out ); return DR_UNSUPPORTED; } DirectResult direct_stream_read( DirectStream *stream, unsigned int length, void *buf, unsigned int *read_out ) { D_ASSERT( stream != NULL ); D_ASSERT( length != 0 ); D_ASSERT( buf != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); if (stream->length >= 0 && stream->offset >= stream->length) return DR_EOF; if (stream->read) return stream->read( stream, length, buf, read_out ); return DR_UNSUPPORTED; } DirectResult direct_stream_seek( DirectStream *stream, unsigned int offset ) { D_ASSERT( stream != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); if (stream->offset == offset) return DR_OK; if (stream->length >= 0 && offset > stream->length) offset = (unsigned int) stream->length; if (stream->seek) return stream->seek( stream, offset ); return DR_UNSUPPORTED; } static void direct_stream_close( DirectStream *stream ) { #if DIRECT_BUILD_NETWORK if (stream->remote.host) { D_FREE( stream->remote.host ); stream->remote.host = NULL; } if (stream->remote.user) { D_FREE( stream->remote.user ); stream->remote.user = NULL; } if (stream->remote.pass) { D_FREE( stream->remote.pass ); stream->remote.pass = NULL; } if (stream->remote.auth) { D_FREE( stream->remote.auth ); stream->remote.auth = NULL; } if (stream->remote.path) { D_FREE( stream->remote.path ); stream->remote.path = NULL; } if (stream->remote.addr) { freeaddrinfo( stream->remote.addr ); stream->remote.addr = NULL; } if (stream->remote.data) { D_FREE( stream->remote.data ); stream->remote.data = NULL; } if (stream->remote.sd > 0) { close( stream->remote.sd ); stream->remote.sd = -1; } #endif if (stream->mime) { D_FREE( stream->mime ); stream->mime = NULL; } if (stream->cache) { D_FREE( stream->cache ); stream->cache = NULL; stream->cache_size = 0; } #ifndef WIN32 if (stream->fd >= 0) { fcntl( stream->fd, F_SETFL, fcntl( stream->fd, F_GETFL ) & ~O_NONBLOCK ); close( stream->fd ); stream->fd = -1; } #else direct_file_close( &stream->file ); #endif } void direct_stream_destroy( DirectStream *stream ) { D_ASSERT( stream != NULL ); D_MAGIC_ASSERT( stream, DirectStream ); if (--stream->ref == 0) { direct_stream_close( stream ); D_FREE( stream ); } } DirectFB-1.7.7/lib/direct/log_domain.h0000644000175000017500000001346712254435330014406 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__LOG_DOMAIN_H__ #define __DIRECT__LOG_DOMAIN_H__ #include /**********************************************************************************************************************/ typedef enum { DIRECT_LOG_NONE = 0x0, DIRECT_LOG_FATAL = 0x1, DIRECT_LOG_ERROR = 0x2, DIRECT_LOG_WARNING = 0x3, DIRECT_LOG_NOTICE = 0x4, DIRECT_LOG_INFO = 0x5, DIRECT_LOG_VERBOSE = 0x6, DIRECT_LOG_DEBUG_0 = DIRECT_LOG_VERBOSE, DIRECT_LOG_DEBUG_1 = 0x7, DIRECT_LOG_DEBUG_2 = 0x8, DIRECT_LOG_DEBUG_3 = 0x9, DIRECT_LOG_DEBUG_4 = 0xA, DIRECT_LOG_DEBUG_5 = 0xB, DIRECT_LOG_DEBUG_6 = 0xC, DIRECT_LOG_DEBUG_7 = 0xD, DIRECT_LOG_DEBUG_8 = 0xE, DIRECT_LOG_DEBUG_9 = 0xF, DIRECT_LOG_ALL = 0x10, DIRECT_LOG_DEBUG = DIRECT_LOG_DEBUG_8, /* default debug level */ _DIRECT_LOG_NUM_LEVELS } DirectLogLevel; typedef struct { DirectLogLevel level; DirectLog *log; } DirectLogDomainConfig; /**********************************************************************************************************************/ typedef struct { const char *description; const char *name; int name_len; unsigned int age; bool registered; DirectLogDomainConfig config; } DirectLogDomain; /**********************************************************************************************************************/ #define D_LOG_DOMAIN( _identifier, _name, _description ) \ static DirectLogDomain _identifier D_UNUSED = { \ _description, _name, sizeof(_name) - 1, 0, false, {DIRECT_LOG_NONE,0} \ } /**********************************************************************************************************************/ void DIRECT_API direct_log_domain_configure( const char *name, const DirectLogDomainConfig *config ); DirectResult DIRECT_API direct_log_domain_vprintf( DirectLogDomain *domain, DirectLogLevel level, const char *format, va_list ap ) D_FORMAT_VPRINTF(3); DirectResult DIRECT_API direct_log_domain_log( DirectLogDomain *domain, DirectLogLevel level, const char *func, const char *file, int line, const char *format, ... ) D_FORMAT_PRINTF(6); /**********************************************************************************************************************/ static __inline__ void direct_log_domain_config_level( const char *name, DirectLogLevel level ) { DirectLogDomainConfig config; config.level = level; config.log = NULL; direct_log_domain_configure( name, &config ); } bool DIRECT_API direct_log_domain_check( DirectLogDomain *domain ); // TODO: for non-debug builds use macro for better optimisations bool DIRECT_API direct_log_domain_check_level( DirectLogDomain *domain, DirectLogLevel level ); /**********************************************************************************************************************/ #define D_LOG( _Domain, _LEVEL, ... ) \ do { \ direct_log_domain_log( &(_Domain), DIRECT_LOG_ ## _LEVEL, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__ ); \ } while (0) #define D_LOG_( _Domain, _level, ... ) \ do { \ direct_log_domain_log( &(_Domain), _level, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__ ); \ } while (0) void __D_log_domain_init( void ); void __D_log_domain_deinit( void ); #endif DirectFB-1.7.7/lib/direct/serial.h0000644000175000017500000001632612254435330013552 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__SERIAL_H__ #define __DIRECT__SERIAL_H__ #include #include #include struct __D_DirectSerial { int magic; u32 overflow; unsigned long value; int waiting; int wakeup; }; #if D_DEBUG_ENABLED #define DIRECT_SERIAL_ASSERT( serial ) \ do { \ D_MAGIC_ASSERT( serial, DirectSerial ); \ } while (0) #else #define DIRECT_SERIAL_ASSERT( serial ) \ do { \ } while (0) #endif D_LOG_DOMAIN( Direct_Serial, "Direct/Serial", "Direct Serial" ); static __inline__ void direct_serial_initialize( DirectSerial *serial, const char *name ) { D_DEBUG_AT( Direct_Serial, "%s( %p '%s' ) <<\n", __FUNCTION__, (void*) serial, name ); D_ASSERT( serial != NULL ); serial->value = 0; serial->overflow = 0; serial->waiting = 0; D_MAGIC_SET( serial, DirectSerial ); } // @deprecated static __inline__ void direct_serial_init( DirectSerial *serial ) { D_DEBUG_AT( Direct_Serial, "%s( %p ) <<\n", __FUNCTION__, (void*) serial ); D_ASSERT( serial != NULL ); direct_serial_initialize( serial, "unnamed" ); } static __inline__ void direct_serial_init_from( DirectSerial *serial, const DirectSerial *source ) { D_ASSERT( source != NULL ); D_DEBUG_AT( Direct_Serial, "%s( %p, %p ) <<-- <%lu>\n", __FUNCTION__, (void*) serial, (void*) source, source->value ); D_ASSERT( serial != NULL ); D_MAGIC_ASSERT( source, DirectSerial ); serial->value = source->value; serial->overflow = source->overflow; serial->waiting = 0; D_MAGIC_SET( serial, DirectSerial ); } static __inline__ void direct_serial_init_from_counting( DirectSerial *serial, DirectSerial *counter ) { unsigned long value; D_ASSERT( serial != NULL ); D_MAGIC_ASSERT( counter, DirectSerial ); value = D_SYNC_ADD_AND_FETCH( &counter->value, 1 ); D_DEBUG_AT( Direct_Serial, "%s( %p, %p ) <<-- <%lu>\n", __FUNCTION__, (void*) serial, (void*) counter, value ); serial->value = value; serial->overflow = counter->overflow; serial->waiting = 0; D_MAGIC_SET( serial, DirectSerial ); } static __inline__ void direct_serial_deinit( DirectSerial *serial ) { D_ASSERT( serial != NULL ); D_DEBUG_AT( Direct_Serial, "%s( %p ) <- (%lu)\n", __FUNCTION__, (void*) serial, serial->value ); D_MAGIC_ASSERT( serial, DirectSerial ); D_ASSUME( serial->waiting == 0 ); D_MAGIC_CLEAR( serial ); } static __inline__ void direct_serial_increase( DirectSerial *serial ) { D_ASSERT( serial != NULL ); D_DEBUG_AT( Direct_Serial, "%s( %p ) <- %lu ++\n", __FUNCTION__, (void*) serial, serial->value ); D_MAGIC_ASSERT( serial, DirectSerial ); if (! ++serial->value) serial->overflow++; D_DEBUG_AT( Direct_Serial, " -> %lu\n", serial->value ); } static __inline__ void direct_serial_copy( DirectSerial *serial, const DirectSerial *source ) { D_ASSERT( serial != NULL ); D_ASSERT( source != NULL ); D_DEBUG_AT( Direct_Serial, "%s( %p, %p ) <- %lu = (%lu)\n", __FUNCTION__, (void*) serial, (void*) source, source->value, serial->value ); D_MAGIC_ASSERT( serial, DirectSerial ); D_MAGIC_ASSERT( source, DirectSerial ); serial->value = source->value; serial->overflow = source->overflow; } static __inline__ bool direct_serial_check( const DirectSerial *serial, const DirectSerial *source ) { D_ASSERT( serial != NULL ); D_ASSERT( source != NULL ); D_DEBUG_AT( Direct_Serial, "%s( %p, %p ) -- %lu == %lu\n", __FUNCTION__, (void*) serial, (void*) source, serial->value, source->value ); D_MAGIC_ASSERT( serial, DirectSerial ); D_MAGIC_ASSERT( source, DirectSerial ); if (serial->overflow < source->overflow) return false; else if (serial->overflow == source->overflow && serial->value < source->value) return false; // D_ASSUME( serial->value == source->value ); return true; } static __inline__ bool direct_serial_update( DirectSerial *serial, const DirectSerial *source ) { D_ASSERT( serial != NULL ); D_ASSERT( source != NULL ); D_DEBUG_AT( Direct_Serial, "%s( %p, %p ) <- %lu <-= %lu\n", __FUNCTION__, (void*) serial, (void*) source, serial->value, source->value ); D_MAGIC_ASSERT( serial, DirectSerial ); D_MAGIC_ASSERT( source, DirectSerial ); if (serial->overflow < source->overflow) { serial->overflow = source->overflow; serial->value = source->value; return true; } else if (serial->overflow == source->overflow && serial->value < source->value) { serial->value = source->value; return true; } D_ASSUME( serial->value == source->value ); return false; } DirectResult DIRECT_API direct_serial_wait ( DirectSerial *serial, const DirectSerial *source ); DirectResult DIRECT_API direct_serial_notify( DirectSerial *serial, const DirectSerial *source ); static __inline__ int direct_serial_diff( const DirectSerial *a, const DirectSerial *b ) { int ret; D_ASSERT( a != NULL ); D_ASSERT( b != NULL ); D_DEBUG_AT( Direct_Serial, "%s( %p, %p ) <- %lu - %lu\n", __FUNCTION__, (void*) a, (void*) b, a->value, b->value ); D_MAGIC_ASSERT( a, DirectSerial ); D_MAGIC_ASSERT( b, DirectSerial ); if (a->overflow > b->overflow) ret = INT_MAX; else if (b->overflow > a->overflow) ret = INT_MIN; else ret = (int) a->value - (int) b->value; D_DEBUG_AT( Direct_Serial, " -> %d\n", ret ); return ret; } #endif DirectFB-1.7.7/lib/direct/util.h0000644000175000017500000002465712463500054013254 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__UTIL_H__ #define __DIRECT__UTIL_H__ #include #include #include #ifndef DIRECT_DISABLE_DEPRECATED #include #endif #ifndef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif #ifndef MAX #define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif #ifndef SIGN #define SIGN(x) (((x) < 0) ? -1 : (((x) > 0) ? 1 : 0)) #endif #ifndef ABS #define ABS(x) ((x) > 0 ? (x) : -(x)) #endif #ifndef CLAMP #define CLAMP(x,min,max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x)) #endif #ifndef BSWAP16 #define BSWAP16(x) (((u16)(x)>>8) | ((u16)(x)<<8)) #endif #ifndef BSWAP32 #define BSWAP32(x) ((((u32)(x)>>24) & 0x000000ff) | (((u32)(x)>> 8) & 0x0000ff00) | \ (((u32)(x)<< 8) & 0x00ff0000) | (((u32)(x)<<24) & 0xff000000)) #endif #ifdef __GNUC__ #define D_FLAGS_SET(flags,f) do { (flags) = (__typeof__(flags))((flags) | (f)); } while (0) #define D_FLAGS_CLEAR(flags,f) do { (flags) = (__typeof__(flags))((flags) & ~(f)); } while (0) #else #define D_FLAGS_SET(flags,f) do { (flags) = (unsigned int)((flags) | (f)); } while (0) #define D_FLAGS_CLEAR(flags,f) do { (flags) = (unsigned int)((flags) & ~(f)); } while (0) #endif #define D_FLAGS_IS_SET(flags,f) (((flags) & (f)) != 0) #define D_FLAGS_ARE_SET(flags,f) (((flags) & (f)) == (f)) #define D_FLAGS_ARE_IN(flags,f) (((flags) & ~(f)) == 0) #define D_FLAGS_INVALID(flags,f) (((flags) & ~(f)) != 0) #define D_ARRAY_SIZE(array) ((int)(sizeof(array) / sizeof((array)[0]))) #define D_UTIL_SWAP(a,b) \ do { \ const __typeof__(a) __swap_x = (a); (a) = (b); (b) = __swap_x; \ } while (0) #if __GNUC__ >= 3 #define D_CONST_FUNC __attribute__((const)) #else #define D_CONST_FUNC #endif #if __GNUC__ >= 3 #define D_FORMAT_PRINTF(n) __attribute__((__format__ (__printf__, n, n+1))) #define D_FORMAT_VPRINTF(n) __attribute__((__format__ (__printf__, n, 0))) #else #define D_FORMAT_PRINTF(n) #define D_FORMAT_VPRINTF(n) #endif #define D_BITn32(f) (((f) & 0x00000001) ? 0 : \ ((f) & 0x00000002) ? 1 : \ ((f) & 0x00000004) ? 2 : \ ((f) & 0x00000008) ? 3 : \ ((f) & 0x00000010) ? 4 : \ ((f) & 0x00000020) ? 5 : \ ((f) & 0x00000040) ? 6 : \ ((f) & 0x00000080) ? 7 : \ ((f) & 0x00000100) ? 8 : \ ((f) & 0x00000200) ? 9 : \ ((f) & 0x00000400) ? 10 : \ ((f) & 0x00000800) ? 11 : \ ((f) & 0x00001000) ? 12 : \ ((f) & 0x00002000) ? 13 : \ ((f) & 0x00004000) ? 14 : \ ((f) & 0x00008000) ? 15 : \ ((f) & 0x00010000) ? 16 : \ ((f) & 0x00020000) ? 17 : \ ((f) & 0x00040000) ? 18 : \ ((f) & 0x00080000) ? 19 : \ ((f) & 0x00100000) ? 20 : \ ((f) & 0x00200000) ? 21 : \ ((f) & 0x00400000) ? 22 : \ ((f) & 0x00800000) ? 23 : \ ((f) & 0x01000000) ? 24 : \ ((f) & 0x02000000) ? 25 : \ ((f) & 0x04000000) ? 26 : \ ((f) & 0x08000000) ? 27 : \ ((f) & 0x10000000) ? 28 : \ ((f) & 0x20000000) ? 29 : \ ((f) & 0x40000000) ? 30 : \ ((f) & 0x80000000) ? 31 : -1) #define D_UNUSED_P(x) (void)x /* * portable sched_yield() implementation */ #ifdef _POSIX_PRIORITY_SCHEDULING #define direct_sched_yield() sched_yield() #else #define direct_sched_yield() usleep(1) #endif /* * translates errno to DirectResult */ DirectResult DIRECT_API errno2result( int erno ); /* * duplicates a file descriptor as needed to ensure it's not stdin, stdout, or stderr */ int DIRECT_API direct_safe_dup( int fd ); #ifndef DIRECT_DISABLE_DEPRECATED // @deprecated int DIRECT_API direct_try_open( const char *name1, const char *name2, int flags, bool error_msg ); // @deprecated int DIRECT_API direct_util_recursive_pthread_mutex_init( pthread_mutex_t *mutex ); #endif const char DIRECT_API *direct_inet_ntop( int af, const void* src, char* dst, int cnt ); int DIRECT_API direct_sscanf( const char *str, const char *format, ... ); int DIRECT_API direct_vsscanf( const char *str, const char *format, va_list args ); size_t DIRECT_API direct_strlen( const char *s ); void DIRECT_API direct_trim( char **s ); int DIRECT_API direct_strcmp( const char *a, const char *b ); int DIRECT_API direct_strcasecmp( const char *a, const char *b ); int DIRECT_API direct_strncasecmp( const char *a, const char *b, size_t bytes ); unsigned long int DIRECT_API direct_strtoul( const char *nptr, char **endptr, int base ); char DIRECT_API *direct_strtok_r( char *str, const char *delim, char **saveptr ); const char DIRECT_API *direct_strerror( int erno ); /* * Set a string with a maximum size including the zero termination. * * This acts like a strncpy(d,s,n), but always terminates the string like direct_snprintf(d,n,"%s",s). * * Returns dest or NULL if n is zero. */ char DIRECT_API *direct_snputs( char *dest, const char *src, size_t n ); /* * Encode/Decode Base-64 strings. */ char DIRECT_API *direct_base64_encode( const void *data, int size ); void DIRECT_API *direct_base64_decode( const char *string, int *ret_size ); /* * Compute MD5 sum (store 16-bytes long result in "dst"). */ void DIRECT_API direct_md5_sum( void *dst, const void *src, const int len ); /* * Slow implementation, but quite fast if only low bits are set. */ static __inline__ int direct_util_count_bits( unsigned int mask ) { register int ret = 0; while (mask) { ret += mask & 1; mask >>= 1; } return ret; } /* * Generic alignment routine. */ static __inline__ int direct_util_align( int value, int alignment ) { if (alignment > 1) { int tail = value % alignment; if (tail) value += alignment - tail; } return value; } void DIRECT_API * direct_bsearch( const void *key, const void *base, size_t nmemb, size_t size, void *func ); /* floor and ceil implementation to get rid of libm */ /* IEEE floor for computers that round to nearest or even. 'f' must be between -4194304 and 4194303. This floor operation is done by "(iround(f + .5) + iround(f - .5)) >> 1", but uses some IEEE specific tricks for better speed. */ static __inline__ int D_IFLOOR(float f) { int ai, bi; double af, bf; af = (3 << 22) + 0.5 + (double)f; bf = (3 << 22) + 0.5 - (double)f; #if defined(__GNUC__) && defined(__i386__) /* GCC generates an extra fstp/fld without this. */ __asm__ __volatile__ ("fstps %0" : "=m" (ai) : "t" (af) : "st"); __asm__ __volatile__ ("fstps %0" : "=m" (bi) : "t" (bf) : "st"); #else { union { int i; float f; } u; u.f = (float) af; ai = u.i; u.f = (float) bf; bi = u.i; } #endif return (ai - bi) >> 1; } /* IEEE ceil for computers that round to nearest or even. 'f' must be between -4194304 and 4194303. This ceil operation is done by "(iround(f + .5) + iround(f - .5) + 1) >> 1", but uses some IEEE specific tricks for better speed. */ static __inline__ int D_ICEIL(float f) { int ai, bi; double af, bf; af = (3 << 22) + 0.5 + (double)f; bf = (3 << 22) + 0.5 - (double)f; #if defined(__GNUC__) && defined(__i386__) /* GCC generates an extra fstp/fld without this. */ __asm__ __volatile__ ("fstps %0" : "=m" (ai) : "t" (af) : "st"); __asm__ __volatile__ ("fstps %0" : "=m" (bi) : "t" (bf) : "st"); #else { union { int i; float f; } u; u.f = (float) af; ai = u.i; u.f = (float) bf; bi = u.i; } #endif return (ai - bi + 1) >> 1; } static __inline__ int direct_log2( int val ) { register int ret = 0; while (val >> ++ret); if ((1 << --ret) < val) ret++; return ret; } typedef struct { long long start; long long stop; } DirectClock; static __inline__ void direct_clock_start( DirectClock *clock ) { clock->start = direct_clock_get_micros(); } static __inline__ void direct_clock_stop( DirectClock *clock ) { clock->stop = direct_clock_get_micros(); } static __inline__ long long direct_clock_diff( DirectClock *clock ) { return clock->stop - clock->start; } #define DIRECT_CLOCK_DIFF_SEC_MS( clock ) \ (direct_clock_diff( clock ) / 1000000), (direct_clock_diff( clock ) / 1000 % 1000) #define DIRECT_CLOCK_ITEMS_Mk_SEC( clock, n ) \ ((n) / direct_clock_diff( clock )), ((long)(((n) * 1000LL / direct_clock_diff( clock ) % 1000))) void __D_util_init( void ); void __D_util_deinit( void ); #endif DirectFB-1.7.7/lib/direct/clock.c0000644000175000017500000000413012254435330013347 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include D_LOG_DOMAIN( Direct_Clock, "Direct/Clock", "Time measurement etc." ); /**********************************************************************************************************************/ __dfb_no_instrument_function__ long long direct_clock_get_micros( void ) { return direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ); } __dfb_no_instrument_function__ long long direct_clock_get_millis( void ) { return direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ) / 1000LL; } __dfb_no_instrument_function__ long long direct_clock_get_abs_micros( void ) { return direct_clock_get_time( DIRECT_CLOCK_REALTIME ); } __dfb_no_instrument_function__ long long direct_clock_get_abs_millis( void ) { return direct_clock_get_time( DIRECT_CLOCK_REALTIME ) / 1000LL; } DirectFB-1.7.7/lib/direct/kernelmod.c0000644000175000017500000002473112254435330014245 00000000000000/* libdirect Kernel Module Part of DirectFB (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #ifdef HAVE_LINUX_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include D_LOG_DOMAIN( Direct_Module, "Direct/Module", "Initialization and shutdown of libdirect Kernel Module" ); /**********************************************************************************************************************/ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Denis Oliver Kropp "); MODULE_DESCRIPTION("libdirect"); MODULE_VERSION("1.5.0"); /**********************************************************************************************************************/ // ... extern int DirectResult__ctor(void); extern void DirectResult__dtor(void); /**********************************************************************************************************************/ int __init libdirect_init(void) { DirectResult__ctor(); D_DEBUG_AT( Direct_Module, "%s()\n", __FUNCTION__ ); D_INFO( "Direct/Module: Initializing module...\n" ); return 0; } void __exit libdirect_exit(void) { D_DEBUG_AT( Direct_Module, "%s()\n", __FUNCTION__ ); D_INFO( "Direct/Module: Exiting module...\n" ); DirectResult__dtor(); } /**********************************************************************************************************************/ module_init(libdirect_init); module_exit(libdirect_exit); /**********************************************************************************************************************/ /**********************************************************************************************************************/ /***************************************************** * EXPORT TABLE FOR ALL SYMBOLS... * *****************************************************/ EXPORT_SYMBOL_GPL( DirectResultTypeRegister ); EXPORT_SYMBOL_GPL( DirectResultTypeUnregister ); EXPORT_SYMBOL_GPL( DirectResultString ); EXPORT_SYMBOL_GPL( DirectGetInterface ); EXPORT_SYMBOL_GPL( DirectProbeInterface ); EXPORT_SYMBOL_GPL( DirectRegisterInterface ); EXPORT_SYMBOL_GPL( DirectUnregisterInterface ); EXPORT_SYMBOL_GPL( direct_initialize ); EXPORT_SYMBOL_GPL( direct_shutdown ); EXPORT_SYMBOL_GPL( direct_clock_get_abs_micros ); EXPORT_SYMBOL_GPL( direct_clock_get_abs_millis ); EXPORT_SYMBOL_GPL( direct_clock_get_micros ); EXPORT_SYMBOL_GPL( direct_clock_get_millis ); EXPORT_SYMBOL_GPL( direct_clock_get_time ); EXPORT_SYMBOL_GPL( direct_clock_resolution ); EXPORT_SYMBOL_GPL( direct_clock_set_time ); EXPORT_SYMBOL_GPL( direct_cleanup_handler_add ); EXPORT_SYMBOL_GPL( direct_cleanup_handler_remove ); EXPORT_SYMBOL_GPL( direct_config ); EXPORT_SYMBOL_GPL( direct_config_set ); #if DIRECT_BUILD_DEBUGS EXPORT_SYMBOL_GPL( direct_assertion ); EXPORT_SYMBOL_GPL( direct_assumption ); EXPORT_SYMBOL_GPL( direct_debug_log ); EXPORT_SYMBOL_GPL( direct_debug_at ); EXPORT_SYMBOL_GPL( direct_debug_at_always ); EXPORT_SYMBOL_GPL( direct_dbg_calloc ); EXPORT_SYMBOL_GPL( direct_dbg_malloc ); EXPORT_SYMBOL_GPL( direct_dbg_realloc ); EXPORT_SYMBOL_GPL( direct_dbg_strdup ); EXPORT_SYMBOL_GPL( direct_dbg_free ); EXPORT_SYMBOL_GPL( direct_dbg_interface_add ); EXPORT_SYMBOL_GPL( direct_dbg_interface_remove ); #endif //EXPORT_SYMBOL_GPL( direct_break ); EXPORT_SYMBOL_GPL( direct_print_interface_leaks ); EXPORT_SYMBOL_GPL( direct_print_memcpy_routines ); EXPORT_SYMBOL_GPL( direct_print_memleaks ); EXPORT_SYMBOL_GPL( direct_calloc ); EXPORT_SYMBOL_GPL( direct_malloc ); EXPORT_SYMBOL_GPL( direct_realloc ); EXPORT_SYMBOL_GPL( direct_strdup ); EXPORT_SYMBOL_GPL( direct_free ); EXPORT_SYMBOL_GPL( direct_open ); EXPORT_SYMBOL_GPL( direct_read ); EXPORT_SYMBOL_GPL( direct_write ); EXPORT_SYMBOL_GPL( direct_close ); EXPORT_SYMBOL_GPL( direct_futex ); EXPORT_SYMBOL_GPL( direct_futex_wait ); EXPORT_SYMBOL_GPL( direct_futex_wait_timed ); EXPORT_SYMBOL_GPL( direct_futex_wake ); EXPORT_SYMBOL_GPL( direct_getpid ); EXPORT_SYMBOL_GPL( direct_gettid ); EXPORT_SYMBOL_GPL( direct_sigaction ); EXPORT_SYMBOL_GPL( direct_page_align ); EXPORT_SYMBOL_GPL( direct_pagesize ); EXPORT_SYMBOL_GPL( direct_tgkill ); EXPORT_SYMBOL_GPL( direct_trap ); EXPORT_SYMBOL_GPL( direct_fifo_init ); EXPORT_SYMBOL_GPL( direct_fifo_destroy ); EXPORT_SYMBOL_GPL( direct_fifo_push ); EXPORT_SYMBOL_GPL( direct_fifo_pull ); EXPORT_SYMBOL_GPL( direct_fifo_pop ); EXPORT_SYMBOL_GPL( direct_fifo_wait ); EXPORT_SYMBOL_GPL( direct_fifo_wait_timed ); EXPORT_SYMBOL_GPL( direct_fifo_wakeup ); EXPORT_SYMBOL_GPL( direct_hash_create ); EXPORT_SYMBOL_GPL( direct_hash_init ); EXPORT_SYMBOL_GPL( direct_hash_deinit ); EXPORT_SYMBOL_GPL( direct_hash_destroy ); EXPORT_SYMBOL_GPL( direct_hash_insert ); EXPORT_SYMBOL_GPL( direct_hash_remove ); EXPORT_SYMBOL_GPL( direct_hash_lookup ); EXPORT_SYMBOL_GPL( direct_hash_count ); EXPORT_SYMBOL_GPL( direct_hash_iterate ); EXPORT_SYMBOL_GPL( direct_log_domain_configure ); EXPORT_SYMBOL_GPL( direct_log_domain_log ); EXPORT_SYMBOL_GPL( direct_log_domain_vprintf ); EXPORT_SYMBOL_GPL( direct_log_create ); EXPORT_SYMBOL_GPL( direct_log_default ); EXPORT_SYMBOL_GPL( direct_log_deinit ); EXPORT_SYMBOL_GPL( direct_log_destroy ); EXPORT_SYMBOL_GPL( direct_log_flush ); EXPORT_SYMBOL_GPL( direct_log_init ); EXPORT_SYMBOL_GPL( direct_log_lock ); EXPORT_SYMBOL_GPL( direct_log_printf ); EXPORT_SYMBOL_GPL( direct_log_set_buffer ); EXPORT_SYMBOL_GPL( direct_log_set_default ); EXPORT_SYMBOL_GPL( direct_log_unlock ); EXPORT_SYMBOL_GPL( direct_memcpy ); EXPORT_SYMBOL_GPL( direct_messages_bug ); EXPORT_SYMBOL_GPL( direct_messages_derror ); EXPORT_SYMBOL_GPL( direct_messages_dlerror ); EXPORT_SYMBOL_GPL( direct_messages_error ); EXPORT_SYMBOL_GPL( direct_messages_info ); EXPORT_SYMBOL_GPL( direct_messages_once ); EXPORT_SYMBOL_GPL( direct_messages_perror ); EXPORT_SYMBOL_GPL( direct_messages_unimplemented ); EXPORT_SYMBOL_GPL( direct_messages_warn ); EXPORT_SYMBOL_GPL( direct_processor_allocate ); EXPORT_SYMBOL_GPL( direct_processor_destroy ); EXPORT_SYMBOL_GPL( direct_processor_init ); EXPORT_SYMBOL_GPL( direct_processor_post ); EXPORT_SYMBOL_GPL( direct_processor_recycle ); EXPORT_SYMBOL_GPL( direct_serial_notify ); EXPORT_SYMBOL_GPL( direct_serial_wait ); EXPORT_SYMBOL_GPL( direct_signal_handler_add ); EXPORT_SYMBOL_GPL( direct_signal_handler_remove ); EXPORT_SYMBOL_GPL( direct_signals_block_all ); EXPORT_SYMBOL_GPL( direct_signals_initialize ); EXPORT_SYMBOL_GPL( direct_signals_shutdown ); EXPORT_SYMBOL_GPL( direct_thread_add_init_handler ); EXPORT_SYMBOL_GPL( direct_thread_cancel ); EXPORT_SYMBOL_GPL( direct_thread_create ); EXPORT_SYMBOL_GPL( direct_thread_deinit ); EXPORT_SYMBOL_GPL( direct_thread_destroy ); EXPORT_SYMBOL_GPL( direct_thread_detach ); EXPORT_SYMBOL_GPL( direct_thread_init ); EXPORT_SYMBOL_GPL( direct_thread_join ); EXPORT_SYMBOL_GPL( direct_thread_lock ); EXPORT_SYMBOL_GPL( direct_thread_notify ); EXPORT_SYMBOL_GPL( direct_thread_policy_name ); EXPORT_SYMBOL_GPL( direct_thread_remove_init_handler ); EXPORT_SYMBOL_GPL( direct_thread_scheduler_name ); EXPORT_SYMBOL_GPL( direct_thread_self ); EXPORT_SYMBOL_GPL( direct_thread_self_name ); EXPORT_SYMBOL_GPL( direct_thread_set_name ); EXPORT_SYMBOL_GPL( direct_thread_terminate ); EXPORT_SYMBOL_GPL( direct_thread_testcancel ); EXPORT_SYMBOL_GPL( direct_thread_type_name ); EXPORT_SYMBOL_GPL( direct_thread_unlock ); EXPORT_SYMBOL_GPL( direct_thread_wait ); EXPORT_SYMBOL_GPL( direct_trace_copy_buffer ); EXPORT_SYMBOL_GPL( direct_trace_debug_indent ); EXPORT_SYMBOL_GPL( direct_trace_free_buffer ); EXPORT_SYMBOL_GPL( direct_trace_lookup_file ); EXPORT_SYMBOL_GPL( direct_trace_lookup_symbol ); EXPORT_SYMBOL_GPL( direct_trace_print_stack ); EXPORT_SYMBOL_GPL( direct_trace_print_stacks ); EXPORT_SYMBOL_GPL( direct_tree_new ); EXPORT_SYMBOL_GPL( direct_tree_destroy ); EXPORT_SYMBOL_GPL( direct_tree_insert ); EXPORT_SYMBOL_GPL( direct_tree_lookup ); EXPORT_SYMBOL_GPL( direct_base64_decode ); EXPORT_SYMBOL_GPL( direct_base64_encode ); EXPORT_SYMBOL_GPL( direct_md5_sum ); EXPORT_SYMBOL_GPL( direct_trim ); EXPORT_SYMBOL_GPL( direct_try_open ); EXPORT_SYMBOL_GPL( direct_snprintf ); EXPORT_SYMBOL_GPL( direct_snputs ); EXPORT_SYMBOL_GPL( direct_sscanf ); EXPORT_SYMBOL_GPL( direct_strcasecmp ); EXPORT_SYMBOL_GPL( direct_strcmp ); EXPORT_SYMBOL_GPL( direct_strerror ); EXPORT_SYMBOL_GPL( direct_strlen ); EXPORT_SYMBOL_GPL( direct_strncasecmp ); EXPORT_SYMBOL_GPL( direct_strtok_r ); EXPORT_SYMBOL_GPL( direct_strtoul ); EXPORT_SYMBOL_GPL( direct_vsnprintf ); EXPORT_SYMBOL_GPL( direct_vsscanf ); EXPORT_SYMBOL_GPL( errno2result ); EXPORT_SYMBOL_GPL( __divdi3 ); EXPORT_SYMBOL_GPL( __moddi3 ); EXPORT_SYMBOL_GPL( __qdivrem ); EXPORT_SYMBOL_GPL( __udivdi3 ); EXPORT_SYMBOL_GPL( __umoddi3 ); DirectFB-1.7.7/lib/direct/print.h0000644000175000017500000000604412254435330013423 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__PRINT_H__ #define __DIRECT__PRINT_H__ #include /**********************************************************************************************************************/ // TODO: Add registration for format codes in strings to have ToString() via printf! /**********************************************************************************************************************/ int DIRECT_API direct_vsnprintf( char *buf, size_t size, const char *format, va_list args ); int DIRECT_API direct_snprintf ( char *buf, size_t size, const char *format, ... ) D_FORMAT_PRINTF(3); DirectResult DIRECT_API direct_print( char *buf, size_t size, const char *format, va_list args, char **ret_ptr ); /* char *out, buf[ FUSION_ENTRY_INFO_NAME_LENGTH ]; D_PRINT_BUF( buf, "CoreFusionZone == " CORE_UUID_FORMAT " ==", CORE_UUID_VALS( &zone->zone.zone_id ), out ); fusion_shm_pool_create( world, out, 0x10000000, true, &zone->shmpool ); D_PRINT_FREE( out, buf ); */ #define D_PRINT_BUF( _buf, _format, _args, _out ) \ direct_print( _buf, sizeof(_buf), _format, _args, &(_out) ) #define D_PRINT_ALLOC( _format, _args, _out ) \ direct_print( NULL, 0, _format, _args, &(_out) ) #define D_PRINT_FREE( _out, _buf ) \ do { \ if ((_out) != (_buf)) \ direct_free( _out ); \ } while (0) #endif DirectFB-1.7.7/lib/direct/utf8.h0000644000175000017500000000475212254435330013161 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . UTF8 routines ported from glib-2.0 and optimized This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__UTF8_H__ #define __DIRECT__UTF8_H__ #include #define DIRECT_UTF8_SKIP(c) (((u8)(c) < 0xc0) ? 1 : __direct_utf8_skip[(u8)(c)&0x3f]) #define DIRECT_UTF8_GET_CHAR(p) (*(const u8*)(p) < 0xc0 ? \ *(const u8*)(p) : __direct_utf8_get_char((const u8*)(p))) /* * Actually the last two fields used to be zero since they indicate an * invalid UTF-8 string. Changed it to 1 to avoid endless looping on * invalid input. */ static const char __direct_utf8_skip[64] = { 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1 }; static __inline__ unichar __direct_utf8_get_char( const u8 *p ) { int len; register unichar result = p[0]; if (result < 0xc0) return result; if (result > 0xfd) return (unichar) -1; len = __direct_utf8_skip[result & 0x3f]; result &= 0x7c >> len; while (--len) { int c = *(++p); if ((c & 0xc0) != 0x80) return (unichar) -1; result = (result << 6) | (c & 0x3f); } return result; } #endif DirectFB-1.7.7/lib/direct/memcpy.c0000644000175000017500000001633512254435330013560 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . Fast memcpy code was taken from xine (see below). This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #if defined (ARCH_PPC) || defined (ARCH_ARM) || (SIZEOF_LONG == 8) # define RUN_BENCHMARK 1 #else # define RUN_BENCHMARK 0 #endif #if RUN_BENCHMARK D_LOG_DOMAIN( Direct_Memcpy, "Direct/Memcpy", "Direct's Memcpy Routines" ); #endif #ifdef USE_PPCASM #include "ppcasm_memcpy.h" #endif #if defined(USE_ARMASM) && !defined(WORDS_BIGENDIAN) #include "armasm_memcpy.h" #endif #if SIZEOF_LONG == 8 static void * generic64_memcpy( void * to, const void * from, size_t len ) { register u8 *d = (u8*)to; register const u8 *s = (const u8*)from; size_t n; if (len >= 128) { unsigned long delta; /* Align destination to 8-byte boundary */ delta = (unsigned long)d & 7; if (delta) { len -= 8 - delta; if ((unsigned long)d & 1) { *d++ = *s++; } if ((unsigned long)d & 2) { *((u16*)d) = *((const u16*)s); d += 2; s += 2; } if ((unsigned long)d & 4) { *((u32*)d) = *((const u32*)s); d += 4; s += 4; } } n = len >> 6; len &= 63; for (; n; n--) { ((u64*)d)[0] = ((const u64*)s)[0]; ((u64*)d)[1] = ((const u64*)s)[1]; ((u64*)d)[2] = ((const u64*)s)[2]; ((u64*)d)[3] = ((const u64*)s)[3]; ((u64*)d)[4] = ((const u64*)s)[4]; ((u64*)d)[5] = ((const u64*)s)[5]; ((u64*)d)[6] = ((const u64*)s)[6]; ((u64*)d)[7] = ((const u64*)s)[7]; d += 64; s += 64; } } /* * Now do the tail of the block */ if (len) { n = len >> 3; for (; n; n--) { *((u64*)d) = *((const u64*)s); d += 8; s += 8; } if (len & 4) { *((u32*)d) = *((const u32*)s); d += 4; s += 4; } if (len & 2) { *((u16*)d) = *((const u16*)s); d += 2; s += 2; } if (len & 1) *d = *s; } return to; } #endif /* SIZEOF_LONG == 8 */ typedef void* (*memcpy_func)(void *to, const void *from, size_t len); static void * std_memcpy( void *to, const void *from, size_t len ) { return memcpy( to, from, len ); } static struct { char *name; char *desc; memcpy_func function; unsigned long long time; u32 cpu_require; } memcpy_method[] = { { NULL, NULL, NULL, 0, 0}, { "libc", "libc memcpy()", std_memcpy, 0, 0}, #if SIZEOF_LONG == 8 { "generic64","Generic 64bit memcpy()", generic64_memcpy, 0, 0}, #endif /* SIZEOF_LONG == 8 */ #ifdef USE_PPCASM { "ppc", "ppcasm_memcpy()", direct_ppcasm_memcpy, 0, 0}, #ifdef __LINUX__ { "ppccache", "ppcasm_cacheable_memcpy()", direct_ppcasm_cacheable_memcpy, 0, 0}, #endif /* __LINUX__ */ #endif /* USE_PPCASM */ #if defined(USE_ARMASM) && !defined(WORDS_BIGENDIAN) { "arm", "armasm_memcpy()", direct_armasm_memcpy, 0, 0}, #endif { NULL, NULL, NULL, 0, 0} }; memcpy_func direct_memcpy = std_memcpy; #define BUFSIZE 1024 void direct_find_best_memcpy( void ) { /* Save library size and startup time on platforms without a special memcpy() implementation. */ #if RUN_BENCHMARK unsigned long long t; char *buf1, *buf2; int i, j, best = 0; u32 config_flags = 0; if (direct_config->memcpy) { for (i=1; memcpy_method[i].name; i++) { if (!strcmp( direct_config->memcpy, memcpy_method[i].name )) { if (memcpy_method[i].cpu_require & ~config_flags) break; direct_memcpy = memcpy_method[i].function; D_INFO( "Direct/Memcpy: Forced to use %s\n", memcpy_method[i].desc ); return; } } } if (!(buf1 = D_MALLOC( BUFSIZE * 500 ))) return; if (!(buf2 = D_MALLOC( BUFSIZE * 500 ))) { D_FREE( buf1 ); return; } D_DEBUG_AT( Direct_Memcpy, "Benchmarking memcpy methods (smaller is better):\n"); /* make sure buffers are present on physical memory */ memcpy( buf1, buf2, BUFSIZE * 500 ); memcpy( buf2, buf1, BUFSIZE * 500 ); for (i=1; memcpy_method[i].name; i++) { if (memcpy_method[i].cpu_require & ~config_flags) continue; t = direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ); for (j=0; j<500; j++) memcpy_method[i].function( buf1 + j*BUFSIZE, buf2 + j*BUFSIZE, BUFSIZE ); t = direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ) - t; memcpy_method[i].time = t; D_DEBUG_AT( Direct_Memcpy, "\t%-10s %20lld\n", memcpy_method[i].name, t ); if (best == 0 || t < memcpy_method[best].time) best = i; } if (best) { direct_memcpy = memcpy_method[best].function; D_INFO( "Direct/Memcpy: Using %s\n", memcpy_method[best].desc ); } D_FREE( buf1 ); D_FREE( buf2 ); #endif } void direct_print_memcpy_routines( void ) { int i; u32 config_flags = 0; direct_log_printf( NULL, "\nPossible values for memcpy option are:\n\n" ); for (i=1; memcpy_method[i].name; i++) { bool unsupported = (memcpy_method[i].cpu_require & ~config_flags); direct_log_printf( NULL, " %-10s %-27s %s\n", memcpy_method[i].name, memcpy_method[i].desc, unsupported ? "" : "supported" ); } direct_log_printf( NULL, "\n" ); } DirectFB-1.7.7/lib/direct/result.c0000644000175000017500000001223512254435330013577 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include D_LOG_DOMAIN( Direct_Result, "Direct/Result", "Direct Result Types" ); /**********************************************************************************************************************/ static DirectHash result_types = DIRECT_HASH_INIT( 7, true ); static DirectMutex result_mutex; void __D_result_init() { direct_mutex_init( &result_mutex ); } void __D_result_deinit() { direct_mutex_deinit( &result_mutex ); } /**********************************************************************************************************************/ DirectResult DirectResultTypeRegister( DirectResultType *type ) { DirectResult ret; D_DEBUG_AT( Direct_Result, "%s( %p )\n", __FUNCTION__, type ); D_ASSERT( type != NULL ); D_DEBUG_AT( Direct_Result, " -> refs %d\n", type->refs ); D_DEBUG_AT( Direct_Result, " -> base 0x%08x\n", type->base ); D_DEBUG_AT( Direct_Result, " -> strings %p\n", type->result_strings ); D_DEBUG_AT( Direct_Result, " -> count %u\n", type->result_count ); D_ASSERT( type->result_count > 0 ); D_ASSERT( type->result_count <= D_RESULT_TYPE_SPACE ); D_DEBUG_AT( Direct_Result, " => %s\n", type->result_strings[0] ); ret = direct_mutex_lock( &result_mutex ); if (ret) return ret; if (direct_hash_lookup( &result_types, type->base )) { D_ASSERT( direct_hash_lookup( &result_types, type->base ) == type ); D_MAGIC_ASSERT( type, DirectResultType ); D_ASSERT( type->refs > 0 ); type->refs++; } else { D_ASSERT( type->refs == 0 ); D_MAGIC_SET( type, DirectResultType ); ret = direct_hash_insert( &result_types, type->base, (void*) type ); if (ret) D_MAGIC_CLEAR( type ); else type->refs = 1; } direct_mutex_unlock( &result_mutex ); return ret; } DirectResult DirectResultTypeUnregister( DirectResultType *type ) { DirectResult ret; D_DEBUG_AT( Direct_Result, "%s( %p )\n", __FUNCTION__, type ); D_MAGIC_ASSERT( type, DirectResultType ); D_DEBUG_AT( Direct_Result, " -> refs %d\n", type->refs ); D_DEBUG_AT( Direct_Result, " -> base 0x%08x\n", type->base ); D_DEBUG_AT( Direct_Result, " -> strings %p\n", type->result_strings ); D_DEBUG_AT( Direct_Result, " -> count %u\n", type->result_count ); D_ASSERT( type->result_count > 0 ); D_ASSERT( type->result_count <= D_RESULT_TYPE_SPACE ); D_DEBUG_AT( Direct_Result, " => %s\n", type->result_strings[0] ); ret = direct_mutex_lock( &result_mutex ); if (ret) return ret; D_ASSERT( type->refs > 0 ); D_ASSERT( direct_hash_lookup( &result_types, type->base ) == type ); if (! --(type->refs)) { D_MAGIC_CLEAR( type ); ret = direct_hash_remove( &result_types, type->base ); } direct_mutex_unlock( &result_mutex ); return ret; } /**********************************************************************************************************************/ const char * DirectResultString( DirectResult result ) { DirectResult ret; DirectResultType *type; if (result) { ret = direct_mutex_lock( &result_mutex ); if (ret) return NULL; type = direct_hash_lookup( &result_types, D_RESULT_TYPE( result ) ); direct_mutex_unlock( &result_mutex ); if (type) { unsigned int index = D_RESULT_INDEX( result ); D_MAGIC_ASSERT( type, DirectResultType ); D_ASSERT( type->refs > 0 ); if (index < type->result_count) return type->result_strings[index]; return type->result_strings[0]; } return "UNKNOWN RESULT TYPE"; } return "OK"; } DirectFB-1.7.7/lib/direct/tree.h0000644000175000017500000000413512254435330013225 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . Balanced binary tree ported from glib by Sven Neumann This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__TREE_H__ #define __DIRECT__TREE_H__ #include typedef struct __D_DirectNode DirectNode; struct __D_DirectTree { DirectNode *root; void *fast_keys[128]; }; struct __D_DirectNode { int balance; DirectNode *left; DirectNode *right; void *key; void *value; }; DirectTree DIRECT_API *direct_tree_new ( void ); void DIRECT_API direct_tree_destroy( DirectTree *tree ); void DIRECT_API direct_tree_insert ( DirectTree *tree, void *key, void *value ); void DIRECT_API *direct_tree_lookup ( DirectTree *tree, void *key ); #endif DirectFB-1.7.7/lib/direct/modules.h0000644000175000017500000000600112254435330013730 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__MODULES_H__ #define __DIRECT__MODULES_H__ #include #include #include struct __D_DirectModuleEntry { DirectLink link; int magic; DirectModuleDir *directory; bool loaded; bool dynamic; bool disabled; char *name; const void *funcs; int refs; char *file; void *handle; }; struct __D_DirectModuleDir { const char *path; unsigned int abi_version; DirectLink *entries; DirectModuleEntry *loading; }; #define DECLARE_MODULE_DIRECTORY(d) \ extern DirectModuleDir d #define DEFINE_MODULE_DIRECTORY(d,p,n) \ DirectModuleDir d = { \ /*.path =*/ p, \ /*.abi_version =*/ n, \ /*.entries =*/ NULL, \ /*.loading =*/ NULL, \ } int DIRECT_API direct_modules_explore_directory( DirectModuleDir *directory ); void DIRECT_API direct_modules_register( DirectModuleDir *directory, unsigned int abi_version, const char *name, const void *funcs ); void DIRECT_API direct_modules_unregister( DirectModuleDir *directory, const char *name ); const void DIRECT_API *direct_module_ref ( DirectModuleEntry *module ); void DIRECT_API direct_module_unref( DirectModuleEntry *module ); #endif DirectFB-1.7.7/lib/direct/result.h0000644000175000017500000002010312254435330013575 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__RESULT_H__ #define __DIRECT__RESULT_H__ #include /**********************************************************************************************************************/ #define D_RESULT_TYPE_CHAR_MASK ((unsigned int) 0x2F) #define D_RESULT_TYPE_CHAR_MIN ((unsigned int) 0x30) #define D_RESULT_TYPE_CHAR_MAX (D_RESULT_TYPE_CHAR_MIN + D_RESULT_TYPE_CHAR_MASK) #define D_RESULT_TYPE_CHAR_MUL_0 ((unsigned int) 1) #define D_RESULT_TYPE_CHAR_MUL_1 ((unsigned int)(D_RESULT_TYPE_CHAR_MASK + 1)) #define D_RESULT_TYPE_CHAR_MUL_2 (D_RESULT_TYPE_CHAR_MUL_1 * D_RESULT_TYPE_CHAR_MUL_1) #define D_RESULT_TYPE_CHAR_MUL_3 (D_RESULT_TYPE_CHAR_MUL_1 * D_RESULT_TYPE_CHAR_MUL_2) #define D_RESULT_TYPE_CHAR( C ) (((unsigned int)(C) - D_RESULT_TYPE_CHAR_MIN) & D_RESULT_TYPE_CHAR_MASK) #define D_RESULT_TYPE_SPACE ((unsigned int)(0xFFFFFFFF / (D_RESULT_TYPE_CHAR_MASK * D_RESULT_TYPE_CHAR_MUL_3 + \ D_RESULT_TYPE_CHAR_MASK * D_RESULT_TYPE_CHAR_MUL_2 + \ D_RESULT_TYPE_CHAR_MASK * D_RESULT_TYPE_CHAR_MUL_1 + \ D_RESULT_TYPE_CHAR_MASK * D_RESULT_TYPE_CHAR_MUL_0) - 1)) /**********************************************************************************************************************/ #ifndef DIRECT_DISABLE_DEPRECATED // @deprecated #define D_RESULT_TYPE_BASE( a,b,c ) \ D_RESULT_TYPE_CODE_BASE( '@', a,b,c ) // @deprecated #define D_RESULT_TYPE_MAX( a,b,c ) \ (D_RESULT_TYPE_BASE( a,b,c ) + D_RESULT_TYPE_SPACE - 1) // @deprecated #define D_RESULT_TYPE_IS( code, a,b,c ) \ ((code) >= D_RESULT_TYPE_BASE(a,b,c) && (code) <= D_RESULT_TYPE_MAX(a,b,c)) #endif /* * Generate result code base for API ('A','B','C','D'), e.g. ('C','O','R','E') * * Allowed are ASCII values between (inclusive) * D_RESULT_TYPE_CHAR_MIN (0x30) and * D_RESULT_TYPE_CHAR_MAX (0x5F) * * * 0 1 2 3 4 5 6 7 8 9 : ; < = > ? * * @ A B C D E F G H I J K L M N O * * P Q R S T U V W X Y Z [ \ ] ^ _ * */ #define D_RESULT_TYPE_CODE_BASE(a,b,c,d) ((D_RESULT_TYPE_CHAR( a ) * (D_RESULT_TYPE_CHAR_MUL_3) + \ D_RESULT_TYPE_CHAR( b ) * (D_RESULT_TYPE_CHAR_MUL_2) + \ D_RESULT_TYPE_CHAR( c ) * (D_RESULT_TYPE_CHAR_MUL_1) + \ D_RESULT_TYPE_CHAR( d ) * (D_RESULT_TYPE_CHAR_MUL_0)) * \ D_RESULT_TYPE_SPACE) #define D_RESULT_TYPE(code) ((code) - ((code) % D_RESULT_TYPE_SPACE)) #define D_RESULT_INDEX(code) ((code) % D_RESULT_TYPE_SPACE) /**********************************************************************************************************************/ typedef enum { DR_OK, /* No error occured */ DR__RESULT_BASE = D_RESULT_TYPE_CODE_BASE( 'D','R','_', '1' ), DR_FAILURE, /* A general or unknown error occured */ DR_INIT, /* A general initialization error occured */ DR_BUG, /* Internal bug or inconsistency has been detected */ DR_DEAD, /* Interface has a zero reference counter (available in debug mode) */ DR_UNSUPPORTED, /* The requested operation or an argument is (currently) not supported */ DR_UNIMPLEMENTED, /* The requested operation is not implemented, yet */ DR_ACCESSDENIED, /* Access to the resource is denied */ DR_INVAREA, /* An invalid area has been specified or detected */ DR_INVARG, /* An invalid argument has been specified */ DR_NOLOCALMEMORY, /* There's not enough local system memory */ DR_NOSHAREDMEMORY, /* There's not enough shared system memory */ DR_LOCKED, /* The resource is (already) locked */ DR_BUFFEREMPTY, /* The buffer is empty */ DR_FILENOTFOUND, /* The specified file has not been found */ DR_IO, /* A general I/O error occured */ DR_BUSY, /* The resource or device is busy */ DR_NOIMPL, /* No implementation for this interface or content type has been found */ DR_TIMEOUT, /* The operation timed out */ DR_THIZNULL, /* 'thiz' pointer is NULL */ DR_IDNOTFOUND, /* No resource has been found by the specified id */ DR_DESTROYED, /* The requested object has been destroyed */ DR_FUSION, /* Internal fusion error detected, most likely related to IPC resources */ DR_BUFFERTOOLARGE, /* Buffer is too large */ DR_INTERRUPTED, /* The operation has been interrupted */ DR_NOCONTEXT, /* No context available */ DR_TEMPUNAVAIL, /* Temporarily unavailable */ DR_LIMITEXCEEDED, /* Attempted to exceed limit, i.e. any kind of maximum size, count etc */ DR_NOSUCHMETHOD, /* Requested method is not known */ DR_NOSUCHINSTANCE, /* Requested instance is not known */ DR_ITEMNOTFOUND, /* No such item found */ DR_VERSIONMISMATCH, /* Some versions didn't match */ DR_EOF, /* Reached end of file */ DR_SUSPENDED, /* The requested object is suspended */ DR_INCOMPLETE, /* The operation has been executed, but not completely */ DR_NOCORE, /* Core part not available */ DR_SIGNALLED, /* Received a signal, e.g. while waiting */ DR_TASK_NOT_FOUND, /* The corresponding task has not been found */ DR__RESULT_END } DirectResult; /**********************************************************************************************************************/ typedef struct { int magic; int refs; unsigned int base; const char **result_strings; unsigned int result_count; } DirectResultType; const char DIRECT_API *DirectResultString( DirectResult result ); DirectResult DIRECT_API DirectResultTypeRegister ( DirectResultType *type ); DirectResult DIRECT_API DirectResultTypeUnregister( DirectResultType *type ); /* * Example usage: * * static const char *FooResult__strings[] = { * "FooResult", // result type name * * "General foobar", // FOO_GENERAL_FOOBAR * "Too bar", // FOO_TOO_BAR * }; * * * Corresponding example enumeration: * * typedef enum { * FOO__RESULT_BASE = D_RESULT_TYPE_BASE( 'F','o','o' ), * * FOO_GENERAL_FOOBAR, // General foobar * FOO_TOO_BAR, // Too bar * * FOO__RESULT_END * } FooResult; */ void __D_result_init( void ); void __D_result_deinit( void ); #endif DirectFB-1.7.7/lib/direct/trace.h0000644000175000017500000000632312463500054013363 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__TRACE_H__ #define __DIRECT__TRACE_H__ #include /*********************************************************************************************************************** ** Symbols */ /* * Returns filename on success or NULL. * * Stores load address of object in 'ret_base' on success. */ const char DIRECT_API *direct_trace_lookup_file ( void *address, void **ret_base ); /* * Look up a symbol by filename and offset. * * Returns symbol name on success or NULL. */ const char DIRECT_API *direct_trace_lookup_symbol( const char *filename, long offset ); /* * Convenience function combining direct_trace_lookup_file() and direct_trace_lookup_symbol(). */ static __inline__ const char * direct_trace_lookup_symbol_at( void *address ) { void *base; const char *filename; filename = direct_trace_lookup_file( address, &base ); return direct_trace_lookup_symbol( filename, (unsigned long) address - (unsigned long) base ); } /*********************************************************************************************************************** ** Stacks */ /* * Print stack in 'buffer' or current if NULL. */ void DIRECT_API direct_trace_print_stack( DirectTraceBuffer *buffer ); /* * Print stack of each known thread. */ void DIRECT_API direct_trace_print_stacks( void ); /* * Returns indent level for debug output. */ int DIRECT_API direct_trace_debug_indent( void ); /* * Retrieve pointer to calling function if present, otherwise NULL. */ void DIRECT_API *direct_trace_get_caller( void ); /* * Create a copy of a stack in 'buffer' or of current if NULL. */ DirectTraceBuffer DIRECT_API *direct_trace_copy_buffer( DirectTraceBuffer *buffer ); /* * Free a (copied) stack buffer. */ void DIRECT_API direct_trace_free_buffer( DirectTraceBuffer *buffer ); #endif DirectFB-1.7.7/lib/direct/interface_implementation.h0000644000175000017500000001131312254435330017327 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__INTERFACE_IMPLEMENTATION_H__ #define __DIRECT__INTERFACE_IMPLEMENTATION_H__ #include static const char *GetType( void ); static const char *GetImplementation( void ); static DirectResult Allocate( void **ret_interface ); static DirectResult Deallocate( void *interface_ptr ); //static DirectResult Probe( void *ctx, ... ); //static DirectResult Construct( void *interface, ... ); static DirectInterfaceFuncs interface_funcs = { /* GetType */ GetType, /* GetImplementation */ GetImplementation, /* Allocate */ Allocate, /* Deallocate */ Deallocate, /* Probe */ (void*) Probe, //FIXME /* Construct */ (void*) Construct //FIXME }; #define DIRECT_INTERFACE_IMPLEMENTATION(type, impl) \ \ __constructor__ void type##_##impl##_ctor( void ); \ __destructor__ void type##_##impl##_dtor( void ); \ \ static const char * \ GetType( void ) \ { \ return #type; \ } \ \ static const char * \ GetImplementation( void ) \ { \ return #impl; \ } \ \ static DirectResult \ Allocate( void **ret_interface ) \ { \ DIRECT_ALLOCATE_INTERFACE( *ret_interface, type ); \ return DR_OK; \ } \ \ static DirectResult \ Deallocate( void *interface_ptr ) \ { \ DIRECT_DEALLOCATE_INTERFACE( (IAny*) (interface_ptr) ); \ return DR_OK; \ } \ \ void \ type##_##impl##_ctor( void ) \ { \ DirectRegisterInterface( &interface_funcs ); \ } \ \ void \ type##_##impl##_dtor( void ) \ { \ DirectUnregisterInterface( &interface_funcs ); \ } #endif DirectFB-1.7.7/lib/direct/fifo.c0000644000175000017500000001321212254435330013200 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include D_LOG_DOMAIN( Direct_Fifo, "Direct/Fifo", "Direct FIFO" ); /**********************************************************************************************************************/ void direct_fifo_init( DirectFifo *fifo ) { D_DEBUG_AT( Direct_Fifo, "%s( %p )\n", __FUNCTION__, fifo ); memset( fifo, 0, sizeof(DirectFifo) ); direct_mutex_init( &fifo->lock ); direct_waitqueue_init( &fifo->wq ); D_MAGIC_SET( fifo, DirectFifo ); } void direct_fifo_destroy( DirectFifo *fifo ) { D_DEBUG_AT( Direct_Fifo, "%s( %p )\n", __FUNCTION__, fifo ); D_MAGIC_ASSERT( fifo, DirectFifo ); direct_mutex_deinit( &fifo->lock ); direct_waitqueue_deinit( &fifo->wq ); D_MAGIC_CLEAR( fifo ); } /**********************************************************************************************************************/ int direct_fifo_push( DirectFifo *fifo, DirectFifoItem *item ) { D_DEBUG_AT( Direct_Fifo, "%s( %p, %p )\n", __FUNCTION__, fifo, item ); D_MAGIC_ASSERT( fifo, DirectFifo ); D_MAGIC_SET( item, DirectFifoItem ); direct_mutex_lock( &fifo->lock ); D_DEBUG_AT( Direct_Fifo, " * * * %p <--= %p\n", fifo, item ); direct_list_append( &fifo->items, &item->link ); direct_mutex_unlock( &fifo->lock ); direct_waitqueue_broadcast( &fifo->wq ); return 0; } void * direct_fifo_pull( DirectFifo *fifo ) { DirectFifoItem *tmp; D_DEBUG_AT( Direct_Fifo, "%s( %p )\n", __FUNCTION__, fifo ); D_MAGIC_ASSERT( fifo, DirectFifo ); direct_mutex_lock( &fifo->lock ); while (!fifo->items) direct_waitqueue_wait( &fifo->wq, &fifo->lock ); tmp = (DirectFifoItem*) fifo->items; direct_list_remove( &fifo->items, &tmp->link ); D_MAGIC_ASSERT( tmp, DirectFifoItem ); direct_mutex_unlock( &fifo->lock ); D_MAGIC_CLEAR( tmp ); D_DEBUG_AT( Direct_Fifo, " : : : %p [%d] =--> %p\n", fifo, 0, tmp ); return tmp; } void * direct_fifo_pop( DirectFifo *fifo ) { int index; DirectFifoItem *item; (void)index; D_DEBUG_AT( Direct_Fifo, "%s( %p )\n", __FUNCTION__, fifo ); D_MAGIC_ASSERT( fifo, DirectFifo ); if (!fifo->items) { D_DEBUG_AT( Direct_Fifo, " -> fifo->items = NULL\n" ); return NULL; } item = (DirectFifoItem*) fifo->items; D_MAGIC_ASSERT( item, DirectFifoItem ); D_MAGIC_CLEAR( item ); D_DEBUG_AT( Direct_Fifo, " # # # %p [%d] =--> %p\n", fifo, 0, item ); return item; } /**********************************************************************************************************************/ DirectResult direct_fifo_wait( DirectFifo *fifo ) { DirectResult ret = DR_OK; D_MAGIC_ASSERT( fifo, DirectFifo ); D_DEBUG_AT( Direct_Fifo, "%s( %p ) ## ## %p\n", __FUNCTION__, fifo, fifo->items ); D_SYNC_ADD( &fifo->waiting, 1 ); while (!fifo->items) { if (fifo->wake) { D_DEBUG_AT( Direct_Fifo, " ### ### WAKE UP ### ###\n" ); fifo->wake = false; break; } //ret = direct_futex_wait( &fifo->count, 0 ); ret = direct_futex_wait( &fifo->waiting, 1 ); if (ret) break; } D_SYNC_ADD( &fifo->waiting, -1 ); return ret; } DirectResult direct_fifo_wait_timed( DirectFifo *fifo, int timeout_ms ) { DirectResult ret = DR_OK; D_MAGIC_ASSERT( fifo, DirectFifo ); D_DEBUG_AT( Direct_Fifo, "%s( %p ) ## ## %p\n", __FUNCTION__, fifo, fifo->items ); D_SYNC_ADD( &fifo->waiting, 1 ); while (!fifo->items) { if (fifo->wake) { D_DEBUG_AT( Direct_Fifo, " ### ### WAKE UP ### ###\n" ); fifo->wake = false; break; } //ret = direct_futex_wait_timed( &fifo->count, 0, timeout_ms ); ret = direct_futex_wait_timed( &fifo->waiting, 1, timeout_ms ); if (ret) break; } D_SYNC_ADD( &fifo->waiting, -1 ); return ret; } DirectResult direct_fifo_wakeup( DirectFifo *fifo ) { D_DEBUG_AT( Direct_Fifo, " # # # # WAKE UP # # # #\n" ); D_MAGIC_ASSERT( fifo, DirectFifo ); fifo->wake = true; return direct_futex_wake( &fifo->waiting, 1 ); } DirectFB-1.7.7/lib/direct/debug.c0000644000175000017500000001224512254435330013350 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include /**********************************************************************************************************************/ #if DIRECT_BUILD_TEXT #if DIRECT_BUILD_DEBUGS /* Build with debug support? */ __dfb_no_instrument_function__ void direct_debug_log( DirectLogDomain *domain, unsigned int debug_level, /* 1-9, 0 = info */ const char *format, ... ) { va_list ap; debug_level += DIRECT_LOG_DEBUG_0; va_start( ap, format ); direct_log_domain_vprintf( domain, debug_level > DIRECT_LOG_DEBUG_9 ? DIRECT_LOG_DEBUG_9 : debug_level, format, ap ); va_end( ap ); } __dfb_no_instrument_function__ void direct_debug_at( DirectLogDomain *domain, const char *format, ... ) { va_list ap; va_start( ap, format ); direct_log_domain_vprintf( domain, DIRECT_LOG_DEBUG, format, ap ); va_end( ap ); } #endif /* DIRECT_BUILD_DEBUGS */ __dfb_no_instrument_function__ void direct_debug_at_always( DirectLogDomain *domain, const char *format, ... ) { if (direct_config->log_level >= DIRECT_LOG_DEBUG) { va_list ap; va_start( ap, format ); direct_log_domain_vprintf( domain, DIRECT_LOG_NONE, format, ap ); va_end( ap ); } } #if DIRECT_BUILD_DEBUGS /* Build with debug support? */ __dfb_no_instrument_function__ void direct_break( const char *func, const char *file, int line, const char *format, ... ) { char buf[512]; long long millis = direct_clock_get_millis(); const char *name = direct_thread_self_name(); va_list ap; va_start( ap, format ); direct_vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); direct_log_printf( NULL, "(!) [%-15s %3lld.%03lld] (%5d) *** Break [%s] *** [%s:%d in %s()]\n", name ? name : " NO NAME ", millis / 1000LL, millis % 1000LL, direct_gettid(), buf, file, line, func ); direct_trace_print_stack( NULL ); if (direct_config->fatal_break) direct_trap( "Break", SIGABRT ); } __dfb_no_instrument_function__ void direct_assertion( const char *exp, const char *func, const char *file, int line ) { long long millis = direct_clock_get_millis(); const char *name = direct_thread_self_name(); direct_log_printf( NULL, "(!) [%-15s %3lld.%03lld] (%5d) *** Assertion [%s] failed *** [%s:%d in %s()]\n", name ? name : " NO NAME ", millis / 1000LL, millis % 1000LL, direct_gettid(), exp, file, line, func ); direct_trace_print_stack( NULL ); if (direct_config->fatal >= DCFL_ASSERT) direct_trap( "Assertion", SIGTRAP ); } __dfb_no_instrument_function__ void direct_assumption( const char *exp, const char *func, const char *file, int line ) { long long millis = direct_clock_get_millis(); const char *name = direct_thread_self_name(); direct_log_printf( NULL, "(!) [%-15s %3lld.%03lld] (%5d) *** Assumption [%s] failed *** [%s:%d in %s()]\n", name ? name : " NO NAME ", millis / 1000LL, millis % 1000LL, direct_gettid(), exp, file, line, func ); direct_trace_print_stack( NULL ); if (direct_config->fatal >= DCFL_ASSUME) direct_trap( "Assumption", SIGTRAP ); } #endif /* DIRECT_BUILD_DEBUGS */ #endif /* DIRECT_BUILD_TEXT */ DirectFB-1.7.7/lib/direct/flz.h0000644000175000017500000000675612171403127013071 00000000000000/* FastLZ - lightning-fast lossless compression library Copyright (C) 2007 Ariya Hidayat (ariya@kde.org) Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) Copyright (C) 2005 Ariya Hidayat (ariya@kde.org) 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef FASTLZ_H #define FASTLZ_H #define FASTLZ_VERSION 0x000100 #define FASTLZ_VERSION_MAJOR 0 #define FASTLZ_VERSION_MINOR 0 #define FASTLZ_VERSION_REVISION 0 #define FASTLZ_VERSION_STRING "0.1.0" #if defined (__cplusplus) extern "C" { #endif /** Compress a block of data in the input buffer and returns the size of compressed block. The size of input buffer is specified by length. The minimum input buffer size is 16. The output buffer must be at least 5% larger than the input buffer and can not be smaller than 66 bytes. If the input is not compressible, the return value might be larger than length (input buffer size). The input buffer and the output buffer can not overlap. */ int fastlz_compress(const void* input, int length, void* output); /** Decompress a block of compressed data and returns the size of the decompressed block. If error occurs, e.g. the compressed data is corrupted or the output buffer is not large enough, then 0 (zero) will be returned instead. The input buffer and the output buffer can not overlap. Decompression is memory safe and guaranteed not to write the output buffer more than what is specified in maxout. */ int fastlz_decompress(const void* input, int length, void* output, int maxout); /** Compress a block of data in the input buffer and returns the size of compressed block. The size of input buffer is specified by length. The minimum input buffer size is 16. The output buffer must be at least 5% larger than the input buffer and can not be smaller than 66 bytes. If the input is not compressible, the return value might be larger than length (input buffer size). The input buffer and the output buffer can not overlap. Compression level can be specified in parameter level. At the moment, only level 1 and level 2 are supported. Level 1 is the fastest compression and generally useful for short data. Level 2 is slightly slower but it gives better compression ratio. Note that the compressed data, regardless of the level, can always be decompressed using the function fastlz_decompress above. */ int fastlz_compress_level(int level, const void* input, int length, void* output); #if defined (__cplusplus) } #endif #endif /* FASTLZ_H */ DirectFB-1.7.7/lib/direct/interface.c0000644000175000017500000005112712254435330014224 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include D_LOG_DOMAIN( Direct_Interface, "Direct/Interface", "Direct Interface" ); /**********************************************************************************************************************/ typedef struct { DirectLink link; int magic; char *filename; void *module_handle; DirectInterfaceFuncs *funcs; const char *type; const char *implementation; int references; } DirectInterfaceImplementation; /**********************************************************************************************************************/ static DirectMutex implementations_mutex; static DirectLink *implementations; void __D_interface_init() { direct_recursive_mutex_init( &implementations_mutex ); } void __D_interface_deinit() { direct_mutex_deinit( &implementations_mutex ); } void workaround_func(void); __attribute__((noinline)) void workaround_func(void) { } static inline int probe_interface( DirectInterfaceImplementation *impl, DirectInterfaceFuncs **funcs, const char *type, const char *implementation, DirectInterfaceProbeFunc probe, void *probe_ctx ) { if (type && strcmp( type, impl->type )) return 0; if (implementation && strcmp( implementation, impl->implementation )) return 0; D_DEBUG_AT( Direct_Interface, " -> Probing '%s'...\n", impl->implementation ); if (probe && !probe( impl->funcs, probe_ctx )) return 0; *funcs = impl->funcs; impl->references++; return 1; } /**********************************************************************************************************************/ void DirectRegisterInterface( DirectInterfaceFuncs *funcs ) { DirectInterfaceImplementation *impl; D_DEBUG_AT( Direct_Interface, "%s( %p )\n", __FUNCTION__, funcs ); impl = (DirectInterfaceImplementation*) D_CALLOC( 1, sizeof(DirectInterfaceImplementation) ); D_DEBUG_AT( Direct_Interface, " -> %p\n", impl ); impl->funcs = funcs; impl->type = funcs->GetType(); impl->implementation = funcs->GetImplementation(); D_MAGIC_SET( impl, DirectInterfaceImplementation ); D_DEBUG_AT( Direct_Interface, " -> %s | %s\n", impl->type, impl->implementation ); direct_mutex_lock( &implementations_mutex ); direct_list_prepend( &implementations, &impl->link ); direct_mutex_unlock( &implementations_mutex ); } void DirectUnregisterInterface( DirectInterfaceFuncs *funcs ) { DirectInterfaceImplementation *impl; D_DEBUG_AT( Direct_Interface, "%s( %p )\n", __FUNCTION__, funcs ); direct_mutex_lock( &implementations_mutex ); direct_list_foreach (impl, implementations) { D_MAGIC_ASSERT( impl, DirectInterfaceImplementation ); if (impl->funcs == funcs) { direct_list_remove( &implementations, &impl->link ); break; } } direct_mutex_unlock( &implementations_mutex ); if (!impl) { D_BUG( "implementation not found" ); return; } D_DEBUG_AT( Direct_Interface, " -> %s | %s\n", impl->type, impl->implementation ); D_DEBUG_AT( Direct_Interface, " -> %p\n", impl ); D_MAGIC_CLEAR( impl ); D_FREE( impl ); } DirectResult DirectProbeInterface( DirectInterfaceFuncs *funcs, void *ctx ) { return (funcs->Probe( ctx ) == DR_OK); } DirectResult DirectGetInterface( DirectInterfaceFuncs **funcs, const char *type, const char *implementation, DirectInterfaceProbeFunc probe, void *probe_ctx ) { int n = 0; int idx = -1; #if DIRECT_BUILD_DYNLOAD int len; DIR *dir; char *interface_dir; struct dirent *entry = NULL; struct dirent tmp; const char *path; #endif DirectLink *link; D_DEBUG_AT( Direct_Interface, "%s( %p, '%s', '%s', %p, %p )\n", __FUNCTION__, funcs, type, implementation, probe, probe_ctx ); direct_mutex_lock( &implementations_mutex ); /* Check whether there is a default existing implementation set for the type in config */ if (type && !implementation && direct_config->default_interface_implementation_types) { while (direct_config->default_interface_implementation_types[n]) { idx = -1; while (direct_config->default_interface_implementation_types[n]) { if (!strcmp(direct_config->default_interface_implementation_types[n++], type)) { idx = n - 1; break; } } if (idx < 0 && !direct_config->default_interface_implementation_types[n]) break; /* Check whether we have to check for a default implementation for the selected type */ if (idx >= 0) { direct_list_foreach( link, implementations ) { DirectInterfaceImplementation *impl = (DirectInterfaceImplementation*) link; if (probe_interface( impl, funcs, NULL, direct_config->default_interface_implementation_names[idx], probe, probe_ctx )) { D_INFO( "Direct/Interface: Using '%s' cached default implementation of '%s'.\n", impl->implementation, impl->type ); direct_mutex_unlock( &implementations_mutex ); return DR_OK; } } } else break; } /* Check existing implementations without default. */ direct_list_foreach( link, implementations ) { DirectInterfaceImplementation *impl = (DirectInterfaceImplementation*) link; if (probe_interface( impl, funcs, type, implementation, probe, probe_ctx )) { if (impl->references == 1) { D_INFO( "Direct/Interface: Using '%s' implementation of '%s'.\n", impl->implementation, impl->type ); } direct_mutex_unlock( &implementations_mutex ); return DR_OK; } } } else { /* Check existing implementations without default. */ direct_list_foreach( link, implementations ) { DirectInterfaceImplementation *impl = (DirectInterfaceImplementation*) link; if (probe_interface( impl, funcs, type, implementation, probe, probe_ctx )) { if (impl->references == 1) { D_INFO( "Direct/Interface: Using '%s' implementation of '%s'.\n", impl->implementation, impl->type ); } direct_mutex_unlock( &implementations_mutex ); return DR_OK; } } } #if DIRECT_BUILD_DYNLOAD /* Try to load it dynamically. */ /* NULL type means we can't find plugin, so stop immediately */ if (type == NULL) { direct_mutex_unlock( &implementations_mutex ); return DR_NOIMPL; } path = direct_config->module_dir; if (!path) path = MODULEDIR; len = strlen(path) + strlen("/interfaces/") + strlen(type) + 1; interface_dir = alloca( len ); direct_snprintf( interface_dir, len, "%s%sinterfaces/%s", path, (path[strlen(path)-1]=='/') ? "" : "/", type ); dir = opendir( interface_dir ); if (!dir) { D_DEBUG_LOG( Direct_Interface, 1, "Could not open interface directory '%s'!\n", interface_dir ); direct_mutex_unlock( &implementations_mutex ); return errno2result( errno ); } if (direct_config->default_interface_implementation_types) { n = 0; while (direct_config->default_interface_implementation_types[n]) { idx = -1; while (direct_config->default_interface_implementation_types[n]) { if (!strcmp(direct_config->default_interface_implementation_types[n++], type)) { idx = n - 1; break; } } if (idx < 0 && !direct_config->default_interface_implementation_types[n]) break; /* Iterate directory. */ while (idx >= 0 && readdir_r( dir, &tmp, &entry ) == 0 && entry) { void *handle = NULL; char buf[4096]; DirectInterfaceImplementation *old_impl = (DirectInterfaceImplementation*) implementations; DirectInterfaceImplementation *impl = NULL; if (strlen(entry->d_name) < 4 || entry->d_name[strlen(entry->d_name)-1] != 'o' || entry->d_name[strlen(entry->d_name)-2] != 's') continue; direct_snprintf( buf, 4096, "%s/%s", interface_dir, entry->d_name ); /* Check if it got already loaded. */ direct_list_foreach( link, implementations ) { DirectInterfaceImplementation *test_impl = (DirectInterfaceImplementation*) link; if (test_impl->filename && !strcmp( test_impl->filename, buf )) { impl = test_impl; handle = impl->module_handle; break; } } workaround_func(); /* Open it if needed and check. */ if (!handle) { handle = dlopen( buf, RTLD_NOW ); /* Check if it registered itself. */ if (handle) { impl = (DirectInterfaceImplementation*) implementations; if (old_impl == impl) { dlclose( handle ); continue; } /* Keep filename and module handle. */ impl->filename = D_STRDUP( buf ); impl->module_handle = handle; } } if (handle) { /* check whether the dlopen'ed interface supports the required implementation */ if (!strcmp( impl->implementation, direct_config->default_interface_implementation_names[idx] )) { if (probe_interface( impl, funcs, type, direct_config->default_interface_implementation_names[idx], probe, probe_ctx )) { if (impl->references == 1) D_INFO( "Direct/Interface: Loaded '%s' implementation of '%s'.\n", impl->implementation, impl->type ); closedir( dir ); direct_mutex_unlock( &implementations_mutex ); return DR_OK; } else continue; } else continue; } else D_DLERROR( "Direct/Interface: Unable to dlopen `%s'!\n", buf ); } rewinddir( dir ); } } /* Iterate directory. */ while (readdir_r( dir, &tmp, &entry ) == 0 && entry) { void *handle = NULL; char buf[4096]; DirectInterfaceImplementation *old_impl = (DirectInterfaceImplementation*) implementations; DirectInterfaceImplementation *impl = NULL; if (strlen(entry->d_name) < 4 || entry->d_name[strlen(entry->d_name)-1] != 'o' || entry->d_name[strlen(entry->d_name)-2] != 's') continue; direct_snprintf( buf, 4096, "%s/%s", interface_dir, entry->d_name ); /* Check if it got already loaded. */ direct_list_foreach( link, implementations ) { DirectInterfaceImplementation *test_impl = (DirectInterfaceImplementation*) link; if (test_impl->filename && !strcmp( test_impl->filename, buf )) { impl = test_impl; handle = impl->module_handle; break; } } workaround_func(); // this "fixes" problems with gcc-4.6.3 on x86-64 and x86 /* Open it if needed and check. */ if (!handle) { handle = dlopen( buf, RTLD_NOW ); /* Check if it registered itself. */ if (handle) { impl = (DirectInterfaceImplementation*) implementations; if (old_impl == impl) { dlclose( handle ); continue; } /* Keep filename and module handle. */ impl->filename = D_STRDUP( buf ); impl->module_handle = handle; } } if (handle) { if (probe_interface( impl, funcs, type, implementation, probe, probe_ctx )) { if (impl->references == 1) D_INFO( "Direct/Interface: Loaded '%s' implementation of '%s'.\n", impl->implementation, impl->type ); closedir( dir ); direct_mutex_unlock( &implementations_mutex ); return DR_OK; } else continue; } else D_DLERROR( "Direct/Interface: Unable to dlopen `%s'!\n", buf ); } closedir( dir ); #endif direct_mutex_unlock( &implementations_mutex ); return DR_NOIMPL; } /**************************************************************************************************/ #if DIRECT_BUILD_DEBUGS /* Build with debug support? */ typedef struct { const void *interface_ptr; char *name; char *what; const char *func; const char *file; int line; DirectTraceBuffer *trace; } InterfaceDesc; static int alloc_count; static int alloc_capacity; static InterfaceDesc *alloc_list; static DirectMutex alloc_lock; void __D_interface_dbg_init() { direct_mutex_init( &alloc_lock ); } void __D_interface_dbg_deinit() { direct_mutex_deinit( &alloc_lock ); } /**************************************************************************************************/ void direct_print_interface_leaks() { int i; direct_mutex_lock( &alloc_lock ); if (alloc_count /*&& (!direct_config || direct_config->debug)*/) { direct_log_printf( NULL, "Interface instances remaining (%d): \n", alloc_count ); for (i=0; iname, desc->interface_ptr, desc->what, desc->func, desc->file, desc->line ); if (desc->trace) direct_trace_print_stack( desc->trace ); } } direct_mutex_unlock( &alloc_lock ); } /**************************************************************************************************/ __dfb_no_instrument_function__ static InterfaceDesc * allocate_interface_desc( void ) { int cap = alloc_capacity; if (!cap) cap = 64; else if (cap == alloc_count) cap <<= 1; if (cap != alloc_capacity) { alloc_capacity = cap; alloc_list = direct_realloc( alloc_list, sizeof(InterfaceDesc) * cap ); D_ASSERT( alloc_list != NULL ); } return &alloc_list[alloc_count++]; } __dfb_no_instrument_function__ static __inline__ void fill_interface_desc( InterfaceDesc *desc, const void *interface_ptr, const char *name, const char *func, const char *file, int line, const char *what, DirectTraceBuffer *trace ) { desc->interface_ptr = interface_ptr; desc->name = direct_strdup( name ); desc->what = direct_strdup( what ); desc->func = func; desc->file = file; desc->line = line; desc->trace = trace; } /**************************************************************************************************/ __dfb_no_instrument_function__ void direct_dbg_interface_add( const char *func, const char *file, int line, const char *what, const void *interface_ptr, const char *name ) { InterfaceDesc *desc; direct_mutex_lock( &alloc_lock ); desc = allocate_interface_desc(); fill_interface_desc( desc, interface_ptr, name, func, file, line, what, direct_trace_copy_buffer(NULL) ); direct_mutex_unlock( &alloc_lock ); } __dfb_no_instrument_function__ void direct_dbg_interface_remove( const char *func, const char *file, int line, const char *what, const void *interface_ptr ) { int i; direct_mutex_lock( &alloc_lock ); for (i=0; iinterface_ptr == interface_ptr) { if (desc->trace) direct_trace_free_buffer( desc->trace ); direct_free( desc->what ); direct_free( desc->name ); if (i < --alloc_count) direct_memmove( desc, desc + 1, (alloc_count - i) * sizeof(InterfaceDesc) ); direct_mutex_unlock( &alloc_lock ); return; } } direct_mutex_unlock( &alloc_lock ); D_ERROR( "Direct/Interface: unknown instance %p (%s) from [%s:%d in %s()]\n", interface_ptr, what, file, line, func ); D_BREAK( "unknown instance" ); } #else /* DIRECT_BUILD_DEBUG */ void __D_interface_dbg_init() { } void __D_interface_dbg_deinit() { } void direct_print_interface_leaks() { } #endif /* DIRECT_BUILD_DEBUG */ DirectFB-1.7.7/lib/direct/messages.h0000644000175000017500000002340712254435330014100 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__MESSAGES_H__ #define __DIRECT__MESSAGES_H__ #include #if DIRECT_BUILD_TEXT #include #include void DIRECT_API direct_messages_info ( const char *format, ... ) D_FORMAT_PRINTF(1); void DIRECT_API direct_messages_error ( const char *format, ... ) D_FORMAT_PRINTF(1); void DIRECT_API direct_messages_derror ( DirectResult result, const char *format, ... ) D_FORMAT_PRINTF(2); void DIRECT_API direct_messages_perror ( int erno, const char *format, ... ) D_FORMAT_PRINTF(2); void DIRECT_API direct_messages_dlerror ( const char *dlerr, const char *format, ... ) D_FORMAT_PRINTF(2); void DIRECT_API direct_messages_once ( const char *func, const char *file, int line, const char *format, ... ) D_FORMAT_PRINTF(4); void DIRECT_API direct_messages_unimplemented( const char *func, const char *file, int line ); void DIRECT_API direct_messages_bug ( const char *func, const char *file, int line, const char *format, ... ) D_FORMAT_PRINTF(4); void DIRECT_API direct_messages_warn ( const char *func, const char *file, int line, const char *format, ... ) D_FORMAT_PRINTF(4); #define D_INFO(...) do { \ if (!(direct_config->quiet & DMT_INFO)) \ direct_messages_info( __VA_ARGS__ ); \ } while (0) #define D_ERROR(...) do { \ if (!(direct_config->quiet & DMT_ERROR)) \ direct_messages_error( __VA_ARGS__ ); \ } while (0) #define D_ERROR_AT(d,...) do { \ if (!(direct_config->quiet & DMT_ERROR)) \ direct_log_domain_log( &(d), DIRECT_LOG_ERROR, \ __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__ ); \ } while (0) #define D_DERROR(r,...) do { \ if (!(direct_config->quiet & DMT_ERROR)) \ direct_messages_derror( (DirectResult) r, __VA_ARGS__ ); \ } while (0) // FIXME #define D_DERROR_AT(d,r,...) do { \ if (!(direct_config->quiet & DMT_ERROR)) \ direct_log_domain_log( &(d), DIRECT_LOG_ERROR, \ __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__ ); \ } while (0) #define D_PERROR(...) do { \ if (!(direct_config->quiet & DMT_ERROR)) \ direct_messages_perror( errno, __VA_ARGS__ ); \ } while (0) #define D_DLERROR(...) do { \ if (!(direct_config->quiet & DMT_ERROR)) \ direct_messages_dlerror( dlerror(), __VA_ARGS__ ); \ } while (0) #define D_ONCE(...) do { \ if (!(direct_config->quiet & DMT_ONCE)) { \ static bool first = true; \ if (first) { \ direct_messages_once( __FUNCTION__, \ __FILE__, __LINE__, __VA_ARGS__ ); \ first = false; \ } \ } \ } while (0) #define D_UNIMPLEMENTED() do { \ if (!(direct_config->quiet & DMT_UNIMPLEMENTED)) { \ static bool first = true; \ if (first) { \ direct_messages_unimplemented( __FUNCTION__, \ __FILE__, __LINE__ ); \ first = false; \ } \ } \ } while (0) #define D_UNTESTED() do { \ if (!(direct_config->quiet & DMT_UNIMPLEMENTED)) { \ static bool first = true; \ if (first) { \ direct_messages_unimplemented( __FUNCTION__, \ __FILE__, __LINE__ ); \ first = false; \ } \ } \ } while (0) #define D_BUG(...) do { \ if (!(direct_config->quiet & DMT_ERROR)) \ direct_messages_bug( __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__ ); \ } while (0) #define D_WARN(...) do { \ if (!(direct_config->quiet & DMT_WARNING)) \ direct_messages_warn( __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__ );\ } while (0) #define D_OOM() (direct_messages_warn( __FUNCTION__, __FILE__, __LINE__, \ "out of memory" ), DR_NOLOCALMEMORY) #else #define D_INFO(...) do { } while (0) #define D_ERROR(...) do { } while (0) #define D_DERROR(...) do { } while (0) #define D_PERROR(...) do { } while (0) #define D_DLERROR(...) do { } while (0) #define D_ONCE(...) do { } while (0) #define D_UNIMPLEMENTED() do { } while (0) #define D_BUG(...) do { } while (0) #define D_WARN(...) do { } while (0) #define D_OOM() (printf("out of memory\n"), DR_NOLOCALMEMORY) #endif #endif DirectFB-1.7.7/lib/direct/map.h0000644000175000017500000000650412254435330013045 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__MAP_H__ #define __DIRECT__MAP_H__ #include typedef bool (*DirectMapCompareFunc) ( DirectMap *map, const void *key, void *object, void *ctx ); typedef unsigned int (*DirectMapHashFunc) ( DirectMap *map, const void *key, void *ctx ); typedef DirectEnumerationResult (*DirectMapIteratorFunc)( DirectMap *map, void *object, void *ctx ); DirectResult DIRECT_API direct_map_create ( unsigned int initial_size, DirectMapCompareFunc compare_func, DirectMapHashFunc hash_func, void *ctx, DirectMap **ret_map ); void DIRECT_API direct_map_destroy( DirectMap *map ); DirectResult DIRECT_API direct_map_insert ( DirectMap *map, const void *key, void *object ); DirectResult DIRECT_API direct_map_remove ( DirectMap *map, const void *key ); void DIRECT_API *direct_map_lookup ( DirectMap *map, const void *key ); void DIRECT_API direct_map_iterate( DirectMap *map, DirectMapIteratorFunc func, void *ctx ); #endif DirectFB-1.7.7/lib/direct/Magic.h0000644000175000017500000000400612313366376013314 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 ___Direct__Magic__H___ #define ___Direct__Magic__H___ #include #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } namespace Direct { template class Magic { private: int magic; #if D_DEBUG_ENABLED public: Magic() : magic(0) { D_MAGIC_SET( this, _Entity ); // FIXME: make overall macro to avoid using "_Entity" all over the place } ~Magic() { D_MAGIC_ASSERT( this, _Entity ); D_MAGIC_CLEAR( this ); } protected: inline void CHECK_MAGIC() const { D_MAGIC_ASSERT( this, _Entity ); } #else protected: inline void CHECK_MAGIC() const { } #endif }; } #endif // __cplusplus #endif DirectFB-1.7.7/lib/direct/fastlz.h0000644000175000017500000000432112254435330013566 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__FASTLZ_H__ #define __DIRECT__FASTLZ_H__ #include /**********************************************************************************************************************/ int DIRECT_API direct_fastlz_compress ( const void *input, int length, void *output ); int DIRECT_API direct_fastlz_decompress ( const void *input, int length, void *output, int maxout ); int DIRECT_API direct_fastlz_compress_multi( const void **inputs, int *lengths, unsigned int num, void *output ); #endif DirectFB-1.7.7/lib/direct/log.h0000644000175000017500000000753712254435330013060 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__LOG_H__ #define __DIRECT__LOG_H__ #include #include /**********************************************************************************************************************/ /* * Creates a logging facility. * * For each 'type' the 'param' has a different meaning: * DLT_STDERR ignored (leave NULL) * DLT_FILE file name * DLT_UDP : */ DirectResult DIRECT_API direct_log_create ( DirectLogType type, const char *param, DirectLog **ret_log ); /* * Destroys a logging facility. */ DirectResult DIRECT_API direct_log_destroy ( DirectLog *log ); /* * Write to the log in a printf fashion. * * If log is NULL, the default log is used if it's valid, * otherwise stderr is used a fallback until now. */ DirectResult DIRECT_API direct_log_printf ( DirectLog *log, const char *format, ... ) D_FORMAT_PRINTF(2); /* * Write to the log in a plain fashion. * * If log is NULL, the default log is used if it's valid, * otherwise stderr is used a fallback until now. */ DirectResult DIRECT_API direct_log_write ( DirectLog *log, const char *buffer, size_t bytes ); /* * Set the default log that's used when no valid log is passed. */ DirectResult DIRECT_API direct_log_set_default( DirectLog *log ); /* * Locks a logging facility for non-intermixed output of multiple calls in multiple threads. Not mandatory. */ void DIRECT_API direct_log_lock ( DirectLog *log ); /* * Unlocks a logging facility. */ void DIRECT_API direct_log_unlock ( DirectLog *log ); /* * Set a buffer to be used for the log data. */ DirectResult DIRECT_API direct_log_set_buffer ( DirectLog *log, char *buffer, size_t bytes ); /* * Flush the log data and optionally synchronize with the output. */ DirectResult DIRECT_API direct_log_flush ( DirectLog *log, bool sync ); /* * Returns the default log. */ DirectLog DIRECT_API *direct_log_default( void ); #define d_printf( ... ) direct_log_printf( NULL, __VA_ARGS__ ) void __D_log_init( void ); void __D_log_deinit( void ); #endif DirectFB-1.7.7/lib/direct/direct.c0000644000175000017500000001333112463500054013527 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include D_LOG_DOMAIN( Direct_Main, "Direct/Main", "Initialization and shutdown of libdirect" ); /**************************************************************************************************/ struct __D_DirectCleanupHandler { DirectLink link; int magic; DirectCleanupHandlerFunc func; void *ctx; }; /**************************************************************************************************/ static int refs; static DirectLink *handlers; static DirectMutex main_lock; void __D_direct_init() { direct_mutex_init( &main_lock ); } void __D_direct_deinit() { direct_print_memleaks(); direct_print_interface_leaks(); direct_mutex_deinit( &main_lock ); } static void direct_atexit_handler( void ) { DirectCleanupHandler *handler, *temp; direct_list_foreach_safe (handler, temp, handlers) { D_DEBUG_AT( Direct_Main, "Calling cleanup func %p( %p )...\n", handler->func, handler->ctx ); direct_list_remove( &handlers, &handler->link ); handler->func( handler->ctx ); D_MAGIC_CLEAR( handler ); D_FREE( handler ); } } /**************************************************************************************************/ DirectResult direct_cleanup_handler_add( DirectCleanupHandlerFunc func, void *ctx, DirectCleanupHandler **ret_handler ) { DirectCleanupHandler *handler; D_ASSERT( func != NULL ); D_ASSERT( ret_handler != NULL ); D_DEBUG_AT( Direct_Main, "Adding cleanup handler %p with context %p...\n", func, ctx ); handler = (DirectCleanupHandler*) D_CALLOC( 1, sizeof(DirectCleanupHandler) ); if (!handler) { D_WARN( "out of memory" ); return DR_NOLOCALMEMORY; } handler->func = func; handler->ctx = ctx; D_MAGIC_SET( handler, DirectCleanupHandler ); direct_mutex_lock( &main_lock ); if (handlers == NULL) atexit( direct_atexit_handler ); direct_list_append( &handlers, &handler->link ); direct_mutex_unlock( &main_lock ); *ret_handler = handler; return DR_OK; } DirectResult direct_cleanup_handler_remove( DirectCleanupHandler *handler ) { D_ASSERT( handler != NULL ); D_MAGIC_ASSERT( handler, DirectCleanupHandler ); D_DEBUG_AT( Direct_Main, "Removing cleanup handler %p with context %p...\n", handler->func, handler->ctx ); /* Safety check, in case handler is removed from within itself being invoked */ if (handler->link.prev) { direct_mutex_lock( &main_lock ); direct_list_remove( &handlers, &handler->link ); direct_mutex_unlock( &main_lock ); D_MAGIC_CLEAR( handler ); D_FREE( handler ); } return DR_OK; } DirectResult direct_initialize() { direct_clock_set_time( DIRECT_CLOCK_SESSION, 0 ); direct_mutex_lock( &main_lock ); D_DEBUG_AT( Direct_Main, "direct_initialize() called... (from %s)\n", direct_trace_lookup_symbol_at( direct_trace_get_caller() ) ); if (refs++) { D_DEBUG_AT( Direct_Main, "...%d references now.\n", refs ); direct_mutex_unlock( &main_lock ); return DR_OK; } else if (!direct_thread_self_name()) direct_thread_set_name( "Main Thread" ); D_DEBUG_AT( Direct_Main, "...first reference, initializing now.\n" ); direct_signals_initialize(); direct_mutex_unlock( &main_lock ); return DR_OK; } DirectResult direct_shutdown() { direct_mutex_lock( &main_lock ); D_DEBUG_AT( Direct_Main, "direct_shutdown() called... (from %s)\n", direct_trace_lookup_symbol_at( direct_trace_get_caller() ) ); if (refs == 1) { D_DEBUG_AT( Direct_Main, "...shutting down now.\n" ); direct_signals_shutdown(); D_DEBUG_AT( Direct_Main, " -> done.\n" ); } else D_DEBUG_AT( Direct_Main, "...%d references left.\n", refs - 1 ); refs--; direct_mutex_unlock( &main_lock ); return DR_OK; } DirectFB-1.7.7/lib/direct/thread.h0000644000175000017500000001541412254435330013537 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__THREAD_H__ #define __DIRECT__THREAD_H__ #include #include #include /**********************************************************************************************************************/ typedef enum { DTT_DEFAULT = 0, DTT_CLEANUP = -5, DTT_INPUT = -10, DTT_OUTPUT = -12, DTT_MESSAGING = -15, DTT_CRITICAL = -20 } DirectThreadType; typedef void * (*DirectThreadMainFunc)( DirectThread *thread, void *arg ); typedef void (*DirectThreadInitFunc)( DirectThread *thread, void *arg ); /**********************************************************************************************************************/ struct __D_DirectThread { int magic; char *name; DirectThreadType type; /* The thread's type, e.g. input thread. */ DirectThreadMainFunc main; /* The thread's main routine (or entry point). */ void *arg; /* Custom argument passed to the main routine. */ DirectThreadHandle handle; /* The OS thread handle... */ pid_t tid; /* A simplified version using an integer */ bool canceled; /* Set when direct_thread_cancel() is called. */ bool joining; /* Set when direct_thread_join() is called. */ bool joined; /* Set when direct_thread_join() has finished. */ bool detached; /* Set when direct_thread_detach() is called. */ bool terminated; /* Set when direct_thread_terminate() is called. */ bool init; /* Set to true before the main routine is called. */ DirectMutex lock; DirectWaitQueue cond; unsigned int counter; int priority; size_t stack_size; void *trace_buffer; }; /**********************************************************************************************************************/ #define DIRECT_THREAD_ASSERT( _thread ) \ do { \ D_MAGIC_ASSERT( _thread, DirectThread ); \ D_ASSERT( (_thread)->tid != (pid_t) -1 ); \ } while (0) /**********************************************************************************************************************/ /**********************************************************************************************************************/ /* * Add a handler being called at the beginning of new threads. */ DirectThreadInitHandler DIRECT_API *direct_thread_add_init_handler ( DirectThreadInitFunc func, void *arg ); /* * Remove the specified handler. */ void DIRECT_API direct_thread_remove_init_handler( DirectThreadInitHandler *handler ); /**********************************************************************************************************************/ /**********************************************************************************************************************/ /* * Create a new thread and start it. * The thread type is relevant for the scheduling priority. */ DirectThread DIRECT_API *direct_thread_create ( DirectThreadType thread_type, DirectThreadMainFunc thread_main, void *arg, const char *name ); /* * Wait on the thread object to be notified via direct_thread_notify(). */ DirectResult DIRECT_API direct_thread_wait ( DirectThread *thread, int timeout_ms ); /* * Notify the thread object waking up callers of direct_thread_wait(). */ DirectResult DIRECT_API direct_thread_notify ( DirectThread *thread ); DirectResult DIRECT_API direct_thread_lock ( DirectThread *thread ); DirectResult DIRECT_API direct_thread_unlock ( DirectThread *thread ); /* * Kindly ask the thread to terminate (for joining without thread cancellation). */ DirectResult DIRECT_API direct_thread_terminate ( DirectThread *thread ); /* * Free resources allocated by direct_thread_create. * If the thread is still running it will be killed. */ void DIRECT_API direct_thread_destroy ( DirectThread *thread ); pid_t DIRECT_API direct_thread_get_tid ( const DirectThread *thread ); bool DIRECT_API direct_thread_is_canceled( const DirectThread *thread ); bool DIRECT_API direct_thread_is_joined ( const DirectThread *thread ); /* * Returns the name of the specified thread. */ const char *direct_thread_get_name ( DirectThread *thread ); /* * Utilities for stringification. */ #if DIRECT_BUILD_TEXT const char DIRECT_API *direct_thread_type_name ( DirectThreadType type ); const char DIRECT_API *direct_thread_scheduler_name( DirectConfigThreadScheduler scheduler ); const char DIRECT_API *direct_thread_policy_name ( int policy ); #endif void DIRECT_API __D_direct_thread_call_init_handlers( DirectThread *thread ); void __D_thread_init( void ); void __D_thread_deinit( void ); #endif DirectFB-1.7.7/lib/direct/compiler.h0000644000175000017500000000376612254435330014111 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__COMPILER_H__ #define __DIRECT__COMPILER_H__ #include #include /**********************************************************************************************************************/ #if __GNUC__ >= 3 #define D_CONST_FUNC __attribute__((const)) #define D_FORMAT_PRINTF(n) __attribute__((__format__ (__printf__, n, n+1))) #define D_FORMAT_VPRINTF(n) __attribute__((__format__ (__printf__, n, 0))) #else #define D_CONST_FUNC #define D_FORMAT_PRINTF(n) #define D_FORMAT_VPRINTF(n) #endif #define D_LIKELY(x) __builtin_expect(!!(x), 1) #define D_UNLIKELY(x) __builtin_expect(!!(x), 0) // TODO: add macro for enforcement of return value/error handling #endif DirectFB-1.7.7/lib/direct/stream.h0000644000175000017500000001040412254435330013555 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__STREAM_H__ #define __DIRECT__STREAM_H__ #include /* * Create a stream wrapper. * * 'filename' can be a plain file name or one of the following: * http://[:]/ * unsv://[:]/ * ftp://[:]/ * rtsp://[:]/ * tcp://: * udp://: * file:/ * fd:/ * stdin:/ */ DirectResult DIRECT_API direct_stream_create ( const char *filename, DirectStream **ret_stream ); /* * Duplicate the stream (never fails). */ DirectStream DIRECT_API *direct_stream_dup ( DirectStream *stream ); /* * Return the file descriptor associated to the stream. */ int DIRECT_API direct_stream_fileno ( DirectStream *stream ); /* * True if stream is seekable. */ bool DIRECT_API direct_stream_seekable( DirectStream *stream ); /* * True if stream originates from a remote host. */ bool DIRECT_API direct_stream_remote ( DirectStream *stream ); /* * Get the mime description of the stream. * Returns NULL if the information is not available. */ const char DIRECT_API *direct_stream_mime ( DirectStream *stream ); /* * Get stream length. */ unsigned int DIRECT_API direct_stream_length ( DirectStream *stream ); /* * Get stream position. */ unsigned int DIRECT_API direct_stream_offset ( DirectStream *stream ); /* * Wait for data to be available. * If 'timeout' is NULL, the function blocks indefinitely. * Set the 'timeout' to 0 to make the function return immediatly. */ DirectResult DIRECT_API direct_stream_wait ( DirectStream *stream, unsigned int length, struct timeval *timeout ); /* * Peek 'length' bytes of data at offset 'offset' from the stream. */ DirectResult DIRECT_API direct_stream_peek ( DirectStream *stream, unsigned int length, int offset, void *buf, unsigned int *read_out ); /* * Fetch 'length' bytes of data from the stream. */ DirectResult DIRECT_API direct_stream_read ( DirectStream *stream, unsigned int length, void *buf, unsigned int *read_out ); /* * Seek to the specified absolute offset within the stream. */ DirectResult DIRECT_API direct_stream_seek ( DirectStream *stream, unsigned int offset ); /* * Destroy the stream wrapper. */ void DIRECT_API direct_stream_destroy ( DirectStream *stream ); #endif /* __DIRECT__STREAM_H__ */ DirectFB-1.7.7/lib/direct/conf.c0000644000175000017500000006572412361150102013207 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include static DirectMap *config_options = NULL; static DirectConfig config; DirectConfig *direct_config = &config; const char *direct_config_usage = "libdirect options:\n" " memcpy= Skip memcpy() probing (help = show list)\n" " [no-]quiet Disable text output except debug messages or direct logs\n" " [no-]quiet= Only quiet certain types (cumulative with 'quiet')\n" " [ info | warning | error | once | unimplemented | banner | bug ]\n" " [no-]fatal-messages Enable trap for all message types except banner and info\n" " [no-]fatal-messages= Enable trap for certain message types (cumulative with 'fatal-messages')\n" " [ info | warning | error | once | unimplemented | banner | bug ]\n" " [no-]debug= Configure debug domain (if no domain, sets default for unconfigured domains)\n" " debug-all Enable all debug output (regardless of domain configuration)\n" " debug-none Disable all debug output (regardless of all other debug options)\n" " [no-]debugmem Enable memory allocation tracking\n" " [no-]trace Enable stack trace support\n" " [no-]nm-for-trace Enable running nm in a child process to retrieve symbols\n" " log-file= Write all messages to a file\n" " log-udp=: Send all messages via UDP to host:port\n" " fatal-level= Abort on NONE, ASSERT (default) or ASSUME (incl. assert)\n" " [no-]fatal-break Abort on BREAK (default)\n" " dont-catch=[[,]...] Don't catch these signals\n" " [no-]sighandler Enable signal handling (default enabled)\n" " [no-]sighandler-thread Enable signal handler thread (default enabled)\n" " [no-]thread-block-signals Block all signals in new threads?\n" " disable-module= suppress loading this module\n" " module-dir= Override default module search directory (default = $libdir/directfb-x.y-z)\n" " thread-priority-scale=<100th> Apply scaling factor on thread type based priorities\n" " default-interface-implementation= Probe interface_type/implementation_name first\n" " perf-dump-interval= Create thread dumping performance counters every ms milli seconds\n" " log-delay-rand-loops= Add random busy loops (of max loops) to central logging code for testing purpose\n" " log-delay-rand-us= Add random sleep (of max us) to central logging code for testing purpose\n" " log-delay-min-loops= Set minimum busy loops after each log message\n" " log-delay-min-us= Set minimum sleep after each log message\n" " delay-trap-ms= Set period to wait instead of raising\n" "\n"; /**********************************************************************************************************************/ static bool config_option_compare( DirectMap *map, const void *key, void *object, void *ctx ); static unsigned int config_option_hash( DirectMap *map, const void *key, void *ctx ); static DirectEnumerationResult config_option_free( DirectMap *map, void *object, void *ctx ); void __D_conf_init() { direct_map_create( 123, config_option_compare, config_option_hash, NULL, &config_options ); direct_config->log_level = DIRECT_LOG_DEBUG_0; direct_config->trace = true; direct_config->sighandler = true; direct_config->sighandler_thread = true; direct_config->fatal = DCFL_ASSERT; direct_config->fatal_break = true; direct_config->thread_block_signals = true; direct_config->thread_priority_scale = 100; char *args = getenv( "D_ARGS" ); if (args) { args = direct_strdup( args ); char *p = NULL, *r, *s = args; while ((r = direct_strtok_r( s, ",", &p ))) { char *v; direct_trim( &r ); v = strchr( r, '=' ); if (v) *v++ = 0; direct_config_set( r, v ); s = NULL; } direct_free( args ); } } void __D_conf_deinit() { if (config_options) { direct_map_iterate( config_options, config_option_free, NULL ); direct_map_destroy( config_options ); config_options = NULL; } } /**********************************************************************************************************************/ #define OPTION_NAME_LENGTH 128 typedef struct { char name[OPTION_NAME_LENGTH]; DirectLink *values; } ConfigOption; typedef struct { DirectLink link; char *value; } ConfigOptionValue; static void config_option_value_add( ConfigOption *option, const char *name ) { ConfigOptionValue *value; if (!name) return; value = D_CALLOC( 1, sizeof(ConfigOptionValue) + strlen(name) + 1 ); if (!value) { D_OOM(); return; } value->value = direct_snputs( (char *)(value + 1), name, OPTION_NAME_LENGTH ); direct_list_append( &option->values, &value->link ); } static ConfigOption* config_option_create( const char *name, const char *value ) { ConfigOption *option; option = D_CALLOC( 1, sizeof(ConfigOption) ); if (!option) { D_OOM(); return NULL; } direct_snputs( option->name, name, OPTION_NAME_LENGTH ); config_option_value_add( option, value ); direct_map_insert( config_options, name, option); return option; } static bool config_option_compare( DirectMap *map, const void *key, void *object, void *ctx ) { const char *map_key = key; ConfigOption *map_entry = object; return strcmp( map_key, map_entry->name ) == 0; } static unsigned int config_option_hash( DirectMap *map, const void *key, void *ctx ) { size_t i = 0; unsigned int hash = 0; const char *map_key = key; while (map_key[i]) { hash = hash * 131 + map_key[i]; i++; } return hash; } static DirectEnumerationResult config_option_free( DirectMap *map, void *object, void *ctx ) { ConfigOption *option = object; ConfigOptionValue *value; DirectLink *next; direct_list_foreach_safe( value, next, option->values ) { D_FREE( value ); } D_FREE( option ); return DENUM_OK; } /**********************************************************************************************************************/ DirectResult direct_config_set( const char *name, const char *value ) { if (direct_strcmp (name, "disable-module" ) == 0) { if (value) { int n = 0; while (direct_config->disable_module && direct_config->disable_module[n]) n++; direct_config->disable_module = (char**) D_REALLOC( direct_config->disable_module, sizeof(char*) * (n + 2) ); direct_config->disable_module[n] = D_STRDUP( value ); direct_config->disable_module[n+1] = NULL; } else { D_ERROR("Direct/Config '%s': No module name specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "module-dir" ) == 0) { if (value) { if (direct_config->module_dir) D_FREE( direct_config->module_dir ); direct_config->module_dir = D_STRDUP( value ); } else { D_ERROR("Direct/Config 'module-dir': No directory name specified!\n"); return DR_INVARG; } } else if (direct_strcmp (name, "memcpy" ) == 0) { if (value) { if (direct_config->memcpy) D_FREE( direct_config->memcpy ); direct_config->memcpy = D_STRDUP( value ); } else { D_ERROR("Direct/Config '%s': No method specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "quiet" ) == 0 || strcmp (name, "no-quiet" ) == 0) { /* Enable/disable all at once by default. */ DirectMessageType type = DMT_ALL; /* Find out the specific message type being configured. */ if (value) { if (!strcmp( value, "info" )) type = DMT_INFO; else if (!strcmp( value, "warning" )) type = DMT_WARNING; else if (!strcmp( value, "error" )) type = DMT_ERROR; else if (!strcmp( value, "once" )) type = DMT_ONCE; else if (!strcmp( value, "bug" )) type = DMT_BUG; else if (!strcmp( value, "untested" )) type = DMT_UNTESTED; else if (!strcmp( value, "unimplemented" )) type = DMT_UNIMPLEMENTED; else { D_ERROR( "DirectFB/Config '%s': Unknown message type '%s'!\n", name, value ); return DR_INVARG; } } /* Set/clear the corresponding flag in the configuration. */ if (name[0] == 'q') D_FLAGS_SET( direct_config->quiet, type ); else D_FLAGS_CLEAR( direct_config->quiet, type ); } else if (direct_strcmp (name, "no-quiet" ) == 0) { direct_config->quiet = DMT_NONE; } else if (direct_strcmp (name, "fatal-messages" ) == 0 || strcmp (name, "no-fatal-messages" ) == 0) { /* Enable/disable all at once by default. */ DirectMessageType type = DMT_ALL & ~(DMT_BANNER | DMT_INFO); /* Find out the specific message type being configured. */ if (value) { if (!strcmp( value, "info" )) type = DMT_INFO; else if (!strcmp( value, "warning" )) type = DMT_WARNING; else if (!strcmp( value, "error" )) type = DMT_ERROR; else if (!strcmp( value, "once" )) type = DMT_ONCE; else if (!strcmp( value, "bug" )) type = DMT_BUG; else if (!strcmp( value, "untested" )) type = DMT_UNTESTED; else if (!strcmp( value, "unimplemented" )) type = DMT_UNIMPLEMENTED; else { D_ERROR( "DirectFB/Config '%s': Unknown message type '%s'!\n", name, value ); return DR_INVARG; } } /* Set/clear the corresponding flag in the configuration. */ if (name[0] == 'f') D_FLAGS_SET( direct_config->fatal_messages, type ); else D_FLAGS_CLEAR( direct_config->fatal_messages, type ); } else if (direct_strcmp (name, "no-fatal-messages" ) == 0) { direct_config->fatal_messages = DMT_NONE; } else if (direct_strcmp (name, "debug" ) == 0) { if (value) { DirectLogDomainConfig config = {0}; if (value[0] && value[1] == ':') { config.level = value[0] - '0' + DIRECT_LOG_DEBUG_0; value += 2; } else config.level = DIRECT_LOG_DEBUG; direct_log_domain_configure( value, &config ); } else if (direct_config->log_level < DIRECT_LOG_DEBUG) direct_config->log_level = DIRECT_LOG_DEBUG; } else if (direct_strcmp (name, "no-debug" ) == 0) { if (value) { DirectLogDomainConfig config = {0}; config.level = DIRECT_LOG_DEBUG_0; direct_log_domain_configure( value, &config ); } else if (direct_config->log_level > DIRECT_LOG_DEBUG_0) direct_config->log_level = DIRECT_LOG_DEBUG_0; } else if (direct_strcmp (name, "log-all" ) == 0) { direct_config->log_all = true; } else if (direct_strcmp (name, "log-none" ) == 0) { direct_config->log_none = true; } else if (direct_strcmp (name, "debugmem" ) == 0) { direct_config->debugmem = true; } else if (direct_strcmp (name, "no-debugmem" ) == 0) { direct_config->debugmem = false; } else if (direct_strcmp (name, "trace" ) == 0) { direct_config->trace = true; } else if (direct_strcmp (name, "no-trace" ) == 0) { direct_config->trace = false; } else if (direct_strcmp (name, "nm-for-trace" ) == 0) { direct_config->nm_for_trace = true; } else if (direct_strcmp (name, "no-nm-for-trace" ) == 0) { direct_config->nm_for_trace = false; } else if (direct_strcmp (name, "log-file" ) == 0 || strcmp (name, "log-udp" ) == 0) { if (value) { DirectResult ret; DirectLog *log; ret = direct_log_create( strcmp(name,"log-udp") ? DLT_FILE : DLT_UDP, value, &log ); if (ret) return ret; if (direct_config->log) direct_log_destroy( direct_config->log ); direct_config->log = log; direct_log_set_default( log ); } else { if (direct_strcmp(name,"log-udp")) D_ERROR("Direct/Config '%s': No file name specified!\n", name); else D_ERROR("Direct/Config '%s': No host and port specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "fatal-level" ) == 0) { if (direct_strcasecmp (value, "none" ) == 0) { direct_config->fatal = DCFL_NONE; } else if (direct_strcasecmp (value, "assert" ) == 0) { direct_config->fatal = DCFL_ASSERT; } else if (direct_strcasecmp (value, "assume" ) == 0) { direct_config->fatal = DCFL_ASSUME; } else { D_ERROR("Direct/Config '%s': Unknown level specified (use 'none', 'assert', 'assume')!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "fatal-break" ) == 0) { direct_config->fatal_break = true; } else if (direct_strcmp (name, "no-fatal-break" ) == 0) { direct_config->fatal_break = false; } else if (direct_strcmp (name, "sighandler" ) == 0) { direct_config->sighandler = true; } else if (direct_strcmp (name, "no-sighandler" ) == 0) { direct_config->sighandler = false; } else if (direct_strcmp (name, "dont-catch" ) == 0) { if (value) { char *signals = D_STRDUP( value ); char *p = NULL, *r, *s = signals; while ((r = direct_strtok_r( s, ",", &p ))) { char *error; unsigned long signum; direct_trim( &r ); signum = direct_strtoul( r, &error, 10 ); if (*error) { D_ERROR( "Direct/Config '%s': Error in number at '%s'!\n", name, error ); D_FREE( signals ); return DR_INVARG; } sigaddset( &direct_config->dont_catch, signum ); s = NULL; } D_FREE( signals ); } else { D_ERROR("Direct/Config '%s': No signals specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "thread_block_signals") == 0) { direct_config->thread_block_signals = true; } else if (direct_strcmp (name, "no-thread_block_signals") == 0) { direct_config->thread_block_signals = false; } else if (direct_strcmp (name, "thread-priority-scale" ) == 0) { if (value) { int scale; if (direct_sscanf( value, "%d", &scale ) < 1) { D_ERROR("Direct/Config '%s': Could not parse value!\n", name); return DR_INVARG; } direct_config->thread_priority_scale = scale; } else { D_ERROR("Direct/Config '%s': No value specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "thread-priority" ) == 0) { /* Must be moved to lib/direct/conf.c in trunk! */ if (value) { int priority; if (direct_sscanf( value, "%d", &priority ) < 1) { D_ERROR("Direct/Config '%s': Could not parse value!\n", name); return DR_INVARG; } direct_config->thread_priority = priority; } else { D_ERROR("Direct/Config '%s': No value specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "thread-scheduler" ) == 0) { /* Must be moved to lib/direct/conf.c in trunk! */ if (value) { if (direct_strcmp( value, "other" ) == 0) { direct_config->thread_scheduler = DCTS_OTHER; } else if (direct_strcmp( value, "fifo" ) == 0) { direct_config->thread_scheduler = DCTS_FIFO; } else if (direct_strcmp( value, "rr" ) == 0) { direct_config->thread_scheduler = DCTS_RR; } else { D_ERROR( "Direct/Config '%s': Unknown scheduler '%s'!\n", name, value ); return DR_INVARG; } } else { D_ERROR( "Direct/Config '%s': No value specified!\n", name ); return DR_INVARG; } } else if (direct_strcmp (name, "thread-stacksize" ) == 0) { /* Must be moved to lib/direct/conf.c in trunk! */ if (value) { int size; if (direct_sscanf( value, "%d", &size ) < 1) { D_ERROR( "Direct/Config '%s': Could not parse value!\n", name ); return DR_INVARG; } direct_config->thread_stack_size = size; } else { D_ERROR( "Direct/Config '%s': No value specified!\n", name ); return DR_INVARG; } } else if (direct_strcmp (name, "default-interface-implementation" ) == 0) { if (value) { char itype[0xff]; char *iname = 0; int n = 0; while (direct_config->default_interface_implementation_types && direct_config->default_interface_implementation_types[n]) n++; direct_config->default_interface_implementation_types = (char**) D_REALLOC( direct_config->default_interface_implementation_types, sizeof(char*) * (n + 2) ); direct_config->default_interface_implementation_names = (char**) D_REALLOC( direct_config->default_interface_implementation_names, sizeof(char*) * (n + 2) ); iname = strstr(value, "/"); if (!iname) { D_ERROR("Direct/Config '%s': No interface/implementation specified!\n", name); return DR_INVARG; } if (iname <= value) { D_ERROR("Direct/Config '%s': No interface specified!\n", name); return DR_INVARG; } if (strlen(iname) < 2) { D_ERROR("Direct/Config '%s': No implementation specified!\n", name); return DR_INVARG; } direct_snputs( itype, value, iname - value + 1); direct_config->default_interface_implementation_types[n] = D_STRDUP( itype ); direct_config->default_interface_implementation_types[n+1] = NULL; direct_config->default_interface_implementation_names[n] = D_STRDUP( iname + 1 ); direct_config->default_interface_implementation_names[n+1] = NULL; } else { D_ERROR("Direct/Config '%s': No interface/implementation specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "perf-dump-interval" ) == 0) { if (value) { int interval; if (direct_sscanf( value, "%d", &interval ) < 1) { D_ERROR("Direct/Config '%s': Could not parse value!\n", name); return DR_INVARG; } direct_config->perf_dump_interval = interval; } else { D_ERROR("Direct/Config '%s': No value specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "log-delay-rand-loops" ) == 0) { if (value) { int max; if (direct_sscanf( value, "%d", &max ) < 1) { D_ERROR("Direct/Config '%s': Could not parse value!\n", name); return DR_INVARG; } direct_config->log_delay_rand_loops = max; } else { D_ERROR("Direct/Config '%s': No value specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "log-delay-rand-us" ) == 0) { if (value) { int max; if (direct_sscanf( value, "%d", &max ) < 1) { D_ERROR("Direct/Config '%s': Could not parse value!\n", name); return DR_INVARG; } direct_config->log_delay_rand_us = max; } else { D_ERROR("Direct/Config '%s': No value specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "log-delay-min-loops" ) == 0) { if (value) { int min; if (direct_sscanf( value, "%d", &min ) < 1) { D_ERROR("Direct/Config '%s': Could not parse value!\n", name); return DR_INVARG; } direct_config->log_delay_min_loops = min; } else { D_ERROR("Direct/Config '%s': No value specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "log-delay-min-us" ) == 0) { if (value) { int min; if (direct_sscanf( value, "%d", &min ) < 1) { D_ERROR("Direct/Config '%s': Could not parse value!\n", name); return DR_INVARG; } direct_config->log_delay_min_us = min; } else { D_ERROR("Direct/Config '%s': No value specified!\n", name); return DR_INVARG; } } else if (direct_strcmp (name, "delay-trap-ms" ) == 0) { if (value) { int ms; if (direct_sscanf( value, "%d", &ms ) < 1) { D_ERROR("Direct/Config '%s': Could not parse value!\n", name); return DR_INVARG; } direct_config->delay_trap_ms = ms; } else { D_ERROR("Direct/Config '%s': No value specified!\n", name); return DR_INVARG; } } else { ConfigOption *option = direct_map_lookup( config_options, name ); if (option) config_option_value_add( option, value ); else config_option_create( name, value ); } return DR_OK; } DirectResult direct_config_get( const char *name, char **values, const int values_len, int *ret_num ) { ConfigOption *option; ConfigOptionValue *value; int num = 0; option = direct_map_lookup( config_options, name ); if (!option) return DR_ITEMNOTFOUND; *ret_num = 0; if (!option->values) return DR_OK; direct_list_foreach( value, option->values ) { if (num >= values_len) break; values[num++] = value->value; } *ret_num = num; return DR_OK; } long long direct_config_get_int_value( const char *name ) { return direct_config_get_int_value_with_default( name, 0 ); } long long direct_config_get_int_value_with_default( const char *name, long long def ) { ConfigOption *option; ConfigOptionValue *value; option = direct_map_lookup( config_options, name ); if (!option || !option->values) return def; value = direct_list_get_last( option->values ); D_ASSERT( value != NULL ); return atoll(value->value); } DirectFB-1.7.7/lib/direct/direct.h0000644000175000017500000000365012254435330013541 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__DIRECT_H__ #define __DIRECT__DIRECT_H__ #include DirectResult DIRECT_API direct_initialize( void ); DirectResult DIRECT_API direct_shutdown( void ); typedef void (*DirectCleanupHandlerFunc)( void *ctx ); DirectResult DIRECT_API direct_cleanup_handler_add( DirectCleanupHandlerFunc func, void *ctx, DirectCleanupHandler **ret_handler ); DirectResult DIRECT_API direct_cleanup_handler_remove( DirectCleanupHandler *handler ); void __D_direct_init( void ); void __D_direct_deinit( void ); #endif DirectFB-1.7.7/lib/direct/clock.h0000644000175000017500000000350512254435330013361 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__CLOCK_H__ #define __DIRECT__CLOCK_H__ #include /**********************************************************************************************************************/ long long DIRECT_API direct_clock_get_abs_micros( void ); long long DIRECT_API direct_clock_get_abs_millis( void ); long long DIRECT_API direct_clock_get_micros( void ); long long DIRECT_API direct_clock_get_millis( void ); #ifndef DIRECT_DISABLE_DEPRECATED // @deprecated void DIRECT_API direct_clock_set_start( const struct timeval *start ); #endif #endif DirectFB-1.7.7/lib/direct/LockWQ.h0000644000175000017500000000572512313366376013445 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 ___Direct__LockWQ__H___ #define ___Direct__LockWQ__H___ #include #ifdef __cplusplus extern "C" { #endif #include #include #ifdef __cplusplus } namespace Direct { class LockWQ { public: LockWQ() { direct_mutex_init( &mutex ); direct_waitqueue_init( &wq ); } ~LockWQ() { direct_mutex_deinit( &mutex ); direct_waitqueue_deinit( &wq ); } void lock() { direct_mutex_lock( &mutex ); } void unlock() { direct_mutex_unlock( &mutex ); } DirectResult wait( unsigned long timeout_us = 0 ) { if (timeout_us > 0) return direct_waitqueue_wait_timeout( &wq, &mutex, timeout_us ); return direct_waitqueue_wait( &wq, &mutex ); } void notify() { direct_waitqueue_signal( &wq ); } void notifyAll() { direct_waitqueue_broadcast( &wq ); } class Lock { public: Lock( LockWQ &lwq ) : lwq( lwq ), unlocked( false ) { lwq.lock(); } ~Lock() { if (!unlocked) lwq.unlock(); } DirectResult wait( unsigned long timeout_us = 0 ) { return lwq.wait( timeout_us ); } void unlock() { unlocked = true; lwq.unlock(); } private: LockWQ &lwq; bool unlocked; }; private: DirectMutex mutex; DirectWaitQueue wq; }; } #endif // __cplusplus #endif DirectFB-1.7.7/lib/direct/tree.c0000644000175000017500000001754712254435330013233 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . Balanced binary tree ported from glib by Sven Neumann This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include /* FIXME FIXME */ static DirectNode *tree_node_new ( DirectTree *tree, void *key, void *value ); static void tree_node_destroy ( DirectTree *tree, DirectNode *node ); static DirectNode *tree_node_insert ( DirectTree *tree, DirectNode *node, void *key, void *value, int *inserted ); static DirectNode *tree_node_lookup ( DirectNode *node, void *key ); static DirectNode *tree_node_balance ( DirectNode *node ); static DirectNode *tree_node_rotate_left ( DirectNode *node ); static DirectNode *tree_node_rotate_right( DirectNode *node ); DirectTree * direct_tree_new( void ) { return D_CALLOC( 1, sizeof (DirectTree) ); } void direct_tree_destroy( DirectTree *tree ) { unsigned int i; for (i = 0; i < 128; i++) { if (tree->fast_keys[i]) D_FREE( tree->fast_keys[i] ); } tree_node_destroy( tree, tree->root ); D_FREE( tree ); } void direct_tree_insert( DirectTree *tree, void *key, void *value ) { int inserted = 0; unsigned long fast_key = (unsigned long) key; if (fast_key < 128) tree->fast_keys[fast_key] = value; else tree->root = tree_node_insert( tree, tree->root, key, value, &inserted ); } void * direct_tree_lookup( DirectTree *tree, void *key ) { DirectNode *node; unsigned long fast_key = (unsigned long) key; if (fast_key < 128) return tree->fast_keys[fast_key]; node = tree_node_lookup( tree->root, key ); return node ? node->value : NULL; } static DirectNode * tree_node_new( DirectTree *tree, void *key, void *value ) { DirectNode *node; node = D_MALLOC(sizeof (DirectNode)); node->balance = 0; node->left = NULL; node->right = NULL; node->key = key; node->value = value; return node; } static void tree_node_destroy (DirectTree *tree, DirectNode *node) { if (node) { tree_node_destroy (tree, node->left); tree_node_destroy (tree, node->right); if (node->value) D_FREE(node->value); D_FREE(node); } } static DirectNode * tree_node_insert (DirectTree *tree, DirectNode *node, void *key, void *value, int *inserted) { int cmp; int old_balance; if (!node) { *inserted = 1; return tree_node_new (tree, key, value); } cmp = (char*) key - (char*) node->key; if (cmp == 0) { node->value = value; return node; } if (cmp < 0) { if (node->left) { old_balance = node->left->balance; node->left = tree_node_insert (tree, node->left, key, value, inserted); if ((old_balance != node->left->balance) && node->left->balance) node->balance -= 1; } else { *inserted = 1; node->left = tree_node_new (tree, key, value); node->balance -= 1; } } else if (cmp > 0) { if (node->right) { old_balance = node->right->balance; node->right = tree_node_insert (tree, node->right, key, value, inserted); if ((old_balance != node->right->balance) && node->right->balance) node->balance += 1; } else { *inserted = 1; node->right = tree_node_new (tree, key, value); node->balance += 1; } } if (*inserted && (node->balance < -1 || node->balance > 1)) node = tree_node_balance (node); return node; } static DirectNode * tree_node_lookup (DirectNode *node, void *key) { int cmp; if (!node) return NULL; cmp = (char*) key - (char*) node->key; if (cmp == 0) return node; if (cmp < 0 && node->left) { return tree_node_lookup (node->left, key); } else if (cmp > 0 && node->right) { return tree_node_lookup (node->right, key); } return NULL; } static DirectNode * tree_node_balance (DirectNode *node) { if (node->balance < -1) { if (node->left->balance > 0) node->left = tree_node_rotate_left (node->left); node = tree_node_rotate_right (node); } else if (node->balance > 1) { if (node->right->balance < 0) node->right = tree_node_rotate_right (node->right); node = tree_node_rotate_left (node); } return node; } static DirectNode * tree_node_rotate_left (DirectNode *node) { DirectNode *right; int a_bal; int b_bal; right = node->right; node->right = right->left; right->left = node; a_bal = node->balance; b_bal = right->balance; if (b_bal <= 0) { if (a_bal >= 1) right->balance = b_bal - 1; else right->balance = a_bal + b_bal - 2; node->balance = a_bal - 1; } else { if (a_bal <= b_bal) right->balance = a_bal - 2; else right->balance = b_bal - 1; node->balance = a_bal - b_bal - 1; } return right; } static DirectNode * tree_node_rotate_right (DirectNode *node) { DirectNode *left; int a_bal; int b_bal; left = node->left; node->left = left->right; left->right = node; a_bal = node->balance; b_bal = left->balance; if (b_bal <= 0) { if (b_bal > a_bal) left->balance = b_bal + 1; else left->balance = a_bal + 2; node->balance = a_bal - b_bal + 1; } else { if (a_bal <= -1) left->balance = b_bal + 1; else left->balance = a_bal + b_bal + 2; node->balance = a_bal + 1; } return left; } DirectFB-1.7.7/lib/direct/atomic.h0000644000175000017500000005432412254435330013547 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__ATOMIC_H__ #define __DIRECT__ATOMIC_H__ #include #if !DIRECT_BUILD_GCC_ATOMICS #if defined (__SH4__) || defined (__SH4A__) /* * SH4 Atomic Operations */ #define D_SYNC_BOOL_COMPARE_AND_SWAP( ptr, old_value, new_value ) \ ({ \ __typeof__(*(ptr)) __temp; \ __typeof__(*(ptr)) __result; \ \ __asm__ __volatile__ ( \ "1: \n" \ " movli.l @%2, %0 \n" \ " mov %0, %1 \n" \ " cmp/eq %1, %3 \n" \ " bf 2f \n" \ " mov %4, %0 \n" \ "2: \n" \ " movco.l %0, @%2 \n" \ " bf 1b \n" \ " synco \n" \ : "=&z" (__temp), "=&r" (__result) \ : "r" (ptr), "r" (old_value), "r" (new_value) \ : "t" \ ); \ \ __result == (old_value); \ }) #define D_SYNC_ADD_AND_FETCH( ptr, value ) \ ({ \ __typeof__(*(ptr)) __result; \ \ __asm__ __volatile__ ( \ "1: \n" \ " movli.l @%1, %0 \n" \ " add %2, %0 \n" \ " movco.l %0, @%1 \n" \ " bf 1b \n" \ " synco \n" \ : "=&z" (__result) \ : "r" (ptr), "r" (value) \ : "t" \ ); \ \ __result; \ }) #define D_SYNC_FETCH_AND_CLEAR( ptr ) \ ({ \ __typeof__(*(ptr)) __temp; \ __typeof__(*(ptr)) __result; \ \ __asm__ __volatile__ ( \ "1: \n" \ " movli.l @%2, %0 \n" \ " mov %0, %1 \n" \ " xor %0, %0 \n" \ " movco.l %0, @%2 \n" \ " bf 1b \n" \ " synco \n" \ : "=&z" (__temp), "=&r" (__result) \ : "r" (ptr) \ : "t" \ ); \ \ __result; \ }) #define D_SYNC_ADD( ptr, value ) \ do { \ __typeof__(*(ptr)) __temp; \ \ __asm__ __volatile__ ( \ "1: \n" \ " movli.l @%1, %0 \n" \ " add %2, %0 \n" \ " movco.l %0, @%1 \n" \ " bf 1b \n" \ : "=&z" (__temp) \ : "r" (ptr), "r" (value) \ : "t" \ ); \ } while (0) /* * FIFO Push * * *iptr = *fptr * *fptr = iptr */ #define D_SYNC_PUSH_SINGLE( fptr, iptr ) \ do { \ unsigned long **__fptr = (unsigned long **)(fptr); \ unsigned long **__iptr = (unsigned long **)(iptr); \ unsigned long *__temp; \ \ __asm__ __volatile__ ( \ "1: \n" \ " movli.l @%1, %0 \n" \ " mov.l %0, @%2 \n" \ " mov %2, %0 \n" \ " movco.l %0, @%1 \n" \ " bf 1b \n" \ " synco \n" \ : "=&z" (__temp) \ : "r" (__fptr), "r" (__iptr) \ : "t" \ ); \ } while (0) /* * FIFO Pop * * iptr = *fptr * *fptr = *iptr <- if iptr != NULL * * return iptr */ #define D_SYNC_POP_SINGLE( fptr ) \ ({ \ unsigned long **__fptr = (unsigned long **)(fptr); \ unsigned long **__iptr; \ unsigned long *__temp; \ \ __asm__ __volatile__ ( \ "1: \n" \ " movli.l @%2, %0 \n" \ " mov %0, %1 \n" \ " cmp/eq #0, %0 \n" \ " bt 2f \n" \ " mov.l @%1, %0 \n" \ "2: \n" \ " movco.l %0, @%2 \n" \ " bf 1b \n" \ " synco \n" \ : "=&z" (__temp), "=&r" (__iptr) \ : "r" (__fptr) \ : "t" \ ); \ \ (__typeof__(*(fptr))) __iptr; \ }) #endif #if defined(ARCH_ARMv7) && !defined(ARCH_IWMMXT) static inline int _D__atomic_cmpxchg(volatile int *ptr, int old, int _new) { unsigned long oldval, res; do { __asm__ __volatile__("@ atomic_cmpxchg\n" "ldrex %1, [%2]\n" "mov %0, #0\n" "teq %1, %3\n" "strexeq %0, %4, [%2]\n" : "=&r" (res), "=&r" (oldval) : "r" (ptr), "Ir" (old), "r" (_new) : "cc"); } while (res); return oldval; } #define D_SYNC_BOOL_COMPARE_AND_SWAP( ptr, old_value, new_value ) \ (_D__atomic_cmpxchg( (void*) ptr, (int) old_value, (int) new_value ) == (int) old_value) #define D_SYNC_FETCH_AND_CLEAR( ptr ) \ ({ \ volatile __typeof__((ptr)) __ptr = (ptr); \ __typeof__(*(ptr)) __temp; \ \ do { \ __temp = (*__ptr); \ } while (!D_SYNC_BOOL_COMPARE_AND_SWAP( __ptr, __temp, 0 )); \ \ __temp; \ }) static inline int _D__atomic_add_return(int i, volatile int *v) { unsigned long tmp; int result; __asm__ __volatile__("@ atomic_add_return\n" "1: ldrex %0, [%2]\n" " add %0, %0, %3\n" " strex %1, %0, [%2]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp) : "r" (v), "Ir" (i) : "cc"); return result; } #define D_SYNC_ADD_AND_FETCH( ptr, value ) \ (_D__atomic_add_return( (int) (value), (volatile int*) (ptr) )) #endif #if defined(ARCH_MIPS) static inline int _D__atomic_cmpxchg(volatile int *ptr, int old, int _new) { unsigned long retval; __asm__ __volatile__( " .set push \n" " .set noat \n" " .set mips3 \n" "1: ll %0, %2 # __cmpxchg_u32 \n" " bne %0, %z3, 2f \n" " .set mips0 \n" " move $1, %z4 \n" " .set mips3 \n" " sc $1, %1 \n" " beqz $1, 1b \n" #ifdef CONFIG_SMP " sync \n" #endif "2: \n" " .set pop \n" : "=&r" (retval), "=R" (*ptr) : "R" (*ptr), "Jr" (old), "Jr" (_new) : "memory"); return retval; } #define D_SYNC_BOOL_COMPARE_AND_SWAP( ptr, old_value, new_value ) \ (_D__atomic_cmpxchg( (void*) ptr, (int) old_value, (int) new_value ) == (int) old_value) #define D_SYNC_FETCH_AND_CLEAR( ptr ) \ ({ \ volatile __typeof__((ptr)) __ptr = (ptr); \ __typeof__(*(ptr)) __temp; \ \ do { \ __temp = (*__ptr); \ } while (!D_SYNC_BOOL_COMPARE_AND_SWAP( __ptr, __temp, 0 )); \ \ __temp; \ }) static inline int _D__atomic_add_return(int i, volatile int *v) { int temp; __asm__ __volatile__( " .set mips3 \n" "1: ll %0, %1 # atomic_add \n" " addu %0, %2 \n" " sc %0, %1 \n" " beqz %0, 2f \n" " .subsection 2 \n" "2: b 1b \n" " .previous \n" " .set mips0 \n" : "=&r" (temp), "=m" (*v) : "Ir" (i), "m" (*v)); return temp; } #define D_SYNC_ADD_AND_FETCH( ptr, value ) \ _D__atomic_add_return( (int) (value), (volatile int*) (ptr) ) #endif #endif // !DIRECT_BUILD_GCC_ATOMICS #ifdef WIN32 /* * Win32 */ #ifndef D_SYNC_BOOL_COMPARE_AND_SWAP #define D_SYNC_BOOL_COMPARE_AND_SWAP( ptr, old_value, new_value ) \ 0 #endif #ifndef D_SYNC_FETCH_AND_CLEAR #define D_SYNC_FETCH_AND_CLEAR( ptr ) \ 0 #endif #ifndef D_SYNC_ADD_AND_FETCH #define D_SYNC_ADD_AND_FETCH( ptr, value ) \ 0 #endif #ifndef D_SYNC_ADD #define D_SYNC_ADD( ptr, value ) \ 0 #endif #else //WIN32 #ifndef D_SYNC_BOOL_COMPARE_AND_SWAP #define D_SYNC_BOOL_COMPARE_AND_SWAP( ptr, old_value, new_value ) \ __sync_bool_compare_and_swap( ptr, old_value, new_value ) #endif #ifndef D_SYNC_FETCH_AND_CLEAR #define D_SYNC_FETCH_AND_CLEAR( ptr ) \ __sync_fetch_and_and( ptr, 0 ) #endif #ifndef D_SYNC_ADD_AND_FETCH #define D_SYNC_ADD_AND_FETCH( ptr, value ) \ __sync_add_and_fetch( ptr, value ) #if 0 ({ \ int __val; \ volatile int *__ptr = (volatile int *)(void*)(ptr); \ \ do { \ __val = *__ptr; \ } while (!D_SYNC_BOOL_COMPARE_AND_SWAP( __ptr, __val, __val + value )); \ \ __val + value; \ }) #endif #endif #ifndef D_SYNC_ADD #define D_SYNC_ADD( ptr, value ) \ do { (void) D_SYNC_ADD_AND_FETCH( ptr, value ); } while (0) #endif #endif //!WIN32 /* * FIFO Push * * *iptr = *fptr * *fptr = iptr */ #ifndef D_SYNC_PUSH_SINGLE #define D_SYNC_PUSH_SINGLE( fptr, iptr ) \ do { \ volatile long **__fptr = (volatile long **)(void*)(fptr); \ volatile long **__iptr = (volatile long **)(void*)(iptr); \ \ do { \ *__iptr = *__fptr; \ } while (!D_SYNC_BOOL_COMPARE_AND_SWAP( __fptr, *__iptr, __iptr )); \ } while (0) #endif #ifndef D_SYNC_PUSH_MULTI #define D_SYNC_PUSH_MULTI( fptr, iptr ) \ do { \ volatile long **__fptr = (volatile long **)(void*)(fptr); \ volatile long **__iptr = (volatile long **)(void*)(iptr); \ volatile unsigned int n = 1; \ unsigned int r = 0; \ \ while (true) { \ *__iptr = *__fptr; \ \ if (D_SYNC_BOOL_COMPARE_AND_SWAP( __fptr, *__iptr, __iptr )) \ break; \ \ r = ((r + n) & 0x7f); \ \ for (n=0; n, Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include D_LOG_DOMAIN( Direct_Futex, "Direct/Futex", "Direct Futex" ); /**********************************************************************************************************************/ DirectResult direct_futex_wait( int *uaddr, int val ) { #ifndef WIN32 DirectResult ret; D_ASSERT( uaddr != NULL ); D_DEBUG_AT( Direct_Futex, "%s( %p, %d ) <- %d\n", __FUNCTION__, uaddr, val, *uaddr ); if (*uaddr != val) { D_DEBUG_AT( Direct_Futex, " -> value changed!\n" ); return DR_OK; } while ((ret = direct_futex( uaddr, FUTEX_WAIT, val, NULL, NULL, 0 ))) { switch (ret) { case DR_SIGNALLED: continue; case DR_BUSY: // EAGAIN return DR_OK; default: D_DERROR( ret, "Direct/Futex: FUTEX_WAIT (%p, %d) failed!\n", uaddr, val ); return ret; } } return DR_OK; #else D_UNIMPLEMENTED(); return DR_UNIMPLEMENTED; #endif } DirectResult direct_futex_wait_timed( int *uaddr, int val, int ms ) { #ifndef WIN32 DirectResult ret; struct timespec timeout; D_ASSERT( uaddr != NULL ); D_DEBUG_AT( Direct_Futex, "%s( %p, %d, %d ) <- %d\n", __FUNCTION__, uaddr, val, ms, *uaddr ); if (*uaddr != val) { D_DEBUG_AT( Direct_Futex, " -> value changed!\n" ); return DR_OK; } timeout.tv_sec = ms / 1000; timeout.tv_nsec = (ms % 1000) * 1000000; while ((ret = direct_futex( uaddr, FUTEX_WAIT, val, &timeout, NULL, 0 ))) { switch (ret) { case DR_SIGNALLED: continue; case DR_BUSY: // EAGAIN return DR_OK; default: D_DERROR( ret, "Direct/Futex: FUTEX_WAIT (%p, %d) failed!\n", uaddr, val ); case DR_TIMEOUT: return ret; } } return DR_OK; #else D_UNIMPLEMENTED(); return DR_UNIMPLEMENTED; #endif } DirectResult direct_futex_wake( int *uaddr, int num ) { #ifndef WIN32 DirectResult ret; D_ASSERT( uaddr != NULL ); D_ASSERT( num > 0 ); D_DEBUG_AT( Direct_Futex, "%s( %p, %d ) <- %d\n", __FUNCTION__, uaddr, num, *uaddr ); while ((ret = direct_futex( uaddr, FUTEX_WAKE, num, NULL, NULL, 0 ))) { switch (ret) { case DR_BUSY: // EAGAIN continue; default: D_DERROR( ret, "Direct/Futex: FUTEX_WAKE (%p, %d) failed!\n", uaddr, num ); return ret; } } return DR_OK; #else D_UNIMPLEMENTED(); return DR_UNIMPLEMENTED; #endif } unsigned int __Direct_Futex_Wait_Count = 0; unsigned int __Direct_Futex_Wake_Count = 0; DirectFB-1.7.7/lib/direct/flz.c0000644000175000017500000003255612171403127013061 00000000000000/* FastLZ - lightning-fast lossless compression library Copyright (C) 2007 Ariya Hidayat (ariya@kde.org) Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) Copyright (C) 2005 Ariya Hidayat (ariya@kde.org) 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #if !defined(FASTLZ__COMPRESSOR) && !defined(FASTLZ_DECOMPRESSOR) /* * Always check for bound when decompressing. * Generally it is best to leave it defined. */ #define FASTLZ_SAFE /* * Give hints to the compiler for branch prediction optimization. */ #if defined(__GNUC__) && (__GNUC__ > 2) #define FASTLZ_EXPECT_CONDITIONAL(c) (__builtin_expect((c), 1)) #define FASTLZ_UNEXPECT_CONDITIONAL(c) (__builtin_expect((c), 0)) #else #define FASTLZ_EXPECT_CONDITIONAL(c) (c) #define FASTLZ_UNEXPECT_CONDITIONAL(c) (c) #endif /* * Use inlined functions for supported systems. */ #if defined(__GNUC__) || defined(__DMC__) || defined(__POCC__) || defined(__WATCOMC__) || defined(__SUNPRO_C) #define FASTLZ_INLINE inline #elif defined(__BORLANDC__) || defined(_MSC_VER) || defined(__LCC__) #define FASTLZ_INLINE __inline #else #define FASTLZ_INLINE #endif /* * Prevent accessing more than 8-bit at once, except on x86 architectures. */ #if !defined(FASTLZ_STRICT_ALIGN) #define FASTLZ_STRICT_ALIGN #if 0 #if defined(__i386__) || defined(__386) /* GNU C, Sun Studio */ #undef FASTLZ_STRICT_ALIGN #elif defined(__i486__) || defined(__i586__) || defined(__i686__) /* GNU C */ #undef FASTLZ_STRICT_ALIGN #elif defined(_M_IX86) /* Intel, MSVC */ #undef FASTLZ_STRICT_ALIGN #elif defined(__386) #undef FASTLZ_STRICT_ALIGN #elif defined(_X86_) /* MinGW */ #undef FASTLZ_STRICT_ALIGN #elif defined(__I86__) /* Digital Mars */ #undef FASTLZ_STRICT_ALIGN #endif #endif #endif /* * FIXME: use preprocessor magic to set this on different platforms! */ typedef unsigned char flzuint8; typedef unsigned short flzuint16; typedef unsigned int flzuint32; /* prototypes */ int fastlz_compress(const void* input, int length, void* output); int fastlz_compress_level(int level, const void* input, int length, void* output); int fastlz_decompress(const void* input, int length, void* output, int maxout); #define MAX_COPY 32 #define MAX_LEN 264 /* 256 + 8 */ #define MAX_DISTANCE 8192 #if !defined(FASTLZ_STRICT_ALIGN) #define FASTLZ_READU16(p) *((const flzuint16*)(p)) #else #define FASTLZ_READU16(p) ((p)[0] | (p)[1]<<8) #endif #define HASH_LOG 13 #define HASH_SIZE (1<< HASH_LOG) #define HASH_MASK (HASH_SIZE-1) #define HASH_FUNCTION(v,p) { v = FASTLZ_READU16(p); v ^= FASTLZ_READU16(p+1)^(v>>(16-HASH_LOG));v &= HASH_MASK; } #undef FASTLZ_LEVEL #define FASTLZ_LEVEL 1 #undef FASTLZ_COMPRESSOR #undef FASTLZ_DECOMPRESSOR #define FASTLZ_COMPRESSOR fastlz1_compress #define FASTLZ_DECOMPRESSOR fastlz1_decompress static FASTLZ_INLINE int FASTLZ_COMPRESSOR(const void* input, int length, void* output); static FASTLZ_INLINE int FASTLZ_DECOMPRESSOR(const void* input, int length, void* output, int maxout); #include "flz.c" #undef FASTLZ_LEVEL #define FASTLZ_LEVEL 2 #undef MAX_DISTANCE #define MAX_DISTANCE 8191 #define MAX_FARDISTANCE (65535+MAX_DISTANCE-1) #undef FASTLZ_COMPRESSOR #undef FASTLZ_DECOMPRESSOR #define FASTLZ_COMPRESSOR fastlz2_compress #define FASTLZ_DECOMPRESSOR fastlz2_decompress static FASTLZ_INLINE int FASTLZ_COMPRESSOR(const void* input, int length, void* output); static FASTLZ_INLINE int FASTLZ_DECOMPRESSOR(const void* input, int length, void* output, int maxout); #include "flz.c" int fastlz_compress(const void* input, int length, void* output) { /* for short block, choose fastlz1 */ if(length < 65536) return fastlz1_compress(input, length, output); /* else... */ return fastlz2_compress(input, length, output); } int fastlz_decompress(const void* input, int length, void* output, int maxout) { /* magic identifier for compression level */ int level = ((*(const flzuint8*)input) >> 5) + 1; if(level == 1) return fastlz1_decompress(input, length, output, maxout); if(level == 2) return fastlz2_decompress(input, length, output, maxout); /* unknown level, trigger error */ return 0; } int fastlz_compress_level(int level, const void* input, int length, void* output) { if(level == 1) return fastlz1_compress(input, length, output); if(level == 2) return fastlz2_compress(input, length, output); return 0; } #else /* !defined(FASTLZ_COMPRESSOR) && !defined(FASTLZ_DECOMPRESSOR) */ static FASTLZ_INLINE int FASTLZ_COMPRESSOR(const void* input, int length, void* output) { const flzuint8* ip = (const flzuint8*) input; const flzuint8* ip_bound = ip + length - 2; const flzuint8* ip_limit = ip + length - 12; flzuint8* op = (flzuint8*) output; const flzuint8* htab[HASH_SIZE]; const flzuint8** hslot; flzuint32 hval; flzuint32 copy; /* sanity check */ if(FASTLZ_UNEXPECT_CONDITIONAL(length < 4)) { if(length) { /* create literal copy only */ *op++ = length-1; ip_bound++; while(ip <= ip_bound) *op++ = *ip++; return length+1; } else return 0; } /* initializes hash table */ for (hslot = htab; hslot < htab + HASH_SIZE; hslot++) *hslot = ip; /* we start with literal copy */ copy = 2; *op++ = MAX_COPY-1; *op++ = *ip++; *op++ = *ip++; /* main loop */ while(FASTLZ_EXPECT_CONDITIONAL(ip < ip_limit)) { const flzuint8* ref; flzuint32 distance; /* minimum match length */ flzuint32 len = 3; /* comparison starting-point */ const flzuint8* anchor = ip; /* check for a run */ #if FASTLZ_LEVEL==2 if(ip[0] == ip[-1] && FASTLZ_READU16(ip-1)==FASTLZ_READU16(ip+1)) { distance = 1; ip += 3; ref = anchor - 1 + 3; goto match; } #endif /* find potential match */ HASH_FUNCTION(hval,ip); hslot = htab + hval; ref = htab[hval]; /* calculate distance to the match */ distance = anchor - ref; /* update hash table */ *hslot = anchor; /* is this a match? check the first 3 bytes */ if(distance==0 || #if FASTLZ_LEVEL==1 (distance >= MAX_DISTANCE) || #else (distance >= MAX_FARDISTANCE) || #endif *ref++ != *ip++ || *ref++!=*ip++ || *ref++!=*ip++) goto literal; #if FASTLZ_LEVEL==2 /* far, needs at least 5-byte match */ if(distance >= MAX_DISTANCE) { if(*ip++ != *ref++ || *ip++!= *ref++) goto literal; len += 2; } match: #endif /* last matched byte */ ip = anchor + len; /* distance is biased */ distance--; if(!distance) { /* zero distance means a run */ flzuint8 x = ip[-1]; while(ip < ip_bound) if(*ref++ != x) break; else ip++; } else for(;;) { /* safe because the outer check against ip limit */ if(*ref++ != *ip++) break; if(*ref++ != *ip++) break; if(*ref++ != *ip++) break; if(*ref++ != *ip++) break; if(*ref++ != *ip++) break; if(*ref++ != *ip++) break; if(*ref++ != *ip++) break; if(*ref++ != *ip++) break; while(ip < ip_bound) if(*ref++ != *ip++) break; break; } /* if we have copied something, adjust the copy count */ if(copy) /* copy is biased, '0' means 1 byte copy */ *(op-copy-1) = copy-1; else /* back, to overwrite the copy count */ op--; /* reset literal counter */ copy = 0; /* length is biased, '1' means a match of 3 bytes */ ip -= 3; len = ip - anchor; /* encode the match */ #if FASTLZ_LEVEL==2 if(distance < MAX_DISTANCE) { if(len < 7) { *op++ = (len << 5) + (distance >> 8); *op++ = (distance & 255); } else { *op++ = (7 << 5) + (distance >> 8); for(len-=7; len >= 255; len-= 255) *op++ = 255; *op++ = len; *op++ = (distance & 255); } } else { /* far away, but not yet in the another galaxy... */ if(len < 7) { distance -= MAX_DISTANCE; *op++ = (len << 5) + 31; *op++ = 255; *op++ = distance >> 8; *op++ = distance & 255; } else { distance -= MAX_DISTANCE; *op++ = (7 << 5) + 31; for(len-=7; len >= 255; len-= 255) *op++ = 255; *op++ = len; *op++ = 255; *op++ = distance >> 8; *op++ = distance & 255; } } #else if(FASTLZ_UNEXPECT_CONDITIONAL(len > MAX_LEN-2)) while(len > MAX_LEN-2) { *op++ = (7 << 5) + (distance >> 8); *op++ = MAX_LEN - 2 - 7 -2; *op++ = (distance & 255); len -= MAX_LEN-2; } if(len < 7) { *op++ = (len << 5) + (distance >> 8); *op++ = (distance & 255); } else { *op++ = (7 << 5) + (distance >> 8); *op++ = len - 7; *op++ = (distance & 255); } #endif /* update the hash at match boundary */ HASH_FUNCTION(hval,ip); htab[hval] = ip++; HASH_FUNCTION(hval,ip); htab[hval] = ip++; /* assuming literal copy */ *op++ = MAX_COPY-1; continue; literal: *op++ = *anchor++; ip = anchor; copy++; if(FASTLZ_UNEXPECT_CONDITIONAL(copy == MAX_COPY)) { copy = 0; *op++ = MAX_COPY-1; } } /* left-over as literal copy */ ip_bound++; while(ip <= ip_bound) { *op++ = *ip++; copy++; if(copy == MAX_COPY) { copy = 0; *op++ = MAX_COPY-1; } } /* if we have copied something, adjust the copy length */ if(copy) *(op-copy-1) = copy-1; else op--; #if FASTLZ_LEVEL==2 /* marker for fastlz2 */ *(flzuint8*)output |= (1 << 5); #endif return op - (flzuint8*)output; } static FASTLZ_INLINE int FASTLZ_DECOMPRESSOR(const void* input, int length, void* output, int maxout) { const flzuint8* ip = (const flzuint8*) input; const flzuint8* ip_limit = ip + length; flzuint8* op = (flzuint8*) output; flzuint8* op_limit = op + maxout; flzuint32 ctrl = (*ip++) & 31; int loop = 1; do { const flzuint8* ref = op; flzuint32 len = ctrl >> 5; flzuint32 ofs = (ctrl & 31) << 8; if(ctrl >= 32) { #if FASTLZ_LEVEL==2 flzuint8 code; #endif len--; ref -= ofs; if (len == 7-1) #if FASTLZ_LEVEL==1 len += *ip++; ref -= *ip++; #else do { code = *ip++; len += code; } while (code==255); code = *ip++; ref -= code; /* match from 16-bit distance */ if(FASTLZ_UNEXPECT_CONDITIONAL(code==255)) if(FASTLZ_EXPECT_CONDITIONAL(ofs==(31 << 8))) { ofs = (*ip++) << 8; ofs += *ip++; ref = op - ofs - MAX_DISTANCE; } #endif #ifdef FASTLZ_SAFE if (FASTLZ_UNEXPECT_CONDITIONAL(op + len + 3 > op_limit)) return 0; if (FASTLZ_UNEXPECT_CONDITIONAL(ref-1 < (flzuint8 *)output)) return 0; #endif if(FASTLZ_EXPECT_CONDITIONAL(ip < ip_limit)) ctrl = *ip++; else loop = 0; if(ref == op) { /* optimize copy for a run */ flzuint8 b = ref[-1]; *op++ = b; *op++ = b; *op++ = b; for(; len; --len) *op++ = b; } else { #if !defined(FASTLZ_STRICT_ALIGN) const flzuint16* p; flzuint16* q; #endif /* copy from reference */ ref--; *op++ = *ref++; *op++ = *ref++; *op++ = *ref++; #if !defined(FASTLZ_STRICT_ALIGN) /* copy a byte, so that now it's word aligned */ if(len & 1) { *op++ = *ref++; len--; } /* copy 16-bit at once */ q = (flzuint16*) op; op += len; p = (const flzuint16*) ref; for(len>>=1; len > 4; len-=4) { *q++ = *p++; *q++ = *p++; *q++ = *p++; *q++ = *p++; } for(; len; --len) *q++ = *p++; #else for(; len; --len) *op++ = *ref++; #endif } } else { ctrl++; #ifdef FASTLZ_SAFE if (FASTLZ_UNEXPECT_CONDITIONAL(op + ctrl > op_limit)) return 0; if (FASTLZ_UNEXPECT_CONDITIONAL(ip + ctrl > ip_limit)) return 0; #endif *op++ = *ip++; for(--ctrl; ctrl; ctrl--) *op++ = *ip++; loop = FASTLZ_EXPECT_CONDITIONAL(ip < ip_limit); if(loop) ctrl = *ip++; } } while(FASTLZ_EXPECT_CONDITIONAL(loop)); return op - (flzuint8*)output; } #endif /* !defined(FASTLZ_COMPRESSOR) && !defined(FASTLZ_DECOMPRESSOR) */ DirectFB-1.7.7/lib/direct/Types++.h0000644000175000017500000000355112361153236013522 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__TYPESPP_H__ #define __DIRECT__TYPESPP_H__ extern "C" { #include } #include namespace Direct { // NOTE: if build fails here we most likely have the above error due to nested extern "C" template class List; template class ListLocked; template class ListSimple; template class StringBase; template class StringsBase; typedef StringBase String; typedef StringsBase Strings; } #define D_String Direct::String #endif DirectFB-1.7.7/lib/direct/mem.c0000644000175000017500000002624612361150102013034 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #if DIRECT_BUILD_DEBUGS /* Build with debug support? */ #define DISABLED_OFFSET (8) D_LOG_DOMAIN( Direct_Mem, "Direct/Mem", "libdirect memory allocation (debugging)" ); /**********************************************************************************************************************/ typedef struct { void *mem; size_t bytes; const char *func; const char *file; int line; DirectTraceBuffer *trace; } MemDesc; /**********************************************************************************************************************/ static DirectHash alloc_hash = DIRECT_HASH_INIT( 523, true ); static DirectMutex alloc_lock; void __D_mem_init() { direct_mutex_init( &alloc_lock ); } void __D_mem_deinit() { direct_mutex_deinit( &alloc_lock ); } /**********************************************************************************************************************/ static bool local_alloc_hash_iterator( DirectHash *hash, unsigned long key, void *value, void *ctx ) { MemDesc *desc = value; unsigned long *total = ctx; direct_log_printf( NULL, ""_ZUn(7)" bytes at %p allocated in %s (%s: %u)\n", desc->bytes, desc->mem, desc->func, desc->file, desc->line ); if (desc->trace) direct_trace_print_stack( desc->trace ); *total += desc->bytes; return true; } void direct_print_memleaks( void ) { unsigned long total = 0; /* Debug only. */ direct_mutex_lock( &alloc_lock ); if (alloc_hash.count) { direct_log_printf( NULL, "Local memory allocations remaining (%d): \n", alloc_hash.count ); direct_hash_iterate( &alloc_hash, local_alloc_hash_iterator, &total ); } direct_mutex_unlock( &alloc_lock ); if (total) direct_log_printf( NULL, "%7lu bytes in total\n", total ); } /**********************************************************************************************************************/ __dfb_no_instrument_function__ static __inline__ MemDesc * fill_mem_desc( MemDesc *desc, int bytes, const char *func, const char *file, int line, DirectTraceBuffer *trace ) { D_ASSERT( desc != NULL ); desc->mem = desc + 1; desc->bytes = bytes; desc->func = func; desc->file = file; desc->line = line; desc->trace = trace; return desc; } /**********************************************************************************************************************/ void * direct_dbg_malloc( const char* file, int line, const char *func, size_t bytes ) { void *mem; unsigned long *val; D_DEBUG_AT( Direct_Mem, " +"_ZUn(6)" bytes [%s:%d in %s()]\n", bytes, file, line, func ); if (direct_config->debugmem) { MemDesc *desc; mem = direct_malloc( bytes + sizeof(MemDesc) ); D_DEBUG_AT( Direct_Mem, " '-> %p\n", mem ); if (!mem) return NULL; desc = fill_mem_desc( mem, bytes, func, file, line, direct_trace_copy_buffer(NULL) ); direct_mutex_lock( &alloc_lock ); direct_hash_insert( &alloc_hash, (unsigned long) desc->mem, desc ); direct_mutex_unlock( &alloc_lock ); return desc->mem; } mem = direct_malloc( bytes + DISABLED_OFFSET ); if (!mem) return NULL; D_DEBUG_AT( Direct_Mem, " '-> %p\n", mem ); val = mem; val[0] = ~0; return (char*) mem + DISABLED_OFFSET; } void * direct_dbg_calloc( const char* file, int line, const char *func, size_t count, size_t bytes ) { void *mem; unsigned long *val; D_DEBUG_AT( Direct_Mem, " +"_ZUn(6)" bytes [%s:%d in %s()]\n", count * bytes, file, line, func ); if (direct_config->debugmem) { MemDesc *desc; mem = direct_calloc( 1, count * bytes + sizeof(MemDesc) ); D_DEBUG_AT( Direct_Mem, " '-> %p\n", mem ); if (!mem) return NULL; desc = fill_mem_desc( mem, count * bytes, func, file, line, direct_trace_copy_buffer(NULL) ); direct_mutex_lock( &alloc_lock ); direct_hash_insert( &alloc_hash, (unsigned long) desc->mem, desc ); direct_mutex_unlock( &alloc_lock ); return desc->mem; } mem = direct_calloc( 1, count * bytes + DISABLED_OFFSET ); D_DEBUG_AT( Direct_Mem, " '-> %p\n", mem ); if (!mem) return NULL; val = mem; val[0] = ~0; return (char*) mem + DISABLED_OFFSET; } void * direct_dbg_realloc( const char *file, int line, const char *func, const char *what, void *mem, size_t bytes ) { unsigned long *val; MemDesc *desc; D_DEBUG_AT( Direct_Mem, " *"_ZUn(6)" bytes [%s:%d in %s()] '%s' <- %p\n", bytes, file, line, func, what, mem ); if (!mem) return direct_dbg_malloc( file, line, func, bytes ); if (!bytes) { direct_dbg_free( file, line, func, what, mem ); return NULL; } val = (unsigned long*)((char*) mem - DISABLED_OFFSET); if (val[0] == ~0) { D_DEBUG_AT( Direct_Mem, " *"_ZUn(6)" bytes [%s:%d in %s()] '%s'\n", bytes, file, line, func, what ); val = direct_realloc( val, bytes + DISABLED_OFFSET ); D_DEBUG_AT( Direct_Mem, " '-> %p\n", val ); if (val) { D_ASSERT( val[0] == ~0 ); mem = val; return (char*) mem + DISABLED_OFFSET; } return NULL; } /* Debug only. */ direct_mutex_lock( &alloc_lock ); desc = (MemDesc*)((char*) mem - sizeof(MemDesc)); D_ASSERT( desc->mem == mem ); if (direct_hash_remove( &alloc_hash, (unsigned long) mem )) { D_ERROR( "Direct/Mem: Not reallocating unknown %p (%s) from [%s:%d in %s()] - corrupt/incomplete list?\n", mem, what, file, line, func ); mem = direct_dbg_malloc( file, line, func, bytes ); } else { void *new_mem = direct_realloc( desc, bytes + sizeof(MemDesc) ); D_DEBUG_AT( Direct_Mem, " '-> %p\n", new_mem ); D_DEBUG_AT( Direct_Mem, " %c"_ZUn(6)" bytes [%s:%d in %s()] (%s"_ZU") <- %p -> %p '%s'\n", (bytes > desc->bytes) ? '>' : '<', bytes, file, line, func, (bytes > desc->bytes) ? "+" : "", bytes - desc->bytes, mem, new_mem, what); if (desc->trace) { direct_trace_free_buffer( desc->trace ); desc->trace = NULL; } if (!new_mem) D_WARN( "could not reallocate memory (%p: "_ZU"->"_ZU")", mem, desc->bytes, bytes ); else desc = fill_mem_desc( new_mem, bytes, func, file, line, direct_trace_copy_buffer(NULL) ); mem = desc->mem; } direct_mutex_unlock( &alloc_lock ); return mem; } char * direct_dbg_strdup( const char* file, int line, const char *func, const char *string ) { void *mem; unsigned long *val; size_t bytes = string ? direct_strlen( string ) + 1 : 1; D_DEBUG_AT( Direct_Mem, " +"_ZUn(6)" bytes [%s:%d in %s()] <- \"%30s\"\n", bytes, file, line, func, string ); if (direct_config->debugmem) { MemDesc *desc; mem = direct_malloc( bytes + sizeof(MemDesc) ); D_DEBUG_AT( Direct_Mem, " '-> %p\n", mem ); if (!mem) return NULL; desc = fill_mem_desc( mem, bytes, func, file, line, direct_trace_copy_buffer(NULL) ); direct_mutex_lock( &alloc_lock ); direct_hash_insert( &alloc_hash, (unsigned long) desc->mem, desc ); direct_mutex_unlock( &alloc_lock ); if (string) direct_memcpy( desc->mem, string, bytes ); else *(u8*)desc->mem = 0; return desc->mem; } mem = direct_malloc( bytes + DISABLED_OFFSET ); D_DEBUG_AT( Direct_Mem, " '-> %p\n", mem ); if (!mem) return NULL; val = mem; val[0] = ~0; if (string) direct_memcpy( (char*) mem + DISABLED_OFFSET, string, bytes ); else *((u8*)mem + DISABLED_OFFSET) = 0; return (char*) mem + DISABLED_OFFSET; } void direct_dbg_free( const char *file, int line, const char *func, const char *what, void *mem ) { unsigned long *val; MemDesc *desc; if (!mem) { // D_WARN( "%s (NULL) called", __FUNCTION__ ); return; } val = (unsigned long*)((char*) mem - DISABLED_OFFSET); if (val[0] == ~0) { D_DEBUG_AT( Direct_Mem, " - number of bytes of %s [%s:%d in %s()] -> %p\n", what, file, line, func, mem ); val[0] = 0; direct_free( val ); return; } /* Debug only. */ direct_mutex_lock( &alloc_lock ); desc = (MemDesc*)((char*) mem - sizeof(MemDesc)); D_ASSERT( desc->mem == mem ); if (direct_hash_remove( &alloc_hash, (unsigned long) mem )) { D_ERROR( "Direct/Mem: Not freeing unknown %p (%s) from [%s:%d in %s()] - corrupt/incomplete list?\n", mem, what, file, line, func ); } else { D_DEBUG_AT( Direct_Mem, " -"_ZUn(6)" bytes [%s:%d in %s()] -> %p '%s'\n", desc->bytes, file, line, func, mem, what ); if (desc->trace) direct_trace_free_buffer( desc->trace ); direct_free( desc ); } direct_mutex_unlock( &alloc_lock ); } /**********************************************************************************************************************/ #else void __D_mem_init() { } void __D_mem_deinit() { } void direct_print_memleaks( void ) { } #endif DirectFB-1.7.7/lib/direct/Mutex.h0000644000175000017500000000415512313366376013403 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 ___Direct__Mutex__H___ #define ___Direct__Mutex__H___ #include #ifdef __cplusplus extern "C" { #endif #include #ifdef __cplusplus } namespace Direct { class Mutex { public: Mutex() { direct_mutex_init( &mutex ); } ~Mutex() { direct_mutex_deinit( &mutex ); } void lock() { direct_mutex_lock( &mutex ); } void unlock() { direct_mutex_unlock( &mutex ); } class Lock { public: Lock( Mutex &mutex ) : mutex( mutex ) { mutex.lock(); } ~Lock() { mutex.unlock(); } private: Mutex &mutex; }; private: DirectMutex mutex; }; } #endif // __cplusplus #endif DirectFB-1.7.7/lib/direct/types.h0000644000175000017500000000753012313366376013445 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__TYPES_H__ #define __DIRECT__TYPES_H__ #include #ifdef WIN32 // The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the DIRECT_EXPORTS // symbol defined on the command line. This symbol should not be defined on any project // that uses this DLL. This way any other project whose source files include this file see // DIRECT_API functions as being imported from a DLL, whereas this DLL sees symbols // defined with this macro as being exported. #ifdef DIRECT_EXPORTS #define DIRECT_API __declspec(dllexport) #else #define DIRECT_API __declspec(dllimport) #endif #else #define DIRECT_API #endif #include /**********************************************************************************************************************/ /* * Return value of enumeration callbacks */ typedef enum { DENUM_OK = 0x00000000, /* Proceed with enumeration */ DENUM_CANCEL = 0x00000001, /* Cancel enumeration */ DENUM_REMOVE = 0x00000002 /* Remove item */ } DirectEnumerationResult; typedef struct __D_DirectCleanupHandler DirectCleanupHandler; typedef struct __D_DirectConfig DirectConfig; typedef struct __D_DirectFifo DirectFifo; typedef struct __D_DirectFifoItem DirectFifoItem; typedef struct __D_DirectFile DirectFile; typedef struct __D_DirectHash DirectHash; typedef struct __D_DirectOnce DirectOnce; typedef struct __D_DirectLink DirectLink; typedef struct __D_DirectLog DirectLog; typedef struct __D_DirectMap DirectMap; typedef struct __D_DirectModuleDir DirectModuleDir; typedef struct __D_DirectModuleEntry DirectModuleEntry; typedef struct __D_DirectMutex DirectMutex; typedef struct __D_DirectProcessor DirectProcessor; typedef struct __D_DirectSerial DirectSerial; typedef struct __D_DirectSignalHandler DirectSignalHandler; typedef struct __D_DirectStream DirectStream; typedef struct __D_DirectTLS DirectTLS; typedef struct __D_DirectTraceBuffer DirectTraceBuffer; typedef struct __D_DirectTree DirectTree; typedef struct __D_DirectThread DirectThread; typedef struct __D_DirectThreadHandle DirectThreadHandle; typedef struct __D_DirectThreadInitHandler DirectThreadInitHandler; typedef struct __D_DirectWaitQueue DirectWaitQueue; typedef void D_String; #endif DirectFB-1.7.7/lib/direct/direct.pc.in0000644000175000017500000000050512171403127014312 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ moduledir=@MODULEDIR@ moduledirname=@MODULEDIRNAME@ includedir=@includedir@ Name: Direct Description: DirectFB base development library Version: @VERSION@ Libs: -L${libdir} -ldirect @THREADLIB@ Libs.private: -L${libdir} @DYNLIB@ Cflags: @THREADFLAGS@ -I@INCLUDEDIR@ DirectFB-1.7.7/lib/direct/print.c0000644000175000017500000000657712254435330013431 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include /**********************************************************************************************************************/ __dfb_no_instrument_function__ int direct_vsnprintf( char *buffer, size_t bytes, const char *format, va_list args ) { return vsnprintf( buffer, bytes, format, args ); } /**********************************************************************************************************************/ int direct_snprintf( char *buffer, size_t bytes, const char *format, ... ) { int ret; va_list args; va_start( args, format ); ret = direct_vsnprintf( buffer, bytes, format, args ); va_end( args ); return ret; } /**********************************************************************************************************************/ /**********************************************************************************************************************/ DirectResult direct_print( char *buf, size_t size, const char *format, va_list args, char **ret_ptr ) { int len = 1; *ret_ptr = buf; if (buf) { buf[0] = 0; #ifdef __GNUC__ va_list args_copy; va_copy( args_copy, args ); len = direct_vsnprintf( buf, size, format, args_copy ); va_end( args_copy ); #else len = direct_vsnprintf( buf, size, format, args ); #endif if (len < 0) return DR_FAILURE; } else size = 0; if (len >= (int) size) { char *ptr = buf; ptr = direct_malloc( len+1 ); if (!ptr) return DR_NOLOCALMEMORY; len = direct_vsnprintf( ptr, len+1, format, args ); if (len < 0) { direct_free( ptr ); return DR_FAILURE; } *ret_ptr = ptr; } return DR_OK; } DirectFB-1.7.7/lib/direct/build.h0000644000175000017500000000415412466665336013406 00000000000000/* (c) Copyright 2001-2011 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Hundt , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__BUILD_H__ #define __DIRECT__BUILD_H__ #define DIRECT_OS_LINUX_GNU_LIBC (0) #define DIRECT_OS_LINUX_KERNEL (1) #define DIRECT_OS_PSP (2) #define DIRECT_OS_WIN32 (3) #define DIRECT_OS_FAMOS (4) #define DIRECT_BUILD_DEBUG (1) #define DIRECT_BUILD_DEBUGS (1) #define DIRECT_BUILD_TRACE (1) #define DIRECT_BUILD_TEXT (1) #define DIRECT_BUILD_GETTID (1) #define DIRECT_BUILD_NETWORK (1) #define DIRECT_BUILD_STDBOOL (1) #define DIRECT_BUILD_DYNLOAD (1) #define DIRECT_BUILD_MULTICORE (1) #define DIRECT_BUILD_OSTYPE (DIRECT_OS_LINUX_GNU_LIBC) #define DIRECT_BUILD_GCC_ATOMICS (0) #if !DIRECT_BUILD_DEBUGS #if defined(DIRECT_ENABLE_DEBUG) || defined(DIRECT_FORCE_DEBUG) #define DIRECT_MINI_DEBUG #endif #undef DIRECT_ENABLE_DEBUG #ifdef DIRECT_FORCE_DEBUG #warning DIRECT_FORCE_DEBUG used with 'pure release' library headers. #undef DIRECT_FORCE_DEBUG #endif #endif #endif DirectFB-1.7.7/lib/direct/armasm_memcpy.S0000644000175000017500000002056212171403127015072 00000000000000/* * ARM memcpy asm replacement. * * Copyright (C) 2009 Bluush Dev Team. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser 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 #if USE_ARMASM && !WORDS_BIGENDIAN #define _LABEL(f) f : .global direct_armasm_memcpy .code 32 _LABEL(direct_armasm_memcpy) cmp r1, r0 bcc Lmemcpy_backwards moveq r0, #0 moveq pc, lr stmdb sp!, {r0, lr} subs r2, r2, #4 blt Lmemcpy_fl4 ands r12, r0, #3 bne Lmemcpy_fdestul ands r12, r1, #3 bne Lmemcpy_fsrcul _LABEL(Lmemcpy_ft8) subs r2, r2, #8 blt Lmemcpy_fl12 subs r2, r2, #0x14 blt Lmemcpy_fl32 stmdb sp!, {r4} _LABEL(Lmemcpy_floop32) ldmia r1!, {r3, r4, r12, lr} stmia r0!, {r3, r4, r12, lr} ldmia r1!, {r3, r4, r12, lr} stmia r0!, {r3, r4, r12, lr} subs r2, r2, #0x20 bge Lmemcpy_floop32 cmn r2, #0x10 ldmgeia r1!, {r3, r4, r12, lr} stmgeia r0!, {r3, r4, r12, lr} subge r2, r2, #0x10 ldmia sp!, {r4} _LABEL(Lmemcpy_fl32) adds r2, r2, #0x14 _LABEL(Lmemcpy_floop12) ldmgeia r1!, {r3, r12, lr} stmgeia r0!, {r3, r12, lr} subges r2, r2, #0x0c bge Lmemcpy_floop12 _LABEL(Lmemcpy_fl12) adds r2, r2, #8 blt Lmemcpy_fl4 subs r2, r2, #4 ldrlt r3, [r1], #4 strlt r3, [r0], #4 ldmgeia r1!, {r3, r12} stmgeia r0!, {r3, r12} subge r2, r2, #4 _LABEL(Lmemcpy_fl4) adds r2, r2, #4 ldmeqia sp!, {r0, pc} cmp r2, #2 ldrb r3, [r1], #1 strb r3, [r0], #1 ldrgeb r3, [r1], #1 strgeb r3, [r0], #1 ldrgtb r3, [r1], #1 strgtb r3, [r0], #1 ldmia sp!, {r0, pc} _LABEL(Lmemcpy_fdestul) rsb r12, r12, #4 cmp r12, #2 ldrb r3, [r1], #1 strb r3, [r0], #1 ldrgeb r3, [r1], #1 strgeb r3, [r0], #1 ldrgtb r3, [r1], #1 strgtb r3, [r0], #1 subs r2, r2, r12 blt Lmemcpy_fl4 ands r12, r1, #3 beq Lmemcpy_ft8 _LABEL(Lmemcpy_fsrcul) bic r1, r1, #3 ldr lr, [r1], #4 cmp r12, #2 bgt Lmemcpy_fsrcul3 beq Lmemcpy_fsrcul2 cmp r2, #0x0c blt Lmemcpy_fsrcul1loop4 sub r2, r2, #0x0c stmdb sp!, {r4, r5} _LABEL(Lmemcpy_fsrcul1loop16) mov r3, lr, lsr #8 ldmia r1!, {r4, r5, r12, lr} orr r3, r3, r4, lsl #24 mov r4, r4, lsr #8 orr r4, r4, r5, lsl #24 mov r5, r5, lsr #8 orr r5, r5, r12, lsl #24 mov r12, r12, lsr #8 orr r12, r12, lr, lsl #24 stmia r0!, {r3-r5, r12} subs r2, r2, #0x10 bge Lmemcpy_fsrcul1loop16 ldmia sp!, {r4, r5} adds r2, r2, #0x0c blt Lmemcpy_fsrcul1l4 _LABEL(Lmemcpy_fsrcul1loop4) mov r12, lr, lsr #8 ldr lr, [r1], #4 orr r12, r12, lr, lsl #24 str r12, [r0], #4 subs r2, r2, #4 bge Lmemcpy_fsrcul1loop4 _LABEL(Lmemcpy_fsrcul1l4) sub r1, r1, #3 b Lmemcpy_fl4 _LABEL(Lmemcpy_fsrcul2) cmp r2, #0x0c blt Lmemcpy_fsrcul2loop4 sub r2, r2, #0x0c stmdb sp!, {r4, r5} _LABEL(Lmemcpy_fsrcul2loop16) mov r3, lr, lsr #16 ldmia r1!, {r4, r5, r12, lr} orr r3, r3, r4, lsl #16 mov r4, r4, lsr #16 orr r4, r4, r5, lsl #16 mov r5, r5, lsr #16 orr r5, r5, r12, lsl #16 mov r12, r12, lsr #16 orr r12, r12, lr, lsl #16 stmia r0!, {r3-r5, r12} subs r2, r2, #0x10 bge Lmemcpy_fsrcul2loop16 ldmia sp!, {r4, r5} adds r2, r2, #0x0c blt Lmemcpy_fsrcul2l4 _LABEL(Lmemcpy_fsrcul2loop4) mov r12, lr, lsr #16 ldr lr, [r1], #4 orr r12, r12, lr, lsl #16 str r12, [r0], #4 subs r2, r2, #4 bge Lmemcpy_fsrcul2loop4 _LABEL(Lmemcpy_fsrcul2l4) sub r1, r1, #2 b Lmemcpy_fl4 _LABEL(Lmemcpy_fsrcul3) cmp r2, #0x0c blt Lmemcpy_fsrcul3loop4 sub r2, r2, #0x0c stmdb sp!, {r4, r5} _LABEL(Lmemcpy_fsrcul3loop16) mov r3, lr, lsr #24 ldmia r1!, {r4, r5, r12, lr} orr r3, r3, r4, lsl #8 mov r4, r4, lsr #24 orr r4, r4, r5, lsl #8 mov r5, r5, lsr #24 orr r5, r5, r12, lsl #8 mov r12, r12, lsr #24 orr r12, r12, lr, lsl #8 stmia r0!, {r3-r5, r12} subs r2, r2, #0x10 bge Lmemcpy_fsrcul3loop16 ldmia sp!, {r4, r5} adds r2, r2, #0x0c blt Lmemcpy_fsrcul3l4 _LABEL(Lmemcpy_fsrcul3loop4) mov r12, lr, lsr #24 ldr lr, [r1], #4 orr r12, r12, lr, lsl #8 str r12, [r0], #4 subs r2, r2, #4 bge Lmemcpy_fsrcul3loop4 _LABEL(Lmemcpy_fsrcul3l4) sub r1, r1, #1 b Lmemcpy_fl4 _LABEL(Lmemcpy_backwards) add r1, r1, r2 add r0, r0, r2 subs r2, r2, #4 blt Lmemcpy_bl4 ands r12, r0, #3 bne Lmemcpy_bdestul ands r12, r1, #3 bne Lmemcpy_bsrcul _LABEL(Lmemcpy_bt8) subs r2, r2, #8 blt Lmemcpy_bl12 stmdb sp!, {r4, lr} subs r2, r2, #0x14 blt Lmemcpy_bl32 _LABEL(Lmemcpy_bloop32) ldmdb r1!, {r3, r4, r12, lr} stmdb r0!, {r3, r4, r12, lr} ldmdb r1!, {r3, r4, r12, lr} stmdb r0!, {r3, r4, r12, lr} subs r2, r2, #0x20 bge Lmemcpy_bloop32 _LABEL(Lmemcpy_bl32) cmn r2, #0x10 ldmgedb r1!, {r3, r4, r12, lr} stmgedb r0!, {r3, r4, r12, lr} subge r2, r2, #0x10 adds r2, r2, #0x14 ldmgedb r1!, {r3, r12, lr} stmgedb r0!, {r3, r12, lr} subge r2, r2, #0x0c ldmia sp!, {r4, lr} _LABEL(Lmemcpy_bl12) adds r2, r2, #8 blt Lmemcpy_bl4 subs r2, r2, #4 ldrlt r3, [r1, #-4]! strlt r3, [r0, #-4]! ldmgedb r1!, {r3, r12} stmgedb r0!, {r3, r12} subge r2, r2, #4 _LABEL(Lmemcpy_bl4) adds r2, r2, #4 moveq pc, lr cmp r2, #2 ldrb r3, [r1, #-1]! strb r3, [r0, #-1]! ldrgeb r3, [r1, #-1]! strgeb r3, [r0, #-1]! ldrgtb r3, [r1, #-1]! strgtb r3, [r0, #-1]! mov pc, lr _LABEL(Lmemcpy_bdestul) cmp r12, #2 ldrb r3, [r1, #-1]! strb r3, [r0, #-1]! ldrgeb r3, [r1, #-1]! strgeb r3, [r0, #-1]! ldrgtb r3, [r1, #-1]! strgtb r3, [r0, #-1]! subs r2, r2, r12 blt Lmemcpy_bl4 ands r12, r1, #3 beq Lmemcpy_bt8 _LABEL(Lmemcpy_bsrcul) bic r1, r1, #3 ldr r3, [r1, #0] cmp r12, #2 blt Lmemcpy_bsrcul1 beq Lmemcpy_bsrcul2 cmp r2, #0x0c blt Lmemcpy_bsrcul3loop4 sub r2, r2, #0x0c stmdb sp!, {r4, r5, lr} _LABEL(Lmemcpy_bsrcul3loop16) mov lr, r3, lsl #8 ldmdb r1!, {r3-r5, r12} orr lr, lr, r12, lsr #24 mov r12, r12, lsl #8 orr r12, r12, r5, lsr #24 mov r5, r5, lsl #8 orr r5, r5, r4, lsr #24 mov r4, r4, lsl #8 orr r4, r4, r3, lsr #24 stmdb r0!, {r4, r5, r12, lr} subs r2, r2, #0x10 bge Lmemcpy_bsrcul3loop16 ldmia sp!, {r4, r5, lr} adds r2, r2, #0x0c blt Lmemcpy_bsrcul3l4 _LABEL(Lmemcpy_bsrcul3loop4) mov r12, r3, lsl #8 ldr r3, [r1, #-4]! orr r12, r12, r3, lsr #24 str r12, [r0, #-4]! subs r2, r2, #4 bge Lmemcpy_bsrcul3loop4 _LABEL(Lmemcpy_bsrcul3l4) add r1, r1, #3 b Lmemcpy_bl4 _LABEL(Lmemcpy_bsrcul2) cmp r2, #0x0c blt Lmemcpy_bsrcul2loop4 sub r2, r2, #0x0c stmdb sp!, {r4, r5, lr} _LABEL(Lmemcpy_bsrcul2loop16) mov lr, r3, lsl #16 ldmdb r1!, {r3-r5, r12} orr lr, lr, r12, lsr #16 mov r12, r12, lsl #16 orr r12, r12, r5, lsr #16 mov r5, r5, lsl #16 orr r5, r5, r4, lsr #16 mov r4, r4, lsl #16 orr r4, r4, r3, lsr #16 stmdb r0!, {r4, r5, r12, lr} subs r2, r2, #0x10 bge Lmemcpy_bsrcul2loop16 ldmia sp!, {r4, r5, lr} adds r2, r2, #0x0c blt Lmemcpy_bsrcul2l4 _LABEL(Lmemcpy_bsrcul2loop4) mov r12, r3, lsl #16 ldr r3, [r1, #-4]! orr r12, r12, r3, lsr #16 str r12, [r0, #-4]! subs r2, r2, #4 bge Lmemcpy_bsrcul2loop4 _LABEL(Lmemcpy_bsrcul2l4) add r1, r1, #2 b Lmemcpy_bl4 _LABEL(Lmemcpy_bsrcul1) cmp r2, #0x0c blt Lmemcpy_bsrcul1loop4 sub r2, r2, #0x0c stmdb sp!, {r4, r5, lr} _LABEL(Lmemcpy_bsrcul1loop32) mov lr, r3, lsl #24 ldmdb r1!, {r3-r5, r12} orr lr, lr, r12, lsr #8 mov r12, r12, lsl #24 orr r12, r12, r5, lsr #8 mov r5, r5, lsl #24 orr r5, r5, r4, lsr #8 mov r4, r4, lsl #24 orr r4, r4, r3, lsr #8 stmdb r0!, {r4, r5, r12, lr} subs r2, r2, #0x10 bge Lmemcpy_bsrcul1loop32 ldmia sp!, {r4, r5, lr} adds r2, r2, #0x0c blt Lmemcpy_bsrcul1l4 _LABEL(Lmemcpy_bsrcul1loop4) mov r12, r3, lsl #24 ldr r3, [r1, #-4]! orr r12, r12, r3, lsr #8 str r12, [r0, #-4]! subs r2, r2, #4 bge Lmemcpy_bsrcul1loop4 _LABEL(Lmemcpy_bsrcul1l4) add r1, r1, #1 b Lmemcpy_bl4 .ltorg #endif /* USE_ARMASM && !WORDS_BIGENDIAN */ DirectFB-1.7.7/lib/direct/Makefile.am0000644000175000017500000000641612463500054014153 00000000000000## Makefile.am for DirectFB/lib/direct SUBDIRS = os INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib AM_CPPFLAGS = \ -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" \ -DMODULEDIR=\"${RUNTIME_SYSROOT}@MODULEDIR@\" pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = direct.pc EXTRA_DIST = \ kernelmod.c \ armasm_memcpy.S \ armasm_memcpy.h \ ppcasm_memcpy.S \ ppcasm_memcpy_cachable.S \ ppcasm_memcpy.h \ ppc_asm.h if BUILDPPCASM if HAVE_LINUX ppcasm_sources = ppcasm_memcpy.S ppcasm_memcpy_cachable.S else ppcasm_sources = ppcasm_memcpy.S endif ppcasm_headers = ppcasm_memcpy.h ppc_asm.h endif if BUILDARMASM armasm_sources = armasm_memcpy.S armasm_header = armasm_memcpy.h endif # If the old location isn't cleared, builds of external modules fail install-exec-local: rm -rf $(DESTDIR)$(INTERNALINCLUDEDIR)/direct includedir = @INCLUDEDIR@/direct include_HEADERS = \ $(ppcasm_headers) \ $(armasm_headers) \ Lists.h \ LockWQ.h \ Magic.h \ Mutex.h \ Performer.h \ String.h \ TLSObject.h \ ToString.h \ Types++.h \ atomic.h \ build.h \ clock.h \ compiler.h \ conf.h \ debug.h \ direct.h \ fastlz.h \ fifo.h \ filesystem.h \ flz.h \ hash.h \ init.h \ interface.h \ interface_implementation.h \ list.h \ log.h \ log_domain.h \ map.h \ mem.h \ memcpy.h \ messages.h \ modules.h \ perf.h \ print.h \ processor.h \ result.h \ serial.h \ signals.h \ stream.h \ system.h \ thread.h \ trace.h \ tree.h \ types.h \ utf8.h \ util.h \ uuid.h lib_LTLIBRARIES = libdirect.la libdirect_la_SOURCES = \ $(ppcasm_sources) \ $(armasm_sources) \ String.cpp \ clock.c \ conf.c \ debug.c \ direct.c \ direct_result.c \ fastlz.c \ fifo.c \ flz.c \ hash.c \ init.c \ interface.c \ list.c \ log.c \ log_domain.c \ map.c \ mem.c \ memcpy.c \ messages.c \ modules.c \ perf.c \ print.c \ processor.c \ result.c \ serial.c \ signals.c \ stream.c \ system.c \ trace.c \ tree.c \ thread.c \ utf8.c \ util.c \ uuid.c libdirect_la_LIBADD = \ os/linux/glibc/libdirect_os_linux_glibc.la \ -lstdc++ libdirect_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -release $(LT_RELEASE) \ $(DFB_LDFLAGS) MKRESULT = $(top_srcdir)/tools/mkresult.sh direct_result.c: $(srcdir)/result.h $(MKRESULT) @echo '#include ' > $@ @echo >> $@ @echo '#include ' >> $@ @echo >> $@ @echo >> $@ @$(MKRESULT) DirectResult DR $< >> $@ @echo >> $@ # ## and now rebuild the static version with the *correct* object files # if BUILD_STATIC clean-local: rm -f libdirect_fixed.a all-local: libdirect_fixed.a libdirect_fixed.a: .libs/libdirect.a rm -f libdirect_fixed.a ${AR} cru libdirect_fixed.a `find . -name "*.o" | grep -v '.libs' | grep -v dtest` ${RANLIB} libdirect_fixed.a cp -pf libdirect_fixed.a .libs/libdirect.a .libs/libdirect.a: libdirect.la else clean-local: all-local: endif include $(top_srcdir)/rules/nmfile.make DirectFB-1.7.7/lib/direct/messages.c0000644000175000017500000001560612313366376014106 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include /**********************************************************************************************************************/ #if DIRECT_BUILD_TEXT __dfb_no_instrument_function__ void direct_messages_info( const char *format, ... ) { char buf[512]; char *ptr = buf; int len; va_list ap; va_start( ap, format ); len = direct_vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); if (len < 0) return; if (len >= sizeof(buf)) { ptr = direct_malloc( len+1 ); if (!ptr) return; va_start( ap, format ); len = direct_vsnprintf( ptr, len+1, format, ap ); va_end( ap ); if (len < 0) { direct_free( ptr ); return; } } direct_log_printf( NULL, "(*) %s", ptr ); if (direct_config->fatal_messages & DMT_INFO) direct_trap( "Info", SIGABRT ); if (ptr != buf) direct_free( ptr ); } __dfb_no_instrument_function__ void direct_messages_error( const char *format, ... ) { char buf[512]; char *ptr = buf; int len; va_list ap; va_start( ap, format ); len = direct_vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); if (len < 0) return; if (len >= sizeof(buf)) { ptr = direct_malloc( len+1 ); if (!ptr) return; va_start( ap, format ); len = direct_vsnprintf( ptr, len+1, format, ap ); va_end( ap ); if (len < 0) { direct_free( ptr ); return; } } direct_log_printf( NULL, "(!) %s", ptr ); direct_trace_print_stack( NULL ); if (direct_config->fatal_messages & DMT_ERROR) direct_trap( "Error", SIGABRT ); if (ptr != buf) direct_free( ptr ); } __dfb_no_instrument_function__ void direct_messages_derror( DirectResult result, const char *format, ... ) { char buf[512]; va_list ap; va_start( ap, format ); direct_vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); direct_log_printf( NULL, "(!) %s --> %s\n", buf, DirectResultString( result ) ); direct_trace_print_stack( NULL ); if (direct_config->fatal_messages & DMT_ERROR) direct_trap( "DError", SIGABRT ); } __dfb_no_instrument_function__ void direct_messages_perror( int erno, const char *format, ... ) { char buf[512]; va_list ap; va_start( ap, format ); direct_vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); direct_log_printf( NULL, "(!) %s --> %s\n", buf, direct_strerror( erno ) ); direct_trace_print_stack( NULL ); if (direct_config->fatal_messages & DMT_ERROR) direct_trap( "PError", SIGABRT ); } __dfb_no_instrument_function__ void direct_messages_dlerror( const char *dlerr, const char *format, ... ) { char buf[512]; va_list ap; va_start( ap, format ); direct_vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); direct_log_printf( NULL, "(!) %s --> %s\n", buf, dlerr ); direct_trace_print_stack( NULL ); if (direct_config->fatal_messages & DMT_ERROR) direct_trap( "DlError", SIGABRT ); } __dfb_no_instrument_function__ void direct_messages_once( const char *func, const char *file, int line, const char *format, ... ) { char buf[512]; va_list ap; va_start( ap, format ); direct_vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); direct_log_printf( NULL, " (!!!) *** ONCE [%s] *** [%s:%d in %s()]\n", buf, file, line, func ); direct_trace_print_stack( NULL ); if (direct_config->fatal_messages & DMT_ONCE) direct_trap( "Once", SIGABRT ); } __dfb_no_instrument_function__ void direct_messages_unimplemented( const char *func, const char *file, int line ) { direct_log_printf( NULL, " (!!!) *** UNIMPLEMENTED [%s] *** [%s:%d]\n", func, file, line ); direct_trace_print_stack( NULL ); if (direct_config->fatal_messages & DMT_UNIMPLEMENTED) direct_trap( "Unimplemented", SIGABRT ); } __dfb_no_instrument_function__ void direct_messages_bug( const char *func, const char *file, int line, const char *format, ... ) { char buf[512]; va_list ap; va_start( ap, format ); direct_vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); direct_log_printf( NULL, " (!?!) *** BUG [%s] *** [%s:%d in %s()]\n", buf, file, line, func ); direct_trace_print_stack( NULL ); if (direct_config->fatal_messages & DMT_BUG) direct_trap( "Bug", SIGABRT ); } __dfb_no_instrument_function__ void direct_messages_warn( const char *func, const char *file, int line, const char *format, ... ) { char buf[512]; va_list ap; va_start( ap, format ); direct_vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); direct_log_printf( NULL, " (!!!) *** WARNING [%s] *** [%s:%d in %s()]\n", buf, file, line, func ); direct_trace_print_stack( NULL ); if (direct_config->fatal_messages & DMT_WARNING) direct_trap( "Warning", SIGABRT ); } #endif DirectFB-1.7.7/lib/direct/filesystem.h0000644000175000017500000000301312254435330014444 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__FILESYSTEM_H__ #define __DIRECT__FILESYSTEM_H__ #include #include /**********************************************************************************************************************/ #endif DirectFB-1.7.7/lib/direct/hash.h0000644000175000017500000001314212254435330013207 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__HASH_H__ #define __DIRECT__HASH_H__ #include /**********************************************************************************************************************/ typedef struct { unsigned long key; void *value; } DirectHashElement; #define DIRECT_HASH_ELEMENT_REMOVED ((void *) -1) struct __D_DirectHash { int magic; int size; int count; int removed; DirectHashElement *Elements; bool disable_debugging_alloc; }; /**********************************************************************************************************************/ #define DIRECT_HASH_INIT( __size, __disable_debugging_alloc ) \ { \ 0x0b161321, \ (__size < 17 ? 17 : __size), \ 0, \ 0, \ NULL, \ __disable_debugging_alloc \ } /* Hmm, not constant? .magic = D_MAGIC( "DirectHash" ), */ /**********************************************************************************************************************/ #define DIRECT_HASH_ASSERT( hash ) \ do { \ D_MAGIC_ASSERT( hash, DirectHash ); \ D_ASSERT( (hash)->size > 0 ); \ D_ASSERT( (hash)->Elements != NULL || (hash)->count == 0 ); \ D_ASSERT( (hash)->Elements != NULL || (hash)->removed == 0 ); \ D_ASSERT( (hash)->count + (hash)->removed < (hash)->size ); \ } while (0) /**********************************************************************************************************************/ /* * Hash iteration callback, return false to abort iteration. */ typedef bool (*DirectHashIteratorFunc)( DirectHash *hash, unsigned long key, void *value, void *ctx ); /*********************************************************************************************************************** ** Full create including allocation ... */ DirectResult DIRECT_API direct_hash_create ( int size, DirectHash **ret_hash ); void DIRECT_API direct_hash_destroy( DirectHash *hash ); /*********************************************************************************************************************** ** ... or just initialization of static data... */ void DIRECT_API direct_hash_init ( DirectHash *hash, int size ); void DIRECT_API direct_hash_deinit ( DirectHash *hash ); /**********************************************************************************************************************/ int DIRECT_API direct_hash_count ( DirectHash *hash ); DirectResult DIRECT_API direct_hash_insert ( DirectHash *hash, unsigned long key, void *value ); DirectResult DIRECT_API direct_hash_remove ( DirectHash *hash, unsigned long key ); void DIRECT_API *direct_hash_lookup ( const DirectHash *hash, unsigned long key ); void DIRECT_API direct_hash_iterate( DirectHash *hash, DirectHashIteratorFunc func, void *ctx ); #endif DirectFB-1.7.7/lib/direct/thread.c0000644000175000017500000002557112254435330013537 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include D_LOG_DOMAIN( Direct_Thread , "Direct/Thread", "Thread management" ); D_LOG_DOMAIN( Direct_ThreadInit, "Direct/Thread/Init", "Thread initialization" ); /**********************************************************************************************************************/ struct __D_DirectThreadInitHandler { DirectLink link; int magic; DirectThreadInitFunc func; void *arg; }; /**********************************************************************************************************************/ static DirectMutex handler_lock; static DirectLink *handlers; void __D_thread_init() { direct_mutex_init( &handler_lock ); } void __D_thread_deinit() { direct_mutex_deinit( &handler_lock ); } /**********************************************************************************************************************/ DirectThreadInitHandler * direct_thread_add_init_handler( DirectThreadInitFunc func, void *arg ) { DirectThreadInitHandler *handler; handler = D_CALLOC( 1, sizeof(DirectThreadInitHandler) ); if (!handler) { D_WARN( "out of memory" ); return NULL; } handler->func = func; handler->arg = arg; D_MAGIC_SET( handler, DirectThreadInitHandler ); direct_mutex_lock( &handler_lock ); direct_list_append( &handlers, &handler->link ); direct_mutex_unlock( &handler_lock ); return handler; } void direct_thread_remove_init_handler( DirectThreadInitHandler *handler ) { D_MAGIC_ASSERT( handler, DirectThreadInitHandler ); direct_mutex_lock( &handler_lock ); direct_list_remove( &handlers, &handler->link ); direct_mutex_unlock( &handler_lock ); D_MAGIC_CLEAR( handler ); D_FREE( handler ); } void __D_direct_thread_call_init_handlers( DirectThread *thread ) { DirectThreadInitHandler *handler; /* Call all init handlers. */ direct_mutex_lock( &handler_lock ); direct_list_foreach (handler, handlers) handler->func( thread, handler->arg ); direct_mutex_unlock( &handler_lock ); } /**********************************************************************************************************************/ /**********************************************************************************************************************/ DirectThread * direct_thread_create( DirectThreadType thread_type, DirectThreadMainFunc thread_main, void *arg, const char *name ) { DirectThread *thread; D_ASSERT( thread_main != NULL ); D_ASSERT( name != NULL ); D_DEBUG_AT( Direct_Thread, "%s( %s, %p(%p), '%s' )\n", __FUNCTION__, direct_thread_type_name(thread_type), thread_main, arg, name ); /* Allocate thread structure. */ thread = D_CALLOC( 1, sizeof(DirectThread) ); if (!thread) { D_OOM(); return NULL; } /* Write thread information to structure. */ thread->name = D_STRDUP( name ); thread->type = thread_type; thread->main = thread_main; thread->arg = arg; /* Initialize to -1 for synchronization. */ thread->tid = (pid_t) -1; /* Initialize mutex and condition. */ direct_recursive_mutex_init( &thread->lock ); direct_waitqueue_init( &thread->cond ); D_MAGIC_SET( thread, DirectThread ); /* Lock the thread mutex. */ D_DEBUG_AT( Direct_ThreadInit, " -> locking...\n" ); direct_mutex_lock( &thread->lock ); /* Create and run the thread. */ D_DEBUG_AT( Direct_ThreadInit, " -> creating handle...\n" ); direct_thread_init( thread ); /* Wait for completion of the thread's initialization. */ while (!thread->init) { D_DEBUG_AT( Direct_ThreadInit, " -> waiting...\n" ); direct_waitqueue_wait( &thread->cond, &thread->lock ); } D_INFO( "Direct/Thread: Started '%s' (%d) [%s - %s/%d] <%zu>...\n", thread->name, thread->tid, direct_thread_type_name(thread->type), direct_thread_scheduler_name(direct_config->thread_scheduler), thread->priority, thread->stack_size ); D_DEBUG_AT( Direct_ThreadInit, " -> ...thread is running.\n" ); /* Unlock the thread mutex. */ D_DEBUG_AT( Direct_ThreadInit, " -> unlocking...\n" ); direct_mutex_unlock( &thread->lock ); D_DEBUG_AT( Direct_ThreadInit, " -> returning %p\n", thread ); return thread; } /**********************************************************************************************************************/ DirectResult direct_thread_wait( DirectThread *thread, int timeout_ms ) { DirectResult ret; unsigned int old_counter = thread->counter; D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->tid != -1 ); D_ASSUME( !thread->canceled ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d, %dms )\n", __FUNCTION__, thread->main, thread->name, thread->tid, timeout_ms ); while (old_counter == thread->counter && !thread->terminated) { if (timeout_ms <= 0) ret = direct_waitqueue_wait( &thread->cond, &thread->lock ); else ret = direct_waitqueue_wait_timeout( &thread->cond, &thread->lock, timeout_ms * 1000 ); if (ret) return ret; } if (thread->terminated) return DR_DEAD; return DR_OK; } DirectResult direct_thread_notify( DirectThread *thread ) { DirectResult ret; D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->tid != -1 ); D_ASSUME( !thread->canceled ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); ret = direct_mutex_lock( &thread->lock ); if (ret) return ret; thread->counter++; direct_mutex_unlock( &thread->lock ); return direct_waitqueue_broadcast( &thread->cond ); } DirectResult direct_thread_lock( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->tid != -1 ); D_ASSUME( !thread->canceled ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); return direct_mutex_lock( &thread->lock ); } DirectResult direct_thread_unlock( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->tid != -1 ); D_ASSUME( !thread->canceled ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); return direct_mutex_unlock( &thread->lock ); } DirectResult direct_thread_terminate( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->tid != -1 ); D_ASSUME( thread->tid != direct_gettid() ); D_ASSUME( !thread->canceled ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); thread->terminated = true; return direct_thread_notify( thread ); } /**********************************************************************************************************************/ void direct_thread_destroy( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSUME( thread->tid != direct_gettid() ); D_ASSUME( !thread->detached ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); if (thread->detached) { D_DEBUG_AT( Direct_Thread, " -> DETACHED!\n" ); return; } direct_thread_deinit( thread ); D_MAGIC_CLEAR( thread ); D_FREE( thread->name ); D_FREE( thread ); } /******************************************************************************/ pid_t direct_thread_get_tid( const DirectThread *thread ) { return thread->tid; } bool direct_thread_is_canceled( const DirectThread *thread ) { return thread->canceled; } bool direct_thread_is_joined( const DirectThread *thread ) { return thread->joined; } const char * direct_thread_get_name( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->name != NULL ); return thread->name; } /******************************************************************************/ #if DIRECT_BUILD_TEXT const char * direct_thread_type_name( DirectThreadType type ) { switch (type) { case DTT_DEFAULT: return "DEFAULT"; case DTT_CLEANUP: return "CLEANUP"; case DTT_INPUT: return "INPUT"; case DTT_OUTPUT: return "OUTPUT"; case DTT_MESSAGING: return "MESSAGING"; case DTT_CRITICAL: return "CRITICAL"; } return ""; } const char * direct_thread_scheduler_name( DirectConfigThreadScheduler scheduler ) { switch (scheduler) { case DCTS_OTHER: return "OTHER"; case DCTS_FIFO: return "FIFO"; case DCTS_RR: return "RR"; } return ""; } const char * direct_thread_policy_name( int policy ) { switch (policy) { case SCHED_OTHER: return "OTHER"; case SCHED_FIFO: return "FIFO"; case SCHED_RR: return "RR"; } return ""; } #endif DirectFB-1.7.7/lib/direct/Lists.h0000644000175000017500000001402512313366376013374 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 ___Direct__Lists__H___ #define ___Direct__Lists__H___ #include #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #include #include #include namespace Direct { template class List { public: virtual ~List() { } virtual void Append ( const _Item &item ) = 0; virtual void Prepend( const _Item &item ) = 0; virtual void Remove ( const _Item &item ) = 0; virtual size_t Length () const = 0; virtual void Clear () = 0; }; template class ListSimpleSlow : public List<_Item> { public: ListSimpleSlow() : length( 0 ) { } virtual ~ListSimpleSlow() { D_ASSUME( list.empty() ); } virtual void Append( const _Item &item ) { list.push_back( item ); length++; } virtual void Prepend( const _Item &item ) { list.push_front( item ); length++; } virtual void Remove( const _Item &item ) { D_ASSERT( length > 0 ); list.remove( item ); length--; } virtual size_t Length() const { return length; } virtual void Clear() { list.clear(); } typedef typename std::list<_Item>::const_iterator const_iterator; inline const_iterator begin() const { return list.begin(); } inline const_iterator end() const { return list.end(); } private: std::list<_Item> list; size_t length; }; template class ListSimple : public List<_Item> { public: ListSimple() { } virtual ~ListSimple() { D_ASSUME( map.empty() ); } virtual void Append( const _Item &item ) { map[ item ] = item; } virtual void Prepend( const _Item &item ) { map[ item ] = item; } virtual void Remove( const _Item &item ) { map.erase( item ); } virtual size_t Length() const { return map.size(); } virtual void Clear() { map.clear(); } typedef typename std::map<_Item,_Item>::const_iterator const_iterator; inline const_iterator begin() const { return map.begin(); } inline const_iterator end() const { return map.end(); } private: std::map<_Item,_Item> map; }; template class ListLockedSlow : public List<_Item> { public: ListLockedSlow() : length( 0 ) { } virtual ~ListLockedSlow() { D_ASSUME( list.empty() ); } virtual void Append( const _Item &item ) { LockWQ::Lock l1( lwq ); list.push_back( item ); length++; } virtual void Prepend( const _Item &item ) { LockWQ::Lock l1( lwq ); list.push_front( item ); length++; } virtual void Remove( const _Item &item ) { D_ASSERT( length > 0 ); LockWQ::Lock l1( lwq ); list.remove( item ); length--; if (length == 0) lwq.notifyAll(); } virtual size_t Length() const { return length; } virtual void Clear() { LockWQ::Lock l1( lwq ); if (length > 0) { list.clear(); length = 0; lwq.notifyAll(); } } void WaitEmpty() { LockWQ::Lock l1( lwq ); while (!list.empty()) l1.wait(); } private: LockWQ lwq; std::list<_Item> list; size_t length; }; template class ListLocked : public List<_Item> { public: ListLocked() { } virtual ~ListLocked() { D_ASSUME( map.empty() ); } virtual void Append( const _Item &item ) { LockWQ::Lock l1( lwq ); map[ item ] = item; } virtual void Prepend( const _Item &item ) { LockWQ::Lock l1( lwq ); map[ item ] = item; } virtual void Remove( const _Item &item ) { LockWQ::Lock l1( lwq ); map.erase( item ); if (map.empty()) lwq.notifyAll(); } virtual size_t Length() const { return map.size(); } virtual void Clear() { LockWQ::Lock l1( lwq ); if (!map.empty()) { map.clear(); lwq.notifyAll(); } } void WaitEmpty() { LockWQ::Lock l1( lwq ); while (!map.empty()) l1.wait(); } private: LockWQ lwq; std::map<_Item,_Item> map; }; } #endif // __cplusplus #endif DirectFB-1.7.7/lib/direct/trace.c0000644000175000017500000004401012463500054013351 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #if DIRECT_BUILD_TRACE #if DIRECT_BUILD_DYNLOAD #include #endif #define MAX_BUFFERS 200 #define MAX_LEVEL 200 #define NAME_LEN 92 D_LOG_DOMAIN( Direct_Trace, "Direct/Trace", "Trace support" ); /**************************************************************************************************/ typedef enum { TF_NONE = 0x00000000, TF_DEBUG = 0x00000001 } TraceFlags; typedef struct { void *addr; TraceFlags flags; } Trace; struct __D_DirectTraceBuffer { DirectLink link; int magic; pid_t tid; char *name; DirectThread *thread; int level; bool in_trace; Trace trace[MAX_LEVEL]; }; /**************************************************************************************************/ static DirectLink *buffers; static DirectMutex buffers_lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(buffers_lock); /**************************************************************************************************/ __dfb_no_instrument_function__ static inline DirectTraceBuffer * get_trace_buffer( void ) { DirectTraceBuffer *buffer; DirectThread *self = direct_thread_self(); buffer = self->trace_buffer; if (!buffer) { buffer = direct_calloc( 1, sizeof(DirectTraceBuffer) ); if (!buffer) return NULL; buffer->tid = direct_gettid(); buffer->thread = direct_thread_self(); self->trace_buffer = buffer; D_MAGIC_SET( buffer, DirectTraceBuffer ); direct_mutex_lock( &buffers_lock ); direct_list_append( &buffers, &buffer->link ); direct_mutex_unlock( &buffers_lock ); } return buffer; } /**************************************************************************************************/ typedef struct { long offset; char name[NAME_LEN]; } Symbol; typedef struct { DirectLink link; char *filename; Symbol *symbols; int capacity; int num_symbols; } SymbolTable; static DirectLink *tables = NULL; static DirectMutex tables_lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(tables_lock); __dfb_no_instrument_function__ static void add_symbol( SymbolTable *table, long offset, const char *name ) { Symbol *symbol; if (table->num_symbols == table->capacity) { Symbol *symbols; int capacity = table->capacity * 2; if (!capacity) capacity = 256; symbols = direct_malloc( capacity * sizeof(Symbol) ); if (!symbols) { D_WARN( "out of memory" ); return; } direct_memcpy( symbols, table->symbols, table->num_symbols * sizeof(Symbol) ); direct_free( table->symbols ); table->symbols = symbols; table->capacity = capacity; } symbol = &table->symbols[ table->num_symbols++ ]; symbol->offset = offset; direct_snputs( symbol->name, name, NAME_LEN ); } __dfb_no_instrument_function__ static SymbolTable * load_symbols( const char *filename ) { DirectResult ret; SymbolTable *table; DirectFile fp; bool is_pipe = false; char file[1024]; char line[1024]; int command_len; const char *full_path = filename; char *tmp; D_DEBUG_AT( Direct_Trace, "%s( %s )\n", __FUNCTION__, filename ); if (filename) { ret = direct_access( filename, R_OK ); if (ret && ret == DR_FILENOTFOUND) { size_t len = 0; ret = direct_readlink( "/proc/self/exe", file, sizeof(file) - 1, &len ); if (ret) { D_DERROR( ret, "Direct/Trace: direct_readlink( \"/proc/self/exe\" ) failed!\n" ); return NULL; } // Terminator! file[len] = 0; tmp = strrchr( file, '/' ); if (!tmp) return NULL; if (direct_strcmp( filename, tmp + 1 )) return NULL; full_path = file; } } else { size_t len = 0; ret = direct_readlink( "/proc/self/exe", file, sizeof(file) - 1, &len ); if (ret) { D_DERROR( ret, "Direct/Trace: readlink( \"/proc/self/exe\" ) failed!\n" ); return NULL; } // Terminator 2 file[len] = 0; full_path = file; } command_len = direct_strlen( full_path ) + 32; { char command[command_len+1]; /* First check if there's an "nm-n" file. */ tmp = strrchr( full_path, '/' ); if (!tmp) return NULL; *tmp = 0; direct_snprintf( command, command_len, "%s/nm-n.%s", full_path, tmp + 1 ); *tmp = '/'; ret = direct_access( command, R_OK ); if (ret == DR_OK) { ret = direct_file_open( &fp, command, O_RDONLY, 0 ); if (ret) D_DERROR( ret, "Direct/Trace: direct_file_open( \"%s\", \"r\" ) failed!\n", command ); } else { direct_snprintf( command, command_len, "%s.nm", full_path ); ret = direct_access( command, R_OK ); if (ret == DR_OK) { ret = direct_file_open( &fp, command, O_RDONLY, 0 ); if (ret) D_DERROR( ret, "Direct/Trace: direct_file_open( \"%s\", \"r\" ) failed!\n", command ); } } /* Fallback to live mode. */ if (ret) { direct_snprintf( command, command_len, "nm -nC %s", full_path ); if (!direct_config->nm_for_trace) { D_DEBUG_AT( Direct_Trace, "not running '%s', enable via 'nm-for-trace' option\n", command ); return NULL; } D_DEBUG_AT( Direct_Trace, "running '%s'...\n", command ); ret = direct_popen( &fp, command, O_RDONLY ); if (ret) { D_DERROR( ret, "Direct/Trace: direct_popen( \"%s\", \"r\" ) failed!\n", command ); return NULL; } is_pipe = true; } } table = direct_calloc( 1, sizeof(SymbolTable) ); if (!table) { D_OOM(); goto out; } if (filename) table->filename = direct_strdup( filename ); while (direct_fgets( &fp, line, sizeof(line) ) == DR_OK) { int n; int digits = sizeof(long) * 2; long offset = 0; int length = direct_strlen(line); if (line[0] == ' ' || length < (digits + 5) || line[length-1] != '\n') continue; if (line[digits + 1] != 't' && line[digits + 1] != 'T' && line[digits + 1] != 'W') continue; if (line[digits] != ' ' || line[digits + 2] != ' ' || line[digits + 3] == '.') continue; for (n=0; n= '0' && c <= '9') offset |= c - '0'; else offset |= c - 'a' + 10; } line[length-1] = 0; add_symbol( table, offset, line + digits + 3 ); } out: if (is_pipe) direct_pclose( &fp ); else direct_file_close( &fp ); return table; } __dfb_no_instrument_function__ static int compare_symbols(const void *x, const void *y) { return *((const long*) x) - *((const long*) y); } __dfb_no_instrument_function__ static SymbolTable * find_table( const char *filename ) { SymbolTable *table; if (filename) { direct_list_foreach (table, tables) { if (table->filename && !direct_strcmp( filename, table->filename )) return table; } } else { direct_list_foreach (table, tables) { if (!table->filename) return table; } } return NULL; } /**************************************************************************************************/ __dfb_no_instrument_function__ const char * direct_trace_lookup_symbol( const char *filename, long offset ) { Symbol *symbol; SymbolTable *table; direct_mutex_lock( &tables_lock ); table = find_table( filename ); if (!table) { table = load_symbols( filename ); if (!table) { direct_mutex_unlock( &tables_lock ); return false; } direct_list_prepend( &tables, &table->link ); } direct_mutex_unlock( &tables_lock ); symbol = direct_bsearch( &offset, table->symbols, table->num_symbols, sizeof(Symbol), compare_symbols ); return symbol ? symbol->name : NULL; } __dfb_no_instrument_function__ const char * direct_trace_lookup_file( void *address, void **ret_base ) { #if DIRECT_BUILD_DYNLOAD Dl_info info; if (dladdr( address, &info )) { if (ret_base) *ret_base = info.dli_fbase; return info.dli_fname; } else #endif { if (ret_base) *ret_base = NULL; } return NULL; } __dfb_no_instrument_function__ void direct_trace_print_stack( DirectTraceBuffer *buffer ) { #if DIRECT_BUILD_DYNLOAD Dl_info info; #endif int i; int level; D_String *string; if (!direct_config->trace) return; if (!buffer) { buffer = get_trace_buffer(); if (!buffer) return; } if (buffer->in_trace) return; buffer->in_trace = true; level = buffer->level; if (level > MAX_LEVEL) { D_WARN( "only showing %d of %d items", MAX_LEVEL, level ); level = MAX_LEVEL; } else if (level == 0) { buffer->in_trace = false; return; } string = D_String_NewEmpty(); if (!string) return; D_String_PrintF( string, "(-) [%5d: -STACK- '%s']\n", buffer->tid, buffer->thread ? buffer->thread->name : buffer->name ); for (i=level-1; i>=0; i--) { void *fn = buffer->trace[i].addr; #if DIRECT_BUILD_DYNLOAD if (dladdr( fn, &info )) { if (info.dli_fname) { const char *symbol = NULL;//info.dli_sname; if (!symbol) { symbol = direct_trace_lookup_symbol(info.dli_fname, (long)(fn - info.dli_fbase)); if (!symbol) { symbol = direct_trace_lookup_symbol(info.dli_fname, (long)(fn)); if (!symbol) { if (info.dli_sname) symbol = info.dli_sname; else symbol = "??"; } } } D_String_PrintF( string, " #%-2d 0x%08lx in %s () from %s [%p]\n", level - i - 1, (unsigned long) fn, symbol, info.dli_fname, info.dli_fbase ); } else if (info.dli_sname) { D_String_PrintF( string, " #%-2d 0x%08lx in %s ()\n", level - i - 1, (unsigned long) fn, info.dli_sname ); } else D_String_PrintF( string, " #%-2d 0x%08lx in ?? ()\n", level - i - 1, (unsigned long) fn ); } else #endif { const char *symbol = direct_trace_lookup_symbol(NULL, (long)(fn)); D_String_PrintF( string, " #%-2d 0x%08lx in %s ()\n", level - i - 1, (unsigned long) fn, symbol ? symbol : "??" ); } } D_String_PrintF( string, "\n" ); direct_log_write( NULL, D_String_Buffer( string ), D_String_Length( string ) ); D_String_Delete( string ); buffer->in_trace = false; } __dfb_no_instrument_function__ void direct_trace_print_stacks() { DirectTraceBuffer *b; DirectTraceBuffer *buffer = get_trace_buffer(); direct_mutex_lock( &buffers_lock ); if (buffer && buffer->level) direct_trace_print_stack( buffer ); direct_list_foreach (b, buffers) { if (b != buffer && b->level) direct_trace_print_stack( b ); } direct_mutex_unlock( &buffers_lock ); } __dfb_no_instrument_function__ int direct_trace_debug_indent() { int in = 0; DirectTraceBuffer *buffer = get_trace_buffer(); if (buffer) { int level = buffer->level - 1; if (level < 0) return 0; buffer->trace[level--].flags |= TF_DEBUG; for (in=0; level>=0; level--) { // FIXME: optimise by storing indent in trace frame if (buffer->trace[level].flags & TF_DEBUG) in++; } } return in; } __dfb_no_instrument_function__ void * direct_trace_get_caller() { void *caller = NULL; DirectTraceBuffer *buffer = get_trace_buffer(); if (buffer) { int level = buffer->level - 2; if (level >= 0) caller = buffer->trace[level].addr; } return caller; } __dfb_no_instrument_function__ DirectTraceBuffer * direct_trace_copy_buffer( DirectTraceBuffer *buffer ) { int level; DirectTraceBuffer *copy; if (!buffer) { buffer = get_trace_buffer(); if (!buffer) return NULL; } level = buffer->level; if (level > MAX_LEVEL) { D_WARN( "only copying %d of %d items", MAX_LEVEL, level ); level = MAX_LEVEL; } copy = direct_calloc( 1, sizeof(DirectTraceBuffer) - sizeof(Trace) * (MAX_LEVEL - level) ); if (!copy) return NULL; if (buffer->thread && buffer->thread->name) copy->name = direct_strdup( buffer->thread->name ); copy->tid = buffer->tid; copy->level = buffer->level; direct_memcpy( ©->trace[0], &buffer->trace[0], level * sizeof(Trace) ); D_MAGIC_SET( copy, DirectTraceBuffer ); return copy; } __dfb_no_instrument_function__ void direct_trace_free_buffer( DirectTraceBuffer *buffer ) { D_MAGIC_ASSERT( buffer, DirectTraceBuffer ); if (buffer->thread) { direct_mutex_lock( &buffers_lock ); direct_list_remove( &buffers, &buffer->link ); direct_mutex_unlock( &buffers_lock ); buffer->thread = NULL; } if (buffer->name) direct_free( buffer->name ); D_MAGIC_CLEAR( buffer ); direct_free( buffer ); } /**********************************************************************************************************************/ __dfb_no_instrument_function__ void __cyg_profile_func_enter( void *this_fn, void *call_site ); __dfb_no_instrument_function__ void __cyg_profile_func_exit ( void *this_fn, void *call_site ); void __cyg_profile_func_enter( void *this_fn, void *call_site ) { if (direct_config->trace) { DirectTraceBuffer *buffer = get_trace_buffer(); if (buffer) { int level = buffer->level++; Trace *trace = &buffer->trace[level]; if (level < MAX_LEVEL) { trace->addr = this_fn; trace->flags = TF_NONE; } } } } void __cyg_profile_func_exit( void *this_fn, void *call_site ) { if (direct_config->trace) { DirectTraceBuffer *buffer = get_trace_buffer(); if (buffer) { if (buffer->level > 0) buffer->level--; } } } #else const char * direct_trace_lookup_symbol( const char *filename, long offset ) { return NULL; } const char * direct_trace_lookup_file( void *address, void **ret_base ) { if (ret_base) *ret_base = NULL; return NULL; } void direct_trace_print_stack( DirectTraceBuffer *buffer ) { } void direct_trace_print_stacks( void ) { } int direct_trace_debug_indent( void ) { return 0; } void * direct_trace_get_caller( void ) { return NULL; } DirectTraceBuffer * direct_trace_copy_buffer( DirectTraceBuffer *buffer ) { return NULL; } void direct_trace_free_buffer( DirectTraceBuffer *buffer ) { } #endif DirectFB-1.7.7/lib/direct/util.c0000644000175000017500000003354012463500054013236 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include /**********************************************************************************************************************/ static const char *strings_base[150]; #define STRINGS_ADD( index, string ) \ do { \ D_ASSERT( index < D_ARRAY_SIZE(strings_base) ); \ strings_base[index] = string; \ } while (0) void __D_util_init() { STRINGS_ADD( EPERM, "Operation not permitted" ); STRINGS_ADD( ENOENT, "No such file or directory" ); STRINGS_ADD( ESRCH, "No such process" ); STRINGS_ADD( EINTR, "Interrupted system call" ); STRINGS_ADD( EIO, "I/O error" ); STRINGS_ADD( ENXIO, "No such device or address" ); STRINGS_ADD( E2BIG, "Argument list too long" ); STRINGS_ADD( ENOEXEC, "Exec format error" ); STRINGS_ADD( EBADF, "Bad file number" ); STRINGS_ADD( ECHILD, "No child processes" ); STRINGS_ADD( EAGAIN, "Try again" ); STRINGS_ADD( ENOMEM, "Out of memory" ); STRINGS_ADD( EACCES, "Permission denied" ); STRINGS_ADD( EFAULT, "Bad address" ); #ifdef ENOTBLK STRINGS_ADD( ENOTBLK, "Block device required" ); #endif STRINGS_ADD( EBUSY, "Device or resource busy" ); STRINGS_ADD( EEXIST, "File exists" ); STRINGS_ADD( EXDEV, "Cross-device link" ); STRINGS_ADD( ENODEV, "No such device" ); STRINGS_ADD( ENOTDIR, "Not a directory" ); STRINGS_ADD( EISDIR, "Is a directory" ); STRINGS_ADD( EINVAL, "Invalid argument" ); STRINGS_ADD( ENFILE, "File table overflow" ); STRINGS_ADD( EMFILE, "Too many open files" ); STRINGS_ADD( ENOTTY, "Not a typewriter" ); STRINGS_ADD( ETXTBSY, "Text file busy" ); STRINGS_ADD( EFBIG, "File too large" ); STRINGS_ADD( ENOSPC, "No space left on device" ); STRINGS_ADD( ESPIPE, "Illegal seek" ); STRINGS_ADD( EROFS, "Read-only file system" ); STRINGS_ADD( EMLINK, "Too many links" ); STRINGS_ADD( EPIPE, "Broken pipe" ); STRINGS_ADD( EDOM, "Math argument out of domain of func" ); STRINGS_ADD( ERANGE, "Math result not representable" ); STRINGS_ADD( ETIMEDOUT, "Timed out" ); } void __D_util_deinit() { } /**********************************************************************************************************************/ const char * direct_strerror( int erno ) { if (erno < 0) return "negative errno"; if (erno >= D_ARRAY_SIZE(strings_base)) return "too high errno"; return strings_base[erno]; } /* * translates errno to DirectResult */ __dfb_no_instrument_function__ DirectResult errno2result( int erno ) { switch (erno) { case 0: return DR_OK; case ENOENT: return DR_FILENOTFOUND; case EACCES: case EPERM: return DR_ACCESSDENIED; case EBUSY: case EAGAIN: return DR_BUSY; case ETIMEDOUT: return DR_TIMEOUT; case ECONNREFUSED: return DR_ACCESSDENIED; case EINTR: return DR_SIGNALLED; case ENOSYS: return DR_NOSUCHMETHOD; case EINVAL: return DR_INVARG; case ENODEV: case ENXIO: #ifdef ENOTSUP /* ENOTSUP is not defined on NetBSD */ case ENOTSUP: #endif return DR_UNSUPPORTED; } return DR_FAILURE; } int direct_sscanf( const char *str, const char *format, ... ) { int ret; va_list args; va_start( args, format ); ret = direct_vsscanf( str, format, args ); va_end( args ); return ret; } /* int direct_vsscanf( const char *str, const char *format, va_list args ) { return vsscanf( str, format, args ); } */ size_t direct_strlen( const char *s ) { return strlen( s ); } void direct_trim( char **s ) { int i; int len = direct_strlen( *s ); for (i = len-1; i >= 0; i--) if ((*s)[i] <= ' ') (*s)[i] = 0; else break; while (**s) if (**s <= ' ') (*s)++; else return; } int direct_strcmp( const char *a, const char *b ) { return strcmp( a, b ); } unsigned long direct_strtoul( const char *nptr, char **endptr, int base ) { return strtoul( nptr, endptr, base ); } static __inline__ char * __D_strtok_r (char *s, const char *delim, char **save_ptr) { char *token; if (s == NULL) s = *save_ptr; /* Scan leading delimiters. */ s += strspn (s, delim); if (*s == '\0') { *save_ptr = s; return NULL; } /* Find the end of the token. */ token = s; s = strpbrk (token, delim); if (s == NULL) /* This token finishes the string. */ *save_ptr = strchr (token, '\0'); else { /* Terminate the token and make *SAVE_PTR point past it. */ *s = '\0'; *save_ptr = s + 1; } return token; } #ifdef __GNUC__ #define __D_string2_1bptr_p(__x) \ ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) #define __D_strtok_r(s, sep, nextp) \ (__extension__ (__builtin_constant_p (sep) && __D_string2_1bptr_p (sep) \ ? (((__const char *) (sep))[0] != '\0' \ && ((__const char *) (sep))[1] == '\0' \ ? __D_strtok_r_1c (s, ((__const char *) (sep))[0], nextp) \ : __D_strtok_r (s, sep, nextp)) \ : __D_strtok_r (s, sep, nextp))) #endif static __inline__ char * __D_strtok_r_1c (char *__s, char __sep, char **__nextp) { char *__result; if (__s == NULL) __s = *__nextp; while (*__s == __sep) ++__s; __result = NULL; if (*__s != '\0') { __result = __s++; while (*__s != '\0') if (*__s++ == __sep) { __s[-1] = '\0'; break; } *__nextp = __s; } return __result; } char * direct_strtok_r( char *str, const char *delim, char **saveptr ) { return __D_strtok_r( str, delim, saveptr ); } char * direct_snputs( char *dest, const char *src, size_t n ) { char *start = dest; D_ASSERT( dest != NULL ); D_ASSERT( src != NULL ); if (!n) return NULL; for (; n>1 && *src; n--) *dest++ = *src++; *dest = 0; return start; } /* * Encode/Decode Base-64. */ char* direct_base64_encode( const void *data, int size ) { static const char *enc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/="; const unsigned char *src = (const unsigned char*)data; char *ret; char *buf; D_ASSERT( data != NULL ); buf = ret = D_MALLOC( (size + 2) / 3 * 4 + 1 ); if (!ret) return NULL; for (; size >= 3; size -= 3) { buf[0] = enc[((src[0] & 0xfc) >> 2)]; buf[1] = enc[((src[0] & 0x03) << 4) | ((src[1] & 0xf0) >> 4)]; buf[2] = enc[((src[1] & 0x0f) << 2) | ((src[2] & 0xc0) >> 6)]; buf[3] = enc[((src[2] & 0x3f))]; buf += 4; src += 3; } if (size > 0) { buf[0] = enc[(src[0] & 0xfc) >> 2]; if (size > 1) { buf[1] = enc[((src[0] & 0x03) << 4) | ((src[1] & 0xf0) >> 4)]; buf[2] = enc[((src[1] & 0x0f) << 2)]; } else { buf[1] = enc[(src[0] & 0x03) << 4]; buf[2] = '='; } buf[3] = '='; buf += 4; } *buf = '\0'; return ret; } void* direct_base64_decode( const char *string, int *ret_size ) { unsigned char dec[256]; unsigned char *ret; unsigned char *buf; int len; int i, j; D_ASSERT( string != NULL ); len = direct_strlen( string ); buf = ret = D_MALLOC( len * 3 / 4 + 3 ); if (!ret) return NULL; /* generate decode table */ for (i = 0; i < 255; i++) dec[i] = 0x80; for (i = 'A'; i <= 'Z'; i++) dec[i] = 0 + (i - 'A'); for (i = 'a'; i <= 'z'; i++) dec[i] = 26 + (i - 'a'); for (i = '0'; i <= '9'; i++) dec[i] = 52 + (i - '0'); dec['+'] = 62; dec['/'] = 63; dec['='] = 0; /* decode */ for (j = 0; j < len; j += 4) { unsigned char a[4], b[4]; for (i = 0; i < 4; i++) { int c = string[i+j]; a[i] = c; b[i] = dec[c]; } *buf++ = (b[0] << 2) | (b[1] >> 4); *buf++ = (b[1] << 4) | (b[2] >> 2); *buf++ = (b[2] << 6) | (b[3] ); if (a[2] == '=' || a[3] == '=') break; } *buf = '\0'; if (ret_size) *ret_size = buf - ret; return ret; } /* * Compute MD5 sum. */ static const u8 S[4][4] = { { 7, 12, 17, 22}, /* Round 1 */ { 5, 9, 14, 20}, /* Round 2 */ { 4, 11, 16, 23}, /* Round 3 */ { 6, 10, 15, 21} /* Round 4 */ }; static const u32 T[64] = { 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, /* Round 1 */ 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, /* Round 2 */ 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8, 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, /* Round 3 */ 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, /* Round 4 */ 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391, }; static void md5_hash( u32 ABCD[4], u32 X[16] ) { u32 a = ABCD[3]; u32 b = ABCD[2]; u32 c = ABCD[1]; u32 d = ABCD[0]; int t; int i; #ifdef WORDS_BIGENDIAN for (i = 0; i < 16; i++) X[i] = BSWAP32(X[i]); #endif for (i = 0; i < 64; i++) { t = S[i>>4][i&3]; a += T[i]; switch (i>>4) { case 0: a += (d ^ (b&(c^d))) + X[ i &15]; break; case 1: a += (c ^ (d&(c^b))) + X[(1+5*i)&15]; break; case 2: a += (b^c^d) + X[(5+3*i)&15]; break; case 3: a += (c^(b|~d)) + X[( 7*i)&15]; break; } a = b + ((a << t) | (a >> (32 - t))); t = d; d = c; c = b; b = a; a = t; } ABCD[0] += d; ABCD[1] += c; ABCD[2] += b; ABCD[3] += a; } void direct_md5_sum( void *dst, const void *src, const int len ) { u8 block[64]; u32 ABCD[4]; int i, j; D_ASSERT( dst != NULL ); D_ASSERT( src != NULL ); ABCD[0] = 0x10325476; ABCD[1] = 0x98badcfe; ABCD[2] = 0xefcdab89; ABCD[3] = 0x67452301; for (i = 0, j = 0; i < len; i++) { block[j++] = ((const u8*)src)[i]; if (j == 64) { md5_hash( ABCD, (u32*)block ); j = 0; } } block[j++] = 0x80; memset( &block[j], 0, 64-j ); if (j > 56) { md5_hash( ABCD, (u32*)block ); memset( block, 0, 64 ); } for (i = 0; i < 8; i++) block[56+i] = (u8)(((u64)len << 3) >> (i << 3)); md5_hash( ABCD, (u32*)block ); for (i = 0; i < 4; i++) #ifdef WORDS_BIGENDIAN ((u32*)dst)[i] = BSWAP32(ABCD[3-i]); #else ((u32*)dst)[i] = ABCD[3-i]; #endif } void * direct_bsearch( const void *key, const void *base, size_t nmemb, size_t size, void *func ) { #ifdef __KERNEL__ D_UNIMPLEMENTED(); return NULL; #else return bsearch( key, base, nmemb, size, func ); #endif } DirectFB-1.7.7/lib/direct/debug.h0000644000175000017500000004336312254435330013362 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__DEBUG_H__ #define __DIRECT__DEBUG_H__ #include #include #include #include #include #include #include #include #include // @deprecated #define D_DEBUG_DOMAIN( _identifier, _name, _description ) \ D_LOG_DOMAIN( _identifier, _name, _description ) #ifndef DIRECT_DISABLE_DEPRECATED // @deprecated D_DEBUG_DOMAIN( _direct_debug_deprecated, "-", "deprecated" ); // @deprecated #define D_DEBUG( ... ) \ D_DEBUG_AT( _direct_debug_deprecated, __VA_ARGS__ ) #endif static __inline__ void direct_debug_config_domain( const char *name, bool enable ) { direct_log_domain_config_level( name, enable ? DIRECT_LOG_ALL : DIRECT_LOG_NONE ); } #if DIRECT_BUILD_TEXT void DIRECT_API direct_debug_at_always( DirectLogDomain *domain, const char *format, ... ) D_FORMAT_PRINTF(2); #define d_debug_at( domain, ... ) direct_debug_at_always( &domain, __VA_ARGS__ ) #if DIRECT_BUILD_DEBUGS /* * Direct v2.0 - Debug Interface * * debug level 1-9 (0 = verbose) * */ void DIRECT_API direct_debug_log( DirectLogDomain *domain, unsigned int debug_level, const char *format, ... ) D_FORMAT_PRINTF(3); /* old */ void DIRECT_API direct_debug_at( DirectLogDomain *domain, const char *format, ... ) D_FORMAT_PRINTF(2); void DIRECT_API direct_debug_enter( DirectLogDomain *domain, const char *func, const char *file, int line, const char *format, ... ) D_FORMAT_PRINTF(5); void DIRECT_API direct_debug_exit( DirectLogDomain *domain, const char *func, const char *file, int line, const char *format, ... ) D_FORMAT_PRINTF(5); void DIRECT_API direct_break( const char *func, const char *file, int line, const char *format, ... ) D_FORMAT_PRINTF(4); void DIRECT_API direct_assertion( const char *exp, const char *func, const char *file, int line ); void DIRECT_API direct_assumption( const char *exp, const char *func, const char *file, int line ); #endif #if DIRECT_BUILD_DEBUG || defined(DIRECT_ENABLE_DEBUG) || defined(DIRECT_FORCE_DEBUG) #define D_DEBUG_ENABLED (1) #define D_DEBUG_LOG(_Domain,_level,...) \ do { \ direct_debug_log( &_Domain, _level, __VA_ARGS__ ); \ } while (0) // TODO: OPT: check domain etc here to avoid probably expensive parameter generation #define D_DEBUG_AT(d,...) \ do { \ direct_debug_at( &d, __VA_ARGS__ ); \ } while (0) #define D_DEBUG_ENTER(d,...) \ do { \ /*direct_debug_enter( &d, __FUNCTION__, __FILE__, __LINE__, x );*/ \ } while (0) #define D_DEBUG_EXIT(d,...) \ do { \ /*direct_debug_exit( &d, __FUNCTION__, __FILE__, __LINE__, x );*/ \ } while (0) #define D_ASSERT(exp) \ do { \ if (!(exp)) \ direct_assertion( #exp, __FUNCTION__, __FILE__, __LINE__ ); \ } while (0) #define D_ASSUME(exp) \ do { \ if (!(exp)) \ direct_assumption( #exp, __FUNCTION__, __FILE__, __LINE__ ); \ } while (0) #define D_BREAK(...) \ do { \ direct_break( __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__ ); \ } while (0) #define D_DEBUG_CHECK(d) \ direct_log_domain_check( &d ) #elif defined(DIRECT_MINI_DEBUG) /* * Mini debug mode, only D_DEBUG_AT, no domain filters, simple assertion */ #define D_DEBUG_ENABLED (2) #define D_DEBUG_LOG(_Domain,_level,...) \ do { \ if (direct_config->log_level >= DIRECT_LOG_DEBUG) \ direct_debug_at_always( &d, __VA_ARGS__ ); \ } while (0) #define D_DEBUG_AT(d,...) \ do { \ if (direct_config->log_level >= DIRECT_LOG_DEBUG) \ direct_debug_at_always( &d, __VA_ARGS__ ); \ } while (0) #define D_CHECK(exp, aa) \ do { \ if (!(exp)) { \ long long millis = direct_clock_get_millis(); \ const char *name = direct_thread_self_name(); \ \ direct_log_printf( NULL, \ "(!) [%-15s %3lld.%03lld] (%5d) *** " #aa " [%s] failed *** [%s:%d in %s()]\n", \ name ? name : " NO NAME ", millis / 1000LL, millis % 1000LL, \ direct_gettid(), #exp, __FILE__, __LINE__, __FUNCTION__ ); \ \ direct_trace_print_stack( NULL ); \ } \ } while (0) #define D_ASSERT(exp) D_CHECK(exp, Assertion) #define D_ASSUME(exp) D_CHECK(exp, Assumption) #define D_DEBUG_CHECK(d) \ direct_config->debug #endif /* MINI_DEBUG / DIRECT_BUILD_DEBUG || DIRECT_ENABLE_DEBUG || DIRECT_FORCE_DEBUG */ #define D_DEBUG_AT__(d,...) \ do { \ direct_log_printf( NULL, __VA_ARGS__ ); \ } while (0) #endif /* DIRECT_BUILD_TEXT */ /* * Fallback definitions, e.g. without DIRECT_BUILD_TEXT or DIRECT_ENABLE_DEBUG */ #ifndef D_DEBUG_ENABLED #define D_DEBUG_ENABLED (0) #endif #ifndef D_DEBUG_LOG #define D_DEBUG_LOG(_Domain,_level,...) \ do { \ } while (0) #endif #ifndef D_DEBUG #define D_DEBUG(d,...) do {} while (0) #endif #ifndef D_DEBUG_AT #define D_DEBUG_AT(d,...) do {} while (0) #endif #ifndef D_DEBUG_ENTER #define D_DEBUG_ENTER(d,...) do {} while (0) #endif #ifndef D_DEBUG_EXIT #define D_DEBUG_EXIT(d,...) do {} while (0) #endif #ifndef D_ASSERT #define D_ASSERT(exp) do {} while (0) #endif #ifndef D_ASSUME #define D_ASSUME(exp) do {} while (0) #endif #ifndef D_DEBUG_AT__ #define D_DEBUG_AT__(d,...) do {} while (0) #endif #ifndef D_DEBUG_CHECK #define D_DEBUG_CHECK(d) false #endif #ifndef D_BREAK #define D_BREAK(...) do {} while (0) #endif #ifndef d_debug_at #define d_debug_at( domain, ... ) do {} while (0) #endif #ifndef D_LOG_DOMAIN #define D_LOG_DOMAIN(i,n,d) #endif /* * Magic Assertions & Utilities */ #define D_MAGIC(spell) ( (((spell)[sizeof(spell)*8/9] << 24) | \ ((spell)[sizeof(spell)*7/9] << 16) | \ ((spell)[sizeof(spell)*6/9] << 8) | \ ((spell)[sizeof(spell)*5/9] )) ^ \ (((spell)[sizeof(spell)*4/9] << 24) | \ ((spell)[sizeof(spell)*3/9] << 16) | \ ((spell)[sizeof(spell)*2/9] << 8) | \ ((spell)[sizeof(spell)*1/9] )) ) #define D_MAGIC_PRINT(m) do { \ D_INFO( "Magic '%s' = '%d'\n", #m, D_MAGIC(#m) ); \ } while (0) #if DIRECT_BUILD_DEBUGS #define D_MAGIC_CHECK(o,m) ((o) != NULL && (o)->magic == D_MAGIC(#m)) #define D_MAGIC_SET(o,m) do { \ D_ASSERT( (o) != NULL ); \ D_ASSUME( (o)->magic != D_MAGIC(#m) ); \ \ (o)->magic = D_MAGIC(#m); \ } while (0) #define D_MAGIC_SET_ONLY(o,m) do { \ D_ASSERT( (o) != NULL ); \ \ (o)->magic = D_MAGIC(#m); \ } while (0) #define D_MAGIC_ASSERT(o,m) do { \ D_ASSERT( (o) != NULL ); \ D_ASSERT( (o)->magic == D_MAGIC(#m) ); \ } while (0) #define D_MAGIC_ASSUME(o,m) do { \ D_ASSUME( (o) != NULL ); \ if (o) \ D_ASSUME( (o)->magic == D_MAGIC(#m) ); \ } while (0) #define D_MAGIC_ASSERT_IF(o,m) do { \ if (o) \ D_ASSERT( (o)->magic == D_MAGIC(#m) ); \ } while (0) #define D_MAGIC_CLEAR(o) do { \ D_ASSERT( (o) != NULL ); \ D_ASSUME( (o)->magic != 0 ); \ \ (o)->magic = 0; \ } while (0) #define D_INDEX_ASSERT(index,array) \ do { \ D_ASSERT( index >= 0 ); \ D_ASSERT( index < D_ARRAY_SIZE(array) ); \ } while (0) #else #define D_MAGIC_CHECK(o,m) ((o) != NULL) #define D_MAGIC_SET(o,m) do { \ } while (0) #define D_MAGIC_SET_ONLY(o,m) do { \ } while (0) #define D_MAGIC_ASSERT(o,m) do { \ } while (0) #define D_MAGIC_ASSUME(o,m) do { \ } while (0) #define D_MAGIC_ASSERT_IF(o,m) do { \ } while (0) #define D_MAGIC_CLEAR(o) do { \ } while (0) #define D_INDEX_ASSERT(index,array) \ do { \ } while (0) #endif #define D_FLAGS_ASSERT(flags,f) D_ASSERT( D_FLAGS_ARE_IN(flags,f) ) #if D_DEBUG_ENABLED #define D_INFO_LINE() \ do { \ long long micros = direct_clock_get_micros(); \ int indent = direct_trace_debug_indent() * 2; \ \ D_INFO( "[%-16.16s %3lld.%03lld,%03lld] (%5d) %*s%*s %s:%d\n", \ direct_thread_self_name()?:"NO NAME", \ micros / 1000000LL, (micros / 1000LL) % 1000LL, micros % 1000LL, direct_gettid(), \ indent, "", indent-60, __FUNCTION__, __FILE__, __LINE__ ); \ } while (0) #define D_INFO_LINE_MSG(...) \ do { \ long long micros = direct_clock_get_micros(); \ int indent = direct_trace_debug_indent() * 2; \ char _buf[200]; \ \ direct_snprintf( _buf, sizeof(_buf), __VA_ARGS__ ); \ \ D_INFO( "[%-16.16s %3lld.%03lld,%03lld] (%5d) %*s%*s '%-40s' %s:%d\n", \ direct_thread_self_name()?:"NO NAME", \ micros / 1000000LL, (micros / 1000LL) % 1000LL, micros % 1000LL, direct_gettid(), \ indent, "", indent-60, __FUNCTION__, _buf, __FILE__, __LINE__ ); \ } while (0) #else #define D_INFO_LINE() \ do { \ } while (0) #define D_INFO_LINE_MSG(...) \ do { \ } while (0) #endif #endif DirectFB-1.7.7/lib/direct/memcpy.h0000644000175000017500000000353212254435330013560 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__MEMCPY_H__ #define __DIRECT__MEMCPY_H__ #include void DIRECT_API direct_find_best_memcpy( void ); void DIRECT_API direct_print_memcpy_routines( void ); extern void DIRECT_API *(*direct_memcpy)( void *to, const void *from, size_t len ); static __inline__ void *direct_memmove( void *to, const void *from, size_t len ) { if ((from < to && ((const char*) from + len) < ((char*) to)) || (((char*) to + len) < ((const char*) from))) return direct_memcpy( to, from, len ); else return memmove( to, from, len ); } #endif DirectFB-1.7.7/lib/direct/uuid.h0000644000175000017500000001124712254435330013236 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__UUID_H__ #define __DIRECT__UUID_H__ #include /* * Direct UUID */ typedef union { struct { u32 ___u32_x1[1]; u16 ___u16_x2[2]; u8 ____u8_x8[8]; }; // struct { u64 ___u64_x2[2]; // }; // struct { u32 ___u32_x4[4]; // }; // struct { u16 ___u16_x8[8]; // }; // struct { u8 __u8_x16[16]; // }; } DirectUUID; /**********************************************************************************************************************/ /* * We're using 64bit hash keys... * * * u64 value = 2166136261UL; * * for (i=0; i<4; i++) { * value ^= (uuid)->___u32_x4[i]; * value *= 16777619ULL; * } * */ #define D_UUID_HASH( uuid ) ((u64 )( ((( ((( ((( (((2166136261ULL \ ^ (uuid)->___u32_x4[0])) * 16777619ULL) \ ^ (uuid)->___u32_x4[1])) * 16777619ULL) \ ^ (uuid)->___u32_x4[2])) * 16777619ULL) \ ^ (uuid)->___u32_x4[3])) * 16777619ULL) )) /**********************************************************************************************************************/ #define D_UUID_EQUAL( u1, u2 ) \ ( (u1) == (u2) || \ (((u1)->___u64_x2[0] == (u2)->___u64_x2[0]) && ((u1)->___u64_x2[1] == (u2)->___u64_x2[1])) ) #define D_UUID_EMPTY( uuid ) \ ( (uuid)->___u64_x2[0] == 0 && (uuid)->___u64_x2[1] == 0 ) #define D_UUID_VALS( uuid ) \ (uuid)->___u32_x1[0], (uuid)->___u16_x2[0], (uuid)->___u16_x2[1], \ (uuid)->____u8_x8[0], (uuid)->____u8_x8[1], (uuid)->____u8_x8[2], (uuid)->____u8_x8[3], \ (uuid)->____u8_x8[4], (uuid)->____u8_x8[5], (uuid)->____u8_x8[6], (uuid)->____u8_x8[7] #define D_UUID_FORMAT "%08x-%04x-%04x-%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x" #define D_UUID_LOG( Domain, LEVEL, u, msg ) \ D_LOG( Domain, LEVEL, "%s == "D_UUID_FORMAT" ==\n", \ msg, D_UUID_VALS( u ) ); #define D_UUID_DEBUG_AT( Domain, u, msg ) \ D_UUID_LOG( Domain, DEBUG, u, msg ) /**********************************************************************************************************************/ #define D_UUID_NULL \ (DirectUUID){{ { 0 }, { 0, 0 }, \ { 0, 0, 0, 0, 0, 0, 0, 0 } }} /**********************************************************************************************************************/ /**********************************************************************************************************************/ void DIRECT_API direct_uuid_generate( DirectUUID *ret_id ); #endif DirectFB-1.7.7/lib/direct/conf.h0000644000175000017500000001275212361150102013205 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__CONF_H__ #define __DIRECT__CONF_H__ #include typedef enum { DCFL_NONE, /* None is fatal. */ DCFL_ASSERT, /* ASSERT is fatal. */ DCFL_ASSUME /* ASSERT and ASSUME are fatal. */ } DirectConfigFatalLevel; typedef enum { DCTS_OTHER, DCTS_FIFO, DCTS_RR } DirectConfigThreadScheduler; typedef enum { DMT_NONE = 0x00000000, /* No message type. */ DMT_BANNER = 0x00000001, /* Startup banner. */ DMT_INFO = 0x00000002, /* Info messages. */ DMT_WARNING = 0x00000004, /* Warnings. */ DMT_ERROR = 0x00000008, /* Error messages: regular, with DFBResult, bugs, system call errors, dlopen errors */ DMT_UNIMPLEMENTED = 0x00000010, /* Messages notifying unimplemented functionality. */ DMT_ONCE = 0x00000020, /* One-shot messages .*/ DMT_UNTESTED = 0x00000040, /* Messages notifying unimplemented functionality. */ DMT_BUG = 0x00000080, /* A bug occurred. */ DMT_ALL = 0x000000FF /* All types. */ } DirectMessageType; struct __D_DirectConfig { DirectMessageType quiet; DirectLogLevel log_level; bool log_all; bool log_none; bool trace; char *memcpy; /* Don't probe for memcpy routines to save a lot of startup time. Use this one instead if it's set. */ char **disable_module; /* Never load these modules. */ char *module_dir; /* module dir override */ bool sighandler; sigset_t dont_catch; /* don't catch these signals */ DirectLog *log; DirectConfigFatalLevel fatal; // @deprecated / FIXME: maybe adapt? bool debug; bool debugmem; bool thread_block_signals; bool fatal_break; /* Should D_BREAK() cause a trap? */ int thread_priority; DirectConfigThreadScheduler thread_scheduler; int thread_stack_size; int thread_priority_scale; char **default_interface_implementation_types; char **default_interface_implementation_names; unsigned int perf_dump_interval; int log_delay_rand_loops; int log_delay_rand_us; int log_delay_min_loops; int log_delay_min_us; DirectMessageType fatal_messages; bool nm_for_trace; int delay_trap_ms; bool sighandler_thread; }; extern DirectConfig DIRECT_API *direct_config; extern const char DIRECT_API *direct_config_usage; DirectResult DIRECT_API direct_config_set( const char *name, const char *value ); /* Retrieve all values set on option 'name'. */ /* Pass an array of char* pointers and number of pointers in 'num'. */ /* The actual returned number of values gets returned in 'ret_num' */ /* The returned option/values respect directfbrc, cmdline options and DFBARGS envvar. */ /* The returned pointers are not extra allocated so do not free them! */ DirectResult DIRECT_API direct_config_get( const char *name, char **values, const int values_len, int *ret_num ); /* Return the integer value for the last occurrance of the passed option's setting. */ /* Note that 0 is also retuned in case the passed option was not found ot set. */ long long DIRECT_API direct_config_get_int_value( const char *name ); long long DIRECT_API direct_config_get_int_value_with_default( const char *name, long long def ); void __D_conf_init( void ); void __D_conf_deinit( void ); #endif DirectFB-1.7.7/lib/direct/fastlz.c0000644000175000017500000000541712254435330013570 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include "flz.h" int direct_fastlz_compress( const void *input, int length, void *output ) { return fastlz_compress_level( 2, input, length, output ); } int direct_fastlz_decompress( const void *input, int length, void *output, int maxout ) { return fastlz_decompress( input, length, output, maxout ); } int direct_fastlz_compress_multi( const void **inputs, int *lengths, unsigned int num, void *output ) { // FIXME: Optimize by modifying fastlz compressor to take an array of buffers directly unsigned int i; int total = 0; int offset = 0; void *buffer; int result; if (num == 0) return 0; if (num == 1) return direct_fastlz_compress( inputs[0], lengths[0], output ); for (i=0; i, Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include /**********************************************************************************************************************/ /**********************************************************************************************************************/ /* Statically allocated to avoid endless loops between D_CALLOC() and D_DEBUG(), while the latter would only * call the allocation once, if there wouldn't be the loopback... */ static DirectLog fallback_log; static DirectLog *default_log; void __D_log_init() { DirectLog *fb = &fallback_log; fb->type = DLT_STDERR; direct_recursive_mutex_init( &fb->lock ); direct_log_init( fb, NULL ); D_MAGIC_SET( fb, DirectLog ); } void __D_log_deinit() { DirectLog *fb = &fallback_log; direct_log_deinit( fb ); direct_mutex_deinit( &fb->lock ); D_MAGIC_CLEAR( fb ); default_log = NULL; } /**********************************************************************************************************************/ DirectResult direct_log_create( DirectLogType type, const char *param, DirectLog **ret_log ) { DirectResult ret; DirectLog *log; log = D_CALLOC( 1, sizeof(DirectLog) ); if (!log) return D_OOM(); log->type = type; direct_recursive_mutex_init( &log->lock ); ret = direct_log_init( log, param ); if (ret) { direct_mutex_deinit( &log->lock ); D_FREE( log ); return ret; } D_ASSERT( log->write != NULL ); D_MAGIC_SET( log, DirectLog ); *ret_log = log; return DR_OK; } DirectResult direct_log_destroy( DirectLog *log ) { D_MAGIC_ASSERT( log, DirectLog ); D_ASSERT( &fallback_log != log ); if (log == default_log) default_log = NULL; direct_log_deinit( log ); direct_mutex_deinit( &log->lock ); D_MAGIC_CLEAR( log ); D_FREE( log ); return DR_OK; } __dfb_no_instrument_function__ DirectResult direct_log_write( DirectLog *log, const char *buffer, size_t bytes ) { DirectResult ret; /* * Don't use D_MAGIC_ASSERT or any other * macros/functions that might cause an endless loop. */ /* Use the default log if passed log is invalid. */ if (!D_MAGIC_CHECK( log, DirectLog )) log = direct_log_default(); if (!D_MAGIC_CHECK( log, DirectLog )) return DR_BUG; // direct_mutex_lock( &log->lock ); ret = log->write( log, buffer, bytes ); // direct_mutex_unlock( &log->lock ); direct_log_debug_delay( true ); return ret; } __dfb_no_instrument_function__ DirectResult direct_log_printf( DirectLog *log, const char *format, ... ) { DirectResult ret = 0; va_list args; int len; char buf[2000]; char *ptr = buf; /* * Don't use D_MAGIC_ASSERT or any other * macros/functions that might cause an endless loop. */ /* Use the default log if passed log is invalid. */ if (!D_MAGIC_CHECK( log, DirectLog )) log = direct_log_default(); if (!D_MAGIC_CHECK( log, DirectLog )) return DR_BUG; va_start( args, format ); len = direct_vsnprintf( buf, sizeof(buf), format, args ); va_end( args ); if (len < 0) return DR_FAILURE; if (len >= sizeof(buf)) { ptr = direct_malloc( len+1 ); if (!ptr) return DR_NOLOCALMEMORY; va_start( args, format ); len = direct_vsnprintf( ptr, len+1, format, args ); va_end( args ); if (len < 0) { direct_free( ptr ); return DR_FAILURE; } } // direct_mutex_lock( &log->lock ); ret = log->write( log, ptr, len ); // direct_mutex_unlock( &log->lock ); if (ptr != buf) direct_free( ptr ); direct_log_debug_delay( true ); return ret; } DirectResult direct_log_set_default( DirectLog *log ) { D_MAGIC_ASSERT_IF( log, DirectLog ); default_log = log; return DR_OK; } __dfb_no_instrument_function__ void direct_log_lock( DirectLog *log ) { D_MAGIC_ASSERT( log, DirectLog ); direct_mutex_lock( &log->lock ); } __dfb_no_instrument_function__ void direct_log_unlock( DirectLog *log ) { D_MAGIC_ASSERT( log, DirectLog ); direct_mutex_unlock( &log->lock ); } DirectResult direct_log_set_buffer( DirectLog *log, char *buffer, size_t bytes ) { D_MAGIC_ASSERT_IF( log, DirectLog ); if (!log) log = direct_log_default(); D_MAGIC_ASSERT( log, DirectLog ); if (!log->set_buffer) return DR_UNSUPPORTED; return log->set_buffer( log, buffer, bytes ); } DirectResult direct_log_flush( DirectLog *log, bool sync ) { /* * Don't use D_MAGIC_ASSERT or any other * macros/functions that might cause an endless loop. */ /* Use the default log if passed log is invalid. */ if (!D_MAGIC_CHECK( log, DirectLog )) log = direct_log_default(); if (!D_MAGIC_CHECK( log, DirectLog )) return DR_BUG; if (!log->flush) return DR_UNSUPPORTED; return log->flush( log, sync ); } /**********************************************************************************************************************/ __dfb_no_instrument_function__ DirectLog * direct_log_default( void ) { return default_log ? default_log : &fallback_log; } /**********************************************************************************************************************/ __dfb_no_instrument_function__ void direct_log_debug_delay( bool min ) { unsigned int us = min ? direct_config->log_delay_min_us : 0; if (direct_config->log_delay_rand_us) { unsigned int r = ((unsigned) rand()) % (unsigned) direct_config->log_delay_rand_us; if (us < r) us = r; } if (us) direct_thread_sleep( us ); unsigned int loops = min ? direct_config->log_delay_min_loops : 0; if (direct_config->log_delay_rand_loops) { unsigned int r = ((unsigned) rand()) % (unsigned) direct_config->log_delay_rand_loops; if (loops < r) loops = r; } if (loops) { volatile long val = 0; unsigned int loop; for (loop=0; loop, Andreas Hundt , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__BUILD_H__ #define __DIRECT__BUILD_H__ #define DIRECT_OS_LINUX_GNU_LIBC (0) #define DIRECT_OS_LINUX_KERNEL (1) #define DIRECT_OS_PSP (2) #define DIRECT_OS_WIN32 (3) #define DIRECT_OS_FAMOS (4) #define DIRECT_BUILD_DEBUG (@DIRECT_BUILD_DEBUG@) #define DIRECT_BUILD_DEBUGS (@DIRECT_BUILD_DEBUGS@) #define DIRECT_BUILD_TRACE (@DIRECT_BUILD_TRACE@) #define DIRECT_BUILD_TEXT (@DIRECT_BUILD_TEXT@) #define DIRECT_BUILD_GETTID (@DIRECT_BUILD_GETTID@) #define DIRECT_BUILD_NETWORK (@DIRECT_BUILD_NETWORK@) #define DIRECT_BUILD_STDBOOL (@DIRECT_BUILD_STDBOOL@) #define DIRECT_BUILD_DYNLOAD (@DIRECT_BUILD_DYNLOAD@) #define DIRECT_BUILD_MULTICORE (@DIRECT_BUILD_MULTICORE@) #define DIRECT_BUILD_OSTYPE (@DIRECT_BUILD_OSTYPE@) #define DIRECT_BUILD_GCC_ATOMICS (@DIRECT_BUILD_GCC_ATOMICS@) #if !DIRECT_BUILD_DEBUGS #if defined(DIRECT_ENABLE_DEBUG) || defined(DIRECT_FORCE_DEBUG) #define DIRECT_MINI_DEBUG #endif #undef DIRECT_ENABLE_DEBUG #ifdef DIRECT_FORCE_DEBUG #warning DIRECT_FORCE_DEBUG used with 'pure release' library headers. #undef DIRECT_FORCE_DEBUG #endif #endif #endif DirectFB-1.7.7/lib/direct/Makefile.in0000644000175000017500000012545512466665314014207 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/rules/nmfile.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(srcdir)/build.h.in \ $(srcdir)/direct.pc.in $(top_srcdir)/depcomp \ $(am__include_HEADERS_DIST) subdir = lib/direct ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = build.h direct.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libdirect_la_DEPENDENCIES = \ os/linux/glibc/libdirect_os_linux_glibc.la am__libdirect_la_SOURCES_DIST = ppcasm_memcpy.S \ ppcasm_memcpy_cachable.S armasm_memcpy.S String.cpp clock.c \ conf.c debug.c direct.c direct_result.c fastlz.c fifo.c flz.c \ hash.c init.c interface.c list.c log.c log_domain.c map.c \ mem.c memcpy.c messages.c modules.c perf.c print.c processor.c \ result.c serial.c signals.c stream.c system.c trace.c tree.c \ thread.c utf8.c util.c uuid.c @BUILDPPCASM_TRUE@@HAVE_LINUX_FALSE@am__objects_1 = ppcasm_memcpy.lo @BUILDPPCASM_TRUE@@HAVE_LINUX_TRUE@am__objects_1 = ppcasm_memcpy.lo \ @BUILDPPCASM_TRUE@@HAVE_LINUX_TRUE@ ppcasm_memcpy_cachable.lo @BUILDARMASM_TRUE@am__objects_2 = armasm_memcpy.lo am_libdirect_la_OBJECTS = $(am__objects_1) $(am__objects_2) String.lo \ clock.lo conf.lo debug.lo direct.lo direct_result.lo fastlz.lo \ fifo.lo flz.lo hash.lo init.lo interface.lo list.lo log.lo \ log_domain.lo map.lo mem.lo memcpy.lo messages.lo modules.lo \ perf.lo print.lo processor.lo result.lo serial.lo signals.lo \ stream.lo system.lo trace.lo tree.lo thread.lo utf8.lo util.lo \ uuid.lo libdirect_la_OBJECTS = $(am_libdirect_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdirect_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libdirect_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CCASFLAGS) $(CCASFLAGS) AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) am__v_CPPAS_0 = @echo " CPPAS " $@; am__v_CPPAS_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libdirect_la_SOURCES) DIST_SOURCES = $(am__libdirect_la_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) am__include_HEADERS_DIST = ppcasm_memcpy.h ppc_asm.h Lists.h LockWQ.h \ Magic.h Mutex.h Performer.h String.h TLSObject.h ToString.h \ Types++.h atomic.h build.h clock.h compiler.h conf.h debug.h \ direct.h fastlz.h fifo.h filesystem.h flz.h hash.h init.h \ interface.h interface_implementation.h list.h log.h \ log_domain.h map.h mem.h memcpy.h messages.h modules.h perf.h \ print.h processor.h result.h serial.h signals.h stream.h \ system.h thread.h trace.h tree.h types.h utf8.h util.h uuid.h HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @INCLUDEDIR@/direct infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = os INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib AM_CPPFLAGS = \ -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" \ -DMODULEDIR=\"${RUNTIME_SYSROOT}@MODULEDIR@\" pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = direct.pc EXTRA_DIST = \ kernelmod.c \ armasm_memcpy.S \ armasm_memcpy.h \ ppcasm_memcpy.S \ ppcasm_memcpy_cachable.S \ ppcasm_memcpy.h \ ppc_asm.h @BUILDPPCASM_TRUE@@HAVE_LINUX_FALSE@ppcasm_sources = ppcasm_memcpy.S @BUILDPPCASM_TRUE@@HAVE_LINUX_TRUE@ppcasm_sources = ppcasm_memcpy.S ppcasm_memcpy_cachable.S @BUILDPPCASM_TRUE@ppcasm_headers = ppcasm_memcpy.h ppc_asm.h @BUILDARMASM_TRUE@armasm_sources = armasm_memcpy.S @BUILDARMASM_TRUE@armasm_header = armasm_memcpy.h include_HEADERS = \ $(ppcasm_headers) \ $(armasm_headers) \ Lists.h \ LockWQ.h \ Magic.h \ Mutex.h \ Performer.h \ String.h \ TLSObject.h \ ToString.h \ Types++.h \ atomic.h \ build.h \ clock.h \ compiler.h \ conf.h \ debug.h \ direct.h \ fastlz.h \ fifo.h \ filesystem.h \ flz.h \ hash.h \ init.h \ interface.h \ interface_implementation.h \ list.h \ log.h \ log_domain.h \ map.h \ mem.h \ memcpy.h \ messages.h \ modules.h \ perf.h \ print.h \ processor.h \ result.h \ serial.h \ signals.h \ stream.h \ system.h \ thread.h \ trace.h \ tree.h \ types.h \ utf8.h \ util.h \ uuid.h lib_LTLIBRARIES = libdirect.la libdirect_la_SOURCES = \ $(ppcasm_sources) \ $(armasm_sources) \ String.cpp \ clock.c \ conf.c \ debug.c \ direct.c \ direct_result.c \ fastlz.c \ fifo.c \ flz.c \ hash.c \ init.c \ interface.c \ list.c \ log.c \ log_domain.c \ map.c \ mem.c \ memcpy.c \ messages.c \ modules.c \ perf.c \ print.c \ processor.c \ result.c \ serial.c \ signals.c \ stream.c \ system.c \ trace.c \ tree.c \ thread.c \ utf8.c \ util.c \ uuid.c libdirect_la_LIBADD = \ os/linux/glibc/libdirect_os_linux_glibc.la \ -lstdc++ libdirect_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -release $(LT_RELEASE) \ $(DFB_LDFLAGS) MKRESULT = $(top_srcdir)/tools/mkresult.sh @BUILD_SHARED_TRUE@@ENABLE_TRACE_TRUE@NMEDLIB = $(LIBS_TO_NMFILE:.la=-$(LT_RELEASE).so.$(LT_BINARY)) all: all-recursive .SUFFIXES: .SUFFIXES: .S .c .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/nmfile.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/direct/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/direct/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/rules/nmfile.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): build.h: $(top_builddir)/config.status $(srcdir)/build.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ direct.pc: $(top_builddir)/config.status $(srcdir)/direct.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirect.la: $(libdirect_la_OBJECTS) $(libdirect_la_DEPENDENCIES) $(EXTRA_libdirect_la_DEPENDENCIES) $(AM_V_CXXLD)$(libdirect_la_LINK) -rpath $(libdir) $(libdirect_la_OBJECTS) $(libdirect_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/String.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/armasm_memcpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/direct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/direct_result.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fastlz.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fifo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flz.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_domain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messages.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modules.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcasm_memcpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcasm_memcpy_cachable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/processor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/result.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uuid.Plo@am__quote@ .S.o: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< .S.obj: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .S.lo: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @BUILD_SHARED_FALSE@install-data-local: @ENABLE_TRACE_FALSE@install-data-local: clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-includeHEADERS \ install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-exec-local install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool clean-local cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-exec-local install-html \ install-html-am install-includeHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA # If the old location isn't cleared, builds of external modules fail install-exec-local: rm -rf $(DESTDIR)$(INTERNALINCLUDEDIR)/direct direct_result.c: $(srcdir)/result.h $(MKRESULT) @echo '#include ' > $@ @echo >> $@ @echo '#include ' >> $@ @echo >> $@ @echo >> $@ @$(MKRESULT) DirectResult DR $< >> $@ @echo >> $@ # # @BUILD_STATIC_TRUE@clean-local: @BUILD_STATIC_TRUE@ rm -f libdirect_fixed.a @BUILD_STATIC_TRUE@all-local: libdirect_fixed.a @BUILD_STATIC_TRUE@libdirect_fixed.a: .libs/libdirect.a @BUILD_STATIC_TRUE@ rm -f libdirect_fixed.a @BUILD_STATIC_TRUE@ ${AR} cru libdirect_fixed.a `find . -name "*.o" | grep -v '.libs' | grep -v dtest` @BUILD_STATIC_TRUE@ ${RANLIB} libdirect_fixed.a @BUILD_STATIC_TRUE@ cp -pf libdirect_fixed.a .libs/libdirect.a @BUILD_STATIC_TRUE@.libs/libdirect.a: libdirect.la @BUILD_STATIC_FALSE@clean-local: @BUILD_STATIC_FALSE@all-local: @BUILD_SHARED_TRUE@@ENABLE_TRACE_TRUE@NM ?= nm @BUILD_SHARED_TRUE@@ENABLE_TRACE_TRUE@LIBS_TO_NMFILE ?= $(LTLIBRARIES) @BUILD_SHARED_TRUE@@ENABLE_TRACE_TRUE@install-data-local: install-libLTLIBRARIES @BUILD_SHARED_TRUE@@ENABLE_TRACE_TRUE@ mkdir -p -- "$(DESTDIR)$(libdir)" @BUILD_SHARED_TRUE@@ENABLE_TRACE_TRUE@ $(NM) -nC "$(DESTDIR)$(libdir)/$(NMEDLIB)" > "$(DESTDIR)$(libdir)/nm-n.$(NMEDLIB)" # 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: DirectFB-1.7.7/lib/direct/ppcasm_memcpy_cachable.S0000644000175000017500000001007012171403127016670 00000000000000/* * String handling functions for PowerPC. * * Copyright (C) 1996 Paul Mackerras. * * * In a mail from Paul on 23.10.2006 05:47: * * You may put an LGPL permission statement on that code, replacing the * GPL permission statement. From a technical point of view, I'm not * sure that the code in ppcasm_memcpy_cachable.S is the best thing to * use in userspace, though; for one thing, it has a cache line size * assumption encoded into it. Why don't you just use the glibc memcpy? * It's pretty well optimized these days, AFAIK. * * Paul. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser 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. */ #define __ASSEMBLY__ #if defined(CONFIG_8xx) || defined(CONFIG_403GCX) #define L1_CACHE_LINE_SIZE 16 #define LG_L1_CACHE_LINE_SIZE 4 #elif defined(CONFIG_PPC64BRIDGE) #define L1_CACHE_LINE_SIZE 128 #define LG_L1_CACHE_LINE_SIZE 7 #else #define L1_CACHE_LINE_SIZE 32 #define LG_L1_CACHE_LINE_SIZE 5 #endif #include "ppc_asm.h" #define COPY_16_BYTES \ lwz r7,4(r4); \ lwz r8,8(r4); \ lwz r9,12(r4); \ lwzu r10,16(r4); \ stw r7,4(r6); \ stw r8,8(r6); \ stw r9,12(r6); \ stwu r10,16(r6) #define COPY_16_BYTES_WITHEX(n) \ 8 ## n ## 0: \ lwz r7,4(r4); \ 8 ## n ## 1: \ lwz r8,8(r4); \ 8 ## n ## 2: \ lwz r9,12(r4); \ 8 ## n ## 3: \ lwzu r10,16(r4); \ 8 ## n ## 4: \ stw r7,4(r6); \ 8 ## n ## 5: \ stw r8,8(r6); \ 8 ## n ## 6: \ stw r9,12(r6); \ 8 ## n ## 7: \ stwu r10,16(r6) #define COPY_16_BYTES_EXCODE(n) \ 9 ## n ## 0: \ addi r5,r5,-(16 * n); \ b 104f; \ 9 ## n ## 1: \ addi r5,r5,-(16 * n); \ b 105f; \ .section __ex_table,"a"; \ .align 2; \ .long 8 ## n ## 0b,9 ## n ## 0b; \ .long 8 ## n ## 1b,9 ## n ## 0b; \ .long 8 ## n ## 2b,9 ## n ## 0b; \ .long 8 ## n ## 3b,9 ## n ## 0b; \ .long 8 ## n ## 4b,9 ## n ## 1b; \ .long 8 ## n ## 5b,9 ## n ## 1b; \ .long 8 ## n ## 6b,9 ## n ## 1b; \ .long 8 ## n ## 7b,9 ## n ## 1b; \ .text .text CACHELINE_MASK = (L1_CACHE_LINE_SIZE - 1) .global direct_ppcasm_cacheable_memcpy direct_ppcasm_cacheable_memcpy: #if 0 /* this part causes "error loading shared library: unexpected reloc type 0x0b (???) */ add r7,r3,r5 /* test if the src & dst overlap */ add r8,r4,r5 cmplw 0,r4,r7 cmplw 1,r3,r8 crand 0,0,4 /* cr0.lt &= cr1.lt */ blt ppcasm_memcpy /* if regions overlap */ #endif addi r4,r4,-4 addi r6,r3,-4 neg r0,r3 andi. r0,r0,CACHELINE_MASK /* # bytes to start of cache line */ beq 58f cmplw 0,r5,r0 /* is this more than total to do? */ blt 63f /* if not much to do */ andi. r8,r0,3 /* get it word-aligned first */ subf r5,r0,r5 mtctr r8 beq+ 61f 70: lbz r9,4(r4) /* do some bytes */ stb r9,4(r6) addi r4,r4,1 addi r6,r6,1 bdnz 70b 61: srwi. r0,r0,2 mtctr r0 beq 58f 72: lwzu r9,4(r4) /* do some words */ stwu r9,4(r6) bdnz 72b 58: srwi. r0,r5,LG_L1_CACHE_LINE_SIZE /* complete cachelines */ clrlwi r5,r5,32-LG_L1_CACHE_LINE_SIZE li r11,4 mtctr r0 beq 63f 53: #if !defined(CONFIG_8xx) dcbz r11,r6 #endif COPY_16_BYTES #if L1_CACHE_LINE_SIZE >= 32 COPY_16_BYTES #if L1_CACHE_LINE_SIZE >= 64 COPY_16_BYTES COPY_16_BYTES #if L1_CACHE_LINE_SIZE >= 128 COPY_16_BYTES COPY_16_BYTES COPY_16_BYTES COPY_16_BYTES #endif #endif #endif bdnz 53b 63: srwi. r0,r5,2 mtctr r0 beq 64f 30: lwzu r0,4(r4) stwu r0,4(r6) bdnz 30b 64: andi. r0,r5,3 mtctr r0 beq+ 65f 40: lbz r0,4(r4) stb r0,4(r6) addi r4,r4,1 addi r6,r6,1 bdnz 40b 65: blr DirectFB-1.7.7/lib/direct/perf.h0000644000175000017500000000523612254435330013225 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__PERF_H__ #define __DIRECT__PERF_H__ #include typedef struct { unsigned long counter_id; // maybe switch to direct pointer bool reset_on_dump; char name[100]; } DirectPerfCounterInstallation; typedef struct { long long start; long long stop; unsigned long count; char name[100]; bool reset_on_dump; } DirectPerfCounter; #if D_DEBUG_ENABLED #define D_PERF_COUNTER( _identifier, _name ) \ DirectPerfCounterInstallation _identifier = { \ 0, \ true, \ (_name) \ }; #define D_PERF_COUNT( _identifier ) \ direct_perf_count( &_identifier, 1 ) #define D_PERF_COUNT_N( _identifier, _diff ) \ direct_perf_count( &_identifier, _diff ) #else #define D_PERF_COUNTER( _identifier, _name ) \ D_UNUSED int _identifier #define D_PERF_COUNT( _identifier ) \ do {} while (0) #define D_PERF_COUNT_N( _identifier, _diff ) \ do {} while (0) #endif void direct_perf_count( DirectPerfCounterInstallation *installation, int index ); void direct_perf_dump_all( void ); void __D_perf_init( void ); void __D_perf_deinit( void ); #endif DirectFB-1.7.7/lib/direct/serial.c0000644000175000017500000000730012254435330013535 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include D_LOG_DOMAIN( Direct_Serial_Notify, "Direct/Serial/Notify", "Direct Serial Notify" ); D_LOG_DOMAIN( Direct_Serial_Wait, "Direct/Serial/Wait", "Direct Serial Wait" ); /**********************************************************************************************************************/ DirectResult direct_serial_wait( DirectSerial *serial, const DirectSerial *source ) { DirectResult ret = DR_OK; D_ASSERT( serial != NULL ); D_ASSERT( source != NULL ); D_DEBUG_AT( Direct_Serial_Wait, " ## ## ## %s( %p, %p ) ## ## %lu ## %lu ## ## ## ##\n", __FUNCTION__, serial, source, serial->value, source->value ); D_MAGIC_ASSERT( serial, DirectSerial ); D_MAGIC_ASSERT( source, DirectSerial ); D_SYNC_ADD( &serial->waiting, 1 ); do { int wakeup = serial->wakeup; D_ASSERT( serial->overflow == source->overflow || serial->value != source->value ); if (direct_serial_check( serial, source )) break; ret = direct_futex_wait( &serial->wakeup, wakeup ); } while (ret == DR_OK); D_SYNC_ADD( &serial->waiting, -1 ); return ret; } DirectResult direct_serial_notify( DirectSerial *serial, const DirectSerial *source ) { D_ASSERT( serial != NULL ); D_ASSERT( source != NULL ); D_DEBUG_AT( Direct_Serial_Notify, " ###### %s( %p, %p ) ### %lu <-= %lu ### ### ###\n", __FUNCTION__, serial, source, serial->value, source->value ); D_MAGIC_ASSERT( serial, DirectSerial ); D_MAGIC_ASSERT( source, DirectSerial ); D_ASSERT( serial->overflow <= source->overflow ); D_ASSERT( serial->overflow == source->overflow || serial->value != source->value ); if (serial->overflow < source->overflow) { serial->overflow = source->overflow; serial->value = source->value; } else if (serial->overflow == source->overflow && serial->value < source->value) serial->value = source->value; else { D_ASSUME( serial->value == source->value ); return DR_OK; } if (serial->waiting > 0) { D_SYNC_ADD( &serial->wakeup, 1 ); return direct_futex_wake( &serial->wakeup, 1024 ); } return DR_OK; } DirectFB-1.7.7/lib/direct/system.h0000644000175000017500000000333412254435330013612 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__SYSTEM_H__ #define __DIRECT__SYSTEM_H__ #include DirectResult DIRECT_API direct_futex_wait ( int *uaddr, int val ); DirectResult DIRECT_API direct_futex_wait_timed( int *uaddr, int val, int ms ); DirectResult DIRECT_API direct_futex_wake ( int *uaddr, int num ); // Temporarily for testing extern unsigned int DIRECT_API __Direct_Futex_Wait_Count; extern unsigned int DIRECT_API __Direct_Futex_Wake_Count; #endif DirectFB-1.7.7/lib/direct/ppcasm_memcpy.h0000644000175000017500000000041012171403127015110 00000000000000#ifndef __DIRECT__PPCASM_MEMCPY_H__ #define __DIRECT__PPCASM_MEMCPY_H__ #include void *direct_ppcasm_cacheable_memcpy( void *dest, const void *src, size_t n); void *direct_ppcasm_memcpy ( void *dest, const void *src, size_t n); #endif DirectFB-1.7.7/lib/direct/init.c0000644000175000017500000000562312463500054013225 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include void DirectResult__init( void ); void DirectResult__deinit( void ); D_DEBUG_DOMAIN( Direct_Init, "Direct/Init", "Direct Init" ); /**********************************************************************************************************************/ typedef void (*Func)( void ); static Func init_funcs[] = { __D_conf_init, __D_direct_init, __D_util_init, __D_result_init, DirectResult__init, __D_mem_init, __D_thread_init, __D_log_init, __D_log_domain_init, __D_perf_init, __D_interface_init, __D_interface_dbg_init, }; static Func deinit_funcs[] = { __D_interface_dbg_deinit, __D_interface_deinit, __D_log_domain_deinit, __D_perf_deinit, __D_thread_deinit, __D_mem_deinit, DirectResult__deinit, __D_result_deinit, __D_util_deinit, __D_direct_deinit, __D_log_deinit, __D_conf_deinit, }; /**********************************************************************************************************************/ void __D_init_all() { size_t i; D_DEBUG_AT( Direct_Init, "%s()\n", __FUNCTION__ ); for (i=0; i, Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include D_DEBUG_DOMAIN( Direct_Map, "Direct/Map", "Map implementation" ); /**********************************************************************************************************************/ #define REMOVED ((void *) -1) typedef struct { unsigned int hash; void *object; } MapEntry; struct __D_DirectMap { int magic; unsigned int size; unsigned int count; unsigned int removed; MapEntry *entries; DirectMapCompareFunc compare; DirectMapHashFunc hash; void *ctx; }; #define DIRECT_MAP_ASSERT( map ) \ do { \ D_MAGIC_ASSERT( map, DirectMap ); \ } while (0) /**********************************************************************************************************************/ static int locate_entry( DirectMap *map, unsigned int hash, const void *key ) { int pos; const MapEntry *entry; D_DEBUG_AT( Direct_Map, "%s( hash %u )\n", __func__, hash ); DIRECT_MAP_ASSERT( map ); D_ASSERT( key != NULL ); pos = hash % map->size; entry = &map->entries[pos]; while (entry->object) { if (entry->object != REMOVED && entry->hash == hash && map->compare( map, key, entry->object, map->ctx )) return pos; if (++pos == map->size) pos = 0; entry = &map->entries[pos]; } return -1; } static DirectResult resize_map( DirectMap *map, unsigned int size ) { unsigned int i, pos; MapEntry *entries; D_DEBUG_AT( Direct_Map, "%s( size %u )\n", __func__, size ); DIRECT_MAP_ASSERT( map ); D_ASSERT( size > 3 ); entries = D_CALLOC( size, sizeof(MapEntry) ); if (!entries) return D_OOM(); for (i=0; isize; i++) { MapEntry *entry = &map->entries[i]; MapEntry *insertElement; if (entry->object && entry->object != REMOVED) { pos = entry->hash % size; insertElement = &entries[pos]; while (insertElement->object && insertElement->object != REMOVED) { if (++pos == size) pos = 0; insertElement = &entries[pos]; } entries[pos] = *entry; } } D_FREE( map->entries ); map->size = size; map->entries = entries; map->removed = 0; return DR_OK; } /**********************************************************************************************************************/ DirectResult direct_map_create( unsigned int initial_size, DirectMapCompareFunc compare_func, DirectMapHashFunc hash_func, void *ctx, DirectMap **ret_map ) { DirectMap *map; D_DEBUG_AT( Direct_Map, "%s( size %u, compare %p, hash %p )\n", __func__, initial_size, compare_func, hash_func ); D_ASSERT( compare_func != NULL ); D_ASSERT( hash_func != NULL ); D_ASSERT( ret_map != NULL ); if (initial_size < 3) initial_size = 3; map = D_CALLOC( 1, sizeof (DirectMap) ); if (!map) return D_OOM(); map->entries = D_CALLOC( initial_size, sizeof(MapEntry) ); if (!map->entries) { D_FREE( map ); return D_OOM(); } map->size = initial_size; map->compare = compare_func; map->hash = hash_func; map->ctx = ctx; D_MAGIC_SET( map, DirectMap ); *ret_map = map; return DR_OK; } void direct_map_destroy( DirectMap *map ) { D_DEBUG_AT( Direct_Map, "%s()\n", __func__ ); DIRECT_MAP_ASSERT( map ); D_MAGIC_CLEAR( map ); D_FREE( map->entries ); D_FREE( map ); } DirectResult direct_map_insert( DirectMap *map, const void *key, void *object ) { unsigned int hash; int pos; MapEntry *entry; D_DEBUG_AT( Direct_Map, "%s( key %p, object %p )\n", __func__, key, object ); DIRECT_MAP_ASSERT( map ); D_ASSERT( key != NULL ); D_ASSERT( object != NULL ); /* Need to resize the map? */ if ((map->count + map->removed) > map->size / 4) resize_map( map, map->size * 3 ); hash = map->hash( map, key, map->ctx ); pos = hash % map->size; D_DEBUG_AT( Direct_Map, " -> hash %u, pos %d\n", hash, pos ); entry = &map->entries[pos]; while (entry->object && entry->object != REMOVED) { if (entry->hash == hash && map->compare( map, key, entry->object, map->ctx )) { if (entry->object == object) { D_DEBUG_AT( Direct_Map, " -> same object with matching key already exists\n" ); return DR_BUSY; } else { D_DEBUG_AT( Direct_Map, " -> different object with matching key already exists\n" ); D_BUG( "different object with matching key already exists" ); return DR_BUG; } } if (++pos == map->size) pos = 0; entry = &map->entries[pos]; } if (entry->object == REMOVED) map->removed--; entry->hash = hash; entry->object = object; map->count++; D_DEBUG_AT( Direct_Map, " -> new count = %d, removed = %d, size = %d\n", map->count, map->removed, map->size ); return DR_OK; } DirectResult direct_map_remove( DirectMap *map, const void *key ) { unsigned int hash; int pos; D_DEBUG_AT( Direct_Map, "%s( key %p )\n", __func__, key ); DIRECT_MAP_ASSERT( map ); D_ASSERT( key != NULL ); hash = map->hash( map, key, map->ctx ); pos = locate_entry( map, hash, key ); if (pos == -1) { D_WARN( "object to remove not found" ); return DR_ITEMNOTFOUND; } map->entries[pos].object = REMOVED; map->count--; map->removed++; D_DEBUG_AT( Direct_Map, " -> new count = %d, removed = %d, size = %d\n", map->count, map->removed, map->size ); return DR_OK; } void * direct_map_lookup( DirectMap *map, const void *key ) { unsigned int hash; int pos; D_DEBUG_AT( Direct_Map, "%s( key %p )\n", __func__, key ); DIRECT_MAP_ASSERT( map ); D_ASSERT( key != NULL ); hash = map->hash( map, key, map->ctx ); pos = locate_entry( map, hash, key ); return (pos != -1) ? map->entries[pos].object : NULL; } void direct_map_iterate( DirectMap *map, DirectMapIteratorFunc func, void *ctx ) { unsigned int i; D_DEBUG_AT( Direct_Map, "%s( func %p )\n", __func__, func ); DIRECT_MAP_ASSERT( map ); D_ASSERT( func != NULL ); for (i=0; isize; i++) { MapEntry *entry = &map->entries[i]; if (entry->object && entry->object != REMOVED) { switch (func( map, entry->object, ctx )) { case DENUM_OK: break; case DENUM_CANCEL: return; case DENUM_REMOVE: entry->object = REMOVED; map->count--; map->removed++; } } } } DirectFB-1.7.7/lib/direct/os/0000755000175000017500000000000012466665351012630 500000000000000DirectFB-1.7.7/lib/direct/os/linux/0000755000175000017500000000000012466665351013767 500000000000000DirectFB-1.7.7/lib/direct/os/linux/glibc/0000755000175000017500000000000012466665351015047 500000000000000DirectFB-1.7.7/lib/direct/os/linux/glibc/signals.c0000644000175000017500000000375112254435330016564 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include D_LOG_DOMAIN( Direct_Signals, "Direct/Signals", "Direct Signals" ); /**********************************************************************************************************************/ DirectResult direct_sigaction( int signum, const struct sigaction *act, struct sigaction *oldact ) { D_DEBUG_LOG( Direct_Signals, 3, "%s( %d, %p, %p )\n", __FUNCTION__, signum, act, oldact ); if (sigaction( signum, act, oldact ) < 0) return errno2result( errno ); return DR_OK; } DirectFB-1.7.7/lib/direct/os/linux/glibc/clock.c0000644000175000017500000001245712254435330016222 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include /**********************************************************************************************************************/ static long long session_clock_offset; /**********************************************************************************************************************/ __attribute__((no_instrument_function)) long long direct_clock_get_time( DirectClockType type ) { long long micros; struct timespec spec; clockid_t clock_id; switch (type) { case DIRECT_CLOCK_REALTIME: clock_id = CLOCK_REALTIME; break; case DIRECT_CLOCK_SESSION: case DIRECT_CLOCK_MONOTONIC: clock_id = CLOCK_MONOTONIC; break; case DIRECT_CLOCK_PROCESS_CPUTIME_ID: clock_id = CLOCK_PROCESS_CPUTIME_ID; break; case DIRECT_CLOCK_THREAD_CPUTIME_ID: clock_id = CLOCK_THREAD_CPUTIME_ID; break; default: D_BUG( "invalid clock type %d", type ); return DR_INVARG; } if (clock_gettime( clock_id, &spec ) < 0) { if (clock_id != CLOCK_REALTIME) { D_WARN( "clock with id %d not supported by system", clock_id ); return direct_clock_get_time( DIRECT_CLOCK_REALTIME ); } D_PERROR( "Direct/Clock: Could not get even real time clock!\n" ); return 0; } micros = spec.tv_sec * 1000000LL + spec.tv_nsec / 1000LL; if (type == DIRECT_CLOCK_SESSION) micros -= session_clock_offset; return micros; } DirectResult direct_clock_set_time( DirectClockType type, long long micros ) { DirectResult ret = DR_OK; struct timespec spec; clockid_t clock_id; switch (type) { case DIRECT_CLOCK_SESSION: session_clock_offset = micros; return DR_OK; case DIRECT_CLOCK_REALTIME: clock_id = CLOCK_REALTIME; break; case DIRECT_CLOCK_MONOTONIC: clock_id = CLOCK_MONOTONIC; break; case DIRECT_CLOCK_PROCESS_CPUTIME_ID: clock_id = CLOCK_PROCESS_CPUTIME_ID; break; case DIRECT_CLOCK_THREAD_CPUTIME_ID: clock_id = CLOCK_THREAD_CPUTIME_ID; break; default: D_BUG( "invalid clock type %d", type ); return DR_INVARG; } spec.tv_sec = micros / 1000000LL; spec.tv_nsec = micros % 1000000LL * 1000LL; if (clock_settime( clock_id, &spec ) < 0) { ret = errno2result( errno ); D_PERROR( "Direct/Clock: Could not set clock with id %d!\n", clock_id ); } return ret; } long long direct_clock_resolution( DirectClockType type ) { struct timespec spec; clockid_t clock_id; switch (type) { case DIRECT_CLOCK_SESSION: case DIRECT_CLOCK_REALTIME: clock_id = CLOCK_REALTIME; break; case DIRECT_CLOCK_MONOTONIC: clock_id = CLOCK_MONOTONIC; break; case DIRECT_CLOCK_PROCESS_CPUTIME_ID: clock_id = CLOCK_PROCESS_CPUTIME_ID; break; case DIRECT_CLOCK_THREAD_CPUTIME_ID: clock_id = CLOCK_THREAD_CPUTIME_ID; break; default: D_BUG( "invalid clock type %d", type ); return DR_INVARG; } if (clock_getres( clock_id, &spec ) < 0) { if (clock_id != CLOCK_REALTIME) { D_WARN( "clock with id %d not supported by system", clock_id ); return direct_clock_resolution( DIRECT_CLOCK_REALTIME ); } D_PERROR( "Direct/Clock: Could not get even real time clock resolution!\n" ); return 0; } return spec.tv_sec * 1000000LL + spec.tv_nsec / 1000LL; } DirectFB-1.7.7/lib/direct/os/linux/glibc/waitqueue.h0000644000175000017500000000705312254435330017141 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__LINUX__GLIBC__WAITQUEUE_H__ #define __DIRECT__OS__LINUX__GLIBC__WAITQUEUE_H__ #include #include #include "mutex.h" /**********************************************************************************************************************/ struct __D_DirectWaitQueue { pthread_cond_t cond; }; /**********************************************************************************************************************/ #define DIRECT_WAITQUEUE_INITIALIZER(name) { PTHREAD_COND_INITIALIZER } /**********************************************************************************************************************/ static inline DirectResult direct_waitqueue_init( DirectWaitQueue *queue ) { if (pthread_cond_init( &queue->cond, NULL )) return errno2result( errno ); return DR_OK; } static inline DirectResult direct_waitqueue_wait( DirectWaitQueue *queue, DirectMutex *mutex ) { if (pthread_cond_wait( &queue->cond, &mutex->lock )) return errno2result( errno ); return DR_OK; } static inline DirectResult direct_waitqueue_wait_timeout( DirectWaitQueue *queue, DirectMutex *mutex, unsigned long micros ) { struct timeval now; struct timespec timeout; long int seconds = micros / 1000000; long int nano_seconds = (micros % 1000000) * 1000; gettimeofday( &now, NULL ); timeout.tv_sec = now.tv_sec + seconds; timeout.tv_nsec = (now.tv_usec * 1000) + nano_seconds; timeout.tv_sec += timeout.tv_nsec / 1000000000; timeout.tv_nsec %= 1000000000; if (pthread_cond_timedwait( &queue->cond, &mutex->lock, &timeout ) == ETIMEDOUT) return DR_TIMEOUT; return DR_OK; } static inline DirectResult direct_waitqueue_signal( DirectWaitQueue *queue ) { if (pthread_cond_signal( &queue->cond )) return errno2result( errno ); return DR_OK; } static inline DirectResult direct_waitqueue_broadcast( DirectWaitQueue *queue ) { if (pthread_cond_broadcast( &queue->cond )) return errno2result( errno ); return DR_OK; } static inline DirectResult direct_waitqueue_deinit( DirectWaitQueue *queue ) { if (pthread_cond_destroy( &queue->cond )) return errno2result( errno ); return DR_OK; } #endif DirectFB-1.7.7/lib/direct/os/linux/glibc/mutex.c0000644000175000017500000000563412254435330016270 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include /**********************************************************************************************************************/ DirectResult direct_mutex_init( DirectMutex *mutex ) { if (pthread_mutex_init( &mutex->lock, NULL )) return errno2result( errno ); return DR_OK; } DirectResult direct_recursive_mutex_init( DirectMutex *mutex ) { DirectResult ret = DR_OK; int result; pthread_mutexattr_t attr; pthread_mutexattr_init( &attr ); #if HAVE_DECL_PTHREAD_MUTEX_RECURSIVE pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE ); #endif result = pthread_mutex_init( &mutex->lock, &attr ); if (result) { ret = errno2result( errno ); D_PERROR( "Direct/Mutex: Could not initialize recursive mutex!\n" ); } pthread_mutexattr_destroy( &attr ); return (DirectResult) ret; } __attribute__((no_instrument_function)) DirectResult direct_mutex_lock( DirectMutex *mutex ) { if (pthread_mutex_lock( &mutex->lock )) return errno2result( errno ); return DR_OK; } __attribute__((no_instrument_function)) DirectResult direct_mutex_unlock( DirectMutex *mutex ) { if (pthread_mutex_unlock( &mutex->lock )) return errno2result( errno ); return DR_OK; } DirectResult direct_mutex_trylock( DirectMutex *mutex ) { if (pthread_mutex_trylock( &mutex->lock )) return errno2result( errno ); return DR_OK; } DirectResult direct_mutex_deinit( DirectMutex *mutex ) { if (pthread_mutex_destroy( &mutex->lock )) return errno2result( errno ); return DR_OK; } DirectFB-1.7.7/lib/direct/os/linux/glibc/thread.h0000644000175000017500000001232712361150102016365 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__LINUX__GLIBC__THREAD_H__ #define __DIRECT__OS__LINUX__GLIBC__THREAD_H__ #include #include /**********************************************************************************************************************/ struct __D_DirectThreadHandle { pthread_t thread; char name[17]; }; /**********************************************************************************************************************/ /**********************************************************************************************************************/ /**********************************************************************************************************************/ struct __D_DirectOnce { pthread_once_t once; }; /**********************************************************************************************************************/ #define DIRECT_ONCE_INIT { PTHREAD_ONCE_INIT } /**********************************************************************************************************************/ typedef void (*DirectOnceInitHandler)( void ); /**********************************************************************************************************************/ __attribute__((no_instrument_function)) static inline DirectResult direct_once( DirectOnce *once, DirectOnceInitHandler handler ); static inline DirectResult direct_once( DirectOnce *once, DirectOnceInitHandler handler ) { if (pthread_once( &once->once, handler )) return errno2result( errno ); return DR_OK; } /**********************************************************************************************************************/ /**********************************************************************************************************************/ struct __D_DirectTLS { pthread_key_t key; }; /**********************************************************************************************************************/ #define DIRECT_TLS_DATA( name ) \ static DirectTLS name = { (pthread_key_t) -1 } /**********************************************************************************************************************/ __attribute__((no_instrument_function)) static inline void *direct_tls_get__( DirectTLS *tls ); __attribute__((no_instrument_function)) static inline DirectResult direct_tls_set__( DirectTLS *tls, void *value ); __attribute__((no_instrument_function)) static inline DirectResult direct_tls_register( DirectTLS *tls, void (*destructor)( void* ) ); __attribute__((no_instrument_function)) static inline DirectResult direct_tls_unregister( DirectTLS *tls ); /**********************************************************************************************************************/ #define direct_tls_get( name ) direct_tls_get__( &name ) #define direct_tls_set( name, v ) direct_tls_set__( &name, v ) /**********************************************************************************************************************/ static inline void * direct_tls_get__( DirectTLS *tls ) { void *value; value = pthread_getspecific( tls->key ); return value; } static inline DirectResult direct_tls_set__( DirectTLS *tls, void *value ) { if (pthread_setspecific( tls->key, value )) return errno2result( errno ); return DR_OK; } static inline DirectResult direct_tls_register( DirectTLS *tls, void (*destructor)( void* ) ) { if (pthread_key_create( &tls->key, destructor )) return errno2result( errno ); return DR_OK; } static inline DirectResult direct_tls_unregister( DirectTLS *tls ) { if (pthread_key_delete( tls->key )) return errno2result( errno ); tls->key = (pthread_key_t) -1; return DR_OK; } #endif DirectFB-1.7.7/lib/direct/os/linux/glibc/system.c0000644000175000017500000001436512361150102016441 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include #include #include #include #include #include #include D_LOG_DOMAIN( Direct_Futex, "Direct/Futex", "Direct Futex" ); D_LOG_DOMAIN( Direct_Trap, "Direct/Trap", "Direct Trap" ); /**********************************************************************************************************************/ #if DIRECT_BUILD_GETTID && defined(HAVE_LINUX_UNISTD_H) #include #endif /**********************************************************************************************************************/ long direct_pagesize( void ) { return sysconf( _SC_PAGESIZE ); } unsigned long direct_page_align( unsigned long value ) { unsigned long mask = sysconf( _SC_PAGESIZE ) - 1; return (value + mask) & ~mask; } /**********************************************************************************************************************/ pid_t direct_getpid( void ) { return getpid(); } __attribute__((no_instrument_function)) pid_t direct_gettid( void ) { pid_t tid = -1; #if DIRECT_BUILD_GETTID && defined(__NR_gettid) /* present on linux >= 2.4.20 */ tid = syscall(__NR_gettid); #endif if (tid < 0) tid = getpid(); return tid; } /**********************************************************************************************************************/ DirectResult direct_tgkill( int tgid, int tid, int sig ) { #if defined(__NR_tgkill) /* present on linux >= 2.5.75 */ if (syscall(__NR_tgkill) < 0) #else #warning no tgkill #endif return errno2result( errno ); return DR_OK; } void direct_trap( const char *domain, int sig ) { sigval_t val; if (direct_config->delay_trap_ms) { D_LOG( Direct_Trap, VERBOSE, "NOT RAISING signal %d from %s, waiting for %dms... attach gdb --pid=%d\n", sig, domain, direct_config->delay_trap_ms, getpid() ); direct_thread_sleep( direct_config->delay_trap_ms * 1000LL ); return; } D_LOG( Direct_Trap, VERBOSE, "Raising signal %d from %s...\n", sig, domain ); val.sival_int = direct_gettid(); #ifndef DIRECT_BUILD_NO_SIGQUEUE sigqueue( direct_gettid(), sig, val ); #endif // direct_tgkill( direct_getpid(), direct_gettid(), sig ); D_LOG( Direct_Trap, VERBOSE, "...tgkill(%d) on ourself returned, maybe blocked, calling abort()!\n", sig ); abort(); D_LOG( Direct_Trap, VERBOSE, "...abort() returned as well, calling %s()!\n", #ifdef __NR_exit_group "exit_group" ); syscall( __NR_exit_group, DR_BUG ); #else "_exit" ); _exit( DR_BUG ); #endif } /**********************************************************************************************************************/ DirectResult direct_kill( pid_t pid, int sig ) { if (kill( pid, sig )) return errno2result( errno ); return DR_OK; } DirectResult direct_tkill( pid_t tid, int sig ) { #if defined(__NR_tkill) /* present on linux >= 2.5.75 */ if (syscall(__NR_tkill, tid, sig) < 0) #else #warning no tgkill if (kill( tid, sig )) #endif return errno2result( errno ); return DR_OK; } void direct_sync( void ) { sync(); } DirectResult direct_socketpair( int __domain, int __type, int __protocol, int __fds[2] ) { if (socketpair( __domain, __type, __protocol, __fds )) return errno2result( errno ); return DR_OK; } DirectResult direct_sigprocmask( int __how, __const sigset_t *__restrict __set, sigset_t *__restrict __oset ) { int ret = pthread_sigmask( __how, __set, __oset ); return errno2result( ret ); } uid_t direct_getuid() { return getuid(); } uid_t direct_geteuid() { return geteuid(); } char * direct_getenv( const char *name ) { return getenv( name ); } /**********************************************************************************************************************/ DirectResult direct_futex( int *uaddr, int op, int val, const struct timespec *timeout, int *uaddr2, int val3 ) { int ret; #if D_DEBUG_ENABLED unsigned int count; (void)count; switch (op) { case FUTEX_WAIT: count = D_SYNC_ADD_AND_FETCH( &__Direct_Futex_Wait_Count, 1 ); D_DEBUG_AT( Direct_Futex, "## ## WAIT FOR --> %p <-- %d (<-%d) ## ## ## ## * %u\n", uaddr, *uaddr, val, count ); break; case FUTEX_WAKE: count = D_SYNC_ADD_AND_FETCH( &__Direct_Futex_Wake_Count, 1 ); D_DEBUG_AT( Direct_Futex, "### WAKE UP =--> %p <--= %d (->%d) ### ### ### * %u\n", uaddr, *uaddr, val, count ); break; default: D_DEBUG_AT( Direct_Futex, "# # UNKNOWN FUTEX OP # #\n" ); } #endif ret = syscall( __NR_futex, uaddr, op, val, timeout, uaddr2, val3 ); if (ret < 0) return errno2result( errno ); return DR_OK; } DirectFB-1.7.7/lib/direct/os/linux/glibc/mem.c0000644000175000017500000001234012254435330015674 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #ifdef DIRECT_MEM_SENTINELS #define PREFIX_SENTINEL (8) // min = 8! (for size_t of memory block) #define SUFFIX_SENTINEL (8) #define TOTAL_SENTINEL ((PREFIX_SENTINEL) + (SUFFIX_SENTINEL)) __attribute__((no_instrument_function)) static inline void install_sentinels( void *p, size_t size ) { size_t i; size_t *ps = p; u8 *prefix = p; u8 *suffix = p + PREFIX_SENTINEL + size; // direct_log_printf( NULL, "Direct/Mem: Installing sentinels at %p (%zu bytes allocation)...\n", p, size ); *ps = size; for (i=sizeof(size_t); i, Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__LINUX__GLIBC__TYPES_H__ #define __DIRECT__OS__LINUX__GLIBC__TYPES_H__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef unsigned int unichar; typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; typedef int8_t s8; typedef int16_t s16; typedef int32_t s32; typedef int64_t s64; #define __inline__ inline #define D_UNUSED __attribute__((unused)) #define __dfb_no_instrument_function__ __attribute__((no_instrument_function)) #define __constructor__ __attribute__((constructor)) #define __destructor__ __attribute__((destructor)) #ifndef __func__ #define __func__ __FUNCTION__ #endif #define _ZD "%zd" #define _ZU "%zu" #define _ZUn(x) "%" #x "zu" /* * Define the bool type by including stdbool.h (preferably)... */ #if DIRECT_BUILD_STDBOOL # include /* * ...or defining it ourself, if not using C++ or another definition */ #elif !defined(__cplusplus) && !defined(__bool_true_false_are_defined) # warning Fallback definition of bool using u8! Checking for 'flags & 0x100' or higher bits will be false :( typedef u8 bool; # ifndef false # define false (0) # endif # ifndef true # define true (!false) # endif #endif /* DIRECT_BUILD_STDBOOL */ #if DIRECT_BUILD_DYNLOAD #include #endif #ifndef SIGUNUSED #define SIGUNUSED 31 #endif #endif DirectFB-1.7.7/lib/direct/os/linux/glibc/Makefile.am0000644000175000017500000000117212171403127017004 00000000000000## Makefile.am for DirectFB/lib/direct/os/linux/glibc INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib AM_CPPFLAGS = \ -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" \ -DMODULEDIR=\"${RUNTIME_SYSROOT}@MODULEDIR@\" includedir = @INCLUDEDIR@/direct/os/linux/glibc include_HEADERS = \ filesystem.h \ mutex.h \ thread.h \ types.h \ waitqueue.h noinst_LTLIBRARIES = libdirect_os_linux_glibc.la libdirect_os_linux_glibc_la_SOURCES = \ clock.c \ deprecated.c \ filesystem.c \ log.c \ mem.c \ mutex.c \ signals.c \ system.c \ thread.c \ util.c DirectFB-1.7.7/lib/direct/os/linux/glibc/filesystem.h0000644000175000017500000000311312254435330017305 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__LINUX__GLIBC__FILESYSTEM_H__ #define __DIRECT__OS__LINUX__GLIBC__FILESYSTEM_H__ #include /**********************************************************************************************************************/ struct __D_DirectFile { int fd; FILE *file; }; #endif DirectFB-1.7.7/lib/direct/os/linux/glibc/thread.c0000644000175000017500000003416012361150102016357 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include D_LOG_DOMAIN( Direct_Thread , "Direct/Thread", "Thread management" ); D_LOG_DOMAIN( Direct_ThreadInit, "Direct/Thread/Init", "Thread initialization" ); /**********************************************************************************************************************/ /* * Wrapper around pthread's main routine to pass additional arguments * and setup things like signal masks and scheduling priorities. */ __attribute__((no_instrument_function)) static void *direct_thread_main( void *arg ); /**********************************************************************************************************************/ static pthread_key_t thread_key; static DirectOnce thread_init_once = DIRECT_ONCE_INIT; /**********************************************************************************************************************/ __attribute__((no_instrument_function)) static void init_once( void ) { /* Create the key for the TSD (thread specific data). */ pthread_key_create( &thread_key, NULL ); } /**********************************************************************************************************************/ DirectResult direct_thread_init( DirectThread *thread ) { pthread_attr_t attr; struct sched_param param; int policy; int priority; direct_once( &thread_init_once, init_once ); /* Initialize scheduling and other parameters. */ pthread_attr_init( &attr ); #ifdef PTHREAD_EXPLICIT_SCHED pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); #endif /* Select scheduler. */ switch (direct_config->thread_scheduler) { case DCTS_FIFO: policy = SCHED_FIFO; break; case DCTS_RR: policy = SCHED_RR; break; default: policy = SCHED_OTHER; break; } if (pthread_attr_setschedpolicy( &attr, policy )) D_PERROR( "Direct/Thread: Could not set scheduling policy to %s!\n", direct_thread_policy_name(policy) ); /* Read (back) value. */ pthread_attr_getschedpolicy( &attr, &policy ); /* Select priority. */ switch (thread->type) { case DTT_CLEANUP: case DTT_INPUT: case DTT_OUTPUT: case DTT_MESSAGING: case DTT_CRITICAL: priority = thread->type * direct_config->thread_priority_scale / 100; break; default: priority = direct_config->thread_priority; break; } D_DEBUG_AT( Direct_ThreadInit, " -> %s (%d) [%d;%d]\n", direct_thread_policy_name(policy), priority, sched_get_priority_min( policy ), sched_get_priority_max( policy ) ); if (priority < sched_get_priority_min( policy )) priority = sched_get_priority_min( policy ); if (priority > sched_get_priority_max( policy )) priority = sched_get_priority_max( policy ); param.sched_priority = priority; if (pthread_attr_setschedparam( &attr, ¶m )) D_PERROR( "Direct/Thread: Could not set scheduling priority to %d!\n", priority ); /* Select stack size? */ if (direct_config->thread_stack_size > 0) { if (pthread_attr_setstacksize( &attr, direct_config->thread_stack_size )) D_PERROR( "Direct/Thread: Could not set stack size to %d!\n", direct_config->thread_stack_size ); } if (pthread_create( &thread->handle.thread, &attr, direct_thread_main, thread )) return errno2result( errno ); pthread_attr_destroy( &attr ); /* Read (back) value. */ pthread_getattr_np( thread->handle.thread, &attr ); pthread_attr_getstacksize( &attr, &thread->stack_size ); pthread_attr_getschedparam( &attr, ¶m ); thread->priority = param.sched_priority; pthread_attr_destroy( &attr ); return DR_OK; } void direct_thread_deinit( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSUME( !pthread_equal( thread->handle.thread, pthread_self() ) ); D_ASSUME( !thread->detached ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); if (thread->detached) { D_DEBUG_AT( Direct_Thread, " -> DETACHED!\n" ); return; } if (!thread->joined && !pthread_equal( thread->handle.thread, pthread_self() )) { if (thread->canceled) D_DEBUG_AT( Direct_Thread, " -> cancled but not joined!\n" ); else { D_DEBUG_AT( Direct_Thread, " -> still running!\n" ); if (thread->name) D_ERROR( "Direct/Thread: Canceling '%s' (%d)!\n", thread->name, thread->tid ); else D_ERROR( "Direct/Thread: Canceling %d!\n", thread->tid ); #ifndef DIRECT_BUILD_NO_PTHREAD_CANCEL pthread_cancel( thread->handle.thread ); #endif } pthread_join( thread->handle.thread, NULL ); } } /**********************************************************************************************************************/ __attribute__((no_instrument_function)) DirectThread * direct_thread_self( void ) { DirectThread *thread; direct_once( &thread_init_once, init_once ); thread = pthread_getspecific( thread_key ); // D_MAGIC_ASSERT_IF( thread, DirectThread ); /* Support this function for non-direct threads. */ if (!thread) { // D_DEBUG_AT( Direct_Thread, " -> attaching unknown thread %d\n", direct_gettid() ); thread = direct_calloc( 1, sizeof(DirectThread) ); if (!thread) { D_OOM(); return NULL; } thread->handle.thread = pthread_self(); thread->tid = direct_gettid(); D_MAGIC_SET( thread, DirectThread ); pthread_setspecific( thread_key, thread ); } return thread; } __attribute__((no_instrument_function)) const char * direct_thread_self_name( void ) { DirectThread *thread = direct_thread_self(); /* * This function is called by debugging functions, e.g. debug messages, assertions etc. * Therefore no assertions are made here, because they would loop forever if they fail. */ if (!thread) return NULL; if (!thread->name) { if (prctl( PR_GET_NAME, thread->handle.name, 0, 0, 0 ) == 0) thread->name = thread->handle.name; } return thread->name; } void direct_thread_set_name( const char *name ) { char *copy; DirectThread *thread; D_DEBUG_AT( Direct_Thread, "%s( '%s' )\n", __FUNCTION__, name ); thread = direct_thread_self(); if (!thread) return; /* Duplicate string. */ copy = D_STRDUP( name ); if (!copy) { D_OOM(); return; } /* Free old string. */ if (thread->name && thread->name != thread->handle.name) D_FREE( thread->name ); /* Keep the copy. */ thread->name = copy; } void direct_thread_cancel( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->handle.thread != -1 ); D_ASSERT( !pthread_equal( thread->handle.thread, pthread_self() ) ); D_ASSUME( !thread->canceled ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); thread->canceled = true; #ifndef DIRECT_BUILD_NO_PTHREAD_CANCEL pthread_cancel( thread->handle.thread ); #else D_UNIMPLEMENTED(); #endif } void direct_thread_detach( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->handle.thread != -1 ); D_ASSERT( !pthread_equal( thread->handle.thread, pthread_self() ) ); D_ASSUME( !thread->canceled ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); thread->detached = true; pthread_detach( thread->handle.thread ); } void direct_thread_testcancel( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->handle.thread != -1 ); D_ASSERT( pthread_equal( thread->handle.thread, pthread_self() ) ); /* Quick check before calling the pthread function. */ #ifndef DIRECT_BUILD_NO_PTHREAD_CANCEL if (thread->canceled) pthread_testcancel(); #else D_UNIMPLEMENTED(); #endif } void direct_thread_join( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->handle.thread != -1 ); D_ASSUME( !pthread_equal( thread->handle.thread, pthread_self() ) ); D_ASSUME( !thread->joining ); D_ASSUME( !thread->joined ); D_ASSUME( !thread->detached ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); if (thread->detached) { D_DEBUG_AT( Direct_Thread, " -> DETACHED!\n" ); return; } if (!thread->joining && !pthread_equal( thread->handle.thread, pthread_self() )) { thread->joining = true; D_DEBUG_AT( Direct_Thread, " -> joining...\n" ); pthread_join( thread->handle.thread, NULL ); thread->joined = true; D_DEBUG_AT( Direct_Thread, " -> joined.\n" ); } } void direct_thread_kill( DirectThread *thread, int signal ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSERT( thread->handle.thread != -1 ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d, signal %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid, signal ); pthread_kill( thread->handle.thread, signal ); } void direct_thread_sleep( long long micros ) { usleep( micros ); } /**********************************************************************************************************************/ /**********************************************************************************************************************/ static void direct_thread_cleanup( void *arg ) { DirectThread *thread = arg; D_MAGIC_ASSERT( thread, DirectThread ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); if (thread->trace_buffer) direct_trace_free_buffer( thread->trace_buffer ); if (thread->detached) { D_MAGIC_CLEAR( thread ); if (thread->name && thread->name != thread->handle.name) D_FREE( thread->name ); D_FREE( thread ); } } /**********************************************************************************************************************/ /**********************************************************************************************************************/ /**********************************************************************************************************************/ __attribute__((no_instrument_function)) static void * direct_thread_main( void *arg ) { void *ret; DirectThread *thread = arg; prctl( PR_SET_NAME, thread->name, 0, 0, 0 ); pthread_setspecific( thread_key, thread ); D_DEBUG_AT( Direct_ThreadInit, "%s( %p )\n", __FUNCTION__, arg ); D_DEBUG_AT( Direct_ThreadInit, " -> starting...\n" ); D_MAGIC_ASSERT( thread, DirectThread ); pthread_cleanup_push( direct_thread_cleanup, thread ); thread->tid = direct_gettid(); D_DEBUG_AT( Direct_ThreadInit, " -> tid %d\n", thread->tid ); __D_direct_thread_call_init_handlers( thread ); /* Have all signals handled by the main thread. */ if (direct_config->thread_block_signals) direct_signals_block_all(); /* Lock the thread mutex. */ D_DEBUG_AT( Direct_ThreadInit, " -> locking...\n" ); direct_mutex_lock( &thread->lock ); /* Indicate that our initialization has completed. */ D_ASSERT( !thread->init ); thread->init = true; D_DEBUG_AT( Direct_ThreadInit, " -> signalling...\n" ); direct_waitqueue_signal( &thread->cond ); /* Unlock the thread mutex. */ D_DEBUG_AT( Direct_ThreadInit, " -> unlocking...\n" ); direct_mutex_unlock( &thread->lock ); if (thread->joining) { D_DEBUG_AT( Direct_Thread, " -> Being joined before entering main routine!\n" ); return NULL; } D_MAGIC_ASSERT( thread, DirectThread ); /* Call main routine. */ D_DEBUG_AT( Direct_ThreadInit, " -> running...\n" ); ret = thread->main( thread, thread->arg ); D_DEBUG_AT( Direct_Thread, " -> Returning %p from '%s' (%s, %d)...\n", ret, thread->name, direct_thread_type_name(thread->type), thread->tid ); D_MAGIC_ASSERT( thread, DirectThread ); pthread_cleanup_pop( 1 ); return ret; } DirectFB-1.7.7/lib/direct/os/linux/glibc/util.c0000644000175000017500000000367512254435330016106 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include #include #include /**********************************************************************************************************************/ int direct_strcasecmp( const char *a, const char *b ) { return strcasecmp( a, b ); } int direct_strncasecmp( const char *a, const char *b, size_t bytes ) { return strncasecmp( a, b, bytes ); } int direct_vsscanf( const char *str, const char *format, va_list args ) { return vsscanf( str, format, args ); } const char * direct_inet_ntop( int af, const void* src, char* dst, int cnt ) { return inet_ntop( af, src, dst, cnt ); } DirectFB-1.7.7/lib/direct/os/linux/glibc/deprecated.c0000644000175000017500000000624212254435330017222 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #ifndef DIRECT_DISABLE_DEPRECATED #include #include #include #include /**********************************************************************************************************************/ // @deprecated void direct_clock_set_start( const struct timeval *start ) { long long start_micros; start_micros = (long long) start->tv_sec * 1000000LL + (long long) start->tv_usec; direct_clock_set_time( DIRECT_CLOCK_SESSION, direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ) - start_micros ); } // @deprecated int direct_try_open( const char *name1, const char *name2, int flags, bool error_msg ) { DirectResult ret; DirectFile file; ret = direct_file_open( &file, name1, flags, 660 ); if (ret) { if (ret != DR_FILENOTFOUND) { if (error_msg) D_DERROR( ret, "Direct/Util: Opening '%s' failed!\n", name1 ); return -1; } ret = direct_file_open( &file, name2, flags, 660 ); if (ret && error_msg) { if (ret == DR_FILENOTFOUND) D_DERROR( ret, "Direct/Util: Opening '%s' and '%s' failed!\n", name1, name2 ); else D_DERROR( ret, "Direct/Util: Opening '%s' failed!\n", name2 ); } } return ret ? -1 : file.fd; } // @deprecated int direct_util_recursive_pthread_mutex_init( pthread_mutex_t *mutex ) { int ret; pthread_mutexattr_t attr; pthread_mutexattr_init( &attr ); #if HAVE_DECL_PTHREAD_MUTEX_RECURSIVE pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE ); #endif ret = pthread_mutex_init( mutex, &attr ); if (ret) D_PERROR( "Direct/Lock: Could not initialize recursive mutex!\n" ); pthread_mutexattr_destroy( &attr ); return ret; } #endif DirectFB-1.7.7/lib/direct/os/linux/glibc/log.c0000644000175000017500000002070112254435330015677 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #ifdef ANDROID_NDK #include #endif /**********************************************************************************************************************/ static DirectResult init_stderr( DirectLog *log ); static DirectResult init_file ( DirectLog *log, const char *filename ); static DirectResult init_udp ( DirectLog *log, const char *hostport ); /**********************************************************************************************************************/ __attribute__((no_instrument_function)) DirectResult direct_log_init( DirectLog *log, const char *param ) { switch (log->type) { case DLT_STDERR: return init_stderr( log ); case DLT_FILE: return init_file( log, param ); case DLT_UDP: return init_udp( log, param ); default: break; } return DR_UNSUPPORTED; } DirectResult direct_log_deinit( DirectLog *log ) { close( (long) log->data ); return DR_OK; } /**********************************************************************************************************************/ __attribute__((no_instrument_function)) static DirectResult common_log_write( DirectLog *log, const char *buffer, size_t bytes ) { ssize_t ret; ret = write( (long) log->data, buffer, bytes ); if (ret < 0) perror( "write() to log failed" ); #ifdef ANDROID_NDK __android_log_print( ANDROID_LOG_INFO, "android-dfb", "%s", buffer ); #endif return DR_OK; } __attribute__((no_instrument_function)) static DirectResult common_log_flush( DirectLog *log, bool sync ) { if (log->type == DLT_STDERR && fflush( stderr )) return errno2result( errno ); if (sync) { if (fdatasync( (long) log->data )) return errno2result( errno ); } return DR_OK; } __attribute__((no_instrument_function)) static DirectResult stderr_log_write( DirectLog *log, const char *buffer, size_t bytes ) { size_t ret; ret = fwrite( buffer, bytes, 1, stderr ); (void)ret; #ifdef ANDROID_NDK __android_log_print( ANDROID_LOG_INFO, "android-dfb", "%s", buffer ); #endif return DR_OK; } static DirectResult stderr_log_set_buffer( DirectLog *log, char *buffer, size_t bytes ) { if (setvbuf( stderr, buffer, _IOLBF, bytes )) return errno2result( errno ); return DR_OK; } /**********************************************************************************************************************/ static DirectResult init_stderr( DirectLog *log ) { log->data = (void*)(long) dup( fileno( stderr ) ); log->write = stderr_log_write; log->flush = common_log_flush; log->set_buffer = stderr_log_set_buffer; return DR_OK; } static DirectResult init_file( DirectLog *log, const char *filename ) { DirectResult ret; int fd; fd = open( filename, O_WRONLY | O_CREAT | O_APPEND, 0664 ); if (fd < 0) { ret = errno2result( errno ); D_PERROR( "Direct/Log: Could not open '%s' for writing!\n", filename ); return ret; } log->data = (void*)(long) fd; log->write = common_log_write; log->flush = common_log_flush; return DR_OK; } /**********************************************************************************************************************/ static DirectResult parse_host_addr( const char *hostport, struct addrinfo **ret_addr ) { int i, ret; unsigned long int res; int size = strlen( hostport ) + 1; char buf[size]; char *hoststr = buf; char *portstr = NULL; char *end; struct addrinfo hints; memcpy( buf, hostport, size ); for (i=0; i:'!\n", hostport ); return DR_INVARG; } res = strtoul( portstr, &end, 10 ); (void)res; if (end && *end) { D_ERROR( "Direct/Log: Parse error in port number '%s'!\n", portstr ); return DR_INVARG; } memset( &hints, 0, sizeof(hints) ); hints.ai_socktype = SOCK_DGRAM; hints.ai_family = PF_UNSPEC; ret = getaddrinfo( hoststr, portstr, &hints, ret_addr ); if (ret) { switch (ret) { case EAI_FAMILY: D_ERROR( "Direct/Log: Unsupported address family!\n" ); return DR_UNSUPPORTED; case EAI_SOCKTYPE: D_ERROR( "Direct/Log: Unsupported socket type!\n" ); return DR_UNSUPPORTED; case EAI_NONAME: D_ERROR( "Direct/Log: Host not found!\n" ); return DR_FAILURE; case EAI_SERVICE: D_ERROR( "Direct/Log: Port %s is unreachable!\n", portstr ); return DR_FAILURE; #ifdef EAI_ADDRFAMILY case EAI_ADDRFAMILY: #endif case EAI_NODATA: D_ERROR( "Direct/Log: Host found, but has no address!\n" ); return DR_FAILURE; case EAI_MEMORY: return D_OOM(); case EAI_FAIL: D_ERROR( "Direct/Log: A non-recoverable name server error occurred!\n" ); return DR_FAILURE; case EAI_AGAIN: D_ERROR( "Direct/Log: Temporary error, try again!\n" ); return DR_TEMPUNAVAIL; default: D_ERROR( "Direct/Log: Unknown error occured!?\n" ); return DR_FAILURE; } } return DR_OK; } static DirectResult init_udp( DirectLog *log, const char *hostport ) { DirectResult ret; int fd; struct addrinfo *addr; ret = parse_host_addr( hostport, &addr ); if (ret) return ret; fd = socket( addr->ai_family, SOCK_DGRAM, 0 ); if (fd < 0) { ret = errno2result( errno ); D_PERROR( "Direct/Log: Could not create a UDP socket!\n" ); freeaddrinfo( addr ); return ret; } ret = connect( fd, addr->ai_addr, addr->ai_addrlen ); freeaddrinfo( addr ); if (ret) { ret = errno2result( errno ); D_PERROR( "Direct/Log: Could not connect UDP socket to '%s'!\n", hostport ); close( fd ); return ret; } log->data = (void*)(long) fd; log->write = common_log_write; log->flush = common_log_flush; return DR_OK; } DirectFB-1.7.7/lib/direct/os/linux/glibc/Makefile.in0000644000175000017500000006260312466665314017042 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = lib/direct/os/linux/glibc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdirect_os_linux_glibc_la_LIBADD = am_libdirect_os_linux_glibc_la_OBJECTS = clock.lo deprecated.lo \ filesystem.lo log.lo mem.lo mutex.lo signals.lo system.lo \ thread.lo util.lo libdirect_os_linux_glibc_la_OBJECTS = \ $(am_libdirect_os_linux_glibc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdirect_os_linux_glibc_la_SOURCES) DIST_SOURCES = $(libdirect_os_linux_glibc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @INCLUDEDIR@/direct/os/linux/glibc infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib AM_CPPFLAGS = \ -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" \ -DMODULEDIR=\"${RUNTIME_SYSROOT}@MODULEDIR@\" include_HEADERS = \ filesystem.h \ mutex.h \ thread.h \ types.h \ waitqueue.h noinst_LTLIBRARIES = libdirect_os_linux_glibc.la libdirect_os_linux_glibc_la_SOURCES = \ clock.c \ deprecated.c \ filesystem.c \ log.c \ mem.c \ mutex.c \ signals.c \ system.c \ thread.c \ util.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/direct/os/linux/glibc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/direct/os/linux/glibc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdirect_os_linux_glibc.la: $(libdirect_os_linux_glibc_la_OBJECTS) $(libdirect_os_linux_glibc_la_DEPENDENCIES) $(EXTRA_libdirect_os_linux_glibc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdirect_os_linux_glibc_la_OBJECTS) $(libdirect_os_linux_glibc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deprecated.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filesystem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-includeHEADERS # 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: DirectFB-1.7.7/lib/direct/os/linux/glibc/filesystem.c0000644000175000017500000001515012313366376017315 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include /**********************************************************************************************************************/ DirectResult direct_file_open( DirectFile *file, const char *name, int flags, mode_t mode ) { D_ASSERT( file != NULL ); D_ASSERT( name != NULL ); file->file = NULL; file->fd = open( name, flags, mode ); if (file->fd < 0) return errno2result( errno ); return DR_OK; } DirectResult direct_file_read( DirectFile *file, void *buffer, size_t bytes, size_t *ret_bytes ) { ssize_t num; D_ASSERT( file != NULL ); D_ASSERT( buffer != NULL ); num = read( file->fd, buffer, bytes ); if (num < 0) return errno2result( errno ); if (ret_bytes) *ret_bytes = num; return DR_OK; } DirectResult direct_file_write( DirectFile *file, const void *buffer, size_t bytes, size_t *ret_bytes ) { ssize_t num; D_ASSERT( file != NULL ); D_ASSERT( buffer != NULL ); num = write( file->fd, buffer, bytes ); if (num < 0) return errno2result( errno ); if (ret_bytes) *ret_bytes = num; return DR_OK; } DirectResult direct_file_seek( DirectFile *file, off_t offset ) { D_ASSERT( file != NULL ); if (lseek( file->fd, offset, SEEK_CUR ) < 0) return errno2result( errno ); return DR_OK; } DirectResult direct_file_seek_to( DirectFile *file, off_t offset ) { D_ASSERT( file != NULL ); if (lseek( file->fd, offset, SEEK_SET ) < 0) return errno2result( errno ); return DR_OK; } DirectResult direct_file_close( DirectFile *file ) { int ret; D_ASSERT( file != NULL ); if (file->file) { ret = fclose( file->file ); file->file = NULL; } else ret = close( file->fd ); file->fd = -1; if (ret < 0) return errno2result( errno ); return DR_OK; } DirectResult direct_file_map( DirectFile *file, void *addr, size_t offset, size_t bytes, DirectFilePermission flags, void **ret_addr ) { void *map; int prot = 0; D_ASSERT( file != NULL ); D_ASSERT( ret_addr != NULL ); if (flags & DFP_READ) prot |= PROT_READ; if (flags & DFP_WRTIE) prot |= PROT_WRITE; map = mmap( addr, bytes, prot, MAP_SHARED, file->fd, offset ); if (map == MAP_FAILED) return errno2result( errno ); *ret_addr = map; return DR_OK; } DirectResult direct_file_unmap( DirectFile *file, void *addr, size_t bytes ) { if (munmap( addr, bytes )) return errno2result( errno ); return DR_OK; } DirectResult direct_file_get_info( DirectFile *file, DirectFileInfo *ret_info ) { struct stat st; D_ASSERT( file != NULL ); D_ASSERT( ret_info != NULL ); if (fstat( file->fd, &st )) return errno2result( errno ); ret_info->flags = DFIF_SIZE; ret_info->size = st.st_size; return DR_OK; } DirectResult direct_file_dup( DirectFile *file, const DirectFile *other ) { int fd; D_ASSERT( file != NULL ); D_ASSERT( other != NULL ); file->file = NULL; fd = dup( other->fd ); if (fd < 0) return errno2result( errno ); file->fd = fd; return DR_OK; } /**********************************************************************************************************************/ DirectResult direct_fgets( DirectFile *file, char *buf, size_t length ) { D_ASSERT( file != NULL ); D_ASSERT( buf != NULL ); if (!file->file) { file->file = fdopen( file->fd, "r" ); if (!file->file) return errno2result( errno ); } if (!fgets( buf, length, file->file )) { if (feof( file->file )) return DR_EOF; return DR_FAILURE; } return DR_OK; } /**********************************************************************************************************************/ DirectResult direct_popen( DirectFile *file, const char *name, int flags ) { D_ASSERT( file != NULL ); D_ASSERT( name != NULL ); file->file = popen( name, (flags & O_WRONLY) ? "w" : (flags & O_RDWR) ? "rw" : "r" ); if (!file->file) return errno2result( errno ); file->fd = fileno( file->file ); return DR_OK; } DirectResult direct_pclose( DirectFile *file ) { int ret; D_ASSERT( file != NULL ); D_ASSERT( file->file != NULL ); ret = pclose( file->file ); if (ret < 0) return errno2result( errno ); return DR_OK; } /**********************************************************************************************************************/ DirectResult direct_readlink( const char *name, char *buf, size_t length, size_t *ret_length ) { int ret; D_ASSERT( name != NULL ); ret = readlink( name, buf, length ); if (ret < 0) return errno2result( errno ); if (ret_length) *ret_length = ret; return DR_OK; } /**********************************************************************************************************************/ DirectResult direct_access( const char *name, int flags ) { int ret; D_ASSERT( name != NULL ); ret = access( name, flags ); if (ret < 0) return errno2result( errno ); return DR_OK; } DirectFB-1.7.7/lib/direct/os/linux/glibc/mutex.h0000644000175000017500000000357212254435330016274 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__LINUX__GLIBC__MUTEX_H__ #define __DIRECT__OS__LINUX__GLIBC__MUTEX_H__ #include #include /**********************************************************************************************************************/ struct __D_DirectMutex { pthread_mutex_t lock; }; /**********************************************************************************************************************/ #define DIRECT_MUTEX_INITIALIZER(name) { PTHREAD_MUTEX_INITIALIZER } #define DIRECT_RECURSIVE_MUTEX_INITIALIZER(name) { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP } #endif DirectFB-1.7.7/lib/direct/os/waitqueue.h0000644000175000017500000000410512254435330014715 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__WAITQUEUE_H__ #define __DIRECT__OS__WAITQUEUE_H__ #include /**********************************************************************************************************************/ #ifndef DIRECT_OS_WAITQUEUE_DEFINED DirectResult DIRECT_API direct_waitqueue_init ( DirectWaitQueue *queue ); DirectResult DIRECT_API direct_waitqueue_wait ( DirectWaitQueue *queue, DirectMutex *mutex ); DirectResult DIRECT_API direct_waitqueue_wait_timeout( DirectWaitQueue *queue, DirectMutex *mutex, unsigned long micros ); DirectResult DIRECT_API direct_waitqueue_signal ( DirectWaitQueue *queue ); DirectResult DIRECT_API direct_waitqueue_broadcast ( DirectWaitQueue *queue ); DirectResult DIRECT_API direct_waitqueue_deinit ( DirectWaitQueue *queue ); #endif #endif DirectFB-1.7.7/lib/direct/os/log.h0000644000175000017500000000660312254435330013472 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__LOG_H__ #define __DIRECT__OS__LOG_H__ #include /**********************************************************************************************************************/ typedef enum { DLT_STDERR, /* Simply print out log on stderr or comparable, e.g. using printk. */ DLT_FILE, /* Write log into a file. */ DLT_UDP /* Send out log via UDP. */ } DirectLogType; /**********************************************************************************************************************/ typedef DirectResult (*DirectLogWriteFunc) ( DirectLog *log, const char *buffer, size_t bytes ); typedef DirectResult (*DirectLogFlushFunc) ( DirectLog *log, bool sync ); typedef DirectResult (*DirectLogSetBufferFunc)( DirectLog *log, char *buffer, size_t bytes ); /**********************************************************************************************************************/ struct __D_DirectLog { int magic; DirectLogType type; DirectMutex lock; void *data; DirectLogWriteFunc write; DirectLogFlushFunc flush; DirectLogSetBufferFunc set_buffer; }; /**********************************************************************************************************************/ /* * Initializes a logging facility. * * For each 'log->type' the 'param' has a different meaning: * DLT_STDERR ignored (leave NULL) * DLT_FILE file name * DLT_UDP : * * Implementation may set 'log->data' and should at least provide 'log->write' callback! */ DirectResult direct_log_init ( DirectLog *log, const char *param ); /* * Destroys a logging facility. */ DirectResult direct_log_deinit( DirectLog *log ); void direct_log_debug_delay( bool min ); #endif DirectFB-1.7.7/lib/direct/os/thread.h0000644000175000017500000000542312254435330014157 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__THREAD_H__ #define __DIRECT__OS__THREAD_H__ #include /**********************************************************************************************************************/ DirectResult DIRECT_API direct_thread_init ( DirectThread *thread ); void DIRECT_API direct_thread_deinit ( DirectThread *thread ); /* * Returns the thread of the caller. */ DirectThread DIRECT_API *direct_thread_self ( void ); /* * Returns the name of the calling thread. */ const char DIRECT_API *direct_thread_self_name ( void ); /* * Changes the name of the calling thread. */ void DIRECT_API direct_thread_set_name ( const char *name ); /* * Cancel a running thread. */ void DIRECT_API direct_thread_cancel ( DirectThread *thread ); /* * Detach a thread. */ void DIRECT_API direct_thread_detach ( DirectThread *thread ); /* * Check if the calling thread is canceled. * Must not be called by other threads than 'thread'. * This function won't return if the thread is canceled. */ void DIRECT_API direct_thread_testcancel ( DirectThread *thread ); /* * Wait until a running thread is terminated. */ void DIRECT_API direct_thread_join ( DirectThread *thread ); void DIRECT_API direct_thread_kill ( DirectThread *thread, int signal ); void DIRECT_API direct_thread_sleep ( long long micros ); #endif DirectFB-1.7.7/lib/direct/os/clock.h0000644000175000017500000000376412254435330014011 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__CLOCK_H__ #define __DIRECT__OS__CLOCK_H__ #include /**********************************************************************************************************************/ typedef enum { DIRECT_CLOCK_SESSION = 0x53551011, /* Derived from monotonic clock if supported */ DIRECT_CLOCK_REALTIME = 0, DIRECT_CLOCK_MONOTONIC = 1, DIRECT_CLOCK_PROCESS_CPUTIME_ID = 2, DIRECT_CLOCK_THREAD_CPUTIME_ID = 3 } DirectClockType; long long direct_clock_get_time ( DirectClockType type ); DirectResult direct_clock_set_time ( DirectClockType type, long long micros ); long long direct_clock_resolution( DirectClockType type ); #endif DirectFB-1.7.7/lib/direct/os/types.h0000644000175000017500000000653512254435330014061 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__TYPES_H__ #define __DIRECT__OS__TYPES_H__ #include /**********************************************************************************************************************/ #endif #if DIRECT_BUILD_OSTYPE == DIRECT_OS_LINUX_GNU_LIBC #ifdef __DIRECT__OS__TYPES_H__ #include #endif #ifdef __DIRECT__OS__FILESYSTEM_H__ #include #endif #ifdef __DIRECT__OS__MUTEX_H__ #include #endif #ifdef __DIRECT__OS__THREAD_H__ #include #endif #ifdef __DIRECT__OS__WAITQUEUE_H__ #include #endif #elif DIRECT_BUILD_OSTYPE == DIRECT_OS_LINUX_KERNEL #ifdef __DIRECT__OS__TYPES_H__ #include #endif #ifdef __DIRECT__OS__FILESYSTEM_H__ #include #endif #ifdef __DIRECT__OS__MUTEX_H__ #include #endif #ifdef __DIRECT__OS__THREAD_H__ #include #endif #ifdef __DIRECT__OS__WAITQUEUE_H__ #include #endif #elif DIRECT_BUILD_OSTYPE == DIRECT_OS_PSP #ifdef __DIRECT__OS__TYPES_H__ #include #endif #ifdef __DIRECT__OS__FILESYSTEM_H__ #include #endif #ifdef __DIRECT__OS__MUTEX_H__ #include #endif #ifdef __DIRECT__OS__THREAD_H__ #include #endif #ifdef __DIRECT__OS__WAITQUEUE_H__ #include #endif #elif DIRECT_BUILD_OSTYPE == DIRECT_OS_WIN32 #ifdef __DIRECT__OS__TYPES_H__ #include #endif #ifdef __DIRECT__OS__FILESYSTEM_H__ #include #endif #ifdef __DIRECT__OS__MUTEX_H__ #include #endif #ifdef __DIRECT__OS__THREAD_H__ #include #endif #ifdef __DIRECT__OS__WAITQUEUE_H__ #include #endif #else #error Unsupported OS type (DIRECT_BUILD_OSTYPE)! #endif #include DirectFB-1.7.7/lib/direct/os/Makefile.am0000644000175000017500000000040012171403127014556 00000000000000## Makefile.am for DirectFB/lib/direct/os SUBDIRS = linux/glibc includedir = @INCLUDEDIR@/direct/os include_HEADERS = \ clock.h \ filesystem.h \ log.h \ mem.h \ mutex.h \ signals.h \ system.h \ thread.h \ types.h \ waitqueue.h DirectFB-1.7.7/lib/direct/os/filesystem.h0000644000175000017500000000717412254435330015101 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__FILESYSTEM_H__ #define __DIRECT__OS__FILESYSTEM_H__ #include /**********************************************************************************************************************/ /* API is subject to change! */ typedef enum { DFP_NONE = 0, DFP_READ = 1, DFP_WRTIE = 2, DFP_ALL = 3 } DirectFilePermission; typedef enum { DFIF_NONE = 0, DFIF_SIZE = 1, DFIF_ALL = 1 } DirectFileInfoFlags; typedef struct { DirectFileInfoFlags flags; size_t size; } DirectFileInfo; DirectResult DIRECT_API direct_file_open ( DirectFile *file, const char *name, int flags, mode_t mode ); DirectResult DIRECT_API direct_file_read ( DirectFile *file, void *buffer, size_t bytes, size_t *ret_bytes ); DirectResult DIRECT_API direct_file_write( DirectFile *file, const void *buffer, size_t bytes, size_t *ret_bytes ); DirectResult DIRECT_API direct_file_seek( DirectFile *file, off_t offset ); DirectResult DIRECT_API direct_file_seek_to( DirectFile *file, off_t offset ); DirectResult DIRECT_API direct_file_close( DirectFile *file ); DirectResult DIRECT_API direct_file_map( DirectFile *file, void *addr, size_t offset, size_t bytes, DirectFilePermission flags, void **ret_addr ); DirectResult DIRECT_API direct_file_unmap( DirectFile *file, void *addr, size_t bytes ); DirectResult DIRECT_API direct_file_get_info( DirectFile *file, DirectFileInfo *ret_info ); DirectResult DIRECT_API direct_file_dup( DirectFile *file, const DirectFile *other ); /**********************************************************************************************************************/ DirectResult DIRECT_API direct_fgets ( DirectFile *file, char *buf, size_t length ); /**********************************************************************************************************************/ DirectResult DIRECT_API direct_popen ( DirectFile *file, const char *name, int flags ); DirectResult DIRECT_API direct_pclose( DirectFile *file ); /**********************************************************************************************************************/ DirectResult DIRECT_API direct_readlink( const char *name, char *buf, size_t length, size_t *ret_length ); DirectResult DIRECT_API direct_access( const char *name, int flags ); #define R_OK 4 #define W_OK 2 #define X_OK 1 #define F_OK 0 #endif DirectFB-1.7.7/lib/direct/os/Makefile.in0000644000175000017500000006202412466665314014620 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = lib/direct/os DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @INCLUDEDIR@/direct/os infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = linux/glibc include_HEADERS = \ clock.h \ filesystem.h \ log.h \ mem.h \ mutex.h \ signals.h \ system.h \ thread.h \ types.h \ waitqueue.h all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/direct/os/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/direct/os/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-includeHEADERS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-includeHEADERS install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-includeHEADERS # 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: DirectFB-1.7.7/lib/direct/os/system.h0000644000175000017500000000523612254435330014236 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__SYSTEM_H__ #define __DIRECT__OS__SYSTEM_H__ #include /**********************************************************************************************************************/ /* * Mainly special system calls... */ long DIRECT_API direct_pagesize( void ); unsigned long DIRECT_API direct_page_align( unsigned long value ); pid_t DIRECT_API direct_getpid( void ); pid_t DIRECT_API direct_gettid( void ); /* May return DR_TASK_NOT_FOUND */ DirectResult DIRECT_API direct_tgkill( int tgid, int tid, int sig ); /* shall not return! */ void DIRECT_API direct_trap( const char *domain, int sig ); DirectResult DIRECT_API direct_kill( pid_t pid, int sig ); DirectResult DIRECT_API direct_tkill( pid_t tid, int sig ); void DIRECT_API direct_sync( void ); DirectResult DIRECT_API direct_socketpair( int __domain, int __type, int __protocol, int __fds[2] ); DirectResult DIRECT_API direct_sigprocmask( int __how, const sigset_t *__set, sigset_t *__oset ); uid_t DIRECT_API direct_getuid( void ); uid_t DIRECT_API direct_geteuid( void ); char DIRECT_API *direct_getenv( const char *name ); DirectResult DIRECT_API direct_futex( int *uaddr, int op, int val, const struct timespec *timeout, int *uaddr2, int val3 ); #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 #endif DirectFB-1.7.7/lib/direct/os/signals.h0000644000175000017500000000312112254435330014341 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__SIGNALS_H__ #define __DIRECT__OS__SIGNALS_H__ #include DirectResult DIRECT_API direct_sigaction( int signum, const struct sigaction *act, struct sigaction *oldact ); #endif DirectFB-1.7.7/lib/direct/os/mutex.h0000644000175000017500000000373512254435330014056 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__MUTEX_H__ #define __DIRECT__OS__MUTEX_H__ #include /**********************************************************************************************************************/ #ifndef DIRECT_OS_MUTEX_DEFINED DirectResult DIRECT_API direct_mutex_init ( DirectMutex *mutex ); DirectResult DIRECT_API direct_recursive_mutex_init ( DirectMutex *mutex ); DirectResult DIRECT_API direct_mutex_lock ( DirectMutex *mutex ); DirectResult DIRECT_API direct_mutex_unlock ( DirectMutex *mutex ); DirectResult DIRECT_API direct_mutex_trylock ( DirectMutex *mutex ); DirectResult DIRECT_API direct_mutex_deinit ( DirectMutex *mutex ); #endif #endif DirectFB-1.7.7/lib/direct/os/mem.h0000644000175000017500000000337212254435330013467 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__OS__MEM_H__ #define __DIRECT__OS__MEM_H__ #include /**********************************************************************************************************************/ void DIRECT_API *direct_malloc ( size_t bytes ); void DIRECT_API *direct_calloc ( size_t count, size_t bytes); void DIRECT_API *direct_realloc( void *mem, size_t bytes ); char DIRECT_API *direct_strdup ( const char *string ); void DIRECT_API direct_free ( void *mem ); #endif DirectFB-1.7.7/lib/direct/processor.h0000644000175000017500000001024412254435330014303 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__PROCESSOR_H__ #define __DIRECT__PROCESSOR_H__ #include #include /**********************************************************************************************************************/ typedef struct { DirectResult (*Start)( DirectProcessor *processor, void *context ); DirectResult (*Process)( DirectProcessor *processor, void *data, void *context ); DirectResult (*Stop)( DirectProcessor *processor, void *context ); DirectResult (*Idle)( DirectProcessor *processor, void *context ); } DirectProcessorFuncs; /**********************************************************************************************************************/ struct __D_DirectProcessor { int magic; DirectThread *thread; DirectFifo commands; DirectFifo recycled; int max_recycled; bool direct; bool stop; #if 0 bool locked; int lock; DirectWaitQueue lock_cond; DirectMutex lock_mutex; #endif char *name; const DirectProcessorFuncs *funcs; unsigned int data_size; void *context; int idle_ms; }; /**********************************************************************************************************************/ DirectResult DIRECT_API direct_processor_init ( DirectProcessor *processor, const char *name, const DirectProcessorFuncs *funcs, unsigned int data_size, void *context, int idle_ms ); DirectResult DIRECT_API direct_processor_destroy ( DirectProcessor *processor ); void DIRECT_API *direct_processor_allocate( DirectProcessor *processor ); void DIRECT_API direct_processor_post ( DirectProcessor *processor, void *data ); void DIRECT_API direct_processor_recycle ( DirectProcessor *processor, void *data ); #if 0 void DIRECT_API direct_processor_lock ( DirectProcessor *processor ); void DIRECT_API direct_processor_unlock ( DirectProcessor *processor ); #endif #endif DirectFB-1.7.7/lib/direct/uuid.c0000644000175000017500000000404312254435330013225 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include D_LOG_DOMAIN( Direct_UUID, "Direct/UUID", "Direct UUID" ); /**********************************************************************************************************************/ // FIXME: FAKE UUID IMPLEMENTATION! static volatile unsigned long long uuid_pool = 18446744073709551557ULL; void direct_uuid_generate( DirectUUID *ret_id ) { D_DEBUG_AT( Direct_UUID, "%s( %p )\n", __FUNCTION__, ret_id ); D_ASSERT( ret_id != NULL ); ret_id->___u64_x2[0] = uuid_pool; ret_id->___u64_x2[1] = direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ); uuid_pool = ret_id->___u64_x2[1] + (uuid_pool << 7); D_DEBUG_AT( Direct_UUID, " ** =-=> [ "D_UUID_FORMAT" ] <=-= **\n", D_UUID_VALS( ret_id ) ); } DirectFB-1.7.7/lib/direct/list.h0000644000175000017500000002032112254435330013234 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__LIST_H__ #define __DIRECT__LIST_H__ #include #include struct __D_DirectLink { int magic; DirectLink *next; DirectLink *prev; /* The 'prev' pointer of the first element always points to the last element of the list, for fast appending ;-) */ }; static __inline__ void direct_list_prepend( DirectLink **list, DirectLink *link ) { DirectLink *first; D_ASSERT( list != NULL ); D_ASSERT( link != NULL ); first = *list; link->next = first; if (first) { D_MAGIC_ASSERT( first, DirectLink ); link->prev = first->prev; first->prev = link; } else link->prev = link; *list = link; D_MAGIC_SET( link, DirectLink ); } static __inline__ void direct_list_append( DirectLink **list, DirectLink *link ) { DirectLink *first; D_ASSERT( list != NULL ); D_ASSERT( link != NULL ); first = *list; link->next = NULL; if (first) { DirectLink *last = first->prev; D_MAGIC_ASSERT( first, DirectLink ); D_MAGIC_ASSERT( last, DirectLink ); link->prev = last; last->next = first->prev = link; } else *list = link->prev = link; D_MAGIC_SET( link, DirectLink ); } static __inline__ void direct_list_insert( DirectLink **list, DirectLink *link, DirectLink *before ) { DirectLink *first; D_ASSERT( list != NULL ); D_ASSERT( link != NULL ); first = *list; D_MAGIC_ASSERT_IF( first, DirectLink ); D_MAGIC_ASSERT_IF( before, DirectLink ); if (first == before) { direct_list_prepend( list, link ); } else if (first == NULL || before == NULL) { direct_list_append( list, link ); } else { DirectLink *prev = before->prev; D_MAGIC_ASSERT( prev, DirectLink ); prev->next = link; link->prev = prev; link->next = before; before->prev = link; D_MAGIC_SET( link, DirectLink ); } } static __inline__ bool direct_list_contains_element_EXPENSIVE( DirectLink *list, DirectLink *link ) { D_MAGIC_ASSERT_IF( list, DirectLink ); while (list) { if (list == link) return true; list = list->next; } return false; } static __inline__ int direct_list_count_elements_EXPENSIVE( DirectLink *list ) { int count = 0; while (list) { D_MAGIC_ASSERT( list, DirectLink ); count++; list = list->next; } return count; } static __inline__ bool direct_list_remove( DirectLink **list, DirectLink *link ) { DirectLink *next; DirectLink *prev; D_ASSERT( list != NULL ); D_ASSERT( direct_list_contains_element_EXPENSIVE( *list, link ) ); D_MAGIC_ASSERT( *list, DirectLink ); D_MAGIC_ASSERT( link, DirectLink ); next = link->next; prev = link->prev; if (next) { D_MAGIC_ASSERT( next, DirectLink ); next->prev = prev; } else (*list)->prev = prev; if (link == *list) *list = next; else { D_MAGIC_ASSERT( prev, DirectLink ); prev->next = next; } link->next = link->prev = NULL; D_MAGIC_CLEAR( link ); return true; } static __inline__ void direct_list_move_to_front( DirectLink **list, DirectLink *link ) { DirectLink *next; DirectLink *prev; DirectLink *first; D_ASSERT( list != NULL ); first = *list; D_ASSERT( direct_list_contains_element_EXPENSIVE( first, link ) ); D_MAGIC_ASSERT( first, DirectLink ); D_MAGIC_ASSERT( link, DirectLink ); if (first == link) return; next = link->next; prev = link->prev; D_MAGIC_ASSERT_IF( next, DirectLink ); D_MAGIC_ASSERT( prev, DirectLink ); if (next) { next->prev = prev; link->prev = first->prev; } else link->prev = prev; prev->next = next; link->next = first; first->prev = link; *list = link; } static __inline__ void* direct_list_get_last( DirectLink *list ) { D_MAGIC_ASSERT_IF( list, DirectLink ); if (list) { D_MAGIC_ASSERT( list->prev, DirectLink ); return list->prev; } return NULL; } #ifdef __GNUC__ #define direct_list_check_link( link ) \ ({ \ D_MAGIC_ASSERT_IF( link, DirectLink ); \ link != NULL; \ }) #else #define direct_list_check_link( link ) \ (link != NULL) #endif #define direct_list_foreach(elem, list) \ for (elem = (__typeof__(elem))(list); \ direct_list_check_link( (DirectLink*)(elem) ); \ elem = (__typeof__(elem))(((DirectLink*)(elem))->next)) #define direct_list_foreach_via(elem, list, _link) \ for (elem = (list) ? (__typeof__(elem)) ((void*)(list) - (long)(&((__typeof__(elem)) NULL)->_link)) : NULL; \ direct_list_check_link( (elem) ? &(elem)->_link : NULL ); \ elem = ((elem)->_link.next) ? (__typeof__(elem)) ((void*)((elem)->_link.next) - (long)(&((__typeof__(elem)) NULL)->_link)) : NULL ) #define direct_list_foreach_via_safe(elem, temp, list, _link) \ for (elem = (list) ? (__typeof__(elem)) ((void*)(list) - (long)(&((__typeof__(elem)) NULL)->_link)) : NULL, temp = ((elem) ? (((elem)->_link.next) ? (__typeof__(elem)) ((void*)((elem)->_link.next) - (long)(&((__typeof__(elem)) NULL)->_link)) : NULL) : NULL); \ direct_list_check_link( (elem) ? &(elem)->_link : NULL ); \ elem = (__typeof__(elem))(temp), temp = ((elem) ? (((elem)->_link.next) ? (__typeof__(elem)) ((void*)((elem)->_link.next) - (long)(&((__typeof__(elem)) NULL)->_link)) : NULL) : NULL) ) #define direct_list_foreach_reverse(elem, list) \ for (elem = (__typeof__(elem))((list) ? (list)->prev : NULL); \ direct_list_check_link( (DirectLink*)(elem) ); \ elem = (__typeof__(elem))((((DirectLink*)(elem))->prev->next) ? ((DirectLink*)(elem))->prev : NULL)) #define direct_list_foreach_safe(elem, temp, list) \ for (elem = (__typeof__(elem))(list), temp = ((__typeof__(temp))(elem) ? (__typeof__(temp))(((DirectLink*)(elem))->next) : NULL); \ direct_list_check_link( (DirectLink*)(elem) ); \ elem = (__typeof__(elem))(temp), temp = ((__typeof__(temp))(elem) ? (__typeof__(temp))(((DirectLink*)(elem))->next) : NULL)) #define direct_list_foreach_remove(elem, list) \ while ((elem = (__typeof__(elem))(list)) && direct_list_remove( &(list), (DirectLink*)(elem) )) #endif DirectFB-1.7.7/lib/direct/list.c0000644000175000017500000000246712254435330013242 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include DirectFB-1.7.7/lib/direct/armasm_memcpy.h0000644000175000017500000000206212171403127015112 00000000000000/* * ARM memcpy asm replacement. * * Copyright (C) 2009 Bluush Dev Team. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser 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 __ARMASM_MEMCPY_H__ #define __ARMASM_MEMCPY_H__ #if USE_ARMASM && !WORDS_BIGENDIAN void *direct_armasm_memcpy ( void *dest, const void *src, size_t n); #endif /* USE_ARMASM && !WORDS_BIGENDIAN */ #endif /* __ARMASM_MEMCPY_H__ */ DirectFB-1.7.7/lib/direct/signals.h0000644000175000017500000000517012361150102013714 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__SIGNALS_H__ #define __DIRECT__SIGNALS_H__ #include typedef enum { DSHR_OK, DSHR_REMOVE, DSHR_RESUME } DirectSignalHandlerResult; typedef DirectSignalHandlerResult (*DirectSignalHandlerFunc)( int num, void *addr, void *ctx ); DirectResult DIRECT_API direct_signals_initialize( void ); DirectResult DIRECT_API direct_signals_shutdown( void ); /* * Modifies the current thread's signal mask to block everything. * Should be called by input threads once to avoid killing themselves * in the signal handler by deinitializing all input drivers. */ void DIRECT_API direct_signals_block_all( void ); /* * Signal number to use when registering a handler for any interrupt. */ #define DIRECT_SIGNAL_ANY -1 #define DIRECT_SIGNAL_DUMP_STACK -2 DirectResult DIRECT_API direct_signal_handler_add ( int num, DirectSignalHandlerFunc func, void *ctx, DirectSignalHandler **ret_handler ); DirectResult DIRECT_API direct_signal_handler_remove( DirectSignalHandler *handler ); #endif DirectFB-1.7.7/lib/direct/perf.c0000644000175000017500000001311412254435330013212 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include static void * direct_perf_dump_thread( DirectThread *thread, void *arg ); /**********************************************************************************************************************/ static DirectHash counter_hash; static DirectMutex counter_lock; static unsigned long counter_ids; static DirectThread *counter_dump_thread; /**********************************************************************************************************************/ void __D_perf_init() { direct_hash_init( &counter_hash, 7 ); direct_mutex_init( &counter_lock ); if (direct_config->perf_dump_interval) direct_thread_create( DTT_DEFAULT, direct_perf_dump_thread, NULL, "Perf Dump" ); } void __D_perf_deinit() { if (counter_dump_thread) { DirectThread *thread = counter_dump_thread; direct_thread_lock( thread ); counter_dump_thread = NULL; direct_thread_notify( thread ); direct_thread_unlock( thread ); direct_thread_join( thread ); direct_thread_destroy( thread ); } //direct_perf_dump_all(); direct_hash_deinit( &counter_hash ); direct_mutex_deinit( &counter_lock ); } /**********************************************************************************************************************/ void direct_perf_count( DirectPerfCounterInstallation *installation, int diff ) { DirectPerfCounter *counter; D_ASSERT( installation != NULL ); direct_mutex_lock( &counter_lock ); if (installation->counter_id == 0) { counter = D_CALLOC( 1, sizeof(DirectPerfCounter) ); if (!counter) { direct_mutex_unlock( &counter_lock ); D_OOM(); return; } installation->counter_id = ++counter_ids; D_ASSERT( installation->counter_id != 0 ); D_ASSERT( installation->counter_id != ~0 ); // FIXME: can there be more than 4 billion counters? direct_snputs( counter->name, installation->name, sizeof(counter->name) ); counter->reset_on_dump = installation->reset_on_dump; direct_hash_insert( &counter_hash, installation->counter_id, counter ); } else { counter = direct_hash_lookup( &counter_hash, installation->counter_id ); if (!counter) { direct_mutex_unlock( &counter_lock ); D_BUG( "unknown performance counter installation (%lu)", installation->counter_id ); return; } } counter->count += diff; if (!counter->start) counter->start = direct_clock_get_time( DIRECT_CLOCK_SESSION ); direct_mutex_unlock( &counter_lock ); } static bool perf_iterate( DirectHash *hash, unsigned long key, void *value, void *ctx ) { DirectPerfCounter *counter = value; counter->stop = direct_clock_get_time( DIRECT_CLOCK_SESSION ); if (counter->count > 0) direct_log_printf( NULL, " %-60s %12lu (%7.3f/sec) %9lld -%9lld\n", counter->name, counter->count, counter->count * 1000000.0 / (double)(counter->stop - counter->start), counter->start, counter->stop ); if (counter->reset_on_dump) { counter->count = 0; counter->start = 0; } return true; } void direct_perf_dump_all() { direct_mutex_lock( &counter_lock ); if (direct_hash_count( &counter_hash )) { direct_log_printf( NULL, "Performance Counters Total count rate start end\n" ); direct_hash_iterate( &counter_hash, perf_iterate, NULL ); } direct_mutex_unlock( &counter_lock ); } static void * direct_perf_dump_thread( DirectThread *thread, void *arg ) { while (counter_dump_thread) { direct_perf_dump_all(); direct_thread_lock( thread ); if (counter_dump_thread) direct_thread_wait( thread, direct_config->perf_dump_interval ); direct_thread_unlock( thread ); } return NULL; } DirectFB-1.7.7/lib/direct/ppc_asm.h0000644000175000017500000000321512171403127013703 00000000000000/* Condition Register Bit Fields */ #define cr0 0 #define cr1 1 #define cr2 2 #define cr3 3 #define cr4 4 #define cr5 5 #define cr6 6 #define cr7 7 /* General Purpose Registers (GPRs) */ #define r0 0 #define r1 1 #define r2 2 #define r3 3 #define r4 4 #define r5 5 #define r6 6 #define r7 7 #define r8 8 #define r9 9 #define r10 10 #define r11 11 #define r12 12 #define r13 13 #define r14 14 #define r15 15 #define r16 16 #define r17 17 #define r18 18 #define r19 19 #define r20 20 #define r21 21 #define r22 22 #define r23 23 #define r24 24 #define r25 25 #define r26 26 #define r27 27 #define r28 28 #define r29 29 #define r30 30 #define r31 31 /* Floating Point Registers (FPRs) */ #define fr0 0 #define fr1 1 #define fr2 2 #define fr3 3 #define fr4 4 #define fr5 5 #define fr6 6 #define fr7 7 #define fr8 8 #define fr9 9 #define fr10 10 #define fr11 11 #define fr12 12 #define fr13 13 #define fr14 14 #define fr15 15 #define fr16 16 #define fr17 17 #define fr18 18 #define fr19 19 #define fr20 20 #define fr21 21 #define fr22 22 #define fr23 23 #define fr24 24 #define fr25 25 #define fr26 26 #define fr27 27 #define fr28 28 #define fr29 29 #define fr30 30 #define fr31 31 #define vr0 0 #define vr1 1 #define vr2 2 #define vr3 3 #define vr4 4 #define vr5 5 #define vr6 6 #define vr7 7 #define vr8 8 #define vr9 9 #define vr10 10 #define vr11 11 #define vr12 12 #define vr13 13 #define vr14 14 #define vr15 15 #define vr16 16 #define vr17 17 #define vr18 18 #define vr19 19 #define vr20 20 #define vr21 21 #define vr22 22 #define vr23 23 #define vr24 24 #define vr25 25 #define vr26 26 #define vr27 27 #define vr28 28 #define vr29 29 #define vr30 30 #define vr31 31 DirectFB-1.7.7/lib/direct/fifo.h0000644000175000017500000000506412254435330013213 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__FIFO_H__ #define __DIRECT__FIFO_H__ #include #include struct __D_DirectFifoItem { DirectLink link; int magic; }; struct __D_DirectFifo { int magic; DirectMutex lock; DirectWaitQueue wq; DirectLink *items; int waiting; bool wake; }; /**********************************************************************************************************************/ void DIRECT_API direct_fifo_init ( DirectFifo *fifo ); void DIRECT_API direct_fifo_destroy( DirectFifo *fifo ); /**********************************************************************************************************************/ int DIRECT_API direct_fifo_push( DirectFifo *fifo, DirectFifoItem *item ); void DIRECT_API *direct_fifo_pull( DirectFifo *fifo ); void DIRECT_API *direct_fifo_pop ( DirectFifo *fifo ); /**********************************************************************************************************************/ DirectResult DIRECT_API direct_fifo_wait ( DirectFifo *fifo ); DirectResult DIRECT_API direct_fifo_wait_timed( DirectFifo *fifo, int timeout_ms ); DirectResult DIRECT_API direct_fifo_wakeup ( DirectFifo *fifo ); #endif DirectFB-1.7.7/lib/direct/utf8.c0000644000175000017500000000255312254435330013151 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . UTF8 routines ported from glib-2.0 and optimized This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include DirectFB-1.7.7/lib/direct/init.h0000644000175000017500000000267612254435330013241 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__INIT_H__ #define __DIRECT__INIT_H__ #include __constructor__ void __D_init_all ( void ); __destructor__ void __D_deinit_all( void ); #endif DirectFB-1.7.7/lib/direct/ppcasm_memcpy.S0000644000175000017500000000363512171403127015077 00000000000000/* * String handling functions for PowerPC. * * Copyright (C) 1996 Paul Mackerras. * * * In a mail from Paul on 23.10.2006 05:47: * * You may put an LGPL permission statement on that code, replacing the * GPL permission statement. From a technical point of view, I'm not * sure that the code in ppcasm_memcpy_cachable.S is the best thing to * use in userspace, though; for one thing, it has a cache line size * assumption encoded into it. Why don't you just use the glibc memcpy? * It's pretty well optimized these days, AFAIK. * * Paul. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser 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 "ppc_asm.h" .globl direct_ppcasm_memcpy direct_ppcasm_memcpy: srwi. r7,r5,3 addi r6,r3,-4 addi r4,r4,-4 beq 2f /* if less than 8 bytes to do */ andi. r0,r6,3 /* get dest word aligned */ mtctr r7 bne 5f 1: lwz r7,4(r4) lwzu r8,8(r4) stw r7,4(r6) stwu r8,8(r6) bdnz 1b andi. r5,r5,7 2: cmplwi 0,r5,4 blt 3f lwzu r0,4(r4) addi r5,r5,-4 stwu r0,4(r6) 3: cmpwi 0,r5,0 beqlr mtctr r5 addi r4,r4,3 addi r6,r6,3 4: lbzu r0,1(r4) stbu r0,1(r6) bdnz 4b blr 5: subfic r0,r0,4 mtctr r0 6: lbz r7,4(r4) addi r4,r4,1 stb r7,4(r6) addi r6,r6,1 bdnz 6b subf r5,r0,r5 rlwinm. r7,r5,32-3,3,31 beq 2b mtctr r7 b 1b DirectFB-1.7.7/lib/direct/ToString.h0000644000175000017500000000444212463500054014036 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 ___Direct__ToString__H___ #define ___Direct__ToString__H___ #include #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #include /* * In global namespace to allow universal usage without Direct:: */ template class ToString : public Direct::String { public: ToString( const _Entity &entity ); }; class FromStringBase { public: FromStringBase() : success( false ) { } operator bool() const { return success; } protected: bool success; }; template class FromString : public FromStringBase { public: FromString( _Entity &entity, const Direct::String &string ); }; template<> inline ToString::ToString( const int &n ) { PrintF( "%d", n ); } #define D_FLAG_PRINTFn( __n, __flags, __FLAGS, __FLAG ) \ if ((__flags) & (__FLAGS##__FLAG)) \ PrintF( "%s" #__FLAG, (__n)++ ? "," : "" ); #endif // __cplusplus #endif DirectFB-1.7.7/lib/direct/interface.h0000644000175000017500000002414712254435330014233 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__INTERFACE_H__ #define __DIRECT__INTERFACE_H__ #include #include /* * Forward declaration macro for interfaces. */ #define D_DECLARE_INTERFACE( IFACE ) \ typedef struct _ ## IFACE IFACE; /* * Macro for an interface definition. */ #define D_DEFINE_INTERFACE( IFACE, ... ) \ struct _ ## IFACE { \ void *priv; \ int magic; \ int refs; \ \ DirectResult (*AddRef)( IFACE *thiz ); \ DirectResult (*Release)( IFACE *thiz ); \ \ __VA_ARGS__ \ }; #ifndef DIRECT_DISABLE_DEPRECATED // @deprecated #define DECLARE_INTERFACE D_DECLARE_INTERFACE // @deprecated #define DEFINE_INTERFACE D_DEFINE_INTERFACE #endif /* * Declare base interface */ D_DECLARE_INTERFACE( IAny ) /* * Define base interface */ D_DEFINE_INTERFACE( IAny, ) /* * Function type for probing of interface implementations */ typedef DirectResult (*DirectInterfaceGenericProbeFunc)( void *ctx, ... ); /* * Function type for initialization of interface instances */ typedef DirectResult (*DirectInterfaceGenericConstructFunc)( void *interface_ptr, ... ); /* * Function table for interface implementations */ typedef struct { const char * (*GetType)(void); const char * (*GetImplementation)(void); DirectResult (*Allocate)( void **interface_ptr ); DirectResult (*Deallocate)( void *interface_ptr ); DirectInterfaceGenericProbeFunc Probe; DirectInterfaceGenericConstructFunc Construct; } DirectInterfaceFuncs; /* * Callback type for user probing interface implementations */ typedef DirectResult (*DirectInterfaceProbeFunc)( DirectInterfaceFuncs *impl, void *ctx ); /* * Loads an interface of a specific 'type'. * Optionally an 'implementation' can be chosen. * A 'probe' function can be used to check available implementations. * * After success 'funcs' is set. */ DirectResult DIRECT_API DirectGetInterface( DirectInterfaceFuncs **funcs, const char *type, const char *implementation, DirectInterfaceProbeFunc probe, void *probe_ctx ); /* * Default probe function. Calls "funcs->Probe(ctx)". * Can be used as the 'probe' argument to DirectGetInterface. * 'probe_ctx' should then be set to the interface specific probe context. */ DirectResult DIRECT_API DirectProbeInterface( DirectInterfaceFuncs *funcs, void *ctx ); /* * Called by implementation modules during 'dlopen'ing or at startup if linked * into the executable. */ void DIRECT_API DirectRegisterInterface( DirectInterfaceFuncs *funcs ); void DIRECT_API DirectUnregisterInterface( DirectInterfaceFuncs *funcs ); void DIRECT_API direct_print_interface_leaks(void); #if DIRECT_BUILD_DEBUGS void DIRECT_API direct_dbg_interface_add ( const char *func, const char *file, int line, const char *what, const void *interface_ptr, const char *name ); void DIRECT_API direct_dbg_interface_remove( const char *func, const char *file, int line, const char *what, const void *interface_ptr ); #endif #if DIRECT_BUILD_DEBUG || defined(DIRECT_ENABLE_DEBUG) || defined(DIRECT_FORCE_DEBUG) #if !DIRECT_BUILD_DEBUGS #error Building with debug, but library headers suggest that debug is not supported. #endif #define DIRECT_DBG_INTERFACE_ADD direct_dbg_interface_add #define DIRECT_DBG_INTERFACE_REMOVE direct_dbg_interface_remove #else #define DIRECT_DBG_INTERFACE_ADD(func,file,line,what,interface,name) do {} while (0) #define DIRECT_DBG_INTERFACE_REMOVE(func,file,line,what,interface) do {} while (0) #endif #define DIRECT_ALLOCATE_INTERFACE(p,i) \ do { \ (p) = (__typeof__(p))D_CALLOC( 1, sizeof(i) ); \ if (p) { \ D_MAGIC_SET( (IAny*)(p), DirectInterface ); \ \ DIRECT_DBG_INTERFACE_ADD( __FUNCTION__, __FILE__, __LINE__, #p, p, #i ); \ } \ else \ D_OOM(); \ } while (0) #define DIRECT_ALLOCATE_INTERFACE_DATA(p,i) \ i##_data *data; \ \ D_MAGIC_ASSERT( (IAny*)(p), DirectInterface ); \ \ if (!(p)->priv) \ (p)->priv = D_CALLOC( 1, sizeof(i##_data) ); \ \ data = (i##_data*)((p)->priv); #define DIRECT_DEALLOCATE_INTERFACE(p) \ D_MAGIC_ASSERT( (IAny*)(p), DirectInterface ); \ \ DIRECT_DBG_INTERFACE_REMOVE( __FUNCTION__, __FILE__, __LINE__, #p, p ); \ \ if ((p)->priv) { \ D_FREE( (p)->priv ); \ (p)->priv = NULL; \ } \ \ D_MAGIC_CLEAR( (IAny*)(p) ); \ \ D_FREE( (p) ); #define DIRECT_INTERFACE_GET_DATA(i) \ i##_data *data; \ \ if (!thiz) \ return DR_THIZNULL; \ \ D_MAGIC_ASSERT( (IAny*)thiz, DirectInterface ); \ \ data = (i##_data*) thiz->priv; \ \ if (!data) \ return DR_DEAD; #define DIRECT_INTERFACE_GET_DATA_FROM(interface,data,prefix) \ do { \ D_MAGIC_ASSERT( (IAny*)(interface), DirectInterface ); \ \ (data) = (prefix##_data*) (interface)->priv; \ \ if (!(data)) \ return DR_DEAD; \ } while (0) void __D_interface_init( void ); void __D_interface_deinit( void ); void __D_interface_dbg_init( void ); void __D_interface_dbg_deinit( void ); #endif DirectFB-1.7.7/lib/direct/modules.c0000644000175000017500000003216412361150102013722 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #if DIRECT_BUILD_DYNLOAD #include #include #include #endif D_LOG_DOMAIN( Direct_Modules, "Direct/Modules", "Module loading and registration" ); /******************************************************************************/ #if DIRECT_BUILD_DYNLOAD static DirectModuleEntry *lookup_by_name( const DirectModuleDir *directory, const char *name ); static DirectModuleEntry *lookup_by_file( const DirectModuleDir *directory, const char *file ); static void *open_module ( DirectModuleEntry *module ); static bool load_module ( DirectModuleEntry *module ); static void unload_module( DirectModuleEntry *module ); #endif /******************************************************************************/ static int suppress_module (const char *name) { int i = 0; if (!direct_config || !direct_config->disable_module) return 0; while (direct_config->disable_module[i]) { if (strcmp (direct_config->disable_module[i], name) == 0) { D_INFO( "Direct/Modules: suppress module '%s'\n", direct_config->disable_module[i] ); return 1; } i++; } return 0; } void direct_modules_register( DirectModuleDir *directory, unsigned int abi_version, const char *name, const void *funcs ) { DirectModuleEntry *entry; D_ASSERT( directory != NULL ); D_ASSERT( name != NULL ); D_ASSERT( funcs != NULL ); D_DEBUG_AT( Direct_Modules, "Registering '%s' ('%s')...\n", name, directory->path ); #if DIRECT_BUILD_DYNLOAD if ((entry = lookup_by_name( directory, name )) != NULL) { D_DEBUG_AT( Direct_Modules, " -> found entry %p\n", entry ); D_MAGIC_ASSERT( entry, DirectModuleEntry ); entry->loaded = true; entry->funcs = funcs; return; } #endif if (directory->loading) { entry = directory->loading; D_MAGIC_ASSERT( entry, DirectModuleEntry ); directory->loading = NULL; } else { entry = D_CALLOC( 1, sizeof(DirectModuleEntry) ); if (!entry) { D_OOM(); return; } D_DEBUG_AT( Direct_Modules, " -> allocated entry %p\n", entry ); D_MAGIC_SET( entry, DirectModuleEntry ); } entry->directory = directory; entry->loaded = true; entry->name = D_STRDUP( name ); entry->funcs = funcs; entry->disabled = suppress_module( name ); if (abi_version != directory->abi_version) { D_ERROR( "Direct/Modules: ABI version of '%s' (%d) does not match %d!\n", entry->file ? entry->file : entry->name, abi_version, directory->abi_version ); entry->disabled = true; } direct_list_prepend( &directory->entries, &entry->link ); D_DEBUG_AT( Direct_Modules, "...registered as %p\n", entry ); } void direct_modules_unregister( DirectModuleDir *directory, const char *name ) { #if DIRECT_BUILD_DYNLOAD DirectModuleEntry *entry; #endif D_DEBUG_AT( Direct_Modules, "Unregistering '%s' ('%s')...\n", name, directory->path ); #if DIRECT_BUILD_DYNLOAD entry = lookup_by_name( directory, name ); if (!entry) { D_ERROR( "Direct/Modules: Unregister failed, could not find '%s' module!\n", name ); return; } D_MAGIC_ASSERT( entry, DirectModuleEntry ); D_FREE( entry->name ); direct_list_remove( &directory->entries, &entry->link ); D_MAGIC_CLEAR( entry ); D_FREE( entry ); #endif D_DEBUG_AT( Direct_Modules, "...unregistered.\n" ); } int direct_modules_explore_directory( DirectModuleDir *directory ) { #if DIRECT_BUILD_DYNLOAD DIR *dir; struct dirent *entry = NULL; struct dirent tmp; int count = 0; const char *pathfront = ""; const char *path; char *buf; D_ASSERT( directory != NULL ); D_ASSERT( directory->path != NULL ); D_DEBUG_AT( Direct_Modules, "%s( '%s' )\n", __FUNCTION__, directory->path ); path = directory->path; if (path[0] != '/') { pathfront = direct_config->module_dir; if (!pathfront) pathfront = MODULEDIR; } buf = alloca( strlen(pathfront) + 1 + strlen(path) + 1 ); /* pre, slash, post, 0 */ sprintf( buf, "%s/%s", pathfront, path ); dir = opendir( buf ); if (!dir) { D_DEBUG_AT( Direct_Modules, " -> ERROR opening directory '%s': %s!\n", buf, strerror(errno) ); return 0; } while (readdir_r( dir, &tmp, &entry ) == 0 && entry) { void *handle; DirectModuleEntry *module; int entry_len = strlen(entry->d_name); if (entry_len < 4 || entry->d_name[entry_len-1] != 'o' || entry->d_name[entry_len-2] != 's') continue; if (lookup_by_file( directory, entry->d_name )) continue; module = D_CALLOC( 1, sizeof(DirectModuleEntry) ); if (!module) continue; D_DEBUG_AT( Direct_Modules, " -> allocated entry %p\n", module ); D_MAGIC_SET( module, DirectModuleEntry ); module->directory = directory; module->dynamic = true; module->file = D_STRDUP( entry->d_name ); if (!module->file) { D_MAGIC_CLEAR( module ); D_FREE( module ); continue; } directory->loading = module; if ((handle = open_module( module )) != NULL) { if (!module->loaded) { dlclose( handle ); D_ERROR( "Direct/Modules: Module '%s' did not " "register itself after loading!\n", entry->d_name ); module->disabled = true; direct_list_prepend( &directory->entries, &module->link ); } else if (module->disabled) { module->loaded = false; /* may call direct_modules_unregister() */ dlclose( handle ); } else { module->handle = handle; count++; } } else { module->disabled = true; direct_list_prepend( &directory->entries, &module->link ); } directory->loading = NULL; } closedir( dir ); return count; #else return 0; #endif } const void * direct_module_ref( DirectModuleEntry *module ) { D_ASSERT( module != NULL ); D_DEBUG_AT( Direct_Modules, "%s( %p '%s', %d refs, loaded %d, dynamic %d, disabled %d )\n", __FUNCTION__, module, module->name, module->refs, module->loaded, module->dynamic, module->disabled ); D_MAGIC_ASSERT( module, DirectModuleEntry ); if (module->disabled) return NULL; #if DIRECT_BUILD_DYNLOAD if (!module->loaded && !load_module( module )) { D_DEBUG_AT( Direct_Modules, " -> load_module failed, returning NULL\n" ); return NULL; } #endif module->refs++; D_DEBUG_AT( Direct_Modules, " -> refs %d, funcs %p\n", module->refs, module->funcs ); return module->funcs; } void direct_module_unref( DirectModuleEntry *module ) { D_ASSERT( module != NULL ); D_DEBUG_AT( Direct_Modules, "%s( %p '%s', %d refs, loaded %d, dynamic %d, disabled %d )\n", __FUNCTION__, module, module->name, module->refs, module->loaded, module->dynamic, module->disabled ); D_MAGIC_ASSERT( module, DirectModuleEntry ); D_ASSERT( module->refs > 0 ); if (--module->refs) return; #if DIRECT_BUILD_DYNLOAD if (module->dynamic) unload_module( module ); #endif } /******************************************************************************/ #if DIRECT_BUILD_DYNLOAD static DirectModuleEntry * lookup_by_name( const DirectModuleDir *directory, const char *name ) { DirectLink *l; D_ASSERT( directory != NULL ); D_ASSERT( name != NULL ); direct_list_foreach (l, directory->entries) { DirectModuleEntry *entry = (DirectModuleEntry*) l; D_MAGIC_ASSERT( entry, DirectModuleEntry ); if (!entry->name) continue; if (!strcmp( entry->name, name )) return entry; } return NULL; } static DirectModuleEntry * lookup_by_file( const DirectModuleDir *directory, const char *file ) { DirectLink *l; D_DEBUG_AT( Direct_Modules, "%s()\n", __FUNCTION__ ); D_ASSERT( directory != NULL ); D_ASSERT( file != NULL ); direct_list_foreach (l, directory->entries) { DirectModuleEntry *entry = (DirectModuleEntry*) l; D_MAGIC_ASSERT( entry, DirectModuleEntry ); if (!entry->file) continue; if (!strcmp( entry->file, file )) return entry; } return NULL; } static bool load_module( DirectModuleEntry *module ) { D_DEBUG_AT( Direct_Modules, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( module, DirectModuleEntry ); D_DEBUG_AT( Direct_Modules, "%s( %p '%s', %d refs )\n", __FUNCTION__, module, module->file, module->refs ); D_ASSERT( module->dynamic == true ); D_ASSERT( module->file != NULL ); D_ASSERT( module->loaded == false ); D_ASSERT( module->disabled == false ); module->handle = open_module( module ); if (module->handle) module->loaded = true; return module->loaded; } static void unload_module( DirectModuleEntry *module ) { void *handle; D_DEBUG_AT( Direct_Modules, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( module, DirectModuleEntry ); D_DEBUG_AT( Direct_Modules, "%s( %p '%s', %d refs )\n", __FUNCTION__, module, module->file, module->refs ); D_ASSERT( module->dynamic == true ); D_ASSERT( module->loaded == true ); handle = module->handle; D_ASSUME( handle != NULL ); if (handle) { module->handle = NULL; module->loaded = false; /* may call direct_modules_unregister() */ dlclose( handle ); } } static void * open_module( DirectModuleEntry *module ) { DirectModuleDir *directory; const char *pathfront = ""; const char *path; char *buf; void *handle; D_DEBUG_AT( Direct_Modules, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( module, DirectModuleEntry ); D_DEBUG_AT( Direct_Modules, "%s( %p '%s', %d refs )\n", __FUNCTION__, module, module->file, module->refs ); D_ASSERT( module->file != NULL ); D_ASSERT( module->directory != NULL ); D_ASSERT( module->directory->path != NULL ); directory = module->directory; path = directory->path; if (path[0] != '/') { pathfront = direct_config->module_dir; if (!pathfront) pathfront = MODULEDIR; } buf = alloca( strlen( pathfront ) + 1 + strlen( path ) + 1 + strlen( module->file ) + 1 ); sprintf( buf, "%s/%s/%s", pathfront, path, module->file ); D_DEBUG_AT( Direct_Modules, "Loading '%s'...\n", buf ); handle = dlopen( buf, RTLD_NOW ); D_DEBUG_AT( Direct_Modules, " -> dlopen returned %p\n", handle ); if (!handle) D_DLERROR( "Direct/Modules: Unable to dlopen `%s'!\n", buf ); D_MAGIC_ASSERT( module, DirectModuleEntry ); return handle; } #endif DirectFB-1.7.7/lib/direct/mem.h0000644000175000017500000000715612254435330013052 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __DIRECT__MEM_H__ #define __DIRECT__MEM_H__ #include /**********************************************************************************************************************/ void DIRECT_API direct_print_memleaks( void ); /**********************************************************************************************************************/ void DIRECT_API *direct_dbg_malloc ( const char *file, int line, const char *func, size_t bytes ); void DIRECT_API *direct_dbg_calloc ( const char *file, int line, const char *func, size_t count, size_t bytes); void DIRECT_API *direct_dbg_realloc( const char *file, int line, const char *func, const char *what, void *mem, size_t bytes ); char DIRECT_API *direct_dbg_strdup ( const char *file, int line, const char *func, const char *str ); void DIRECT_API direct_dbg_free ( const char *file, int line, const char *func, const char *what, void *mem ); /**********************************************************************************************************************/ #if DIRECT_BUILD_DEBUG || defined(DIRECT_ENABLE_DEBUG) || defined(DIRECT_FORCE_DEBUG) || defined(DIRECT_MEM_DEBUG) #if !DIRECT_BUILD_DEBUGS #warning Building with debug, but library headers suggest that debug is not supported. #endif #define D_MALLOC(bytes) direct_dbg_malloc( __FILE__, __LINE__, __FUNCTION__, bytes ) #define D_CALLOC(count,bytes) direct_dbg_calloc( __FILE__, __LINE__, __FUNCTION__, count, bytes ) #define D_REALLOC(mem,bytes) direct_dbg_realloc( __FILE__, __LINE__, __FUNCTION__, #mem, mem, bytes ) #define D_STRDUP(str) direct_dbg_strdup( __FILE__, __LINE__, __FUNCTION__, str ) #define D_FREE(mem) direct_dbg_free( __FILE__, __LINE__, __FUNCTION__, #mem, mem ) #else /**********************************************************************************************************************/ /* base malloc is declared in direct/os/mem.h */ #define D_MALLOC direct_malloc #define D_CALLOC direct_calloc #define D_REALLOC direct_realloc #define D_STRDUP direct_strdup #define D_FREE direct_free #endif void __D_mem_init( void ); void __D_mem_deinit( void ); #endif DirectFB-1.7.7/lib/direct/log_domain.c0000644000175000017500000002572712361150102014371 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #if DIRECT_BUILD_TEXT typedef struct { DirectLink link; char *name; DirectLogDomainConfig config; } LogDomainEntry; /**********************************************************************************************************************/ static DirectMutex domains_lock; static unsigned int domains_age; static DirectLink *domains; // FIXME: use hash table like in direct/result.c void __D_log_domain_init() { domains_age = 1; direct_mutex_init( &domains_lock ); } void __D_log_domain_deinit() { direct_mutex_deinit( &domains_lock ); } /**********************************************************************************************************************/ __dfb_no_instrument_function__ static __inline__ LogDomainEntry * lookup_domain( const char *name, bool sub ); static __inline__ LogDomainEntry * lookup_domain( const char *name, bool sub ) { LogDomainEntry *entry; direct_list_foreach (entry, domains) { if (! direct_strcasecmp( entry->name, name )) return entry; } /* * If the domain being registered contains a slash, but didn't exactly match an entry * in directfbrc, check to see if the domain is descended from an entry in directfbrc * (e.g. 'ui/field/messages' matches 'ui' or 'ui/field') */ if (sub && strchr(name, '/')) { int passed_name_len = strlen( name ); direct_list_foreach (entry, domains) { int entry_len = strlen( entry->name ); if ((passed_name_len > entry_len) && (name[entry_len] == '/') && (! direct_strncasecmp( entry->name, name, entry_len))) { return entry; } } } return NULL; } __dfb_no_instrument_function__ static DirectLogLevel check_domain( DirectLogDomain *domain ); static DirectLogLevel check_domain( DirectLogDomain *domain ) { if (direct_config->log_none) return DIRECT_LOG_NONE; if (direct_config->log_all) return DIRECT_LOG_ALL; if (domain->age != domains_age) { LogDomainEntry *entry; if (direct_mutex_lock( &domains_lock )) return DIRECT_LOG_ALL; entry = lookup_domain( domain->name, true ); domain->age = domains_age; if (entry) { domain->registered = true; domain->config = entry->config; } else { domain->config.log = direct_config->log; domain->config.level = direct_config->log_level; } direct_mutex_unlock( &domains_lock ); } return domain->config.level; } /**********************************************************************************************************************/ void direct_log_domain_configure( const char *name, const DirectLogDomainConfig *config ) { LogDomainEntry *entry; if (direct_mutex_lock( &domains_lock )) return; entry = lookup_domain( name, false ); if (!entry) { direct_mutex_unlock( &domains_lock ); // FIXME: use sliced dynamic or static block, hash table entry = (LogDomainEntry*) direct_calloc( 1, sizeof(LogDomainEntry) ); if (!entry) { D_WARN( "out of memory" ); return; } entry->name = direct_strdup( name ); if (!entry->name) { D_WARN( "out of memory" ); direct_free( entry ); return; } if (direct_mutex_lock( &domains_lock )) { direct_free( entry->name ); direct_free( entry ); return; } direct_list_prepend( &domains, &entry->link ); } entry->config = *config; if (! ++domains_age) domains_age++; direct_mutex_unlock( &domains_lock ); } bool direct_log_domain_check( DirectLogDomain *domain ) { return check_domain( domain ) >= DIRECT_LOG_DEBUG; } bool direct_log_domain_check_level( DirectLogDomain *domain, DirectLogLevel level ) { return check_domain( domain ) >= level; } /**********************************************************************************************************************/ /* FIXME: merge following */ __dfb_no_instrument_function__ DirectResult direct_log_domain_vprintf( DirectLogDomain *domain, DirectLogLevel level, const char *format, va_list ap ) { if (check_domain( domain ) >= level) { char buf[200]; char *ptr = buf; long long micros = direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ); long long millis = micros / 1000LL; DirectThread *thread = direct_thread_self(); int indent = direct_trace_debug_indent() * 4; int len; /* Prepare user message. */ #ifdef __GNUC__ va_list ap2; va_copy( ap2, ap ); len = direct_vsnprintf( buf, sizeof(buf), format, ap2 ); va_end( ap2 ); #else len = direct_vsnprintf( buf, sizeof(buf), format, ap ); #endif if (len < 0) return DR_FAILURE; if (len >= sizeof(buf)) { ptr = direct_malloc( len+1 ); if (!ptr) return DR_NOLOCALMEMORY; len = direct_vsnprintf( ptr, len+1, format, ap ); if (len < 0) { direct_free( ptr ); return DR_FAILURE; } } /* Wrap around when too high */ indent &= 0x7f; /* Fill up domain name column after the colon, prepending remaining space (excl. ': ') to indent. */ indent += (domain->name_len < 34 ? 34 : 50) - domain->name_len - 2; /* Print full message. */ direct_log_printf( domain->config.log, "(-) [%-16.16s %3lld.%03lld,%03lld] (%5d) %s: %*s%s", thread ? thread->name : " NO NAME", millis / 1000LL, millis % 1000LL, micros % 1000LL, /*thread ? thread->tid :*/ direct_gettid(), domain->name, indent, "", ptr ); direct_log_flush( domain->config.log, false ); if (ptr != buf) direct_free( ptr ); } else direct_log_debug_delay( false ); return DR_OK; } __dfb_no_instrument_function__ DirectResult direct_log_domain_log( DirectLogDomain *domain, DirectLogLevel level, const char *func, const char *file, int line, const char *format, ... ) { if (check_domain( domain ) >= level) { char buf[200]; char *ptr = buf; long long micros = direct_clock_get_time( DIRECT_CLOCK_MONOTONIC ); long long millis = micros / 1000LL; DirectThread *thread = direct_thread_self(); int indent = direct_trace_debug_indent() * 4; int len; va_list ap; /* Prepare user message. */ va_start( ap, format ); len = direct_vsnprintf( buf, sizeof(buf), format, ap ); va_end( ap ); if (len < 0) return DR_FAILURE; if (len >= sizeof(buf)) { ptr = direct_malloc( len+1 ); if (!ptr) return DR_NOLOCALMEMORY; va_start( ap, format ); len = direct_vsnprintf( ptr, len+1, format, ap ); va_end( ap ); if (len < 0) { direct_free( ptr ); return DR_FAILURE; } } /* Wrap around when too high */ indent &= 0x7f; /* Fill up domain name column after the colon, prepending remaining space (excl. ': ') to indent. */ indent += (domain->name_len < 27 ? 27 : 42) - domain->name_len - 2; /* Print full message. */ direct_log_printf( domain->config.log, "(%c) [%-16.16s %3lld.%03lld,%03lld] (%5d) %s: %*s%s", level > DIRECT_LOG_INFO ? '-' : level > DIRECT_LOG_WARNING ? '*' : level > DIRECT_LOG_ERROR ? '#' : level > DIRECT_LOG_NONE ? '!' : ' ', thread ? thread->name : " NO NAME", millis / 1000LL, millis % 1000LL, micros % 1000LL, thread ? thread->tid : direct_gettid(), domain->name, indent, "", ptr ); direct_log_flush( domain->config.log, false ); if (ptr != buf) direct_free( ptr ); } else direct_log_debug_delay( false ); return DR_OK; } #else void __D_log_domain_init() { } void __D_log_domain_deinit() { } void direct_log_domain_vprintf( DirectLogDomain *domain, DirectLogLevel level, const char *format, va_list ap ) { } void direct_log_domain_configure( const char *name, const DirectLogDomainConfig *config ) { } bool direct_log_domain_check( DirectLogDomain *domain ) { return false; } #endif /* DIRECT_BUILD_TEXT */ DirectFB-1.7.7/lib/direct/String.cpp0000644000175000017500000001415512254435330014072 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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. */ //#define DIRECT_ENABLE_DEBUG #include #include "String.h" extern "C" { #include #include #include #include } #include /*********************************************************************************************************************/ namespace Direct { class StringTLS { friend class Direct::TLSObject2; static StringTLS *create( void *ctx, void *params ) { return new StringTLS(); } static void destroy( void *ctx, StringTLS *tls ) { delete tls; } StringTLS() : strings_index( 0 ) { } public: String strings[0x20]; unsigned int strings_index; const char * Copy( const Direct::String &string ) { strings[strings_index & 0x1f] = string; return strings[strings_index++ & 0x1f].buffer(); } }; static Direct::TLSObject2 string_tls; template <> const char * String::CopyTLS() { StringTLS *tls = string_tls.Get( NULL ); D_ASSERT( tls != NULL ); return tls->Copy( *this ); } } /*********************************************************************************************************************/ namespace Direct { template <> String & String::PrintF( const char *format, va_list args, size_t stack_buffer ) { size_t len; char buf[stack_buffer]; char *ptr = buf; D_ASSERT( format != NULL ); // TODO: check if va_copy is required here #ifdef __GNUC__ va_list ap2; va_copy( ap2, args ); len = direct_vsnprintf( buf, sizeof(buf), format, ap2 ); va_end( ap2 ); #else len = direct_vsnprintf( buf, sizeof(buf), format, args ); #endif if (len < 0) return *this; if (len >= sizeof(buf)) { ptr = (char*) direct_malloc( len+1 ); if (!ptr) { D_OOM(); return *this; } len = direct_vsnprintf( ptr, len+1, format, args ); if (len < 0) { direct_free( ptr ); return *this; } } str.append( ptr ); if (ptr != buf) direct_free( ptr ); return *this; } template <> String & String::PrintF( const char *format, ... ) { va_list args; D_ASSERT( format != NULL ); va_start( args, format ); PrintF( format, args ); va_end( args ); return *this; } template <> String String::F( const char *format, ... ) { va_list args; String str; D_ASSERT( format != NULL ); va_start( args, format ); str.PrintF( format, args ); va_end( args ); return str; } template <> void String::Clear() { str.clear(); } template <> Strings String::GetTokens( const Direct::String &delimiter ) const { Strings tokens; char *buf = direct_strdup( buffer() ); char *str = buf; char *save, *token; while ((token = strtok_r( str, delimiter.buffer(), &save ))) { str = NULL; tokens.push_back( Direct::String::F( "%s", token ) ); } direct_free( buf ); return tokens; } /*********************************************************************************************************************/ /*********************************************************************************************************************/ /*********************************************************************************************************************/ extern "C" { D_String * D_String_NewEmpty() { return new String(); } size_t D_String_PrintF( D_String *str, const char *format, ... ) { va_list args; D_ASSERT( str != NULL ); D_ASSERT( format != NULL ); va_start( args, format ); str->PrintF( format, args ); va_end( args ); return str->length(); } size_t D_String_PrintV( D_String *str, const char *format, va_list args ) { D_ASSERT( str != NULL ); D_ASSERT( format != NULL ); str->PrintF( format, args ); return str->length(); } const char * D_String_Buffer( D_String *str ) { D_ASSERT( str != NULL ); return str->buffer(); } size_t D_String_Length( D_String *str ) { D_ASSERT( str != NULL ); return str->length(); } void D_String_Delete( D_String *str ) { D_ASSERT( str != NULL ); delete str; } /*********************************************************************************************************************/ const char * D_String_CopyTLS( D_String *str ) { D_ASSERT( str != NULL ); return str->CopyTLS(); } const char * D_String_PrintTLS( const char *format, ... ) { va_list args; Direct::String str; D_ASSERT( format != NULL ); va_start( args, format ); str.PrintF( format, args ); va_end( args ); return str.CopyTLS(); } } } DirectFB-1.7.7/lib/fusiondale/0000755000175000017500000000000012466665351013066 500000000000000DirectFB-1.7.7/lib/fusiondale/fusiondale_util.h0000644000175000017500000003227012254435330016334 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __FUSIONDALE_UTIL_H__ #define __FUSIONDALE_UTIL_H__ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #define COMA_GENCALL_PREPARE( coma, length ) \ do { \ DirectResult ret; \ \ D_ASSERT( coma != NULL ); \ D_ASSERT( length > 0 ); \ \ ret = coma->GetLocal( coma, length, &ptr ); \ if (ret) { \ D_DERROR( ret, "IComa::GetLocal( %zu ) failed!\n", length ); \ return ret; \ } \ } while (0) #define COMA_GENCALL_PREPARE_FROM( coma, from ) \ do { \ DirectResult ret; \ \ D_ASSERT( coma != NULL ); \ D_ASSERT( from != NULL ); \ \ ret = coma->GetLocal( coma, sizeof(*from), &ptr ); \ if (ret) { \ D_DERROR( ret, "IComa::GetLocal( %zu ) failed!\n", sizeof(*from) ); \ return ret; \ } \ \ direct_memcpy( ptr, from, sizeof(*from) ); \ } while (0) #define COMA_GENCALL_EXECUTE( component, methodid ) \ do { \ DirectResult ret; \ \ D_ASSERT( component != NULL ); \ \ ret = component->Call( component, methodid, ptr, &result ); \ if (ret) { \ D_DERROR( ret, "IComaComponent::Call( %lu, %p ) failed!\n", \ (ComaMethodID) methodid, ptr ); \ return ret; \ } \ } while (0) #define COMA_GENCALL_EXECUTE_TO( component, methodid, to ) \ do { \ DirectResult ret; \ \ D_ASSERT( component != NULL ); \ D_ASSERT( to != NULL ); \ \ ret = component->Call( component, methodid, ptr, &result ); \ if (ret) { \ D_DERROR( ret, "IComaComponent::Call( %lu, %p ) failed!\n", \ (ComaMethodID) methodid, ptr ); \ return ret; \ } \ \ direct_memcpy( to, ptr, sizeof(*to) ); \ } while (0) /**********************************************************************************************************************/ #define COMA_GENCALL_DEFINE___( NAME, METHOD, METHOD_ID ) \ static inline DirectResult \ NAME ## _GenCall_ ## METHOD( IComa *coma, \ IComaComponent *component ) \ { \ void *ptr = NULL; \ int result; \ \ D_ASSERT( coma != NULL ); \ D_ASSERT( component != NULL ); \ \ COMA_GENCALL_EXECUTE( component, METHOD_ID ); \ \ return (DirectResult)result; \ } #define COMA_GENCALL_DEFINE_I_( NAME, METHOD, METHOD_ID ) \ static inline DirectResult \ NAME ## _GenCall_ ## METHOD( IComa *coma, \ IComaComponent *component, \ NAME ## Call ## METHOD *data ) \ { \ void *ptr; \ int result; \ \ D_ASSERT( coma != NULL ); \ D_ASSERT( component != NULL ); \ D_ASSERT( data != NULL ); \ \ COMA_GENCALL_PREPARE_FROM( coma, data ); \ \ COMA_GENCALL_EXECUTE( component, METHOD_ID ); \ \ return (DirectResult)result; \ } #define COMA_GENCALL_DEFINE__O( NAME, METHOD, METHOD_ID ) \ static inline DirectResult \ NAME ## _GenCall_ ## METHOD( IComa *coma, \ IComaComponent *component, \ NAME ## Call ## METHOD *data ) \ { \ void *ptr; \ int result; \ \ D_ASSERT( coma != NULL ); \ D_ASSERT( component != NULL ); \ D_ASSERT( data != NULL ); \ \ COMA_GENCALL_PREPARE( coma, sizeof(*data) ); \ \ COMA_GENCALL_EXECUTE_TO( component, METHOD_ID, data ); \ \ return (DirectResult)result; \ } #define COMA_GENCALL_DEFINE_IO( NAME, METHOD, METHOD_ID ) \ static inline DirectResult \ NAME ## _GenCall_ ## METHOD( IComa *coma, \ IComaComponent *component, \ NAME ## Call ## METHOD *data ) \ { \ void *ptr; \ int result; \ \ D_ASSERT( coma != NULL ); \ D_ASSERT( component != NULL ); \ D_ASSERT( data != NULL ); \ \ COMA_GENCALL_PREPARE_FROM( coma, data ); \ \ COMA_GENCALL_EXECUTE_TO( component, METHOD_ID, data ); \ \ return (DirectResult)result; \ } #ifdef __cplusplus } #endif #endif DirectFB-1.7.7/lib/fusiondale/fusiondale.c0000644000175000017500000001645612254435330015302 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include // FIXME #include #include #include #include #include #include #include #include #include IFusionDale *ifusiondale_singleton = NULL; /**************************************************************************************************/ static DirectResult CreateRemote( const char *host, int session, IFusionDale **ret_interface ); /**********************************************************************************************************************/ /* * Version checking */ const unsigned int fusiondale_major_version = FUSIONDALE_MAJOR_VERSION; const unsigned int fusiondale_minor_version = FUSIONDALE_MINOR_VERSION; const unsigned int fusiondale_micro_version = FUSIONDALE_MICRO_VERSION; const unsigned int fusiondale_binary_age = FUSIONDALE_BINARY_AGE; const unsigned int fusiondale_interface_age = FUSIONDALE_INTERFACE_AGE; const char * FusionDaleCheckVersion( unsigned int required_major, unsigned int required_minor, unsigned int required_micro ) { if (required_major > FUSIONDALE_MAJOR_VERSION) return "FusionDale version too old (major mismatch)"; if (required_major < FUSIONDALE_MAJOR_VERSION) return "FusionDale version too new (major mismatch)"; if (required_minor > FUSIONDALE_MINOR_VERSION) return "FusionDale version too old (minor mismatch)"; if (required_minor < FUSIONDALE_MINOR_VERSION) return "FusionDale version too new (minor mismatch)"; if (required_micro < FUSIONDALE_MICRO_VERSION - FUSIONDALE_BINARY_AGE) return "FusionDale version too new (micro mismatch)"; if (required_micro > FUSIONDALE_MICRO_VERSION) return "FusionDale version too old (micro mismatch)"; return NULL; } const char * FusionDaleUsageString( void ) { return fd_config_usage(); } DirectResult FusionDaleInit( int *argc, char **argv[] ) { #ifdef DSLINUX IFusionDale_Requestor_ctor(); #endif return fd_config_init( argc, argv ); } DirectResult FusionDaleSetOption( const char *name, const char *value ) { if (fusiondale_config == NULL) { D_ERROR( "FusionDaleSetOption: FusionDaleInit has to be called first!\n" ); return DR_INIT; } if (ifusiondale_singleton) { D_ERROR( "FusionDaleSetOption: FusionDaleCreate has already been called!\n" ); return DR_INIT; } if (!name) return DR_INVARG; return fd_config_set( name, value ); } DirectResult FusionDaleCreate( IFusionDale **ret_interface ) { #if !DIRECTFB_BUILD_PURE_VOODOO DirectResult ret; #endif if (!fusiondale_config) { D_ERROR( "FusionDaleCreate: FusionDaleInit has to be called first!\n" ); return DR_INIT; } if (!ret_interface) return DR_INVARG; if (ifusiondale_singleton) { ifusiondale_singleton->AddRef( ifusiondale_singleton ); *ret_interface = ifusiondale_singleton; return DR_OK; } #if !DIRECTFB_BUILD_PURE_VOODOO if (fusiondale_config->remote.host) { ret = CreateRemote( fusiondale_config->remote.host, fusiondale_config->remote.session, ret_interface ); if (ret == DR_OK) ifusiondale_singleton = *ret_interface; return ret; } if (!(direct_config->quiet & DMT_BANNER) && fusiondale_config->banner) { direct_log_printf( NULL, "\n" " *--------------) FusionDale v%d.%d.%d (--------------*\n" " (c) 2006-2007 directfb.org\n" " -----------------------------------------------\n" "\n", FUSIONDALE_MAJOR_VERSION, FUSIONDALE_MINOR_VERSION, FUSIONDALE_MICRO_VERSION ); } DIRECT_ALLOCATE_INTERFACE( ifusiondale_singleton, IFusionDale ); ret = IFusionDale_Construct( ifusiondale_singleton ); if (ret != DR_OK) ifusiondale_singleton = NULL; *ret_interface = ifusiondale_singleton; return DR_OK; #else return CreateRemote( fusiondale_config->remote.host ? fusiondale_config->remote.host : "", fusiondale_config->remote.session, ret_interface ); #endif } DirectResult FusionDaleError( const char *msg, DirectResult error ) { if (msg) fprintf( stderr, "(#) FusionDale Error [%s]: %s\n", msg, DirectResultString( error ) ); else fprintf( stderr, "(#) FusionDale Error: %s\n", DirectResultString( error ) ); return error; } DirectResult FusionDaleErrorFatal( const char *msg, DirectResult error ) { FusionDaleError( msg, error ); exit( error ); } const char * FusionDaleErrorString( DirectResult error ) { return DirectResultString( error ); } /**********************************************************************************************************************/ static DirectResult CreateRemote( const char *host, int session, IFusionDale **ret_interface ) { DirectResult ret; DirectInterfaceFuncs *funcs; void *interface_ptr; D_ASSERT( host != NULL ); D_ASSERT( ret_interface != NULL ); if (host[0] == '%') { ret = DirectGetInterface( &funcs, "IFusionDale", "One", NULL, NULL ); if (ret) return ret; ret = funcs->Allocate( &interface_ptr ); if (ret) return ret; ret = funcs->Construct( interface_ptr, host, session ); if (ret) return ret; } else { ret = DirectGetInterface( &funcs, "IFusionDale", "Requestor", NULL, NULL ); if (ret) return ret; ret = funcs->Allocate( &interface_ptr ); if (ret) return ret; ret = funcs->Construct( interface_ptr, host, session ); if (ret) return ret; } *ret_interface = interface_ptr; return DR_OK; } DirectFB-1.7.7/lib/fusiondale/ifusiondale.c0000644000175000017500000001356612254435330015452 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include "ifusiondale.h" void IFusionDale_Destruct( IFusionDale *thiz ) { IFusionDale_data *data = (IFusionDale_data*)thiz->priv; fd_core_destroy( data->core, false ); DIRECT_DEALLOCATE_INTERFACE( thiz ); if (ifusiondale_singleton == thiz) ifusiondale_singleton = NULL; } static DirectResult IFusionDale_AddRef( IFusionDale *thiz ) { DIRECT_INTERFACE_GET_DATA (IFusionDale); data->ref++; return DR_OK; } static DirectResult IFusionDale_Release( IFusionDale *thiz ) { DIRECT_INTERFACE_GET_DATA (IFusionDale) if (--data->ref == 0) IFusionDale_Destruct( thiz ); return DR_OK; } static DirectResult IFusionDale_CreateMessenger( IFusionDale *thiz, IFusionDaleMessenger **ret_interface ) { DirectResult ret; CoreMessenger *messenger; IFusionDaleMessenger *interface; DIRECT_INTERFACE_GET_DATA(IFusionDale) /* Check arguments */ if (!ret_interface) return DR_INVARG; /* Create a new messenger. */ ret = fd_messenger_create( data->core, &messenger ); if (ret) return ret; DIRECT_ALLOCATE_INTERFACE( interface, IFusionDaleMessenger ); ret = IFusionDaleMessenger_Construct( interface, data->core, messenger ); fd_messenger_unref( messenger ); if (ret) return ret; *ret_interface = interface; return DR_OK; } static DirectResult IFusionDale_GetMessenger( IFusionDale *thiz, IFusionDaleMessenger **ret_interface ) { DirectResult ret; CoreMessenger *messenger, *tmp; IFusionDaleMessenger *interface; DIRECT_INTERFACE_GET_DATA(IFusionDale) /* Check arguments */ if (!ret_interface) return DR_INVARG; /* Try to get the messenger. */ ret = fd_core_get_messenger( data->core, 1, &messenger ); switch (ret) { case DR_OK: break; case DR_IDNOTFOUND: /* Create a temporary messenger... */ ret = fd_messenger_create( data->core, &tmp ); if (ret) return ret; /* ...but get the first messenger, to work around race conditions... */ ret = fd_core_get_messenger( data->core, 1, &messenger ); /* ...and unref our temporary (most probably the same one). */ fd_messenger_unref( tmp ); if (ret) return ret; break; default: return ret; } DIRECT_ALLOCATE_INTERFACE( interface, IFusionDaleMessenger ); ret = IFusionDaleMessenger_Construct( interface, data->core, messenger ); fd_messenger_unref( messenger ); if (ret) return ret; *ret_interface = interface; return DR_OK; } static DirectResult IFusionDale_EnterComa( IFusionDale *thiz, const char *name, IComa **ret_interface ) { DirectResult ret; Coma *coma; IComa *interface; DIRECT_INTERFACE_GET_DATA(IFusionDale) /* Check arguments */ if (!name || !ret_interface) return DR_INVARG; /* Enter the specified Coma. */ ret = coma_enter( fd_core_world( data->core ), name, &coma ); if (ret) return ret; DIRECT_ALLOCATE_INTERFACE( interface, IComa ); ret = IComa_Construct( interface, coma ); if (ret) return ret; *ret_interface = interface; return DR_OK; } DirectResult IFusionDale_Construct( IFusionDale *thiz ) { DirectResult ret; /* Allocate interface data. */ DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IFusionDale ); /* Initialize interface data. */ data->ref = 1; /* Create the core instance. */ ret = fd_core_create( &data->core ); if (ret) { FusionDaleError( "FusionDale: fd_core_create() failed", ret ); DIRECT_DEALLOCATE_INTERFACE( thiz ); return ret; } /* Assign interface pointers. */ thiz->AddRef = IFusionDale_AddRef; thiz->Release = IFusionDale_Release; thiz->CreateMessenger = IFusionDale_CreateMessenger; thiz->GetMessenger = IFusionDale_GetMessenger; thiz->EnterComa = IFusionDale_EnterComa; return DR_OK; } DirectFB-1.7.7/lib/fusiondale/messenger/0000755000175000017500000000000012466665351015056 500000000000000DirectFB-1.7.7/lib/fusiondale/messenger/ifusiondalemessenger.c0000644000175000017500000002646212254435330021352 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include "ifusiondalemessenger.h" D_DEBUG_DOMAIN( IFusionDale_Messenger, "IFusionDaleMessenger", "IFusionDaleMessenger" ); /**********************************************************************************************************************/ static void IFusionDaleMessenger_Destruct( IFusionDaleMessenger *thiz ) { IFusionDaleMessenger_data *data = thiz->priv; fd_messenger_port_detach( data->port, &data->port->local_reaction ); fd_messenger_port_unref( data->port ); fd_messenger_unref( data->messenger ); DIRECT_DEALLOCATE_INTERFACE( thiz ); } static DirectResult IFusionDaleMessenger_AddRef( IFusionDaleMessenger *thiz ) { DIRECT_INTERFACE_GET_DATA (IFusionDaleMessenger) data->ref++; return DR_OK; } static DirectResult IFusionDaleMessenger_Release( IFusionDaleMessenger *thiz ) { DIRECT_INTERFACE_GET_DATA (IFusionDaleMessenger) if (--data->ref == 0) IFusionDaleMessenger_Destruct( thiz ); return DR_OK; } static DirectResult IFusionDaleMessenger_RegisterEvent( IFusionDaleMessenger *thiz, const char *name, FDMessengerEventID *ret_id ) { DirectResult ret; CoreMessengerEvent *event; DIRECT_INTERFACE_GET_DATA(IFusionDaleMessenger) D_DEBUG_AT( IFusionDale_Messenger, "%s()\n", __FUNCTION__ ); /* Check arguments. */ if (!name || !ret_id) return DR_INVARG; /* Lock the messenger. */ ret = fd_messenger_lock( data->messenger ); if (ret) return ret; /* Try to lookup event by name. */ ret = fd_messenger_lookup_event( data->messenger, name, &event ); switch (ret) { case DR_OK: /* Event is found (already registered). */ ret = DR_BUSY; break; case DR_ITEMNOTFOUND: /* Create a new event. */ ret = fd_messenger_create_event( data->messenger, name, &event ); if (ret == DR_OK) break; /* fall through */ default: /* Unexpected result. */ fd_messenger_unlock( data->messenger ); return ret; } /* Keep track of our registration. */ fd_messenger_port_add_event( data->port, event ); /* Return the event id. */ *ret_id = event->id; /* Unlock the messenger. */ fd_messenger_unlock( data->messenger ); return ret; } static DirectResult IFusionDaleMessenger_UnregisterEvent( IFusionDaleMessenger *thiz, FDMessengerEventID event_id ) { DirectResult ret; DIRECT_INTERFACE_GET_DATA(IFusionDaleMessenger) D_DEBUG_AT( IFusionDale_Messenger, "%s()\n", __FUNCTION__ ); /* Check arguments */ if (!event_id) return DR_INVARG; /* Lock the messenger (has to happen before port is locked!). */ ret = fd_messenger_lock( data->messenger ); if (ret) return ret; /* Let it go. */ ret = fd_messenger_port_remove_event( data->port, event_id ); /* Unlock the messenger. */ fd_messenger_unlock( data->messenger ); return ret; } static DirectResult IFusionDaleMessenger_IsEventRegistered( IFusionDaleMessenger *thiz, const char *name ) { DirectResult ret; DIRECT_INTERFACE_GET_DATA(IFusionDaleMessenger) D_DEBUG_AT( IFusionDale_Messenger, "%s()\n", __FUNCTION__ ); /* Check arguments */ if (!name) return DR_INVARG; /* Lock the messenger. */ ret = fd_messenger_lock( data->messenger ); if (ret) return ret; /* Try to lookup event by name. */ ret = fd_messenger_lookup_event( data->messenger, name, NULL ); /* Unlock the messenger. */ fd_messenger_unlock( data->messenger ); return ret; } static DirectResult IFusionDaleMessenger_RegisterListener( IFusionDaleMessenger *thiz, FDMessengerEventID event_id, FDMessengerEventCallback callback, void *context, FDMessengerListenerID *ret_id ) { DirectResult ret; DIRECT_INTERFACE_GET_DATA(IFusionDaleMessenger) D_DEBUG_AT( IFusionDale_Messenger, "%s()\n", __FUNCTION__ ); /* Check arguments */ if (!event_id || !callback || !ret_id) return DR_INVARG; /* Lock the messenger (has to happen before port is locked!). */ ret = fd_messenger_lock( data->messenger ); if (ret) return ret; ret = fd_messenger_port_add_listener( data->port, event_id, callback, context, ret_id ); /* Unlock the messenger. */ fd_messenger_unlock( data->messenger ); return ret; } static DirectResult IFusionDaleMessenger_UnregisterListener( IFusionDaleMessenger *thiz, FDMessengerListenerID listener_id ) { DirectResult ret; DIRECT_INTERFACE_GET_DATA(IFusionDaleMessenger) D_DEBUG_AT( IFusionDale_Messenger, "%s()\n", __FUNCTION__ ); /* Check arguments */ if (!listener_id) return DR_INVARG; /* Lock the messenger (has to happen before port is locked!). */ ret = fd_messenger_lock( data->messenger ); if (ret) return ret; ret = fd_messenger_port_remove_listener( data->port, listener_id ); /* Unlock the messenger. */ fd_messenger_unlock( data->messenger ); return ret; } static DirectResult IFusionDaleMessenger_SendSimpleEvent( IFusionDaleMessenger *thiz, FDMessengerEventID event_id, int param ) { DirectResult ret; DIRECT_INTERFACE_GET_DATA(IFusionDaleMessenger) D_DEBUG_AT( IFusionDale_Messenger, "%s()\n", __FUNCTION__ ); /* Check arguments */ if (!event_id) return DR_INVARG; /* Lock the messenger (has to happen before port is locked!). */ ret = fd_messenger_lock( data->messenger ); if (ret) return ret; /* Send the event. */ ret = fd_messenger_port_send_event( data->port, event_id, param, NULL, 0 ); /* Unlock the messenger. */ fd_messenger_unlock( data->messenger ); return ret; } static DirectResult IFusionDaleMessenger_SendEvent( IFusionDaleMessenger *thiz, FDMessengerEventID event_id, int param, void *data_ptr, unsigned int data_size ) { DirectResult ret; DIRECT_INTERFACE_GET_DATA(IFusionDaleMessenger) D_DEBUG_AT( IFusionDale_Messenger, "%s()\n", __FUNCTION__ ); /* Check arguments */ if (!event_id || !data_ptr || !data_size) return DR_INVARG; /* Lock the messenger (has to happen before port is locked!). */ ret = fd_messenger_lock( data->messenger ); if (ret) return ret; /* Send the event. */ ret = fd_messenger_port_send_event( data->port, event_id, param, data_ptr, data_size ); /* Unlock the messenger. */ fd_messenger_unlock( data->messenger ); return ret; } static DirectResult IFusionDaleMessenger_AllocateData( IFusionDaleMessenger *thiz, unsigned int data_size, void **ret_data ) { DirectResult ret; void *data_ptr; DIRECT_INTERFACE_GET_DATA(IFusionDaleMessenger) D_DEBUG_AT( IFusionDale_Messenger, "%s()\n", __FUNCTION__ ); /* Check arguments */ if (!data_size || !ret_data) return DR_INVARG; /* Lock the messenger. */ ret = fd_messenger_lock( data->messenger ); if (ret) return ret; /* Allocate the message data. */ data_ptr = SHCALLOC( data->messenger->shmpool, 1, data_size ); /* Unlock the messenger. */ fd_messenger_unlock( data->messenger ); if (!data_ptr) return D_OOSHM(); *ret_data = data_ptr; return DR_OK; } DirectResult IFusionDaleMessenger_Construct( IFusionDaleMessenger *thiz, CoreDale *core, CoreMessenger *messenger ) { DirectResult ret; CoreMessengerPort *port; /* Allocate interface data. */ DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IFusionDaleMessenger ); D_DEBUG_AT( IFusionDale_Messenger, "%s()\n", __FUNCTION__ ); /* Increase messenger's reference counter. */ ret = fd_messenger_ref( messenger ); if (ret) goto error; /* Create our port for the messenger. */ ret = fd_messenger_port_create( core, messenger, &port ); if (ret) goto error_port; /* Initialize interface data. */ data->ref = 1; data->core = core; data->messenger = messenger; data->port = port; /* Assign interface pointers. */ thiz->AddRef = IFusionDaleMessenger_AddRef; thiz->Release = IFusionDaleMessenger_Release; thiz->RegisterEvent = IFusionDaleMessenger_RegisterEvent; thiz->UnregisterEvent = IFusionDaleMessenger_UnregisterEvent; thiz->IsEventRegistered = IFusionDaleMessenger_IsEventRegistered; thiz->RegisterListener = IFusionDaleMessenger_RegisterListener; thiz->UnregisterListener = IFusionDaleMessenger_UnregisterListener; thiz->SendSimpleEvent = IFusionDaleMessenger_SendSimpleEvent; thiz->SendEvent = IFusionDaleMessenger_SendEvent; thiz->AllocateData = IFusionDaleMessenger_AllocateData; return DR_OK; error_port: fd_messenger_unref( messenger ); error: DIRECT_DEALLOCATE_INTERFACE( thiz ); return ret; } DirectFB-1.7.7/lib/fusiondale/messenger/Makefile.am0000644000175000017500000000056312254435330017021 00000000000000## Makefile.am for FusionDale/src/messenger INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/fusiondale \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/fusiondale noinst_LTLIBRARIES = \ libfusiondalemessenger.la libfusiondalemessenger_la_SOURCES = \ ifusiondalemessenger.c \ ifusiondalemessenger.h DirectFB-1.7.7/lib/fusiondale/messenger/Makefile.in0000644000175000017500000005431312466665314017050 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = lib/fusiondale/messenger DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfusiondalemessenger_la_LIBADD = am_libfusiondalemessenger_la_OBJECTS = ifusiondalemessenger.lo libfusiondalemessenger_la_OBJECTS = \ $(am_libfusiondalemessenger_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfusiondalemessenger_la_SOURCES) DIST_SOURCES = $(libfusiondalemessenger_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/fusiondale \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/fusiondale noinst_LTLIBRARIES = \ libfusiondalemessenger.la libfusiondalemessenger_la_SOURCES = \ ifusiondalemessenger.c \ ifusiondalemessenger.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/fusiondale/messenger/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/fusiondale/messenger/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfusiondalemessenger.la: $(libfusiondalemessenger_la_OBJECTS) $(libfusiondalemessenger_la_DEPENDENCIES) $(EXTRA_libfusiondalemessenger_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libfusiondalemessenger_la_OBJECTS) $(libfusiondalemessenger_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifusiondalemessenger.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # 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: DirectFB-1.7.7/lib/fusiondale/messenger/ifusiondalemessenger.h0000644000175000017500000000361012254435330021345 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __IFUSIONDALEMESSENGER_H__ #define __IFUSIONDALEMESSENGER_H__ #include #include #include /* * private data struct of IFusionDaleMessenger */ typedef struct { int ref; /* reference counter */ CoreDale *core; CoreMessenger *messenger; CoreMessengerPort *port; } IFusionDaleMessenger_data; DirectResult IFusionDaleMessenger_Construct( IFusionDaleMessenger *thiz, CoreDale *core, CoreMessenger *messenger ); #endif DirectFB-1.7.7/lib/fusiondale/core/0000755000175000017500000000000012466665351014016 500000000000000DirectFB-1.7.7/lib/fusiondale/core/dale_core.h0000644000175000017500000000662112254435330016014 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __FUSIONDALE_CORE_H__ #define __FUSIONDALE_CORE_H__ #include #include #include /**********************************************************************************************************************/ struct __FD_CoreDaleShared { int magic; FusionObjectPool *messenger_pool; FusionObjectPool *messenger_port_pool; FusionSHMPoolShared *shmpool; u32 qid; }; struct __FD_CoreDale { int magic; int refs; int fusion_id; FusionWorld *world; FusionArena *arena; CoreDaleShared *shared; bool master; DirectSignalHandler *signal_handler; }; /**********************************************************************************************************************/ /* * Core initialization and deinitialization */ DirectResult fd_core_create ( CoreDale **ret_core ); DirectResult fd_core_destroy( CoreDale *core, bool emergency ); /* * Object creation */ CoreMessenger *fd_core_create_messenger ( CoreDale *core ); CoreMessengerPort *fd_core_create_messenger_port( CoreDale *core ); /* * Object enumeration */ DirectResult fd_core_enum_messengers ( CoreDale *core, FusionObjectCallback callback, void *ctx ); DirectResult fd_core_enum_messenger_ports( CoreDale *core, FusionObjectCallback callback, void *ctx ); DirectResult fd_core_get_messenger ( CoreDale *core, FusionObjectID object_id, CoreMessenger **ret_messenger ); /* * Returns the Fusion World of the sound core. */ FusionWorld *fd_core_world( CoreDale *core ); /* * Returns the Fusion Shared Memory Pool of the sound core. */ FusionSHMPoolShared *fd_core_shmpool( CoreDale *core ); #endif DirectFB-1.7.7/lib/fusiondale/core/messenger_port.h0000644000175000017500000001206012254435330017125 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __FUSIONDALE_CORE_MESSENGER_PORT_H__ #define __FUSIONDALE_CORE_MESSENGER_PORT_H__ #include #include #include #include typedef enum { CMPNF_NONE = 0x00000000, CMPNF_EVENT = 0x00000001, CMPNF_ALL = 0x00000001 } CoreMessengerPortNotificationFlags; typedef struct { CoreMessengerPortNotificationFlags flags; CoreMessengerPort *port; FDMessengerEventID event_id; int param; void *data; unsigned int data_size; CoreMessengerDispatch *dispatch; /* for integrity check with node's next_dispatch */ } CoreMessengerPortNotification; struct __FD_CoreMessengerPort { FusionObject object; int magic; CoreMessenger *messenger; FusionSkirmish *lock; FusionHash *nodes; FusionHash *listeners; FDMessengerEventID last_listener; GlobalReaction reaction; Reaction local_reaction; }; typedef DirectEnumerationResult (*CoreMPListenerCallback)( CoreMessengerPort *port, FDMessengerEventCallback listener, void *listener_context, void *context ); /* * Creates a pool of messenger port objects. */ FusionObjectPool *fd_messenger_port_pool_create( const FusionWorld *world ); /* * Generates fd_messenger_port_ref(), fd_messenger_port_attach() etc. */ FUSION_OBJECT_METHODS( CoreMessengerPort, fd_messenger_port ) /* * Creation */ DirectResult fd_messenger_port_create( CoreDale *core, CoreMessenger *messenger, CoreMessengerPort **ret_port ); /* * Events */ DirectResult fd_messenger_port_add_event ( CoreMessengerPort *port, CoreMessengerEvent *event ); DirectResult fd_messenger_port_remove_event( CoreMessengerPort *port, FDMessengerEventID event_id ); DirectResult fd_messenger_port_send_event ( CoreMessengerPort *port, FDMessengerEventID event_id, int param, void *data_ptr, unsigned int data_size ); /* * Listeners */ DirectResult fd_messenger_port_add_listener ( CoreMessengerPort *port, FDMessengerEventID event_id, FDMessengerEventCallback callback, void *context, FDMessengerListenerID *ret_id ); DirectResult fd_messenger_port_remove_listener( CoreMessengerPort *port, FDMessengerListenerID listener_id ); DirectResult fd_messenger_port_enum_listeners ( CoreMessengerPort *port, FDMessengerEventID event_id, CoreMPListenerCallback callback, void *context ); /* * Global reactions */ ReactionResult _fd_messenger_port_messenger_listener( const void *msg_data, void *ctx ); #endif DirectFB-1.7.7/lib/fusiondale/core/messenger.c0000644000175000017500000002206212254435330016057 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include D_DEBUG_DOMAIN( DC_Mess, "Core/Messenger", "FusionDale Core Messenger" ); /**********************************************************************************************************************/ static void fd_messenger_notify( CoreMessenger *messenger, CoreMessengerNotificationFlags flags, CoreMessengerDispatch *dispatch ); /**********************************************************************************************************************/ static const ReactionFunc fd_messenger_globals[] = { /* 0 */ _fd_messenger_port_messenger_listener, NULL }; static void messenger_destructor( FusionObject *object, bool zombie, void *ctx ) { CoreMessenger *messenger = (CoreMessenger*) object; D_MAGIC_ASSERT( messenger, CoreMessenger ); D_DEBUG_AT( DC_Mess, "%s( %p [%u] )%s\n", __FUNCTION__, messenger, object->id, zombie ? " ZOMBIE!" : "" ); fusion_skirmish_destroy( &messenger->lock ); D_ASSERT( fusion_hash_size( messenger->hash ) == 0 ); fusion_hash_destroy( messenger->hash ); D_MAGIC_CLEAR( messenger ); fusion_object_destroy( object ); } FusionObjectPool * fd_messenger_pool_create( const FusionWorld *world ) { return fusion_object_pool_create( "Messenger", sizeof(CoreMessenger), sizeof(CoreMessengerNotification), messenger_destructor, NULL, world ); } /**********************************************************************************************************************/ DirectResult fd_messenger_create( CoreDale *core, CoreMessenger **ret_messenger ) { DirectResult ret; CoreMessenger *messenger; D_ASSERT( core != NULL ); D_ASSERT( ret_messenger != NULL ); D_DEBUG_AT( DC_Mess, "%s( %p )\n", __FUNCTION__, core ); /* Create messenger object. */ messenger = fd_core_create_messenger( core ); if (!messenger) return DR_FUSION; /* Initialize private data. */ messenger->shmpool = fd_core_shmpool( core ); /* Initialize lock. */ ret = fusion_skirmish_init( &messenger->lock, "Messenger", fd_core_world(core) ); if (ret) goto error; /* Initialize hash. */ ret = fusion_hash_create( messenger->shmpool, HASH_STRING, HASH_PTR, 11, &messenger->hash ); if (ret) { D_DERROR( ret, "Core/Messenger: fusion_hash_create() failed!\n" ); goto error_hash; } /* Activate messenger object. */ fusion_object_activate( &messenger->object ); D_MAGIC_SET( messenger, CoreMessenger ); /* Return messenger object. */ *ret_messenger = messenger; return DR_OK; error_hash: fusion_skirmish_destroy( &messenger->lock ); error: fusion_object_destroy( &messenger->object ); return ret; } DirectResult fd_messenger_create_event( CoreMessenger *messenger, const char *name, CoreMessengerEvent **ret_event ) { DirectResult ret; CoreMessengerEvent *event; D_MAGIC_ASSERT( messenger, CoreMessenger ); D_ASSERT( name != NULL ); D_ASSERT( ret_event != NULL ); /* Allocate event structure. */ event = SHCALLOC( messenger->shmpool, 1, sizeof(CoreMessengerEvent) ); if (!event) return D_OOSHM(); /* Set back pointer. */ event->messenger = messenger; /* Initialize event data. */ event->id = ++messenger->last_event; event->name = SHSTRDUP( messenger->shmpool, name ); if (!event->name) { ret = D_OOSHM(); goto error; } /* Insert event into hash table. */ ret = fusion_hash_insert( messenger->hash, event->name, event ); if (ret) goto error; /* Set magic. */ D_MAGIC_SET( event, CoreMessengerEvent ); /* Return new event. */ *ret_event = event; return DR_OK; error: if (event->name) SHFREE( messenger->shmpool, event->name ); SHFREE( messenger->shmpool, event ); return ret; } DirectResult fd_messenger_destroy_event( CoreMessenger *messenger, CoreMessengerEvent *event ) { DirectResult ret; void *old_key; void *old_value; D_MAGIC_ASSERT( messenger, CoreMessenger ); D_MAGIC_ASSERT( event, CoreMessengerEvent ); /* Remove event from hash table. */ ret = fusion_hash_remove( messenger->hash, event->name, &old_key, &old_value ); if (ret) { D_BUG( "event '%s' [%u] not found", event->name, event->id ); return ret; } D_ASSERT( old_key == event->name ); D_ASSERT( old_value == event ); D_ASSERT( event->name != NULL ); SHFREE( messenger->shmpool, event->name ); D_MAGIC_CLEAR( event ); SHFREE( messenger->shmpool, event ); return ret; } DirectResult fd_messenger_lookup_event( CoreMessenger *messenger, const char *name, CoreMessengerEvent **ret_event ) { CoreMessengerEvent *event; D_MAGIC_ASSERT( messenger, CoreMessenger ); D_ASSERT( name != NULL ); /* Lookup event in hash table. */ event = fusion_hash_lookup( messenger->hash, name ); if (!event) return DR_ITEMNOTFOUND; D_MAGIC_ASSERT( event, CoreMessengerEvent ); /* Can be NULL to just check for event existence. */ if (ret_event) *ret_event = event; return DR_OK; } DirectResult fd_messenger_dispatch_event( CoreMessenger *messenger, CoreMessengerEvent *event, int param, void *data_ptr, unsigned int data_size ) { CoreMessengerDispatch *dispatch; D_MAGIC_ASSERT( messenger, CoreMessenger ); D_MAGIC_ASSERT( event, CoreMessengerEvent ); D_ASSERT( event->id != FDM_EVENT_ID_NONE ); D_ASSERT( data_ptr != NULL || data_size == 0 ); /* Allocate dispatch structure. */ dispatch = SHCALLOC( messenger->shmpool, 1, sizeof(CoreMessengerDispatch) ); if (!dispatch) return D_OOSHM(); /* Initialize dispatch structure. */ dispatch->event_id = event->id; dispatch->param = param; dispatch->data = data_ptr; dispatch->data_size = data_size; D_MAGIC_SET( dispatch, CoreMessengerDispatch ); direct_list_append( &event->dispatches, &dispatch->link ); fd_messenger_notify( messenger, CMNF_DISPATCH, dispatch ); if (!dispatch->count) { direct_list_remove( &event->dispatches, &dispatch->link ); D_MAGIC_CLEAR( dispatch ); SHFREE( messenger->shmpool, dispatch ); } return DR_OK; } /**********************************************************************************************************************/ static void fd_messenger_notify( CoreMessenger *messenger, CoreMessengerNotificationFlags flags, CoreMessengerDispatch *dispatch ) { CoreMessengerNotification notification; D_MAGIC_ASSERT( messenger, CoreMessenger ); D_FLAGS_ASSERT( flags, CMNF_ALL ); D_DEBUG_AT( DC_Mess, "%s( %p [%u], 0x%08x )\n", __FUNCTION__, messenger, messenger->object.id, flags ); notification.flags = flags; notification.messenger = messenger; notification.dispatch = dispatch; fd_messenger_dispatch( messenger, ¬ification, fd_messenger_globals ); } DirectFB-1.7.7/lib/fusiondale/core/Makefile.am0000644000175000017500000000106512254435330015757 00000000000000## Makefile.am for FusionDale/src/core INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/fusiondale \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/fusiondale AM_CPPFLAGS = \ -DMODULEDIR=\"${RUNTIME_SYSROOT}@MODULEDIR@\" noinst_LTLIBRARIES = \ libfusiondalecore.la coreincludedir = @GENERIC_INCLUDEDIR@/fusiondale/core coreinclude_HEADERS = \ dale_core.h \ dale_types.h \ messenger.h \ messenger_port.h libfusiondalecore_la_SOURCES = \ dale_core.c \ messenger.c \ messenger_port.c DirectFB-1.7.7/lib/fusiondale/core/dale_types.h0000644000175000017500000000344012254435330016224 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __FUSIONDALE__CORE__DALE_TYPES_H__ #define __FUSIONDALE__CORE__DALE_TYPES_H__ typedef struct __FD_CoreDale CoreDale; typedef struct __FD_CoreDaleShared CoreDaleShared; typedef struct __FD_CoreMessenger CoreMessenger; typedef struct __FD_CoreMessengerPort CoreMessengerPort; typedef struct __FD_CoreMessengerEvent CoreMessengerEvent; typedef struct __FD_CoreMessengerDispatch CoreMessengerDispatch; typedef struct __FD_CoreMessengerListener CoreMessengerListener; #endif DirectFB-1.7.7/lib/fusiondale/core/Makefile.in0000644000175000017500000006146412466665314016015 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = lib/fusiondale/core DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(coreinclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfusiondalecore_la_LIBADD = am_libfusiondalecore_la_OBJECTS = dale_core.lo messenger.lo \ messenger_port.lo libfusiondalecore_la_OBJECTS = $(am_libfusiondalecore_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfusiondalecore_la_SOURCES) DIST_SOURCES = $(libfusiondalecore_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(coreincludedir)" HEADERS = $(coreinclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/fusiondale \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/fusiondale AM_CPPFLAGS = \ -DMODULEDIR=\"${RUNTIME_SYSROOT}@MODULEDIR@\" noinst_LTLIBRARIES = \ libfusiondalecore.la coreincludedir = @GENERIC_INCLUDEDIR@/fusiondale/core coreinclude_HEADERS = \ dale_core.h \ dale_types.h \ messenger.h \ messenger_port.h libfusiondalecore_la_SOURCES = \ dale_core.c \ messenger.c \ messenger_port.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/fusiondale/core/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/fusiondale/core/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfusiondalecore.la: $(libfusiondalecore_la_OBJECTS) $(libfusiondalecore_la_DEPENDENCIES) $(EXTRA_libfusiondalecore_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libfusiondalecore_la_OBJECTS) $(libfusiondalecore_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dale_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messenger.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messenger_port.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-coreincludeHEADERS: $(coreinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(coreinclude_HEADERS)'; test -n "$(coreincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(coreincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(coreincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(coreincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(coreincludedir)" || exit $$?; \ done uninstall-coreincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(coreinclude_HEADERS)'; test -n "$(coreincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(coreincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(coreincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-coreincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-coreincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am \ install-coreincludeHEADERS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-coreincludeHEADERS # 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: DirectFB-1.7.7/lib/fusiondale/core/messenger.h0000644000175000017500000001054512254435330016067 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __FUSIONDALE_CORE_MESSENGER_H__ #define __FUSIONDALE_CORE_MESSENGER_H__ #include #include #include typedef enum { CMNF_NONE = 0x00000000, CMNF_DISPATCH = 0x00000001, CMNF_ALL = 0x00000001 } CoreMessengerNotificationFlags; typedef struct { CoreMessengerNotificationFlags flags; CoreMessenger *messenger; CoreMessengerDispatch *dispatch; } CoreMessengerNotification; struct __FD_CoreMessenger { FusionObject object; int magic; FusionSHMPoolShared *shmpool; FusionSkirmish lock; FusionHash *hash; FDMessengerEventID last_event; }; struct __FD_CoreMessengerEvent { int magic; CoreMessenger *messenger; FDMessengerEventID id; char *name; // unsigned int nodes; DirectLink *nodes; DirectLink *dispatches; }; struct __FD_CoreMessengerDispatch { DirectLink link; int magic; int count; FDMessengerEventID event_id; int param; void *data; unsigned int data_size; }; /* * Creates a pool of messenger objects. */ FusionObjectPool *fd_messenger_pool_create( const FusionWorld *world ); /* * Generates fd_messenger_ref(), fd_messenger_attach() etc. */ FUSION_OBJECT_METHODS( CoreMessenger, fd_messenger ) /* * Creation */ DirectResult fd_messenger_create( CoreDale *core, CoreMessenger **ret_messenger ); /* * Events */ DirectResult fd_messenger_create_event ( CoreMessenger *messenger, const char *name, CoreMessengerEvent **ret_event ); DirectResult fd_messenger_destroy_event( CoreMessenger *messenger, CoreMessengerEvent *event ); DirectResult fd_messenger_lookup_event ( CoreMessenger *messenger, const char *name, CoreMessengerEvent **ret_event ); /* * Dispatch */ DirectResult fd_messenger_dispatch_event( CoreMessenger *messenger, CoreMessengerEvent *event, int param, void *data_ptr, unsigned int data_size ); /* * Locking */ static inline DirectResult fd_messenger_lock( CoreMessenger *messenger ) { D_MAGIC_ASSERT( messenger, CoreMessenger ); return fusion_skirmish_prevail( &messenger->lock ); } static inline DirectResult fd_messenger_unlock( CoreMessenger *messenger ) { D_MAGIC_ASSERT( messenger, CoreMessenger ); return fusion_skirmish_dismiss( &messenger->lock ); } /* * Global reactions */ typedef enum { FD_MESSENGER_PORT_MESSENGER_LISTENER } FD_MESSENGER_GLOBALS; #endif DirectFB-1.7.7/lib/fusiondale/core/dale_core.c0000644000175000017500000003713012254435330016006 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define FUSIONDALE_CORE_ABI 1 D_DEBUG_DOMAIN( Dale_Core, "FusionDale/Core", "FusionDale Core" ); /**********************************************************************************************************************/ static DirectSignalHandlerResult fd_core_signal_handler( int num, void *addr, void *ctx ); /**********************************************************************************************************************/ static int fd_core_arena_initialize( FusionArena *arena, void *ctx ); static int fd_core_arena_join ( FusionArena *arena, void *ctx ); static int fd_core_arena_leave ( FusionArena *arena, void *ctx, bool emergency); static int fd_core_arena_shutdown ( FusionArena *arena, void *ctx, bool emergency); /**********************************************************************************************************************/ static CoreDale *core_dale = NULL; static pthread_mutex_t core_dale_lock = PTHREAD_MUTEX_INITIALIZER; DirectResult fd_core_create( CoreDale **ret_core ) { int ret; CoreDale *core = NULL; D_ASSERT( ret_core != NULL ); D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); /* Lock the core singleton mutex. */ pthread_mutex_lock( &core_dale_lock ); /* Core already created? */ if (core_dale) { /* Increase its references. */ core_dale->refs++; /* Return the core. */ *ret_core = core_dale; /* Unlock the core singleton mutex. */ pthread_mutex_unlock( &core_dale_lock ); return DR_OK; } /* Allocate local core structure. */ core = D_CALLOC( 1, sizeof(CoreDale) ); if (!core) { ret = D_OOM(); goto error; } ret = fusion_enter( fusiondale_config->session, FUSIONDALE_CORE_ABI, fusiondale_config->force_slave ? FER_SLAVE : FER_ANY, &core->world ); if (ret) goto error; core->fusion_id = fusion_id( core->world ); fusiondale_config->session = fusion_world_index( core->world ); #if FUSION_BUILD_MULTI D_DEBUG_AT( Dale_Core, " -> world %d, fusion id %d\n", fusiondale_config->session, core->fusion_id ); #endif /* Initialize the references. */ core->refs = 1; direct_signal_handler_add( -1, fd_core_signal_handler, core, &core->signal_handler ); D_MAGIC_SET( core, CoreDale ); /* Enter the FusionDale core arena. */ if (fusion_arena_enter( core->world, "FusionDale/Core", fd_core_arena_initialize, fd_core_arena_join, core, &core->arena, &ret ) || ret) { D_MAGIC_CLEAR( core ); ret = ret ? : DR_FUSION; goto error; } /* Return the core and store the singleton. */ *ret_core = core_dale = core; /* Unlock the core singleton mutex. */ pthread_mutex_unlock( &core_dale_lock ); return DR_OK; error: if (core) { if (core->world) { direct_signal_handler_remove( core->signal_handler ); fusion_exit( core->world, false ); } D_FREE( core ); } pthread_mutex_unlock( &core_dale_lock ); return ret; } DirectResult fd_core_destroy( CoreDale *core, bool emergency ) { D_MAGIC_ASSERT( core, CoreDale ); D_ASSERT( core == core_dale ); D_DEBUG_AT( Dale_Core, "%s( %p, %semergency )\n", __FUNCTION__, core, emergency ? "" : "no " ); /* Lock the core singleton mutex. */ if (!emergency) pthread_mutex_lock( &core_dale_lock ); /* Decrement and check references. */ if (!emergency && --core->refs) { /* Unlock the core singleton mutex. */ pthread_mutex_unlock( &core_dale_lock ); return DR_OK; } direct_signal_handler_remove( core->signal_handler ); /* Exit the FusionDale core arena. */ if (fusion_arena_exit( core->arena, fd_core_arena_shutdown, core->master ? NULL : fd_core_arena_leave, core, emergency, NULL ) == DR_BUSY) { if (core->master) { if (emergency) { fusion_kill( core->world, 0, SIGKILL, 1000 ); } else { fusion_kill( core->world, 0, SIGTERM, 5000 ); fusion_kill( core->world, 0, SIGKILL, 2000 ); } } while (fusion_arena_exit( core->arena, fd_core_arena_shutdown, core->master ? NULL : fd_core_arena_leave, core, emergency, NULL ) == DR_BUSY) { D_ONCE( "waiting for FusionDale slaves to terminate" ); usleep( 100000 ); } } fusion_exit( core->world, emergency ); D_MAGIC_CLEAR( core ); /* Deallocate local core structure. */ D_FREE( core ); /* Clear the singleton. */ core_dale = NULL; /* Unlock the core singleton mutex. */ if (!emergency) pthread_mutex_unlock( &core_dale_lock ); return DR_OK; } /**********************************************************************************************************************/ CoreMessenger * fd_core_create_messenger( CoreDale *core ) { D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); D_ASSERT( core->shared != NULL ); D_ASSERT( core->shared->messenger_pool != NULL ); /* Create a new object in the messenger pool. */ return (CoreMessenger*) fusion_object_create( core->shared->messenger_pool, core->world, 0 ); } CoreMessengerPort * fd_core_create_messenger_port( CoreDale *core ) { D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); D_ASSERT( core->shared != NULL ); D_ASSERT( core->shared->messenger_port_pool != NULL ); /* Create a new object in the messenger port pool. */ return (CoreMessengerPort*) fusion_object_create( core->shared->messenger_port_pool, core->world, 0 ); } /**********************************************************************************************************************/ DirectResult fd_core_enum_messengers( CoreDale *core, FusionObjectCallback callback, void *ctx ) { D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); D_ASSERT( core->shared != NULL ); D_ASSERT( core->shared->messenger_pool != NULL ); /* Enumerate objects in the messenger pool. */ return fusion_object_pool_enum( core->shared->messenger_pool, callback, ctx ); } DirectResult fd_core_enum_messenger_ports( CoreDale *core, FusionObjectCallback callback, void *ctx ) { D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); D_ASSERT( core->shared != NULL ); D_ASSERT( core->shared->messenger_port_pool != NULL ); /* Enumerate objects in the messenger port pool. */ return fusion_object_pool_enum( core->shared->messenger_port_pool, callback, ctx ); } DirectResult fd_core_get_messenger( CoreDale *core, FusionObjectID object_id, CoreMessenger **ret_messenger ) { DirectResult ret; FusionObject *object; D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); D_ASSERT( core->shared != NULL ); D_ASSERT( core->shared->messenger_port_pool != NULL ); D_ASSERT( ret_messenger != NULL ); /* Enumerate objects in the messenger port pool. */ ret = fusion_object_get( core->shared->messenger_pool, object_id, &object ); if (ret) return ret; D_MAGIC_ASSERT( (CoreMessenger*) object, CoreMessenger ); *ret_messenger = (CoreMessenger*) object; return DR_OK; } /**********************************************************************************************************************/ FusionWorld * fd_core_world( CoreDale *core ) { D_MAGIC_ASSERT( core, CoreDale ); D_ASSERT( core->world != NULL ); return core->world; } FusionSHMPoolShared * fd_core_shmpool( CoreDale *core ) { D_MAGIC_ASSERT( core, CoreDale ); D_ASSERT( core->shared != NULL ); D_ASSERT( core->shared->shmpool != NULL ); return core->shared->shmpool; } /**********************************************************************************************************************/ static DirectSignalHandlerResult fd_core_signal_handler( int num, void *addr, void *ctx ) { CoreDale *core = (CoreDale*) ctx; D_DEBUG_AT( Dale_Core, "%s( %d, %p, %p )\n", __FUNCTION__, num, addr, ctx ); D_MAGIC_ASSERT( core, CoreDale ); D_ASSERT( core->shared != NULL ); D_ASSERT( core == core_dale ); fd_core_destroy( core, true ); return DR_OK; } /**********************************************************************************************************************/ static DirectResult fd_core_initialize( CoreDale *core ) { CoreDaleShared *shared = core->shared; D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); /* create a pool for messenger (port) objects */ shared->messenger_pool = fd_messenger_pool_create( core->world ); shared->messenger_port_pool = fd_messenger_port_pool_create( core->world ); return DR_OK; } static DirectResult fd_core_join( CoreDale *core ) { D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); /* really nothing to be done here, yet ;) */ return DR_OK; } static DirectResult fd_core_leave( CoreDale *core ) { D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); /* really nothing to be done here, yet ;) */ return DR_OK; } static DirectResult fd_core_shutdown( CoreDale *core ) { CoreDaleShared *shared; D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); D_ASSERT( core->shared != NULL ); shared = core->shared; D_ASSERT( shared->messenger_pool != NULL ); /* destroy messenger port object pool */ fusion_object_pool_destroy( shared->messenger_port_pool, core->world ); /* destroy messenger object pool */ fusion_object_pool_destroy( shared->messenger_pool, core->world ); return DR_OK; } /**********************************************************************************************************************/ static int fd_core_arena_initialize( FusionArena *arena, void *ctx ) { DirectResult ret; CoreDale *core = ctx; CoreDaleShared *shared; FusionSHMPoolShared *pool; D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); /* Create the shared memory pool first! */ ret = fusion_shm_pool_create( core->world, "FusionDale Main Pool", 0x1000000, fusion_config->debugshm, &pool ); if (ret) return ret; /* Allocate shared structure in the new pool. */ shared = SHCALLOC( pool, 1, sizeof(CoreDaleShared) ); if (!shared) { fusion_shm_pool_destroy( core->world, pool ); return D_OOSHM(); } core->shared = shared; core->master = true; shared->shmpool = pool; /* Initialize. */ ret = fd_core_initialize( core ); if (ret) { SHFREE( pool, shared ); fusion_shm_pool_destroy( core->world, pool ); return ret; } /* Register shared data. */ fusion_arena_add_shared_field( arena, "Core/Shared", shared ); /* Let others enter the world. */ fusion_world_activate( core->world ); return DR_OK; } static int fd_core_arena_shutdown( FusionArena *arena, void *ctx, bool emergency) { DirectResult ret; CoreDale *core = ctx; CoreDaleShared *shared; FusionSHMPoolShared *pool; D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); shared = core->shared; pool = shared->shmpool; if (!core->master) { D_DEBUG( "FusionDale/Core: Refusing shutdown in slave.\n" ); return fd_core_leave( core ); } /* Shutdown. */ ret = fd_core_shutdown( core ); if (ret) return ret; SHFREE( pool, shared ); fusion_dbg_print_memleaks( pool ); fusion_shm_pool_destroy( core->world, pool ); return DR_OK; } static int fd_core_arena_join( FusionArena *arena, void *ctx ) { DirectResult ret; CoreDale *core = ctx; CoreDaleShared *shared; D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); /* Get shared data. */ if (fusion_arena_get_shared_field( arena, "Core/Shared", (void*)&shared )) return DR_FUSION; core->shared = shared; /* Join. */ ret = fd_core_join( core ); if (ret) return ret; return DR_OK; } static int fd_core_arena_leave( FusionArena *arena, void *ctx, bool emergency) { DirectResult ret; CoreDale *core = ctx; D_DEBUG_AT( Dale_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( core, CoreDale ); /* Leave. */ ret = fd_core_leave( core ); if (ret) return ret; return DR_OK; } DirectFB-1.7.7/lib/fusiondale/core/messenger_port.c0000644000175000017500000007051012254435330017124 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include D_DEBUG_DOMAIN( DC_MPort, "Core/MessngPort", "FusionDale Core Messenger Port" ); /**********************************************************************************************************************/ typedef struct { DirectLink link; int magic; CoreMessengerPort *port; CoreMessengerEvent *event; unsigned int count; /* number of registrations */ DirectLink *listeners; CoreMessengerDispatch *next_dispatch; } EventNode; typedef struct { DirectLink link; int magic; EventNode *node; FDMessengerEventCallback callback; void *context; FDMessengerListenerID id; Reaction reaction; } EventListener; /**********************************************************************************************************************/ static void fd_messenger_port_notify( CoreMessengerPort *port, CoreMessengerPortNotificationFlags flags, CoreMessengerDispatch *dispatch ); /**********************************************************************************************************************/ static ReactionResult fd_messenger_port_reaction( const void *msg_data, void *ctx ); DirectResult fd_messenger_event_dispatch( CoreMessengerEvent *event, int param, void *data_ptr, unsigned int data_size ); /**********************************************************************************************************************/ static void purge_node( CoreMessengerPort *port, EventNode *node ) { DirectResult ret; DirectLink *next; void *old_value; CoreMessenger *messenger; CoreMessengerEvent *event; EventListener *listener; D_MAGIC_ASSERT( port, CoreMessengerPort ); D_MAGIC_ASSERT( node, EventNode ); D_MAGIC_ASSERT( node->event, CoreMessengerEvent ); messenger = port->messenger; D_MAGIC_ASSERT( messenger, CoreMessenger ); event = node->event; D_MAGIC_ASSERT( event, CoreMessengerEvent ); /* Remove event node from hash table. FIXME: 2nd lookup */ ret = fusion_hash_remove( port->nodes, (void*) (long) node->event->id, NULL, &old_value ); if (ret) D_BUG( "node for event id %u not found", node->event->id ); else D_ASSERT( old_value == node ); D_ASSUME( node->count > 0 ); if (node->count > 0) { ret = fd_messenger_lock( messenger ); if (ret == DR_OK) { CoreMessengerDispatch *dispatch; /* Clear pending dispatches. */ direct_list_foreach_safe( dispatch, next, node->next_dispatch ) { D_MAGIC_ASSERT( dispatch, CoreMessengerDispatch ); if (!--dispatch->count) { if (dispatch->data) SHFREE( messenger->shmpool, dispatch->data ); D_ASSUME( event->dispatches == &dispatch->link ); direct_list_remove( &event->dispatches, &dispatch->link ); D_MAGIC_CLEAR( dispatch ); SHFREE( messenger->shmpool, dispatch ); } } direct_list_remove( &event->nodes, &node->link ); /* Decrease registration counter. */ if (!/*--*/event->nodes) fd_messenger_destroy_event( messenger, event ); fd_messenger_unlock( messenger ); } else D_BUG( "could not lock messenger" ); /* Clear listeners. */ direct_list_foreach_safe( listener, next, node->listeners ) { D_MAGIC_ASSERT( listener, EventListener ); /* Remove listener from hash table. */ ret = fusion_hash_remove( port->listeners, (void*) (long) listener->id, NULL, &old_value ); if (ret) D_BUG( "listener id %u not found", listener->id ); else D_ASSERT( old_value == listener ); D_MAGIC_CLEAR( listener ); SHFREE( messenger->shmpool, listener ); } } D_MAGIC_CLEAR( node ); SHFREE( messenger->shmpool, node ); } /**********************************************************************************************************************/ static bool node_iterator( FusionHash *hash, void *key, void *value, void *ctx ) { EventNode *node = value; CoreMessengerPort *port = ctx; D_MAGIC_ASSERT( node, EventNode ); D_MAGIC_ASSERT( port, CoreMessengerPort ); purge_node( port, node ); return false; } static void messenger_port_destructor( FusionObject *object, bool zombie, void *ctx ) { CoreMessengerPort *port = (CoreMessengerPort*) object; CoreMessenger *messenger; D_MAGIC_ASSERT( port, CoreMessengerPort ); D_DEBUG_AT( DC_MPort, "%s( %p [%u] )%s\n", __FUNCTION__, port, object->id, zombie ? " ZOMBIE!" : "" ); messenger = port->messenger; D_MAGIC_ASSERT( messenger, CoreMessenger ); fd_messenger_detach_global( messenger, &port->reaction ); fusion_hash_iterate( port->nodes, node_iterator, port ); D_ASSUME( fusion_hash_size( port->nodes ) == 0 ); fusion_hash_destroy( port->nodes ); D_ASSUME( fusion_hash_size( port->listeners ) == 0 ); fusion_hash_destroy( port->listeners ); fd_messenger_unlink( &port->messenger ); D_MAGIC_CLEAR( port ); fusion_object_destroy( object ); } FusionObjectPool * fd_messenger_port_pool_create( const FusionWorld *world ) { return fusion_object_pool_create( "Messenger Port", sizeof(CoreMessengerPort), sizeof(CoreMessengerPortNotification), messenger_port_destructor, NULL, world ); } /**********************************************************************************************************************/ DirectResult fd_messenger_port_create( CoreDale *core, CoreMessenger *messenger, CoreMessengerPort **ret_port ) { DirectResult ret; CoreMessengerPort *port; D_ASSERT( core != NULL ); D_MAGIC_ASSERT( messenger, CoreMessenger ); D_ASSERT( ret_port != NULL ); D_DEBUG_AT( DC_MPort, "%s( %p )\n", __FUNCTION__, core ); /* Create messenger port object. */ port = fd_core_create_messenger_port( core ); if (!port) return DR_FUSION; /* Set back pointer. */ ret = fd_messenger_link( &port->messenger, messenger ); if (ret) goto error; /* Initialize lock. */ port->lock = &messenger->lock; /* Initialize event node hash. */ ret = fusion_hash_create( messenger->shmpool, HASH_INT, HASH_PTR, 11, &port->nodes ); if (ret) { D_DERROR( ret, "Core/MessngPort: fusion_hash_create() failed!\n" ); goto error_hash; } /* Initialize listener hash. */ ret = fusion_hash_create( messenger->shmpool, HASH_INT, HASH_PTR, 11, &port->listeners ); if (ret) { D_DERROR( ret, "Core/MessngPort: fusion_hash_create() failed!\n" ); goto error_hash2; } fusion_reactor_set_lock( port->object.reactor, port->lock ); fusion_reactor_direct( port->object.reactor, false ); /* Attach global reaction to process all events. */ ret = fd_messenger_attach_global( messenger, FD_MESSENGER_PORT_MESSENGER_LISTENER, port, &port->reaction ); if (ret) goto error_attach_global; /* Attach to the port to receive events that we listen to. */ ret = fd_messenger_port_attach( port, fd_messenger_port_reaction, port, &port->local_reaction ); if (ret) goto error_attach; /* Activate messenger port object. */ fusion_object_activate( &port->object ); D_MAGIC_SET( port, CoreMessengerPort ); /* Return messenger port object. */ *ret_port = port; return DR_OK; error_attach: fd_messenger_detach_global( messenger, &port->reaction ); error_attach_global: fusion_hash_destroy( port->listeners ); error_hash2: fusion_hash_destroy( port->nodes ); error_hash: fd_messenger_unlink( &port->messenger ); error: fusion_object_destroy( &port->object ); return ret; } DirectResult fd_messenger_port_add_event( CoreMessengerPort *port, CoreMessengerEvent *event ) { DirectResult ret; EventNode *node; D_MAGIC_ASSERT( port, CoreMessengerPort ); D_MAGIC_ASSERT( event, CoreMessengerEvent ); /* Lock port. */ ret = fusion_skirmish_prevail( port->lock ); if (ret) return ret; /* Try to lookup existing event node. */ node = fusion_hash_lookup( port->nodes, (void*) (long) event->id ); if (node) { D_MAGIC_ASSERT( node, EventNode ); D_ASSERT( node->count > 0 ); /* Increase node counter. */ node->count++; } else { CoreMessenger *messenger = port->messenger; D_MAGIC_ASSERT( messenger, CoreMessenger ); /* Allocate node. */ node = SHCALLOC( messenger->shmpool, 1, sizeof(EventNode) ); if (!node) { ret = D_OOSHM(); goto error; } /* Initialize node. */ node->port = port; node->event = event; node->count = 1; /* Insert node into hash table. */ ret = fusion_hash_insert( port->nodes, (void*) (long) event->id, node ); if (ret) { SHFREE( messenger->shmpool, node ); goto error; } D_MAGIC_SET( node, EventNode ); direct_list_append( &event->nodes, &node->link ); /* Increase event's node counter. */ //event->nodes++; } /* Unlock port. */ fusion_skirmish_dismiss( port->lock ); return DR_OK; error: fusion_skirmish_dismiss( port->lock ); return ret; } DirectResult fd_messenger_port_remove_event( CoreMessengerPort *port, FDMessengerEventID event_id ) { DirectResult ret; EventNode *node; CoreMessenger *messenger; D_MAGIC_ASSERT( port, CoreMessengerPort ); D_ASSERT( event_id != FDM_EVENT_ID_NONE ); messenger = port->messenger; D_MAGIC_ASSERT( messenger, CoreMessenger ); /* Lock port. */ ret = fusion_skirmish_prevail( port->lock ); if (ret) return ret; /* Lookup our event node. */ node = fusion_hash_lookup( port->nodes, (void*) (long) event_id ); if (node) { D_MAGIC_ASSERT( node, EventNode ); D_ASSERT( node->count > 0 ); if (node->count > 1) node->count--; else purge_node( port, node ); } else D_BUG( "node for event id %u not found", event_id ); /* Unlock port. */ fusion_skirmish_dismiss( port->lock ); return DR_OK; } DirectResult fd_messenger_port_add_listener( CoreMessengerPort *port, FDMessengerEventID event_id, FDMessengerEventCallback callback, void *context, FDMessengerListenerID *ret_id ) { DirectResult ret; CoreMessenger *messenger; EventNode *node; EventListener *listener = NULL; D_MAGIC_ASSERT( port, CoreMessengerPort ); D_ASSERT( event_id != FDM_EVENT_ID_NONE ); D_ASSERT( callback != NULL ); D_ASSERT( ret_id != NULL ); messenger = port->messenger; D_MAGIC_ASSERT( messenger, CoreMessenger ); /* Lock port. */ ret = fusion_skirmish_prevail( port->lock ); if (ret) return ret; /* Lookup our event node. */ node = fusion_hash_lookup( port->nodes, (void*) (long) event_id ); if (node) { D_MAGIC_ASSERT( node, EventNode ); D_ASSERT( node->count > 0 ); /* Allocate listener struct. */ listener = SHCALLOC( messenger->shmpool, 1, sizeof(EventListener) ); if (!listener) { ret = D_OOSHM(); goto error; } /* Initialize listener. */ listener->node = node; listener->callback = callback; listener->context = context; listener->id = ++port->last_listener; /* Insert listener into hash table. */ ret = fusion_hash_insert( port->listeners, (void*) (long) listener->id, listener ); if (ret) goto error; D_MAGIC_SET( listener, EventListener ); /* Append listener to event node. */ direct_list_append( &node->listeners, &listener->link ); *ret_id = listener->id; } else D_BUG( "node for event id %u not found", event_id ); /* Unlock port. */ fusion_skirmish_dismiss( port->lock ); return DR_OK; error: if (listener) SHFREE( messenger->shmpool, listener ); fusion_skirmish_dismiss( port->lock ); return ret; } DirectResult fd_messenger_port_remove_listener( CoreMessengerPort *port, FDMessengerListenerID listener_id ) { DirectResult ret; void *old_value; EventNode *node; EventListener *listener; CoreMessenger *messenger; D_MAGIC_ASSERT( port, CoreMessengerPort ); D_ASSERT( listener_id != FDM_LISTENER_ID_NONE ); messenger = port->messenger; D_MAGIC_ASSERT( messenger, CoreMessenger ); /* Lock port. */ ret = fusion_skirmish_prevail( port->lock ); if (ret) return ret; /* Remove listener from hash table. */ ret = fusion_hash_remove( port->listeners, (void*) (long) listener_id, NULL, &old_value ); if (ret) { D_BUG( "listener id %u not found", listener_id ); fusion_skirmish_dismiss( port->lock ); return ret; } listener = old_value; D_MAGIC_ASSERT( listener, EventListener ); node = listener->node; D_MAGIC_ASSERT( node, EventNode ); /* Remove listener from event node. */ direct_list_remove( &node->listeners, &listener->link ); D_MAGIC_CLEAR( listener ); SHFREE( messenger->shmpool, listener ); /* Unlock port. */ fusion_skirmish_dismiss( port->lock ); return DR_OK; } DirectResult fd_messenger_port_enum_listeners( CoreMessengerPort *port, FDMessengerEventID event_id, CoreMPListenerCallback callback, void *context ) { DirectResult ret; EventNode *node; D_MAGIC_ASSERT( port, CoreMessengerPort ); D_ASSERT( event_id != FDM_EVENT_ID_NONE ); D_ASSERT( callback != NULL ); /* Lock port. */ ret = fusion_skirmish_prevail( port->lock ); if (ret) return ret; /* Lookup our event node. */ node = fusion_hash_lookup( port->nodes, (void*) (long) event_id ); if (node) { EventListener *listener; D_MAGIC_ASSERT( node, EventNode ); D_ASSERT( node->count > 0 ); /* Loop through listeners for the event. */ direct_list_foreach( listener, node->listeners ) { D_MAGIC_ASSERT( listener, EventListener ); D_ASSERT( listener->callback != NULL ); /* Pass each listener and its context to the enumeration callback. */ if (callback( port, listener->callback, listener->context, context ) == DENUM_CANCEL) break; } } else D_BUG( "node for event id %u not found", event_id ); /* Unlock port. */ fusion_skirmish_dismiss( port->lock ); return DR_OK; } /**********************************************************************************************************************/ DirectResult fd_messenger_event_dispatch( CoreMessengerEvent *event, int param, void *data_ptr, unsigned int data_size ) { CoreMessenger *messenger; CoreMessengerDispatch *dispatch; EventNode *node; bool dispatched = false; D_MAGIC_ASSERT( event, CoreMessengerEvent ); D_ASSERT( event->id != FDM_EVENT_ID_NONE ); D_ASSERT( data_ptr != NULL || data_size == 0 ); messenger = event->messenger; D_MAGIC_ASSERT( messenger, CoreMessenger ); /* Allocate dispatch structure. */ dispatch = SHCALLOC( messenger->shmpool, 1, sizeof(CoreMessengerDispatch) ); if (!dispatch) return D_OOSHM(); /* Initialize dispatch structure. */ dispatch->event_id = event->id; dispatch->param = param; dispatch->data = data_ptr; dispatch->data_size = data_size; D_MAGIC_SET( dispatch, CoreMessengerDispatch ); direct_list_append( &event->dispatches, &dispatch->link ); /* we need to determine the number of listeners first */ direct_list_foreach( node, event->nodes ) { D_MAGIC_ASSERT( node, EventNode ); D_ASSERT( node->count > 0 ); D_ASSERT( node->event == event ); if (node->listeners) { dispatch->count++; } } direct_list_foreach( node, event->nodes ) { CoreMessengerPort *port; D_MAGIC_ASSERT( node, EventNode ); D_ASSERT( node->count > 0 ); D_ASSERT( node->event == event ); port = node->port; D_MAGIC_ASSERT( port, CoreMessengerPort ); /* Lock port. */ fusion_skirmish_prevail( port->lock ); if (node->listeners) { // dispatch->count++; if (!node->next_dispatch) node->next_dispatch = dispatch; /* Dispatch event to reaction in the port's process. */ fd_messenger_port_notify( node->port, CMPNF_EVENT, dispatch ); dispatched = true; } /* Unlock port. */ fusion_skirmish_dismiss( port->lock ); } if (!dispatched) { direct_list_remove( &event->dispatches, &dispatch->link ); D_MAGIC_CLEAR( dispatch ); SHFREE( messenger->shmpool, dispatch ); } return DR_OK; } DirectResult fd_messenger_port_send_event( CoreMessengerPort *port, FDMessengerEventID event_id, int param, void *data_ptr, unsigned int data_size ) { DirectResult ret; EventNode *node; CoreMessenger *messenger; CoreMessengerEvent *event; D_MAGIC_ASSERT( port, CoreMessengerPort ); D_ASSERT( event_id != FDM_EVENT_ID_NONE ); D_ASSERT( data_ptr != NULL || data_size == 0 ); messenger = port->messenger; D_MAGIC_ASSERT( messenger, CoreMessenger ); /* Lock port. */ ret = fusion_skirmish_prevail( port->lock ); if (ret) return ret; /* Lookup our event node. */ node = fusion_hash_lookup( port->nodes, (void*) (long) event_id ); if (!node) { D_BUG( "node for event id %u not found", event_id ); fusion_skirmish_dismiss( port->lock ); return DR_BUG; } D_MAGIC_ASSERT( node, EventNode ); D_ASSERT( node->count > 0 ); event = node->event; D_MAGIC_ASSERT( event, CoreMessengerEvent ); /* Unlock port. */ fusion_skirmish_dismiss( port->lock ); ret = fd_messenger_event_dispatch( event, param, data_ptr, data_size ); return ret; } /**********************************************************************************************************************/ static ReactionResult fd_messenger_port_reaction( const void *msg_data, void *ctx ) { DirectResult ret; const CoreMessengerPortNotification *notification = msg_data; CoreMessengerPort *port = ctx; EventNode *node; EventListener *listener; CoreMessenger *messenger; CoreMessengerDispatch *dispatch; CoreMessengerEvent *event; D_ASSERT( notification != NULL ); D_ASSERT( notification->event_id != FDM_EVENT_ID_NONE ); D_MAGIC_ASSERT( port, CoreMessengerPort ); D_MAGIC_ASSERT( port->messenger, CoreMessenger ); /* Lock port. */ ret = fusion_skirmish_prevail( port->lock ); if (ret) { D_BUG( "could not lock port" ); return RS_REMOVE; } /* Lookup our event node. */ node = fusion_hash_lookup( port->nodes, (void*) (long) notification->event_id ); if (!node) { /* Probably purged while the message was pending. */ D_WARN( "node for event id %u not found", notification->event_id ); fusion_skirmish_dismiss( port->lock ); return RS_OK; } D_MAGIC_ASSERT( node, EventNode ); D_ASSERT( node->count > 0 ); event = node->event; D_MAGIC_ASSERT( event, CoreMessengerEvent ); messenger = event->messenger; D_MAGIC_ASSERT( messenger, CoreMessenger ); D_ASSERT( node->next_dispatch == notification->dispatch ); dispatch = node->next_dispatch; D_MAGIC_ASSERT( dispatch, CoreMessengerDispatch ); D_ASSERT( direct_list_contains_element_EXPENSIVE( event->dispatches, &dispatch->link ) ); /* Loop through listeners for the event. */ direct_list_foreach( listener, node->listeners ) { D_MAGIC_ASSERT( listener, EventListener ); D_ASSERT( listener->callback != NULL ); /* Call each listener. */ listener->callback( dispatch->event_id, dispatch->param, dispatch->data, dispatch->data_size, listener->context ); } /* FIXME: Temporarily increase counter to avoid intermittent purge after the following unlock. */ node->count++; /* Unlock port. */ fusion_skirmish_dismiss( port->lock ); /* Lock messenger. (has to happen without the port being locked!) */ ret = fd_messenger_lock( messenger ); if (ret) { D_BUG( "could not lock messenger" ); return RS_REMOVE; } /* Lock port. */ ret = fusion_skirmish_prevail( port->lock ); if (ret) { D_BUG( "could not lock port" ); fd_messenger_unlock( messenger ); return RS_REMOVE; } /* FIXME: Due to the lock break, some might fail if port has been destroyed. Probably remove this whole thing and use a reference counter per dispatch. */ D_MAGIC_ASSERT( port, CoreMessengerPort ); D_MAGIC_ASSERT( node, EventNode ); D_ASSERT( node->count > 0 ); D_MAGIC_ASSERT( event, CoreMessengerEvent ); D_MAGIC_ASSERT( messenger, CoreMessenger ); D_MAGIC_ASSERT( dispatch, CoreMessengerDispatch ); D_ASSERT( direct_list_contains_element_EXPENSIVE( event->dispatches, &dispatch->link ) ); node->next_dispatch = (CoreMessengerDispatch*) dispatch->link.next; if (node->count > 1) { node->count--; if (!--dispatch->count) { if (dispatch->data) SHFREE( messenger->shmpool, dispatch->data ); D_ASSUME( event->dispatches == &dispatch->link ); direct_list_remove( &event->dispatches, &dispatch->link ); D_MAGIC_CLEAR( dispatch ); SHFREE( messenger->shmpool, dispatch ); } } else purge_node( port, node ); /* Unlock port. */ fusion_skirmish_dismiss( port->lock ); /* Unlock messenger. */ fd_messenger_unlock( messenger ); return RS_OK; } /**********************************************************************************************************************/ static void fd_messenger_port_notify( CoreMessengerPort *port, CoreMessengerPortNotificationFlags flags, CoreMessengerDispatch *dispatch ) { CoreMessengerPortNotification notification; D_MAGIC_ASSERT( port, CoreMessengerPort ); D_FLAGS_ASSERT( flags, CMNF_ALL ); D_DEBUG_AT( DC_MPort, "%s( %p [%u], 0x%08x )\n", __FUNCTION__, port, port->object.id, flags ); D_ASSERT( flags == CMPNF_EVENT ); notification.flags = flags; notification.port = port; notification.event_id = dispatch->event_id; notification.param = dispatch->param; notification.data = dispatch->data; notification.data_size = dispatch->data_size; notification.dispatch = dispatch; fd_messenger_port_dispatch( port, ¬ification, NULL /* no globals so far */ ); } /**********************************************************************************************************************/ ReactionResult _fd_messenger_port_messenger_listener( const void *msg_data, void *ctx ) { const CoreMessengerNotification *notification = msg_data; CoreMessengerPort *port = ctx; CoreMessengerDispatch *dispatch; EventNode *node; DirectResult ret; D_ASSERT( notification != NULL ); D_MAGIC_ASSERT( port, CoreMessengerPort ); D_ASSERT( notification->flags == CMNF_DISPATCH ); dispatch = notification->dispatch; D_MAGIC_ASSERT( dispatch, CoreMessengerDispatch ); /* Lock port. */ ret = fusion_skirmish_prevail( port->lock ); if (ret) return RS_REMOVE; /* Lookup event node to check if port has any listeners for this event. TODO: Could be optimized by linking nodes into event and dispatch directly, i.e. without this global reaction, but requires different locking. */ node = fusion_hash_lookup( port->nodes, (void*) (long) dispatch->event_id ); if (node) { D_MAGIC_ASSERT( node, EventNode ); D_ASSERT( node->count > 0 ); if (node->listeners) { dispatch->count++; if (!node->next_dispatch) node->next_dispatch = dispatch; /* Dispatch event to reaction in the port's process. */ fd_messenger_port_notify( port, CMPNF_EVENT, dispatch ); } } /* Unlock port. */ fusion_skirmish_dismiss( port->lock ); return RS_OK; } DirectFB-1.7.7/lib/fusiondale/fusiondale_version.h0000644000175000017500000000220612466665337017061 00000000000000/* (c) Copyright 2006-2007 directfb.org All rights reserved. Written by Denis Oliver Kropp . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __FUSIONDALE_VERSION_H__ #define __FUSIONDALE_VERSION_H__ #define FUSIONDALE_MAJOR_VERSION (1) #define FUSIONDALE_MINOR_VERSION (7) #define FUSIONDALE_MICRO_VERSION (7) #define FUSIONDALE_BINARY_AGE (0) #define FUSIONDALE_INTERFACE_AGE (0) #endif /* __FUSIONDALE_VERSION_H__ */ DirectFB-1.7.7/lib/fusiondale/coma/0000755000175000017500000000000012466665351014005 500000000000000DirectFB-1.7.7/lib/fusiondale/coma/icoma.c0000644000175000017500000001247712254435330015157 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include "icoma.h" static void IComa_Destruct( IComa *thiz ) { IComa_data *data = (IComa_data*)thiz->priv; coma_exit( data->coma, false ); DIRECT_DEALLOCATE_INTERFACE( thiz ); } static DirectResult IComa_AddRef( IComa *thiz ) { DIRECT_INTERFACE_GET_DATA (IComa); data->ref++; return DR_OK; } static DirectResult IComa_Release( IComa *thiz ) { DIRECT_INTERFACE_GET_DATA (IComa) if (--data->ref == 0) IComa_Destruct( thiz ); return DR_OK; } static DirectResult IComa_CreateComponent( IComa *thiz, const char *name, ComaMethodFunc func, int num_notifications, void *ctx, IComaComponent **ret_interface ) { DirectResult ret; ComaComponent *component; IComaComponent *interface; DIRECT_INTERFACE_GET_DATA(IComa) /* Check arguments */ if (!ret_interface) return DR_INVARG; /* Create a new component. */ ret = coma_create_component( data->coma, name, func, num_notifications, ctx, &component ); if (ret) return ret; DIRECT_ALLOCATE_INTERFACE( interface, IComaComponent ); ret = IComaComponent_Construct( interface, data->coma, component, num_notifications ); coma_component_unref( component ); if (ret == DR_OK) *ret_interface = interface; return ret; } static DirectResult IComa_GetComponent( IComa *thiz, const char *name, unsigned int timeout, IComaComponent **ret_interface ) { DirectResult ret; ComaComponent *component; IComaComponent *interface; DIRECT_INTERFACE_GET_DATA(IComa) /* Check arguments */ if (!ret_interface) return DR_INVARG; /* Get the component. */ ret = coma_get_component( data->coma, name, timeout, &component ); if (ret) return ret; DIRECT_ALLOCATE_INTERFACE( interface, IComaComponent ); ret = IComaComponent_Construct( interface, data->coma, component, component->num_notifications ); coma_component_unref( component ); if (ret == DR_OK) *ret_interface = interface; return DR_OK; } static DirectResult IComa_Allocate( IComa *thiz, unsigned int bytes, void **ret_ptr ) { DIRECT_INTERFACE_GET_DATA(IComa) if (!bytes || !ret_ptr) return DR_INVARG; return coma_allocate( data->coma, bytes, ret_ptr ); } static DirectResult IComa_Deallocate( IComa *thiz, void *ptr ) { DIRECT_INTERFACE_GET_DATA(IComa) if (!ptr) return DR_INVARG; return coma_deallocate( data->coma, ptr ); } static DirectResult IComa_GetLocal( IComa *thiz, unsigned int bytes, void **ret_ptr ) { DIRECT_INTERFACE_GET_DATA(IComa) if (!bytes || !ret_ptr) return DR_INVARG; return coma_get_local( data->coma, bytes, ret_ptr ); } static DirectResult IComa_FreeLocal( IComa *thiz ) { DIRECT_INTERFACE_GET_DATA(IComa) return coma_free_local( data->coma ); } DirectResult IComa_Construct( IComa *thiz, Coma *coma ) { /* Allocate interface data. */ DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IComa ); /* Initialize interface data. */ data->ref = 1; data->coma = coma; /* Assign interface pointers. */ thiz->AddRef = IComa_AddRef; thiz->Release = IComa_Release; thiz->CreateComponent = IComa_CreateComponent; thiz->GetComponent = IComa_GetComponent; thiz->Allocate = IComa_Allocate; thiz->Deallocate = IComa_Deallocate; thiz->GetLocal = IComa_GetLocal; thiz->FreeLocal = IComa_FreeLocal; return DR_OK; } DirectFB-1.7.7/lib/fusiondale/coma/coma.c0000644000175000017500000005016512254435330015002 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include D_DEBUG_DOMAIN( Coma_Core, "Coma/Core", "Coma Core" ); /**********************************************************************************************************************/ struct __COMA_ComaShared { int magic; FusionSkirmish lock; FusionSHMPoolShared *shmpool; FusionObjectPool *component_pool; FusionHash *components; FusionObjectPool *thread_pool; FusionCall thread_mem_call; }; /**********************************************************************************************************************/ static int coma_arena_initialize( FusionArena *arena, void *ctx ); static int coma_arena_join ( FusionArena *arena, void *ctx ); static int coma_arena_leave ( FusionArena *arena, void *ctx, bool emergency ); static int coma_arena_shutdown ( FusionArena *arena, void *ctx, bool emergency ); /**********************************************************************************************************************/ static void tlshm_destroy( void *arg ); /**********************************************************************************************************************/ DirectResult coma_enter( FusionWorld *world, const char *name, Coma **ret_coma ) { Coma *coma; char buf[128]; int ret = DR_OK; D_ASSERT( world != NULL ); D_ASSERT( name != NULL ); D_ASSERT( ret_coma != NULL ); D_DEBUG_AT( Coma_Core, "%s()\n", __FUNCTION__ ); /* Allocate local coma structure. */ coma = D_CALLOC( 1, sizeof(Coma) ); if (!coma) return D_OOM(); coma->world = world; coma->fusion_id = fusion_id( world ); coma->name = D_STRDUP( name ); pthread_key_create( &coma->tlshm_key, tlshm_destroy ); D_MAGIC_SET( coma, Coma ); snprintf( buf, sizeof(buf), "Coma/%s", name ); /* Enter the Coma arena. */ if (fusion_arena_enter( world, buf, coma_arena_initialize, coma_arena_join, coma, &coma->arena, &ret ) || ret) { D_MAGIC_CLEAR( coma ); D_FREE( coma->name ); D_FREE( coma ); return ret ? : DR_FUSION; } /* Return the coma. */ *ret_coma = coma; return DR_OK; } DirectResult coma_exit( Coma *coma, bool emergency ) { D_MAGIC_ASSERT( coma, Coma ); D_DEBUG_AT( Coma_Core, "%s( %p, %semergency )\n", __FUNCTION__, coma, emergency ? "" : "no " ); /* Exit the Coma arena. */ fusion_arena_exit( coma->arena, coma_arena_shutdown, coma_arena_leave, coma, emergency, NULL ); D_FREE( coma->name ); D_MAGIC_CLEAR( coma ); /* Deallocate local coma structure. */ D_FREE( coma ); return DR_OK; } /**********************************************************************************************************************/ DirectResult coma_create_component( Coma *coma, const char *name, ComaMethodFunc func, int num_notifications, void *ctx, ComaComponent **ret_component ) { DirectResult ret; ComaShared *shared; ComaComponent *component; D_MAGIC_ASSERT( coma, Coma ); D_DEBUG_AT( Coma_Core, "%s( %p, '%s' )\n", __FUNCTION__, coma, name ); shared = coma->shared; D_MAGIC_ASSERT( shared, ComaShared ); ret = fusion_skirmish_prevail( &shared->lock ); if (ret) return ret; /* Check for existence first. */ component = fusion_hash_lookup( shared->components, name ); if (component) { D_MAGIC_ASSERT( component, ComaComponent ); D_WARN( "component '%s' already exists", name ); fusion_skirmish_dismiss( &shared->lock ); return DR_BUSY; } /* Create component object. */ component = (ComaComponent*) fusion_object_create( shared->component_pool, coma->world, 0 ); if (!component) { fusion_skirmish_dismiss( &shared->lock ); return DR_FUSION; } /* Initialize component object. */ ret = coma_component_init( component, coma, name, func, num_notifications, ctx ); if (ret) { fusion_skirmish_dismiss( &shared->lock ); fusion_object_destroy( &component->object ); return ret; } /* Activate component object. */ fusion_object_activate( &component->object ); /* Insert new component into hash table. */ ret = fusion_hash_insert( shared->components, component->name, component ); if (ret) { D_DERROR( ret, "Coma/Core: fusion_hash_insert( '%s', %p ) failed!\n", name, component ); fusion_skirmish_dismiss( &shared->lock ); coma_component_unref( component ); return ret; } ret = fusion_skirmish_notify( &shared->lock ); if (ret) D_DERROR( ret, "Coma/Core: fusion_skirmish_notify() failed!\n" ); fusion_skirmish_dismiss( &shared->lock ); *ret_component = component; return DR_OK; } DirectResult coma_get_component( Coma *coma, const char *name, unsigned int timeout, ComaComponent **ret_component ) { DirectResult ret; ComaShared *shared; ComaComponent *component; D_MAGIC_ASSERT( coma, Coma ); D_ASSERT( name != NULL ); D_ASSERT( ret_component != NULL ); D_DEBUG_AT( Coma_Core, "%s( %p, '%s' )\n", __FUNCTION__, coma, name ); shared = coma->shared; D_MAGIC_ASSERT( shared, ComaShared ); /* Lock the manager. */ ret = fusion_skirmish_prevail( &shared->lock ); if (ret) return ret; /* Wait for the component to be added. */ while ((component = fusion_hash_lookup( shared->components, name )) == NULL) { ret = fusion_skirmish_wait( &shared->lock, timeout ); if (ret) return ret; } D_MAGIC_ASSERT( component, ComaComponent ); /* Increase component's ref counter. */ ret = coma_component_ref( component ); if (ret) { fusion_skirmish_dismiss( &shared->lock ); return ret; } /* Unlock the manager. */ fusion_skirmish_dismiss( &shared->lock ); /* Lock the component. */ ret = fusion_skirmish_prevail( &component->lock ); if (ret) { coma_component_unref( component ); return ret; } /* Wait for component to become active? */ while (!component->active) { ret = fusion_skirmish_wait( &component->lock, timeout ); if (ret) { coma_component_unref( component ); return ret; } } /* Unlock the component. */ fusion_skirmish_dismiss( &component->lock ); *ret_component = component; return DR_OK; } /**********************************************************************************************************************/ DirectResult coma_allocate( Coma *coma, unsigned int bytes, void **ret_ptr ) { ComaAllocation *allocation; D_DEBUG_AT( Coma_Core, "%s( %u )\n", __FUNCTION__, bytes ); D_ASSERT( ret_ptr != NULL ); allocation = SHCALLOC( coma->shared->shmpool, 1, sizeof(ComaAllocation) + bytes ); if (!allocation) return D_OOM(); allocation->magic = D_MAGIC( "ComaAllocation" ); allocation->length = bytes; *ret_ptr = allocation + 1; D_DEBUG_AT( Coma_Core, " -> ptr %p\n", *ret_ptr ); return DR_OK; } DirectResult coma_deallocate( Coma *coma, void *ptr ) { ComaAllocation *allocation; D_DEBUG_AT( Coma_Core, "%s( %p )\n", __FUNCTION__, ptr ); D_ASSERT( ptr != NULL ); allocation = ptr - sizeof(ComaAllocation); if (allocation->magic != D_MAGIC( "ComaAllocation" )) return DR_INVARG; D_DEBUG_AT( Coma_Core, " -> length %u\n", allocation->length ); SHFREE( coma->shared->shmpool, allocation ); return DR_OK; } DirectResult coma_allocation_size ( Coma *coma, void *ptr, int *ret_size ) { ComaAllocation *allocation; D_DEBUG_AT( Coma_Core, "%s( %p )\n", __FUNCTION__, ptr ); D_ASSERT( ptr != NULL ); allocation = ptr - sizeof(ComaAllocation); if (allocation->magic != D_MAGIC( "ComaAllocation" )) return DR_INVARG; D_DEBUG_AT( Coma_Core, " -> length %u\n", allocation->length ); *ret_size = allocation->length; return DR_OK; } /**********************************************************************************************************************/ static FusionCallHandlerResult thread_mem_call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { ComaThread *thread = call_ptr; D_MAGIC_ASSERT( thread, ComaThread ); if (call_arg > 0) { void *ptr = SHCALLOC( thread->shmpool, 1, call_arg ); if (!ptr) { *ret_val = D_OOSHM(); return FCHR_RETURN; } if (thread->mem) SHFREE( thread->shmpool, thread->mem ); thread->mem = ptr; thread->mem_size = call_arg; } else { if (thread->mem) SHFREE( thread->shmpool, thread->mem ); thread->mem = NULL; thread->mem_size = 0; } *ret_val = 0; return FCHR_RETURN; } /**********************************************************************************************************************/ static void tlshm_destroy( void *arg ) { ComaThread *thread = arg; D_MAGIC_ASSERT( thread, ComaThread ); coma_thread_unref( thread ); } /**********************************************************************************************************************/ DirectResult coma_get_local( Coma *coma, unsigned int bytes, void **ret_ptr ) { int ret; ComaShared *shared; ComaThread *thread; D_MAGIC_ASSERT( coma, Coma ); D_ASSERT( bytes > 0 ); D_ASSERT( ret_ptr != NULL ); shared = coma->shared; D_MAGIC_ASSERT( shared, ComaShared ); thread = pthread_getspecific( coma->tlshm_key ); if (!thread) { /* Create thread object. */ thread = (ComaThread*) fusion_object_create( shared->thread_pool, coma->world, 0 ); if (!thread) return DR_FUSION; /* Initialize thread object. */ ret = coma_thread_init( thread, coma ); if (ret) { fusion_object_destroy( &thread->object ); return ret; } /* Activate component object. */ fusion_object_activate( &thread->object ); pthread_setspecific( coma->tlshm_key, thread ); } D_MAGIC_ASSERT( thread, ComaThread ); if (thread->mem_size < bytes) { ret = fusion_call_execute( &shared->thread_mem_call, FCEF_NONE, bytes, thread, &ret ); if (ret) { D_DERROR( ret, "Coma/Core: Thread memory call to allocate %d bytes failed!\n", bytes ); return ret; } } *ret_ptr = thread->mem; return DR_OK; } DirectResult coma_free_local( Coma *coma ) { int ret; ComaShared *shared; ComaThread *thread; D_MAGIC_ASSERT( coma, Coma ); shared = coma->shared; D_MAGIC_ASSERT( shared, ComaShared ); thread = pthread_getspecific( coma->tlshm_key ); if (!thread) return DR_ITEMNOTFOUND; D_MAGIC_ASSERT( thread, ComaThread ); if (!thread->mem) return DR_BUFFEREMPTY; ret = fusion_call_execute( &shared->thread_mem_call, FCEF_NONE, 0, thread, &ret ); if (ret) { D_DERROR( ret, "Coma/Core: Thread memory call to free %d bytes failed!\n", thread->mem_size ); return ret; } return DR_OK; } /**********************************************************************************************************************/ FusionSHMPoolShared * coma_shmpool( const Coma *coma ) { const ComaShared *shared; D_MAGIC_ASSERT( coma, Coma ); shared = coma->shared; D_MAGIC_ASSERT( shared, ComaShared ); return shared->shmpool; } FusionWorld * coma_world( const Coma *coma ) { D_MAGIC_ASSERT( coma, Coma ); return coma->world; } /**********************************************************************************************************************/ void _coma_internal_remove_component( Coma *coma, ComaComponent *component ) { DirectResult ret; ComaShared *shared; D_MAGIC_ASSERT( coma, Coma ); D_MAGIC_ASSERT( component, ComaComponent ); D_DEBUG_AT( Coma_Core, "%s( %p, '%s' )\n", __FUNCTION__, coma, component->name ); shared = coma->shared; D_MAGIC_ASSERT( shared, ComaShared ); ret = fusion_skirmish_prevail( &shared->lock ); if (ret) { D_DERROR( ret, "Coma/Core: Could not lock core to remove component!\n" ); return; } fusion_hash_remove( shared->components, component->name, NULL, NULL ); fusion_skirmish_dismiss( &shared->lock ); } /**********************************************************************************************************************/ static DirectResult coma_initialize( Coma *coma ) { DirectResult ret; ComaShared *shared; D_DEBUG_AT( Coma_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( coma, Coma ); shared = coma->shared; D_MAGIC_ASSERT( shared, ComaShared ); ret = fusion_hash_create( shared->shmpool, HASH_STRING, HASH_PTR, 7, &shared->components ); if (ret) return ret; fusion_hash_set_autofree( shared->components, false, false ); fusion_skirmish_init( &shared->lock, coma->name, coma->world ); shared->component_pool = coma_component_pool_create( coma ); shared->thread_pool = coma_thread_pool_create( coma ); fusion_call_init( &shared->thread_mem_call, thread_mem_call_handler, coma, coma->world ); return DR_OK; } static DirectResult coma_join( Coma *coma ) { D_DEBUG_AT( Coma_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( coma, Coma ); /* really nothing to be done here, yet ;) */ return DR_OK; } static DirectResult coma_leave( Coma *coma ) { D_DEBUG_AT( Coma_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( coma, Coma ); /* really nothing to be done here, yet ;) */ return DR_OK; } static DirectResult coma_shutdown( Coma *coma ) { ComaShared *shared; D_DEBUG_AT( Coma_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( coma, Coma ); shared = coma->shared; D_MAGIC_ASSERT( shared, ComaShared ); fusion_object_pool_destroy( shared->component_pool, coma->world ); fusion_object_pool_destroy( shared->thread_pool, coma->world ); fusion_skirmish_destroy( &shared->lock ); fusion_hash_destroy( shared->components ); fusion_call_destroy( &shared->thread_mem_call ); return DR_OK; } /**********************************************************************************************************************/ static int coma_arena_initialize( FusionArena *arena, void *ctx ) { DirectResult ret; Coma *coma = ctx; ComaShared *shared; FusionSHMPoolShared *pool; D_DEBUG_AT( Coma_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( coma, Coma ); /* Create the shared memory pool first! */ ret = fusion_shm_pool_create( coma->world, "Coma Core", fusiondale_config->coma_shmpool_size, fusion_config->debugshm, &pool ); if (ret) return ret; /* Allocate shared structure in the new pool. */ shared = SHCALLOC( pool, 1, sizeof(ComaShared) ); if (!shared) { fusion_shm_pool_destroy( coma->world, pool ); return D_OOSHM(); } D_MAGIC_SET( shared, ComaShared ); coma->shared = shared; shared->shmpool = pool; /* Initialize. */ ret = coma_initialize( coma ); if (ret) { SHFREE( pool, shared ); fusion_shm_pool_destroy( coma->world, pool ); return ret; } /* Register shared data. */ fusion_arena_add_shared_field( arena, "Core/Shared", shared ); return DR_OK; } static int coma_arena_shutdown( FusionArena *arena, void *ctx, bool emergency) { DirectResult ret; Coma *coma = ctx; ComaShared *shared; FusionSHMPoolShared *pool; D_DEBUG_AT( Coma_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( coma, Coma ); shared = coma->shared; D_MAGIC_ASSERT( shared, ComaShared ); pool = shared->shmpool; /* Shutdown. */ ret = coma_shutdown( coma ); if (ret) return ret; D_MAGIC_CLEAR( shared ); SHFREE( pool, shared ); fusion_dbg_print_memleaks( pool ); fusion_shm_pool_destroy( coma->world, pool ); return DR_OK; } static int coma_arena_join( FusionArena *arena, void *ctx ) { DirectResult ret; Coma *coma = ctx; ComaShared *shared; D_DEBUG_AT( Coma_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( coma, Coma ); /* Get shared data. */ if (fusion_arena_get_shared_field( arena, "Core/Shared", (void*)&shared )) return DR_FUSION; coma->shared = shared; /* Join. */ ret = coma_join( coma ); if (ret) return ret; return DR_OK; } static int coma_arena_leave( FusionArena *arena, void *ctx, bool emergency) { DirectResult ret; Coma *coma = ctx; D_DEBUG_AT( Coma_Core, "%s()\n", __FUNCTION__ ); D_MAGIC_ASSERT( coma, Coma ); /* Leave. */ ret = coma_leave( coma ); if (ret) return ret; return DR_OK; } DirectFB-1.7.7/lib/fusiondale/coma/component.c0000644000175000017500000002604212254435330016062 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include D_DEBUG_DOMAIN( Coma_Component, "Coma/Component", "Coma Component" ); /**********************************************************************************************************************/ struct __COMA_ComaNotification { int magic; ComaNotificationID id; ComaNotificationFlags flags; ComaComponent *component; ComaNotifyFunc notify_func; void *notify_ctx; }; /**********************************************************************************************************************/ static const ReactionFunc coma_component_globals[] = { NULL }; static void component_destructor( FusionObject *object, bool zombie, void *ctx ) { Coma *coma = ctx; ComaComponent *component = (ComaComponent*) object; D_MAGIC_ASSERT( component, ComaComponent ); D_DEBUG_AT( Coma_Component, "%s( %p [%du] )%s\n", __FUNCTION__, component, object->id, zombie ? " ZOMBIE!" : "" ); _coma_internal_remove_component( coma, component ); fusion_skirmish_destroy( &component->lock ); fusion_call_destroy( &component->method_call ); fusion_call_destroy( &component->notify_call ); if (component->notifications) { D_ASSERT( component->num_notifications > 0 ); SHFREE( component->shmpool, component->notifications ); } else D_ASSERT( component->num_notifications == 0 ); SHFREE( component->shmpool, component->name ); D_MAGIC_CLEAR( component ); fusion_object_destroy( object ); } FusionObjectPool * coma_component_pool_create( Coma *coma ) { return fusion_object_pool_create( "Component", sizeof(ComaComponent), sizeof(void*), component_destructor, coma, coma_world(coma) ); } /**********************************************************************************************************************/ static FusionCallHandlerResult method_call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { ComaComponent *component = ctx; D_MAGIC_ASSERT( component, ComaComponent ); D_ASSUME( component->active ); D_ASSERT( component->method_func != NULL ); component->method_func( component->method_ctx, call_arg, call_ptr, serial ); return FCHR_RETAIN; } static FusionCallHandlerResult notify_call_handler( int caller, int call_arg, void *call_ptr, void *ctx, unsigned int serial, int *ret_val ) { ComaNotification *notification; ComaComponent *component = ctx; D_MAGIC_ASSERT( component, ComaComponent ); D_ASSUME( component->active ); D_ASSERT( call_arg >= 0 ); D_ASSERT( call_arg < component->num_notifications ); notification = &component->notifications[call_arg]; D_MAGIC_ASSERT( notification, ComaNotification ); if (notification->notify_func) notification->notify_func( notification->notify_ctx, call_arg, call_ptr ); if (call_ptr && (notification->flags & CNF_DEALLOC_ARG)) coma_deallocate( component->coma, call_ptr ); return FCHR_RETURN; } /**********************************************************************************************************************/ DirectResult coma_component_init( ComaComponent *component, Coma *coma, const char *name, ComaMethodFunc func, int num_notifications, void *ctx ) { DirectResult ret; FusionWorld *world; D_ASSERT( component != NULL ); D_ASSERT( coma != NULL ); D_ASSERT( name != NULL ); D_ASSERT( func != NULL ); D_ASSERT( num_notifications >= 0 ); D_DEBUG_AT( Coma_Component, "%s( %p, %p, '%s', %p, %d, %p )\n", __FUNCTION__, component, coma, name, func, num_notifications, ctx ); world = coma_world( coma ); component->shmpool = coma_shmpool( coma ); /* Initialize lock. */ ret = fusion_skirmish_init( &component->lock, "Component", world ); if (ret) return ret; /* Set name. */ component->name = SHSTRDUP( component->shmpool, name ); if (!component->name) { ret = D_OOSHM(); goto error; } /* Create notification table. */ if (num_notifications) { component->notifications = SHCALLOC( component->shmpool, num_notifications, sizeof(ComaNotification) ); if (!component->notifications) { ret = D_OOSHM(); goto error; } component->num_notifications = num_notifications; } /* Remember creator. */ component->provider = fusion_id( world ); /* Initialize calls. */ fusion_call_init( &component->method_call, method_call_handler, component, world ); fusion_call_init( &component->notify_call, notify_call_handler, component, world ); /* Setup notification dispatch callback. */ fusion_reactor_set_dispatch_callback( component->object.reactor, &component->notify_call, NULL ); /* Change name of the reactor to something more specific than just "Component" from object pool. */ fusion_reactor_set_name( component->object.reactor, name ); /* Setup method invocation handler. */ component->method_func = func; component->method_ctx = ctx; component->coma = coma; D_MAGIC_SET( component, ComaComponent ); return DR_OK; error: if (component->notifications) SHFREE( component->shmpool, component->notifications ); if (component->name) SHFREE( component->shmpool, component->name ); fusion_skirmish_destroy( &component->lock ); return ret; } DirectResult coma_component_lock( ComaComponent *component ) { D_MAGIC_ASSERT( component, ComaComponent ); return fusion_skirmish_prevail( &component->lock ); } DirectResult coma_component_unlock( ComaComponent *component ) { D_MAGIC_ASSERT( component, ComaComponent ); return fusion_skirmish_dismiss( &component->lock ); } DirectResult coma_component_activate( ComaComponent *component ) { DirectResult ret; D_MAGIC_ASSERT( component, ComaComponent ); FUSION_SKIRMISH_ASSERT( &component->lock ); D_ASSUME( !component->active ); D_DEBUG_AT( Coma_Component, "%s( %p ) <- '%s'\n", __FUNCTION__, component, component->name ); if (component->active) return DR_BUSY; component->active = true; ret = fusion_skirmish_notify( &component->lock ); if (ret) D_DERROR( ret, "Coma/Component: fusion_skirmish_notify() failed!\n" ); return ret; } DirectResult coma_component_init_notification( ComaComponent *component, ComaNotificationID id, ComaNotifyFunc func, void *ctx, ComaNotificationFlags flags ) { ComaNotification *notification; D_MAGIC_ASSERT( component, ComaComponent ); FUSION_SKIRMISH_ASSERT( &component->lock ); D_ASSUME( !component->active ); D_DEBUG_AT( Coma_Component, "%s( %p, %lu - %p )\n", __FUNCTION__, component, id, func ); if (id < 0 || id >= component->num_notifications) return DR_LIMITEXCEEDED; notification = &component->notifications[id]; if (notification->component) { D_MAGIC_ASSERT( notification, ComaNotification ); return DR_BUSY; } notification->id = id; notification->flags = flags; notification->component = component; notification->notify_func = func; notification->notify_ctx = ctx; D_MAGIC_SET( notification, ComaNotification ); return DR_OK; } DirectResult coma_component_call( ComaComponent *component, ComaMethodID method, void *arg, int *ret_val ) { D_MAGIC_ASSERT( component, ComaComponent ); D_ASSUME( component->active ); D_DEBUG_AT( Coma_Component, "%s( %p, %lu - %p, %p )\n", __FUNCTION__, component, method, arg, ret_val ); return fusion_call_execute( &component->method_call, FCEF_NONE, method, arg, ret_val ); } DirectResult coma_component_return( ComaComponent *component, unsigned int serial, int val ) { D_MAGIC_ASSERT( component, ComaComponent ); D_ASSUME( component->active ); D_DEBUG_AT( Coma_Component, "%s( %p, %u - %d )\n", __FUNCTION__, component, serial, val ); return fusion_call_return( &component->method_call, serial, val ); } DirectResult coma_component_notify( ComaComponent *component, ComaNotificationID id, void *arg ) { D_MAGIC_ASSERT( component, ComaComponent ); D_ASSUME( component->active ); D_DEBUG_AT( Coma_Component, "%s( %p [%u], %lu - %p )\n", __FUNCTION__, component, component->object.id, id, arg ); D_ASSERT( id >= 0 ); D_ASSERT( id < component->num_notifications ); return coma_component_dispatch_channel( component, id, &arg, sizeof(void*), coma_component_globals ); } DirectFB-1.7.7/lib/fusiondale/coma/coma.h0000644000175000017500000000727612254435330015014 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __COMA__COMA_H__ #define __COMA__COMA_H__ #include #include #include "coma_types.h" /* * Coma initialization and deinitialization */ DirectResult coma_enter( FusionWorld *world, const char *name, Coma **ret_coma ); DirectResult coma_exit ( Coma *coma, bool emergency ); /* * Components */ DirectResult coma_create_component( Coma *coma, const char *name, ComaMethodFunc func, int num_notifications, void *ctx, ComaComponent **ret_component ); DirectResult coma_get_component ( Coma *coma, const char *name, unsigned int timeout, ComaComponent **ret_component ); DirectResult coma_allocate ( Coma *coma, unsigned int bytes, void **ret_ptr ); DirectResult coma_deallocate ( Coma *coma, void *ptr ); DirectResult coma_allocation_size ( Coma *coma, void *ptr, int *ret_size ); /* * Thread local SHM */ DirectResult coma_get_local ( Coma *coma, unsigned int bytes, void **ret_ptr ); DirectResult coma_free_local ( Coma *coma ); /* * Misc */ FusionWorld *coma_world ( const Coma *coma ); FusionSHMPoolShared *coma_shmpool( const Coma *coma ); /* * Internal */ void _coma_internal_remove_component( Coma *coma, ComaComponent *component ); struct __COMA_Coma { int magic; char *name; int fusion_id; FusionWorld *world; FusionArena *arena; ComaShared *shared; pthread_key_t tlshm_key; }; typedef struct { int magic; unsigned int length; } ComaAllocation; #endif DirectFB-1.7.7/lib/fusiondale/coma/policy.c0000644000175000017500000001330112254435330015351 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include /**********************************************************************************************************************/ typedef struct { DirectLink link; char *name; bool allowed; } PolicyEntry; /**********************************************************************************************************************/ static pthread_mutex_t policies_lock = PTHREAD_MUTEX_INITIALIZER; static unsigned int policies_age = 1; static DirectLink *policies = NULL; /**********************************************************************************************************************/ static PolicyEntry * lookup_policy( const char *name, bool sub ) { PolicyEntry *entry; direct_list_foreach (entry, policies) { if (! strcasecmp( entry->name, name )) return entry; } /* * If the policy being registered contains a slash, but didn't exactly match an entry * in fusiondalerc, check to see if the policy is descended from an entry in fusiondalerc * (e.g. 'ui/field/messages' matches 'ui' or 'ui/field') */ if (sub && strchr(name, '/')) { int passed_name_len = strlen( name ); direct_list_foreach (entry, policies) { int entry_len = strlen( entry->name ); if ((passed_name_len > entry_len) && (name[entry_len] == '/') && (! strncasecmp( entry->name, name, entry_len))) { return entry; } } } return NULL; } static bool check_policy( ComaPolicy *policy ) { if (policy->age != policies_age) { PolicyEntry *entry = lookup_policy( policy->name, true ); policy->allowed = entry ? entry->allowed : fusiondale_config->coma_policy; policy->age = policies_age; } return policy->allowed; } /**********************************************************************************************************************/ void coma_policy_config( const char *name, bool allow ) { PolicyEntry *entry; pthread_mutex_lock( &policies_lock ); entry = lookup_policy( name, false ); if (!entry) { entry = calloc( 1, sizeof(PolicyEntry) ); if (!entry) { D_WARN( "out of memory" ); pthread_mutex_unlock( &policies_lock ); return; } entry->name = strdup( name ); direct_list_prepend( &policies, &entry->link ); } entry->allowed = allow; if (! ++policies_age) policies_age++; pthread_mutex_unlock( &policies_lock ); } bool coma_policy_check( ComaPolicy *policy ) { bool allowed; pthread_mutex_lock( &policies_lock ); allowed = check_policy( policy ); pthread_mutex_unlock( &policies_lock ); return allowed; } /**********************************************************************************************************************/ bool coma_policy_check_manager( const char *manager ) { ComaPolicy policy = COMA_POLICY_INIT( manager ); return coma_policy_check( &policy ); } bool coma_policy_check_component( const char *manager, const char *component ) { char *policy_name; if (asprintf( &policy_name, "%s/%s", manager, component ) < 0) return DR_FAILURE; ComaPolicy policy = COMA_POLICY_INIT( policy_name ); bool allowed = coma_policy_check( &policy ); free( policy_name ); return allowed; } bool coma_policy_check_method( const char *manager, const char *component, unsigned int method ) { char *policy_name; if (asprintf( &policy_name, "%s/%s/m%u", manager, component, method ) < 0) return DR_FAILURE; ComaPolicy policy = COMA_POLICY_INIT( policy_name ); bool allowed = coma_policy_check( &policy ); free( policy_name ); return allowed; } bool coma_policy_check_notification( const char *manager, const char *component, unsigned int notification ) { char *policy_name; if (asprintf( &policy_name, "%s/%s/n%u", manager, component, notification ) < 0) return DR_FAILURE; ComaPolicy policy = COMA_POLICY_INIT( policy_name ); bool allowed = coma_policy_check( &policy ); free( policy_name ); return allowed; } DirectFB-1.7.7/lib/fusiondale/coma/coma_types.h0000644000175000017500000000314412254435330016226 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __COMA__COMA_TYPES_H__ #define __COMA__COMA_TYPES_H__ typedef struct __COMA_Coma Coma; typedef struct __COMA_ComaShared ComaShared; typedef struct __COMA_ComaComponent ComaComponent; typedef struct __COMA_ComaNotification ComaNotification; typedef struct __COMA_ComaThread ComaThread; #endif DirectFB-1.7.7/lib/fusiondale/coma/icoma.h0000644000175000017500000000316412254435330015155 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __ICOMA_H__ #define __ICOMA_H__ #include #include #include /* * private data struct of IComa */ typedef struct { int ref; /* reference counter */ Coma *coma; } IComa_data; DirectResult IComa_Construct( IComa *thiz, Coma *coma ); #endif DirectFB-1.7.7/lib/fusiondale/coma/thread.h0000644000175000017500000000375612254435330015343 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __COMA__THREAD_H__ #define __COMA__THREAD_H__ #include #include #include struct __COMA_ComaThread { FusionObject object; int magic; FusionSHMPoolShared *shmpool; FusionID fusion_id; void *mem; unsigned int mem_size; }; /* * Creates a pool of component threads. */ FusionObjectPool *coma_thread_pool_create( Coma *coma ); /* * Generates coma_thread_ref(), coma_thread_attach() etc. */ FUSION_OBJECT_METHODS( ComaThread, coma_thread ) /* * Object initialization */ DirectResult coma_thread_init( ComaThread *thread, Coma *coma ); #endif DirectFB-1.7.7/lib/fusiondale/coma/icomacomponent.h0000644000175000017500000000411312254435330017073 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __ICOMACOMPONENT_H__ #define __ICOMACOMPONENT_H__ #include #include #include typedef struct { ComaListenerFunc func; void *ctx; Reaction reaction; } ComaListener; /* * private data struct of IComaComponent */ typedef struct { int ref; /* reference counter */ Coma *coma; ComaComponent *component; int num_notifications; ComaListener *listeners; } IComaComponent_data; DirectResult IComaComponent_Construct( IComaComponent *thiz, Coma *coma, ComaComponent *component, int num_notifications ); #endif DirectFB-1.7.7/lib/fusiondale/coma/policy.h0000644000175000017500000000401612254435330015361 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __FUSIONDALE_COMA__POLICY_H__ #define __FUSIONDALE_COMA__POLICY_H__ #include typedef struct { unsigned int age; bool allowed; const char *name; } ComaPolicy; #define COMA_POLICY_INIT( __name ) (ComaPolicy){ .age = 0, .name = (__name) } void coma_policy_config( const char *name, bool allow ); bool coma_policy_check ( ComaPolicy *policy ); bool coma_policy_check_manager ( const char *manager ); bool coma_policy_check_component ( const char *manager, const char *component ); bool coma_policy_check_method ( const char *manager, const char *component, unsigned int method ); bool coma_policy_check_notification( const char *manager, const char *component, unsigned int notification ); #endif DirectFB-1.7.7/lib/fusiondale/coma/Makefile.am0000644000175000017500000000120012254435330015735 00000000000000## Makefile.am for lib/fusiondale/coma INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/fusiondale \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/fusiondale AM_CPPFLAGS = \ -DMODULEDIR=\"${RUNTIME_SYSROOT}@MODULEDIR@\" noinst_LTLIBRARIES = \ libfusiondalecoma.la comaincludedir = @GENERIC_INCLUDEDIR@/fusiondale/coma comainclude_HEADERS = \ coma.h \ coma_types.h \ component.h \ policy.h \ thread.h \ icoma.h \ icomacomponent.h libfusiondalecoma_la_SOURCES = \ coma.c \ component.c \ policy.c \ thread.c \ icoma.c \ icomacomponent.c DirectFB-1.7.7/lib/fusiondale/coma/thread.c0000644000175000017500000000605312254435330015327 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include D_DEBUG_DOMAIN( Coma_Thread, "Coma/Thread", "Coma Thread" ); /**********************************************************************************************************************/ static const ReactionFunc coma_thread_globals[] = { NULL }; static void thread_destructor( FusionObject *object, bool zombie, void *ctx ) { ComaThread *thread = (ComaThread*) object; D_MAGIC_ASSERT( thread, ComaThread ); D_DEBUG_AT( Coma_Thread, "%s( %p [%u] )%s\n", __FUNCTION__, thread, object->id, zombie ? " ZOMBIE!" : "" ); if (thread->mem) SHFREE( thread->shmpool, thread->mem ); D_MAGIC_CLEAR( thread ); fusion_object_destroy( object ); } FusionObjectPool * coma_thread_pool_create( Coma *coma ) { return fusion_object_pool_create( "Thread", sizeof(ComaThread), sizeof(void*), thread_destructor, coma, coma_world(coma) ); } /**********************************************************************************************************************/ DirectResult coma_thread_init( ComaThread *thread, Coma *coma ) { FusionWorld *world; D_ASSERT( thread != NULL ); D_ASSERT( coma != NULL ); D_DEBUG_AT( Coma_Thread, "%s( %p, %p )\n", __FUNCTION__, thread, coma ); world = coma_world( coma ); thread->shmpool = coma_shmpool( coma ); /* Remember creator. */ thread->fusion_id = fusion_id( world ); D_MAGIC_SET( thread, ComaThread ); return DR_OK; } DirectFB-1.7.7/lib/fusiondale/coma/component.h0000644000175000017500000001115212254435330016063 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 __COMA__COMPONENT_H__ #define __COMA__COMPONENT_H__ #include #include #include struct __COMA_ComaComponent { FusionObject object; Coma *coma; int magic; FusionSHMPoolShared *shmpool; FusionSkirmish lock; bool active; char *name; /* Name of the component. */ ComaNotification *notifications; /* Shared notification table. */ unsigned int num_notifications; /* Number of notifications. */ FusionID provider; /* Creator of the component. */ FusionCall method_call; /* Call used for method invocation. */ FusionCall notify_call; /* Call used for dispatch callbacks. */ ComaMethodFunc method_func; /* Function pointer for invocations. */ void *method_ctx; /* Context of invocation handler. */ }; /* * Creates a pool of component objects. */ FusionObjectPool *coma_component_pool_create( Coma *coma ); /* * Generates coma_component_ref(), coma_component_attach() etc. */ FUSION_OBJECT_METHODS( ComaComponent, coma_component ) /* * Object initialization */ DirectResult coma_component_init ( ComaComponent *component, Coma *coma, const char *name, ComaMethodFunc func, int num_notifications, void *ctx ); DirectResult coma_component_lock ( ComaComponent *component ); DirectResult coma_component_unlock ( ComaComponent *component ); DirectResult coma_component_activate ( ComaComponent *component ); DirectResult coma_component_init_notification( ComaComponent *component, ComaNotificationID id, ComaNotifyFunc func, void *ctx, ComaNotificationFlags flags ); DirectResult coma_component_call ( ComaComponent *component, ComaMethodID method, void *arg, int *ret_val ); DirectResult coma_component_return ( ComaComponent *component, unsigned int serial, int val ); DirectResult coma_component_notify ( ComaComponent *component, ComaNotificationID id, void *arg ); #endif DirectFB-1.7.7/lib/fusiondale/coma/Makefile.in0000644000175000017500000006214612466665314016002 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = lib/fusiondale/coma DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(comainclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfusiondalecoma_la_LIBADD = am_libfusiondalecoma_la_OBJECTS = coma.lo component.lo policy.lo \ thread.lo icoma.lo icomacomponent.lo libfusiondalecoma_la_OBJECTS = $(am_libfusiondalecoma_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfusiondalecoma_la_SOURCES) DIST_SOURCES = $(libfusiondalecoma_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(comaincludedir)" HEADERS = $(comainclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/fusiondale \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/fusiondale AM_CPPFLAGS = \ -DMODULEDIR=\"${RUNTIME_SYSROOT}@MODULEDIR@\" noinst_LTLIBRARIES = \ libfusiondalecoma.la comaincludedir = @GENERIC_INCLUDEDIR@/fusiondale/coma comainclude_HEADERS = \ coma.h \ coma_types.h \ component.h \ policy.h \ thread.h \ icoma.h \ icomacomponent.h libfusiondalecoma_la_SOURCES = \ coma.c \ component.c \ policy.c \ thread.c \ icoma.c \ icomacomponent.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/fusiondale/coma/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/fusiondale/coma/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfusiondalecoma.la: $(libfusiondalecoma_la_OBJECTS) $(libfusiondalecoma_la_DEPENDENCIES) $(EXTRA_libfusiondalecoma_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libfusiondalecoma_la_OBJECTS) $(libfusiondalecoma_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coma.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/component.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icoma.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icomacomponent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/policy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-comaincludeHEADERS: $(comainclude_HEADERS) @$(NORMAL_INSTALL) @list='$(comainclude_HEADERS)'; test -n "$(comaincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(comaincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(comaincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(comaincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(comaincludedir)" || exit $$?; \ done uninstall-comaincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(comainclude_HEADERS)'; test -n "$(comaincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(comaincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(comaincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-comaincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-comaincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am \ install-comaincludeHEADERS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-comaincludeHEADERS # 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: DirectFB-1.7.7/lib/fusiondale/coma/icomacomponent.c0000644000175000017500000002401212254435330017066 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include "icomacomponent.h" /**********************************************************************************************************************/ static ReactionResult IComaComponent_ListenerReaction( const void *msg_data, void *ctx ); /**********************************************************************************************************************/ static void IComaComponent_Destruct( IComaComponent *thiz ) { int i; IComaComponent_data *data = thiz->priv; for (i=0; inum_notifications; i++) { if (data->listeners[i].func) coma_component_detach( data->component, &data->listeners[i].reaction ); } coma_component_unref( data->component ); if (data->listeners) D_FREE( data->listeners ); DIRECT_DEALLOCATE_INTERFACE( thiz ); } static DirectResult IComaComponent_AddRef( IComaComponent *thiz ) { DIRECT_INTERFACE_GET_DATA (IComaComponent) data->ref++; return DR_OK; } static DirectResult IComaComponent_Release( IComaComponent *thiz ) { DIRECT_INTERFACE_GET_DATA (IComaComponent) if (--data->ref == 0) IComaComponent_Destruct( thiz ); return DR_OK; } static DirectResult IComaComponent_InitNotification( IComaComponent *thiz, ComaNotificationID id, ComaNotifyFunc func, void *ctx, ComaNotificationFlags flags ) { DirectResult ret; DIRECT_INTERFACE_GET_DATA (IComaComponent) coma_component_lock( data->component ); ret = coma_component_init_notification( data->component, id, func, ctx, flags ); coma_component_unlock( data->component ); return ret; } static DirectResult IComaComponent_InitNotifications( IComaComponent *thiz, const ComaNotificationInit *inits, int num_inits, void *ctx ) { int i; DirectResult ret = DR_INVARG; DIRECT_INTERFACE_GET_DATA (IComaComponent) if (!inits || num_inits < 1) return DR_INVARG; coma_component_lock( data->component ); for (i=0; icomponent, inits[i].id, inits[i].func, inits[i].ctx ? : ctx, inits[i].flags ); if (ret) break; } coma_component_unlock( data->component ); return ret; } static DirectResult IComaComponent_Call( IComaComponent *thiz, ComaMethodID method, void *arg, int *ret_val ) { DIRECT_INTERFACE_GET_DATA (IComaComponent) return coma_component_call( data->component, method, arg, ret_val ); } static DirectResult IComaComponent_Return( IComaComponent *thiz, int val, unsigned int magic ) { DIRECT_INTERFACE_GET_DATA (IComaComponent) return coma_component_return( data->component, magic, val ); } static DirectResult IComaComponent_Notify( IComaComponent *thiz, ComaNotificationID id, void *arg ) { DIRECT_INTERFACE_GET_DATA (IComaComponent) if (id < 0 || id >= data->num_notifications) return DR_LIMITEXCEEDED; return coma_component_notify( data->component, id, arg ); } static DirectResult IComaComponent_Listen( IComaComponent *thiz, ComaNotificationID id, ComaListenerFunc func, void *ctx ) { DirectResult ret; ComaListener *listener; DIRECT_INTERFACE_GET_DATA (IComaComponent) if (id < 0 || id >= data->num_notifications) return DR_LIMITEXCEEDED; listener = &data->listeners[id]; if (listener->func) return DR_BUSY; ret = coma_component_attach_channel( data->component, id, IComaComponent_ListenerReaction, listener, &listener->reaction ); if (ret) return ret; listener->func = func; listener->ctx = ctx; return DR_OK; } static DirectResult IComaComponent_InitListeners( IComaComponent *thiz, const ComaListenerInit *inits, int num_inits, void *ctx ) { int i; DirectResult ret; ComaListener *listener; DIRECT_INTERFACE_GET_DATA (IComaComponent) if (!inits || num_inits < 1) return DR_INVARG; for (i=0; i= data->num_notifications) return DR_LIMITEXCEEDED; listener = &data->listeners[inits[i].id]; if (listener->func) return DR_BUSY; ret = coma_component_attach_channel( data->component, inits[i].id, IComaComponent_ListenerReaction, listener, &listener->reaction ); if (ret) return ret; listener->func = inits[i].func; listener->ctx = inits[i].ctx ? : ctx; } return DR_OK; } static DirectResult IComaComponent_Unlisten( IComaComponent *thiz, ComaNotificationID id ) { ComaListener *listener; DIRECT_INTERFACE_GET_DATA (IComaComponent) if (id < 0 || id >= data->num_notifications) return DR_LIMITEXCEEDED; listener = &data->listeners[id]; if (!listener->func) return DR_ITEMNOTFOUND; coma_component_detach( data->component, &listener->reaction ); listener->func = NULL; return DR_OK; } static DirectResult IComaComponent_Activate( IComaComponent *thiz ) { DirectResult ret; DIRECT_INTERFACE_GET_DATA (IComaComponent) coma_component_lock( data->component ); ret = coma_component_activate( data->component ); coma_component_unlock( data->component ); return ret; } DirectResult IComaComponent_Construct( IComaComponent *thiz, Coma *coma, ComaComponent *component, int num_notifications ) { DirectResult ret; /* Allocate interface data. */ DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IComaComponent ); ret = coma_component_ref( component ); if (ret) { DIRECT_DEALLOCATE_INTERFACE( thiz ); return ret; } /* Initialize interface data. */ data->ref = 1; data->coma = coma; data->component = component; data->num_notifications = num_notifications; if (num_notifications > 0) { data->listeners = D_CALLOC( num_notifications, sizeof(ComaListener) ); if (!data->listeners) { D_OOM(); coma_component_unref( component ); DIRECT_DEALLOCATE_INTERFACE( thiz ); return DR_NOLOCALMEMORY; } } /* Assign interface pointers. */ thiz->AddRef = IComaComponent_AddRef; thiz->Release = IComaComponent_Release; thiz->InitNotification = IComaComponent_InitNotification; thiz->InitNotifications = IComaComponent_InitNotifications; thiz->Call = IComaComponent_Call; thiz->Return = IComaComponent_Return; thiz->Notify = IComaComponent_Notify; thiz->Listen = IComaComponent_Listen; thiz->InitListeners = IComaComponent_InitListeners; thiz->Unlisten = IComaComponent_Unlisten; thiz->Activate = IComaComponent_Activate; return DR_OK; } /**********************************************************************************************************************/ static ReactionResult IComaComponent_ListenerReaction( const void *msg_data, void *ctx ) { void * const *p_arg = msg_data; ComaListener *listener = ctx; D_ASSERT( msg_data != NULL ); D_ASSERT( ctx != NULL ); D_ASSUME( listener->func != NULL ); if (listener->func) listener->func( listener->ctx, *p_arg ); return RS_OK; } DirectFB-1.7.7/lib/fusiondale/Makefile.am0000644000175000017500000000254212254435330015030 00000000000000## Makefile.am for lib/fusiondale SUBDIRS = coma core messenger misc INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/fusiondale \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/fusiondale pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = fusiondale.pc includedir = @GENERIC_INCLUDEDIR@/fusiondale include_HEADERS = \ fusiondale.h \ fusiondale_util.h \ fusiondale_version.h lib_LTLIBRARIES = libfusiondale.la libfusiondale_la_SOURCES = \ fusiondale.c \ ifusiondale.c \ ifusiondale.h libfusiondale_la_LIBADD = \ ../direct/libdirect.la \ ../fusion/libfusion.la \ coma/libfusiondalecoma.la \ core/libfusiondalecore.la \ messenger/libfusiondalemessenger.la \ misc/libfusiondalemisc.la libfusiondale_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -release $(LT_RELEASE) \ $(DFB_LDFLAGS) # ## and now rebuild the static version with the *correct* object files # if BUILD_STATIC clean-local: rm -f libfusiondale_fixed.a all-local: libfusiondale_fixed.a libfusiondale_fixed.a: .libs/libfusiondale.a rm -f libfusiondale_fixed.a ${AR} cru libfusiondale_fixed.a `find -name '*.o' | grep -v '.libs'` ${RANLIB} libfusiondale_fixed.a cp -af libfusiondale_fixed.a .libs/libfusiondale.a .libs/libfusiondale.a: libfusiondale.la else clean-local: all-local: endif DirectFB-1.7.7/lib/fusiondale/fusiondale.pc.in0000644000175000017500000000042312254435330016052 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@GENERIC_INCLUDEDIR@ Name: FusionDale Requires: fusion Description: Inter Process Communication - Applied Fusion Version: @VERSION@ Libs: -L${libdir} -lfusiondale Cflags: -I@GENERIC_INCLUDEDIR@/fusiondale DirectFB-1.7.7/lib/fusiondale/Makefile.in0000644000175000017500000010106712466665314015057 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = lib/fusiondale DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/fusiondale.pc.in $(srcdir)/fusiondale_version.h.in \ $(top_srcdir)/depcomp $(include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = fusiondale.pc fusiondale_version.h CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libfusiondale_la_DEPENDENCIES = ../direct/libdirect.la \ ../fusion/libfusion.la coma/libfusiondalecoma.la \ core/libfusiondalecore.la messenger/libfusiondalemessenger.la \ misc/libfusiondalemisc.la am_libfusiondale_la_OBJECTS = fusiondale.lo ifusiondale.lo libfusiondale_la_OBJECTS = $(am_libfusiondale_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libfusiondale_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libfusiondale_la_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfusiondale_la_SOURCES) DIST_SOURCES = $(libfusiondale_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASFLAGS = @ASFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AVIFILE_CFLAGS = @AVIFILE_CFLAGS@ AVIFILE_CONFIG = @AVIFILE_CONFIG@ AVIFILE_LIBS = @AVIFILE_LIBS@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXSTD = @CXXSTD@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEP_ONE = @DEP_ONE@ DEP_VOODOO = @DEP_VOODOO@ DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@ DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@ DFB_LDFLAGS = @DFB_LDFLAGS@ DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@ DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@ DIRECTFB_BUILD_ONE = @DIRECTFB_BUILD_ONE@ DIRECTFB_BUILD_PURE_VOODOO = @DIRECTFB_BUILD_PURE_VOODOO@ DIRECTFB_BUILD_VOODOO = @DIRECTFB_BUILD_VOODOO@ DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@ DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@ DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@ DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@ DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@ DIRECTFB_VERSION = @DIRECTFB_VERSION@ DIRECTFB_VERSION_VENDOR = @DIRECTFB_VERSION_VENDOR@ DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@ DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@ DIRECT_BUILD_DYNLOAD = @DIRECT_BUILD_DYNLOAD@ DIRECT_BUILD_GCC_ATOMICS = @DIRECT_BUILD_GCC_ATOMICS@ DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@ DIRECT_BUILD_MULTICORE = @DIRECT_BUILD_MULTICORE@ DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@ DIRECT_BUILD_OSTYPE = @DIRECT_BUILD_OSTYPE@ DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@ DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@ DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@ DLLTOOL = @DLLTOOL@ DRMKMS_CFLAGS = @DRMKMS_CFLAGS@ DRMKMS_LIBS = @DRMKMS_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNLIB = @DYNLIB@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ EGL_LIBS = @EGL_LIBS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ FLASH_LIBS = @FLASH_LIBS@ FLUXCOMP = @FLUXCOMP@ FLUXED_ARGS_BYTES = @FLUXED_ARGS_BYTES@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_PROVIDER = @FREETYPE_PROVIDER@ FS_MAX_CHANNELS = @FS_MAX_CHANNELS@ FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@ FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@ FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@ GENERIC_INCLUDEDIR = @GENERIC_INCLUDEDIR@ GIF_PROVIDER = @GIF_PROVIDER@ GLES2_CFLAGS = @GLES2_CFLAGS@ GLES2_LIBS = @GLES2_LIBS@ GL_LIBS = @GL_LIBS@ GP2D_CFLAGS = @GP2D_CFLAGS@ GP2D_LIBS = @GP2D_LIBS@ GREP = @GREP@ GSTREAMER_INCL = @GSTREAMER_INCL@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ HAVE_LINUX = @HAVE_LINUX@ IMLIB2_CFLAGS = @IMLIB2_CFLAGS@ IMLIB2_CONFIG = @IMLIB2_CONFIG@ IMLIB2_LIBS = @IMLIB2_LIBS@ INCLUDEDIR = @INCLUDEDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ JASPER_LIBS = @JASPER_LIBS@ JPEG_PROVIDER = @JPEG_PROVIDER@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBM = @LIBM@ LIBMNG = @LIBMNG@ LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LINOTYPE_CFLAGS = @LINOTYPE_CFLAGS@ LINOTYPE_LIBS = @LINOTYPE_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_BINARY = @LT_BINARY@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAD_LIBS = @MAD_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MAN2HTML = @MAN2HTML@ MANIFEST_TOOL = @MANIFEST_TOOL@ MESA_CFLAGS = @MESA_CFLAGS@ MESA_LIBS = @MESA_LIBS@ MKDIR_P = @MKDIR_P@ MNG_PROVIDER = @MNG_PROVIDER@ MODULEDIR = @MODULEDIR@ MODULEDIRNAME = @MODULEDIRNAME@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ OSX_LIBS = @OSX_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_PROVIDER = @PNG_PROVIDER@ PVR2D_CFLAGS = @PVR2D_CFLAGS@ PVR2D_LIBS = @PVR2D_LIBS@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUNTIME_SYSROOT = @RUNTIME_SYSROOT@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH772X_DEP_CFLAGS = @SH772X_DEP_CFLAGS@ SH772X_DEP_LIBS = @SH772X_DEP_LIBS@ SH772X_SHJPEG_DEP_CFLAGS = @SH772X_SHJPEG_DEP_CFLAGS@ SH772X_SHJPEG_DEP_LIBS = @SH772X_SHJPEG_DEP_LIBS@ SHELL = @SHELL@ SOPATH = @SOPATH@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ SWFDEC_LIBS = @SWFDEC_LIBS@ SYSCONFDIR = @SYSCONFDIR@ THREADFLAGS = @THREADFLAGS@ THREADLIB = @THREADLIB@ TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@ TIMIDITY_LIBS = @TIMIDITY_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ VERSION = @VERSION@ VNC_CFLAGS = @VNC_CFLAGS@ VNC_CONFIG = @VNC_CONFIG@ VNC_LIBS = @VNC_LIBS@ VOODOO_BUILD_NO_SETSOCKOPT = @VOODOO_BUILD_NO_SETSOCKOPT@ VORBISFILE_CFLAGS = @VORBISFILE_CFLAGS@ VORBISFILE_LIBS = @VORBISFILE_LIBS@ X11VDPAU_CFLAGS = @X11VDPAU_CFLAGS@ X11VDPAU_LIBS = @X11VDPAU_LIBS@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XINE_CFLAGS = @XINE_CFLAGS@ XINE_CONFIG = @XINE_CONFIG@ XINE_LIBS = @XINE_LIBS@ XINE_PLUGINDIR = @XINE_PLUGINDIR@ XINE_VDPAU_CFLAGS = @XINE_VDPAU_CFLAGS@ XINE_VDPAU_LIBS = @XINE_VDPAU_LIBS@ XINE_VDPAU_PLUGINDIR = @XINE_VDPAU_PLUGINDIR@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @GENERIC_INCLUDEDIR@/fusiondale infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = coma core messenger misc INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/fusiondale \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/fusiondale pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = fusiondale.pc include_HEADERS = \ fusiondale.h \ fusiondale_util.h \ fusiondale_version.h lib_LTLIBRARIES = libfusiondale.la libfusiondale_la_SOURCES = \ fusiondale.c \ ifusiondale.c \ ifusiondale.h libfusiondale_la_LIBADD = \ ../direct/libdirect.la \ ../fusion/libfusion.la \ coma/libfusiondalecoma.la \ core/libfusiondalecore.la \ messenger/libfusiondalemessenger.la \ misc/libfusiondalemisc.la libfusiondale_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -release $(LT_RELEASE) \ $(DFB_LDFLAGS) all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/fusiondale/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/fusiondale/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): fusiondale.pc: $(top_builddir)/config.status $(srcdir)/fusiondale.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ fusiondale_version.h: $(top_builddir)/config.status $(srcdir)/fusiondale_version.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfusiondale.la: $(libfusiondale_la_OBJECTS) $(libfusiondale_la_DEPENDENCIES) $(EXTRA_libfusiondale_la_DEPENDENCIES) $(AM_V_CCLD)$(libfusiondale_la_LINK) -rpath $(libdir) $(libfusiondale_la_OBJECTS) $(libfusiondale_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fusiondale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifusiondale.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-includeHEADERS install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool clean-local cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA # # @BUILD_STATIC_TRUE@clean-local: @BUILD_STATIC_TRUE@ rm -f libfusiondale_fixed.a @BUILD_STATIC_TRUE@all-local: libfusiondale_fixed.a @BUILD_STATIC_TRUE@libfusiondale_fixed.a: .libs/libfusiondale.a @BUILD_STATIC_TRUE@ rm -f libfusiondale_fixed.a @BUILD_STATIC_TRUE@ ${AR} cru libfusiondale_fixed.a `find -name '*.o' | grep -v '.libs'` @BUILD_STATIC_TRUE@ ${RANLIB} libfusiondale_fixed.a @BUILD_STATIC_TRUE@ cp -af libfusiondale_fixed.a .libs/libfusiondale.a @BUILD_STATIC_TRUE@.libs/libfusiondale.a: libfusiondale.la @BUILD_STATIC_FALSE@clean-local: @BUILD_STATIC_FALSE@all-local: # 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: DirectFB-1.7.7/lib/fusiondale/misc/0000755000175000017500000000000012466665351014021 500000000000000DirectFB-1.7.7/lib/fusiondale/misc/Makefile.am0000644000175000017500000000066312254435330015765 00000000000000## Makefile.am for FusionDale/src/misc INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/lib/fusiondale \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/fusiondale AM_CPPFLAGS = \ -DSYSCONFDIR=\"@sysconfdir@\" \ -DFUSIONDALE_USE_ONE="(@DIRECTFB_BUILD_ONE@)" noinst_LTLIBRARIES = \ libfusiondalemisc.la libfusiondalemisc_la_SOURCES = \ dale_config.c \ dale_config.h DirectFB-1.7.7/lib/fusiondale/misc/dale_config.c0000644000175000017500000003306412254435330016330 00000000000000/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp , Andreas Shimokawa , Marek Pikarski , Sven Neumann , Ville Syrjälä and Claudio Ciccani . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser 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 #include #include #include #include #include #include #include #include #include #include #include #include #if !DIRECTFB_BUILD_PURE_VOODOO #include #endif #include "dale_config.h" FusionDaleConfig *fusiondale_config = NULL; static const char *config_usage = "FusionDale version " DIRECTFB_VERSION "\n" "\n" " --fd-help Output FusionDale usage information and exit\n" " --fd: