diff options
author | carmen rocco <ix9@users.sourceforge.net> | 2005-04-29 00:43:36 +0000 |
---|---|---|
committer | carmen rocco <ix9@users.sourceforge.net> | 2005-04-29 00:43:36 +0000 |
commit | 9d9262c32f4bc9c0dad8b92828acba53c889cb79 (patch) | |
tree | 588e3bca2b474a8e112ae4e44405b9176818c0e2 | |
parent | 6a34f67a66eee984d72393ad41c3bdf9b6f10279 (diff) |
yeah
svn path=/trunk/externals/plugin~/; revision=2849
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | BUGS | 18 | ||||
-rw-r--r-- | COPYING | 340 | ||||
-rw-r--r-- | ChangeLog | 23 | ||||
-rw-r--r-- | INSTALL | 181 | ||||
-rw-r--r-- | Makefile.am | 53 | ||||
-rw-r--r-- | Makefile.in | 453 | ||||
-rw-r--r-- | NEWS | 23 | ||||
-rw-r--r-- | README | 137 | ||||
-rw-r--r-- | SConstruct | 11 | ||||
-rw-r--r-- | TODO | 6 | ||||
-rw-r--r-- | aclocal.m4 | 543 | ||||
-rwxr-xr-x | config.guess | 973 | ||||
-rw-r--r-- | config.h | 60 | ||||
-rwxr-xr-x | config.sub | 956 | ||||
-rwxr-xr-x | configure | 2001 | ||||
-rw-r--r-- | configure.in | 48 | ||||
-rwxr-xr-x | install-sh | 251 | ||||
-rw-r--r-- | jload.c | 2 | ||||
-rw-r--r-- | jsearch.c | 9 | ||||
-rw-r--r-- | jutils.h | 2 | ||||
-rw-r--r-- | libtoolkludge | 11 | ||||
-rwxr-xr-x | missing | 190 | ||||
-rwxr-xr-x | mkinstalldirs | 40 | ||||
-rw-r--r-- | plugin~-help.pd | 126 | ||||
-rw-r--r-- | plugin~.c | 1016 | ||||
-rw-r--r-- | plugin~.h | 133 | ||||
-rw-r--r-- | plugin~.pd | 64 | ||||
-rw-r--r-- | plugin~.txt | 144 | ||||
-rw-r--r-- | plugin~_ladspa.c | 759 | ||||
-rw-r--r-- | plugin~_ladspa.h | 109 | ||||
-rw-r--r-- | plugin~_vst.c | 501 | ||||
-rw-r--r-- | plugin~_vst.h | 96 | ||||
-rw-r--r-- | version.h | 28 | ||||
-rw-r--r-- | version.h.in | 28 | ||||
-rw-r--r-- | vstutils.c | 216 | ||||
-rw-r--r-- | vstutils.h | 48 |
37 files changed, 995 insertions, 8605 deletions
diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 84b42c5..0000000 --- a/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Jarno Seppänen <jams@cs.tut.fi> @@ -1,18 +0,0 @@ -LADSPA ------- -- Linium avez écrit: "The output of syndrum and organ is a curious uncontrallable - screaming noise that can resist a multipliy by 0. Some sort of bytes flow... - It seems that the audio output spits something which is not an audio signal and - even confuses PD." A bug in plugin~ or what? - -VST ---- -- plugin~ doesn't support VST 2.0 synthesizer plug-ins. -- Additionally, the VST 1.0 plug-ins are required to implement the - processReplacing() interface in order for them to work with plugin~. - You will get an error message if this is not the case. -- Furthermore, no graphics is displayed for the plug-ins; I am - helplessly waiting for someone to volunteer to add VST GUI support. -- Also, plugin~ should observe the Windows registry - (HKEY_LOCAL_MACHINE\Software\VST\VSTPluginsPath) for the VST plug-in - path. diff --git a/COPYING b/COPYING deleted file mode 100644 index 60549be..0000000 --- a/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. @@ -36,3 +36,26 @@ 2000-06-15 Jarno Seppänen <jams@cs.tut.fi> * Released initial release 0.1 +plugin~ NEWS --- history of changes. + +Overview of changes in version 0.2, released April 4 2001 +========================================================= +* control/parameter value setting by parameter number (starting with a + '#' character) in addition to using parameter name +* LADSPA: Implemented control value bounding +* Support for VST 1.0 (processReplacing()) plug-ins under Windows +* LADSPA bug fixes under Linux (huge thanks to Linium <intent@club-internet.fr> + for quality assurance, merci! :) + +Overview of changes in version 0.1, released June 15 2000 +========================================================= +* Initial release +* Control ports mapped to Pd asynchronous messages. Input controls + are changed on incoming messages and outgoing messages are sent on + changes in output control values. +* Audio ports mapped to Pd signal in/outlets +* Searching for plug-ins in all LADSPA libraries +* Resetting the plug-in's internal state on incoming "reset" messages +* Printing plug-in information on incoming "print" messages +* Supports out-of-place processing for plug-ins that need this +* Distributed under the GNU General Public License diff --git a/INSTALL b/INSTALL deleted file mode 100644 index a2c8722..0000000 --- a/INSTALL +++ /dev/null @@ -1,181 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. - diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 4b2fc04..0000000 --- a/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -## Process this file with automake to produce Makefile.in. -*-Makefile-*- - -SUFFIXES = .pd_linux - -pddir = @PDDIR@ - -SUBDIRS = ladspa vst win - -## Make and install the shared library. - -pdinstalldir = $(pddir)/extra/plugin~ - -# Automake won't accept something ending in ".pd_linux" as a library -pdinstall_PROGRAMS = plugin~.pd_linux - -plugin__pd_linux_SOURCES = \ - config.h \ - jload.c \ - jsearch.c \ - jutils.h \ - plugin~.c \ - plugin~.h \ - plugin~_ladspa.c \ - plugin~_ladspa.h \ - plugin~_vst.c \ - plugin~_vst.h \ - vstutils.c \ - vstutils.h - -pdincludedir = $(pddir)/src -INCLUDES = -I$(top_srcdir) -I$(pdincludedir) -CFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ - -Wall -W -Wshadow -Wstrict-prototypes -Werror \ - -Wno-unused -Wno-parentheses -Wno-switch -LDFLAGS = -export_dynamic -shared - -## Install the documentation. - -pdinstall_DATA = \ - AUTHORS \ - BUGS \ - COPYING \ - NEWS \ - README \ - TODO \ - plugin~.pd \ - plugin~.txt - -## My kludge -noinst_SCRIPTS = libtoolkludge - -## version.h is there for the Windows platform (no autoconf) -EXTRA_DIST = $(pdinstall_DATA) $(noinst_SCRIPTS) version.h diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 2cdf8a8..0000000 --- a/Makefile.in +++ /dev/null @@ -1,453 +0,0 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = . - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_alias = @host_alias@ -host_triplet = @host@ -AS = @AS@ -CC = @CC@ -DLLTOOL = @DLLTOOL@ -LD = @LD@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -NM = @NM@ -OBJDUMP = @OBJDUMP@ -PACKAGE = @PACKAGE@ -PDDIR = @PDDIR@ -RANLIB = @RANLIB@ -VERSION = @VERSION@ - -SUFFIXES = .pd_linux - -pddir = @PDDIR@ - -SUBDIRS = ladspa vst win - -pdinstalldir = $(pddir)/extra/plugin~ - -# Automake won't accept something ending in ".pd_linux" as a library -pdinstall_PROGRAMS = plugin~.pd_linux - -plugin__pd_linux_SOURCES = config.h jload.c jsearch.c jutils.h plugin~.c plugin~.h plugin~_ladspa.c plugin~_ladspa.h plugin~_vst.c plugin~_vst.h vstutils.c vstutils.h - - -pdincludedir = $(pddir)/src -INCLUDES = -I$(top_srcdir) -I$(pdincludedir) -CFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -Wall -W -Wshadow -Wstrict-prototypes -Werror -Wno-unused -Wno-parentheses -Wno-switch - -LDFLAGS = -export_dynamic -shared - -pdinstall_DATA = AUTHORS BUGS COPYING NEWS README TODO plugin~.pd plugin~.txt - - -noinst_SCRIPTS = libtoolkludge - -EXTRA_DIST = $(pdinstall_DATA) $(noinst_SCRIPTS) version.h -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = version.h -PROGRAMS = $(pdinstall_PROGRAMS) - - -DEFS = @DEFS@ -I. -I$(srcdir) -CPPFLAGS = @CPPFLAGS@ -LIBS = @LIBS@ -plugin__pd_linux_OBJECTS = jload.o jsearch.o plugin~.o plugin~_ladspa.o \ -plugin~_vst.o vstutils.o -plugin__pd_linux_LDADD = $(LDADD) -plugin__pd_linux_DEPENDENCIES = -plugin__pd_linux_LDFLAGS = -SCRIPTS = $(noinst_SCRIPTS) - -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -DATA = $(pdinstall_DATA) - -DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ -Makefile.in NEWS TODO aclocal.m4 config.guess config.sub configure \ -configure.in install-sh missing mkinstalldirs version.h.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -SOURCES = $(plugin__pd_linux_SOURCES) -OBJECTS = $(plugin__pd_linux_OBJECTS) - -all: all-redirect -.SUFFIXES: -.SUFFIXES: .S .c .o .pd_linux .s -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in - cd $(srcdir) && $(ACLOCAL) - -config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck -$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -version.h: $(top_builddir)/config.status version.h.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -mostlyclean-pdinstallPROGRAMS: - -clean-pdinstallPROGRAMS: - -test -z "$(pdinstall_PROGRAMS)" || rm -f $(pdinstall_PROGRAMS) - -distclean-pdinstallPROGRAMS: - -maintainer-clean-pdinstallPROGRAMS: - -install-pdinstallPROGRAMS: $(pdinstall_PROGRAMS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(pdinstalldir) - @list='$(pdinstall_PROGRAMS)'; for p in $$list; do \ - if test -f $$p; then \ - echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pdinstalldir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pdinstalldir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ - else :; fi; \ - done - -uninstall-pdinstallPROGRAMS: - @$(NORMAL_UNINSTALL) - list='$(pdinstall_PROGRAMS)'; for p in $$list; do \ - rm -f $(DESTDIR)$(pdinstalldir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ - done - -.c.o: - $(COMPILE) -c $< - -.s.o: - $(COMPILE) -c $< - -.S.o: - $(COMPILE) -c $< - -mostlyclean-compile: - -rm -f *.o core *.core - -clean-compile: - -distclean-compile: - -rm -f *.tab.c - -maintainer-clean-compile: - -plugin~.pd_linux: $(plugin__pd_linux_OBJECTS) $(plugin__pd_linux_DEPENDENCIES) - @rm -f plugin~.pd_linux - $(LINK) $(plugin__pd_linux_LDFLAGS) $(plugin__pd_linux_OBJECTS) $(plugin__pd_linux_LDADD) $(LIBS) - -install-pdinstallDATA: $(pdinstall_DATA) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(pdinstalldir) - @list='$(pdinstall_DATA)'; for p in $$list; do \ - if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pdinstalldir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pdinstalldir)/$$p; \ - else if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pdinstalldir)/$$p"; \ - $(INSTALL_DATA) $$p $(DESTDIR)$(pdinstalldir)/$$p; \ - fi; fi; \ - done - -uninstall-pdinstallDATA: - @$(NORMAL_UNINSTALL) - list='$(pdinstall_DATA)'; for p in $$list; do \ - rm -f $(DESTDIR)$(pdinstalldir)/$$p; \ - done - -# 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. - -@SET_MAKE@ - -all-recursive install-data-recursive install-exec-recursive \ -installdirs-recursive install-recursive uninstall-recursive \ -check-recursive installcheck-recursive info-recursive dvi-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; 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; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ - rev="$$subdir $$rev"; \ - test "$$subdir" = "." && dot_seen=yes; \ - done; \ - test "$$dot_seen" = "no" && rev=". $$rev"; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - -rm -rf $(distdir) - GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz - mkdir $(distdir)/=build - mkdir $(distdir)/=inst - dc_install_base=`cd $(distdir)/=inst && pwd`; \ - cd $(distdir)/=build \ - && ../configure --srcdir=.. --prefix=$$dc_install_base \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) dist - -rm -rf $(distdir) - @banner="$(distdir).tar.gz is ready for distribution"; \ - dashes=`echo "$$banner" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - echo "$$dashes" -dist: distdir - -chmod -R a+r $(distdir) - GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) - -rm -rf $(distdir) -dist-all: distdir - -chmod -R a+r $(distdir) - GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) - -rm -rf $(distdir) -distdir: $(DISTFILES) - -rm -rf $(distdir) - mkdir $(distdir) - -chmod 777 $(distdir) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done - for subdir in $(SUBDIRS); do \ - if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ - || exit 1; \ - chmod 777 $(distdir)/$$subdir; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ - || exit 1; \ - fi; \ - done - -info-am: -info: info-recursive -dvi-am: -dvi: dvi-recursive -check-am: all-am -check: check-recursive -installcheck-am: -installcheck: installcheck-recursive -install-exec-am: -install-exec: install-exec-recursive - -install-data-am: install-pdinstallPROGRAMS install-pdinstallDATA -install-data: install-data-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-recursive -uninstall-am: uninstall-pdinstallPROGRAMS uninstall-pdinstallDATA -uninstall: uninstall-recursive -all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) -all-redirect: all-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: installdirs-recursive -installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(pdinstalldir) $(DESTDIR)$(pdinstalldir) - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-pdinstallPROGRAMS mostlyclean-compile \ - mostlyclean-tags mostlyclean-generic - -mostlyclean: mostlyclean-recursive - -clean-am: clean-pdinstallPROGRAMS clean-compile clean-tags \ - clean-generic mostlyclean-am - -clean: clean-recursive - -distclean-am: distclean-pdinstallPROGRAMS distclean-compile \ - distclean-tags distclean-generic clean-am - -distclean: distclean-recursive - -rm -f config.status - -maintainer-clean-am: maintainer-clean-pdinstallPROGRAMS \ - maintainer-clean-compile maintainer-clean-tags \ - maintainer-clean-generic distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-recursive - -rm -f config.status - -.PHONY: mostlyclean-pdinstallPROGRAMS distclean-pdinstallPROGRAMS \ -clean-pdinstallPROGRAMS maintainer-clean-pdinstallPROGRAMS \ -uninstall-pdinstallPROGRAMS install-pdinstallPROGRAMS \ -mostlyclean-compile distclean-compile clean-compile \ -maintainer-clean-compile uninstall-pdinstallDATA install-pdinstallDATA \ -install-data-recursive uninstall-data-recursive install-exec-recursive \ -uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ -all-recursive check-recursive installcheck-recursive info-recursive \ -dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ -maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ -distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs-am \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -# 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: @@ -1,23 +0,0 @@ -plugin~ NEWS --- history of changes. - -Overview of changes in version 0.2, released April 4 2001 -========================================================= -* control/parameter value setting by parameter number (starting with a - '#' character) in addition to using parameter name -* LADSPA: Implemented control value bounding -* Support for VST 1.0 (processReplacing()) plug-ins under Windows -* LADSPA bug fixes under Linux (huge thanks to Linium <intent@club-internet.fr> - for quality assurance, merci! :) - -Overview of changes in version 0.1, released June 15 2000 -========================================================= -* Initial release -* Control ports mapped to Pd asynchronous messages. Input controls - are changed on incoming messages and outgoing messages are sent on - changes in output control values. -* Audio ports mapped to Pd signal in/outlets -* Searching for plug-ins in all LADSPA libraries -* Resetting the plug-in's internal state on incoming "reset" messages -* Printing plug-in information on incoming "print" messages -* Supports out-of-place processing for plug-ins that need this -* Distributed under the GNU General Public License @@ -1,137 +0,0 @@ -plugin~: LADSPA and VST plug-in hosting for Pd -============================================== - -This is a Pd [1] tilde object for hosting LADSPA [2] and VST [3] audio -plug-ins on Linux and Windows systems, respectively. The LADSPA -plug-in interface is supported completely on Linux, while the VST 1.0 -audio processing plug-in interface (without plug-in graphics) is -supported on Windows. - -This text corresponds to release 0.2 of plugin~ as of 4th April, 2001. -This release of plugin~ has been tested with Pd 0.32P1. - -plugin~ is distributed under the GNU General Public License. For more -information, please read the accompanying file "COPYING". - -Loading the plug-in -------------------- -The plug-ins are located using the environment variable LADSPA_PATH or -VST_PATH. You need to set the corresponding variable to specify the -directories where you have the plug-in files. For example, on Linux -(bash) you should use something like - - $ export LADSPA_PATH=/usr/local/lib/ladspa:$HOME/myplugins - -and on Windows something like - - C:\>set VST_PATH=C:\Program Files\Steinberg\Vstplugins;D:\myplugins - -Note that Linux and Windows use different delimiters within -paths and directories. - -LADSPA. You can load a LADSPA plug-in in two ways: (1) Create the -plug-in by label: "plugin~ lpf". Here, "lpf" is the label of the -plug-in that is to be searched for. All LADSPA plug-in libraries in -your LADSPA_PATH are searched; (2) Create a plug-in by label and -library name: "plugin~ lpf filter.so". Here, "lpf" is the label as -before, and "filter.so" is the name of the plug-in library, which -contains the plug-in. Only the selected LADSPA plug-in library is -searched. - -VST. There is always only one VST plug-in within one DLL and thus you -only need to create the plug-in by library name: "plugin~ northpole". -This will search through your VST_PATH for the plug-in library named -"northpole.dll". - -After loading the plug-in successfully, the number of inlets and -outlets of the corresponding plugin~ object should represent the -number of audio inputs and outputs to/from the plug-in (plus one inlet -and one outlet for control information, see below). - -In- and outlet functionality ----------------------------- -The audio inputs and outputs ports of LADSPA and VST plug-ins are -represented as separate signal inlets and outlets. The control input -and output ports (LADSPA) or the parameter inputs (VST), however, are -all represented together with one inlet and one outlet. - -The first inlet and the first outlet are for control input and output -messages, respectively. Control messages are messages, which start -with the text "control". Second should come the name of the -corresponding control port (called parameter in VST parlance), and -third the value. The first inlet accepts and the first outlet sends -this kinds of messages. Additionally, you can use port/parameter -number (like this: #1, #2, ...) instead of the name to send control -changes. You should note, however, that the port numbering is not -necessarily the same between different versions of a plug-in, so you -should use port/parameter names where possible. - -The first inlet and outlet are always there, even if the plug-in -doesn't have control ports. The rest of the in- and outlets are for -audio input and output signals, respectively. - -The first inlet accepts other messages in addition to "control". You -can investigate the plug-in inputs and outputs by sending a "print" -message to the first inlet. You can reset the plug-in internal state -(clear delay lines etc.) by sending a "reset" message. - -Loading the plugin~ object --------------------------- -In order to be able to use the plugin~ object with Pd, you need to -start Pd with the "-lib" command line parameter. On Linux, the -plugin~ object resides in a library called "plugin~.pd_linux", while -on Windows the library is called "winplugintilde.dll". Thus, you need -to say either "pd -lib plugin~" (on Linux) or "pd -lib winplugintilde" -(on Windows) to start Pd with the plugin~ object loaded. - -You probably need to give the "-path" parameter to Pd as well in order -to specify the exact location of the "plugin~.pd_linux" (on Linux) or -"winplugintilde.dll" (on Windows) library file. By default, the -library file is installed to the "extra/plugin~" directory under your -Pd installation directory. - -Compiling the plugin~ object ----------------------------- -Linux. All the necessary files for compilation under Linux are -included in the distribution. Just type "./configure" and "make all -install" and you should be done. The plugin~ object file will be -installed in your Pd directory tree, in "extra/plugin~". You may -specify the path to your Pd directory with the "--with-pddir" argument -to configure, eg. like this: "./configure --with-pddir=/usr/local/pd". - -Windows. The winplugintilde.dll library is included in the plugin~ -distribution, in the directory "win", so it is not necessary to -compile plugin~. Anyhow, in order to compile plugin~ for VST plug-ins -yourself, you need to download the VST SDK from Steinberg and agree to -the Steinberg SDK license. The SDK and the license are available from -http://www.steinberg.net/developers/VST2SDKAbout.html. After -downloading you need to copy the files from the SDK subdirectory -"source/common" to the "vst" subdirectory of the plugin~ distribution. -You can then compile plugin~ using the ready-made project and -workspace files for Microsoft Visual C 6.0, found in the "win" -subdirectory. You will need to modify the MSVC project settings by -hand to point to your Pd directory. - -Remaining problems ------------------- -There is a problem with Pd which makes it really hard to send -"control" messages to parameters with a space character in the -parameter name such as "filter freq" or "filter q". When you send a -`control "filter freq" 440' message, Pd will (incorrectly) not handle -"filter freq" as one symbol. You can currently circumvent this by -addressing problematic control parameters by number instead of name. - -VST. No graphics is displayed for the plug-ins; I am helplessly -waiting for someone to volunteer to add VST GUI support. - -Information about other known problems is given in the BUGS file. - -For more information, see: --------------------------- -[1] Pd: http://iem.kug.ac.at/pd/ -[2] LADSPA: http://www.ladspa.org/ -[3] VST: http://www.steinberg.net/ - -All trademarks are acknowledged. - -Jarno Seppänen, jams@cs.tut.fi diff --git a/SConstruct b/SConstruct new file mode 100644 index 0000000..3d3b08d --- /dev/null +++ b/SConstruct @@ -0,0 +1,11 @@ +import glob +import os +import re +prefix = "/usr/local/lib/pd" + +env = Environment(CPPPATH = Split(prefix + '/src /usr/include /usr/local/include . ../../pd/src ../../src src'), CPPDEFINES=['PD','UNIX'], SHLIBPREFIX = '', SHLIBSUFFIX = '.pd_linux', CCFLAGS = '-pipe -O2 -fPIC') + +external = env.SharedLibrary('plugin~',glob.glob('*.c')) +env.Alias('install', env.Install(os.path.join(prefix, 'extra'), external)) +env.Alias('install', env.Install(os.path.join(prefix, 'doc/5.reference'),'plugin~-help.pd')) +Default(external) @@ -1,6 +0,0 @@ -* VST: add support for graphics -* VST: add support for plug-ins without processReplacing() - (will require out-of-place buffers just like in plugin~_ladspa.c) -* VST: add support for VST2 synthesizers -* make is possible to use both LADSPA and VST plug-ins in a single Pd - patch (i.e. act as either LADSPA or VST host "on demand") diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index d3889f1..0000000 --- a/aclocal.m4 +++ /dev/null @@ -1,543 +0,0 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4 - -dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without -dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A -dnl PARTICULAR PURPOSE. - -# Do all the work for Automake. This macro actually does too much -- -# some checks are only needed if your package does certain things. -# But this isn't really a big deal. - -# serial 1 - -dnl Usage: -dnl AM_INIT_AUTOMAKE(package,version, [no-define]) - -AC_DEFUN(AM_INIT_AUTOMAKE, -[AC_REQUIRE([AC_PROG_INSTALL]) -PACKAGE=[$1] -AC_SUBST(PACKAGE) -VERSION=[$2] -AC_SUBST(VERSION) -dnl test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi -ifelse([$3],, -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) -AC_REQUIRE([AM_SANITY_CHECK]) -AC_REQUIRE([AC_ARG_PROGRAM]) -dnl FIXME This is truly gross. -missing_dir=`cd $ac_aux_dir && pwd` -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) -AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -AC_REQUIRE([AC_PROG_MAKE_SET])]) - -# -# Check to make sure that the build environment is sane. -# - -AC_DEFUN(AM_SANITY_CHECK, -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftestfile -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "[$]*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftestfile` - fi - if test "[$]*" != "X $srcdir/configure conftestfile" \ - && test "[$]*" != "X conftestfile $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "[$]2" = conftestfile - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -rm -f conftest* -AC_MSG_RESULT(yes)]) - -dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) -dnl The program must properly implement --version. -AC_DEFUN(AM_MISSING_PROG, -[AC_MSG_CHECKING(for working $2) -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if ($2 --version) < /dev/null > /dev/null 2>&1; then - $1=$2 - AC_MSG_RESULT(found) -else - $1="$3/missing $2" - AC_MSG_RESULT(missing) -fi -AC_SUBST($1)]) - -# Add --enable-maintainer-mode option to configure. -# From Jim Meyering - -# serial 1 - -AC_DEFUN(AM_MAINTAINER_MODE, -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) - AC_MSG_RESULT($USE_MAINTAINER_MODE) - AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST(MAINT)dnl -] -) - -# Define a conditional. - -AC_DEFUN(AM_CONDITIONAL, -[AC_SUBST($1_TRUE) -AC_SUBST($1_FALSE) -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi]) - - -# serial 40 AC_PROG_LIBTOOL -AC_DEFUN(AC_PROG_LIBTOOL, -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - -# Save cache, so that ltconfig can load it -AC_CACHE_SAVE - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ -|| AC_MSG_ERROR([libtool configure failed]) - -# Reload cache, that may have been modified by ltconfig -AC_CACHE_LOAD - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -AC_DEFUN(AC_LIBTOOL_SETUP, -[AC_PREREQ(2.13)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_RANLIB])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_NM])dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -dnl - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], -[libtool_flags="$libtool_flags --enable-dlopen"]) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[libtool_flags="$libtool_flags --enable-win32-dll"]) -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$host" in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - 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" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) - 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 - ;; - -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -]) -esac -]) - -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -# AC_ENABLE_SHARED - implement the --enable-shared flag -# Usage: AC_ENABLE_SHARED[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_SHARED, [dnl -define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(shared, -changequote(<<, >>)dnl -<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -changequote([, ])dnl -[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. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -]) - -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no)]) - -# AC_ENABLE_STATIC - implement the --enable-static flag -# Usage: AC_ENABLE_STATIC[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_STATIC, [dnl -define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(static, -changequote(<<, >>)dnl -<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -changequote([, ])dnl -[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. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -]) - -# AC_DISABLE_STATIC - set the default static flag to --disable-static -AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no)]) - - -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl -define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(fast-install, -changequote(<<, >>)dnl -<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -changequote([, ])dnl -[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. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -]) - -# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install -AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no)]) - -# AC_PROG_LD - find the path to the GNU or non-GNU linker -AC_DEFUN(AC_PROG_LD, -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. -changequote(,)dnl - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -changequote([,])dnl - # Canonicalize the path 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 - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(ac_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$ac_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_SUBST(LD) -AC_PROG_LD_GNU -]) - -AC_DEFUN(AC_PROG_LD_GNU, -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi]) -]) - -# AC_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN(AC_PROG_NM, -[AC_MSG_CHECKING([for BSD-compatible nm]) -AC_CACHE_VAL(ac_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/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 - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi]) -NM="$ac_cv_path_NM" -AC_MSG_RESULT([$NM]) -AC_SUBST(NM) -]) - -# AC_CHECK_LIBM - check for math library -AC_DEFUN(AC_CHECK_LIBM, -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case "$host" in -*-*-beos* | *-*-cygwin*) - # These system don't have libm - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, main, LIBM="-lm") - ;; -esac -]) - -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl convenience library, adds --enable-ltdl-convenience to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case "$enable_ltdl_convenience" in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) -]) - -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl installable library, and adds --enable-ltdl-install to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - INCLTDL= - fi -]) - -dnl old names -AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl -AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl -AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl -AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl -AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl -AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl -AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - -dnl This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL])dnl - diff --git a/config.guess b/config.guess deleted file mode 100755 index 4e5345f..0000000 --- a/config.guess +++ /dev/null @@ -1,973 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. -# -# 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 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# 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. - -# Written by Per Bothner <bothner@cygnus.com>. -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <<EOF >$dummy.s - .globl main - .ent main -main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - ${CC-cc} $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 - exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >$dummy.c - int main (argc, argv) int argc; char **argv; { - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - ${CC-cc} $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >$dummy.c - #include <sys/systemcfg.h> - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - ${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:4) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=4.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 ) - sed 's/^ //' << EOF >$dummy.c - #include <stdlib.h> - #include <unistd.h> - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (${CC-cc} $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - rm -f $dummy.c $dummy - esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >$dummy.c - #include <unistd.h> - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - ${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i?86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY*T3E:*:*:*) - echo t3e-cray-unicosmk${UNAME_RELEASE} - exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - i?86:BSD/386:*:* | i?86:BSD/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac - - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. - ld_help_string=`ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d - s/[ ][ ]*/ /g - s/.*supported emulations: *// - s/ .*// - p'` - case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; - esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <<EOF >$dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - ${CC-cc} $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers $dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >$dummy.c <<EOF -main(argc, argv) - int argc; - char *argv[]; -{ -#ifdef __MIPSEB__ - printf ("%s-unknown-linux-gnu\n", argv[1]); -#endif -#ifdef __MIPSEL__ - printf ("%sel-unknown-linux-gnu\n", argv[1]); -#endif - return 0; -} -EOF - ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >$dummy.c <<EOF -#include <features.h> -main(argc, argv) - int argc; - char *argv[]; -{ -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF - ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) - echo i386-sequent-sysv4 - exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i?86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-pc-isc$UNAME_REL - elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - i?86:UnixWare:*:*) - if /bin/uname -X 2>/dev/null >/dev/null ; then - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - fi - echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} - exit 0 ;; - pc:*:*:*) - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i?86:LynxOS:2.*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes <hewes@openmarket.com>. - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:*:6*) - echo mips-sony-newsos6 - exit 0 ;; - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -#echo '(Unable to guess system type)' 1>&2 - -exit 1 diff --git a/config.h b/config.h deleted file mode 100644 index ce61028..0000000 --- a/config.h +++ /dev/null @@ -1,60 +0,0 @@ -/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins - Copyright (C) 2000 Jarno Seppänen - $Id: config.h,v 1.1 2002-11-19 09:51:40 ggeiger Exp $ - - This file is part of plugin~. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef __CONFIG_H__ -#define __CONFIG_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* plug-in architecture config */ -#ifdef __linux__ /* FIXME? */ -#define PLUGIN_TILDE_USE_LADSPA 1 -#else -#define PLUGIN_TILDE_USE_LADSPA 0 -#endif -#ifdef WIN32 -#define PLUGIN_TILDE_USE_VST 1 -#else -#define PLUGIN_TILDE_USE_VST 0 -#endif - - /* make sure something was selected */ -#if (PLUGIN_TILDE_USE_LADSPA == 0) && (PLUGIN_TILDE_USE_VST == 0) -#error Either PLUGIN_TILDE_USE_LADSPA or PLUGIN_TILDE_USE_VST must be positive -#endif - -/* print debug information */ -#define PLUGIN_TILDE_DEBUG 0 - -/* print "useful" information */ -#define PLUGIN_TILDE_VERBOSE 0 - -/* force out-of-place processing */ -#define PLUGIN_TILDE_FORCE_OUTOFPLACE 0 - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __CONFIG_H__ */ -/* EOF */ diff --git a/config.sub b/config.sub deleted file mode 100755 index da8b7ae..0000000 --- a/config.sub +++ /dev/null @@ -1,956 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# 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 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# 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. - -# 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. - -# 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. - -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi - -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; -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 - linux-gnu*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - 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) - os= - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -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/'` - ;; - -sco*) - os=-sco3.2v2 - 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*) - 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 - ;; -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. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) - basic_machine=$basic_machine-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[34567]86) - 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. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-cbm - ;; - amigaos | amigados) - basic_machine=m68k-cbm - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-cbm - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - 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 | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [ctj]90-cray) - basic_machine=c90-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - 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 - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-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 - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - os=-mvs - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i[34567]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i[34567]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i[34567]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - miniframe) - basic_machine=m68000-convergent - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - 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 - ;; - 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 - ;; - np1) - basic_machine=np1-gould - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | nexen) - basic_machine=i586-pc - ;; - pentiumpro | p6 | k6 | 6x86) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | nexen-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | k6-* | 6x86-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=rs6000-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) 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/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - 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 - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - 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 - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - 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. - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sparc) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - *) - 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. - -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* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \ - | -openstep*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -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|'` - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -xenix) - os=-xenix - ;; - -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 - *-acorn) - os=-riscix1.2 - ;; - arm*-semi) - os=-aout - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-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 - ;; - f301-fujitsu) - os=-uxpv - ;; - *) - 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 - ;; - -aix*) - vendor=ibm - ;; - -hpux*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os diff --git a/configure b/configure deleted file mode 100755 index fa510c8..0000000 --- a/configure +++ /dev/null @@ -1,2001 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer" -ac_help="$ac_help - --with-pddir=... enter absolute path to Pd (PREFIX/pd by default)" -ac_help="$ac_help - --with-gnu-ld assume the C compiler uses GNU ld [default=no]" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -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 ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$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" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$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) - # 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 << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --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 -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$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" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - 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) - 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" ;; - - -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 ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=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" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=plugin~.c - -# 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 its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - 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 - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - -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 - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -# 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 -# 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" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:563: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/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 - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -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. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&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_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:616: checking whether build environment is sane" >&5 -# Just in case -sleep 1 -echo timestamp > conftestfile -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftestfile` - fi - if test "$*" != "X $srcdir/configure conftestfile" \ - && test "$*" != "X conftestfile $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". - { echo "configure: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" 1>&2; exit 1; } - fi - - test "$2" = conftestfile - ) -then - # Ok. - : -else - { echo "configure: error: newly created file is older than distributed files! -Check your system clock" 1>&2; exit 1; } -fi -rm -f conftest* -echo "$ac_t""yes" 1>&6 -if test "$program_transform_name" = s,x,x,; then - program_transform_name= -else - # Double any \ or $. echo might interpret backslashes. - cat <<\EOF_SED > conftestsed -s,\\,\\\\,g; s,\$,$$,g -EOF_SED - program_transform_name="`echo $program_transform_name|sed -f conftestsed`" - rm -f conftestsed -fi -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" - -# sed with no file args requires a program. -test "$program_transform_name" = "" && program_transform_name="s,x,x," - -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:673: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - -PACKAGE=plugin~ - -VERSION=0.2 - -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then - { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } -fi -cat >> confdefs.h <<EOF -#define PACKAGE "$PACKAGE" -EOF - -cat >> confdefs.h <<EOF -#define VERSION "$VERSION" -EOF - - - -missing_dir=`cd $ac_aux_dir && pwd` -echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:719: checking for working aclocal" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (aclocal --version) < /dev/null > /dev/null 2>&1; then - ACLOCAL=aclocal - echo "$ac_t""found" 1>&6 -else - ACLOCAL="$missing_dir/missing aclocal" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:732: checking for working autoconf" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (autoconf --version) < /dev/null > /dev/null 2>&1; then - AUTOCONF=autoconf - echo "$ac_t""found" 1>&6 -else - AUTOCONF="$missing_dir/missing autoconf" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:745: checking for working automake" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (automake --version) < /dev/null > /dev/null 2>&1; then - AUTOMAKE=automake - echo "$ac_t""found" 1>&6 -else - AUTOMAKE="$missing_dir/missing automake" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:758: checking for working autoheader" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (autoheader --version) < /dev/null > /dev/null 2>&1; then - AUTOHEADER=autoheader - echo "$ac_t""found" 1>&6 -else - AUTOHEADER="$missing_dir/missing autoheader" - echo "$ac_t""missing" 1>&6 -fi - -echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:771: checking for working makeinfo" >&5 -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if (makeinfo --version) < /dev/null > /dev/null 2>&1; then - MAKEINFO=makeinfo - echo "$ac_t""found" 1>&6 -else - MAKEINFO="$missing_dir/missing makeinfo" - echo "$ac_t""missing" 1>&6 -fi - - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:791: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:812: checking whether to enable maintainer-specific portions of Makefiles" >&5 - # Check whether --enable-maintainer-mode or --disable-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 - - echo "$ac_t""$USE_MAINTAINER_MODE" 1>&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 - - - -# I don't use libtool. This is only a hack because automake wants -# libtool, and only for installation... Works for automake 1.4, BTW. -LIBTOOL="\$(SHELL) \$(top_builddir)/libtoolkludge" - - -if test "x$prefix" = xNONE; then -echo $ac_n "checking for prefix by $ac_c" 1>&6 -# Extract the first word of "pd", so it can be a program name with args. -set dummy pd; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:845: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$PD" in - /*) - ac_cv_path_PD="$PD" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_PD="$PD" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PD="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -PD="$ac_cv_path_PD" -if test -n "$PD"; then - echo "$ac_t""$PD" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -n "$ac_cv_path_PD"; then - prefix=`echo $ac_cv_path_PD|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` - fi -fi - -PDDIR=$prefix/pd -# Check whether --with-pddir or --without-pddir was given. -if test "${with_pddir+set}" = set; then - withval="$with_pddir" - if expr x"$withval" : "x/" >/dev/null; then - PDDIR=$withval - echo "$ac_t""Installing Pd files in $PDDIR." 1>&6 - else - { echo "configure: error: Illegal value given to --with-pddir. Give an absolute path." 1>&2; exit 1; } - fi - -fi - - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:900: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -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 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:930: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_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 $# -gt 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 - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:981: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1013: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 1024 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1055: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1060: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <<EOF -#ifdef __GNUC__ - yes; -#endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1088: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&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 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1120: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -# Check whether --with-gnu-ld or --without-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 "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1149: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path 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 - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1173: checking for GNU ld" >&5 -else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1176: checking for non-GNU ld" >&5 -fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$ac_cv_path_LD" -if test -n "$LD"; then - echo "$ac_t""$LD" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - -echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1212: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 - - -# 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 -# 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" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1239: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/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 - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -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. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&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_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -echo $ac_n "checking for printf in -lc""... $ac_c" 1>&6 -echo "configure:1293: checking for printf in -lc" >&5 -ac_lib_var=`echo c'_'printf | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lc $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1301 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char printf(); - -int main() { -printf() -; return 0; } -EOF -if { (eval echo configure:1312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo c | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lc $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:1340: checking for sin in -lm" >&5 -ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lm $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1348 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char sin(); - -int main() { -sin() -; return 0; } -EOF -if { (eval echo configure:1359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lm $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1387: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1395 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen(); - -int main() { -dlopen() -; return 0; } -EOF -if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-ldl $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1435: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext <<EOF -#line 1450 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext <<EOF -#line 1467 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext <<EOF -#line 1484 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1515: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1520 "configure" -#include "confdefs.h" -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext <<EOF -#line 1545 "configure" -#include "confdefs.h" -#include <string.h> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - 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 > conftest.$ac_ext <<EOF -#line 1563 "configure" -#include "confdefs.h" -#include <stdlib.h> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - 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 > conftest.$ac_ext <<EOF -#line 1584 "configure" -#include "confdefs.h" -#include <ctype.h> -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#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)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -for ac_hdr in dirent.h dlfcn.h string.h sys/types.h unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1622: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1627 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - - -for ac_func in dlopen -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1663: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1668 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* 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_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - -trap '' 1 2 15 -cat > confcache <<\EOF -# 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. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# 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. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <<EOF -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile version.h ladspa/Makefile vst/Makefile win/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS <<EOF - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@PACKAGE@%$PACKAGE%g -s%@VERSION@%$VERSION%g -s%@ACLOCAL@%$ACLOCAL%g -s%@AUTOCONF@%$AUTOCONF%g -s%@AUTOMAKE@%$AUTOMAKE%g -s%@AUTOHEADER@%$AUTOHEADER%g -s%@MAKEINFO@%$MAKEINFO%g -s%@SET_MAKE@%$SET_MAKE%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g -s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g -s%@MAINT@%$MAINT%g -s%@LIBTOOL@%$LIBTOOL%g -s%@PD@%$PD%g -s%@PDDIR@%$PDDIR%g -s%@CC@%$CC%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@LD@%$LD%g -s%@CPP@%$CPP%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <<EOF - -CONFIG_FILES=\${CONFIG_FILES-"Makefile version.h ladspa/Makefile vst/Makefile win/Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <<EOF - -EOF -cat >> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - diff --git a/configure.in b/configure.in deleted file mode 100644 index aa359bb..0000000 --- a/configure.in +++ /dev/null @@ -1,48 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -dnl Initialize autoconf and automake. Version number here! -AC_INIT(plugin~.c) -AM_INIT_AUTOMAKE(plugin~, 0.2) -AC_CANONICAL_HOST -AM_MAINTAINER_MODE - -# I don't use libtool. This is only a hack because automake wants -# libtool, and only for installation... Works for automake 1.4, BTW. -LIBTOOL="\$(SHELL) \$(top_builddir)/libtoolkludge" -AC_SUBST(LIBTOOL) - -dnl Look for Pd. -AC_PREFIX_PROGRAM(pd) -PDDIR=$prefix/pd -AC_ARG_WITH(pddir, -[ --with-pddir=... enter absolute path to Pd (PREFIX/pd by default)], - [if expr x"$withval" : "x/" >/dev/null; then - PDDIR=$withval - AC_MSG_RESULT(Installing Pd files in $PDDIR.) - else - AC_MSG_ERROR(Illegal value given to --with-pddir. Give an absolute path.) - fi] -) -AC_SUBST(PDDIR) - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_LD -AC_PROG_INSTALL - -dnl Checks for libraries. -AC_CHECK_LIB(c, printf) -AC_CHECK_LIB(m, sin) -AC_CHECK_LIB(dl, dlopen) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(dirent.h dlfcn.h string.h sys/types.h unistd.h) - -dnl Checks for typedefs, structures, and compiler characteristics. - -dnl Checks for library functions. -AC_CHECK_FUNCS(dlopen) - -dnl Output the makefile and version information file. -AC_OUTPUT(Makefile version.h ladspa/Makefile vst/Makefile win/Makefile) diff --git a/install-sh b/install-sh deleted file mode 100755 index e9de238..0000000 --- a/install-sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# 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 $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 @@ -14,7 +14,7 @@ /*****************************************************************************/ -#include "ladspa/ladspa.h" +#include "ladspa.h" #include "jutils.h" /*****************************************************************************/ @@ -17,7 +17,7 @@ /*****************************************************************************/ -#include "ladspa/ladspa.h" +#include "ladspa.h" #include "jutils.h" /*****************************************************************************/ @@ -103,10 +103,8 @@ LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction, pcLADSPAPath = getenv("LADSPA_PATH"); if (!pcLADSPAPath) { - fprintf(stderr, - "Warning: You do not have a LADSPA_PATH " - "environment variable set.\n"); - return; + fprintf(stderr, "Warning: no LADSPA_PATH, assuming /usr/lib/ladspa:/usr/local/lib/ladspa\n"); + pcLADSPAPath = "/usr/lib/ladspa:/usr/local/lib/ladspa"; } pcStart = pcLADSPAPath; @@ -128,6 +126,7 @@ LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction, } } + /*****************************************************************************/ /* EOF */ @@ -10,7 +10,7 @@ /*****************************************************************************/ -#include "ladspa/ladspa.h" +#include "ladspa.h" /*****************************************************************************/ diff --git a/libtoolkludge b/libtoolkludge deleted file mode 100644 index bf62a81..0000000 --- a/libtoolkludge +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh - -if test \( $# -gt 1 \) -a \( $1 = "--mode=install" \); then - shift; - echo " libtoolkludge running \"$*\"" - $* - exit 0 -else - echo "Libtoolkludge is a kludge for libtool --mode=install only. Die!" >&2 - exit 1 -fi diff --git a/missing b/missing deleted file mode 100755 index 7789652..0000000 --- a/missing +++ /dev/null @@ -1,190 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100755 index c065882..0000000 --- a/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman <friedman@prep.ai.mit.edu> -# Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs,v 1.1 2002-11-19 09:51:40 ggeiger Exp $ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/plugin~-help.pd b/plugin~-help.pd new file mode 100644 index 0000000..4723849 --- /dev/null +++ b/plugin~-help.pd @@ -0,0 +1,126 @@ +#N canvas 146 82 1105 734 12; +#X floatatom 415 488 0 0 555 0 - - -; +#X msg 414 467 440; +#X obj 359 483 loadbang; +#X msg 416 508 control freq \$1; +#X msg 318 507 control amp \$1; +#X msg 316 464 0.7; +#X floatatom 316 487 0 0 1 0 - - -; +#X msg 67 351 control gain \$1; +#X floatatom 67 326 0 0 1 0 - - -; +#X msg 66 300 0.7; +#X obj 378 534 plugin~ sine_fcac; +#X obj 217 365 adc~; +#X obj 200 436 dac~; +#X obj 66 269 loadbang; +#N canvas 0 0 450 300 graph1 0; +#X array array1 100 float 0; +#X coords 0 1 100 -1 200 140 1; +#X restore 84 465 graph; +#X obj 377 558 tabwrite~ array1; +#X obj 314 578 metro 500; +#X msg 312 557 1; +#X obj 313 534 loadbang; +#X msg 14 310 reset; +#X msg 20 258 info; +#X msg 21 234 listplugins; +#X obj 544 105 route id name label maker; +#X obj 543 103 widget q q1 -bg black -fg "#ff0045" -height 42 -width +5; +#X obj 574 103 widget q q1 -bg black -fg white -height 42 -width 23 +; +#X obj 715 702 print; +#X obj 599 622 route scroll; +#X msg 600 645 scroll \$1; +#X obj 578 106 prepend add; +#X obj 713 103 widget q q1 -bg black -fg orange -height 42 -width 16 +; +#X obj 723 642 route scroll; +#X msg 722 667 scroll \$1; +#X obj 547 644 route scroll; +#X msg 547 667 scroll \$1; +#X obj 842 629 route scroll; +#X msg 840 652 scroll \$1; +#X obj 810 103 widget q q1 -bg black -fg cyan -height 42 -width 49 +; +#X obj 546 106 prepend add; +#X obj 716 107 prepend add; +#X obj 814 109 prepend add; +#X obj 96 389 plugin~ tap_equalizer; +#X obj 165 87 widget q q1 -width 24 -bg gray -fg purple -height 18 +; +#X obj 234 47 unpack s f f; +#X obj 46 7 route port; +#X obj 69 32 route in; +#X obj 129 24 route control; +#X obj 197 50 a2l; +#X msg 364 66 add \$1; +#X msg 316 66 add \$1; +#X obj 311 87 widget q q1 -width 8 -bg gray -fg purple -height 18; +#X obj 361 87 widget q q1 -width 8 -bg gray -fg purple -height 18; +#X msg 120 224 clear; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 2 0 5 0; +#X connect 3 0 10 0; +#X connect 4 0 10 0; +#X connect 5 0 6 0; +#X connect 6 0 4 0; +#X connect 7 0 40 0; +#X connect 8 0 7 0; +#X connect 9 0 8 0; +#X connect 10 1 15 0; +#X connect 11 0 40 1; +#X connect 13 0 9 0; +#X connect 16 0 15 0; +#X connect 17 0 16 0; +#X connect 18 0 17 0; +#X connect 19 0 40 0; +#X connect 20 0 51 0; +#X connect 20 0 40 0; +#X connect 21 0 40 0; +#X connect 22 0 37 0; +#X connect 22 1 28 0; +#X connect 22 2 38 0; +#X connect 22 3 39 0; +#X connect 23 0 32 0; +#X connect 24 0 26 0; +#X connect 26 0 27 0; +#X connect 27 0 23 0; +#X connect 27 0 29 0; +#X connect 27 0 36 0; +#X connect 28 0 24 0; +#X connect 29 0 30 0; +#X connect 29 0 25 0; +#X connect 30 0 31 0; +#X connect 31 0 23 0; +#X connect 31 0 24 0; +#X connect 31 0 36 0; +#X connect 32 0 33 0; +#X connect 33 0 24 0; +#X connect 33 0 29 0; +#X connect 33 0 36 0; +#X connect 34 0 35 0; +#X connect 35 0 23 0; +#X connect 35 0 24 0; +#X connect 35 0 29 0; +#X connect 36 0 34 0; +#X connect 37 0 23 0; +#X connect 38 0 29 0; +#X connect 39 0 36 0; +#X connect 40 0 22 0; +#X connect 40 0 43 0; +#X connect 40 1 12 0; +#X connect 42 0 41 0; +#X connect 42 1 48 0; +#X connect 42 2 47 0; +#X connect 43 0 44 0; +#X connect 44 0 45 0; +#X connect 45 0 46 0; +#X connect 46 0 42 0; +#X connect 47 0 50 0; +#X connect 48 0 49 0; +#X connect 51 0 49 0; +#X connect 51 0 41 0; +#X connect 51 0 50 0; @@ -1,6 +1,7 @@ /* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins Copyright (C) 2000 Jarno Seppänen - $Id: plugin~.c,v 1.2 2003-01-23 12:32:04 ggeiger Exp $ + remIXed 2005 Carmen Rocco + $Id: plugin~.c,v 1.3 2005-04-29 00:43:36 ix9 Exp $ This file is part of plugin~. @@ -18,29 +19,21 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "config.h" - #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "plugin~.h" -#include "plugin~_ladspa.h" -#include "plugin~_vst.h" -#include "version.h" +#include "jutils.h" -#if PLUGIN_TILDE_USE_LADSPA -#define PLUGIN_TILDE_BRAND "LADSPA" -#endif -#if PLUGIN_TILDE_USE_VST -#define PLUGIN_TILDE_BRAND "VST" +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) #endif static t_class* plugin_tilde_class = NULL; -void -plugin_tilde_setup (void) +void plugin_tilde_setup (void) { /* Make a new Pd class with 2 string creation parameters */ plugin_tilde_class = class_new (gensym ("plugin~"), @@ -53,48 +46,20 @@ plugin_tilde_setup (void) /* Let's be explicit in not converting the signals in any way */ assert (sizeof (float) == sizeof (t_float)); -#if PLUGIN_TILDE_USE_LADSPA + assert (sizeof (float) == sizeof (LADSPA_Data)); -#endif - /* Set the callback for DSP events; this is a standard Pd message */ - class_addmethod (plugin_tilde_class, - (t_method)plugin_tilde_dsp, - gensym ("dsp"), - 0); - - /* Set the callback for "control" messages in the first inlet; - this is a message of our own for changing LADSPA control - ports/VST parameters */ - class_addmethod (plugin_tilde_class, - (t_method)plugin_tilde_control, - gensym ("control"), - A_DEFSYM, A_DEFFLOAT, 0); - - /* Register a callback for "print" messages in the first inlet; - this is a message for printing information on the plug-in */ - class_addmethod (plugin_tilde_class, - (t_method)plugin_tilde_print, - gensym ("print"), - 0); - - /* Register a callback for "reset" messages in the first inlet; - this is a message for resetting plug-in state */ - class_addmethod (plugin_tilde_class, - (t_method)plugin_tilde_reset, - gensym ("reset"), - 0); - - /* We have to make a "null" callback for signal input to the first - inlet or otherwise Pd'll gracefully fuck the inlets up */ - class_addmethod (plugin_tilde_class, - nullfn, - gensym ("signal"), - 0); -} - -static void* -plugin_tilde_new (t_symbol* s_name, t_symbol* s_lib_name) + class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_dsp,gensym ("dsp"),0); + class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_control,gensym ("control"),A_DEFSYM, A_DEFFLOAT, 0); + class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_info,gensym ("info"),0); + class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_list,gensym ("listplugins"),0); + class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_plug,gensym ("plug"),0); + class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_bypass,gensym ("bypass"),0); + class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_reset,gensym ("reset"),0); + class_addmethod (plugin_tilde_class,nullfn,gensym ("signal"),0); +} + +static void* plugin_tilde_new (t_symbol* s_name, t_symbol* s_lib_name) { Pd_Plugin_Tilde* x = NULL; unsigned i = 0; @@ -106,9 +71,9 @@ plugin_tilde_new (t_symbol* s_name, t_symbol* s_lib_name) /* Initialize object struct */ x->plugin_library = NULL; x->plugin_library_filename = NULL; - x->num_audio_inputs = 0; - x->num_audio_outputs = 0; - x->num_control_inputs = 0; + x->num_audio_inputs = 2; + x->num_audio_outputs = 2; + x->num_control_inputs = 1; x->num_control_outputs = 0; x->audio_inlets = NULL; x->audio_outlets = NULL; @@ -116,60 +81,34 @@ plugin_tilde_new (t_symbol* s_name, t_symbol* s_lib_name) x->dsp_vec = NULL; x->dsp_vec_length = 0; - /* Check creation arguments */ - assert (s_name != NULL); - if (s_name->s_name == NULL || strlen (s_name->s_name) == 0) { - error ("plugin~: No " PLUGIN_TILDE_BRAND " plugin selected"); - goto PLUGIN_TILDE_NEW_RETURN_NULL; - } - - /* Construct the clock */ - x->x_clock = clock_new (x, (t_method)plugin_tilde_tick); - assert (x->x_clock != NULL); - -#if PLUGIN_TILDE_USE_LADSPA - assert (s_lib_name != NULL); - if (s_lib_name->s_name == NULL || strlen (s_lib_name->s_name) == 0) { + if (s_lib_name != NULL) { + if (s_lib_name->s_name == NULL || strlen (s_lib_name->s_name) == 0) { /* Search for the plugin library */ x->plugin_library_filename = plugin_tilde_search_plugin (x, s_name->s_name); if (x->plugin_library_filename == NULL) { - error ("plugin~: " PLUGIN_TILDE_BRAND " plugin not found in any library"); - goto PLUGIN_TILDE_NEW_RETURN_NULL; + post("plugin~: plugin not found in any library"); + goto PLUGIN_TILDE_NEW_RETURN_NULL; } - } - else { + } + else { /* Search in the given plugin library */ x->plugin_library_filename = strdup (s_lib_name->s_name); - } -#endif /* PLUGIN_TILDE_USE_LADSPA */ -#if PLUGIN_TILDE_USE_VST - if (s_lib_name->s_name != NULL - && strlen (s_lib_name->s_name) > 0) { - error ("plugin~: warning: superfluous creation argument \"%s\"", - s_lib_name->s_name); - } - /* Remember plugin library filename */ - x->plugin_library_filename = strdup (s_name->s_name); -#endif /* PLUGIN_TILDE_USE_VST */ - - /* Load LADSPA/VST plugin */ - if (plugin_tilde_open_plugin (x, - s_name->s_name, - x->plugin_library_filename, - (unsigned long)sys_getsr ())) { - error ("plugin~: Unable to open " PLUGIN_TILDE_BRAND " plugin"); + } + /* Load LADSPA/VST plugin */ + if (plugin_tilde_open_plugin (x, + s_name->s_name, + x->plugin_library_filename, + (unsigned long)sys_getsr ())) { + post("plugin~: Unable to open plugin"); goto PLUGIN_TILDE_NEW_RETURN_NULL; + } } - /* Start the clock (used for plug-in GUI update) */ - plugin_tilde_tick (x); - /* Create in- and outlet(s) */ /* Allocate memory for in- and outlet pointers */ x->audio_inlets = (t_inlet**)calloc (x->num_audio_inputs, sizeof (t_inlet*)); x->audio_outlets = (t_outlet**)calloc (x->num_audio_outputs, sizeof (t_outlet*)); - assert (x->audio_inlets != NULL && x->audio_outlets != NULL); /* The first inlet is always there (needn't be created), and is used for control messages. Now, create the rest of the @@ -196,33 +135,22 @@ plugin_tilde_new (t_symbol* s_name, t_symbol* s_lib_name) assert (x->dsp_vec != NULL); return x; - - /* erroneous returns */ PLUGIN_TILDE_NEW_RETURN_NULL: if (x->plugin_library_filename != NULL) { - free ((void*)x->plugin_library_filename); - x->plugin_library_filename = NULL; - } - if (x->x_clock != NULL) { - clock_free (x->x_clock); - x->x_clock = NULL; + free ((void*)x->plugin_library_filename); + x->plugin_library_filename = NULL; } return NULL; /* Indicate error to Pd */ + } -static void -plugin_tilde_free (Pd_Plugin_Tilde* x) +static void plugin_tilde_free (Pd_Plugin_Tilde* x) { unsigned i = 0; /* precondition(s) */ assert (x != NULL); - /* Stop and destruct the clock */ - clock_unset (x->x_clock); - clock_free (x->x_clock); - x->x_clock = NULL; - /* Unload LADSPA/VST plugin */ plugin_tilde_close_plugin (x); @@ -261,21 +189,7 @@ plugin_tilde_free (Pd_Plugin_Tilde* x) } } -static void -plugin_tilde_tick (Pd_Plugin_Tilde* x) -{ - /* precondition(s) */ - assert (x != NULL); - - /* Issue a GUI update (FIXME should use separate GUI thread) */ - plugin_tilde_update_gui (x); - - /* Schedule next update */ - clock_delay (x->x_clock, 100); /* FIXME period OK? */ -} - -static void -plugin_tilde_dsp (Pd_Plugin_Tilde* x, t_signal** sp) +static void plugin_tilde_dsp (Pd_Plugin_Tilde* x, t_signal** sp) { unsigned i = 0; unsigned long num_samples; @@ -301,8 +215,7 @@ plugin_tilde_dsp (Pd_Plugin_Tilde* x, t_signal** sp) dsp_addv (plugin_tilde_perform, x->dsp_vec_length, x->dsp_vec); } -static t_int* -plugin_tilde_perform (t_int* w) +static t_int* plugin_tilde_perform (t_int* w) { unsigned i = 0; Pd_Plugin_Tilde* x = NULL; @@ -325,8 +238,7 @@ plugin_tilde_perform (t_int* w) return w + (x->dsp_vec_length + 1); } -void -plugin_tilde_emit_control_output (Pd_Plugin_Tilde* x, +void plugin_tilde_emit_control_output (Pd_Plugin_Tilde* x, const char* name, float new_value, int output_port_index) @@ -342,8 +254,7 @@ plugin_tilde_emit_control_output (Pd_Plugin_Tilde* x, outlet_anything (x->control_outlet, gensym ("control"), 3, anything_atoms); } -static void -plugin_tilde_control (Pd_Plugin_Tilde* x, +static void plugin_tilde_control (Pd_Plugin_Tilde* x, t_symbol* ctrl_name, t_float ctrl_value) /* Change the value of a named control port of the plug-in */ @@ -355,7 +266,7 @@ plugin_tilde_control (Pd_Plugin_Tilde* x, /* FIXME we assert that the plug-in is already properly opened */ if (ctrl_name->s_name == NULL || strlen (ctrl_name->s_name) == 0) { - error ("plugin~: control messages must have a name and a value"); + post("plugin~: control messages must have a name and a value"); return; } parm_num = plugin_tilde_get_parm_number (x, ctrl_name->s_name); @@ -367,46 +278,99 @@ plugin_tilde_control (Pd_Plugin_Tilde* x, } } -static void -plugin_tilde_print (Pd_Plugin_Tilde* x) - /* Print plug-in name, port names and other information */ - -/* -stereo_amp: "Stereo amplifier"; control 1 in/0 out; audio 2 in/2 out -Control inputs: -Control outputs: -Audio inputs: -Audio outputs: - */ -{ - /* precondition(s) */ +static void plugin_tilde_info (Pd_Plugin_Tilde* x) { assert (x != NULL); + unsigned port_index = 0; + unsigned input_count = 0; + unsigned output_count = 0; + t_atom at[5]; + at[0].a_type = A_SYMBOL; + at[1].a_type = A_SYMBOL; + at[2].a_type = A_SYMBOL; + at[3].a_type = A_FLOAT; + at[4].a_type = A_FLOAT; + + for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) { + LADSPA_PortDescriptor port_type; + LADSPA_PortRangeHintDescriptor iHintDescriptor; + port_type = x->plugin.ladspa.type->PortDescriptors[port_index]; + iHintDescriptor = x->plugin.ladspa.type->PortRangeHints[port_index].HintDescriptor; + + if (LADSPA_IS_PORT_INPUT (port_type)) + at[0].a_w.w_symbol = gensym ("in"); + else if (LADSPA_IS_PORT_OUTPUT (port_type)) + at[0].a_w.w_symbol = gensym ("out"); + if (LADSPA_IS_PORT_CONTROL (port_type)) + at[1].a_w.w_symbol = gensym ("control"); + else if (LADSPA_IS_PORT_AUDIO (port_type)) + at[1].a_w.w_symbol = gensym ("audio"); + at[2].a_w.w_symbol = gensym ((char*)x->plugin.ladspa.type->PortNames[port_index]); + if (LADSPA_IS_HINT_BOUNDED_BELOW(iHintDescriptor)) + at[3].a_w.w_float = x->plugin.ladspa.type->PortRangeHints[port_index].LowerBound; + else + at[3].a_w.w_float = 0; + if (LADSPA_IS_HINT_BOUNDED_ABOVE(iHintDescriptor)) + at[4].a_w.w_float = x->plugin.ladspa.type->PortRangeHints[port_index].UpperBound; + else + at[4].a_w.w_float = 1; + + outlet_anything (x->control_outlet, gensym ("port"), 5, at); + } - printf ("This is plugin~ version %s -- NO WARRANTY -- Copyright (C) 2000 Jarno Seppänen\n", - PLUGIN_TILDE_VERSION); -#if PLUGIN_TILDE_USE_LADSPA - plugin_tilde_ladspa_print (x); -#endif -#if PLUGIN_TILDE_USE_VST - plugin_tilde_vst_print (x); -#endif } -static void -plugin_tilde_reset (Pd_Plugin_Tilde* x) +static void plugin_tilde_list (Pd_Plugin_Tilde* x) { + post("listing plugins\n"); + LADSPAPluginSearch(plugin_tilde_describe,x); +} + +static void plugin_tilde_describe(const char * pcFullFilename, + void * pvPluginHandle, + LADSPA_Descriptor_Function fDescriptorFunction, Pd_Plugin_Tilde* x) { + t_atom at[1]; + const LADSPA_Descriptor * psDescriptor; + long lIndex; + + at[0].a_type = A_SYMBOL; + at[0].a_w.w_symbol = gensym ((char*)pcFullFilename); + outlet_anything (x->control_outlet, gensym ("library"), 1, at); + + for (lIndex = 0; + (psDescriptor = fDescriptorFunction(lIndex)) != NULL; + lIndex++) { + at[0].a_w.w_symbol = gensym ((char*)psDescriptor->Name); + outlet_anything (x->control_outlet, gensym ("name"), 1, at); + at[0].a_w.w_symbol = gensym ((char*)psDescriptor->Label); + outlet_anything (x->control_outlet, gensym ("label"), 1, at); + at[0].a_type = A_FLOAT; + at[0].a_w.w_float = psDescriptor->UniqueID; + outlet_anything (x->control_outlet, gensym ("id"), 1, at); + at[0].a_type = A_SYMBOL; + at[0].a_w.w_symbol = gensym ((char*)psDescriptor->Maker); + outlet_anything (x->control_outlet, gensym ("maker"), 1, at); + } + + dlclose(pvPluginHandle); +} + +static void plugin_tilde_bypass (Pd_Plugin_Tilde* x) { +} + +static void plugin_tilde_plug (Pd_Plugin_Tilde* x) { +} + + +static void plugin_tilde_reset (Pd_Plugin_Tilde* x) { /* precondition(s) */ assert (x != NULL); -#if PLUGIN_TILDE_USE_LADSPA + plugin_tilde_ladspa_reset (x); -#endif -#if PLUGIN_TILDE_USE_VST - plugin_tilde_vst_reset (x); -#endif + + } -static unsigned -plugin_tilde_get_parm_number (Pd_Plugin_Tilde* x, +static unsigned plugin_tilde_get_parm_number (Pd_Plugin_Tilde* x, const char* str) /* find out if str points to a parameter number or not and return the number or zero. The number string has to begin with a '#' character */ @@ -436,130 +400,708 @@ plugin_tilde_get_parm_number (Pd_Plugin_Tilde* x, } } -static const char* -plugin_tilde_search_plugin (Pd_Plugin_Tilde* x, +static const char* plugin_tilde_search_plugin (Pd_Plugin_Tilde* x, const char* name) { -#if PLUGIN_TILDE_USE_LADSPA + return plugin_tilde_ladspa_search_plugin (x, name); -#endif -#if PLUGIN_TILDE_USE_VST - return plugin_tilde_vst_search_plugin (x, name); -#endif + + } -static int -plugin_tilde_open_plugin (Pd_Plugin_Tilde* x, +static int plugin_tilde_open_plugin (Pd_Plugin_Tilde* x, const char* name, const char* lib_name, unsigned long sample_rate) { int ret = 0; -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: open_plugin (x, \"%s\", \"%s\", %ld);", + + post("plugin~: open_plugin (x, \"%s\", \"%s\", %ld);", name, lib_name, sample_rate); -#endif -#if PLUGIN_TILDE_USE_LADSPA + + ret = plugin_tilde_ladspa_open_plugin (x, name, lib_name, sample_rate); -#endif -#if PLUGIN_TILDE_USE_VST - ret = plugin_tilde_vst_open_plugin (x, name, lib_name, sample_rate); -#endif -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: plugin active"); -#endif -#if PLUGIN_TILDE_VERBOSE - plugin_tilde_print (x); -#endif + + post("plugin~: plugin active"); + + + + // plugin_tilde_info (x); + return ret; } -static void -plugin_tilde_close_plugin (Pd_Plugin_Tilde* x) +static void plugin_tilde_close_plugin (Pd_Plugin_Tilde* x) { -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: close_plugin (x)"); -#endif -#if PLUGIN_TILDE_USE_LADSPA + post("plugin~: close_plugin (x)"); + + + plugin_tilde_ladspa_close_plugin (x); -#endif -#if PLUGIN_TILDE_USE_VST - plugin_tilde_vst_close_plugin (x); -#endif -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: destructed plugin successfully"); -#endif + + + + post("plugin~: destructed plugin successfully"); + } -static void -plugin_tilde_apply_plugin (Pd_Plugin_Tilde* x) +static void plugin_tilde_apply_plugin (Pd_Plugin_Tilde* x) { -#if PLUGIN_TILDE_USE_LADSPA + plugin_tilde_ladspa_apply_plugin (x); -#endif -#if PLUGIN_TILDE_USE_VST - plugin_tilde_vst_apply_plugin (x); -#endif + + } -static void -plugin_tilde_connect_audio (Pd_Plugin_Tilde* x, +static void plugin_tilde_connect_audio (Pd_Plugin_Tilde* x, float** audio_inputs, float** audio_outputs, unsigned long num_samples) { -#if PLUGIN_TILDE_USE_LADSPA + plugin_tilde_ladspa_connect_audio (x, audio_inputs, audio_outputs, num_samples); -#endif -#if PLUGIN_TILDE_USE_VST - plugin_tilde_vst_connect_audio (x, audio_inputs, audio_outputs, - num_samples); -#endif + + } -static void -plugin_tilde_set_control_input_by_name (Pd_Plugin_Tilde* x, +static void plugin_tilde_set_control_input_by_name (Pd_Plugin_Tilde* x, const char* name, float value) { -#if PLUGIN_TILDE_USE_LADSPA + plugin_tilde_ladspa_set_control_input_by_name (x, name, value); -#endif -#if PLUGIN_TILDE_USE_VST - plugin_tilde_vst_set_control_input_by_name (x, name, value); -#endif + + } -static void -plugin_tilde_set_control_input_by_index (Pd_Plugin_Tilde* x, +static void plugin_tilde_set_control_input_by_index (Pd_Plugin_Tilde* x, unsigned index_, float value) /* plugin~.c:535: warning: declaration of `index' shadows global declaration */ { -#if PLUGIN_TILDE_USE_LADSPA + plugin_tilde_ladspa_set_control_input_by_index (x, index_, value); -#endif -#if PLUGIN_TILDE_USE_VST - plugin_tilde_vst_set_control_input_by_index (x, index_, value); -#endif + + } -static void -plugin_tilde_update_gui (Pd_Plugin_Tilde* x) + +const char* plugin_tilde_ladspa_search_plugin (Pd_Plugin_Tilde* x, + const char* name) { -#if PLUGIN_TILDE_USE_LADSPA - /* FIXME LADSPA doesn't support GUI's at the moment */ -#endif -#if PLUGIN_TILDE_USE_VST - plugin_tilde_vst_update_gui (x); -#endif + char* lib_name = NULL; + void* user_data[2]; + + user_data[0] = (void*)(&lib_name); + user_data[1] = (void*)name; + + lib_name = NULL; + LADSPAPluginSearch (plugin_tilde_ladspa_search_plugin_callback, + (void*)user_data); + + /* The callback (allocates and) writes lib_name, if it finds the plugin */ + return lib_name; +} + +static void plugin_tilde_ladspa_search_plugin_callback (const char* full_filename, + void* plugin_handle, + LADSPA_Descriptor_Function descriptor_function, + void* user_data) +{ + const LADSPA_Descriptor* descriptor = NULL; + unsigned plug_index = 0; + + char** out_lib_name = (char**)(((void**)user_data)[0]); + char* name = (char*)(((void**)user_data)[1]); + + /* Stop searching when a first matching plugin is found */ + if (*out_lib_name == NULL) + { + // post("plugin~: searching library \"%s\"...", full_filename); + + for (plug_index = 0; + (descriptor = descriptor_function (plug_index)) != NULL; + plug_index++) + { + // post("plugin~: label \"%s\"", descriptor->Label); + + if (strcasecmp (name, descriptor->Label) == 0) + { + /* found a matching plugin */ + *out_lib_name = strdup (full_filename); + + post("plugin~: found plugin \"%s\" in library \"%s\"", + name, full_filename); + + /* don't need to look any further */ + break; + } + } + } +} + +int plugin_tilde_ladspa_open_plugin (Pd_Plugin_Tilde* x, + const char* name, + const char* lib_name, + unsigned long sample_rate) +{ + unsigned port_index; + + /* precondition(s) */ + assert (x != NULL); + assert (lib_name != NULL); + assert (name != NULL); + assert (sample_rate != 0); + + /* Initialize object struct */ + x->plugin.ladspa.type = NULL; + x->plugin.ladspa.instance = NULL; + x->plugin.ladspa.control_input_values = NULL; + x->plugin.ladspa.control_output_values = NULL; + x->plugin.ladspa.control_input_ports = NULL; + x->plugin.ladspa.control_output_ports = NULL; + x->plugin.ladspa.prev_control_output_values = NULL; + x->plugin.ladspa.prev_control_output_values_invalid = 1; + x->plugin.ladspa.outofplace_audio_outputs = NULL; + x->plugin.ladspa.actual_audio_outputs = NULL; + x->plugin.ladspa.num_samples = 0; + x->plugin.ladspa.sample_rate = sample_rate; + + /* Attempt to load the plugin. */ + x->plugin_library = loadLADSPAPluginLibrary (lib_name); + if (x->plugin_library == NULL) + { + /* error */ + post("plugin~: Unable to load LADSPA plugin library \"%s\"", + lib_name); + return 1; + } + x->plugin.ladspa.type = findLADSPAPluginDescriptor (x->plugin_library, + lib_name, + name); + if (x->plugin.ladspa.type == NULL) + { + post("plugin~: Unable to find LADSPA plugin \"%s\" within library \"%s\"", + name, lib_name); + return 1; + } + + /* Construct the plugin. */ + x->plugin.ladspa.instance + = x->plugin.ladspa.type->instantiate (x->plugin.ladspa.type, + sample_rate); + if (x->plugin.ladspa.instance == NULL) + { + /* error */ + post("plugin~: Unable to instantiate LADSPA plugin \"%s\"", + x->plugin.ladspa.type->Name); + return 1; + } + + post("plugin~: constructed plugin \"%s\" successfully", x->plugin.ladspa.type->Name); + + /* Find out the number of inputs and outputs needed. */ + plugin_tilde_ladspa_count_ports (x); + + /* Allocate memory for control values */ + if (plugin_tilde_ladspa_alloc_control_memory (x)) { + post("plugin~: out of memory"); + return 1; /* error */ + } + + /* Connect control ports with buffers */ + plugin_tilde_ladspa_connect_control_ports (x); + + /* Activate the plugin. */ + if (x->plugin.ladspa.type->activate != NULL) + { + x->plugin.ladspa.type->activate (x->plugin.ladspa.instance); + } + + /* success */ + return 0; +} + +void plugin_tilde_ladspa_close_plugin (Pd_Plugin_Tilde* x) +{ + /* precondition(s) */ + assert (x != NULL); + + if (x->plugin.ladspa.instance != NULL) + { + /* Deactivate the plugin. */ + if (x->plugin.ladspa.type->deactivate != NULL) + { + x->plugin.ladspa.type->deactivate (x->plugin.ladspa.instance); + } + + /* Destruct the plugin. */ + x->plugin.ladspa.type->cleanup (x->plugin.ladspa.instance); + x->plugin.ladspa.instance = NULL; + } + + /* Free the control value memory */ + plugin_tilde_ladspa_free_control_memory (x); + + if (x->plugin_library != NULL) + { + unloadLADSPAPluginLibrary (x->plugin_library); + x->plugin_library = NULL; + x->plugin.ladspa.type = NULL; + } + + /* Free the out-of-place memory */ + plugin_tilde_ladspa_free_outofplace_memory (x); +} + +void plugin_tilde_ladspa_apply_plugin (Pd_Plugin_Tilde* x) +{ + unsigned i; + + /* Run the plugin on Pd's buffers */ + x->plugin.ladspa.type->run (x->plugin.ladspa.instance, + x->plugin.ladspa.num_samples); + + /* Copy out-of-place buffers to Pd buffers if used */ + if (x->plugin.ladspa.outofplace_audio_outputs != NULL) + { + for (i = 0; i < x->num_audio_outputs; i++) + { + unsigned j; + for (j = 0; j < (unsigned)x->plugin.ladspa.num_samples; j++) + { + x->plugin.ladspa.actual_audio_outputs[i][j] + = x->plugin.ladspa.outofplace_audio_outputs[i][j]; + } + } + } + + /* Compare control output values to previous and send control + messages, if necessary */ + for (i = 0; i < x->num_control_outputs; i++) + { + /* Check whether the prev values have been initialized; if + not, send a control message for each of the control outputs */ + if ((x->plugin.ladspa.control_output_values[i] + != x->plugin.ladspa.prev_control_output_values[i]) + || x->plugin.ladspa.prev_control_output_values_invalid) + { + /* Emit a control message */ + plugin_tilde_emit_control_output (x, + x->plugin.ladspa.type->PortNames[x->plugin.ladspa.control_output_ports[i]], + x->plugin.ladspa.control_output_values[i], + i); + /* Update the corresponding control monitoring value */ + x->plugin.ladspa.prev_control_output_values[i] = x->plugin.ladspa.control_output_values[i]; + } + } + x->plugin.ladspa.prev_control_output_values_invalid = 0; +} + +void plugin_tilde_ladspa_reset (Pd_Plugin_Tilde* x) +{ + /* precondition(s) */ + assert (x != NULL); + assert (x->plugin.ladspa.type != NULL); + assert (x->plugin.ladspa.instance != NULL); + + if (x->plugin.ladspa.type->activate != NULL + && x->plugin.ladspa.type->deactivate == NULL) + { + post("plugin~: Warning: Plug-in defines activate() method but no deactivate() method"); + } + + /* reset plug-in by first deactivating and then re-activating it */ + if (x->plugin.ladspa.type->deactivate != NULL) + { + x->plugin.ladspa.type->deactivate (x->plugin.ladspa.instance); + } + if (x->plugin.ladspa.type->activate != NULL) + { + x->plugin.ladspa.type->activate (x->plugin.ladspa.instance); + } +} + +void plugin_tilde_ladspa_connect_audio (Pd_Plugin_Tilde* x, + float** audio_inputs, + float** audio_outputs, + unsigned long num_samples) +{ + unsigned port_index = 0; + unsigned input_count = 0; + unsigned output_count = 0; + + /* Allocate out-of-place memory if needed */ + if (plugin_tilde_ladspa_alloc_outofplace_memory (x, num_samples)) { + post("plugin~: out of memory"); + return; + } + + if (x->plugin.ladspa.outofplace_audio_outputs != NULL) { + x->plugin.ladspa.actual_audio_outputs = audio_outputs; + audio_outputs = x->plugin.ladspa.outofplace_audio_outputs; + } + + input_count = 0; + output_count = 0; + for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) + { + LADSPA_PortDescriptor port_type; + port_type = x->plugin.ladspa.type->PortDescriptors[port_index]; + if (LADSPA_IS_PORT_AUDIO (port_type)) + { + if (LADSPA_IS_PORT_INPUT (port_type)) + { + x->plugin.ladspa.type->connect_port (x->plugin.ladspa.instance, + port_index, + (LADSPA_Data*)audio_inputs[input_count]); + input_count++; + } + else if (LADSPA_IS_PORT_OUTPUT (port_type)) + { + x->plugin.ladspa.type->connect_port (x->plugin.ladspa.instance, + port_index, + (LADSPA_Data*)audio_outputs[output_count]); + output_count++; + } + } + } + + x->plugin.ladspa.num_samples = num_samples; +} + +void plugin_tilde_ladspa_set_control_input_by_name (Pd_Plugin_Tilde* x, + const char* name, + float value) +{ + unsigned port_index = 0; + unsigned ctrl_input_index = 0; + int found_port = 0; /* boolean */ + + /* precondition(s) */ + assert (x != NULL); + + if (name == NULL || strlen (name) == 0) { + post("plugin~: no control port name specified"); + return; + } + + /* compare control name to LADSPA control input ports' names + case-insensitively */ + found_port = 0; + ctrl_input_index = 0; + for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) + { + LADSPA_PortDescriptor port_type; + port_type = x->plugin.ladspa.type->PortDescriptors[port_index]; + if (LADSPA_IS_PORT_CONTROL (port_type) + && LADSPA_IS_PORT_INPUT (port_type)) + { + const char* port_name = NULL; + unsigned cmp_length = 0; + port_name = x->plugin.ladspa.type->PortNames[port_index]; + cmp_length = MIN (strlen (name), strlen (port_name)); + if (cmp_length != 0 + && strncasecmp (name, port_name, cmp_length) == 0) + { + /* found the first port to match */ + found_port = 1; + break; + } + ctrl_input_index++; + } + } + + if (!found_port) + { + post("plugin~: plugin doesn't have a control input port named \"%s\"", + name); + return; + } + + plugin_tilde_ladspa_set_control_input_by_index (x, + ctrl_input_index, + value); +} + +void plugin_tilde_ladspa_set_control_input_by_index (Pd_Plugin_Tilde* x, + unsigned ctrl_input_index, + float value) +{ + unsigned port_index = 0; + unsigned ctrl_input_count = 0; + int found_port = 0; /* boolean */ + int bounded_from_below = 0; + int bounded_from_above = 0; + int bounded = 0; + float lower_bound = 0; + float upper_bound = 0; + + /* precondition(s) */ + assert (x != NULL); + /* assert (ctrl_input_index >= 0); causes a warning */ + /* assert (ctrl_input_index < x->num_control_inputs); */ + if (ctrl_input_index >= x->num_control_inputs) { + post("plugin~: control port number %d is out of range [1, %d]", + ctrl_input_index + 1, x->num_control_inputs); + return; + } + + /* bound parameter value */ + /* sigh, need to find the N'th ctrl input port by hand */ + found_port = 0; + ctrl_input_count = 0; + for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) + { + LADSPA_PortDescriptor port_type; + port_type = x->plugin.ladspa.type->PortDescriptors[port_index]; + if (LADSPA_IS_PORT_CONTROL (port_type) + && LADSPA_IS_PORT_INPUT (port_type)) + { + if (ctrl_input_index == ctrl_input_count) { + found_port = 1; + break; + } + ctrl_input_count++; + } + } + if (!found_port) { + post("plugin~: plugin doesn't have %ud control input ports", + ctrl_input_index + 1); + return; + } + + /* out of bounds rules WTF!!!!~ + if (x->plugin.ladspa.type->PortRangeHints != NULL) { + const LADSPA_PortRangeHint* hint + = &x->plugin.ladspa.type->PortRangeHints[port_index]; + if (LADSPA_IS_HINT_BOUNDED_BELOW (hint->HintDescriptor)) { + bounded_from_below = 1; + lower_bound = hint->LowerBound; + if (LADSPA_IS_HINT_SAMPLE_RATE (hint->HintDescriptor)) { + assert (x->plugin.ladspa.sample_rate != 0); + lower_bound *= (float)x->plugin.ladspa.sample_rate; + } + } + if (LADSPA_IS_HINT_BOUNDED_ABOVE (hint->HintDescriptor)) { + bounded_from_above = 1; + upper_bound = hint->UpperBound; + if (LADSPA_IS_HINT_SAMPLE_RATE (hint->HintDescriptor)) { + assert (x->plugin.ladspa.sample_rate != 0); + upper_bound *= (float)x->plugin.ladspa.sample_rate; + } + } + } + bounded = 0; + if (bounded_from_below && value < lower_bound) { + value = lower_bound; + bounded = 1; + } + if (bounded_from_above && value > upper_bound) { + value = upper_bound; + bounded = 1; + } */ + + /* set the appropriate control port value */ + x->plugin.ladspa.control_input_values[ctrl_input_index] = value; + + // post("plugin~: control change control input port #%ud to value %f", ctrl_input_index + 1, value); +} + +static void plugin_tilde_ladspa_count_ports (Pd_Plugin_Tilde* x) +{ + unsigned i = 0; + + x->num_audio_inputs = 0; + x->num_audio_outputs = 0; + x->num_control_inputs = 0; + x->num_control_outputs = 0; + + for (i = 0; i < x->plugin.ladspa.type->PortCount; i++) + { + LADSPA_PortDescriptor port_type; + port_type = x->plugin.ladspa.type->PortDescriptors[i]; + + if (LADSPA_IS_PORT_AUDIO (port_type)) + { + if (LADSPA_IS_PORT_INPUT (port_type)) + { + x->num_audio_inputs++; + } + else if (LADSPA_IS_PORT_OUTPUT (port_type)) + { + x->num_audio_outputs++; + } + } + else if (LADSPA_IS_PORT_CONTROL (port_type)) + { + if (LADSPA_IS_PORT_INPUT (port_type)) + { + x->num_control_inputs++; + } + else if (LADSPA_IS_PORT_OUTPUT (port_type)) + { + x->num_control_outputs++; + } + } + } + + post("plugin~: plugin ports: audio %d/%d ctrl %d/%d", + x->num_audio_inputs, x->num_audio_outputs, + x->num_control_inputs, x->num_control_outputs); +} + +static void plugin_tilde_ladspa_connect_control_ports (Pd_Plugin_Tilde* x) +{ + unsigned port_index = 0; + unsigned input_count = 0; + unsigned output_count = 0; + + input_count = 0; + output_count = 0; + for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) + { + LADSPA_PortDescriptor port_type; + port_type = x->plugin.ladspa.type->PortDescriptors[port_index]; + + if (LADSPA_IS_PORT_CONTROL (port_type)) + { + if (LADSPA_IS_PORT_INPUT (port_type)) + { + x->plugin.ladspa.type->connect_port (x->plugin.ladspa.instance, + port_index, + &x->plugin.ladspa.control_input_values[input_count]); + x->plugin.ladspa.control_input_ports[input_count] = port_index; + input_count++; + } + else if (LADSPA_IS_PORT_OUTPUT (port_type)) + { + x->plugin.ladspa.type->connect_port (x->plugin.ladspa.instance, + port_index, + &x->plugin.ladspa.control_output_values[output_count]); + x->plugin.ladspa.control_output_ports[output_count] = port_index; + + output_count++; + } + } + } +} + +static int plugin_tilde_ladspa_alloc_outofplace_memory (Pd_Plugin_Tilde* x, unsigned long buflen) +{ + assert (x != NULL); + + plugin_tilde_ladspa_free_outofplace_memory (x); + + if (LADSPA_IS_INPLACE_BROKEN (x->plugin.ladspa.type->Properties)) + { + unsigned i = 0; + + x->plugin.ladspa.outofplace_audio_outputs = (t_float**) + calloc (x->num_audio_outputs, sizeof (t_float*)); + if (x->plugin.ladspa.outofplace_audio_outputs == NULL) { + return 1; /* error */ + } + + for (i = 0; i < x->num_audio_outputs; i++) + { + x->plugin.ladspa.outofplace_audio_outputs[i] = (t_float*) + calloc (buflen, sizeof (t_float)); + if (x->plugin.ladspa.outofplace_audio_outputs[i] == NULL) { + /* FIXME free got buffers? */ + return 1; /* error */ + } + } + } + return 0; /* success */ +} + +static void plugin_tilde_ladspa_free_outofplace_memory (Pd_Plugin_Tilde* x) +{ + assert (x != NULL); + + if (x->plugin.ladspa.outofplace_audio_outputs != NULL) + { + unsigned i = 0; + for (i = 0; i < x->num_audio_outputs; i++) + { + free (x->plugin.ladspa.outofplace_audio_outputs[i]); + } + free (x->plugin.ladspa.outofplace_audio_outputs); + x->plugin.ladspa.outofplace_audio_outputs = NULL; + } +} + +static int plugin_tilde_ladspa_alloc_control_memory (Pd_Plugin_Tilde* x) +{ + x->plugin.ladspa.control_input_values = NULL; + x->plugin.ladspa.control_input_ports = NULL; + if (x->num_control_inputs > 0) + { + x->plugin.ladspa.control_input_values = (float*)calloc + (x->num_control_inputs, sizeof (float)); + x->plugin.ladspa.control_input_ports = (int*)calloc + (x->num_control_inputs, sizeof (int)); + if (x->plugin.ladspa.control_input_values == NULL + || x->plugin.ladspa.control_input_ports == NULL) { + return 1; /* error */ + } + } + x->plugin.ladspa.control_output_values = NULL; + x->plugin.ladspa.control_output_ports = NULL; + x->plugin.ladspa.prev_control_output_values = NULL; + if (x->num_control_outputs > 0) + { + x->plugin.ladspa.control_output_values = (float*)calloc + (x->num_control_outputs, sizeof (float)); + x->plugin.ladspa.control_output_ports = (int*)calloc + (x->num_control_outputs, sizeof (int)); + x->plugin.ladspa.prev_control_output_values = (float*)calloc + (x->num_control_outputs, sizeof (float)); + if (x->plugin.ladspa.control_output_values == NULL + || x->plugin.ladspa.prev_control_output_values == NULL + || x->plugin.ladspa.control_output_ports == NULL) { + return 1; /* error */ + } + } + /* Indicate initial conditions */ + x->plugin.ladspa.prev_control_output_values_invalid = 1; + return 0; /* success */ +} + +static void plugin_tilde_ladspa_free_control_memory (Pd_Plugin_Tilde* x) +{ + if (x->plugin.ladspa.control_input_values != NULL) + { + free (x->plugin.ladspa.control_input_values); + x->plugin.ladspa.control_input_values = NULL; + } + if (x->plugin.ladspa.control_output_values != NULL) + { + free (x->plugin.ladspa.control_output_values); + x->plugin.ladspa.control_output_values = NULL; + } + if (x->plugin.ladspa.prev_control_output_values != NULL) + { + free (x->plugin.ladspa.prev_control_output_values); + x->plugin.ladspa.prev_control_output_values = NULL; + } + if (x->plugin.ladspa.control_input_ports != NULL) + { + free (x->plugin.ladspa.control_input_ports); + x->plugin.ladspa.control_input_ports = NULL; + } + if (x->plugin.ladspa.control_output_ports != NULL) + { + free (x->plugin.ladspa.control_output_ports); + x->plugin.ladspa.control_output_ports = NULL; + } } -/* EOF */ @@ -1,52 +1,6 @@ -/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins - Copyright (C) 2000 Jarno Seppänen - $Id: plugin~.h,v 1.2 2003-01-23 12:32:04 ggeiger Exp $ - - This file is part of plugin~. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef __PLUGIN_TILDE_H__ -#define __PLUGIN_TILDE_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include "config.h" - -/* Pd header */ -#ifndef MAXPDSTRING /* lame */ +#include "ladspa.h" #include "m_pd.h" -#endif /* MAXPDSTRING */ - -#if 0 -#if PLUGIN_TILDE_USE_LADSPA -#include "plugin~_ladspa.h" -#endif -#if PLUGIN_TILDE_USE_VST -#include "plugin~_vst.h" -#endif -#endif /* 0 */ -/* - * Now I've moved the following two plug-in-architecture-specific structures - * here because having them in plugin~_ladspa.h and plugin~_vst.h proper will - * result in a cyclical header dependency - */ -#if PLUGIN_TILDE_USE_LADSPA -#include "ladspa/ladspa.h" + typedef struct { const LADSPA_Descriptor* type; @@ -70,40 +24,19 @@ typedef struct unsigned long sample_rate; } Plugin_Tilde_Ladspa; -#endif /* PLUGIN_TILDE_USE_LADSPA */ - -#if PLUGIN_TILDE_USE_VST -#include "vst/AEffect.h" -typedef struct -{ - AEffect* instance; - - /* audio wire buffer information */ - float** audio_inputs; - float** audio_outputs; - unsigned long num_samples; - - int editor_open; - -} Plugin_Tilde_Vst; -#endif /* PLUGIN_TILDE_USE_VST */ typedef struct { /* Pd's way of object-oriented programming */ t_object x_obj; - t_clock* x_clock; /* Access to LADSPA/VST plugins */ void* plugin_library; const char* plugin_library_filename; /* only for diagnostics */ union { -#if PLUGIN_TILDE_USE_LADSPA + Plugin_Tilde_Ladspa ladspa; -#endif -#if PLUGIN_TILDE_USE_VST - Plugin_Tilde_Vst vst; -#endif + } plugin; /* Plugin information */ @@ -127,7 +60,6 @@ typedef struct void plugin_tilde_setup (void); static void* plugin_tilde_new (t_symbol* s_name, t_symbol* s_lib_name); static void plugin_tilde_free (Pd_Plugin_Tilde* x); -static void plugin_tilde_tick (Pd_Plugin_Tilde* x); /* DSP callbacks */ static void plugin_tilde_dsp (Pd_Plugin_Tilde* x, t_signal** sp); @@ -145,8 +77,10 @@ static void plugin_tilde_control (Pd_Plugin_Tilde* x, t_float ctrl_value); /* First inlet message callback for "control" messages */ -static void plugin_tilde_print (Pd_Plugin_Tilde* x); - +static void plugin_tilde_list (Pd_Plugin_Tilde* x); +static void plugin_tilde_info (Pd_Plugin_Tilde* x); +static void plugin_tilde_plug (Pd_Plugin_Tilde* x); +static void plugin_tilde_bypass (Pd_Plugin_Tilde* x); /* First inlet message callback for "reset" messages */ static void plugin_tilde_reset (Pd_Plugin_Tilde* x); @@ -173,13 +107,46 @@ static void plugin_tilde_set_control_input_by_name (Pd_Plugin_Tilde* x, static void plugin_tilde_set_control_input_by_index (Pd_Plugin_Tilde* x, unsigned index_, float value); -/*static float plugin_tilde_get_control_input (Pd_Plugin_Tilde* x, - unsigned int index);*/ -static void plugin_tilde_update_gui (Pd_Plugin_Tilde* x); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* __PLUGIN_TILDE_H__ */ -/* EOF */ +/* subroutines to wrap the LADSPA interface */ +const char* plugin_tilde_ladspa_search_plugin (Pd_Plugin_Tilde* x, + const char* name); +int plugin_tilde_ladspa_open_plugin (Pd_Plugin_Tilde* x, + const char* name, + const char* lib_name, + unsigned long sample_rate); +void plugin_tilde_ladspa_close_plugin (Pd_Plugin_Tilde* x); +void plugin_tilde_ladspa_apply_plugin (Pd_Plugin_Tilde* x); + +void plugin_tilde_ladspa_reset (Pd_Plugin_Tilde* x); + +void plugin_tilde_ladspa_connect_audio (Pd_Plugin_Tilde* x, + float** audio_inputs, + float** audio_outputs, + unsigned long num_samples); +void plugin_tilde_ladspa_set_control_input_by_name (Pd_Plugin_Tilde* x, + const char* name, + float value); +void plugin_tilde_ladspa_set_control_input_by_index (Pd_Plugin_Tilde* x, + unsigned index_, + float value); +/*float plugin_tilde_ladspa_get_control_input (Pd_Plugin_Tilde* x, + const char* name);*/ +/* Control output is handled with plugin_tilde_emit_control_output() callback */ + +/* Local subroutines */ +static void plugin_tilde_describe (const char* full_filename, + void* plugin_handle, + LADSPA_Descriptor_Function descriptor_function, + Pd_Plugin_Tilde* x); +static void plugin_tilde_ladspa_search_plugin_callback (const char* full_filename, + void* plugin_handle, + LADSPA_Descriptor_Function descriptor_function, + void* user_data); +static void plugin_tilde_ladspa_count_ports (Pd_Plugin_Tilde* x); +static void plugin_tilde_ladspa_connect_control_ports (Pd_Plugin_Tilde* x); + +static int plugin_tilde_ladspa_alloc_outofplace_memory (Pd_Plugin_Tilde* x, unsigned long buflen); +static void plugin_tilde_ladspa_free_outofplace_memory (Pd_Plugin_Tilde* x); +static int plugin_tilde_ladspa_alloc_control_memory (Pd_Plugin_Tilde* x); +static void plugin_tilde_ladspa_free_control_memory (Pd_Plugin_Tilde* x); diff --git a/plugin~.pd b/plugin~.pd deleted file mode 100644 index 9a5467e..0000000 --- a/plugin~.pd +++ /dev/null @@ -1,64 +0,0 @@ -#N canvas 251 141 580 621 12; -#X floatatom 443 329; -#X msg 443 299 440; -#X obj 393 266 loadbang; -#X msg 442 358 control freq \$1; -#X msg 344 357 control amp \$1; -#X msg 344 300 0.7; -#X floatatom 344 331; -#X obj 97 389 plugin~ amp_stereo amp.so; -#X msg 67 351 control gain \$1; -#X floatatom 67 326; -#X msg 66 300 0.7; -#X obj 401 434 plugin~ sine_fcac; -#X msg 307 390 print; -#X obj 200 341 adc~; -#X obj 200 436 dac~; -#X obj 20 47 plugin~ lpf; -#X obj 250 49 plugin~ lpf filter.so; -#X text 13 11 plugin~: LADSPA plug-in hosting for Pd.; -#X obj 66 269 loadbang; -#X msg 16 340 print; -#X graph graph1 0 -1 100 1 84 605 284 465; -#X array array1 100 float; -#X pop; -#X obj 402 503 tabwrite~ array1; -#X obj 312 472 metro 500; -#X msg 311 450 1; -#X obj 311 428 loadbang; -#X text 19 65 Create a plug-in by label. All LADSPA plug-in libraries will be searched.; -#X text 250 69 Create a plug-in by label and library name. Only the selected LADSPA plug-in library is searched.; -#X text 30 246 Example: stereo amplifier from LADSPA SDK; -#X text 297 245 Example: sine oscillator from LADSPA SDK; -#X obj 222 147 plugin~ lpf; -#X text 106 114 In- and outlet functionality:; -#X text 56 189 You can investigate the inputs and outputs by sending a "print" message to the first inlet.; -#X msg 290 210 print; -#X text 18 132 The first inlet is for control input messages. The first outlet is for control output messages \, correspondingly.; -#X text 305 140 The rest inlets are for audio input and the rest outlets are for audio output signals.; -#X msg 14 310 reset; -#X msg 304 365 reset; -#X connect 0 0 3 0; -#X connect 1 0 0 0; -#X connect 2 0 1 0; -#X connect 2 0 5 0; -#X connect 3 0 11 0; -#X connect 4 0 11 0; -#X connect 5 0 6 0; -#X connect 6 0 4 0; -#X connect 7 1 14 0; -#X connect 7 2 14 1; -#X connect 8 0 7 0; -#X connect 9 0 8 0; -#X connect 10 0 9 0; -#X connect 11 1 21 0; -#X connect 12 0 11 0; -#X connect 13 0 7 1; -#X connect 13 1 7 2; -#X connect 18 0 10 0; -#X connect 19 0 7 0; -#X connect 22 0 21 0; -#X connect 23 0 22 0; -#X connect 24 0 23 0; -#X connect 35 0 7 0; -#X connect 36 0 11 0; diff --git a/plugin~.txt b/plugin~.txt deleted file mode 100644 index d345ea3..0000000 --- a/plugin~.txt +++ /dev/null @@ -1,144 +0,0 @@ -plugin~: LADSPA and VST plug-in hosting for Pd -============================================== - -This is a Pd [1] tilde object for hosting LADSPA [2] and VST [3] audio -plug-ins on Linux and Windows systems, respectively. The LADSPA -plug-in interface is supported completely on Linux, while the VST 1.0 -audio processing plug-in interface (without plug-in graphics) is -supported on Windows. - -This text corresponds to release 0.2 of plugin~ as of 4th April, 2001. -This release of plugin~ has been tested with Pd 0.32P1. - -plugin~ is distributed under the GNU General Public License. For more -information, please read the accompanying file "COPYING". - -Loading the plug-in -------------------- -The plug-ins are located using the environment variable LADSPA_PATH or -VST_PATH. You need to set the corresponding variable to specify the -directories where you have the plug-in files. For example, on Linux -(bash) you should use something like - - $ export LADSPA_PATH=/usr/local/lib/ladspa:$HOME/myplugins - -and on Windows something like - - C:\>set VST_PATH=C:\Program Files\Steinberg\Vstplugins;D:\myplugins - -Note that Linux and Windows use different delimiters within -paths and directories. - -LADSPA. You can load a LADSPA plug-in in two ways: (1) Create the -plug-in by label: "plugin~ lpf". Here, "lpf" is the label of the -plug-in that is to be searched for. All LADSPA plug-in libraries in -your LADSPA_PATH are searched; (2) Create a plug-in by label and -library name: "plugin~ lpf filter.so". Here, "lpf" is the label as -before, and "filter.so" is the name of the plug-in library, which -contains the plug-in. Only the selected LADSPA plug-in library is -searched. - -VST. There is always only one VST plug-in within one DLL and thus you -only need to create the plug-in by library name: "plugin~ northpole". -This will search through your VST_PATH for the plug-in library named -"northpole.dll". - -After loading the plug-in successfully, the number of inlets and -outlets of the corresponding plugin~ object should represent the -number of audio inputs and outputs to/from the plug-in (plus one inlet -and one outlet for control information, see below). - -In- and outlet functionality ----------------------------- -The audio inputs and outputs ports of LADSPA and VST plug-ins are -represented as separate signal inlets and outlets. The control input -and output ports (LADSPA) or the parameter inputs (VST), however, are -all represented together with one inlet and one outlet. - -The first inlet and the first outlet are for control input and output -messages, respectively. Control messages are messages, which start -with the text "control". Second should come the name of the -corresponding control port (called parameter in VST parlance), and -third the value. The first inlet accepts and the first outlet sends -this kinds of messages. Additionally, you can use port/parameter -number (like this: #1, #2, ...) instead of the name to send control -changes. You should note, however, that the port numbering is not -necessarily the same between different versions of a plug-in, so you -should use port/parameter names where possible. - -The first inlet and outlet are always there, even if the plug-in -doesn't have control ports. The rest of the in- and outlets are for -audio input and output signals, respectively. - -The first inlet accepts other messages in addition to "control". You -can investigate the plug-in inputs and outputs by sending a "print" -message to the first inlet. You can reset the plug-in internal state -(clear delay lines etc.) by sending a "reset" message. - -Loading the plugin~ object --------------------------- -In order to be able to use the plugin~ object with Pd, you need to -start Pd with the "-lib" command line parameter. On Linux, the -plugin~ object resides in a library called "plugin~.pd_linux", while -on Windows the library is called "winplugintilde.dll". Thus, you need -to say either "pd -lib plugin~" (on Linux) or "pd -lib winplugintilde" -(on Windows) to start Pd with the plugin~ object loaded. - -You probably need to give the "-path" parameter to Pd as well in order -to specify the exact location of the "plugin~.pd_linux" (on Linux) or -"winplugintilde.dll" (on Windows) library file. By default, the -library file is installed to the "extra/plugin~" directory under your -Pd installation directory. - -Compiling the plugin~ object ----------------------------- -Linux. All the necessary files for compilation under Linux are -included in the distribution. Just type "./configure" and "make all -install" and you should be done. The plugin~ object file will be -installed in your Pd directory tree, in "extra/plugin~". You may -specify the path to your Pd directory with the "--with-pddir" argument -to configure, eg. like this: "./configure --with-pddir=/usr/local/pd". - -Windows. The winplugintilde.dll library is included in the plugin~ -distribution, in the directory "win", so it is not necessary to -compile plugin~. Anyhow, in order to compile plugin~ for VST plug-ins -yourself, you need to download the VST SDK from Steinberg and agree to -the Steinberg SDK license. The SDK and the license are available from -http://www.steinberg.net/developers/VST2SDKAbout.html. After -downloading you need to copy the files from the SDK subdirectory -"source/common" to the "vst" subdirectory of the plugin~ distribution. -You can then compile plugin~ using the ready-made project and -workspace files for Microsoft Visual C 6.0, found in the "win" -subdirectory. You will need to modify the MSVC project settings by -hand to point to your Pd directory. - -Remaining problems ------------------- -Pd. There is a problem with Pd which makes it really hard to send -"control" messages to parameters with a space character in the -parameter name such as "filter freq" or "filter q". When you -send a `control "filter freq" 440' message, Pd will (incorrectly) not -handle "filter freq" as one symbol. You can currently circumvent this -by addressing problematic control parameters by number instead of -name. - -LADSPA. No known issues. - -VST. plugin~ doesn't support VST 2.0 synthesizer plug-ins. -Additionally, the VST 1.0 plug-ins are required to implement the -processReplacing() interface in order for them to work with plugin~. -You will get an error message if this is not the case. Furthermore, -no graphics is displayed for the plug-ins; I am helplessly waiting for -someone to volunteer to add VST GUI support. Also, plugin~ should -observe the Windows registry (HKEY_LOCAL_MACHINE\Software\VST\VSTPluginsPath) -for the VST plug-in path. - -For more information, see: --------------------------- -[1] Pd: http://iem.kug.ac.at/pd/ -[2] LADSPA: http://www.ladspa.org/ -[3] VST: http://www.steinberg.net/ - -All trademarks are acknowledged. - -Jarno Seppänen, jams@cs.tut.fi diff --git a/plugin~_ladspa.c b/plugin~_ladspa.c deleted file mode 100644 index 9e7c8f3..0000000 --- a/plugin~_ladspa.c +++ /dev/null @@ -1,759 +0,0 @@ -/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins - Copyright (C) 2000 Jarno Seppänen - $Id: plugin~_ladspa.c,v 1.2 2003-01-23 12:32:04 ggeiger Exp $ - - This file is part of plugin~. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "config.h" -#if PLUGIN_TILDE_USE_LADSPA - -#include <assert.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "plugin~.h" -#include "plugin~_ladspa.h" -/* LADSPA header */ -#include "ladspa/ladspa.h" -/* LADSPA SDK helper functions loadLADSPAPluginLibrary() etc. */ -#include "jutils.h" - -#ifndef MIN -#define MIN(a,b) ((a)<(b)?(a):(b)) -#endif - - -const char* -plugin_tilde_ladspa_search_plugin (Pd_Plugin_Tilde* x, - const char* name) -{ - char* lib_name = NULL; - void* user_data[2]; - - user_data[0] = (void*)(&lib_name); - user_data[1] = (void*)name; - - lib_name = NULL; - LADSPAPluginSearch (plugin_tilde_ladspa_search_plugin_callback, - (void*)user_data); - - /* The callback (allocates and) writes lib_name, if it finds the plugin */ - return lib_name; -} - -static void -plugin_tilde_ladspa_search_plugin_callback (const char* full_filename, - void* plugin_handle, - LADSPA_Descriptor_Function descriptor_function, - void* user_data) -{ - const LADSPA_Descriptor* descriptor = NULL; - unsigned plug_index = 0; - - char** out_lib_name = (char**)(((void**)user_data)[0]); - char* name = (char*)(((void**)user_data)[1]); - - /* Stop searching when a first matching plugin is found */ - if (*out_lib_name == NULL) - { -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: searching library \"%s\"...", - full_filename); -#endif - - for (plug_index = 0; - (descriptor = descriptor_function (plug_index)) != NULL; - plug_index++) - { -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: label \"%s\"", - descriptor->Label); -#endif - - if (strcasecmp (name, descriptor->Label) == 0) - { - /* found a matching plugin */ - *out_lib_name = strdup (full_filename); - -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: found plugin \"%s\" in library \"%s\"", - name, full_filename); -#endif - - /* don't need to look any further */ - break; - } - } - } -} - -int -plugin_tilde_ladspa_open_plugin (Pd_Plugin_Tilde* x, - const char* name, - const char* lib_name, - unsigned long sample_rate) -{ - unsigned port_index; - - /* precondition(s) */ - assert (x != NULL); - assert (lib_name != NULL); - assert (name != NULL); - assert (sample_rate != 0); - - /* Initialize object struct */ - x->plugin.ladspa.type = NULL; - x->plugin.ladspa.instance = NULL; - x->plugin.ladspa.control_input_values = NULL; - x->plugin.ladspa.control_output_values = NULL; - x->plugin.ladspa.control_input_ports = NULL; - x->plugin.ladspa.control_output_ports = NULL; - x->plugin.ladspa.prev_control_output_values = NULL; - x->plugin.ladspa.prev_control_output_values_invalid = 1; - x->plugin.ladspa.outofplace_audio_outputs = NULL; - x->plugin.ladspa.actual_audio_outputs = NULL; - x->plugin.ladspa.num_samples = 0; - x->plugin.ladspa.sample_rate = sample_rate; - - /* Attempt to load the plugin. */ - x->plugin_library = loadLADSPAPluginLibrary (lib_name); - if (x->plugin_library == NULL) - { - /* error */ - error ("plugin~: Unable to load LADSPA plugin library \"%s\"", - lib_name); - return 1; - } - x->plugin.ladspa.type = findLADSPAPluginDescriptor (x->plugin_library, - lib_name, - name); - if (x->plugin.ladspa.type == NULL) - { - error ("plugin~: Unable to find LADSPA plugin \"%s\" within library \"%s\"", - name, lib_name); - return 1; - } - - /* Construct the plugin. */ - x->plugin.ladspa.instance - = x->plugin.ladspa.type->instantiate (x->plugin.ladspa.type, - sample_rate); - if (x->plugin.ladspa.instance == NULL) - { - /* error */ - error ("plugin~: Unable to instantiate LADSPA plugin \"%s\"", - x->plugin.ladspa.type->Name); - return 1; - } - -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: constructed plugin \"%s\" successfully", x->plugin.ladspa.type->Name); -#endif - - /* Find out the number of inputs and outputs needed. */ - plugin_tilde_ladspa_count_ports (x); - - /* Allocate memory for control values */ - if (plugin_tilde_ladspa_alloc_control_memory (x)) { - error ("plugin~: out of memory"); - return 1; /* error */ - } - - /* Connect control ports with buffers */ - plugin_tilde_ladspa_connect_control_ports (x); - - /* Activate the plugin. */ - if (x->plugin.ladspa.type->activate != NULL) - { - x->plugin.ladspa.type->activate (x->plugin.ladspa.instance); - } - - /* success */ - return 0; -} - -void -plugin_tilde_ladspa_close_plugin (Pd_Plugin_Tilde* x) -{ - /* precondition(s) */ - assert (x != NULL); - - if (x->plugin.ladspa.instance != NULL) - { - /* Deactivate the plugin. */ - if (x->plugin.ladspa.type->deactivate != NULL) - { - x->plugin.ladspa.type->deactivate (x->plugin.ladspa.instance); - } - - /* Destruct the plugin. */ - x->plugin.ladspa.type->cleanup (x->plugin.ladspa.instance); - x->plugin.ladspa.instance = NULL; - } - - /* Free the control value memory */ - plugin_tilde_ladspa_free_control_memory (x); - - if (x->plugin_library != NULL) - { - unloadLADSPAPluginLibrary (x->plugin_library); - x->plugin_library = NULL; - x->plugin.ladspa.type = NULL; - } - - /* Free the out-of-place memory */ - plugin_tilde_ladspa_free_outofplace_memory (x); -} - -void -plugin_tilde_ladspa_apply_plugin (Pd_Plugin_Tilde* x) -{ - unsigned i; - - /* Run the plugin on Pd's buffers */ - x->plugin.ladspa.type->run (x->plugin.ladspa.instance, - x->plugin.ladspa.num_samples); - - /* Copy out-of-place buffers to Pd buffers if used */ - if (x->plugin.ladspa.outofplace_audio_outputs != NULL) - { - for (i = 0; i < x->num_audio_outputs; i++) - { - unsigned j; - for (j = 0; j < (unsigned)x->plugin.ladspa.num_samples; j++) - { - x->plugin.ladspa.actual_audio_outputs[i][j] - = x->plugin.ladspa.outofplace_audio_outputs[i][j]; - } - } - } - - /* Compare control output values to previous and send control - messages, if necessary */ - for (i = 0; i < x->num_control_outputs; i++) - { - /* Check whether the prev values have been initialized; if - not, send a control message for each of the control outputs */ - if ((x->plugin.ladspa.control_output_values[i] - != x->plugin.ladspa.prev_control_output_values[i]) - || x->plugin.ladspa.prev_control_output_values_invalid) - { - /* Emit a control message */ - plugin_tilde_emit_control_output (x, - x->plugin.ladspa.type->PortNames[x->plugin.ladspa.control_output_ports[i]], - x->plugin.ladspa.control_output_values[i], - i); - /* Update the corresponding control monitoring value */ - x->plugin.ladspa.prev_control_output_values[i] = x->plugin.ladspa.control_output_values[i]; - } - } - x->plugin.ladspa.prev_control_output_values_invalid = 0; -} - -void -plugin_tilde_ladspa_print (Pd_Plugin_Tilde* x) -{ - unsigned port_index; - unsigned i; - - printf ("%s: \"%s\"; control %d in/%d out; audio %d in/%d out\n" - "Loaded from library \"%s\".\n", - x->plugin.ladspa.type->Label, - x->plugin.ladspa.type->Name, - x->num_control_inputs, - x->num_control_outputs, - x->num_audio_inputs, - x->num_audio_outputs, - x->plugin_library_filename); - - for (i = 1; i <= 4; i++) - { - unsigned count; - int print_controls = (i == 1 || i == 2); - int print_audios = (i == 3 || i == 4); - int print_inputs = (i == 1 || i == 3); - int print_outputs = (i == 2 || i == 4); - if (print_controls && print_inputs) - { - printf ("Control input(s):\n"); - } - else if (print_controls && print_outputs) - { - printf ("Control output(s):\n"); - } - else if (print_audios && print_inputs) - { - printf ("Audio input(s):\n"); - } - else if (print_audios && print_outputs) - { - printf ("Audio output(s):\n"); - } - count = 1; - for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) - { - LADSPA_PortDescriptor port_type; - port_type = x->plugin.ladspa.type->PortDescriptors[port_index]; - - if ((print_controls && LADSPA_IS_PORT_CONTROL (port_type) - || print_audios && LADSPA_IS_PORT_AUDIO (port_type)) - && - (print_inputs && LADSPA_IS_PORT_INPUT (port_type) - || print_outputs && LADSPA_IS_PORT_OUTPUT (port_type))) - { - printf (" #%d \"%s\"\n", - count, - x->plugin.ladspa.type->PortNames[port_index]); - /* the port hints could also be printed... */ - count++; - } - } - } -} - -void -plugin_tilde_ladspa_reset (Pd_Plugin_Tilde* x) -{ - /* precondition(s) */ - assert (x != NULL); - assert (x->plugin.ladspa.type != NULL); - assert (x->plugin.ladspa.instance != NULL); - - if (x->plugin.ladspa.type->activate != NULL - && x->plugin.ladspa.type->deactivate == NULL) - { - error ("plugin~: Warning: Plug-in defines activate() method but no deactivate() method"); - } - - /* reset plug-in by first deactivating and then re-activating it */ - if (x->plugin.ladspa.type->deactivate != NULL) - { - x->plugin.ladspa.type->deactivate (x->plugin.ladspa.instance); - } - if (x->plugin.ladspa.type->activate != NULL) - { - x->plugin.ladspa.type->activate (x->plugin.ladspa.instance); - } -} - -void -plugin_tilde_ladspa_connect_audio (Pd_Plugin_Tilde* x, - float** audio_inputs, - float** audio_outputs, - unsigned long num_samples) -{ - unsigned port_index = 0; - unsigned input_count = 0; - unsigned output_count = 0; - - /* Allocate out-of-place memory if needed */ - if (plugin_tilde_ladspa_alloc_outofplace_memory (x, num_samples)) { - error ("plugin~: out of memory"); - return; - } - - if (x->plugin.ladspa.outofplace_audio_outputs != NULL) { - x->plugin.ladspa.actual_audio_outputs = audio_outputs; - audio_outputs = x->plugin.ladspa.outofplace_audio_outputs; - } - - input_count = 0; - output_count = 0; - for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) - { - LADSPA_PortDescriptor port_type; - port_type = x->plugin.ladspa.type->PortDescriptors[port_index]; - if (LADSPA_IS_PORT_AUDIO (port_type)) - { - if (LADSPA_IS_PORT_INPUT (port_type)) - { - x->plugin.ladspa.type->connect_port (x->plugin.ladspa.instance, - port_index, - (LADSPA_Data*)audio_inputs[input_count]); - input_count++; - } - else if (LADSPA_IS_PORT_OUTPUT (port_type)) - { - x->plugin.ladspa.type->connect_port (x->plugin.ladspa.instance, - port_index, - (LADSPA_Data*)audio_outputs[output_count]); - output_count++; - } - } - } - - x->plugin.ladspa.num_samples = num_samples; -} - -void -plugin_tilde_ladspa_set_control_input_by_name (Pd_Plugin_Tilde* x, - const char* name, - float value) -{ - unsigned port_index = 0; - unsigned ctrl_input_index = 0; - int found_port = 0; /* boolean */ - - /* precondition(s) */ - assert (x != NULL); - - if (name == NULL || strlen (name) == 0) { - error ("plugin~: no control port name specified"); - return; - } - - /* compare control name to LADSPA control input ports' names - case-insensitively */ - found_port = 0; - ctrl_input_index = 0; - for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) - { - LADSPA_PortDescriptor port_type; - port_type = x->plugin.ladspa.type->PortDescriptors[port_index]; - if (LADSPA_IS_PORT_CONTROL (port_type) - && LADSPA_IS_PORT_INPUT (port_type)) - { - const char* port_name = NULL; - unsigned cmp_length = 0; - port_name = x->plugin.ladspa.type->PortNames[port_index]; - cmp_length = MIN (strlen (name), strlen (port_name)); - if (cmp_length != 0 - && strncasecmp (name, port_name, cmp_length) == 0) - { - /* found the first port to match */ - found_port = 1; - break; - } - ctrl_input_index++; - } - } - - if (!found_port) - { - error ("plugin~: plugin doesn't have a control input port named \"%s\"", - name); - return; - } - - plugin_tilde_ladspa_set_control_input_by_index (x, - ctrl_input_index, - value); -} - -void -plugin_tilde_ladspa_set_control_input_by_index (Pd_Plugin_Tilde* x, - unsigned ctrl_input_index, - float value) -{ - unsigned port_index = 0; - unsigned ctrl_input_count = 0; - int found_port = 0; /* boolean */ - int bounded_from_below = 0; - int bounded_from_above = 0; - int bounded = 0; - float lower_bound = 0; - float upper_bound = 0; - - /* precondition(s) */ - assert (x != NULL); - /* assert (ctrl_input_index >= 0); causes a warning */ - /* assert (ctrl_input_index < x->num_control_inputs); */ - if (ctrl_input_index >= x->num_control_inputs) { - error ("plugin~: control port number %d is out of range [1, %d]", - ctrl_input_index + 1, x->num_control_inputs); - return; - } - - /* bound parameter value */ - /* sigh, need to find the N'th ctrl input port by hand */ - found_port = 0; - ctrl_input_count = 0; - for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) - { - LADSPA_PortDescriptor port_type; - port_type = x->plugin.ladspa.type->PortDescriptors[port_index]; - if (LADSPA_IS_PORT_CONTROL (port_type) - && LADSPA_IS_PORT_INPUT (port_type)) - { - if (ctrl_input_index == ctrl_input_count) { - found_port = 1; - break; - } - ctrl_input_count++; - } - } - if (!found_port) { - error ("plugin~: plugin doesn't have %ud control input ports", - ctrl_input_index + 1); - return; - } - if (x->plugin.ladspa.type->PortRangeHints != NULL) { - const LADSPA_PortRangeHint* hint - = &x->plugin.ladspa.type->PortRangeHints[port_index]; - if (LADSPA_IS_HINT_BOUNDED_BELOW (hint->HintDescriptor)) { - bounded_from_below = 1; - lower_bound = hint->LowerBound; - if (LADSPA_IS_HINT_SAMPLE_RATE (hint->HintDescriptor)) { - assert (x->plugin.ladspa.sample_rate != 0); - lower_bound *= (float)x->plugin.ladspa.sample_rate; - } - } - if (LADSPA_IS_HINT_BOUNDED_ABOVE (hint->HintDescriptor)) { - bounded_from_above = 1; - upper_bound = hint->UpperBound; - if (LADSPA_IS_HINT_SAMPLE_RATE (hint->HintDescriptor)) { - assert (x->plugin.ladspa.sample_rate != 0); - upper_bound *= (float)x->plugin.ladspa.sample_rate; - } - } - } - bounded = 0; - if (bounded_from_below && value < lower_bound) { - value = lower_bound; - bounded = 1; - } - if (bounded_from_above && value > upper_bound) { - value = upper_bound; - bounded = 1; - } - if (bounded) { - fputs ("plugin~: warning: parameter limited to within ", stderr); - if (bounded_from_below) { - fprintf (stderr, "[%f, ", lower_bound); - } - else { - fputs ("(-inf, ", stderr); - } - if (bounded_from_above) { - fprintf (stderr, "%f]\n", upper_bound); - } - else { - fputs ("inf)\n", stderr); - } - } - /* set the appropriate control port value */ - x->plugin.ladspa.control_input_values[ctrl_input_index] = value; - -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: control change control input port #%ud to value %f", - ctrl_input_index + 1, value); -#endif -} - -static void -plugin_tilde_ladspa_count_ports (Pd_Plugin_Tilde* x) -{ - unsigned i = 0; - - x->num_audio_inputs = 0; - x->num_audio_outputs = 0; - x->num_control_inputs = 0; - x->num_control_outputs = 0; - - for (i = 0; i < x->plugin.ladspa.type->PortCount; i++) - { - LADSPA_PortDescriptor port_type; - port_type = x->plugin.ladspa.type->PortDescriptors[i]; - - if (LADSPA_IS_PORT_AUDIO (port_type)) - { - if (LADSPA_IS_PORT_INPUT (port_type)) - { - x->num_audio_inputs++; - } - else if (LADSPA_IS_PORT_OUTPUT (port_type)) - { - x->num_audio_outputs++; - } - } - else if (LADSPA_IS_PORT_CONTROL (port_type)) - { - if (LADSPA_IS_PORT_INPUT (port_type)) - { - x->num_control_inputs++; - } - else if (LADSPA_IS_PORT_OUTPUT (port_type)) - { - x->num_control_outputs++; - } - } - } - -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: plugin ports: audio %d/%d ctrl %d/%d", - x->num_audio_inputs, x->num_audio_outputs, - x->num_control_inputs, x->num_control_outputs); -#endif -} - -static void -plugin_tilde_ladspa_connect_control_ports (Pd_Plugin_Tilde* x) -{ - unsigned port_index = 0; - unsigned input_count = 0; - unsigned output_count = 0; - - input_count = 0; - output_count = 0; - for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) - { - LADSPA_PortDescriptor port_type; - port_type = x->plugin.ladspa.type->PortDescriptors[port_index]; - - if (LADSPA_IS_PORT_CONTROL (port_type)) - { - if (LADSPA_IS_PORT_INPUT (port_type)) - { - x->plugin.ladspa.type->connect_port (x->plugin.ladspa.instance, - port_index, - &x->plugin.ladspa.control_input_values[input_count]); - x->plugin.ladspa.control_input_ports[input_count] = port_index; - input_count++; - } - else if (LADSPA_IS_PORT_OUTPUT (port_type)) - { - x->plugin.ladspa.type->connect_port (x->plugin.ladspa.instance, - port_index, - &x->plugin.ladspa.control_output_values[output_count]); - x->plugin.ladspa.control_output_ports[output_count] = port_index; - - output_count++; - } - } - } -} - -static int -plugin_tilde_ladspa_alloc_outofplace_memory (Pd_Plugin_Tilde* x, unsigned long buflen) -{ - assert (x != NULL); - - plugin_tilde_ladspa_free_outofplace_memory (x); - - if (LADSPA_IS_INPLACE_BROKEN (x->plugin.ladspa.type->Properties) - || PLUGIN_TILDE_FORCE_OUTOFPLACE) - { - unsigned i = 0; - - x->plugin.ladspa.outofplace_audio_outputs = (t_float**) - calloc (x->num_audio_outputs, sizeof (t_float*)); - if (x->plugin.ladspa.outofplace_audio_outputs == NULL) { - return 1; /* error */ - } - - for (i = 0; i < x->num_audio_outputs; i++) - { - x->plugin.ladspa.outofplace_audio_outputs[i] = (t_float*) - calloc (buflen, sizeof (t_float)); - if (x->plugin.ladspa.outofplace_audio_outputs[i] == NULL) { - /* FIXME free got buffers? */ - return 1; /* error */ - } - } - } - return 0; /* success */ -} - -static void -plugin_tilde_ladspa_free_outofplace_memory (Pd_Plugin_Tilde* x) -{ - assert (x != NULL); - - if (x->plugin.ladspa.outofplace_audio_outputs != NULL) - { - unsigned i = 0; - for (i = 0; i < x->num_audio_outputs; i++) - { - free (x->plugin.ladspa.outofplace_audio_outputs[i]); - } - free (x->plugin.ladspa.outofplace_audio_outputs); - x->plugin.ladspa.outofplace_audio_outputs = NULL; - } -} - -static int -plugin_tilde_ladspa_alloc_control_memory (Pd_Plugin_Tilde* x) -{ - x->plugin.ladspa.control_input_values = NULL; - x->plugin.ladspa.control_input_ports = NULL; - if (x->num_control_inputs > 0) - { - x->plugin.ladspa.control_input_values = (float*)calloc - (x->num_control_inputs, sizeof (float)); - x->plugin.ladspa.control_input_ports = (int*)calloc - (x->num_control_inputs, sizeof (int)); - if (x->plugin.ladspa.control_input_values == NULL - || x->plugin.ladspa.control_input_ports == NULL) { - return 1; /* error */ - } - } - x->plugin.ladspa.control_output_values = NULL; - x->plugin.ladspa.control_output_ports = NULL; - x->plugin.ladspa.prev_control_output_values = NULL; - if (x->num_control_outputs > 0) - { - x->plugin.ladspa.control_output_values = (float*)calloc - (x->num_control_outputs, sizeof (float)); - x->plugin.ladspa.control_output_ports = (int*)calloc - (x->num_control_outputs, sizeof (int)); - x->plugin.ladspa.prev_control_output_values = (float*)calloc - (x->num_control_outputs, sizeof (float)); - if (x->plugin.ladspa.control_output_values == NULL - || x->plugin.ladspa.prev_control_output_values == NULL - || x->plugin.ladspa.control_output_ports == NULL) { - return 1; /* error */ - } - } - /* Indicate initial conditions */ - x->plugin.ladspa.prev_control_output_values_invalid = 1; - return 0; /* success */ -} - -static void -plugin_tilde_ladspa_free_control_memory (Pd_Plugin_Tilde* x) -{ - if (x->plugin.ladspa.control_input_values != NULL) - { - free (x->plugin.ladspa.control_input_values); - x->plugin.ladspa.control_input_values = NULL; - } - if (x->plugin.ladspa.control_output_values != NULL) - { - free (x->plugin.ladspa.control_output_values); - x->plugin.ladspa.control_output_values = NULL; - } - if (x->plugin.ladspa.prev_control_output_values != NULL) - { - free (x->plugin.ladspa.prev_control_output_values); - x->plugin.ladspa.prev_control_output_values = NULL; - } - if (x->plugin.ladspa.control_input_ports != NULL) - { - free (x->plugin.ladspa.control_input_ports); - x->plugin.ladspa.control_input_ports = NULL; - } - if (x->plugin.ladspa.control_output_ports != NULL) - { - free (x->plugin.ladspa.control_output_ports); - x->plugin.ladspa.control_output_ports = NULL; - } -} - -#endif /* PLUGIN_TILDE_USE_LADSPA */ - -/* EOF */ diff --git a/plugin~_ladspa.h b/plugin~_ladspa.h deleted file mode 100644 index ce94e43..0000000 --- a/plugin~_ladspa.h +++ /dev/null @@ -1,109 +0,0 @@ -/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins - Copyright (C) 2000 Jarno Seppänen - $Id: plugin~_ladspa.h,v 1.2 2003-01-23 12:32:04 ggeiger Exp $ - - This file is part of plugin~. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef __PLUGIN_TILDE_LADSPA_H__ -#define __PLUGIN_TILDE_LADSPA_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include "config.h" - -#if PLUGIN_TILDE_USE_LADSPA - -#include "plugin~.h" - -/* LADSPA header */ -#include "ladspa/ladspa.h" - -#if 0 /* moved to plugin~.h because of cyclical header dependency */ -typedef struct -{ - const LADSPA_Descriptor* type; - LADSPA_Handle* instance; - - /* Memory to pass async control data to/from the plugin */ - float* control_input_values; - float* control_output_values; - - /* Used for monitoring changes in the values */ - float* prev_control_output_values; - int prev_control_output_values_invalid; - - /* Pointers to signal memory for out-of-place processing */ - float** outofplace_audio_outputs; - float** actual_audio_outputs; /* real audio outputs for out-of-place */ - - unsigned long num_samples; - unsigned long sample_rate; - -} Plugin_Tilde_Ladspa; -#endif /* moved to plugin~.h because of cyclical header dependency */ - - -/* subroutines to wrap the LADSPA interface */ -const char* plugin_tilde_ladspa_search_plugin (Pd_Plugin_Tilde* x, - const char* name); -int plugin_tilde_ladspa_open_plugin (Pd_Plugin_Tilde* x, - const char* name, - const char* lib_name, - unsigned long sample_rate); -void plugin_tilde_ladspa_close_plugin (Pd_Plugin_Tilde* x); -void plugin_tilde_ladspa_apply_plugin (Pd_Plugin_Tilde* x); - -void plugin_tilde_ladspa_print (Pd_Plugin_Tilde* x); -void plugin_tilde_ladspa_reset (Pd_Plugin_Tilde* x); - -void plugin_tilde_ladspa_connect_audio (Pd_Plugin_Tilde* x, - float** audio_inputs, - float** audio_outputs, - unsigned long num_samples); -void plugin_tilde_ladspa_set_control_input_by_name (Pd_Plugin_Tilde* x, - const char* name, - float value); -void plugin_tilde_ladspa_set_control_input_by_index (Pd_Plugin_Tilde* x, - unsigned index_, - float value); -/*float plugin_tilde_ladspa_get_control_input (Pd_Plugin_Tilde* x, - const char* name);*/ -/* Control output is handled with plugin_tilde_emit_control_output() callback */ - -/* Local subroutines */ -static void plugin_tilde_ladspa_search_plugin_callback (const char* full_filename, - void* plugin_handle, - LADSPA_Descriptor_Function descriptor_function, - void* user_data); -static void plugin_tilde_ladspa_count_ports (Pd_Plugin_Tilde* x); -static void plugin_tilde_ladspa_connect_control_ports (Pd_Plugin_Tilde* x); - -static int plugin_tilde_ladspa_alloc_outofplace_memory (Pd_Plugin_Tilde* x, unsigned long buflen); -static void plugin_tilde_ladspa_free_outofplace_memory (Pd_Plugin_Tilde* x); -static int plugin_tilde_ladspa_alloc_control_memory (Pd_Plugin_Tilde* x); -static void plugin_tilde_ladspa_free_control_memory (Pd_Plugin_Tilde* x); - -#endif /* PLUGIN_TILDE_USE_LADSPA */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __PLUGIN_TILDE_LADSPA_H__ */ -/* EOF */ diff --git a/plugin~_vst.c b/plugin~_vst.c deleted file mode 100644 index ed05a00..0000000 --- a/plugin~_vst.c +++ /dev/null @@ -1,501 +0,0 @@ -/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins - Copyright (C) 2000 Jarno Seppänen - $Id: plugin~_vst.c,v 1.2 2003-01-23 12:32:04 ggeiger Exp $ - - This file is part of plugin~. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "config.h" -#if PLUGIN_TILDE_USE_VST - -#include <assert.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "plugin~.h" -#include "plugin~_vst.h" -/* VST header */ -#include "vst/AEffect.h" -/* VST dll helper functions */ -#include "vstutils.h" -#ifdef WIN32 -#include "win/vitunmsvc.h" /* strncasecmp() */ -#include <windows.h> /* GetForegroundWindow() */ -#endif - -#ifndef MIN -#define MIN(a,b) ((a)<(b)?(a):(b)) -#endif - - -const char* -plugin_tilde_vst_search_plugin (Pd_Plugin_Tilde* x, - const char* name) -{ - /* searching through VST libraries not supported */ - error ("plugin~: warning: searching through VST libraries not supported"); - return NULL; -} - -int -plugin_tilde_vst_open_plugin (Pd_Plugin_Tilde* x, - const char* name, - const char* lib_name, - unsigned long sample_rate) -{ - unsigned port_index; - - /* precondition(s) */ - assert (x != NULL); - /* name is unused */ - assert (lib_name != NULL); - assert (sample_rate != 0); - - /* Initialize object struct */ - x->plugin.vst.instance = NULL; - x->plugin.vst.audio_inputs = NULL; - x->plugin.vst.audio_outputs = NULL; - x->plugin.vst.num_samples = 0; - x->plugin.vst.editor_open = 0; - - /* Attempt to load the plugin. */ - x->plugin_library = vstutils_load_vst_plugin_dll (lib_name); - if (x->plugin_library == NULL) - { - error ("plugin~: Unable to load VST plugin library \"%s\"", - lib_name); - return 1; - } - - /* Construct the plugin. This is supposed to call - the AudioEffect::AudioEffect() ctor eventually */ - x->plugin.vst.instance - = vstutils_init_vst_plugin (x->plugin_library, - lib_name, - plugin_tilde_vst_audioMaster); - if (x->plugin.vst.instance == NULL) { - error ("plugin~: Unable to instantiate VST plugin from library \"%s\"", - lib_name); - return 1; - } - - /* Stuff Pd_Plugin_Tilde* x into user field of AEffect for audioMaster() to use */ - x->plugin.vst.instance->user = x; - - /* Call plugin open() (through dispatcher()) in order to ensure - plugin is properly constructed */ - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effOpen, - 0, 0, NULL, 0); - -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~: constructed VST plugin \"%s\" successfully", - lib_name); -#endif - - /* Check another strange id */ - if (x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effIdentify, - 0, 0, NULL, 0) - != 'NvEf') { - error ("plugin~_vst: warning: VST plugin malfunction (effIdentify != 'NvEf')"); - } - - /* Tell the sample rate and frame length to the VST plug-in */ - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effSetSampleRate, - 0, 0, NULL, (float)sample_rate); - /* FIXME just give some value since it will be changed later */ - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effSetBlockSize, - 0, 16, NULL, 0); - - /* Find out the number of inputs and outputs needed (all VST - parameters can be automated i.e. output if the plug-in so wants - and the GUI can be operated). */ - x->num_audio_inputs = x->plugin.vst.instance->numInputs; - x->num_audio_outputs = x->plugin.vst.instance->numOutputs; - x->num_control_inputs = x->plugin.vst.instance->numParams; - x->num_control_outputs = x->plugin.vst.instance->numParams; - - /* Make sure that processReplacing() is implemented */ - if (x->plugin.vst.instance->flags & effFlagsCanReplacing == 0) { - error ("plugin~_vst: sorry, this VST plug-in type isn't supported (processReplacing() not implemented)"); - return 1; - } - - /* Activate the plugin. */ - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effMainsChanged, - 0, 1, NULL, 0); - - /* Finally, attempt open editor GUI if available */ - plugin_tilde_vst_open_editor (x); - - /* Make sure the user data still is there */ - assert (x->plugin.vst.instance->user == x); - - /* success */ - return 0; -} - -void -plugin_tilde_vst_close_plugin (Pd_Plugin_Tilde* x) -{ - /* precondition(s) */ - assert (x != NULL); - - /* Attempt to close editor GUI */ - plugin_tilde_vst_close_editor (x); - - if (x->plugin.vst.instance != NULL) - { - /* Deactivate the plugin. */ - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effMainsChanged, - 0, 0, NULL, 0); - - /* Destruct the plugin. This is supposed to translate to - a call to the AudioEffect::~AudioEffect() dtor */ - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effClose, - 0, 0, NULL, 0); - x->plugin.vst.instance = NULL; - } - - if (x->plugin_library != NULL) - { - vstutils_unload_vst_plugin_dll (x->plugin_library); - x->plugin_library = NULL; - } -} - -void -plugin_tilde_vst_apply_plugin (Pd_Plugin_Tilde* x) -{ - /* Run the plugin on Pd's buffers */ - /* FIXME need to implement out-of-place buffers and zero them here - if processReplacing() isn't implemented */ - x->plugin.vst.instance->processReplacing (x->plugin.vst.instance, - x->plugin.vst.audio_inputs, - x->plugin.vst.audio_outputs, - x->plugin.vst.num_samples); -} - -void -plugin_tilde_vst_print (Pd_Plugin_Tilde* x) -{ - unsigned i; - - printf ("control %d in/out; audio %d in/%d out\n" - "Loaded from library \"%s\".\n", - x->num_control_inputs, - x->num_audio_inputs, - x->num_audio_outputs, - x->plugin_library_filename); - - for (i = 0; i < x->num_control_inputs; i++) { - /* the Steinberg(tm) way... */ - char name[9]; - char display[25]; - char label[9]; - if (i == 0) { - printf ("Control input/output(s):\n"); - } - memset (name, 0, 9); - memset (display, 0, 25); - memset (label, 0, 9); - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effGetParamName, - i, 0, name, 0); - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effGetParamDisplay, - i, 0, display, 0); - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effGetParamLabel, - i, 0, label, 0); - printf (" #%d \"%s\" (%s %s)\n", - i + 1, name, display, label); - } -} - -void -plugin_tilde_vst_reset (Pd_Plugin_Tilde* x) -{ - /* precondition(s) */ - assert (x != NULL); - /* reset plug-in by first deactivating and then re-activating it */ - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effMainsChanged, - 0, 0, NULL, 0); - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effMainsChanged, - 0, 1, NULL, 0); -} - -void -plugin_tilde_vst_connect_audio (Pd_Plugin_Tilde* x, - float** audio_inputs, - float** audio_outputs, - unsigned long num_samples) -{ - assert (x != NULL); - assert (audio_inputs != NULL); - assert (audio_outputs != NULL); - x->plugin.vst.audio_inputs = audio_inputs; - x->plugin.vst.audio_outputs = audio_outputs; - x->plugin.vst.num_samples = num_samples; - /* Tell the block size to the VST plug-in */ - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effMainsChanged, - 0, 0, NULL, 0); - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effSetBlockSize, - 0, num_samples, NULL, 0); - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effMainsChanged, - 0, 1, NULL, 0); -} - -void -plugin_tilde_vst_set_control_input_by_name (Pd_Plugin_Tilde* x, - const char* name, - float value) -{ - unsigned parm_index; - int found_port; /* boolean */ - char parm_name[9]; /* the Steinberg(tm) way! */ - - /* precondition(s) */ - assert (x != NULL); - - /* compare control name to VST parameters' names - case-insensitively */ - found_port = 0; - for (parm_index = 0; parm_index < x->num_control_inputs; parm_index++) - { - unsigned cmp_start, cmp_length; - memset (parm_name, 0, 9); - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effGetParamName, - parm_index, 0, parm_name, 0); - /* skip any initial whitespace */ - cmp_start = 0; - while (parm_name[cmp_start] != 0 - && parm_name[cmp_start] == ' ') { - cmp_start++; - } - cmp_length = MIN (strlen (name), strlen (&parm_name[cmp_start])); - if (cmp_length != 0 - && strncasecmp (name, &parm_name[cmp_start], cmp_length) == 0) - { - /* found the first port to match */ - found_port = 1; - break; - } - } - - if (!found_port) - { - error ("plugin~: VST plugin doesn't have a parameter named \"%s\"", - name); - return; - } - - plugin_tilde_vst_set_control_input_by_index (x, - parm_index, - value); -} - -void -plugin_tilde_vst_set_control_input_by_index (Pd_Plugin_Tilde* x, - unsigned index_, - float value) -{ - char name[9]; /* the Steinberg(tm) way! */ - - /* precondition(s) */ - assert (x != NULL); - /* assert (index_ >= 0); causes a warning */ - assert (index_ < x->num_control_inputs); - - /* Limit parameter to range [0, 1] */ - if (value < 0.0 || value > 1.0) { - if (value < 0.0) { - value = 0.0; - } - else { - value = 1.0; - } - error ("plugin~: warning: parameter limited to within [0, 1]"); - } - - /* set the appropriate control port value */ - x->plugin.vst.instance->setParameter (x->plugin.vst.instance, - index_, - value); - -#if PLUGIN_TILDE_DEBUG - memset (name, 0, 9); - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effGetParamName, - index_, 0, name, 0); - error ("DEBUG plugin~_vst: control change parameter #%ud: \"%s\" to value %f", - index_ + 1, name, value); -#endif -} - -static long -plugin_tilde_vst_audioMaster (AEffect* effect, - long opcode, - long index, - long value, - void* ptr, - float opt) -{ - char param_name[9]; -#if 0 /*PLUGIN_TILDE_DEBUG*/ - error ("DEBUG plugin~_vst: audioMaster(0x%p, %ld, %ld, %ld, 0x%p, %f)", - effect, opcode, index, value, ptr, opt); -#endif - - switch (opcode) { - case audioMasterAutomate: - assert (effect != NULL); - assert (effect->user != NULL); /* this is Pd_Plugin_Tilde* */ - effect->setParameter (effect, index, opt); - /* Send "control" messages from here */ - memset (param_name, 0, 9); - effect->dispatcher (effect, effGetParamName, index, 0, param_name, 0); - plugin_tilde_emit_control_output (effect->user, param_name, opt, index); - return 0; - break; - case audioMasterVersion: - return 1; - break; - case audioMasterCurrentId: - return 0; - break; - case audioMasterIdle: - effect->dispatcher (effect, effEditIdle, 0, 0, NULL, 0); - return 0; - break; - case audioMasterPinConnected: - /* return 0="true" for all inquiries for now */ - return 0; - break; - } -#if 0 /*PLUGIN_TILDE_DEBUG*/ - error ("DEBUG plugin~_vst: warning: unsupported audioMaster opcode"); -#endif - return 0; -} - -static void -plugin_tilde_vst_open_editor (Pd_Plugin_Tilde* x) -{ -#if 0 /* FIXME doesn't work */ -#ifdef WIN32 - HWND parent; - - /* precondition(s) */ - assert (x != NULL); - -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~_vst: open_editor()"); -#endif - - if ((x->plugin.vst.instance->flags & effFlagsHasEditor) == 0 - || x->plugin.vst.editor_open == 1) { - /* no editor or editor already open */ - return; - } - - /* Hmph, don't know about the Pd window, so give the desktop as - the parent to the plug-in; we could actually use - GetForegroundWindow(), since the user is currently typing into - the pd subpatch window */ - /*parent = GetDesktopWindow ();*/ - parent = GetForegroundWindow (); - /*parent = NULL;*/ - - /* Open the editor! */ - if (!x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effEditOpen, - 0, 0, parent, 0)) { - /* no luck error */ - error ("plugin~_vst: couldn't open editor"); - } else { - x->plugin.vst.editor_open = 1; - } -#endif /* WIN32 */ -#endif /* FIXME doesn't work */ -} - -static void -plugin_tilde_vst_close_editor (Pd_Plugin_Tilde* x) -{ -#if 0 /* FIXME doesn't work */ -#ifdef WIN32 - - /* precondition(s) */ - assert (x != NULL); - -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~_vst: close_editor()"); -#endif - - if ((x->plugin.vst.instance->flags & effFlagsHasEditor) == 0 - || x->plugin.vst.editor_open == 0) { - /* no editor or it isn't open */ - return; - } - - /* Close the editor */ - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effEditClose, - 0, 0, NULL, 0); - x->plugin.vst.editor_open = 0; - -#endif /* WIN32 */ -#endif /* FIXME doesn't work */ -} - -void -plugin_tilde_vst_update_gui (Pd_Plugin_Tilde* x) -{ -#if 0 /* FIXME doesn't work */ -#ifdef WIN32 - - /* precondition(s) */ - assert (x != NULL); - -#if PLUGIN_TILDE_DEBUG - error ("DEBUG plugin~_vst: update_gui()"); -#endif - if (x->plugin.vst.editor_open) { - x->plugin.vst.instance->dispatcher (x->plugin.vst.instance, - effEditIdle, - 0, 0, NULL, 0); - } -#endif /* WIN32 */ -#endif /* FIXME doesn't work */ -} - -#endif /* PLUGIN_TILDE_USE_VST */ - -/* EOF */ diff --git a/plugin~_vst.h b/plugin~_vst.h deleted file mode 100644 index 7a552df..0000000 --- a/plugin~_vst.h +++ /dev/null @@ -1,96 +0,0 @@ -/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins - Copyright (C) 2000 Jarno Seppänen - $Id: plugin~_vst.h,v 1.1 2002-11-19 09:51:40 ggeiger Exp $ - - This file is part of plugin~. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef __PLUGIN_TILDE_VST_H__ -#define __PLUGIN_TILDE_VST_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include "config.h" - -#if PLUGIN_TILDE_USE_VST - -#include "plugin~.h" - -/* VST header */ -#include "vst/AEffect.h" - -#if 0 /* moved to plugin~.h because of cyclical header dependency */ -typedef struct -{ - AEffect* instance; - - /* audio wire buffer information */ - float** audio_inputs; - float** audio_outputs; - unsigned long num_samples; - - int editor_open; -} Plugin_Tilde_Vst; -#endif /* moved to plugin~.h because of cyclical header dependency */ - - -/* subroutines to wrap the VST interface */ -const char* plugin_tilde_vst_search_plugin (Pd_Plugin_Tilde* x, - const char* name); -int plugin_tilde_vst_open_plugin (Pd_Plugin_Tilde* x, - const char* name, - const char* lib_name, - unsigned long sample_rate); -void plugin_tilde_vst_close_plugin (Pd_Plugin_Tilde* x); -void plugin_tilde_vst_apply_plugin (Pd_Plugin_Tilde* x); - -void plugin_tilde_vst_print (Pd_Plugin_Tilde* x); -void plugin_tilde_vst_reset (Pd_Plugin_Tilde* x); - -void plugin_tilde_vst_connect_audio (Pd_Plugin_Tilde* x, - float** audio_inputs, - float** audio_outputs, - unsigned long num_samples); -void plugin_tilde_vst_set_control_input_by_name (Pd_Plugin_Tilde* x, - const char* name, - float value); -void plugin_tilde_vst_set_control_input_by_index (Pd_Plugin_Tilde* x, - unsigned index_, - float value); - - -/* subroutines needed by the VST interface */ -static long plugin_tilde_vst_audioMaster (AEffect* effect, - long opcode, - long index, - long value, - void* ptr, - float opt); - -static void plugin_tilde_vst_open_editor (Pd_Plugin_Tilde* x); -static void plugin_tilde_vst_close_editor (Pd_Plugin_Tilde* x); -void plugin_tilde_vst_update_gui (Pd_Plugin_Tilde* x); - -#endif /* PLUGIN_TILDE_USE_VST */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __PLUGIN_TILDE_VST_H__ */ -/* EOF */ diff --git a/version.h b/version.h deleted file mode 100644 index 0a90a66..0000000 --- a/version.h +++ /dev/null @@ -1,28 +0,0 @@ -/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins - Copyright (C) 2000 Jarno Seppänen - $Id: version.h,v 1.1 2002-11-19 10:06:40 ggeiger Exp $ - - This file is part of plugin~. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef __PLUGIN_TILDE_VERSION_H__ -#define __PLUGIN_TILDE_VERSION_H__ - -#ifndef PLUGIN_TILDE_VERSION -#define PLUGIN_TILDE_VERSION "0.2" -#endif - -#endif /* __PLUGIN_TILDE_VERSION_H__ */ diff --git a/version.h.in b/version.h.in deleted file mode 100644 index 26b7753..0000000 --- a/version.h.in +++ /dev/null @@ -1,28 +0,0 @@ -/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins - Copyright (C) 2000 Jarno Seppänen - $Id: version.h.in,v 1.1 2002-11-19 09:51:40 ggeiger Exp $ - - This file is part of plugin~. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef __PLUGIN_TILDE_VERSION_H__ -#define __PLUGIN_TILDE_VERSION_H__ - -#ifndef PLUGIN_TILDE_VERSION -#define PLUGIN_TILDE_VERSION "@VERSION@" -#endif - -#endif /* __PLUGIN_TILDE_VERSION_H__ */ diff --git a/vstutils.c b/vstutils.c deleted file mode 100644 index 5f81f06..0000000 --- a/vstutils.c +++ /dev/null @@ -1,216 +0,0 @@ -/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins - Copyright (C) 2001 Jarno Seppänen - Copyright (C) 2000 Richard W.E. Furse - $Id: vstutils.c,v 1.1 2002-11-19 09:51:40 ggeiger Exp $ - - This file is part of plugin~. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef WIN32 /* currently for Windows only */ - -#include <assert.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "vst/AEffect.h" /* VST-specific stuff */ -#include <windows.h> /* LoadLibrary, FreeLibrary etc. Windows-specific */ -#include "vstutils.h" -#include "win/vitunmsvc.h" /* strncasecmp */ - -/* OS-specific things */ -#ifdef WIN32 -#define CHR_DIR_SLASH '\\' -#define CHR_PATH_DELIM ';' -#define STR_DIR_SLASH "\\" -#define STR_LIB_SUFFIX ".dll" -#endif -#ifdef __linux__ /* FIXME? */ -#define CHR_DIR_SLASH '/' -#define CHR_PATH_DELIM ':' -#define STR_DIR_SLASH "/" -#define STR_LIB_SUFFIX ".so" -#endif - -void* -vstutils_load_vst_plugin_dll (const char* plugin_dll_filename) -{ - HINSTANCE* dll = NULL; - - char* buf = NULL; - size_t fnlength = 0; - const size_t suffixlength = strlen (STR_LIB_SUFFIX); - - /* precondition */ - assert (plugin_dll_filename != NULL); - - dll = (HINSTANCE*)calloc (1, sizeof (HINSTANCE)); - fnlength = strlen (plugin_dll_filename); - - /* assure the file name ends in ".so", ".dll" or equivalent */ - if (fnlength > suffixlength) { - int has_lib_suffix = 0; - has_lib_suffix - = (strncasecmp (&plugin_dll_filename[fnlength - suffixlength], - STR_LIB_SUFFIX, - suffixlength + 1) - == 0); - if (!has_lib_suffix) { - buf = calloc (fnlength + suffixlength + 1, sizeof (char)); - strcpy (buf, plugin_dll_filename); - strcat (buf, STR_LIB_SUFFIX); - plugin_dll_filename = buf; - fnlength += suffixlength; - } - } - - /* First we just try loading by absolute directory name or via - default system paths. */ - *dll = LoadLibrary (plugin_dll_filename); - if (*dll != NULL) { - goto VSTUTILS_LOAD_DLL_RETURN_DLL; - } - - /* If the filename is not absolute then we wish to check along the - VST_PATH to see if we can find the file there. */ - if (plugin_dll_filename[0] != CHR_DIR_SLASH) { - const char* vst_path = getenv ("VST_PATH"); - if (vst_path != NULL) { - const char* dir_start = NULL; - const char* dir_end = NULL; - dir_start = vst_path; - while (*dir_start != '\0') { - dir_end = dir_start; - while (*dir_end != CHR_PATH_DELIM - && *dir_end != '\0') { - dir_end++; - } - if (dir_end > dir_start) { - char* absfn = NULL; /* absolute filename */ - absfn = calloc (dir_end - dir_start /* directory */ - + 1 /* slash */ - + fnlength /* basename */ - + 1, /* null */ - sizeof (char)); - /* start with directory */ - strncpy (absfn, dir_start, dir_end - dir_start); - /* append slash if necessary */ - if (*(dir_end - 1) != CHR_DIR_SLASH) { - strcat (absfn, STR_DIR_SLASH); - } - /* finally append dll filename */ - strcat (absfn, plugin_dll_filename); -#if 0 - fprintf (stderr, "plugin~_vst: attempting \"%s\"\n", absfn); -#endif - *dll = LoadLibrary (absfn); - free (absfn); - if (*dll != NULL) { - goto VSTUTILS_LOAD_DLL_RETURN_DLL; - } - } - /* if not found, try next directory from path */ - dir_start = dir_end; - if (*dir_start == CHR_PATH_DELIM) { - dir_start++; - } - } - } else { - fputs ("warning: You haven't specified the VST_PATH environment variable and didn't specify an absolute path to the plug-in.\n" - "Please set the VST_PATH variable to point to your VST plug-in directories (eg. \"set VST_PATH=C:\\Program Files\\Steinberg\\Vstplugins\").\n", stderr); - } - } - - /* No luck */ - assert (*dll == NULL); - free (dll); - /* remember to check and free buf! */ - if (buf != NULL) { - free (buf); - buf = NULL; - } - return NULL; - - VSTUTILS_LOAD_DLL_RETURN_DLL: - assert (*dll != NULL); - /* remember to check and free buf! */ - if (buf != NULL) { - free (buf); - buf = NULL; - } - return dll; -} - -void -vstutils_unload_vst_plugin_dll (void* plugin_dll) -{ - HINSTANCE* dll = plugin_dll; - if (dll != NULL) { - FreeLibrary (*dll); - *dll = NULL; - free (plugin_dll); - } -} - -AEffect* -vstutils_init_vst_plugin (void* plugin_dll, - const char* plugin_dll_filename, - audioMasterCallback am) -{ - typedef AEffect* (*vst_main_func)(audioMasterCallback am); - HINSTANCE* dll = plugin_dll; - vst_main_func vstmain; - AEffect* plugin = NULL; - - if (plugin_dll == NULL - || *dll == NULL) { - return NULL; - } - - vstmain = (vst_main_func)GetProcAddress (*dll, "main"); - if (vstmain == NULL) { - char* error = NULL; - FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError (), - MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), - error, - 0, - NULL); - fprintf (stderr, - "Unable to find main() function in VST plugin " - "DLL file \"%s\": %s.\n" - "Are you sure this is a VST plugin file?\n", - plugin_dll_filename, error); - LocalFree (error); - } - /* Initialize plugin */ - plugin = vstmain (am); - - /* Check that what we have loaded really IS a VST plugin */ - if (plugin->magic != kEffectMagic) { - fprintf (stderr, - "DLL file \"%s\" is not a genuine VST plugin.\n", - plugin_dll_filename); - return NULL; - } - return plugin; -} - -#endif /* WIN32 */ - -/* EOF */ diff --git a/vstutils.h b/vstutils.h deleted file mode 100644 index 1069d60..0000000 --- a/vstutils.h +++ /dev/null @@ -1,48 +0,0 @@ -/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins - Copyright (C) 2001 Jarno Seppänen - Copyright (C) 2000 Richard W.E. Furse - $Id: vstutils.h,v 1.1 2002-11-19 09:51:40 ggeiger Exp $ - - This file is part of plugin~. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef __VSTUTILS_H__ -#define __VSTUTILS_H__ - -#ifdef WIN32 /* currently for Windows only */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* VST SDK header */ -#include "vst/AEffect.h" - -void* vstutils_load_vst_plugin_dll (const char* plugin_dll_filename); -void vstutils_unload_vst_plugin_dll (void* plugin_dll); -AEffect* vstutils_init_vst_plugin (void* plugin_dll, - const char* plugin_dll_filename, - audioMasterCallback am); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* WIN32 */ - -#endif /* __VSTUTILS_H__ */ -/* EOF */ |