transcalc-0.14/0000777000175000017500000000000007715600454007165 5transcalc-0.14/README0000644000175000017500000000343607520053027007757 TRANSCALC - Analysis and Synthesis tool for microwave and RF transmission lines (v0.14) Copyright (C) 2001-2002 Gopal Narayanan Transcalc is an analysis and synthesis tool for calculating the electrical and physical properties of different kinds of RF and microwave transmission lines. Transcalc was somewhat inspired by the functionality of Agilent Technologies' commercial program linecalc. Transcalc aspires to be more functional in the long run and well-documented with appropriate references to formulas that are used. Transcalc is built using the GIMP toolkit (GTK) for its GUI interface. For each type of transmission line, using dialog boxes, you can enter values for the various parameters, and either calculate its electrical properties (analyze), or use the given electrical requirements to sythesize physical parameters of the required transmission line. Available transmission lines (this list will expand with subsequent releases): * microstrip * rectangular waveguide * coax * coupled microstrip Copyright (C) 2001-2002 Gopal Narayanan transcalc 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 Comments are welcome. - Gopal Narayanan transcalc-0.14/stamp-h.in0000644000175000017500000000001207715577532011005 timestamp transcalc-0.14/AUTHORS0000644000175000017500000000026507514544004010147 Gopal Narayanan Claudio Girardi Credits: Mike Ferrara contributed the Newton code for synthesizing microstrip lines.transcalc-0.14/COPYING0000644000175000017500000004311007310030502010111 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. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 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. transcalc-0.14/ChangeLog0000644000175000017500000000505107715600021010642 2003-08-10 Gopal Narayanan * Fixed multiline string problems in help.h which prevented compilation in gcc >3.2 * Moved build environment automake, autoheader, autoconf to a more modern version (autoconf support is for >2.50). * Ported transcalc to gtk2.0, which means that the dependency on gdk-imlib is now gone. gtk2.0 included gdk-imlib natively. * Release transcalc version 0.14. 2002-07-24 Claudio Girardi * Changed version number in CVS to 0.14 * Corrected some minor bugs related to config file * Changed speed of light symbol from C to C0 * Modified configure.in to work also with Mingw32 (and hopefully cygwin) * Added fnmatch.c and fnmatch.h (needed for Win32) * Added program version number to saved files * Updated speed of light constant (!) and changed its name from C to C0 to avoid clash with variables in other files. Updated vacuum dielectric constant 2002-07-15 Gopal Narayanan * Moved examples from src directory to a separate examples dir * Clean-up most warnings during compilation * Upon running for first time, $HOME/.transcalc dir will be created with config file and save file * Units default values now saved in config file * Upon exit, last transmission line values remembered in save file * Made some slight changes in gui setup * Added coupled microstrip image * Update manpage 2002-05-26 Claudio Girardi * Released v0.13 * Added coupled microstrips configuration * Rewritten single microstrip support (microstrip.c) * Cleaned-up most warnings during compilation * Added some more example files 2002-03-15 Claudio Girardi * Released v0.12 * File load/save functions and menu items added * Added example file (example1.trc) for file load * corrected microstrip dielectric losses formula * corrected conductor roughness losses formula 2001-06-22 Gopal Narayanan * Released v0.11 * Added coaxial transmission line to the list of transmission lines. Did some code cleanup as well. 2001-06-16 Gopal Narayanan * Made synthesize function as accurate as analysis function. In microstrip calculator, we now use Newton's method to converge on a solution. Thanks to Mike Ferrara for the suggestion. 2001-06-09 Gopal Narayanan * Modified source and automake files, so that gdk_imlib is recommended not required Thu May 24 22:24:54 EDT 2001 Gopal Narayanan * Initial Release transcalc-0.14/INSTALL0000644000175000017500000002110207715576703010137 Simple install procedure ======================== % gzip -cd transcalc-0.x.tar.gz | tar xvf - # unpack the sources % cd transcalc-0.x # change to the toplevel directory % ./configure # run the `configure' script % make # build transcalc [ Become root if necessary ] % make install # install transcalc Requirements ============ * transcalc requires the gtk library and development headers. As of version 0.14 and higher, it requires specifically the gtk2.0 library and development headers. I recommend getting version gtk 2.2.0 or higher. The Debian package is 'libgtk2.0-dev'. GTK information: http://www.gtk.org/ No GNOME packages are required!! * Report bugs, suggestions, or comments to Gopal Narayanan GENERIC INSTALL INSTRUCTIONS ============================ These are generic installation instructions for packages that use autotools. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. transcalc-0.14/Makefile.am0000644000175000017500000000051107514036161011125 #Run automake --add-missing --include-deps --foreign #Gopal Narayanan SUBDIRS = src images docs examples #DIST_SUBDIRS = src PACKAGE = @PACKAGE@ VERSION = @VERSION@ #EXTRA_DIST = #ALLMANPAGES = transcalc.1 \ # README \ # INSTALL \ # ChangeLog \ # AUTHORS \ # COPYING \ # NEWS CLEANFILES = *~ DISTCLEANFILES = .deps/*.P transcalc-0.14/Makefile.in0000644000175000017500000002657507715577462011201 # Makefile.in generated automatically by automake 1.4-p4 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. #Run automake --add-missing --include-deps --foreign #Gopal Narayanan 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@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ DATADIRNAME = @DATADIRNAME@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LIB = @LIB@ LN_S = @LN_S@ LTLIB = @LTLIB@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ PATHSEP = @PATHSEP@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ USE_NLS = @USE_NLS@ ms_librarian = @ms_librarian@ SUBDIRS = src images docs examples #DIST_SUBDIRS = src PACKAGE = @PACKAGE@ VERSION = @VERSION@ #EXTRA_DIST = #ALLMANPAGES = transcalc.1 \ # README \ # INSTALL \ # ChangeLog \ # AUTHORS \ # COPYING \ # NEWS CLEANFILES = *~ DISTCLEANFILES = .deps/*.P ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ Makefile.am Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess \ config.h.in config.sub configure configure.ac install-sh missing \ mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(ACLOCAL_M4): configure.ac acinclude.m4 cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure.ac $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) config.h: stamp-h @if test ! -f $@; then \ rm -f stamp-h; \ $(MAKE) stamp-h; \ else :; fi stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ $(SHELL) ./config.status @echo timestamp > stamp-h 2> /dev/null $(srcdir)/config.h.in: $(srcdir)/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi $(srcdir)/stamp-h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f config.h maintainer-clean-hdr: # 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) config.h.in $(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)config.h.in$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$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 $$d/$$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 all-recursive-am: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive install-exec-am: install-exec: install-exec-recursive install-data-am: install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive uninstall-am: uninstall: uninstall-recursive all-am: Makefile config.h all-redirect: all-recursive-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-tags distclean-generic clean-am distclean: distclean-recursive -rm -f config.status maintainer-clean-am: maintainer-clean-hdr 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-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ 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 all-recursive-am \ 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: transcalc-0.14/NEWS0000644000175000017500000000000007310030502007544 transcalc-0.14/TODO0000644000175000017500000000165207520053027007565 * Add more transmission line types (in progress); we need feedback from users about the most important types, to be implemented first. * Add detailed documentation with references for formulas used (in progress); partly done with extraction of comments in the source code, but we need a better method of referencing articles (a la bibTeX / LaTeX) * More options for command-line control * Store common substrate parameters as a loadable database * Show performance over a range of frequencies (using gnuplot ?) * Add toolbars for frequently performed operations * Print entire content of window in postscript file or printer * The transmission lines parameters calculations should be separated from the GUI part and become a library, to ease reuse of the formula by other programs (CAD, simulators, etc.) * A description of the transmission line should be saved in the .trc files and shown in a preview in the "File Load" window transcalc-0.14/acinclude.m40000644000175000017500000002217107520053027011265 ## Local versions of glib-gettext.m4 and pkg.m4 which are needed to ## run aclocal+autoconf. We don't want to depend on glib-2.0 and ## pkg-config and thus include the macros here. dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error AC_DEFUN(PKG_CHECK_MODULES, [ succeeded=no if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7.0; then echo "*** Your version of pkg-config is too old. You need version 0.7.0 or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" else AC_MSG_CHECKING(for $2) if $PKG_CONFIG --exists "$2" ; then AC_MSG_RESULT(yes) succeeded=yes AC_MSG_CHECKING($1_CFLAGS) $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` AC_MSG_RESULT($$1_CFLAGS) AC_MSG_CHECKING($1_LIBS) $1_LIBS=`$PKG_CONFIG --libs "$2"` AC_MSG_RESULT($$1_LIBS) else $1_CFLAGS="" $1_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` ifelse([$4], ,echo $$1_PKG_ERRORS,) fi AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) fi fi if test $succeeded = yes; then ifelse([$3], , :, [$3]) else ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) fi ]) # Macro to add for using GNU gettext. # Ulrich Drepper , 1995. # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # # If you make changes to this file, you MUST update the copy in # acinclude.m4. [ aclocal dies on duplicate macros, so if # we run 'aclocal -I macros/' then we'll run into problems # once we've installed glib-gettext.m4 ] # # serial 5 AC_DEFUN(AM_GLIB_WITH_NLS, dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) dnl Figure out what method nls_cv_force_use_gnu_gettext="no" nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If gettext or catgets are available (in this order) we dnl use this. Else we have to fall back to GNU NLS library. dnl catgets is only used if permitted by option --with-catgets. nls_cv_header_intl= nls_cv_header_libgt= CATOBJEXT=NONE AC_CHECK_HEADER(libintl.h, [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([#include ], [return (int) dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)]) if test "$gt_cv_func_dgettext_libc" != "yes"; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CACHE_CHECK([for dgettext in libintl], gt_cv_func_dgettext_libintl, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes, gt_cv_func_dgettext_libintl=no)], gt_cv_func_dgettext_libintl=no)]) fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then LIBS="$LIBS -lintl"; fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then AC_DEFINE(HAVE_GETTEXT) AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then AC_CHECK_FUNCS(dcgettext) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) INSTOBJEXT=.mo fi fi # Added by Martin Baulig 12/15/98 for libc5 systems if test "$gt_cv_func_dgettext_libc" != "yes" \ && test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS=-lintl LIBS=`echo $LIBS | sed -e 's/-lintl//'` fi ]) if test "$CATOBJEXT" = "NONE"; then dnl Neither gettext nor catgets in included in the C library. dnl Fall back on GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" != "yes"; then AC_DEFINE(ENABLE_NLS) else dnl Unset this variable since we use the non-zero value as a flag. CATOBJEXT= fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLDEPS) AC_SUBST(INTLLIBS) AC_SUBST(INTLOBJS) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) AC_DEFUN(AM_GLIB_GNU_GETTEXT, [AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h sys/param.h]) AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ strdup __argz_count __argz_stringify __argz_next]) AM_LC_MESSAGES AM_GLIB_WITH_NLS if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; esac done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl Determine which catalog format we have (if any is needed) dnl For now we know about two different formats: dnl Linux libc-5 and the normal X/Open format test -d po || mkdir po if test "$CATOBJEXT" = ".cat"; then AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) dnl Transform the SED scripts while copying because some dumb SEDs dnl cannot handle comments. sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) transcalc-0.14/aclocal.m40000644000175000017500000016111407715577450010756 dnl aclocal.m4 generated automatically by aclocal 1.4-p4 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. dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error AC_DEFUN(PKG_CHECK_MODULES, [ succeeded=no if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7.0; then echo "*** Your version of pkg-config is too old. You need version 0.7.0 or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" else AC_MSG_CHECKING(for $2) if $PKG_CONFIG --exists "$2" ; then AC_MSG_RESULT(yes) succeeded=yes AC_MSG_CHECKING($1_CFLAGS) $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` AC_MSG_RESULT($$1_CFLAGS) AC_MSG_CHECKING($1_LIBS) $1_LIBS=`$PKG_CONFIG --libs "$2"` AC_MSG_RESULT($$1_LIBS) else $1_CFLAGS="" $1_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` ifelse([$4], ,echo $$1_PKG_ERRORS,) fi AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) fi fi if test $succeeded = yes; then ifelse([$3], , :, [$3]) else ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) fi ]) # Macro to add for using GNU gettext. # Ulrich Drepper , 1995. # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # # If you make changes to this file, you MUST update the copy in # acinclude.m4. [ aclocal dies on duplicate macros, so if # we run 'aclocal -I macros/' then we'll run into problems # once we've installed glib-gettext.m4 ] # # serial 5 AC_DEFUN(AM_GLIB_WITH_NLS, dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) dnl Figure out what method nls_cv_force_use_gnu_gettext="no" nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If gettext or catgets are available (in this order) we dnl use this. Else we have to fall back to GNU NLS library. dnl catgets is only used if permitted by option --with-catgets. nls_cv_header_intl= nls_cv_header_libgt= CATOBJEXT=NONE AC_CHECK_HEADER(libintl.h, [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([#include ], [return (int) dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)]) if test "$gt_cv_func_dgettext_libc" != "yes"; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CACHE_CHECK([for dgettext in libintl], gt_cv_func_dgettext_libintl, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes, gt_cv_func_dgettext_libintl=no)], gt_cv_func_dgettext_libintl=no)]) fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then LIBS="$LIBS -lintl"; fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then AC_DEFINE(HAVE_GETTEXT) AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then AC_CHECK_FUNCS(dcgettext) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) INSTOBJEXT=.mo fi fi # Added by Martin Baulig 12/15/98 for libc5 systems if test "$gt_cv_func_dgettext_libc" != "yes" \ && test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS=-lintl LIBS=`echo $LIBS | sed -e 's/-lintl//'` fi ]) if test "$CATOBJEXT" = "NONE"; then dnl Neither gettext nor catgets in included in the C library. dnl Fall back on GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" != "yes"; then AC_DEFINE(ENABLE_NLS) else dnl Unset this variable since we use the non-zero value as a flag. CATOBJEXT= fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLDEPS) AC_SUBST(INTLLIBS) AC_SUBST(INTLOBJS) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) AC_DEFUN(AM_GLIB_GNU_GETTEXT, [AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h sys/param.h]) AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ strdup __argz_count __argz_stringify __argz_next]) AM_LC_MESSAGES AM_GLIB_WITH_NLS if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; esac done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl Determine which catalog format we have (if any is needed) dnl For now we know about two different formats: dnl Linux libc-5 and the normal X/Open format test -d po || mkdir po if test "$CATOBJEXT" = ".cat"; then AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) dnl Transform the SED scripts while copying because some dumb SEDs dnl cannot handle comments. sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # lib-prefix.m4 serial 3 (gettext-0.12.2) dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/lib"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) # lib-link.m4 serial 4 (gettext-0.12) dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl hardcode_direct, hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib$1-prefix], [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib$1-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) # lib-ld.m4 serial 2 (gettext-0.12) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no fi]) with_gnu_ld=$acl_cv_prog_gnu_ld ]) dnl From libtool-1.4. Sets the variable LD. AC_DEFUN([AC_LIB_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 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [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 AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_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 acl_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 "$acl_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 acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_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_LIB_PROG_LD_GNU ]) # progtest.m4 serial 3 (gettext-0.12) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # lcmessage.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995. # Check whether LC_MESSAGES is available in . AC_DEFUN([AM_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi ]) # 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)]) # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. dnl This file resides in the same directory as the config header dnl that is generated. We must strip everything past the first ":", dnl and everything past the last "/". AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, <>; do case " <<$>>CONFIG_HEADERS " in *" <<$>>am_file "*<<)>> echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac am_indx=`expr "<<$>>am_indx" + 1` done<<>>dnl>>) changequote([,]))]) # 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]) # Configure paths for GTK+ # Owen Taylor 1997-2001 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, dnl pass to pkg-config dnl AC_DEFUN(AM_PATH_GTK_2_0, [dnl dnl Get the cflags and libraries from pkg-config dnl AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], , enable_gtktest=yes) pkg_config_args=gtk+-2.0 for module in . $4 do case "$module" in gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done no_gtk="" AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test x$PKG_CONFIG != xno ; then if pkg-config --atleast-pkgconfig-version 0.7 ; then : else echo *** pkg-config too old; version 0.7 or better required. no_gtk=yes PKG_CONFIG=no fi else no_gtk=yes fi min_gtk_version=ifelse([$1], ,2.0.0,$1) AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" enable_gtktest=no fi if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then : else no_gtk=yes fi fi if test x"$no_gtk" = x ; then GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl dnl Now check if the installed GTK+ is sufficiently new. (Also sanity dnl checks the results of pkg-config to some extent) dnl rm -f conf.gtktest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtktest ; then : else echo "*** Could not run GTK+ test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK+ or finding the wrong" echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) transcalc-0.14/config.guess0000755000175000017500000011416307520053027011417 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-06-05' # 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 . # Please send patches to . # # 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 build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int dummy(){}" > $dummy.c for c in cc gcc c89 ; do ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 if test $? = 0 ; then CC_FOR_BUILD="$c"; break fi done rm -f $dummy.c $dummy.o $dummy.rel if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac # 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 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-unknown ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE}" in i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; 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 <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 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 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000: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*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${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 ;; 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:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #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_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax 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 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${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 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $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:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${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=${UNAME_VERSION}.${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 BSD 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:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) case "${HPUX_REV}" in 11.[0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; esac ;; esac fi ;; esac if [ "${HP_ARCH}" = "" ]; then sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include 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 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include 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_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $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 ;; *9??*:MPE/iX:*:*) echo hppa1.0-hp-mpeix 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 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd 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} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-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 ;; *: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 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin 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 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) cat >$dummy.c < /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #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_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy ;; ppc:Linux:*:*) # Determine Lib Version cat >$dummy.c < #if defined(__GLIBC__) extern char __libc_version[]; extern char __libc_release[]; #endif main(argc, argv) int argc; char *argv[]; { #if defined(__GLIBC__) printf("%s %s\n", __libc_version, __libc_release); #else printf("unknown\n"); #endif return 0; } EOF LIBC="" $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy | grep 1\.99 > /dev/null if test "$?" = 0 ; then LIBC="libc1" ; fi fi rm -f $dummy.c $dummy echo powerpc-unknown-linux-gnu${LIBC} exit 0 ;; alpha:Linux:*:*) cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF LIBC="" $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 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 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_supported_targets=`cd /; ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-pc-linux-gnu\n", argv[1]); # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; # 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.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:7*) # Fixed at (any) Pentium or better UNAME_MACHINE=i586 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} 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' /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 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # 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]??A:*: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.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 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 echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # 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 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000: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 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its 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 < # include #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 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) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # 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_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $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 cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: transcalc-0.14/config.h.in0000644000175000017500000000604107715563112011124 /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `acosh' function. */ #undef HAVE_ACOSH /* Define to 1 if you have the `asinh' function. */ #undef HAVE_ASINH /* Define to 1 if you have the `atanh' function. */ #undef HAVE_ATANH /* Define to 1 if you have the `bcopy' function. */ #undef HAVE_BCOPY /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR /* Define to 1 if your system has a working POSIX `fnmatch' function. */ #undef HAVE_FNMATCH /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if you have the header file. */ #undef HAVE_PWD_H /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcpy' function. */ #undef HAVE_STRCPY /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Check for native Win32 */ #undef OS_WIN32 /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Compiling for Win32 platform */ #undef PLATFORM_WIN32 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `int' if does not define. */ #undef pid_t transcalc-0.14/config.sub0000755000175000017500000006630607520053027011067 #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-06-08' # 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. # Please send patches to . # # 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. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) 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 | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -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/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ | we32k | ns16k | clipper | i370 | sh | sh[34] \ | powerpc | powerpcle \ | 1750a | dsp16xx | pdp10 | pdp11 \ | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ | v850 | c4x \ | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ | pj | pjl | h8500 | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. # FIXME: clean up the formatting here. vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ | hppa2.0n-* | hppa64-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ | [cjt]90-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; 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 ;; [cjt]90) basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; 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 ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; 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 ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-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 ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; 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 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; windows32) basic_machine=i386-pc os=-windows32-msvcrt ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; 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 ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4) basic_machine=sh-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -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* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # 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*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -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*-rebel) os=-linux ;; arm*-semi) os=-aout ;; pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; *-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 ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: transcalc-0.14/configure0000755000175000017500000063242707715577465011045 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="src" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S build build_cpu build_vendor build_os host host_cpu host_vendor host_os PATHSEP ms_librarian MS_LIB_AVAILABLE_TRUE MS_LIB_AVAILABLE_FALSE CPP EGREP PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBOBJS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. 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' 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 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # 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_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) 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 | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -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 | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } 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 "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # 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_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-gtktest do not try to compile and run a test GTK+ program Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # 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 # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # 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 "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $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 # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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 "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # 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 "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftestfile ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest* echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 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 conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi PACKAGE=transcalc VERSION=0.14 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF missing_dir=`cd $ac_aux_dir && pwd` echo "$as_me:$LINENO: checking for working aclocal" >&5 echo $ECHO_N "checking for working aclocal... $ECHO_C" >&6 # 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 "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6 else ACLOCAL="$missing_dir/missing aclocal" echo "$as_me:$LINENO: result: missing" >&5 echo "${ECHO_T}missing" >&6 fi echo "$as_me:$LINENO: checking for working autoconf" >&5 echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6 # 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 "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6 else AUTOCONF="$missing_dir/missing autoconf" echo "$as_me:$LINENO: result: missing" >&5 echo "${ECHO_T}missing" >&6 fi echo "$as_me:$LINENO: checking for working automake" >&5 echo $ECHO_N "checking for working automake... $ECHO_C" >&6 # 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 "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6 else AUTOMAKE="$missing_dir/missing automake" echo "$as_me:$LINENO: result: missing" >&5 echo "${ECHO_T}missing" >&6 fi echo "$as_me:$LINENO: checking for working autoheader" >&5 echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6 # 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 "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6 else AUTOHEADER="$missing_dir/missing autoheader" echo "$as_me:$LINENO: result: missing" >&5 echo "${ECHO_T}missing" >&6 fi echo "$as_me:$LINENO: checking for working makeinfo" >&5 echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6 # 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 "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6 else MAKEINFO="$missing_dir/missing makeinfo" echo "$as_me:$LINENO: result: missing" >&5 echo "${ECHO_T}missing" >&6 fi ac_config_headers="$ac_config_headers config.h" ac_config_commands="$ac_config_commands default-1" for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi CFLAGS="-ggdb -O2 -Wall" # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking for some Win32 platform" >&5 echo $ECHO_N "checking for some Win32 platform... $ECHO_C" >&6 case "$host" in *-*-mingw*|*-*-cygwin*) platform_win32=yes ;; *) platform_win32=no ;; esac echo "$as_me:$LINENO: result: $platform_win32" >&5 echo "${ECHO_T}$platform_win32" >&6 if test "$platform_win32" = "yes"; then cat >>confdefs.h <<\_ACEOF #define PLATFORM_WIN32 1 _ACEOF fi echo "$as_me:$LINENO: checking for native Win32" >&5 echo $ECHO_N "checking for native Win32... $ECHO_C" >&6 case "$host" in *-*-mingw*) os_win32=yes PATHSEP=';' ;; *) os_win32=no PATHSEP=':' ;; esac echo "$as_me:$LINENO: result: $os_win32" >&5 echo "${ECHO_T}$os_win32" >&6 if test "$os_win32" = "yes"; then cat >>confdefs.h <<\_ACEOF #define OS_WIN32 1 _ACEOF fi if test "$os_win32" = "yes"; then # Extract the first word of "lib.exe", so it can be a program name with args. set dummy lib.exe; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ms_librarian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ms_librarian"; then ac_cv_prog_ms_librarian="$ms_librarian" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ms_librarian="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ms_librarian" && ac_cv_prog_ms_librarian="no" fi fi ms_librarian=$ac_cv_prog_ms_librarian if test -n "$ms_librarian"; then echo "$as_me:$LINENO: result: $ms_librarian" >&5 echo "${ECHO_T}$ms_librarian" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test x$ms_librarian = xyes; then MS_LIB_AVAILABLE_TRUE= MS_LIB_AVAILABLE_FALSE='#' else MS_LIB_AVAILABLE_TRUE='#' MS_LIB_AVAILABLE_FALSE= fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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 "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi if test x$os_win32 = xyes; then succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7.0; then echo "*** Your version of pkg-config is too old. You need version 0.7.0 or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" else echo "$as_me:$LINENO: checking for gtk+-1.3-win32-production >= 1.3.0" >&5 echo $ECHO_N "checking for gtk+-1.3-win32-production >= 1.3.0... $ECHO_C" >&6 if $PKG_CONFIG --exists "gtk+-1.3-win32-production >= 1.3.0" ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 succeeded=yes echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5 echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6 GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-1.3-win32-production >= 1.3.0"` echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5 echo "${ECHO_T}$GTK_CFLAGS" >&6 echo "$as_me:$LINENO: checking GTK_LIBS" >&5 echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6 GTK_LIBS=`$PKG_CONFIG --libs "gtk+-1.3-win32-production >= 1.3.0"` echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 echo "${ECHO_T}$GTK_LIBS" >&6 else GTK_CFLAGS="" GTK_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-1.3-win32-production >= 1.3.0"` echo $GTK_PKG_ERRORS fi fi fi if test $succeeded = yes; then : else { { echo "$as_me:$LINENO: error: Library requirements (gtk+-1.3-win32-production >= 1.3.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 echo "$as_me: error: Library requirements (gtk+-1.3-win32-production >= 1.3.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7.0; then echo "*** Your version of pkg-config is too old. You need version 0.7.0 or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" else echo "$as_me:$LINENO: checking for glib-2.0 >= 1.3.9" >&5 echo $ECHO_N "checking for glib-2.0 >= 1.3.9... $ECHO_C" >&6 if $PKG_CONFIG --exists "glib-2.0 >= 1.3.9" ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 succeeded=yes echo "$as_me:$LINENO: checking GLIB_CFLAGS" >&5 echo $ECHO_N "checking GLIB_CFLAGS... $ECHO_C" >&6 GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 1.3.9"` echo "$as_me:$LINENO: result: $GLIB_CFLAGS" >&5 echo "${ECHO_T}$GLIB_CFLAGS" >&6 echo "$as_me:$LINENO: checking GLIB_LIBS" >&5 echo $ECHO_N "checking GLIB_LIBS... $ECHO_C" >&6 GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 1.3.9"` echo "$as_me:$LINENO: result: $GLIB_LIBS" >&5 echo "${ECHO_T}$GLIB_LIBS" >&6 else GLIB_CFLAGS="" GLIB_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 1.3.9"` echo $GLIB_PKG_ERRORS fi fi fi if test $succeeded = yes; then : else { { echo "$as_me:$LINENO: error: Library requirements (glib-2.0 >= 1.3.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 echo "$as_me: error: Library requirements (glib-2.0 >= 1.3.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi else # Check whether --enable-gtktest or --disable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval="$enable_gtktest" else enable_gtktest=yes fi; pkg_config_args=gtk+-2.0 for module in . do case "$module" in gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done no_gtk="" # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x$PKG_CONFIG != xno ; then if pkg-config --atleast-pkgconfig-version 0.7 ; then : else echo *** pkg-config too old; version 0.7 or better required. no_gtk=yes PKG_CONFIG=no fi else no_gtk=yes fi min_gtk_version=2.2.0 echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5 echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6 if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" enable_gtktest=no fi if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then : else no_gtk=yes fi fi if test x"$no_gtk" = x ; then GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" rm -f conf.gtktest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_gtk=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then echo "$as_me:$LINENO: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5 echo "${ECHO_T}yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6 : else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtktest ; then : else echo "*** Could not run GTK+ test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK+ or finding the wrong" echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" { { echo "$as_me:$LINENO: error: transcalc needs GTK 2.2.0 or higher" >&5 echo "$as_me: error: transcalc needs GTK 2.2.0 or higher" >&2;} { (exit 1); exit 1; }; } fi rm -f conf.gtktest fi if test x$os_win32 = xyes; then case "$CC $CFLAGS " in *[\ \ ]-fnative-struct[\ \ ]*) ;; *) CFLAGS="$CFLAGS -fnative-struct" ;; esac fi echo "$as_me:$LINENO: checking for sin in -lm" >&5 echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* 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; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sin=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5 echo "${ECHO_T}$ac_cv_lib_m_sin" >&6 if test $ac_cv_lib_m_sin = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in stdlib.h string.h sys/wait.h unistd.h pwd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((pid_t *) 0) return 0; if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi for ac_func in strcpy bcopy do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* 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 (); /* 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 char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Checks for library functions. echo "$as_me:$LINENO: checking for working POSIX fnmatch" >&5 echo $ECHO_N "checking for working POSIX fnmatch... $ECHO_C" >&6 if test "${ac_cv_func_fnmatch_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Some versions of Solaris, SCO, and the GNU C Library # have a broken or incompatible fnmatch. # So we run a test program. If we are cross-compiling, take no chance. # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test. if test "$cross_compiling" = yes; then ac_cv_func_fnmatch_works=cross else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include # define y(a, b, c) (fnmatch (a, b, c) == 0) # define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH) int main () { exit (!(y ("a*", "abc", 0) && n ("d*/*1", "d/s/1", FNM_PATHNAME) && y ("a\\\\bc", "abc", 0) && n ("a\\\\bc", "abc", FNM_NOESCAPE) && y ("*x", ".x", 0) && n ("*x", ".x", FNM_PERIOD) && 1)); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_fnmatch_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fnmatch_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_fnmatch_works" >&5 echo "${ECHO_T}$ac_cv_func_fnmatch_works" >&6 if test $ac_cv_func_fnmatch_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FNMATCH 1 _ACEOF fi for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { exit (malloc (0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6 if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF LIBOBJS="$LIBOBJS malloc.$ac_objext" cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6 if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6 test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then LIBOBJS="$LIBOBJS lstat.$ac_objext" fi echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6 if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_stat_empty_string_bug=yes else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; exit (stat ("", &sbuf) ? 1 : 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_stat_empty_string_bug=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_stat_empty_string_bug=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6 if test $ac_cv_func_stat_empty_string_bug = yes; then LIBOBJS="$LIBOBJS stat.$ac_objext" cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi # asinh, acosh and atanh seems to be missing from mingw32 (?) for ac_func in floor pow sqrt asinh acosh atanh do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* 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 (); /* 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 char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" fi; # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then # Both variables are already set. have_x=yes else if test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -fr conftest.dir if mkdir conftest.dir; then cd conftest.dir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'_ACEOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' _ACEOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -fr conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lXt $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { XtMalloc (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r $ac_dir/libXt.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi fi fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then echo "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >>confdefs.h <<\_ACEOF #define X_DISPLAY_MISSING 1 _ACEOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . case `(uname -sr) 2>/dev/null` in "SunOS 5"*) echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_nospace=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_R_nospace=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test $ac_R_nospace = yes; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_space=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_R_space=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test $ac_R_space = yes; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 X_LIBS="$X_LIBS -R $x_libraries" else echo "$as_me:$LINENO: result: neither works" >&5 echo "${ECHO_T}neither works" >&6 fi fi LIBS=$ac_xsave_LIBS esac fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. echo "$as_me:$LINENO: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); /* 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_gethostbyname) || defined (__stub___gethostbyname) choke me #else char (*f) () = gethostbyname; #endif #ifdef __cplusplus } #endif int main () { return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_bsd_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_gethostbyname=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 if test $ac_cv_lib_bsd_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. echo "$as_me:$LINENO: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); /* 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_connect) || defined (__stub___connect) choke me #else char (*f) () = connect; #endif #ifdef __cplusplus } #endif int main () { return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); int main () { connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. echo "$as_me:$LINENO: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6 if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove (); /* 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_remove) || defined (__stub___remove) choke me #else char (*f) () = remove; #endif #ifdef __cplusplus } #endif int main () { return f != remove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_remove=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then echo "$as_me:$LINENO: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove (); int main () { remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_posix_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix_remove=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo "$as_me:$LINENO: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6 if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat (); /* 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_shmat) || defined (__stub___shmat) choke me #else char (*f) () = shmat; #endif #ifdef __cplusplus } #endif int main () { return f != shmat; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shmat=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat (); int main () { shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ipc_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ipc_shmat=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char IceConnectionNumber (); int main () { IceConnectionNumber (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ICE_IceConnectionNumber=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi ac_config_files="$ac_config_files Makefile src/Makefile images/Makefile examples/Makefile docs/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, 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 \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "images/Makefile" ) CONFIG_FILES="$CONFIG_FILES images/Makefile" ;; "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@AWK@,$AWK,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@LN_S@,$LN_S,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@PATHSEP@,$PATHSEP,;t t s,@ms_librarian@,$ms_librarian,;t t s,@MS_LIB_AVAILABLE_TRUE@,$MS_LIB_AVAILABLE_TRUE,;t t s,@MS_LIB_AVAILABLE_FALSE@,$MS_LIB_AVAILABLE_FALSE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t s,@GTK_LIBS@,$GTK_LIBS,;t t s,@GLIB_CFLAGS@,$GLIB_CFLAGS,;t t s,@GLIB_LIBS@,$GLIB_LIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@X_CFLAGS@,$X_CFLAGS,;t t s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t s,@X_LIBS@,$X_LIBS,;t t s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi echo "$as_me:$LINENO: result: $PACKAGE-$VERSION is now configured for $host Source directory: $srcdir Installation prefix: $prefix C compiler: $CC $XTRA_CFLAGS $CFLAGS " >&5 echo "${ECHO_T} $PACKAGE-$VERSION is now configured for $host Source directory: $srcdir Installation prefix: $prefix C compiler: $CC $XTRA_CFLAGS $CFLAGS " >&6 transcalc-0.14/configure.ac0000644000175000017500000001026607715563075011403 dnl Process the file with autoconf to generate configure script dnl Gopal Narayanan Apr 27, 2001. dnl dnl Updated version number, added CFLAGS - Claudio, May 05, 2002 dnl Modified for use with mingw32, added some more checks - Claudio, May 11, 2002 AC_INIT(src)dnl AM_INIT_AUTOMAKE(transcalc,0.14)dnl AM_CONFIG_HEADER(config.h)dnl dnl try to adopt the new autoconf features dnl AC_CONFIG_HEADERS(config.h) dnl Check for programs AC_PROG_AWK AC_PROG_CC dnl check for the c compiler AC_PROG_LN_S dnl you should add CFLAGS="" here, 'cos it is set to -g by PROG_CC CFLAGS="-ggdb -O2 -Wall" AC_CANONICAL_HOST dnl checks for win32 platforms AC_MSG_CHECKING([for some Win32 platform]) case "$host" in *-*-mingw*|*-*-cygwin*) platform_win32=yes ;; *) platform_win32=no ;; esac AC_MSG_RESULT([$platform_win32]) if test "$platform_win32" = "yes"; then dnl AC_DEFINE(PLATFORM_WIN32) AC_DEFINE([PLATFORM_WIN32], 1, [Compiling for Win32 platform]) fi AC_MSG_CHECKING([for native Win32]) case "$host" in *-*-mingw*) os_win32=yes PATHSEP=';' ;; *) os_win32=no PATHSEP=':' ;; esac AC_MSG_RESULT([$os_win32]) AC_SUBST(PATHSEP) if test "$os_win32" = "yes"; then dnl AC_DEFINE(OS_WIN32) AC_DEFINE([OS_WIN32], 1, [Check for native Win32]) fi if test "$os_win32" = "yes"; then AC_CHECK_PROG(ms_librarian, lib.exe, yes, no) fi AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes) dnl check for a BSD compatible install AC_PROG_INSTALL AC_HEADER_STDC dnl Check for GTK+ if test x$os_win32 = xyes; then dnl On Win32, use the gtk-1-3-win32-production branch of GTK+ dnl which really is like GTK+ 1.2.7 or thereabouts, API-wise. PKG_CHECK_MODULES(GTK, gtk+-1.3-win32-production >= 1.3.0) dnl and fresh GLib. PKG_CHECK_MODULES(GLIB, glib-2.0 >= 1.3.9) else AM_PATH_GTK_2_0(2.2.0,, AC_MSG_ERROR(transcalc needs GTK 2.2.0 or higher)) dnl Quick hack to deny non GTK 1.2 dnl if (expr $gtk_config_major_version \> 1) > /dev/null; then dnl AC_MSG_ERROR(transcalc needs GTK 1.2.7 or higher) dnl fi dnl if (expr $gtk_config_minor_version \> 2) > /dev/null; then dnl AC_MSG_ERROR(transcalc needs GTK 1.2.7 or higher) dnl fi fi if test x$os_win32 = xyes; then case "$CC $CFLAGS " in *[[\ \ ]]-fnative-struct[[\ \ ]]*) ;; *) CFLAGS="$CFLAGS -fnative-struct" ;; esac fi dnl check for libraries dnl AM_PATH_GTK(1.2.7,,AC_MSG_ERROR(transcalc needs GTK 1.2.7 or higher))dnl dnl Check for the 'sin' function in -lm: AC_CHECK_LIB(m, sin) dnl dnl Locate the imlib library dnl dnl AM_PATH_GDK_IMLIB(1.9.5, AC_DEFINE(HAVE_IMLIB)) dnl As of GTK2.0, we do not need GDK_IMLIB anymore dnl remove the next three lines dnl AM_PATH_GDK_IMLIB(1.9.5, AC_DEFINE([HAVE_IMLIB], 1, [Check for Imlib])) dnl AC_SUBST(GDK_IMLIB_LIBS) dnl AC_SUBST(GDK_IMLIB_CFLAGS) dnl Checks for GDK_IMLIB dnl AC_PATH_PROG(imlibpath, imlib-config) dnl AC_MSG_CHECKING(for gdk_imlib) dnl IMLIB_CFLAGS=`$imlibpath --cflags-gdk 2>/dev/null` dnl IMLIB_LDFLAGS=`$imlibpath --libs-gdk 2>/dev/null` dnl if test "_$IMLIB_CFLAGS" = _ ; then dnl dnl AC_MSG_ERROR([not found, GDK_IMLIB is required. Please consult the dnl dnl INSTALL for dnl dnl information.]) dnl AC_MSG_RESULT([**not found, GDK_IMLIB is recommended to show the dnl images. Will not load any images.**]) dnl else dnl AC_MSG_RESULT(ok) dnl LIBS="$LIBS $IMLIB_LDFLAGS" dnl CFLAGS="$CFLAGS $IMLIB_CFLAGS" dnl AC_DEFINE(HAVE_IMLIB) dnl HAVE_IMLIB=`$imlibpath --version` dnl fi dnl Checks for header files. AC_CHECK_HEADERS([stdlib.h string.h sys/wait.h unistd.h pwd.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_PID_T AC_HEADER_TIME AC_CHECK_FUNCS(strcpy bcopy) # Checks for library functions. AC_FUNC_FNMATCH AC_FUNC_MALLOC AC_FUNC_STAT # asinh, acosh and atanh seems to be missing from mingw32 (?) AC_CHECK_FUNCS([floor pow sqrt asinh acosh atanh]) dnl Find the X11 include and library directories AC_PATH_X AC_PATH_XTRA AC_OUTPUT(Makefile src/Makefile images/Makefile examples/Makefile docs/Makefile) AC_MSG_RESULT([ $PACKAGE-$VERSION is now configured for $host Source directory: $srcdir Installation prefix: $prefix C compiler: $CC $XTRA_CFLAGS $CFLAGS ]) transcalc-0.14/install-sh0000755000175000017500000001273607310030502011074 #!/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 transcalc-0.14/missing0000755000175000017500000001421307310030503010460 #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997 Free Software Foundation, Inc. # Franc,ois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, 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 transcalc-0.14/mkinstalldirs0000755000175000017500000000134007310030503011664 #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1.1.1 2001/06/08 01:58:27 gopalnarayanan 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 transcalc-0.14/src/0000777000175000017500000000000007715600454007754 5transcalc-0.14/src/Makefile.am0000644000175000017500000000170307715563607011735 bin_PROGRAMS = transcalc PACKAGE = @PACKAGE@ VERSION = @VERSION@ transcalc_c_sources = \ transcalc.c \ setup_menu.c \ options.c \ help.c \ setup_body.c \ setup_status.c \ image_util.c \ unitscombo.c \ setup_label.c \ setup_values.c \ setup_transgui.c \ file_io.c \ print_trans.c \ microstrip.c \ c_microstrip.c \ rectwaveguide.c \ coax.c \ callback_general.c \ fnmatch.c transcalc_h_sources = \ units.h \ transcalc.h \ setup_menu.h \ unitscombo.h \ menu.h \ help.h \ body.h \ options.h \ setup.h \ file_io.h \ microstrip.h \ c_microstrip.h \ rectwaveguide.h \ coax.h \ convert.h \ callback_general.h \ fnmatch.h transcalc_SOURCES = $(transcalc_c_sources) \ $(transcalc_h_sources) INCLUDES = @GTK_CFLAGS@ -DDATADIR=\"@datadir@\" LDADD = @GTK_LIBS@ CLEANFILES = *~ DISTCLEANFILES = .deps/*.P #EXTRA_DIST = example1.trc 000.trc cstrip_kj_1.trc hp.trc ustrip_jansen.trc 001.trc cstrip_kj_2.trc ustrip50fr4.trc transcalc-0.14/src/Makefile.in0000644000175000017500000002146407715577462011760 # Makefile.in generated automatically by automake 1.4-p4 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@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ DATADIRNAME = @DATADIRNAME@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LIB = @LIB@ LN_S = @LN_S@ LTLIB = @LTLIB@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ PATHSEP = @PATHSEP@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ USE_NLS = @USE_NLS@ ms_librarian = @ms_librarian@ bin_PROGRAMS = transcalc PACKAGE = @PACKAGE@ VERSION = @VERSION@ transcalc_c_sources = transcalc.c setup_menu.c options.c help.c setup_body.c setup_status.c image_util.c unitscombo.c setup_label.c setup_values.c setup_transgui.c file_io.c print_trans.c microstrip.c c_microstrip.c rectwaveguide.c coax.c callback_general.c fnmatch.c transcalc_h_sources = units.h transcalc.h setup_menu.h unitscombo.h menu.h help.h body.h options.h setup.h file_io.h microstrip.h c_microstrip.h rectwaveguide.h coax.h convert.h callback_general.h fnmatch.h transcalc_SOURCES = $(transcalc_c_sources) $(transcalc_h_sources) INCLUDES = @GTK_CFLAGS@ -DDATADIR=\"@datadir@\" LDADD = @GTK_LIBS@ CLEANFILES = *~ DISTCLEANFILES = .deps/*.P mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ transcalc_OBJECTS = transcalc.o setup_menu.o options.o help.o \ setup_body.o setup_status.o image_util.o unitscombo.o setup_label.o \ setup_values.o setup_transgui.o file_io.o print_trans.o microstrip.o \ c_microstrip.o rectwaveguide.o coax.o callback_general.o fnmatch.o transcalc_LDADD = $(LDADD) transcalc_DEPENDENCIES = transcalc_LDFLAGS = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best SOURCES = $(transcalc_SOURCES) OBJECTS = $(transcalc_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`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: transcalc: $(transcalc_OBJECTS) $(transcalc_DEPENDENCIES) @rm -f transcalc $(LINK) $(transcalc_LDFLAGS) $(transcalc_OBJECTS) $(transcalc_LDADD) $(LIBS) 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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ 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 = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = src distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-binPROGRAMS install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-binPROGRAMS uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-binPROGRAMS clean-compile clean-tags clean-generic \ mostlyclean-am clean: clean-am distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \ distclean-generic clean-am distclean: distclean-am maintainer-clean-am: maintainer-clean-binPROGRAMS \ 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-am .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile tags 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 mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean #EXTRA_DIST = example1.trc 000.trc cstrip_kj_1.trc hp.trc ustrip_jansen.trc 001.trc cstrip_kj_2.trc ustrip50fr4.trc # 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: transcalc-0.14/src/transcalc.c0000644000175000017500000002047007522027776012017 /* Copyright (C) 2001 Gopal Narayanan 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. */ /* main.c by Gopal Narayanan * This file contains the main program. */ #include "transcalc.h" #include "setup_menu.h" #include #include "help.h" void usage (void); char *get_home_directory (void); char *get_config_directory (void); char *get_config_filename (void); char *get_save_filename (void); void running_for_first_time (void); extern gint trc_file_load (FILE *, short); char version[] = "transcalc " VERSION; /* * simple error message */ void error_mes(gchar * text) { perror(text); exit(-1); } void usage (void) { char *help_txt; /* allocate memory for the Help text */ if ((help_txt = (char *) malloc(2000*sizeof(char))) == NULL){ perror("help text error: malloc"); return; } else { sprintf(help_txt, "\n TRANSCALC %s\n",VERSION); strcat(help_txt, HELPTEXT); } printf("usage: transcalc [-h] [-v] \n"); printf("%s\n",help_txt); exit (0); } char * get_home_directory (void) { char *home = getenv ("HOME"); if (!home) { #ifndef PLATFORM_WIN32 /* If HOME is not defined, try getting it from the password file. */ struct passwd *pwd = getpwuid (getuid ()); if (!pwd || !pwd->pw_dir) return NULL; home = pwd->pw_dir; #else /* WINDOWS */ home = "."; #endif /* WINDOWS */ } return home; } char * get_config_directory (void) { char *config_directory; int length = strlen (get_home_directory ()) + strlen (TRC_CONFIG_DIRECTORY) + 2; config_directory = (char *) calloc (length, sizeof (char)); sprintf (config_directory, "%s/" TRC_CONFIG_DIRECTORY, get_home_directory ()); return config_directory; } char * get_config_filename (void) { char *config_filename; int length = strlen (get_home_directory ()) + strlen (TRC_CONFIG_FILE) + 2; config_filename = (char *) calloc (length, sizeof (char)); sprintf (config_filename, "%s/" TRC_CONFIG_FILE, get_home_directory ()); return config_filename; } char * get_save_filename (void) { char *save_filename; int length = strlen (get_home_directory ()) + strlen (TRC_SAVE_FILE) + 2; save_filename = (char *) calloc (length, sizeof (char)); sprintf (save_filename, "%s/" TRC_SAVE_FILE, get_home_directory ()); return save_filename; } void running_for_first_time (void) { struct stat *config_file_stat=NULL; int config_file_fd; char *config_directory = get_config_directory (); char *config_filename = get_config_filename (); #ifndef PLATFORM_WIN32 if (mkdir (config_directory, TRC_CONFIG_DIRECTORY_MODE) != 0) { #else if (mkdir (config_directory) != 0) { #endif /*config dir already there */ return; } else { printf ("Config directory %s is absent\n",config_directory); printf ("%s created\n", config_directory); } /* see if config file exists */ if (stat (config_filename, config_file_stat) != 0) { /* config file missing, so touch it */ config_file_fd = open (config_filename, O_CREAT); if (config_file_fd == -1) { perror ("open[config_file]"); exit (-1); } #ifndef PLATFORM_WIN32 if (fchmod (config_file_fd, TRC_CONFIG_DIRECTORY_MODE) != 0) { perror ("fchmod[" TRC_CONFIG_FILE "]"); exit (-1); } #endif close (config_file_fd); printf ("[%s] created\n\n", config_filename); } free (config_directory); free (config_filename); } void read_config_file (void) { FILE *fp; struct stat config_file_stat; char buf[256], *ip = NULL, *end = NULL; gchar tmp_str1[80]; char *config_filename = get_config_filename (); if (stat(config_filename, &config_file_stat) == 0){ if (config_file_stat.st_size > 0) { /*not empty file */ fp = fopen(config_filename, "r"); do { fgets(buf, 256, fp); ip = &buf[0]; /* skip spaces */ while ((*ip == ' ') || (*ip == '\t')) ip++; } while ((*ip == '#') || (*ip == '\n')); /* don't process empty lines */ /* Get the ending position. */ for (end = ip; *end && *end != '\n'; end++); /* make sure it terminates with '\0' */ *end = '\0'; sscanf(ip,"%s %hd\n",tmp_str1,&freq_unit); fscanf(fp,"%s %hd\n",tmp_str1,&length_unit); fscanf(fp, "%s %hd\n",tmp_str1,&res_unit); fscanf(fp, "%s %hd\n",tmp_str1,&ang_unit); } } } int main( int argc, char *argv[] ) { FILE *fpinit; char *save_filename = get_save_filename (); /* GtkWidget is the storage type for widgets */ /* GtkWidget *mainwindow;*/ /* GtkWidget *button; */ /* GtkWidget *vbox1;*/ /* GtkWidget *menu;*/ /* GtkWidget *body;*/ /* This is called in all GTK applications. Arguments are parsed * from the command line and are returned to the application. */ gtk_init(&argc, &argv); if (argc > 1) { if (strcmp (argv[1], "--help") == 0 || strcmp (argv[1], "-h") == 0) usage (); else if (strcmp (argv[1], "--version") == 0 || strcmp (argv[1], "-v") == 0) { printf ("%s\n", version); exit (0); } } /* default values */ length_unit = LENGTH_MIL; freq_unit = FREQ_GHZ; res_unit = RES_OHM; ang_unit = ANG_DEG; statusint = CONSISTENT; statusexists = FALSE; running_for_first_time(); read_config_file (); /*allocate memory for structure of main GUI */ tgui = g_malloc(sizeof(*tgui)); /*allocate memory for structure of transmission line window */ twin = g_malloc(sizeof(*twin)); /* Any command line options for program should follow here */ /* create a new window */ tgui->mainwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); /* set title of main window */ gtk_window_set_title (GTK_WINDOW (tgui->mainwindow), "transcalc"); /* When the window is given the "delete_event" signal (this is given * by the window manager, usually by the "close" option, or on the * titlebar), we ask it to call the delete_event () function * as defined above. The data passed to the callback * function is NULL and is ignored in the callback function. */ gtk_signal_connect (GTK_OBJECT (tgui->mainwindow), "delete_event", GTK_SIGNAL_FUNC (delete_event), NULL); /* Here we connect the "destroy" event to a signal handler. * This event occurs when we call gtk_widget_destroy() on the window, * or if we return FALSE in the "delete_event" callback. */ gtk_signal_connect (GTK_OBJECT (tgui->mainwindow), "destroy", GTK_SIGNAL_FUNC (destroy), NULL); /* Sets the border width of the window. */ gtk_container_set_border_width (GTK_CONTAINER (tgui->mainwindow), 10); /* Create a virtual vertical box that will hold everything */ /* First argument - homogeneous, 2nd vert. spacing */ tgui->vertbox = gtk_vbox_new (FALSE, 0); /* Put this box in the main window */ gtk_container_add (GTK_CONTAINER (tgui->mainwindow), tgui->vertbox); /* setup the menu */ tgui->menu = GTK_WIDGET (setup_menu (tgui)); /* setup the main area of calculations */ tgui->body = setup_body (tgui); /* setup the status field at the botttom */ /* status = GTK_WIDGET (setup_status (tgui)); statusexists = TRUE; */ gtk_widget_show (tgui->vertbox); gtk_widget_show (tgui->mainwindow); fpinit = fopen(save_filename, "r"); g_free (save_filename); if (fpinit != NULL) { trc_file_load (fpinit, LOAD_INIT); gtk_window_set_default_size (GTK_WINDOW (tgui->mainwindow), main_window_width, main_window_height); } /* All GTK applications must have a gtk_main(). Control ends here * and waits for an event to occur (like a key press or * mouse event). */ gtk_main (); /* free(twin);*/ return(0); } /* end of transcalc main */ transcalc-0.14/src/setup_menu.c0000644000175000017500000001307107517414025012217 /* Copyright (C) 2001 Gopal Narayanan 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. */ /* setup_menu.c by Gopal Narayanan * This file containes the program that builds the menu bar */ #include #include #include #include #include "transcalc.h" #include "file_io.h" #include "menu.h" extern void print_cb (GtkWidget *, gpointer); void analyzeCB (GtkWidget *parent) { /* short ttype; */ /* gtk_signal_emit_by_name (GTK_OBJECT (twin->Analbutton), "clicked", twin);*/ /* gtk_widget_event (GTK_OBJECT (twin->Analbutton), GDK_KEY_PRESS);*/ /* printf("%s\n",gtk_entry_get_text(GTK_ENTRY (twin->subparam_text[0])));*/ /* ttype = transtype_int(); switch (ttype) { case MICROSTRIP: analyze_microstrip (parent, (trans_win *) twin); break; case RECTWAVEGUIDE: analyze_rectwaveguide(parent, (trans_win *) twin); break; } */ gtk_signal_emit_by_name (GTK_OBJECT (twin->Analbutton), "clicked", twin); } void synthesizeCB (GtkWidget *parent) { gtk_signal_emit_by_name (GTK_OBJECT (twin->Synbutton), "clicked", twin); } /* This is the GtkItemFactoryEntry structure used to generate new menus. Item 1: The menu path. The letter after the underscore indicates an accelerator key once the menu is open. Item 2: The accelerator key for the entry Item 3: The callback function. Item 4: The callback action. This changes the parameters with which the function is called. The default is 0. Item 5: The item type, used to define what kind of an item it is. Here are the possible values: NULL -> "" "" -> "" "" -> create a title item "<Item>" -> create a simple item "<CheckItem>" -> create a check item "<ToggleItem>" -> create a toggle item "<RadioItem>" -> create a radio item <path> -> path of a radio item to link against "<Separator>" -> create a separator "<Branch>" -> create an item to hold sub items (optional) "<LastBranch>" -> create a right justified branch */ static GtkItemFactoryEntry menu_items[] = { { "/_File", NULL, NULL, 0, "<Branch>" }, { "/File/_Load", "<control>L", file_dialog, TC_FILE_LOAD, NULL}, { "/File/_Save", "<control>S", file_dialog, TC_FILE_SAVE, NULL}, { "/File/_Print", "<control>P", print_cb, 0, NULL}, { "/File/sep1", NULL, NULL, 0, "<Separator>"}, { "/File/_Options", "<control>O", optionsCB, 0, NULL }, { "/File/sep1", NULL, NULL, 0, "<Separator>"}, { "/File/Quit", "<control>Q", destroy, 0, NULL }, { "/_Execute", NULL, NULL, 0, "<Branch>" }, { "/Execute/_Analyze", "F3", analyzeCB, 0, NULL }, { "/Execute/_Sythesize", "F4", synthesizeCB, 0, NULL }, { "/_Help", NULL, NULL, 0, "<LastBranch>" }, { "/_Help/_Help", "F1", helpCB, 0, NULL }, { "/_Help/About", NULL, aboutCB, 0, NULL }, }; void make_main_menu (GtkWidget *window, GtkWidget *parent, GtkWidget **menubar ) { GtkItemFactory *item_factory; GtkAccelGroup *accel_group; gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); accel_group = gtk_accel_group_new (); /* This function initializes the item factory. Param 1: The type of menu - can be GTK_TYPE_MENU_BAR, GTK_TYPE_MENU, or GTK_TYPE_OPTION_MENU. Param 2: The path of the menu. Param 3: A pointer to a gtk_accel_group. The item factory sets up the accelerator table while generating menus. */ item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group); /* This function generates the menu items. Pass the item factory, the number of items in the array, the array itself, and any callback data for the the menu items. */ gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, parent); /* Attach the new accelerator group to the window. */ gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); if (menubar) /* Finally, return the actual menu bar created by the item factory. */ *menubar = gtk_item_factory_get_widget (item_factory, "<main>"); } /* create the menubar */ /*GtkWidget *setup_menu (GtkWidget *top, GtkWidget *parent)*/ GtkWidget *setup_menu (trans_gui *tgui) { GtkWidget *menubarT; make_main_menu (tgui->mainwindow, tgui->vertbox, &menubarT); /* Add the menu bar to the parent window */ gtk_box_pack_start (GTK_BOX (tgui->vertbox), menubarT, FALSE, FALSE, 0); gtk_widget_show (menubarT); return menubarT; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/options.c������������������������������������������������������������������������0000644�0001750�0001750�00000027475�07715564511�011551� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* options.c by Gopal Narayanan * This file pops up the options menu choices */ #include <stdio.h> #include <gtk/gtk.h> #include <string.h> #include <time.h> #include "transcalc.h" #include "options.h" /*#include "units.h"*/ /*extern void transtype (gpointer );*/ extern void transtype (GtkWidget *, gpointer ); extern char *get_config_filename (void); GtkWidget *freq_combo, *length_combo, *res_combo, *ang_combo; void options_save ( GtkWidget *widget, gpointer data) { char *config_filename = get_config_filename (); time_t date; FILE *fp; fp = fopen(config_filename, "w"); g_free(config_filename); time(&date); /* get current date and time */ if (fp != NULL) {/* no problems opening file */ /* write header */ fprintf(fp, "# This config file was automatically generated\n"); fprintf(fp, "# by transcalc "VERSION" on %s", ctime(&date)); fprintf(fp, "# Freq. unit: GHz(%1d), Hz(%1d), kHz(%1d), MHz(%1d).\n", FREQ_GHZ, FREQ_HZ, FREQ_KHZ, FREQ_MHZ); fprintf(fp, "# Length unit: mil(%1d), cm(%1d), mm(%1d), m(%1d), um(%1d), in(%1d), ft(%1d).\n", LENGTH_MIL, LENGTH_CM, LENGTH_MM, LENGTH_M, LENGTH_UM, LENGTH_IN, LENGTH_FT); fprintf(fp, "# Resistance unit: Ohm(%1d), kOhm(%1d).\n", RES_OHM, RES_KOHM); fprintf(fp, "# Angle unit: Deg(%1d), Rad(%1d).\n", ANG_DEG, ANG_RAD); fprintf (fp, "Frequency %d\n", freq_unit); fprintf (fp, "Length %d\n", length_unit); fprintf (fp, "Resistance %d\n",res_unit); fprintf (fp, "Angle %d\n", ang_unit); fclose(fp); } } /* callback for when freq. options are changed */ void options_freq_combo_CB ( GtkWidget *widget, gpointer data) { const gchar *text; if ((text = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(freq_combo)->entry))) != NULL) { if ((strcmp(text,"GHz")) == 0) freq_unit = FREQ_GHZ; if ((strcmp(text,"Hz")) == 0) freq_unit = FREQ_HZ; if ((strcmp(text,"kHz")) == 0) freq_unit = FREQ_KHZ; if ((strcmp(text,"MHz")) == 0) freq_unit = FREQ_MHZ; } transtype(GTK_WIDGET (GTK_ENTRY (GTK_COMBO (transtype_combo)->entry)), tgui->body); } /* callback for when length options are changed */ void options_length_combo_CB ( GtkWidget *widget, gpointer data) { const gchar *text; if ((text = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(length_combo)->entry))) != NULL) { if ((strcmp(text,"mil")) == 0) length_unit = LENGTH_MIL; if ((strcmp(text,"cm")) == 0) length_unit = LENGTH_CM; if ((strcmp(text,"mm")) == 0) length_unit = LENGTH_MM; if ((strcmp(text,"m")) == 0) length_unit = LENGTH_M; if ((strcmp(text,"um")) == 0) length_unit = LENGTH_UM; if ((strcmp(text,"in")) == 0) length_unit = LENGTH_IN; if ((strcmp(text,"ft")) == 0) length_unit = LENGTH_FT; } transtype(GTK_WIDGET (GTK_ENTRY (GTK_COMBO (transtype_combo)->entry)), tgui->body); } /* callback for when resistance options are changed */ void options_res_combo_CB ( GtkWidget *widget, gpointer data) { const gchar *text; if ((text = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(res_combo)->entry))) != NULL) { if ((strcmp(text,"Ohm")) == 0) res_unit = RES_OHM; if ((strcmp(text,"kOhm")) == 0) res_unit = RES_KOHM; } transtype(GTK_WIDGET (GTK_ENTRY (GTK_COMBO (transtype_combo)->entry)), tgui->body); } /* callback for when angle options are changed */ void options_ang_combo_CB ( GtkWidget *widget, gpointer data) { const gchar *text; if ((text = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(ang_combo)->entry))) != NULL) { if ((strcmp(text,"deg")) == 0) ang_unit = ANG_DEG; if ((strcmp(text,"rad")) == 0) ang_unit = ANG_RAD; } transtype(GTK_WIDGET (GTK_ENTRY (GTK_COMBO (transtype_combo)->entry)), tgui->body); } /* pops up a new window with options for units */ void optionsCB (gpointer parent) { GtkWidget *optionwin; GList *glist = NULL; /* list of options for freq., length, resistance and angle */ GtkWidget *label; GtkWidget *table; GtkWidget *button; gchar *unittext; GList *widget_list; GtkWidget *vbox; optionwin = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (optionwin), "Options"); gtk_signal_connect (GTK_OBJECT (optionwin), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroyed), &optionwin); gtk_container_border_width (GTK_CONTAINER (optionwin), 10); gtk_window_position (GTK_WINDOW (optionwin), GTK_WIN_POS_CENTER); /* Get the real vbox where main body is packed */ widget_list = gtk_container_children(GTK_CONTAINER (tgui->vertbox)); if ( GTK_IS_VBOX(GTK_OBJECT(widget_list->data)) ) { vbox = GTK_WIDGET(widget_list->data); } /* Make a table of 5 rows and 2 cols to put the options into */ table = gtk_table_new (5, 2, TRUE); /* vbox = gtk_vbox_new (FALSE, 0); */ gtk_container_add (GTK_CONTAINER (optionwin), table); /* gtk_widget_show (vbox); */ /* first row of table - freq information */ label = gtk_label_new ("Freq.:"); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1); gtk_widget_show (label); freq_combo = gtk_combo_new (); gtk_widget_set_usize (GTK_WIDGET (freq_combo), 100, -1); if ((unittext = (char *) malloc(10*sizeof(char))) == NULL){ perror("unit text error: malloc"); return; } /* set the freq combo box */ glist = g_list_append(glist, "GHz"); glist = g_list_append(glist, "Hz"); glist = g_list_append(glist, "kHz"); glist = g_list_append(glist, "MHz"); gtk_combo_set_popdown_strings (GTK_COMBO (freq_combo), glist); switch (freq_unit) { case FREQ_GHZ: strcpy(unittext,"GHz"); break; case FREQ_HZ: strcpy(unittext,"Hz"); break; case FREQ_KHZ: strcpy(unittext,"kHz"); break; case FREQ_MHZ: strcpy(unittext,"MHz"); break; } gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (freq_combo)->entry), unittext); /* Now we can free the glist from memory */ g_list_free (glist); /* make the combo entry box uneditable*/ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (freq_combo)->entry), FALSE); /* hook it upto a callback function to sense when a change has occured */ gtk_signal_connect(GTK_OBJECT (GTK_COMBO (freq_combo)->entry), "changed", GTK_SIGNAL_FUNC (options_freq_combo_CB), parent); gtk_table_attach_defaults (GTK_TABLE (table), freq_combo, 1, 2, 0, 1); gtk_widget_show (freq_combo); /* Second row - length information */ label = gtk_label_new ("Length:"); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); gtk_widget_show (label); length_combo = gtk_combo_new (); gtk_widget_set_usize (GTK_WIDGET (length_combo), 100, -1); /* set the length combo box */ glist = NULL; glist = g_list_append(glist, "mil"); glist = g_list_append(glist, "cm"); glist = g_list_append(glist, "mm"); glist = g_list_append(glist, "m"); glist = g_list_append(glist, "um"); glist = g_list_append(glist, "in"); glist = g_list_append(glist, "ft"); gtk_combo_set_popdown_strings (GTK_COMBO (length_combo), glist); switch(length_unit) { case LENGTH_MIL: strcpy(unittext,"mil"); break; case LENGTH_CM: strcpy(unittext,"cm"); break; case LENGTH_MM: strcpy(unittext,"mm"); break; case LENGTH_M: strcpy(unittext,"m"); break; case LENGTH_UM: strcpy(unittext,"um"); break; case LENGTH_IN: strcpy(unittext,"in"); break; case LENGTH_FT: strcpy(unittext,"ft"); break; } gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (length_combo)->entry), unittext); /* Now we can free the glist from memory */ g_list_free (glist); /* make the combo entry box uneditable*/ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (length_combo)->entry), FALSE); /* hook it upto a callback function to sense when a change has occured */ gtk_signal_connect(GTK_OBJECT (GTK_COMBO (length_combo)->entry), "changed", GTK_SIGNAL_FUNC (options_length_combo_CB), parent); gtk_table_attach_defaults (GTK_TABLE (table), length_combo, 1, 2, 1, 2); gtk_widget_show (length_combo); /* Third row - resistance information */ label = gtk_label_new ("Res.:"); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 2, 3); gtk_widget_show (label); res_combo = gtk_combo_new (); gtk_widget_set_usize (GTK_WIDGET (res_combo), 100, -1); /* set the length combo box */ glist = NULL; glist = g_list_append(glist, "Ohm"); glist = g_list_append(glist, "kOhm"); gtk_combo_set_popdown_strings (GTK_COMBO (res_combo), glist); switch (res_unit) { case RES_OHM: strcpy(unittext,"Ohm"); break; case RES_KOHM: strcpy(unittext,"kOhm"); break; } gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (res_combo)->entry), unittext); /* Now we can free the glist from memory */ g_list_free (glist); /* make the combo entry box uneditable*/ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (res_combo)->entry), FALSE); /* hook it upto a callback function to sense when a change has occured */ gtk_signal_connect(GTK_OBJECT (GTK_COMBO (res_combo)->entry), "changed", GTK_SIGNAL_FUNC (options_res_combo_CB), parent); gtk_table_attach_defaults (GTK_TABLE (table), res_combo, 1, 2, 2, 3); gtk_widget_show (res_combo); /* Fourth row - angle information */ label = gtk_label_new ("Angle:"); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 3, 4); gtk_widget_show (label); ang_combo = gtk_combo_new (); gtk_widget_set_usize (GTK_WIDGET (ang_combo), 100, -1); /* set the length combo box */ glist = NULL; glist = g_list_append(glist, "deg"); glist = g_list_append(glist, "rad"); gtk_combo_set_popdown_strings (GTK_COMBO (ang_combo), glist); switch (ang_unit) { case ANG_DEG: strcpy(unittext,"deg"); break; case ANG_RAD: strcpy(unittext,"rad"); break; } gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (ang_combo)->entry), unittext); free(unittext); /* Now we can free the glist from memory */ g_list_free (glist); /* make the combo entry box uneditable*/ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (ang_combo)->entry), FALSE); /* hook it upto a callback function to sense when a change has occured */ gtk_signal_connect(GTK_OBJECT (GTK_COMBO (ang_combo)->entry), "changed", GTK_SIGNAL_FUNC (options_ang_combo_CB), parent); gtk_table_attach_defaults (GTK_TABLE (table), ang_combo, 1, 2, 3, 4); gtk_widget_show (ang_combo); button = gtk_button_new_with_label ("Save As Default"); gtk_table_attach_defaults (GTK_TABLE (table), button, 0, 1, 4, 5); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (options_save), NULL); gtk_widget_show (button); button = gtk_button_new_with_label ("Dismiss"); gtk_table_attach_defaults (GTK_TABLE (table), button, 1, 2, 4, 5); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (optionwin)); gtk_widget_show (button); gtk_widget_show (table); gtk_widget_show (optionwin); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/help.c���������������������������������������������������������������������������0000644�0001750�0001750�00000012362�07514544004�010763� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* help.c by Gopal Narayanan * This file contains help menu widgets */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <gtk/gtk.h> #include <config.h> #include "help.h" /* * pops up the help window */ void helpCB (gpointer DATA) { char *help_txt; GtkWidget *vbox; GtkWidget *scrolled_win; GtkWidget *label; GtkWidget *button; GtkWidget *helpwin; /* allocate memory for the Help text */ if ((help_txt = (char *) malloc(2000*sizeof(char))) == NULL){ perror("help text error: malloc"); return; } else { sprintf(help_txt, "\n TRANSCALC %s\n",VERSION); strcat(help_txt, HELPTEXT); } helpwin = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (helpwin), "Help"); gtk_signal_connect (GTK_OBJECT (helpwin), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &helpwin); gtk_container_border_width (GTK_CONTAINER (helpwin), 5); gtk_widget_set_usize (helpwin, 650, 400); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (helpwin), vbox); gtk_widget_show(vbox); /* scrolled window will contain help text */ scrolled_win = gtk_scrolled_window_new (NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrolled_win), 5); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0); gtk_widget_show (scrolled_win); /* put help text into label */ label = gtk_label_new(help_txt); gtk_signal_connect (GTK_OBJECT (label), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroyed), &label); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); /* gtk_container_add(GTK_CONTAINER(scrolled_win), label);*/ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_win), label); gtk_widget_show (label); /* Finally the dismiss button */ button = gtk_button_new_with_label ("Dismiss"); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (helpwin)); gtk_box_pack_end(GTK_BOX(vbox), button, FALSE, FALSE, 0); gtk_widget_show(button); gtk_widget_show (helpwin); free(help_txt); } /* * pops up the about window */ void aboutCB (gpointer DATA) { char *about_txt; GtkWidget *vbox; GtkWidget *scrolled_win; GtkWidget *label; GtkWidget *button; GtkWidget *aboutwin; /* allocate memory for the Help text */ if ((about_txt = (char *) malloc(2000*sizeof(char))) == NULL){ perror("about text error: malloc"); return; } else { sprintf(about_txt, "\n TRANSCALC %s\n",VERSION); strcat(about_txt, ABOUTTEXT); } aboutwin = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (aboutwin), "About"); gtk_signal_connect (GTK_OBJECT (aboutwin), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &aboutwin); gtk_container_border_width (GTK_CONTAINER (aboutwin), 5); gtk_widget_set_usize (aboutwin, 500, 350); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (aboutwin), vbox); gtk_widget_show(vbox); /* scrolled window will contain about text */ scrolled_win = gtk_scrolled_window_new (NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrolled_win), 5); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0); gtk_widget_show (scrolled_win); /* put about text into label */ label = gtk_label_new(about_txt); gtk_signal_connect (GTK_OBJECT (label), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroyed), &label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); /* gtk_container_add (GTK_CONTAINER (scrolled_win), label);*/ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_win), label); gtk_widget_show (label); /* Finally the dismiss button */ button = gtk_button_new_with_label ("Dismiss"); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (aboutwin)); gtk_box_pack_end(GTK_BOX(vbox), button, FALSE, FALSE, 0); gtk_widget_show(button); gtk_widget_show (aboutwin); free(about_txt); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/setup_body.c���������������������������������������������������������������������0000644�0001750�0001750�00000011060�07715571301�012205� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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 <stdio.h> #include <stdlib.h> #include <gtk/gtk.h> #include "transcalc.h" #include "body.h" /* callback function for changing the type of transmission line */ void transtype (GtkWidget *widget, gpointer parent) { const gchar *text; /* if ((text = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(transtype_combo)->entry))) != NULL)*/ if ((text = gtk_entry_get_text (GTK_ENTRY (widget))) != NULL) { if ((strcmp(text,"Microstrip")) == 0) { current_transtype = MICROSTRIP; microstrip_win (parent); } else if ((strcmp(text,"Rectangular Waveguide")) == 0) { current_transtype = RECTWAVEGUIDE; rectwaveguide_win (parent); } else if ((strcmp(text,"Coaxial Line")) == 0) { current_transtype = COAX; coax_win (parent); } else if ((strcmp(text,"Coupled Microstrip")) == 0) { current_transtype = C_MICROSTRIP; c_microstrip_win (parent); }/* else { fprintf(stderr, "transtype(): unknown transmission line type!\n"); } */ } } /* * returns integer value that indicates the type of transmission line */ short transtype_int () { const gchar *text; if ((text = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(transtype_combo)->entry))) != NULL) { if ((strcmp(text,"Microstrip")) == 0) return MICROSTRIP; if ((strcmp(text,"Rectangular Waveguide")) == 0) return RECTWAVEGUIDE; if ((strcmp(text,"Coaxial Line")) == 0) return COAX; if ((strcmp(text,"Coupled Microstrip")) == 0) return C_MICROSTRIP; return (-1); /* error */ } return (-1); /* error */ } /* setup_body.c by Gopal Narayanan * This file contains the program that builds the main body * everything happens here */ /*GtkWidget *setup_body (GtkWidget *parent)*/ GtkWidget *setup_body (trans_gui *tg) { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *frame; GList *glist = NULL; /* trans_win *twin;*/ /* g_print("Inside body\n"); */ /* Add a vbox and hbox to start the packing */ vbox = gtk_vbox_new (FALSE, 5); hbox = gtk_hbox_new (FALSE, 5); /* pack these in the parent window */ /* gtk_container_add (GTK_CONTAINER (tg->vertbox), hbox);*/ gtk_box_pack_start (GTK_BOX (tg->vertbox), vbox, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); frame = gtk_frame_new ("Transmission Line Type"); transtype_combo = gtk_combo_new (); gtk_widget_set_usize (GTK_WIDGET (transtype_combo), 200, -1); /* set the transtype_combo GList */ glist = g_list_append(glist, "Microstrip"); glist = g_list_append(glist, "Rectangular Waveguide"); glist = g_list_append(glist, "Coaxial Line"); glist = g_list_append(glist, "Coupled Microstrip"); /* glist = g_list_append(glist, "Stripline");*/ gtk_combo_set_popdown_strings (GTK_COMBO (transtype_combo), glist); /* Now we can free the glist from memory */ g_list_free (glist); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (transtype_combo)->entry), "Microstrip"); /* make the combo entry box uneditable*/ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (transtype_combo)->entry), FALSE); /* hook it upto a callback function to sense when a change has occured */ gtk_signal_connect (GTK_OBJECT (GTK_COMBO (transtype_combo)->entry), "changed", GTK_SIGNAL_FUNC (transtype), (gpointer) vbox); /* GTK_OBJECT (tg->vertbox));*/ /* add the combo box to frame */ gtk_container_add (GTK_CONTAINER (frame), transtype_combo); gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, TRUE, 0); gtk_widget_show (transtype_combo); gtk_widget_show (frame); gtk_widget_show (hbox); gtk_widget_show (vbox); current_transtype = MICROSTRIP; transtype(GTK_WIDGET (GTK_ENTRY (GTK_COMBO (transtype_combo)->entry)), tg->vertbox); /* transtype(vbox);*/ /*microstrip_win (tg); */ /* current_transtype = RECTWAVEGUIDE; rectwaveguide_win (tg); */ return vbox; /*return twin;*/ } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/setup_status.c�������������������������������������������������������������������0000644�0001750�0001750�00000004102�07514036161�012567� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* main.c by Gopal Narayanan * This file containes the main program. */ #include <stdlib.h> #include <stdio.h> #include <gtk/gtk.h> #include "transcalc.h" /* * setup_status - this function sets up * the status window that indicates * if parameter values are consistent with the * calculated results */ /*GtkWidget *setup_status (trans_gui *tg)*/ void setup_status (GtkWidget *parent, trans_win *tr_win) { /* GtkWidget *frame; */ /* GtkWidget *status_win;*/ gchar *textentry; /*allocate memory for textentry */ if ((textentry = (char *) malloc(200*sizeof(char))) == NULL){ perror("help text error: malloc"); return; } tr_win->status_frame = gtk_frame_new("Status"); gtk_container_add (GTK_CONTAINER (parent), tr_win->status_frame); if (statusint == CONSISTENT) { sprintf(textentry,"Values are consistent"); } else { sprintf(textentry,"Values are inconsistent"); } tr_win->status = gtk_label_new(textentry); gtk_widget_set_usize(tr_win->status,200,-1); gtk_label_set_justify (GTK_LABEL (tr_win->status), GTK_JUSTIFY_LEFT); /* gtk_entry_set_text (GTK_ENTRY (tr_win->status), textentry);*/ gtk_container_add (GTK_CONTAINER (tr_win->status_frame), tr_win->status); gtk_widget_show (tr_win->status); gtk_widget_show (tr_win->status_frame); free(textentry); /* return tr_win->status;*/ } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/image_util.c���������������������������������������������������������������������0000644�0001750�0001750�00000004213�07715564752�012165� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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> /* #ifdef HAVE_IMLIB */ #include <stdio.h> #include <gtk/gtk.h> /* #include <gdk_imlib.h> */ #include <string.h> void pack_image_in_box (GtkWidget *parent, gchar *filename) { GtkWidget *pixmapwid; /* GdkPixmap *pixmap; GdkBitmap *mask; */ /* GdkImlibImage *image;*/ /* gint width; gint height; */ /* gdk_imlib_init(); */ pixmapwid = gtk_image_new_from_file (filename); /* Get gdk to use imlib's visual and colormap */ /* gtk_widget_push_visual(gdk_imlib_get_visual()); gtk_widget_push_colormap(gdk_imlib_get_colormap()); */ /* Load the image */ /* if((image = gdk_imlib_load_image(filename)) == NULL) { printf("Image load failed\n"); exit(-1); } */ /* get the width and height of the image */ /* width = image->rgb_width; height = image->rgb_height; */ /* render the image */ /* if(!gdk_imlib_render(image, width, height)) { printf("Image render failed!\n"); exit(-1); } */ /* move the pimap and mask out of the structure, then free it */ /* pixmap = gdk_imlib_move_image(image); mask = gdk_imlib_move_mask(image); gdk_imlib_destroy_image(image); pixmapwid = gtk_pixmap_new (pixmap, mask); */ gtk_box_pack_start (GTK_BOX (parent), pixmapwid, FALSE, FALSE, 0); gtk_widget_show (pixmapwid); /* gdk_imlib_free_pixmap(pixmap);*/ gtk_widget_show (parent); } /*#endif */ /*ifdef HAVE_IMLIB*/ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/unitscombo.c���������������������������������������������������������������������0000644�0001750�0001750�00000027353�07520053030�012212� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* * microstrip.c - Puts up window for microstrip and * performs the associated calculations */ #include <stdio.h> #include <gtk/gtk.h> #include <string.h> #include <math.h> #include "transcalc.h" #include "body.h" gchar *length_unit_name[] = { "mil", "cm", "mm", "m", "um", "in", "ft" }; gchar *freq_unit_name[] = { "GHz", "Hz", "kHz", "MHz" }; gchar *res_unit_name[] = { "Ohm", "kOhm" }; gchar *ang_unit_name[] = { "deg", "rad" }; /* * set_nounit_combo */ void set_nounit_combo (GtkWidget *combo) { GList *glist = NULL; gtk_widget_set_usize (GTK_WIDGET (combo), 20, -1); glist = g_list_append(glist, "NA"); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), "NA"); gtk_combo_set_popdown_strings (GTK_COMBO (combo), glist); g_list_free (glist); gtk_widget_set_sensitive ( GTK_WIDGET (combo), FALSE); } /* * set_lengthunit_combo */ void set_lengthunit_combo (GtkWidget *combo) { GList *glist = NULL; gtk_widget_set_usize (GTK_WIDGET (combo), 20, -1); glist = g_list_append(glist, "mil"); glist = g_list_append(glist, "cm"); glist = g_list_append(glist, "mm"); glist = g_list_append(glist, "m"); glist = g_list_append(glist, "um"); glist = g_list_append(glist, "in"); glist = g_list_append(glist, "ft"); gtk_combo_set_popdown_strings (GTK_COMBO (combo), glist); g_list_free (glist); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), length_unit_name[length_unit]); gtk_widget_set_sensitive ( GTK_WIDGET (combo), TRUE); /* make the combo entry box uneditable*/ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (combo)->entry), FALSE); } /* * set_frequnit_combo */ void set_frequnit_combo (GtkWidget *combo) { GList *glist = NULL; gtk_widget_set_usize (GTK_WIDGET (combo), 20, -1); glist = g_list_append(glist, "GHz"); glist = g_list_append(glist, "Hz"); glist = g_list_append(glist, "kHz"); glist = g_list_append(glist, "MHz"); gtk_combo_set_popdown_strings (GTK_COMBO (combo), glist); g_list_free (glist); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), freq_unit_name[freq_unit]); gtk_widget_set_sensitive ( GTK_WIDGET (combo), TRUE); /* make the combo entry box uneditable*/ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (combo)->entry), FALSE); } /* * set_resunit_combo */ void set_resunit_combo (GtkWidget *combo) { GList *glist = NULL; gtk_widget_set_usize (GTK_WIDGET (combo), 20, -1); glist = g_list_append(glist, "Ohm"); glist = g_list_append(glist, "kOhm"); gtk_combo_set_popdown_strings (GTK_COMBO (combo), glist); g_list_free (glist); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), res_unit_name[res_unit]); gtk_widget_set_sensitive ( GTK_WIDGET (combo), TRUE); /* make the combo entry box uneditable*/ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (combo)->entry), FALSE); } /* * set_angunit_combo */ void set_angunit_combo (GtkWidget *combo) { GList *glist = NULL; gtk_widget_set_usize (GTK_WIDGET (combo), 20, -1); glist = g_list_append(glist, "Deg"); glist = g_list_append(glist, "Rad"); gtk_combo_set_popdown_strings (GTK_COMBO (combo), glist); g_list_free (glist); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), ang_unit_name[ang_unit]); gtk_widget_set_sensitive ( GTK_WIDGET (combo), TRUE); /* make the combo entry box uneditable*/ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (combo)->entry), FALSE); } /* * sets up the combo widget for units and such */ /* type = 0 substrate param type = 1 component param type = 2 physical param type = 3 electrical param */ GtkWidget * setup_combo_widget (short type, short rownum) { /* GList *glist = NULL; */ GtkWidget *combo; /* short trans_type;*/ /* trans_type = transtype_int();*/ switch(current_transtype) { case MICROSTRIP : switch (type) { case SUBPARAMTYPE : /* substrate parameters */ switch(rownum) { case 0 : case 1 : case 5 : case 6 : case 8 : /* Er */ /* Mur */ /* Tand */ /* Cond */ /* blank */ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; case 2 : case 3 : case 4 : case 7 : /* H */ /* H_t */ /* T */ /* Rough */ combo = gtk_combo_new (); set_lengthunit_combo (combo); return combo; break; } case COMPPARAMTYPE : switch (rownum) { case 0 : /* freq */ combo = gtk_combo_new (); set_frequnit_combo (combo); return combo; break; default: /* nothing */ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } case PHYSPARAMTYPE : switch (rownum) { case 0 : case 1 : /* width */ /* length */ combo = gtk_combo_new (); set_lengthunit_combo (combo); return combo; break; default: /*nothing*/ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } case ELECPARAMTYPE : switch(rownum) { case 0 : /* Z0 */ combo = gtk_combo_new (); set_resunit_combo (combo); return combo; break; case 1 : /* e_eff -electrical length */ combo = gtk_combo_new (); set_angunit_combo (combo); return combo; break; default: combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } } break; /* end microstrip */ case RECTWAVEGUIDE : switch (type) { case SUBPARAMTYPE : /* substrate parameters */ /* all substrate parameters for rect waveguide are unit less */ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; case COMPPARAMTYPE : switch (rownum) { case 0 : /* freq */ combo = gtk_combo_new (); set_frequnit_combo (combo); return combo; break; default: /* nothing */ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } case PHYSPARAMTYPE : switch (rownum) { case 0 : case 1 : case 2 : /* width */ /* height */ /* length */ combo = gtk_combo_new (); set_lengthunit_combo (combo); return combo; break; default: /*nothing*/ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } case ELECPARAMTYPE : switch(rownum) { case 0 : /* Z0 */ combo = gtk_combo_new (); set_resunit_combo (combo); return combo; break; case 1 : /* e_eff -electrical length */ combo = gtk_combo_new (); set_angunit_combo (combo); return combo; break; default: combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } } break; /* end rectwaveguide */ case COAX : switch (type) { case SUBPARAMTYPE : /* substrate parameters */ /* all substrate parameters for coax are unit less */ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; case COMPPARAMTYPE : switch (rownum) { case 0 : /* freq */ combo = gtk_combo_new (); set_frequnit_combo (combo); return combo; break; default: /* nothing */ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } case PHYSPARAMTYPE : switch (rownum) { case 0 : case 1 : case 2 : /* din */ /* dout */ /* length */ combo = gtk_combo_new (); set_lengthunit_combo (combo); return combo; break; default: /*nothing*/ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } case ELECPARAMTYPE : switch(rownum) { case 0 : /* Z0 */ combo = gtk_combo_new (); set_resunit_combo (combo); return combo; break; case 1 : /* e_eff -electrical length */ combo = gtk_combo_new (); set_angunit_combo (combo); return combo; break; default: combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } } break; /* end coax */ case C_MICROSTRIP : switch (type) { case SUBPARAMTYPE : /* substrate parameters */ switch(rownum) { case 0 : case 1 : case 5 : case 6 : case 8 : /* Er */ /* Mur */ /* Tand */ /* Cond */ /* blank */ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; case 2 : case 3 : case 4 : case 7 : /* H */ /* H_t */ /* T */ /* Rough */ combo = gtk_combo_new (); set_lengthunit_combo (combo); return combo; break; } case COMPPARAMTYPE : switch (rownum) { case 0 : /* freq */ combo = gtk_combo_new (); set_frequnit_combo (combo); return combo; break; default: /* nothing */ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } case PHYSPARAMTYPE : switch (rownum) { case 0 : /* width */ case 1 : /* length */ case 2 : /* spacing */ combo = gtk_combo_new (); set_lengthunit_combo (combo); return combo; break; default: /*nothing*/ combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } case ELECPARAMTYPE : switch(rownum) { case 0 : /* Z0e */ case 1 : /* Z0o */ combo = gtk_combo_new (); set_resunit_combo (combo); return combo; break; case 2 : /* e_eff -electrical length */ combo = gtk_combo_new (); set_angunit_combo (combo); return combo; break; default: combo = gtk_combo_new (); set_nounit_combo (combo); return combo; break; } } break; /* end coupled microstrip */ default: fprintf(stderr, "setup_combo_widget: unknown transmission line type!\n"); } /* error */ return NULL; } /* * getunit - returns integer unit code */ gint getunit (gchar *text) { if ((strcmp(text,"mil")) == 0) return LENGTH_MIL; if ((strcmp(text,"cm")) == 0) return LENGTH_CM; if ((strcmp(text,"mm")) == 0) return LENGTH_MM; if ((strcmp(text,"m")) == 0) return LENGTH_M; if ((strcmp(text,"um")) == 0) return LENGTH_UM; if ((strcmp(text,"in")) == 0) return LENGTH_IN; if ((strcmp(text,"ft")) == 0) return LENGTH_FT; if ((strcmp(text,"GHz")) == 0) return FREQ_GHZ; if ((strcmp(text,"Hz")) == 0) return FREQ_HZ; if ((strcmp(text,"kHz")) == 0) return FREQ_KHZ; if ((strcmp(text,"MHz")) == 0) return FREQ_MHZ; if ((strcmp(text,"Ohm")) == 0) return RES_OHM; if ((strcmp(text,"kOhm")) == 0) return RES_KOHM; if ((strcmp(text,"Deg")) == 0) return ANG_DEG; if ((strcmp(text,"Rad")) == 0) return ANG_RAD; /* error */ return (-1); } /* * length_unit_text - returns character string for length unit * kludgy! */ gchar * length_unit_text (short unitint) { switch(unitint) { case LENGTH_MIL: return "mil"; break; case LENGTH_CM: return "cm"; break; case LENGTH_MM: return "mm"; break; case LENGTH_M: return "m"; break; case LENGTH_UM: return "um"; break; case LENGTH_IN: return "in"; break; case LENGTH_FT: return "ft"; break; default: fprintf(stderr, "length_unit_text: unknown unit!\n"); } /* error */ return NULL; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/setup_label.c��������������������������������������������������������������������0000644�0001750�0001750�00000023374�07514036161�012337� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* * setup_label.c - Sets the labels up for different parameters * including the tooltip text */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include "transcalc.h" void setup_label(short ttype, trans_label * tlabel) { /* tlabel = g_malloc(sizeof (*tlabel)); */ /* tlabel = calloc(8, 30*sizeof (char)); */ switch (ttype) { case MICROSTRIP : /* substrate names */ tlabel->substrate_label_name[0] = "Er"; tlabel->substrate_label_name[1] = "Mur"; tlabel->substrate_label_name[2] = "H"; tlabel->substrate_label_name[3] = "H_t"; tlabel->substrate_label_name[4] = "T"; tlabel->substrate_label_name[5] = "Cond"; tlabel->substrate_label_name[6] = "Tand"; tlabel->substrate_label_name[7] = "Rough"; tlabel->substrate_label_name[8] = NULL; /* component names */ tlabel->component_label_name[0] = "Freq"; tlabel->component_label_name[1] = NULL; tlabel->component_label_name[2] = NULL; /* physical parameter names */ tlabel->physical_label_name[0] = "W"; tlabel->physical_label_name[1] = "L"; tlabel->physical_label_name[2] = NULL; tlabel->physical_label_name[3] = NULL; /* electrical parameter names */ tlabel->electrical_label_name[0] = "Z0"; tlabel->electrical_label_name[1] = "E_eff"; tlabel->electrical_label_name[2] = NULL; tlabel->electrical_label_name[3] = NULL; /* substrate tooltips */ tlabel->stooltips_helptext[0] = "Relative Permittivity"; tlabel->stooltips_helptext[1] = "Relative Permeability"; tlabel->stooltips_helptext[2] = "Height of substrate"; tlabel->stooltips_helptext[3] = "Height of Box top"; tlabel->stooltips_helptext[4] = "Thickness of Strip"; tlabel->stooltips_helptext[5] = "Conductivity of strip"; tlabel->stooltips_helptext[6] = "Dielectric Loss Tangent"; tlabel->stooltips_helptext[7] = "Conductor Roughness"; tlabel->stooltips_helptext[8] = NULL; /* component tooltips */ tlabel->ctooltips_helptext[0] = "Frequency"; tlabel->ctooltips_helptext[1] = NULL; tlabel->ctooltips_helptext[2] = NULL; /* physical tooltips */ tlabel->ptooltips_helptext[0] = "Line Width"; tlabel->ptooltips_helptext[1] = "Line Length"; tlabel->ptooltips_helptext[2] = NULL; tlabel->ptooltips_helptext[3] = NULL; /* electrical tooltips */ tlabel->etooltips_helptext[0] = "Characteristic Impedance"; tlabel->etooltips_helptext[1] = "Electrical Length"; tlabel->etooltips_helptext[2] = NULL; tlabel->etooltips_helptext[3] = NULL; break; case RECTWAVEGUIDE : /* substrate names */ tlabel->substrate_label_name[0] = "Er"; tlabel->substrate_label_name[1] = "Mur"; tlabel->substrate_label_name[2] = "Cond"; tlabel->substrate_label_name[3] = "Tand"; tlabel->substrate_label_name[4] = "TanM"; tlabel->substrate_label_name[5] = NULL; tlabel->substrate_label_name[6] = NULL; tlabel->substrate_label_name[7] = NULL; tlabel->substrate_label_name[8] = NULL; /* component names */ tlabel->component_label_name[0] = "Freq"; tlabel->component_label_name[1] = NULL; tlabel->component_label_name[2] = NULL; /* physical parameter names */ tlabel->physical_label_name[0] = "a"; tlabel->physical_label_name[1] = "b"; tlabel->physical_label_name[2] = "L"; tlabel->physical_label_name[3] = NULL; /* electrical parameter names */ tlabel->electrical_label_name[0] = "Z0"; tlabel->electrical_label_name[1] = "E_eff"; tlabel->electrical_label_name[2] = NULL; tlabel->electrical_label_name[3] = NULL; /* substrate tooltips */ tlabel->stooltips_helptext[0] = "Relative Permittivity"; tlabel->stooltips_helptext[1] = "Relative Permeability"; tlabel->stooltips_helptext[2] = "Conductivity of Metal"; tlabel->stooltips_helptext[3] = "Dielectric Loss Tangent"; tlabel->stooltips_helptext[4] = "Magnetic Loss Tangent"; tlabel->stooltips_helptext[5] = NULL; tlabel->stooltips_helptext[6] = NULL; tlabel->stooltips_helptext[7] = NULL; tlabel->stooltips_helptext[8] = NULL; /* component tooltips */ tlabel->ctooltips_helptext[0] = "Frequency"; tlabel->ctooltips_helptext[1] = NULL; tlabel->ctooltips_helptext[2] = NULL; /* physical tooltips */ tlabel->ptooltips_helptext[0] = "Width of Waveguide"; tlabel->ptooltips_helptext[1] = "Height of Waveguide"; tlabel->ptooltips_helptext[2] = "Length"; tlabel->ptooltips_helptext[3] = NULL; /* electrical tooltips */ tlabel->etooltips_helptext[0] = "Characteristic Impedance"; tlabel->etooltips_helptext[1] = "Electrical Length"; tlabel->etooltips_helptext[2] = NULL; tlabel->etooltips_helptext[3] = NULL; break; case COAX : /* substrate names */ tlabel->substrate_label_name[0] = "Er"; tlabel->substrate_label_name[1] = "Mur"; tlabel->substrate_label_name[2] = "Tand"; tlabel->substrate_label_name[3] = "Sigma"; tlabel->substrate_label_name[4] = NULL; tlabel->substrate_label_name[5] = NULL; tlabel->substrate_label_name[6] = NULL; tlabel->substrate_label_name[7] = NULL; tlabel->substrate_label_name[8] = NULL; /* component names */ tlabel->component_label_name[0] = "Freq"; tlabel->component_label_name[1] = NULL; tlabel->component_label_name[2] = NULL; /* physical parameter names */ tlabel->physical_label_name[0] = "din"; tlabel->physical_label_name[1] = "dout"; tlabel->physical_label_name[2] = "L"; tlabel->physical_label_name[3] = NULL; /* electrical parameter names */ tlabel->electrical_label_name[0] = "Z0"; tlabel->electrical_label_name[1] = "E_eff"; tlabel->electrical_label_name[2] = NULL; tlabel->electrical_label_name[3] = NULL; /* substrate tooltips */ tlabel->stooltips_helptext[0] = "Relative Permittivity"; tlabel->stooltips_helptext[1] = "Relative Permeability"; tlabel->stooltips_helptext[2] = "Dielectric Loss Tangent"; tlabel->stooltips_helptext[3] = "Conductivity of Metal"; tlabel->stooltips_helptext[4] = NULL; tlabel->stooltips_helptext[5] = NULL; tlabel->stooltips_helptext[6] = NULL; tlabel->stooltips_helptext[7] = NULL; tlabel->stooltips_helptext[8] = NULL; /* component tooltips */ tlabel->ctooltips_helptext[0] = "Frequency"; tlabel->ctooltips_helptext[1] = NULL; tlabel->ctooltips_helptext[2] = NULL; /* physical tooltips */ tlabel->ptooltips_helptext[0] = "Inner diameter"; tlabel->ptooltips_helptext[1] = "Outer Diameter"; tlabel->ptooltips_helptext[2] = "Length"; tlabel->ptooltips_helptext[3] = NULL; /* electrical tooltips */ tlabel->etooltips_helptext[0] = "Characteristic Impedance"; tlabel->etooltips_helptext[1] = "Electrical Length"; tlabel->etooltips_helptext[2] = NULL; tlabel->etooltips_helptext[3] = NULL; break; case C_MICROSTRIP : /* substrate names */ tlabel->substrate_label_name[0] = "Er"; tlabel->substrate_label_name[1] = "Mur"; tlabel->substrate_label_name[2] = "H"; tlabel->substrate_label_name[3] = "H_t"; tlabel->substrate_label_name[4] = "T"; tlabel->substrate_label_name[5] = "Cond"; tlabel->substrate_label_name[6] = "Tand"; tlabel->substrate_label_name[7] = "Rough"; tlabel->substrate_label_name[8] = NULL; /* component names */ tlabel->component_label_name[0] = "Freq"; tlabel->component_label_name[1] = NULL; tlabel->component_label_name[2] = NULL; /* physical parameter names */ tlabel->physical_label_name[0] = "W"; tlabel->physical_label_name[1] = "S"; tlabel->physical_label_name[2] = "L"; tlabel->physical_label_name[3] = NULL; /* electrical parameter names */ tlabel->electrical_label_name[0] = "Z0e"; tlabel->electrical_label_name[1] = "Z0o"; tlabel->electrical_label_name[2] = "E_eff"; tlabel->electrical_label_name[3] = NULL; /* substrate tooltips */ tlabel->stooltips_helptext[0] = "Relative Permittivity"; tlabel->stooltips_helptext[1] = "Relative Permeability"; tlabel->stooltips_helptext[2] = "Height of substrate"; tlabel->stooltips_helptext[3] = "Height of Box top"; tlabel->stooltips_helptext[4] = "Thickness of Strip"; tlabel->stooltips_helptext[5] = "Conductivity of strip"; tlabel->stooltips_helptext[6] = "Dielectric Loss Tangent"; tlabel->stooltips_helptext[7] = "Conductor Roughness"; tlabel->stooltips_helptext[8] = NULL; /* component tooltips */ tlabel->ctooltips_helptext[0] = "Frequency"; tlabel->ctooltips_helptext[1] = NULL; tlabel->ctooltips_helptext[2] = NULL; /* physical tooltips */ tlabel->ptooltips_helptext[0] = "Line Width"; tlabel->ptooltips_helptext[1] = "Line Length"; tlabel->ptooltips_helptext[2] = NULL; tlabel->ptooltips_helptext[3] = NULL; /* electrical tooltips */ tlabel->etooltips_helptext[0] = "Even-mode Impedance"; tlabel->etooltips_helptext[1] = "Odd-mode Impedance"; tlabel->etooltips_helptext[2] = "Electrical Length"; tlabel->etooltips_helptext[3] = NULL; break; default: fprintf(stderr, "Unknown transmission line type!\n"); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/setup_values.c�������������������������������������������������������������������0000644�0001750�0001750�00000012340�07514036161�012546� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* * setup_values.c - Sets up the default values for different parameters * of transmission lines * This function will undergo major changes in subsequent releases like * allowing default values to be saved and loaded */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include "transcalc.h" void setup_values (short ttype, trans_value *tvalue) { switch (ttype) { case MICROSTRIP : /* substrate */ tvalue->subparams_value[0] = 2.94; tvalue->subparams_value[1] = 1.0; tvalue->subparams_value[2] = 10.0; tvalue->subparams_value[3] = 1.e20; tvalue->subparams_value[4] = 0.1; tvalue->subparams_value[5] = 4.1e7; tvalue->subparams_value[6] = 0.0; tvalue->subparams_value[7] = 0.0; tvalue->subparams_value[8] = -1.0; /* -1 implies no value and make widget insensitive*/ /* component */ tvalue->component_params_value[0] = 1.0; tvalue->component_params_value[1] = -1.0; tvalue->component_params_value[2] = -1.0; /* physical */ tvalue->physical_params_value[0] = 10.0; tvalue->physical_params_value[1] = 100.0; tvalue->physical_params_value[2] = -1.0; tvalue->physical_params_value[3] = -1.0; /* electrical */ tvalue->electrical_params_value[0] = 50.0; tvalue->electrical_params_value[1] = 90.0; tvalue->electrical_params_value[2] = -1.0; tvalue->electrical_params_value[3] = -1.0; break; case RECTWAVEGUIDE : /* substrate */ tvalue->subparams_value[0] = 1.0; tvalue->subparams_value[1] = 1.0; tvalue->subparams_value[2] = 4.1e7; tvalue->subparams_value[3] = 0.0; tvalue->subparams_value[4] = 0.0; tvalue->subparams_value[5] = -1.0; tvalue->subparams_value[6] = -1.0; tvalue->subparams_value[7] = -1.0; tvalue->subparams_value[8] = -1.0; /* component */ tvalue->component_params_value[0] = 10.0; tvalue->component_params_value[1] = -1.0; tvalue->component_params_value[2] = -1.0; /* physical */ tvalue->physical_params_value[0] = 1000.0; tvalue->physical_params_value[1] = 500.0; tvalue->physical_params_value[2] = 4000.0; tvalue->physical_params_value[3] = -1.0; /* electrical */ tvalue->electrical_params_value[0] = 50.0; tvalue->electrical_params_value[1] = 90.0; tvalue->electrical_params_value[2] = -1.0; tvalue->electrical_params_value[3] = -1.0; break; case COAX : /* substrate */ tvalue->subparams_value[0] = 2.1; tvalue->subparams_value[1] = 1.0; tvalue->subparams_value[2] = 0.002; tvalue->subparams_value[3] = 4.1e7; tvalue->subparams_value[4] = -1.0; tvalue->subparams_value[5] = -1.0; tvalue->subparams_value[6] = -1.0; tvalue->subparams_value[7] = -1.0; tvalue->subparams_value[8] = -1.0; /* component */ tvalue->component_params_value[0] = 10.0; tvalue->component_params_value[1] = -1.0; tvalue->component_params_value[2] = -1.0; /* physical */ tvalue->physical_params_value[0] = 40.0; tvalue->physical_params_value[1] = 134.0; tvalue->physical_params_value[2] = 1000.0; tvalue->physical_params_value[3] = -1.0; /* electrical */ tvalue->electrical_params_value[0] = 50.0; tvalue->electrical_params_value[1] = 90.0; tvalue->electrical_params_value[2] = -1.0; tvalue->electrical_params_value[3] = -1.0; break; case C_MICROSTRIP : /* substrate */ tvalue->subparams_value[0] = 4.3; tvalue->subparams_value[1] = 1.0; tvalue->subparams_value[2] = 8.27; tvalue->subparams_value[3] = 1.e20; tvalue->subparams_value[4] = 0.68; tvalue->subparams_value[5] = 4.1e7; tvalue->subparams_value[6] = 0.0; tvalue->subparams_value[7] = 0.0; tvalue->subparams_value[8] = -1.0; /* -1 implies no value and make widget insensitive*/ /* component */ tvalue->component_params_value[0] = 10.0; tvalue->component_params_value[1] = -1.0; tvalue->component_params_value[2] = -1.0; /* physical */ tvalue->physical_params_value[0] = 8.66; tvalue->physical_params_value[1] = 5.31; tvalue->physical_params_value[2] = 1000.0; tvalue->physical_params_value[3] = -1.0; tvalue->physical_params_value[3] = -1.0; /* electrical */ tvalue->electrical_params_value[0] = 50.0; tvalue->electrical_params_value[1] = 90.0; tvalue->electrical_params_value[2] = -1.0; tvalue->electrical_params_value[3] = -1.0; break; default: fprintf(stderr, "setup_values: unknown transmission line type!\n"); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/setup_transgui.c�����������������������������������������������������������������0000644�0001750�0001750�00000052377�07715557540�013135� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* * setup_transgui - Puts up window for all the transmission lines */ #include <stdlib.h> #include <stdio.h> #include <gtk/gtk.h> #include <string.h> #include <math.h> #include <sys/stat.h> #include <config.h> #include "setup.h" void setup_transgui (int ttype, GtkWidget *parent, trans_win *twin) { GtkWidget *vbox; GtkWidget *label; GtkTooltips *tooltips,*ctooltips,*ptooltips,*etooltips,*btooltips; short row, col; gchar *textentry; GtkWidget *labelbox; GtkWidget *drawingbox; GtkWidget *scrolledwin; GtkWidget *hbox2; GtkWidget *table; gfloat defaultval; struct stat statbuf; trans_label *tlabel; trans_value *tvalue; GtkWidget *hboxtop; GtkWidget *hboxbot; GtkWidget *hbox3; gchar *drawing_filename; gchar *image_dir; /* allocate and setup labels */ tlabel = g_malloc(sizeof(*tlabel)); setup_label(ttype, tlabel); /* allocate and setup default values */ tvalue = g_malloc(sizeof(*tvalue)); setup_values(ttype, tvalue); /*allocate memory for textentry */ if ((textentry = (char *) malloc(20*sizeof(char))) == NULL){ perror("help text error: malloc"); return; } /*#ifdef HAVE_IMLIB */ if ((image_dir = (char *) malloc(50*sizeof(char))) == NULL){ perror("image dir malloc error:"); return; } if ((drawing_filename = (char *) malloc(50*sizeof(char))) == NULL){ perror("drawing filename malloc error:"); return; } /*#endif*/ /* Add a vbox and hbox to start the packing */ main_body_window = gtk_vbox_new (FALSE, 5); hboxtop = gtk_hbox_new (FALSE, 5); vbox = gtk_vbox_new (FALSE, 5); /* pack these in the parent window */ /* gtk_container_add (GTK_CONTAINER (parent), main_body_window);*/ gtk_box_pack_start (GTK_BOX (parent), main_body_window, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (main_body_window), hboxtop, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hboxtop), vbox, TRUE, TRUE, 0); switch (ttype) { case MICROSTRIP : twin->drawing_frame = gtk_frame_new ("Microstrip"); break; case RECTWAVEGUIDE : twin->drawing_frame = gtk_frame_new ("Rectangular Waveguide"); break; case COAX : twin->drawing_frame = gtk_frame_new ("Coaxial Line"); break; case C_MICROSTRIP : twin->drawing_frame = gtk_frame_new ("Coupled Microstrip"); break; } gtk_container_add (GTK_CONTAINER (vbox), twin->drawing_frame); /* Grab the filename for drawing */ /*#ifdef HAVE_IMLIB */ sprintf (image_dir, "%s/transcalc/images/",DATADIR); /* sprintf(image_dir, "../images/");*/ if (stat(image_dir, &statbuf)) { perror("image dir does not exist"); exit (-1); } strcpy(drawing_filename,image_dir); switch (ttype){ case MICROSTRIP: strcat (drawing_filename,"microstrip.jpg"); break; case RECTWAVEGUIDE: strcat (drawing_filename,"rectwaveguide.jpg"); break; case COAX: strcat (drawing_filename,"coax.jpg"); break; case C_MICROSTRIP: strcat (drawing_filename,"c_microstrip.jpg"); break; } free(image_dir); if (drawing_filename) { drawingbox = gtk_hbox_new (TRUE, 0); pack_image_in_box ( drawingbox, drawing_filename); gtk_container_add (GTK_CONTAINER (twin->drawing_frame), drawingbox); gtk_widget_show (drawingbox); } free(drawing_filename); /* #else gtk_widget_set_usize (twin->drawing_frame, 300, -1); #endif */ /* ifdef HAVE_IMLIB */ gtk_widget_show (twin->drawing_frame); /* The substrate parameters frame */ twin->subparam_frame = gtk_frame_new ("Substrate Parameters"); gtk_container_add (GTK_CONTAINER (vbox), twin->subparam_frame); gtk_widget_set_usize (twin->subparam_frame,300,-1); scrolledwin = gtk_scrolled_window_new (NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrolledwin), 5); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (twin->subparam_frame), scrolledwin); gtk_widget_set_usize (twin->subparam_frame,-1,200); gtk_widget_show (scrolledwin); /* Make a table of NUMSUBPARS rows and 3 columns */ twin->subparam_table = gtk_table_new (NUMSUBPARS, 3, TRUE); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwin), twin->subparam_table); tooltips = gtk_tooltips_new (); for (row = 0; row < NUMSUBPARS; row++) { for (col = 0; col < 3; col++) { switch (col) { case 0: /* Since tooltips need to be on widgets with event capability * use eventbox to locate labels and tooltips */ labelbox = gtk_event_box_new (); label = gtk_label_new (tlabel->substrate_label_name[row]); gtk_widget_set_usize(label,10,-1); gtk_container_add (GTK_CONTAINER (labelbox), label); gtk_table_attach_defaults (GTK_TABLE (twin->subparam_table), labelbox, col, (col+1), row, (row+1)); gtk_tooltips_set_tip (tooltips, labelbox, tlabel->stooltips_helptext[row], NULL); gtk_widget_show (label); gtk_widget_show (labelbox); break; case 1 : twin->subparam_text[row] = gtk_entry_new_with_max_length (10); switch (ttype) { case MICROSTRIP : switch (row) { case 2 : case 3 : case 4 : case 7 : defaultval = tvalue->subparams_value[row] * conv_length[LENGTH_MIL][length_unit]; break; default: defaultval = tvalue->subparams_value[row]; break; } break; case RECTWAVEGUIDE : defaultval = tvalue->subparams_value[row]; break; case COAX : defaultval = tvalue->subparams_value[row]; break; case C_MICROSTRIP : switch (row) { case 2 : case 3 : case 4 : case 7 : defaultval = tvalue->subparams_value[row] * conv_length[LENGTH_MIL][length_unit]; break; default: defaultval = tvalue->subparams_value[row]; break; } break; } sprintf(textentry,"%g", (float) defaultval); gtk_widget_set_usize(twin->subparam_text[row],10,-1); gtk_entry_set_text (GTK_ENTRY (twin->subparam_text[row]), textentry); gtk_table_attach_defaults (GTK_TABLE (twin->subparam_table), twin->subparam_text[row], col, (col+1), row, (row+1)); gtk_widget_show (twin->subparam_text[row]); if (defaultval == -1.0) { gtk_entry_set_text (GTK_ENTRY (twin->subparam_text[row]), ""); gtk_widget_set_sensitive ( GTK_WIDGET (GTK_ENTRY (twin->subparam_text[row])), FALSE); } break; case 2: twin->subparam_combo[row] = GTK_WIDGET (setup_combo_widget (SUBPARAMTYPE, row)); gtk_table_attach_defaults (GTK_TABLE (twin->subparam_table), twin->subparam_combo[row], col, (col+1), row, (row+1)); gtk_widget_set_usize(twin->subparam_combo[row],4,-1); gtk_widget_show (twin->subparam_combo[row]); break; } } gtk_signal_connect (GTK_OBJECT (twin->subparam_text[row]), "changed", GTK_SIGNAL_FUNC (setstatus), twin); } gtk_tooltips_enable (GTK_TOOLTIPS (tooltips)); gtk_widget_show (twin->subparam_table); gtk_widget_show (twin->subparam_frame); gtk_widget_show (vbox); /* Now comes the component frame */ /* new vbox for next column*/ vbox = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (hboxtop), vbox, TRUE, TRUE, 0); twin->component_param_frame = gtk_frame_new ("Component Parameters"); gtk_container_add (GTK_CONTAINER (vbox), twin->component_param_frame); scrolledwin = gtk_scrolled_window_new (NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrolledwin), 5); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (twin->component_param_frame), scrolledwin); gtk_widget_show (scrolledwin); /* Make a table of 3 rows and 3 columns */ twin->component_param_table = gtk_table_new (NUMCOMPPARS, 3, TRUE); /* gtk_container_add (GTK_CONTAINER (twin->component_param_frame), twin->component_param_table); */ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwin), twin->component_param_table); ctooltips = gtk_tooltips_new (); for (row = 0; row < NUMCOMPPARS; row++) { for (col = 0; col < 3; col++) { switch (col) { case 0 : /* Since tooltips need to be on widgets with event capability * use eventbox to locate labels and tooltips */ labelbox = gtk_event_box_new (); label = gtk_label_new (tlabel->component_label_name[row]); gtk_container_add (GTK_CONTAINER (labelbox), label); gtk_widget_set_usize(label,10,-1); gtk_table_attach_defaults (GTK_TABLE (twin->component_param_table), labelbox, col, (col+1), row, (row+1)); gtk_tooltips_set_tip (ctooltips, labelbox, tlabel->ctooltips_helptext[row], NULL); gtk_widget_show (label); gtk_widget_show (labelbox); break; case 1 : twin->component_param_text[row] = gtk_entry_new_with_max_length (10); switch (row) { case 0 : defaultval = tvalue->component_params_value[row] * conv_freq[FREQ_GHZ][freq_unit]; break; default: defaultval = tvalue->component_params_value[row]; break; } sprintf(textentry,"%g", (float) defaultval); gtk_entry_set_text (GTK_ENTRY (twin->component_param_text[row]), textentry); gtk_widget_set_usize(twin->component_param_text[row],10,-1); gtk_table_attach_defaults (GTK_TABLE (twin->component_param_table), twin->component_param_text[row], col, (col+1), row, (row+1)); gtk_widget_show (twin->component_param_text[row]); if (defaultval == -1.0) { gtk_entry_set_text (GTK_ENTRY (twin->component_param_text[row]), ""); gtk_widget_set_sensitive ( GTK_WIDGET (GTK_ENTRY (twin->component_param_text[row])), FALSE); } break; case 2 : twin->component_param_combo[row] = GTK_WIDGET (setup_combo_widget (COMPPARAMTYPE, row)); gtk_table_attach_defaults (GTK_TABLE (twin->component_param_table), twin->component_param_combo[row], col, (col+1), row, (row+1)); gtk_widget_set_usize(twin->component_param_combo[row],4,-1); gtk_widget_show (twin->component_param_combo[row]); break; } } gtk_signal_connect (GTK_OBJECT (twin->component_param_text[row]), "changed", GTK_SIGNAL_FUNC (setstatus), twin); } gtk_widget_show (twin->component_param_table); gtk_widget_show (twin->component_param_frame); /* The physical parameters frame */ twin->physical_param_frame = gtk_frame_new ("Physical Parameters"); gtk_container_add (GTK_CONTAINER (vbox), twin->physical_param_frame); gtk_widget_set_usize (twin->physical_param_frame,300,100); scrolledwin = gtk_scrolled_window_new (NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrolledwin), 5); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (twin->physical_param_frame), scrolledwin); gtk_widget_show (scrolledwin); /* Make a table of NUMPHYSPARS rows and 3 columns */ twin->physical_param_table = gtk_table_new (NUMPHYSPARS, 4, TRUE); /* gtk_container_add (GTK_CONTAINER (scrolledwin), twin->physical_param_table); */ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwin), twin->physical_param_table); ptooltips = gtk_tooltips_new (); for (row = 0; row < NUMPHYSPARS; row++) { for (col = 0; col < 4; col++) { switch (col) { case 0 : /* Since tooltips need to be on widgets with event capability * use eventbox to locate labels and tooltips */ labelbox = gtk_event_box_new (); label = gtk_label_new (tlabel->physical_label_name[row]); gtk_widget_set_usize(label,10,-1); gtk_container_add (GTK_CONTAINER (labelbox), label); gtk_table_attach_defaults (GTK_TABLE (twin->physical_param_table), labelbox, col, (col+1), row, (row+1)); gtk_tooltips_set_tip (ptooltips, labelbox, tlabel->ptooltips_helptext[row], NULL); gtk_widget_show (label); gtk_widget_show (labelbox); break; case 1 : twin->physical_param_text[row] = gtk_entry_new_with_max_length (10); switch (ttype) { case MICROSTRIP : switch (row) { case 0 : case 1 : defaultval = tvalue->physical_params_value[row] * conv_length[LENGTH_MIL][length_unit]; break; default: defaultval = tvalue->physical_params_value[row]; break; } break; case RECTWAVEGUIDE : case COAX : switch (row) { case 0 : case 1 : case 2 : defaultval = tvalue->physical_params_value[row] * conv_length[LENGTH_MIL][length_unit]; break; default: defaultval = tvalue->physical_params_value[row]; break; } case C_MICROSTRIP : switch (row) { case 0 : case 1 : case 2 : defaultval = tvalue->physical_params_value[row] * conv_length[LENGTH_MIL][length_unit]; break; default: defaultval = tvalue->physical_params_value[row]; break; } break; default: fprintf(stderr, "setup_transgui: unknown transmission line type!\n"); break; } sprintf(textentry,"%g", (float) defaultval); gtk_widget_set_usize(twin->physical_param_text[row],10,-1); gtk_entry_set_text (GTK_ENTRY (twin->physical_param_text[row]), textentry); gtk_table_attach_defaults (GTK_TABLE (twin->physical_param_table), twin->physical_param_text[row], col, (col+1), row, (row+1)); gtk_widget_show (twin->physical_param_text[row]); if (defaultval == -1.0) { gtk_entry_set_text (GTK_ENTRY (twin->physical_param_text[row]), ""); gtk_widget_set_sensitive ( GTK_WIDGET (GTK_ENTRY (twin->physical_param_text[row])), FALSE); } break; case 2 : twin->physical_param_combo[row] = GTK_WIDGET (setup_combo_widget (PHYSPARAMTYPE, row)); gtk_table_attach_defaults (GTK_TABLE (twin->physical_param_table), twin->physical_param_combo[row], col, (col+1), row, (row+1)); gtk_widget_set_usize(twin->physical_param_combo[row],4,-1); gtk_widget_show (twin->physical_param_combo[row]); break; case 3 : switch(row) { case 0 : case 1 : twin->physical_param_fix[row] = gtk_button_new_with_label("Fix"); gtk_table_attach_defaults (GTK_TABLE (twin->physical_param_table), twin->physical_param_fix[row], col, (col+1), row, (row+1)); /* gtk_widget_set_sensitive (GTK_WIDGET (twin->physical_param_fix[row]), FALSE);*/ gtk_widget_show (twin->physical_param_fix[row]); break; default: break; } break; } } gtk_signal_connect (GTK_OBJECT (twin->physical_param_text[row]), "changed", GTK_SIGNAL_FUNC (setstatus), twin); } gtk_tooltips_enable (GTK_TOOLTIPS (tooltips)); gtk_widget_show (twin->physical_param_table); gtk_widget_show (twin->physical_param_frame); /* Put Analbutton & synbuttons in place */ hbox2 = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0); btooltips = gtk_tooltips_new (); table = gtk_table_new (1, 2 , TRUE); gtk_container_add (GTK_CONTAINER (hbox2), table); twin->Analbutton = gtk_button_new_with_label ("Analyze"); gtk_table_attach_defaults (GTK_TABLE (table), twin->Analbutton, 0, 1, 0, 1); gtk_tooltips_set_tip (btooltips, twin->Analbutton, "Derive Electrical Parameters", NULL); gtk_widget_show(twin->Analbutton); twin->Synbutton = gtk_button_new_with_label ("Synthesize"); gtk_table_attach_defaults (GTK_TABLE (table), twin->Synbutton, 1, 2, 0, 1); gtk_tooltips_set_tip (btooltips, twin->Synbutton, "Synthesize Physical Parameters", NULL); gtk_widget_show(twin->Synbutton); gtk_widget_show(table); gtk_widget_show (hbox2); gtk_tooltips_enable (GTK_TOOLTIPS (btooltips)); /* The electrical parameters frame */ twin->electrical_param_frame = gtk_frame_new ("Electrical Parameters"); gtk_container_add (GTK_CONTAINER (vbox), twin->electrical_param_frame); gtk_widget_set_usize (twin->electrical_param_frame,300,-1); scrolledwin = gtk_scrolled_window_new (NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrolledwin), 5); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (twin->electrical_param_frame), scrolledwin); gtk_widget_show (scrolledwin); /* Make a table of NUMPHYSPARS rows and 3 columns */ twin->electrical_param_table = gtk_table_new (NUMPHYSPARS, 3, TRUE); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwin), twin->electrical_param_table); etooltips = gtk_tooltips_new (); for (row = 0; row < NUMPHYSPARS; row++) { for (col = 0; col < 3; col++) { switch (col) { case 0 : /* Since tooltips need to be on widgets with event capability * use eventbox to locate labels and tooltips */ labelbox = gtk_event_box_new (); label = gtk_label_new (tlabel->electrical_label_name[row]); gtk_widget_set_usize(label,10,-1); gtk_container_add (GTK_CONTAINER (labelbox), label); gtk_table_attach_defaults (GTK_TABLE (twin->electrical_param_table), labelbox, col, (col+1), row, (row+1)); gtk_tooltips_set_tip (etooltips, labelbox, tlabel->etooltips_helptext[row], NULL); gtk_widget_show (label); gtk_widget_show (labelbox); break; case 1 : twin->electrical_param_text[row] = gtk_entry_new_with_max_length (10); switch (row) { case 0 : defaultval = tvalue->electrical_params_value[row] * conv_res[RES_OHM][res_unit]; break; case 1 : defaultval = tvalue->electrical_params_value[row] * conv_ang[ANG_DEG][ang_unit]; break; default: defaultval = tvalue->electrical_params_value[row]; break; } sprintf(textentry,"%g", (float) defaultval); gtk_widget_set_usize(twin->electrical_param_text[row],10,-1); gtk_entry_set_text (GTK_ENTRY (twin->electrical_param_text[row]), textentry); gtk_table_attach_defaults (GTK_TABLE (twin->electrical_param_table), twin->electrical_param_text[row], col, (col+1), row, (row+1)); gtk_widget_show (twin->electrical_param_text[row]); if (defaultval == -1.0) { gtk_entry_set_text (GTK_ENTRY (twin->electrical_param_text[row]), ""); gtk_widget_set_sensitive ( GTK_WIDGET (GTK_ENTRY (twin->electrical_param_text[row])), FALSE); } break; case 2 : twin->electrical_param_combo[row] = GTK_WIDGET (setup_combo_widget (ELECPARAMTYPE, row)); gtk_table_attach_defaults (GTK_TABLE (twin->electrical_param_table), twin->electrical_param_combo[row], col, (col+1), row, (row+1)); gtk_widget_set_usize(twin->electrical_param_combo[row],4,-1); gtk_widget_show (twin->electrical_param_combo[row]); break; } } } free(tlabel); gtk_tooltips_enable (GTK_TOOLTIPS (tooltips)); gtk_widget_show (twin->electrical_param_table); gtk_widget_show (twin->electrical_param_frame); /* The calculated results frame */ free(textentry); if ((textentry = (char *) malloc(300*sizeof(char))) == NULL){ perror("results text error: malloc"); return; } else { if (twin->results_frame == NULL) { strcpy(textentry,"Press Analyze to get electrical parameters\nSynthesize to derive physical parameters"); statusint = INCONSISTENT; } else { strcpy (textentry,"\n"); } } twin->results_frame = gtk_frame_new ("Calculated Results"); gtk_container_add (GTK_CONTAINER (vbox), twin->results_frame); gtk_widget_set_usize (twin->results_frame,300,-1); scrolledwin = gtk_scrolled_window_new (NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrolledwin), 5); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (twin->results_frame), scrolledwin); gtk_widget_show (scrolledwin); gtk_widget_set_usize (scrolledwin, -1, 150); twin->results_text = gtk_label_new (textentry); gtk_label_set_justify (GTK_LABEL (twin->results_text), GTK_JUSTIFY_LEFT); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwin), twin->results_text); /* gtk_container_add (GTK_CONTAINER (twin->results_frame), twin->results_text);*/ /* gtk_widget_set_usize (twin->results_text,-1,150);*/ gtk_widget_show (twin->results_text); gtk_widget_show (twin->results_frame); gtk_widget_show (vbox); gtk_widget_show (hboxtop); hboxbot = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (main_body_window), hboxbot, FALSE, FALSE, 0); hbox3 = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (hboxbot), hbox3, TRUE, TRUE, 0); setup_status (hbox3, twin); statusexists = TRUE; gtk_widget_show (hbox3); gtk_widget_show (hboxbot); gtk_widget_show (main_body_window); gtk_widget_show (parent); statusint = INCONSISTENT; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/file_io.c������������������������������������������������������������������������0000644�0001750�0001750�00000034243�07715570604�011453� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* file_io.c * * Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * 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 */ /* This is just a quick hack for saving/loading transmission lines data */ /* some of the functions are adapted from gfit and other GPL'ed software */ /* Thanks goes to all the people writing free software ! */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <fnmatch.h> #include <string.h> #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> #include "file_io.h" #include "transcalc.h" #ifdef HAVE_FNMATCH #include <fnmatch.h> #else #include "fnmatch.h" #endif static gint goto_flag = 0; static gint idle_flag = 0; /* file name filter for file dialog */ static gchar *filter_text = "*.trc"; static GtkWidget *filter_entry = NULL; //extern trans_win *twin; gint trc_file_save (FILE *fp, short file_save_mode) { time_t date; gint i; gchar *tmp_str1 = NULL, *tmp_str2 = NULL; gchar *tmp_str = NULL; /* get current date and time */ time(&date); /* write header */ fprintf(fp, "# This file was automatically generated\n"); fprintf(fp, "# by transcalc "VERSION" on %s", ctime(&date)); fprintf(fp, "#\n"); fprintf(fp, "# It is suggested not to edit this file directly, use transcalc instead\n"); fprintf(fp, "#\n"); fprintf(fp, "\n"); /* write transmission line type */ tmp_str = (gchar *) gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(transtype_combo)->entry)); fprintf(fp, "%s\n", tmp_str); /* write substrate parameters */ for (i = 0; i < NUMSUBPARS; i++) { tmp_str1 = (gchar *) gtk_entry_get_text(GTK_ENTRY (twin->subparam_text[i])); /* if entry has no text write "NULL" on file */ if (tmp_str1[0] == '\0') strcpy(tmp_str1, "NULL"); tmp_str2 = (gchar *) gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (twin->subparam_combo[i])->entry)); fprintf(fp, "%s %s\n", tmp_str1, tmp_str2); } /* write component parameters */ for (i = 0; i < NUMCOMPPARS; i++) { tmp_str1 = (gchar *) gtk_entry_get_text (GTK_ENTRY (twin->component_param_text[i])); /* if entry has no text write "NULL" on file */ if (tmp_str1[0] == '\0') strcpy(tmp_str1, "NULL"); tmp_str2 = (gchar *) gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (twin->component_param_combo[i])->entry)); fprintf(fp, "%s %s\n", tmp_str1, tmp_str2); } /* write physical parameters */ for (i = 0; i < NUMPHYSPARS; i++) { tmp_str1 = (gchar *) gtk_entry_get_text (GTK_ENTRY (twin->physical_param_text[i])); /* if entry has no text write "NULL" on file */ if (tmp_str1[0] == '\0') strcpy(tmp_str1, "NULL"); tmp_str2 = (gchar *) gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (twin->physical_param_combo[i])->entry)); fprintf(fp, "%s %s\n", tmp_str1, tmp_str2); } /* write physical parameters status (fix/fixed) */ for (i = 0; i < 2; i++) { gtk_label_get(GTK_LABEL (GTK_BIN (twin->physical_param_fix[i])->child), &tmp_str); fprintf(fp, "%s %i\n", tmp_str, GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET (twin->physical_param_fix[i]))); } /* write electrical parameters */ for (i = 0; i < NUMELECPARS; i++) { tmp_str1 = (gchar *) gtk_entry_get_text (GTK_ENTRY (twin->electrical_param_text[i])); /* if entry has no text write "NULL" on file */ if (tmp_str1[0] == '\0') strcpy(tmp_str1, "NULL"); tmp_str2 = (gchar *) gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (twin->electrical_param_combo[i])->entry)); fprintf(fp, "%s %s\n", tmp_str1, tmp_str2); } /* write status */ gtk_label_get(GTK_LABEL (twin->status), &tmp_str); fprintf(fp, "%s\n", tmp_str); if (file_save_mode == SAVE_END) { gdk_window_get_size ( GTK_WIDGET (tgui->mainwindow)->window, &main_window_width, &main_window_height); fprintf(fp, "%d %d \n", main_window_width, main_window_height); } fclose(fp); return 0; } /* file_selection_ok_save() - write current transmission line data to file */ static gint file_selection_ok_save (GtkFileSelection *fs, GtkWidget *w) { FILE *fp; gchar *fname, *fname_ext; gchar *ext; /* get file name */ fname = (gchar *) gtk_file_selection_get_filename (fs); /* add file extension if necessary*/ ext = rindex (fname, '.'); if (ext == NULL) { fname_ext = g_strconcat(fname, ".trc", NULL); } else { if (strcmp(ext, ".trc")) fname_ext = g_strconcat(fname, ".trc", NULL); else fname_ext = g_strdup(fname); } fp = fopen(fname_ext, "w"); /* free complete file name string */ g_free(fname_ext); if (!fp) /* problems opening file */ return -1; /* file selection dialog is no longer needed */ gtk_widget_destroy (GTK_WIDGET (fs)); trc_file_save (fp, SAVE_OPER); return 0; } gint trc_file_load (FILE *fp, short load_mode) { gchar tmp_str1[80], tmp_str2[80]; gint i, tmp_int; char buf[256], *ip = NULL, *end = NULL; /* here fgets and scanf are mixed, could be done in a better way... */ do { fgets(buf, 256, fp); ip = &buf[0]; /* skip spaces */ while ((*ip == ' ') || (*ip == '\t')) ip++; } while ((*ip == '#') || (*ip == '\n')); /* don't process empty lines */ /* Get the ending position. */ for (end = ip; *end && *end != '\n'; end++); /* make sure it terminates with '\0' */ *end = '\0'; /* read transmission line type */ gtk_entry_set_text (GTK_ENTRY (GTK_COMBO(transtype_combo)->entry), ip); /* read substrate parameters */ for (i = 0; i < NUMSUBPARS; i++) { fscanf(fp, "%s %s\n", tmp_str1, tmp_str2); /* if "NULL" is read entry will have no text */ if (!strcmp(tmp_str1, "NULL")) tmp_str1[0] = '\0'; gtk_entry_set_text(GTK_ENTRY (twin->subparam_text[i]), tmp_str1); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (twin->subparam_combo[i])->entry), tmp_str2); } /* read component parameters */ for (i = 0; i < NUMCOMPPARS; i++) { fscanf(fp, "%s %s\n", tmp_str1, tmp_str2); /* if "NULL" is read entry will have no text */ if (!strcmp(tmp_str1, "NULL")) tmp_str1[0] = '\0'; gtk_entry_set_text (GTK_ENTRY (twin->component_param_text[i]), tmp_str1); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (twin->component_param_combo[i])->entry), tmp_str2); } /* read physical parameters */ for (i = 0; i < NUMPHYSPARS; i++) { fscanf(fp, "%s %s\n", tmp_str1, tmp_str2); /* if "NULL" is read entry will have no text */ if (!strcmp(tmp_str1, "NULL")) tmp_str1[0] = '\0'; gtk_entry_set_text (GTK_ENTRY (twin->physical_param_text[i]), tmp_str1); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (twin->physical_param_combo[i])->entry), tmp_str2); } /* read physical parameters status (fix/fixed) */ for (i = 0; i < 2; i++) { fscanf(fp, "%s %i\n", tmp_str1, &tmp_int); gtk_label_set_text(GTK_LABEL (GTK_BIN (twin->physical_param_fix[i])->child), tmp_str1); gtk_widget_set_sensitive(GTK_WIDGET (twin->physical_param_fix[i]), tmp_int); } /* read electrical parameters */ for (i = 0; i < NUMELECPARS; i++) { fscanf(fp, "%s %s\n", tmp_str1, tmp_str2); /* if "NULL" is read entry will have no text */ if (!strcmp(tmp_str1, "NULL")) tmp_str1[0] = '\0'; gtk_entry_set_text (GTK_ENTRY (twin->electrical_param_text[i]), tmp_str1); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (twin->electrical_param_combo[i])->entry), tmp_str2); } /* read status string */ /* get whole line */ fgets(buf, 256, fp); ip = &buf[0]; /* Get the ending position. */ for (end = ip; *end && *end != '\n'; end++); /* make sure it terminates with '\0' */ *end = '\0'; gtk_label_set_text(GTK_LABEL (twin->status), ip); if (load_mode == LOAD_INIT) { fscanf(fp, "%d %d\n", &main_window_width, &main_window_height); } fclose (fp); return 0; } /* file_selection_ok_load() - read transmission line data from file */ static gint file_selection_ok_load (GtkFileSelection *fs, GtkWidget *w) { FILE *fp; gchar *fname; /* get selected file name */ fname = (gchar *) gtk_file_selection_get_filename (fs); /* try to open the file */ fp = fopen(fname, "r"); /* done with fname, destroy the file dialog */ gtk_widget_destroy (GTK_WIDGET (fs)); if (!fp) /* problems opening file */ return -1; trc_file_load (fp, LOAD_OPER); return 0; } /* this function is called when the file selection entry changes */ static void file_selection_update_file_list(GtkWidget * dialog) { GtkFileSelection *fs = NULL; gchar *list_name; guint i = 0; g_return_if_fail(GTK_IS_FILE_SELECTION(dialog)); fs = GTK_FILE_SELECTION(dialog); gtk_idle_remove(idle_flag); idle_flag = 0; if (!filter_text || !strlen(filter_text)) return; /* stop updating the list visuals */ gtk_clist_freeze(GTK_CLIST(fs->file_list)); while (gtk_clist_get_text(GTK_CLIST(fs->file_list), i, 0, &list_name)) { if (fnmatch(filter_text, list_name, 0)) { gtk_clist_remove(GTK_CLIST(fs->file_list), i); continue; } i++; } /* enable updating list visuals */ gtk_clist_thaw(GTK_CLIST(fs->file_list)); } /* if user double-click on a directory update the file list according to the current filter */ static void file_selection_dir_button(GtkWidget * widget, GtkWidget * dialog) { if (idle_flag) { return; } idle_flag = gtk_idle_add((GtkFunction) file_selection_update_file_list, dialog); } /* When file_selection_dialog() is called with a path argument ending with * a file name this function search and higlight this file in the file list, * if present * * Adapted from gtk-app-devel-list, Andreas Tille: tille@physik.uni-halle.de * */ static void file_selection_goto(GtkFileSelection * fs) { const char *pre_file; gchar *list_name; gint i; gtk_idle_remove(goto_flag); goto_flag = 0; g_return_if_fail(GTK_IS_FILE_SELECTION(fs)); pre_file = gtk_entry_get_text(GTK_ENTRY(fs->selection_entry)); if (pre_file) { i = -1; while (gtk_clist_get_text(GTK_CLIST(fs->file_list), ++i, 0, &list_name)) { if (list_name && g_str_equal(list_name, pre_file)) { gtk_clist_select_row(GTK_CLIST(fs->file_list), i, 0); gtk_clist_moveto(GTK_CLIST(fs->file_list), i, 0, 0.5, 0.0); break; } } } } /* when filter entry is changed update the file list according to the current filter */ static gint file_selection_filter_key_press(GtkWidget * widget, GdkEventKey * event, GtkWidget * dialog) { GtkFileSelection *fs = NULL; if (!GTK_IS_FILE_SELECTION(dialog)) return FALSE; fs = GTK_FILE_SELECTION(dialog); if (event->keyval == GDK_KP_Enter) { /* convert keypad enter key to return key (?) */ event->keyval = GDK_Return; } if (event->keyval == GDK_Tab || event->keyval == GDK_Return) { filter_text = (gchar *) gtk_entry_get_text(GTK_ENTRY(widget)); /* this will trigger the file list updating */ gtk_file_selection_set_filename(fs, "./"); } return FALSE; } /* create a file selection dialog with a given window title and given current files path */ static GtkWidget* file_selection_dialog (gchar * title, gchar *path) { static GtkWidget *dialog = NULL; GtkWidget *label = NULL; if (!dialog) { dialog = gtk_file_selection_new (title); gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (dialog)); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); gtk_signal_connect (GTK_OBJECT (dialog), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dialog); label = gtk_label_new("Filter:"); gtk_box_pack_start(GTK_BOX(GTK_FILE_SELECTION (dialog)->action_area), label, FALSE, FALSE, 0); gtk_widget_show(label); filter_entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(GTK_FILE_SELECTION (dialog)->action_area), filter_entry, FALSE, FALSE, 0); gtk_entry_set_text(GTK_ENTRY(filter_entry), filter_text); gtk_widget_show(filter_entry); /* when the selection entry changes update the file list */ /* this can be triggered also by double clicking on a directory */ gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION(dialog)->selection_entry), "changed", (GtkSignalFunc) file_selection_dir_button, (gpointer) dialog); gtk_signal_connect(GTK_OBJECT(filter_entry), "key_press_event", (GtkSignalFunc) file_selection_filter_key_press, dialog); /* set current filename (if any); this will also trigger file list update, according to filter_text */ gtk_file_selection_set_filename(GTK_FILE_SELECTION(dialog), path); /* select the current selection entry */ gtk_editable_select_region(GTK_EDITABLE(GTK_FILE_SELECTION(dialog)->selection_entry), 0, -1); goto_flag = gtk_idle_add((GtkFunction) file_selection_goto, (gpointer) dialog); } if (!GTK_WIDGET_VISIBLE (dialog)) gtk_widget_show (dialog); else gtk_widget_destroy (dialog); return dialog; } /* prepare creation of file selection dialoc setting the callbacks and window title */ void file_dialog(gpointer callback_data, guint callback_action, GtkWidget *widget) { GtkWidget *filesel = NULL; switch (callback_action) { case TC_FILE_LOAD : filesel = file_selection_dialog("Load file...", "./"); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "clicked", GTK_SIGNAL_FUNC(file_selection_ok_load), GTK_OBJECT(filesel)); break; case TC_FILE_SAVE : filesel = file_selection_dialog("Save file...", "./"); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "clicked", GTK_SIGNAL_FUNC(file_selection_ok_save), GTK_OBJECT(filesel)); break; default : g_assert_not_reached(); } gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), "clicked", (GtkSignalFunc)gtk_widget_destroy, GTK_OBJECT(filesel)); gtk_widget_show (filesel); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/print_trans.c��������������������������������������������������������������������0000644�0001750�0001750�00000020045�07715565777�012422� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2002 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* print_trans.c */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include "transcalc.h" extern void setup_label (short, trans_label *); extern short transtype_int (void); /* private stuff for print dialog */ GtkWidget *print_command; /* Gtk Entry contains print command */ static gchar* print_command_text = "lpr"; /* The following adapted from Pan */ static gint print_execute (const gchar *command, const gchar *text) { FILE * fp = NULL; fp = popen (command, "w"); if (fp == NULL) { fprintf (stderr,"print_execute(): error in popen()\n"); perror("pipe"); return -1; } /* dump the message to the pipe */ fputs (text, fp); fflush (fp); fclose (fp); return 0; } gchar * get_trans_text () { time_t date; gchar *retval = NULL; trans_label *tlabel; int i; const gchar *newch1=NULL, *newch2 = NULL; const gchar *tmpstr=NULL; GString *s = g_string_new (NULL); /* get current date and time */ time(&date); g_string_sprintf (s,"TRANSCALC v%s\n",VERSION); g_string_sprintfa (s, "%s\n",ctime(&date)); g_string_append (s, "Transmission Line Type: "); newch1 = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(transtype_combo)->entry)); g_string_append (s, newch1); g_string_append (s, "\n\n\n"); /* allocate and setup labels */ tlabel = g_malloc(sizeof(*tlabel)); setup_label ((short) transtype_int (), tlabel); g_string_append (s, "Substrate Parameters: \n\n"); /* print substrate parameters */ for (i=0; i < NUMSUBPARS; i++) { newch1 = gtk_entry_get_text(GTK_ENTRY (twin->subparam_text[i])); /* if entry has some text do something - otherwise skip */ if (newch1[0] != '\0') { newch2 = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (twin->subparam_combo[i])->entry)); g_string_sprintfa (s, " %s = %s",tlabel->substrate_label_name[i], newch1); if (strcmp(newch2,"NA")) g_string_sprintfa (s, " %s ",newch2); g_string_sprintfa (s, " (%s) \n", tlabel->stooltips_helptext[i]); } } g_string_append (s, "\nComponent Parameters: \n\n"); /* print component parameters */ for (i=0; i< NUMCOMPPARS; i++) { newch1 = gtk_entry_get_text (GTK_ENTRY (twin->component_param_text[i])); /* if entry has some text do something - otherwise skip */ if (newch1[0] != '\0') { newch2 = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (twin->component_param_combo[i])->entry)); g_string_sprintfa (s, " %s = %s",tlabel->component_label_name[i], newch1); if (strcmp(newch2,"NA")) g_string_sprintfa (s, " %s ",newch2); g_string_sprintfa (s, " (%s) \n", tlabel->ctooltips_helptext[i]); } } g_string_append (s, "\nPhysical Parameters: \n\n"); /* print physical parameters */ for (i=0; i< NUMPHYSPARS; i++) { newch1 = gtk_entry_get_text (GTK_ENTRY (twin->physical_param_text[i])); /* if entry has some text do something - otherwise skip */ if (newch1[0] != '\0') { newch2 = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (twin->physical_param_combo[i])->entry)); g_string_sprintfa (s, " %s = %s",tlabel->physical_label_name[i], newch1); if (strcmp(newch2,"NA")) g_string_sprintfa (s, " %s ",newch2); if (i < 2) { gtk_label_get(GTK_LABEL (GTK_BIN (twin->physical_param_fix[i])->child), &tmpstr); g_string_sprintfa (s, "<%s> ", tmpstr); } g_string_sprintfa (s, " (%s) \n", tlabel->ptooltips_helptext[i]); } } g_string_append (s, "\nElectrical Parameters: \n\n"); /* print electrical parameters */ for (i=0; i< NUMPHYSPARS; i++) { newch1 = gtk_entry_get_text (GTK_ENTRY (twin->electrical_param_text[i])); /* if entry has some text do something - otherwise skip */ if (newch1[0] != '\0') { newch2 = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (twin->electrical_param_combo[i])->entry)); g_string_sprintfa (s, " %s = %s",tlabel->electrical_label_name[i], newch1); if (strcmp(newch2,"NA")) g_string_sprintfa (s, " %s ",newch2); g_string_sprintfa (s, " (%s) \n", tlabel->etooltips_helptext[i]); } } g_string_append (s, "\nCalculated Results: \n\n"); /* print calculated results */ gtk_label_get (GTK_LABEL (twin->results_text), &newch1); g_string_sprintfa (s, "%s", newch1); /* write status */ g_string_append (s, "\nStatus: \n\n"); gtk_label_get(GTK_LABEL (twin->status), &newch1); g_string_sprintfa (s, "%s\n", newch1); free (tlabel); retval = s->str; g_string_free (s, FALSE); return retval; } void print_ok (GtkWidget *widget, gpointer data) { gchar *command; gchar *text; /* find out how to execute it */ command = gtk_editable_get_chars (GTK_EDITABLE(print_command),0,-1); /* build the text */ text = get_trans_text (); print_command_text = g_strdup (command); if (print_execute (command, text)) fprintf(stderr, "Printing with command: %s failed \n", command); /* fprintf (stderr, "%s", text);*/ g_free (text); g_free (command); gtk_widget_destroy (GTK_WIDGET (data)); } void print_cb (GtkWidget *widget, gpointer data) { static GtkWidget *dialog=NULL; GtkWidget *button; GtkWidget *label, *labelbox; GtkWidget *hbox; GtkTooltips *tooltips; if (!dialog) { dialog = gtk_dialog_new (); gtk_signal_connect (GTK_OBJECT (dialog), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dialog); gtk_window_set_title (GTK_WINDOW (dialog), "Print"); gtk_container_set_border_width (GTK_CONTAINER (dialog), 10); gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); hbox = gtk_hbox_new (FALSE, 25); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0); tooltips = gtk_tooltips_new (); labelbox = gtk_event_box_new (); gtk_tooltips_set_tip (tooltips, labelbox, "Use 'cat > file' to print to file", NULL); label = gtk_label_new ("Print Command"); gtk_container_add (GTK_CONTAINER (labelbox), label); gtk_box_pack_start (GTK_BOX (hbox),labelbox, FALSE, FALSE, 0); gtk_widget_show (label); gtk_widget_show (labelbox); print_command = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), print_command, FALSE, FALSE, 0); gtk_widget_show (print_command); gtk_widget_show (hbox); gtk_entry_set_text (GTK_ENTRY (print_command), print_command_text); hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbox, TRUE, TRUE, 0); button = gtk_button_new_with_label ("Print"); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (print_ok), dialog); gtk_widget_show (button); button = gtk_button_new_with_label ("Cancel"); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (dialog)); gtk_widget_show (button); gtk_widget_grab_default (button); gtk_widget_show (hbox); } if (!GTK_WIDGET_VISIBLE (dialog)) gtk_widget_show(dialog); else gtk_widget_destroy (dialog); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/microstrip.c���������������������������������������������������������������������0000644�0001750�0001750�00000051737�07520053027�012234� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* microstrip.c * * Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> * Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * 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 */ /* microstrip.c - Puts up window for microstrip and * performs the associated calculations * Based on the original microstrip.c by Gopal Narayanan */ #include <stdlib.h> #include <stdio.h> #include <gtk/gtk.h> #include <string.h> #include <math.h> #include "unitscombo.h" #include "microstrip.h" /* this is just a quick hack for mingw32 */ #ifndef HAVE_ATANH static double atanh(double x) { return (0.5 * log((1.0 + x) / (1.0 - x))); } #endif /* * skin_depth - calculate skin depth */ gfloat skin_depth(microstrip * ms) { gfloat mur, sigma, f; gfloat depth; mur = ms->mur; f = ms->f; sigma = ms->sigma; depth = 1.0 / (sqrt(M_PI * f * mur * MU0 * sigma)); return depth; } /* Z0_homogeneous() - compute the impedance for a stripline in a homogeneous medium, without cover effects */ gfloat Z0_homogeneous(gfloat u) { gfloat f, Z0; f = 6.0 + (2.0 * M_PI - 6.0) * exp(-pow(30.666 / u, 0.7528)); Z0 = (377.0 / (2.0 * M_PI)) * log(f / u + sqrt(1.0 + 4.0 / (u * u))); return Z0; } /* delta_Z0_cover() - compute the cover effect on impedance for a stripline in a homogeneous medium */ gfloat delta_Z0_cover(gfloat u, gfloat h2h) { gfloat P, Q; gfloat h2hp1; h2hp1 = 1.0 + h2h; P = 270.0 * (1.0 - tanh(1.192 + 0.706 * sqrt(h2hp1) - 1.389 / h2hp1)); Q = 1.0109 - atanh((0.012 * u + 0.177 * u * u - 0.027 * u * u * u) / (h2hp1 * h2hp1)); return (P * Q); } /* filling_factor() - compute the filling factor for a microstrip without cover and zero conductor thickness */ gfloat filling_factor(gfloat u, gfloat e_r) { gfloat a, b, q_inf; gfloat u2, u3, u4; u2 = u * u; u3 = u2 * u; u4 = u3 * u; a = 1.0 + log((u4 + u2 / 2704) / (u4 + 0.432)) / 49.0 + log(1.0 + u3 / 5929.741) / 18.7; b = 0.564 * pow((e_r - 0.9) / (e_r + 3.0), 0.053); q_inf = pow(1.0 + 10.0 / u, -a * b); return q_inf; } /* delta_q_cover() - compute the cover effect on filling factor */ gfloat delta_q_cover(gfloat h2h) { gfloat q_c; q_c = tanh(1.043 + 0.121 * h2h - 1.164 / h2h); return q_c; } /* delta_q_thickness() - compute the thickness effect on filling factor */ gfloat delta_q_thickness(gfloat u, gfloat t_h) { gfloat q_t; q_t = (2.0 * log(2.0) / M_PI) * (t_h / sqrt(u)); return q_t; } /* e_r_effective() - compute effective dielectric constant from material e_r and filling factor */ gfloat e_r_effective(gfloat e_r, gfloat q) { gfloat e_r_eff; e_r_eff = 0.5 * (e_r + 1.0) + 0.5 * q * (e_r - 1.0); return e_r_eff; } /* delta_u_thickness - compute the thickness effect on normalized width */ gfloat delta_u_thickness(gfloat u, gfloat t_h, gfloat e_r) { gfloat delta_u; if (t_h > 0.0) { /* correction for thickness for a homogeneous microstrip */ delta_u = (t_h / M_PI) * log(1.0 + (4.0 * M_E) * pow(tanh(sqrt(6.517 * u)), 2.0) / t_h); /* correction for strip on a substrate with relative permettivity e_r */ delta_u = 0.5 * delta_u * (1.0 + 1.0 / cosh(sqrt(e_r - 1.0))); } else { delta_u = 0.0; } return delta_u; } /* microstrip_Z0() - compute microstrip static impedance */ void microstrip_Z0(microstrip * ms) { gfloat e_r, h, w, h2, h2h, u, t, t_h; gfloat Z0_h_1, Z0_h_r, Z0; gfloat delta_u_1, delta_u_r, q_inf, q_c, q_t, e_r_eff, e_r_eff_t, q; e_r = ms->er; h = ms->h; w = ms->w; t = ms->t; h2 = ms->ht; h2h = h2 / h; u = w / h; t_h = t / h; /* compute normalized width correction for e_r = 1.0 */ delta_u_1 = delta_u_thickness(u, t_h, 1.0); /* compute homogeneous stripline impedance */ Z0_h_1 = Z0_homogeneous(u + delta_u_1); /* compute normalized width corection */ delta_u_r = delta_u_thickness(u, t_h, e_r); u += delta_u_r; /* compute homogeneous stripline impedance */ Z0_h_r = Z0_homogeneous(u); /* filling factor, with width corrected for thickness */ q_inf = filling_factor(u, e_r); /* cover effect */ q_c = delta_q_cover(h2h); /* thickness effect */ q_t = delta_q_thickness(u, t_h); /* resultant filling factor */ q = (q_inf - q_t) * q_c; /* e_r corrected for thickness and non homogeneous material */ e_r_eff_t = e_r_effective(e_r, q); /* effective dielectric constant */ e_r_eff = e_r_eff_t * pow(Z0_h_1 / Z0_h_r, 2.0); /* characteristic impedance, corrected for thickness, cover */ /* and non homogeneous material */ Z0 = Z0_h_r / sqrt(e_r_eff_t); ms->Z0_h_1 = Z0_h_1; /* will be used in attenuation calculations */ ms->w_eff = u * h; ms->er_eff_0 = e_r_eff; ms->Z0_0 = Z0; } /* e_r_dispersion() - computes the dispersion correction factor for the effective permeability */ gfloat e_r_dispersion(gfloat u, gfloat e_r, gfloat f_n) { gfloat P_1, P_2, P_3, P_4, P; P_1 = 0.27488 + u * (0.6315 + 0.525 / pow(1.0 + 0.0157 * f_n, 20.0)) - 0.065683 * exp(-8.7513 * u); P_2 = 0.33622 * (1.0 - exp(-0.03442 * e_r)); P_3 = 0.0363 * exp(-4.6 * u) * (1.0 - exp(-pow(f_n / 38.7, 4.97))); P_4 = 1.0 + 2.751 * (1.0 - exp(-pow(e_r / 15.916, 8.0))); P = P_1 * P_2 * pow((P_3 * P_4 + 0.1844) * f_n, 1.5763); return P; } /* Z0_dispersion() - computes the dispersion correction factor for the characteristic impedance */ gfloat Z0_dispersion(gfloat u, gfloat e_r, gfloat e_r_eff_0, gfloat e_r_eff_f, gfloat f_n) { gfloat R_1, R_2, R_3, R_4, R_5, R_6, R_7, R_8, R_9, R_10, R_11, R_12, R_13, R_14, R_15, R_16, R_17, D, tmpf; R_1 = 0.03891 * pow(e_r, 1.4); R_2 = 0.267 * pow(u, 7.0); R_3 = 4.766 * exp(-3.228 * pow(u, 0.641)); R_4 = 0.016 + pow(0.0514 * e_r, 4.524); R_5 = pow(f_n / 28.843, 12.0); R_6 = 22.2 * pow(u, 1.92); R_7 = 1.206 - 0.3144 * exp(-R_1) * (1.0 - exp(-R_2)); R_8 = 1.0 + 1.275 * (1.0 - exp(-0.004625 * R_3 * pow(e_r, 1.674) * pow(f_n / 18.365, 2.745))); tmpf = pow(e_r - 1.0, 6.0); R_9 = 5.086 * R_4 * (R_5 / (0.3838 + 0.386 * R_4)) * (exp(-R_6) / (1.0 + 1.2992 * R_5)) * (tmpf / (1.0 + 10.0 * tmpf)); R_10 = 0.00044 * pow(e_r, 2.136) + 0.0184; tmpf = pow(f_n / 19.47, 6.0); R_11 = tmpf / (1.0 + 0.0962 * tmpf); R_12 = 1.0 / (1.0 + 0.00245 * u * u); R_13 = 0.9408 * pow(e_r_eff_f, R_8) - 0.9603; R_14 = (0.9408 - R_9) * pow(e_r_eff_0, R_8) - 0.9603; R_15 = 0.707 * R_10 * pow(f_n / 12.3, 1.097); R_16 = 1.0 + 0.0503 * e_r * e_r * R_11 * (1.0 - exp(-pow(u / 15.0, 6.0))); R_17 = R_7 * (1.0 - 1.1241 * (R_12 / R_16) * exp(-0.026 * pow(f_n, 1.15656) - R_15)); D = pow(R_13 / R_14, R_17); return D; } /* microstrip_dispersion() - compute frequency dependent parameters of microstrip */ void microstrip_dispersion(microstrip * ms) { gfloat e_r, h, w, f, Z0_0, e_r_eff_0; gfloat u, f_n, P, e_r_eff_f, D, Z0_f; e_r = ms->er; h = ms->h; w = ms->w; f = ms->f; Z0_0 = ms->Z0_0; e_r_eff_0 = ms->er_eff_0; u = w / h; /* normalized frequency [GHz * mm] */ f_n = f * h / 1e06; P = e_r_dispersion(u, e_r, f_n); /* effective dielectric constant corrected for dispersion */ e_r_eff_f = e_r - (e_r - e_r_eff_0) / (1.0 + P); D = Z0_dispersion(u, e_r, e_r_eff_0, e_r_eff_f, f_n); Z0_f = Z0_0 * D; ms->er_eff = e_r_eff_f; ms->Z0 = Z0_f; } /* conductor_losses() - compute microstrip conductor losses per unit length */ static gfloat conductor_losses(microstrip * ms) { gfloat f, w, e_r_eff_0, Z0_h_1, delta, sigma, rough, tand; gfloat K, R_s, Q_c, alpha_c; f = ms->f; w = ms->w; e_r_eff_0 = ms->er_eff_0; Z0_h_1 = ms->Z0_h_1; /* homogeneous stripline impedance */ delta = ms->skindepth; sigma = ms->sigma; rough = ms->rough; tand = ms->tand; if (f > 0.0) { /* current distribution factor */ K = exp(-1.2 * pow(Z0_h_1 / 377.0, 0.7)); /* skin resistance */ R_s = 1.0 / (sigma * delta); /* correction for surface roughness */ R_s *= 1.0 + ((2.0 / M_PI) * atan(1.40 * pow((rough / delta), 2.0))); /* strip inductive quality factor */ Q_c = (M_PI * Z0_h_1 * w * f) / (R_s * C0 * K); alpha_c = (20.0 * M_PI / log(10.0)) * f * sqrt(e_r_eff_0) / (C0 * Q_c); } else { alpha_c = 0.0; } return alpha_c; } /* dielectric_losses() - compute microstrip dielectric losses per unit length */ static gfloat dielectric_losses(microstrip * ms) { gfloat f, e_r, e_r_eff_0, tand; gfloat alpha_d; f = ms->f; e_r = ms->er; e_r_eff_0 = ms->er_eff_0; tand = ms->tand; alpha_d = (20.0 * M_PI / log(10.0)) * (f / C0) * (e_r / sqrt(e_r_eff_0)) * ((e_r_eff_0 - 1.0) / (e_r - 1.0)) * tand; return alpha_d; } /* microstrip_attenuation() - compute attenuation of microstrip */ static void microstrip_attenuation(microstrip * ms) { ms->skindepth = skin_depth(ms); ms->atten_cond = conductor_losses(ms) * ms->l; ms->atten_dielectric = dielectric_losses(ms) * ms->l; } /* mur_eff_ms - returns effective magnetic permeability */ static void mur_eff_ms(microstrip * ms) { gfloat mur, h, w; gfloat mureff; mur = ms->mur; h = ms->h; w = ms->w; mureff = (2.0 * mur) / ((1.0 + mur) + ((1.0 - mur) * pow((1.0 + (10.0 * h / w)), -0.5))); ms->mur_eff = mureff; } /* * synth_width - calculate width given Z0 and e_r */ gfloat synth_width(microstrip * ms) { gfloat Z0, e_r, a, b, h; gfloat w_h, w; e_r = ms->er; Z0 = ms->Z0; h = ms->h; a = ((Z0 / 60.) * sqrt((e_r + 1) / 2.)) + ((e_r - 1) / (e_r + 1) * (0.23 + (0.11 / e_r))); b = 60. * pow(M_PI, 2) / (Z0 * sqrt(e_r)); if (a > 1.52) { w_h = 8 * exp(a) / (exp(2. * a) - 2); } else { w_h = (2. / M_PI) * (b - 1. - log((2 * b) - 1.) + ((e_r - 1) / (2 * e_r)) * (log(b - 1.) + 0.39 - 0.61 / e_r)); } if (h > 0.0) { w = w_h * h; return w; } else { exit(-1); } } /* line_angle() - calculate microstrip length in radians */ static void line_angle(microstrip * ms) { gfloat f, l, e_r_eff, mur_eff; gfloat v, lambda_g, ang_l; f = ms->f; l = ms->l; e_r_eff = ms->er_eff; mur_eff = ms->mur_eff; /* velocity */ v = C0 / sqrt(e_r_eff * mur_eff); /* wavelength */ lambda_g = v / f; /* electrical angles */ ang_l = 2.0 * M_PI * l / lambda_g; /* in radians */ ms->ang_l = ang_l; } void calc_microstrip(microstrip * ms) { /* effective permeability */ mur_eff_ms(ms); /* static impedance */ microstrip_Z0(ms); /* calculate freq dependence of er and Z0 */ microstrip_dispersion(ms); /* calculate electrical lengths */ line_angle(ms); /* calculate losses */ microstrip_attenuation(ms); } /* * get_microstrip_sub * get and assign microstrip substrate parameters * into microstrip structure */ void get_microstrip_sub(trans_win * mwin, microstrip * ms) { short curr_unit; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[0])), "%g", &ms->er) != 1) error_mes("Error: ms->er"); if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[1])), "%g", &ms->mur) != 1) error_mes("Error: ms->mur"); if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[2])), "%g", &ms->h) != 1) error_mes("Error: ms->h"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[2])->entry))); ms->h = ms->h * conv_length[curr_unit][LENGTH_M]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[3])), "%g", &ms->ht) != 1) error_mes("Error: ms->ht"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[3])->entry))); ms->ht = ms->ht * conv_length[curr_unit][LENGTH_M]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[4])), "%g", &ms->t) != 1) error_mes("Error: ms->t"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[4])->entry))); ms->t = ms->t * conv_length[curr_unit][LENGTH_M]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[5])), "%g", &ms->sigma) != 1) error_mes("Error: ms->sigma"); if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[6])), "%g", &ms->tand) != 1) error_mes("Error: ms->tand"); if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[7])), "%g", &ms->rough) != 1) error_mes("Error: ms->rough"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[7])->entry))); ms->rough = ms->rough * conv_length[curr_unit][LENGTH_M]; } /* * get_microstrip_comp * get and assign microstrip component parameters * into microstrip structure */ void get_microstrip_comp(trans_win * mwin, microstrip * ms) { short curr_unit; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->component_param_text[0])), "%g", &ms->f) != 1) error_mes("Error: ms->f"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->component_param_combo[0])->entry))); ms->f = ms->f * conv_freq[curr_unit][FREQ_HZ]; } /* * get_microstrip_elec * get and assign microstrip electrical parameters * into microstrip structure */ void get_microstrip_elec(trans_win * mwin, microstrip * ms) { short curr_unit; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->electrical_param_text[0])), "%g", &ms->Z0) != 1) error_mes("Error: ms->Z0"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->electrical_param_combo[0])->entry))); ms->Z0 = ms->Z0 * conv_res[curr_unit][RES_OHM]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->electrical_param_text[1])), "%g", &ms->ang_l) != 1) error_mes("Error: ms->ang_l"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->electrical_param_combo[1])->entry))); ms->ang_l = ms->ang_l * conv_ang[curr_unit][ANG_RAD]; } /* * get_microstrip_phys * get and assign microstrip physical parameters * into microstrip structure */ void get_microstrip_phys(trans_win * mwin, microstrip * ms) { short curr_unit; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->physical_param_text[0])), "%g", &ms->w) != 1) error_mes("Error: ms->w"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->physical_param_combo[0])->entry))); ms->w = ms->w * conv_length[curr_unit][LENGTH_M]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->physical_param_text[1])), "%g", &ms->l) != 1) error_mes("Error: ms->l"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->physical_param_combo[1])->entry))); ms->l = ms->l * conv_length[curr_unit][LENGTH_M]; } static void show_results(trans_win * mwin, microstrip * ms) { gchar *text, *results; short required_unit; if ((text = (char *) malloc(500 * sizeof(char))) == NULL) { perror("results text error: malloc"); exit(-1); } if ((results = (char *) malloc(500 * sizeof(char))) == NULL) { perror("results text error: malloc"); exit(-1); } required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->electrical_param_combo[0])->entry))); sprintf(text, "%g", (float) (ms->Z0 * conv_res[RES_OHM][required_unit])); gtk_entry_set_text(GTK_ENTRY(mwin->electrical_param_text[0]), text); required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->electrical_param_combo[1])->entry))); sprintf(text, "%g", (float) (ms->ang_l * conv_ang[ANG_RAD][required_unit])); gtk_entry_set_text(GTK_ENTRY(mwin->electrical_param_text[1]), text); required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->physical_param_combo[1])->entry))); sprintf(results, "er_eff = %.4g\n", ms->er_eff); sprintf(text, "Conductor Losses = %.4g dB\n", ms->atten_cond); strcat(results, text); sprintf(text, "Dielectric Losses = %.4g dB\n", ms->atten_dielectric); strcat(results, text); required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[4])->entry))); sprintf(text, "Skin Depth = %.4g %s\n", (ms->skindepth * conv_length[LENGTH_M][required_unit]), length_unit_text(getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[4])->entry))))); strcat(results, text); gtk_label_set(GTK_LABEL(mwin->results_text), results); free(results); free(text); } /* * analysis function */ void analyze_microstrip(GtkWidget * widget, trans_win * mwin) { /* trans_win *mwin = (trans_win *) data; */ gchar *text; microstrip *ms; /*allocate memory for text */ if ((text = (char *) malloc(10 * sizeof(char))) == NULL) { perror("text error: malloc"); exit(-1); } /*allocate memory for pointer ms */ if ((ms = g_malloc(sizeof *ms)) != NULL) { /* Get and assign substrate parameters */ get_microstrip_sub(mwin, ms); /* Get and assign component parameters */ get_microstrip_comp(mwin, ms); /* Get and assign physical parameters */ get_microstrip_phys(mwin, ms); /* compute microstrip parameters */ calc_microstrip(ms); /* print results in the subwindow */ show_results(mwin, ms); if (statusexists) { if (statusint != CONSISTENT) { gtk_label_set_text(GTK_LABEL(mwin->status), "Values are consistent"); } } statusint = CONSISTENT; } else { perror("malloc ms"); exit(-1); } } /* * synthesis function */ void synthesize_microstrip(GtkWidget * widget, trans_win * mwin) { gchar *text; microstrip *ms; short required_unit; gfloat Z0, Z0_current, Z0_result, increment, slope, error; gint iteration; /*allocate memory for pointer mw */ if ((ms = g_malloc(sizeof *ms)) != NULL) { /* Get and assign substrate parameters */ get_microstrip_sub(mwin, ms); /* Get and assign component parameters */ get_microstrip_comp(mwin, ms); /* Get and assign electrical parameters */ get_microstrip_elec(mwin, ms); /* Get and assign physical parameters */ /* at present it is required only for getting strips length */ get_microstrip_phys(mwin, ms); /* calculate width and use for initial value in Newton's method */ ms->w = synth_width(ms); /* required value of Z0 */ Z0 = ms->Z0; /* Newton's method */ iteration = 0; /* compute microstrip parameters */ calc_microstrip(ms); Z0_current = ms->Z0; error = fabs(Z0 - Z0_current); while (error > MAX_ERROR) { iteration++; increment = (ms->w / 100.0); ms->w += increment; /* compute microstrip parameters */ calc_microstrip(ms); Z0_result = ms->Z0; /* f(w(n)) = Z0 - Z0(w(n)) */ /* f'(w(n)) = -f'(Z0(w(n))) */ /* f'(Z0(w(n))) = (Z0(w(n)) - Z0(w(n+delw))/delw */ /* w(n+1) = w(n) - f(w(n))/f'(w(n)) */ slope = (Z0_result - Z0_current) / increment; /* printf("%g\n",slope); */ ms->w += (Z0 - Z0_current) / slope - increment; /* printf("ms->w = %g\n", ms->w); */ /* find new error */ /* compute microstrip parameters */ calc_microstrip(ms); Z0_current = ms->Z0; error = fabs(Z0 - Z0_current); /* printf("Iteration = %d\n",iteration); printf("w = %g\t Z0 = %g\n",ms->w, Z0_current); */ if (iteration > 100) break; } /*allocate memory for text */ if ((text = (char *) malloc(10 * sizeof(char))) == NULL) { perror("text error: malloc"); exit(-1); } required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->physical_param_combo[0])->entry))); sprintf(text, "%g", (float) (ms->w * conv_length[LENGTH_M][required_unit])); gtk_entry_set_text(GTK_ENTRY(mwin->physical_param_text[0]), text); free(text); /* compute microstrip parameters */ calc_microstrip(ms); /* print results in the subwindow */ show_results(mwin, ms); if (statusexists) { if (statusint != CONSISTENT) { gtk_label_set_text(GTK_LABEL(mwin->status), "Values are consistent"); } } statusint = CONSISTENT; } else { perror("malloc ms"); exit(-1); } } /* * the window aspect */ /*void microstrip_win (GtkWidget *parent)*/ void microstrip_win(GtkWidget * parent) /*microstrip_win (trans_gui *tg)*/ { short row; /* if there is a window that already exists kill it first */ if (main_body_window != NULL) { gtk_widget_destroy(main_body_window); g_free (twin); twin = g_malloc(sizeof(*twin)); } setup_transgui(MICROSTRIP, parent, twin); for (row = 0; row <= 1; row++) { gtk_widget_set_sensitive(GTK_WIDGET(twin->physical_param_fix[row]), FALSE); } gtk_signal_connect(GTK_OBJECT(twin->Analbutton), "clicked", GTK_SIGNAL_FUNC(analyze_microstrip), twin); gtk_signal_connect(GTK_OBJECT(twin->Synbutton), "clicked", GTK_SIGNAL_FUNC(synthesize_microstrip), twin); /* GTK_SIGNAL_FUNC (synthesize_microstrip), twin); */ if (statusint == INCONSISTENT) { analyze_microstrip(parent, (trans_win *) twin); } for (row = 0; row <= 1; row++) { gtk_signal_connect(GTK_OBJECT(twin->electrical_param_text[row]), "changed", GTK_SIGNAL_FUNC(setstatus), twin); } /* return twin; */ /* free(twin); */ } ���������������������������������transcalc-0.14/src/c_microstrip.c�������������������������������������������������������������������0000644�0001750�0001750�00000117463�07520053027�012535� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* c_microstrip.c * * Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * 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 */ /* c_microstrip.c - Puts up window for coupled microstrips and * performs the associated calculations * Based on the original microstrip.c by Gopal Narayanan */ #include <stdlib.h> #include <stdio.h> #include <gtk/gtk.h> #include <string.h> #include <math.h> #include "unitscombo.h" #include "microstrip.h" #include "c_microstrip.h" /* the following definitions are just a quick hack for mingw32 */ #ifndef HAVE_ATANH static double atanh(double x) { return (0.5 * log((1.0 + x) / (1.0 - x))); } #endif #ifndef HAVE_ASINH static double asinh(double x) { return log(x + sqrt(x * x + 1.0)); } #endif #ifndef HAVE_ACOSH static double acosh(double x) { return log(x + sqrt(x * x - 1.0)); } #endif static microstrip *aux_ms = NULL; /* * skin_depth - calculate skin depth */ static gfloat skin_depth(c_microstrip * c_ms) { gfloat mur, sigma, f; gfloat depth; mur = c_ms->mur; f = c_ms->f; sigma = c_ms->sigma; depth = 1.0 / (sqrt(M_PI * f * mur * MU0 * sigma)); return depth; } /** * delta_u_thickness_single - compute the thickness effect on normalized width for a single microstrip line * @u: normalized width * @t_h: normalized thickness * * delta_u_thickness_single() computes the thickness effect on normalized width for a single microstrip line * * References: * H. A. Atwater, "Simplified Design Equations for Microstrip Line Parameters", Microwave Journal, pp. 109-115, November 1989. */ gfloat delta_u_thickness_single(gfloat u, gfloat t_h) { gfloat delta_u; if (t_h > 0.0) { delta_u = (1.25 * t_h / M_PI) * (1.0 + log((2.0 + (4.0 * M_PI * u - 2.0) / (1.0 + exp(-100.0 * (u - 1.0 / (2.0 * M_PI))))) / t_h)); } else { delta_u = 0.0; } /* fprintf(stderr, "delta_u_thickness_single = %e\n", delta_u); */ return delta_u; } /** * delta_u_thickness - compute the thickness effect on normalized width * @c_ms: coupled microstrips structure pointer * * compute the thickness effect on normalized width for coupled microstrips * * References: Rolf Jansen, "High-Speed Cmputation of Single and Coupled Microstrip Parameters Including Dispersion, High-Order Modes, Loss and Finite Strip Thickness", IEEE Trans. MTT, vol. 26, no. 2, pp. 75-82, Feb. 1978 * */ static void delta_u_thickness(c_microstrip * c_ms) { gfloat e_r, s, h, w, t, u, g, t_h; gfloat delta_u, delta_t, delta_u_e, delta_u_o; e_r = c_ms->er; s = c_ms->s; h = c_ms->h; w = c_ms->w; t = c_ms->t; u = w / h; /* normalized line width */ g = s / h; /* normalized line spacing */ t_h = t / h; /* normalized strip thickness */ if (t_h > 0.0) { /* single microstrip correction for finite strip thickness */ delta_u = delta_u_thickness_single(u, t_h); delta_t = t_h / (g * e_r); /* thickness correction for the even- and odd-mode */ delta_u_e = delta_u * (1.0 - 0.5 * exp(-0.69 * delta_u / delta_t)); delta_u_o = delta_u_e + delta_t; } else { delta_u_e = delta_u_o = 0.0; } c_ms->w_t_e = w + delta_u_e * h; c_ms->w_t_o = w + delta_u_o * h; /* fprintf(stderr, "w_t_e = %e\n", c_ms->w_t_e); */ /* fprintf(stderr, "w_t_o = %e\n", c_ms->w_t_o); */ } /** * compute_single_line() - compute various parameters for a single line * @c_ms: coupled microstrips structure pointer * * compute various parameters for a zero-thickness single microstrip line with geometrical dimensions taken from the coupled microstrips structure pointed by @c_ms. * * References: Manfred Kirschning and Rolf Jansen, "Accurate Wide-Range Design Equations for the Frequency-Dependent Characteristic of Parallel Coupled Microstrip Lines", IEEE Trans. MTT, vol. 32, no. 1, Jan. 1984 * * E. Hammerstad and O. Jensen, "Accurate Models for Microstrip Computer-Aided Design", IEEE MTT-S Symposium Digest, pp. 407-409, Jun. 1980 */ static void compute_single_line(c_microstrip * c_ms) { gfloat er, mur, h, w, s, ht, t; gfloat w_h, ht_h; gfloat Z0_single, er_eff_single; // microstrip *ms; er = c_ms->er; mur = c_ms->mur; h = c_ms->h; w = c_ms->w; s = c_ms->s; t = c_ms->t; ht = c_ms->ht; ht_h = ht / h; w_h = w / h; if (aux_ms == NULL) if ((aux_ms = g_malloc(sizeof *aux_ms)) == NULL) fprintf(stderr, "error allocating aux_ms!\n"); /* prepare parameters for single microstrip computations */ aux_ms->er = er; aux_ms->w = w; aux_ms->h = h; aux_ms->t = 0.0; //aux_ms->t = t; aux_ms->ht = 1e12; /* arbitrarily high */ aux_ms->f = c_ms->f; aux_ms->mur = mur; microstrip_Z0(aux_ms); microstrip_dispersion(aux_ms); er_eff_single = aux_ms->er_eff_0; Z0_single = aux_ms->Z0_0; //fprintf(stderr, "aux_ms->C = %e\n", sqrt(aux_ms->er_eff_0) / (C0 * aux_ms->Z0_0)); } /** * filling_factor_even() - compute the filling factor for the coupled microstrips even-mode without cover and zero conductor thickness * @u: normalized width * @g: normalized strips spacing * @e_r: relative dielectric constant */ gfloat filling_factor_even(gfloat u, gfloat g, gfloat e_r) { gfloat v, v3, v4, a_e, b_e, q_inf; v = u * (20.0 + g * g) / (10.0 + g * g) + g * exp(-g); v3 = v * v * v; v4 = v3 * v; a_e = 1.0 + log((v4 + v * v / 2704.0) / (v4 + 0.432)) / 49.0 + log(1.0 + v3 / 5929.741) / 18.7; b_e = 0.564 * pow(((e_r - 0.9) / (e_r + 3.0)), 0.053); /* filling factor, with width corrected for thickness */ q_inf = pow((1.0 + 10.0 / v), -a_e * b_e); return q_inf; } /** * filling_factor_odd() - compute the filling factor for the coupled microstrips odd-mode without cover and zero conductor thickness * @u: normalized width * @g: normalized strips spacing * @e_r: relative dielectric constant */ gfloat filling_factor_odd(gfloat u, gfloat g, gfloat e_r) { gfloat b_o, c_o, d_o, q_inf; b_o = 0.747 * e_r / (0.15 + e_r); c_o = b_o - (b_o - 0.207) * exp(-0.414 * u); d_o = 0.593 + 0.694 * exp(-0.562 * u); /* filling factor, with width corrected for thickness */ q_inf = exp(-c_o * pow(g, d_o)); return q_inf; } /** * delta_q_cover_even() - compute the cover effect on filling factor for the even-mode * @h2h: normalized cover height */ gfloat delta_q_cover_even(gfloat h2h) { gfloat q_c; if (h2h <= 39) { q_c = tanh(1.626 + 0.107 * h2h - 1.733 / sqrt(h2h)); } else { q_c = 1.0; } return q_c; } /** * delta_q_cover_odd() - compute the cover effect on filling factor for the odd-mode * @h2h: normalized cover height */ gfloat delta_q_cover_odd(gfloat h2h) { gfloat q_c; if (h2h <= 7) { q_c = tanh(9.575 / (7.0 - h2h) - 2.965 + 1.68 * h2h - 0.311 * h2h * h2h); } else { q_c = 1.0; } return q_c; } /** * er_eff_static() - compute the static effective dielectric constants * @c_ms: coupled microstrips structure pointer * * compute the static effective dielectric constants of the coupled microstrips structure pointed by @c_ms. * References: Manfred Kirschning and Rolf Jansen, "Accurate Wide-Range Design Equations for the Frequency-Dependent Characteristic of Parallel Coupled Microstrip Lines", IEEE Trans. MTT, vol. 32, no. 1, Jan. 1984 */ static void er_eff_static(c_microstrip * c_ms) { gfloat er, s, h, w_t_e, w_t_o, u_t_e, u_t_o, g, h2, h2h; gfloat a_o, t, t_h, q, q_c, q_t, q_inf; gfloat er_eff_single; /* compute zero-thickness single line parameters */ compute_single_line(c_ms); er_eff_single = aux_ms->er_eff_0; er = c_ms->er; s = c_ms->s; h = c_ms->h; w_t_e = c_ms->w_t_e; w_t_o = c_ms->w_t_o; t = c_ms->t; h2 = c_ms->ht; u_t_e = w_t_e / h; /* normalized even_mode line width */ u_t_o = w_t_o / h; /* normalized odd_mode line width */ g = s / h; /* normalized line spacing */ h2h = h2 / h; /* normalized cover height */ t_h = t / h; /* normalized strip thickness */ /* filling factor, computed with thickness corrected width */ q_inf = filling_factor_even(u_t_e, g, er); /* cover effect */ q_c = delta_q_cover_even(h2h); /* thickness effect */ q_t = delta_q_thickness(u_t_e, t_h); /* resultant filling factor */ q = (q_inf - q_t) * q_c; /* static even-mode effective dielectric constant */ c_ms->er_eff_e_0 = 0.5 * (er + 1.0) + 0.5 * (er - 1.0) * q; /* filling factor, with width corrected for thickness */ q_inf = filling_factor_odd(u_t_o, g, er); /* cover effect */ q_c = delta_q_cover_odd(h2h); /* thickness effect */ q_t = delta_q_thickness(u_t_o, t_h); /* resultant filling factor */ q = (q_inf - q_t) * q_c; a_o = 0.7287 * (er_eff_single - 0.5 * (er + 1.0)) * (1.0 - exp(-0.179 * u_t_o)); /* static odd-mode effective dielectric constant */ c_ms->er_eff_o_0 = (0.5 * (er + 1.0) + a_o - er_eff_single) * q + er_eff_single; } /** * delta_Z0_even_cover() - compute the even-mode impedance correction for a homogeneous microstrip due to the cover * @g: normalized strips spacing * @u: normalized width * @h2h: normalized cover height * * compute the even-mode impedance correction for a homogeneous microstrip due to the cover * * References: * S. March, "Microstrip Packaging: Watch the Last Step", Microwaves, vol. 20, no. 13, pp. 83.94, Dec. 1981. */ static gfloat delta_Z0_even_cover(gfloat g, gfloat u, gfloat h2h) { gfloat f_e, g_e, delta_Z0_even; gfloat x, y, A, B, C, D, E, F; A = -4.351 / pow(1.0 + h2h, 1.842); B = 6.639 / pow(1.0 + h2h, 1.861); C = -2.291 / pow(1.0 + h2h, 1.90); f_e = 1.0 - atanh(A + (B + C * u) * u); x = pow(10.0, 0.103 * g - 0.159); y = pow(10.0, 0.0492 * g - 0.073); D = 0.747 / sin(0.5 * M_PI * x); E = 0.725 * sin(0.5 * M_PI * y); F = pow(10.0, 0.11 - 0.0947 * g); g_e = 270.0 * (1.0 - tanh(D + E * sqrt(1.0 + h2h) - F / (1.0 + h2h))); delta_Z0_even = f_e * g_e; return delta_Z0_even; } /** * delta_Z0_odd_cover() - compute the odd-mode impedance correction for a homogeneous microstrip due to the cover * @g: normalized strips spacing * @u: normalized width * @h2h: normalized cover height * * compute the odd-mode impedance correction for a homogeneous microstrip due to the cover * * References: * S. March, "Microstrip Packaging: Watch the Last Step", Microwaves, vol. 20, no. 13, pp. 83.94, Dec. 1981. */ static gfloat delta_Z0_odd_cover(gfloat g, gfloat u, gfloat h2h) { gfloat f_o, g_o, delta_Z0_odd; gfloat G, J, K, L; J = tanh(pow(1.0 + h2h, 1.585) / 6.0); f_o = pow(u, J); G = 2.178 - 0.796 * g; if (g > 0.858) { K = log10(20.492 * pow(g, 0.174)); } else { K = 1.30; } if (g > 0.873) { L = 2.51 * pow(g, -0.462); } else { L = 2.674; } g_o = 270.0 * (1.0 - tanh(G + K * sqrt(1.0 + h2h) - L / (1.0 + h2h))); delta_Z0_odd = f_o * g_o; return delta_Z0_odd; } /** * Z0_even_odd() - compute the static even- and odd-mode static impedances * @c_ms: coupled microstrips structure pointer * * compute the static even- and odd-mode static impedances * * References: Manfred Kirschning and Rolf Jansen, "Accurate Wide-Range Design Equations for the Frequency-Dependent Characteristic of Parallel Coupled Microstrip Lines", IEEE Trans. MTT, vol. 32, no. 1, Jan. 1984 * */ static void Z0_even_odd(c_microstrip * c_ms) { gfloat er_eff, s, h, h2, w_t_e, w_t_o, u_t_e, u_t_o, g, h2h; gfloat Q_1, Q_2, Q_3, Q_4, Q_5, Q_6, Q_7, Q_8, Q_9, Q_10; gfloat Z0_e_0, delta_Z0_e_0, Z0_o_0, delta_Z0_o_0, Z0_single, er_eff_single; s = c_ms->s; h = c_ms->h; h2 = c_ms->ht; w_t_e = c_ms->w_t_e; w_t_o = c_ms->w_t_o; u_t_e = w_t_e / h; /* normalized even-mode line width */ u_t_o = w_t_o / h; /* normalized odd-mode line width */ g = s / h; /* normalized line spacing */ h2h = h2 / h; /* normalized cover height */ Z0_single = aux_ms->Z0_0; er_eff_single = aux_ms->er_eff_0; /* even-mode */ er_eff = c_ms->er_eff_e_0; Q_1 = 0.8695 * pow(u_t_e, 0.194); Q_2 = 1.0 + 0.7519 * g + 0.189 * pow(g, 2.31); Q_3 = 0.1975 + pow((16.6 + pow((8.4 / g), 6.0)), -0.387) + log(pow(g, 10.0) / (1.0 + pow(g / 3.4, 10.0))) / 241.0; Q_4 = 2.0 * Q_1 / (Q_2 * (exp(-g) * pow(u_t_e, Q_3) + (2.0 - exp(-g)) * pow(u_t_e, -Q_3))); /* static even-mode impedance */ Z0_e_0 = Z0_single * sqrt(er_eff_single / er_eff) / (1.0 - sqrt(er_eff_single) * Q_4 * Z0_single / 377.0); /* correction for cover */ delta_Z0_e_0 = delta_Z0_even_cover(g, u_t_e, h2h) / sqrt(er_eff); c_ms->Z0_e_0 = Z0_e_0 - delta_Z0_e_0; /* odd-mode */ er_eff = c_ms->er_eff_o_0; Q_5 = 1.794 + 1.14 * log(1.0 + 0.638 / (g + 0.517 * pow(g, 2.43))); Q_6 = 0.2305 + log(pow(g, 10.0) / (1.0 + pow(g / 5.8, 10.0))) / 281.3 + log(1.0 + 0.598 * pow(g, 1.154)) / 5.1; Q_7 = (10.0 + 190.0 * g * g) / (1.0 + 82.3 * g * g * g); Q_8 = exp(-6.5 - 0.95 * log(g) - pow(g / 0.15, 5.0)); Q_9 = log(Q_7) * (Q_8 + 1.0 / 16.5); Q_10 = (Q_2 * Q_4 - Q_5 * exp(log(u_t_o) * Q_6 * pow(u_t_o, -Q_9))) / Q_2; /* static odd-mode impedance */ Z0_o_0 = Z0_single * sqrt(er_eff_single / er_eff) / (1.0 - sqrt(er_eff_single) * Q_10 * Z0_single / 377.0); /* correction for cover */ delta_Z0_o_0 = delta_Z0_odd_cover(g, u_t_o, h2h) / sqrt(er_eff); c_ms->Z0_o_0 = Z0_o_0 - delta_Z0_o_0; //fprintf(stderr, "Z0e = %e\n", c_ms->Z0e); //fprintf(stderr, "Z0o = %e\n", c_ms->Z0o); } /** * mur_eff() - returns effective magnetic permeability * @c_ms: coupled microstrips structure pointer * * CURRENTLY NOT SUPPORTED ! * **/ static gfloat mur_eff(c_microstrip * c_ms) { gfloat mureff; mureff = c_ms->mur; /* FIXME: ... */ return mureff; } /** * er_eff_freq() - compute er_eff as a function of frequency * @c_ms: coupled microstrips structure pointer * * compute the effective relative dielectric permettivity as a function of frequency * * References: Manfred Kirschning and Rolf Jansen, "Accurate Wide-Range Design Equations for the Frequency-Dependent Characteristic of Parallel Coupled Microstrip Lines", IEEE Trans. MTT, vol. 32, no. 1, Jan. 1984 * */ static void er_eff_freq(c_microstrip * c_ms) { gfloat P_1, P_2, P_3, P_4, P_5, P_6, P_7; gfloat P_8, P_9, P_10, P_11, P_12, P_13, P_14, P_15; gfloat F_e, F_o; gfloat er, er_eff, s, h, w, f, u, g, f_n; er = c_ms->er; s = c_ms->s; h = c_ms->h; w = c_ms->w; f = c_ms->f; u = w / h; /* normalize line width */ g = s / h; /* normalize line spacing */ /* normalized frequency [GHz * mm] */ f_n = f * h / 1e06; er_eff = c_ms->er_eff_e_0; P_1 = 0.27488 + (0.6315 + 0.525 / pow(1.0 + 0.0157 * f_n, 20.0)) * u - 0.065683 * exp(-8.7513 * u); P_2 = 0.33622 * (1.0 - exp(-0.03442 * er)); P_3 = 0.0363 * exp(-4.6 * u) * (1.0 - exp(-pow(f_n / 38.7, 4.97))); P_4 = 1.0 + 2.751 * (1.0 - exp(-pow(er / 15.916, 8.0))); P_5 = 0.334 * exp(-3.3 * pow(er / 15.0, 3.0)) + 0.746; P_6 = P_5 * exp(-pow(f_n / 18.0, 0.368)); P_7 = 1.0 + 4.069 * P_6 * pow(g, 0.479) * exp(-1.347 * pow(g, 0.595) - 0.17 * pow(g, 2.5)); F_e = P_1 * P_2 * pow((P_3 * P_4 + 0.1844 * P_7) * f_n, 1.5763); /* even-mode effective dielectric constant */ c_ms->er_eff_e = er - (er - er_eff) / (1.0 + F_e); er_eff = c_ms->er_eff_o_0; P_8 = 0.7168 * (1.0 + 1.076 / (1.0 + 0.0576 * (er - 1.0))); P_9 = P_8 - 0.7193 * (1.0 - exp(-pow(f_n / 20.0, 1.424))) * atan(2.481 * pow(er / 8.0, 0.946)); P_10 = 0.242 * pow(er - 1.0, 0.55); P_11 = 0.6366 * (exp(-0.3401 * f_n) - 1.0) * atan(1.263 * pow(u / 3.0, 1.629)); P_12 = P_9 + (1.0 - P_9) / (1.0 + 1.183 * pow(u, 1.376)); P_13 = 1.695 * P_10 / (0.414 + 1.605 * P_10); P_14 = 0.8928 + 0.1072 * (1.0 - exp(-0.42 * pow(f_n / 20.0, 3.215))); P_15 = fabs(1.0 - 0.8928 * (1.0 + P_11) * P_12 * exp(-P_13 * pow(g, 1.092)) / P_14); F_o = P_1 * P_2 * pow((P_3 * P_4 + 0.1844) * f_n * P_15, 1.5763); /* odd-mode effective dielectric constant */ c_ms->er_eff_o = er - (er - er_eff) / (1.0 + F_o); } /** * conductor_losses() - compute microstrips conductor losses per unit length * @c_ms: coupled microstrips structure pointer * * compute microstrips conductor losses per unit length * * References: E. Hammerstad and O. Jensen, "Accurate Models for Microstrip Computer-Aided Design", IEEE MTT-S Symposium Digest, pp. 407-409, Jun. 1980 * */ static void conductor_losses(c_microstrip * c_ms) { gfloat f, w, e_r_eff_e_0, e_r_eff_o_0, Z0_h_e, Z0_h_o, delta, sigma, rough, tand; gfloat K, R_s, Q_c_e, Q_c_o, alpha_c_e, alpha_c_o; f = c_ms->f; w = c_ms->w; e_r_eff_e_0 = c_ms->er_eff_e_0; e_r_eff_o_0 = c_ms->er_eff_o_0; Z0_h_e = c_ms->Z0_e_0 * sqrt(e_r_eff_e_0); /* homogeneous stripline impedance */ Z0_h_o = c_ms->Z0_o_0 * sqrt(e_r_eff_o_0); /* homogeneous stripline impedance */ delta = c_ms->skindepth; sigma = c_ms->sigma; rough = c_ms->rough; tand = c_ms->tand; if (f > 0.0) { /* current distribution factor (same for the two modes) */ K = exp(-1.2 * pow((Z0_h_e + Z0_h_o) / (2.0 * 377.0), 0.7)); /* skin resistance */ R_s = 1.0 / (sigma * delta); /* correction for surface roughness */ R_s *= 1.0 + ((2.0 / M_PI) * atan(1.40 * pow((rough / delta), 2.0))); /* even-mode strip inductive quality factor */ Q_c_e = (M_PI * Z0_h_e * w * f) / (R_s * C0 * K); /* even-mode losses per unith length */ alpha_c_e = (20.0 * M_PI / log(10.0)) * f * sqrt(e_r_eff_e_0) / (C0 * Q_c_e); /* odd-mode strip inductive quality factor */ Q_c_o = (M_PI * Z0_h_o * w * f) / (R_s * C0 * K); /* odd-mode losses per unith length */ alpha_c_o = (20.0 * M_PI / log(10.0)) * f * sqrt(e_r_eff_o_0) / (C0 * Q_c_o); } else { alpha_c_e = alpha_c_o = 0.0; } c_ms->atten_cond_e = alpha_c_e * c_ms->l; c_ms->atten_cond_o = alpha_c_o * c_ms->l; } /** * dielectric_losses() - compute microstrips dielectric losses per unit length * @c_ms: coupled microstrips structure pointer * * compute microstrips dielectric losses per unit length * * References: E. J. Denlinger, "Losses of microstrip lines", , IEEE Trans. MTT, vol. 28, no. 6, pp. 513-522, Jun. 1980 * */ static void dielectric_losses(c_microstrip * c_ms) { gfloat f, e_r, e_r_eff_e_0, e_r_eff_o_0, tand; gfloat alpha_d_e, alpha_d_o; f = c_ms->f; e_r = c_ms->er; e_r_eff_e_0 = c_ms->er_eff_e_0; e_r_eff_o_0 = c_ms->er_eff_o_0; tand = c_ms->tand; alpha_d_e = (20.0 * M_PI / log(10.0)) * (f / C0) * (e_r / sqrt(e_r_eff_e_0)) * ((e_r_eff_e_0 - 1.0) / (e_r - 1.0)) * tand; alpha_d_o = (20.0 * M_PI / log(10.0)) * (f / C0) * (e_r / sqrt(e_r_eff_o_0)) * ((e_r_eff_o_0 - 1.0) / (e_r - 1.0)) * tand; c_ms->atten_dielectric_e = alpha_d_e * c_ms->l; c_ms->atten_dielectric_o = alpha_d_o * c_ms->l; } /** * c_microstrip_attenuation() - compute attenuation of coupled microstrips * @c_ms: coupled microstrips structure pointer * */ static void c_microstrip_attenuation(c_microstrip * c_ms) { c_ms->skindepth = skin_depth(c_ms); conductor_losses(c_ms); dielectric_losses(c_ms); } /** * line_angle() - calculate strips electrical lengths in radians * @c_ms: coupled microstrips structure pointer * */ static void line_angle(c_microstrip * c_ms) { gfloat f, l, e_r_eff_e, e_r_eff_o; gfloat v_e, v_o, lambda_g_e, lambda_g_o, ang_l_e, ang_l_o; f = c_ms->f; l = c_ms->l; e_r_eff_e = c_ms->er_eff_e; e_r_eff_o = c_ms->er_eff_o; /* even-mode velocity */ v_e = C0 / sqrt(e_r_eff_e); /* odd-mode velocity */ v_o = C0 / sqrt(e_r_eff_o); /* even-mode wavelength */ lambda_g_e = v_e / f; /* odd-mode wavelength */ lambda_g_o = v_o / f; /* electrical angles */ ang_l_e = 2.0 * M_PI * c_ms->l / lambda_g_e; /* in radians */ ang_l_o = 2.0 * M_PI * c_ms->l / lambda_g_o; /* in radians */ c_ms->ang_l_e = ang_l_e; c_ms->ang_l_o = ang_l_o; } void syn_err_fun(double *f1, double *f2, double s_h, double w_h, double e_r, double w_h_se, double w_h_so) { double g, h; g = cosh(0.5 * M_PI * s_h); h = cosh(M_PI * w_h + 0.5 * M_PI * s_h); *f1 = (2.0 / M_PI) * acosh((2.0 * h - g + 1.0) / (g + 1.0)); *f2 = (2.0 / M_PI) * acosh((2.0 * h - g - 1.0) / (g - 1.0)); if (e_r <= 6.0) { *f2 += (4.0 / (M_PI * (1.0 + e_r / 2.0))) * acosh(1.0 + 2.0 * w_h / s_h); } else { *f2 += (1.0 / M_PI) * acosh(1.0 + 2.0 * w_h / s_h); } *f1 -= w_h_se; *f2 -= w_h_so; //g_print("syn_err_fun: f1 = %e\tf2 = %e\n", *f1, *f2); } /** * synth_width() - calculate widths given Z0 and e_r * * References: Akhtarzad S. et al., "The design of coupled microstrip lines", IEEE Trans. MTT-23, June 1975 * * Hinton, J.H., "On design of coupled microstrip lines", IEEE Trans. MTT-28, March 1980 */ static void synth_width(c_microstrip * c_ms) { gfloat Z0, Z0e, Z0o, e_r, h; gfloat w_h_se, w_h_so, w_h, a, ce, co, s_h; gdouble f1, f2, ft1, ft2, j11, j12, j21, j22, d_s_h, d_w_h, err; gdouble eps = 1e-04; e_r = c_ms->er; Z0e = c_ms->Z0e; Z0o = c_ms->Z0o; h = c_ms->h; Z0 = Z0e / 2.0; /* Wheeler formula for single microstrip synthesis */ a = exp(Z0 * sqrt(e_r + 1.0) / 42.4) - 1.0; w_h_se = 8.0 * sqrt(a * ((7.0 + 4.0 / e_r) / 11.0) + ((1.0 + 1.0 / e_r) / 0.81)) / a; Z0 = Z0o / 2.0; /* Wheeler formula for single microstrip synthesis */ a = exp(Z0 * sqrt(e_r + 1.0) / 42.4) - 1.0; w_h_so = 8.0 * sqrt(a * ((7.0 + 4.0 / e_r) / 11.0) + ((1.0 + 1.0 / e_r) / 0.81)) / a; ce = cosh(0.5 * M_PI * w_h_se); co = cosh(0.5 * M_PI * w_h_so); /* first guess at s/h */ s_h = (2.0 / M_PI) * acosh((ce + co - 2.0) / (co - ce)); /* first guess at w/h */ w_h = acosh((ce * co - 1.0) / (co - ce)) / M_PI - s_h / 2.0; c_ms->s = s_h * h; c_ms->w = w_h * h; syn_err_fun(&f1, &f2, s_h, w_h, e_r, w_h_se, w_h_so); /* rather crude Newton-Rhapson; we need this beacuse the estimate of */ /* w_h is often quite far from the true value (see Akhtarzad S. et al.) */ do { /* compute Jacobian */ syn_err_fun(&ft1, &ft2, s_h + eps, w_h, e_r, w_h_se, w_h_so); j11 = (ft1 - f1) / eps; j21 = (ft2 - f2) / eps; syn_err_fun(&ft1, &ft2, s_h, w_h + eps, e_r, w_h_se, w_h_so); j12 = (ft1 - f1) / eps; j22 = (ft2 - f2) / eps; /* compute next step */ d_s_h = (-f1 * j22 + f2 * j12) / (j11 * j22 - j21 * j12); d_w_h = (-f2 * j11 + f1 * j21) / (j11 * j22 - j21 * j12); //g_print("j11 = %e\tj12 = %e\tj21 = %e\tj22 = %e\n", j11, j12, j21, j22); //g_print("det = %e\n", j11*j22 - j21*j22); //g_print("d_s_h = %e\td_w_h = %e\n", d_s_h, d_w_h); s_h += d_s_h; w_h += d_w_h; /* chech the error */ syn_err_fun(&f1, &f2, s_h, w_h, e_r, w_h_se, w_h_so); err = sqrt(f1 * f1 + f2 * f2); /* converged ? */ } while (err > 1e-04); c_ms->s = s_h * h; c_ms->w = w_h * h; } /** * Z0_dispersion() - calculate frequency dependency of characteristic impedances * @c_ms: coupled microstrips structure pointer * */ static void Z0_dispersion(c_microstrip * c_ms) { gfloat Q_0; gfloat Q_11, Q_12, Q_13, Q_14, Q_15, Q_16, Q_17, Q_18, Q_19, Q_20, Q_21; gfloat Q_22, Q_23, Q_24, Q_25, Q_26, Q_27, Q_28, Q_29; gfloat r_e, q_e, p_e, d_e, C_e; gfloat e_r_eff_o_f, e_r_eff_o_0; gfloat e_r_eff_single_f, e_r_eff_single_0, Z0_single_f; gfloat f_n, g, u, f, w, s, h, e_r; gfloat R_1, R_2, R_7, R_10, R_11, R_12, R_15, R_16, tmpf; f = c_ms->f; w = c_ms->w; s = c_ms->s; h = c_ms->h; e_r = c_ms->er; u = w / h; /* normalize line width */ g = s / h; /* normalize line spacing */ /* normalized frequency [GHz * mm] */ f_n = f * h / 1e06; e_r_eff_single_f = aux_ms->er_eff; e_r_eff_single_0 = aux_ms->er_eff_0; Z0_single_f = aux_ms->Z0; e_r_eff_o_f = c_ms->er_eff_o; e_r_eff_o_0 = c_ms->er_eff_o_0; Q_11 = 0.893 * (1.0 - 0.3 / (1.0 + 0.7 * (e_r - 1.0))); Q_12 = 2.121 * (pow(f_n / 20.0, 4.91) / (1.0 + Q_11 * pow(f_n / 20.0, 4.91))) * exp(-2.87 * g) * pow(g, 0.902); Q_13 = 1.0 + 0.038 * pow(e_r / 8.0, 5.1); Q_14 = 1.0 + 1.203 * pow(e_r / 15.0, 4.0) / (1.0 + pow(e_r / 15.0, 4.0)); Q_15 = 1.887 * exp(-1.5 * pow(g, 0.84)) * pow(g, Q_14) / (1.0 + 0.41 * pow(f_n / 15.0, 3.0) * pow(u, 2.0 / Q_13) / (0.125 + pow(u, 1.626 / Q_13))); Q_16 = (1.0 + 9.0 / (1.0 + 0.403 * pow(e_r - 1.0, 2))) * Q_15; Q_17 = 0.394 * (1.0 - exp(-1.47 * pow(u / 7.0, 0.672))) * (1.0 - exp(-4.25 * pow(f_n / 20.0, 1.87))); Q_18 = 0.61 * (1.0 - exp(-2.13 * pow(u / 8.0, 1.593))) / (1.0 + 6.544 * pow(g, 4.17)); Q_19 = 0.21 * g * g * g * g / ((1.0 + 0.18 * pow(g, 4.19)) * (1.0 + 0.1 * u * u) * (1.0 + pow(f_n / 24.0, 3.0))); Q_20 = (0.09 + 1.0 / (1.0 + 0.1 * pow(e_r - 1, 2.7))) * Q_19; Q_21 = fabs(1.0 - 42.54 * pow(g, 0.133) * exp(-0.812 * g) * pow(u, 2.5) / (1.0 + 0.033 * pow(u, 2.5))); r_e = pow(f_n / 28.843, 12); q_e = 0.016 + pow(0.0514 * e_r * Q_21, 4.524); p_e = 4.766 * exp(-3.228 * pow(u, 0.641)); d_e = 5.086 * q_e * (r_e / (0.3838 + 0.386 * q_e)) * (exp(-22.2 * pow(u, 1.92)) / (1.0 + 1.2992 * r_e)) * (pow(e_r - 1.0, 6.0) / (1.0 + 10 * pow(e_r - 1.0, 6.0))); C_e = 1.0 + 1.275 * (1.0 - exp(-0.004625 * p_e * pow(e_r, 1.674) * pow(f_n / 18.365, 2.745))) - Q_12 + Q_16 - Q_17 + Q_18 + Q_20; R_1 = 0.03891 * pow(e_r, 1.4); R_2 = 0.267 * pow(u, 7.0); R_7 = 1.206 - 0.3144 * exp(-R_1) * (1.0 - exp(-R_2)); R_10 = 0.00044 * pow(e_r, 2.136) + 0.0184; tmpf = pow(f_n / 19.47, 6.0); R_11 = tmpf / (1.0 + 0.0962 * tmpf); R_12 = 1.0 / (1.0 + 0.00245 * u * u); R_15 = 0.707 * R_10 * pow(f_n / 12.3, 1.097); R_16 = 1.0 + 0.0503 * e_r * e_r * R_11 * (1.0 - exp(-pow(u / 15.0, 6.0))); Q_0 = R_7 * (1.0 - 1.1241 * (R_12 / R_16) * exp(-0.026 * pow(f_n, 1.15656) - R_15)); /* even-mode frequency-dependent characteristic impedances */ c_ms->Z0e = c_ms->Z0_e_0 * pow(0.9408 * pow(e_r_eff_single_f, C_e) - 0.9603, Q_0) / pow((0.9408 - d_e) * pow(e_r_eff_single_0, C_e) - 0.9603, Q_0); Q_29 = 15.16 / (1.0 + 0.196 * pow(e_r - 1.0, 2.0)); tmpf = pow(e_r - 1.0, 3.0); Q_28 = 0.149 * tmpf / (94.5 + 0.038 * tmpf); tmpf = pow(e_r - 1.0, 1.5); Q_27 = 0.4 * pow(g, 0.84) * (1.0 + 2.5 * tmpf / (5.0 + tmpf)); tmpf = pow((e_r - 1.0) / 13.0, 12.0); Q_26 = 30.0 - 22.2 * (tmpf / (1.0 + 3.0 * tmpf)) - Q_29; tmpf = (e_r - 1.0) * (e_r - 1.0); Q_25 = (0.3 * f_n * f_n / (10.0 + f_n * f_n)) * (1.0 + 2.333 * tmpf / (5.0 + tmpf)); Q_24 = 2.506 * Q_28 * pow(u, 0.894) * pow((1.0 + 1.3 * u) * f_n / 99.25, 4.29) / (3.575 + pow(u, 0.894)); Q_23 = 1.0 + 0.005 * f_n * Q_27 / ((1.0 + 0.812 * pow(f_n / 15.0, 1.9)) * (1.0 + 0.025 * u * u)); Q_22 = 0.925 * pow(f_n / Q_26, 1.536) / (1.0 + 0.3 * pow(f_n / 30.0, 1.536)); /* odd-mode frequency-dependent characteristic impedances */ c_ms->Z0o = Z0_single_f + (c_ms->Z0_o_0 * pow(e_r_eff_o_f / e_r_eff_o_0, Q_22) - Z0_single_f * Q_23) / (1.0 + Q_24 + pow(0.46 * g, 2.2) * Q_25); } /** * calc_c_microstrip() - compute characteristics of a coupled microstrip lines structure * @c_ms: coupled microstrips structure pointer * * compute the characteristics of the coupled microstrips structure pointed by @c_ms. * References: Manfred Kirschning and Rolf Jansen, "Accurate Wide-Range Design Equations for the Frequency-Dependent Characteristic of Parallel Coupled Microstrip Lines", IEEE Trans. MTT, vol. 32, no. 1, Jan. 1984 */ void calc_c_microstrip(c_microstrip * c_ms) { /* compute thickness corrections */ delta_u_thickness(c_ms); /* get effective dielectric constants */ er_eff_static(c_ms); /* impedances for even- and odd-mode */ Z0_even_odd(c_ms); /* calculate freq dependence of er_eff_e, er_eff_o */ er_eff_freq(c_ms); /* FIXME: (not used) Get effective magnetic permeability */ c_ms->mur_eff = mur_eff(c_ms); /* calculate frequency dependence of Z0e, Z0o */ Z0_dispersion(c_ms); /* calculate losses */ c_microstrip_attenuation(c_ms); /* calculate electrical lengths */ line_angle(c_ms); } /* * get_microstrip_sub * get and assign microstrip substrate parameters * into microstrip structure */ void get_c_microstrip_sub(trans_win * mwin, c_microstrip * c_ms) { short curr_unit; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[0])), "%g", &c_ms->er) != 1) error_mes("Error: c_ms->er"); if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[1])), "%g", &c_ms->mur) != 1) error_mes("Error: c_ms->mur"); if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[2])), "%g", &c_ms->h) != 1) error_mes("Error: c_ms->h"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[2])->entry))); c_ms->h = c_ms->h * conv_length[curr_unit][LENGTH_M]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[3])), "%g", &c_ms->ht) != 1) error_mes("Error: c_ms->ht"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[3])->entry))); c_ms->ht = c_ms->ht * conv_length[curr_unit][LENGTH_M]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[4])), "%g", &c_ms->t) != 1) error_mes("Error: c_ms->t"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[4])->entry))); c_ms->t = c_ms->t * conv_length[curr_unit][LENGTH_M]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[5])), "%g", &c_ms->sigma) != 1) error_mes("Error: c_ms->sigma"); if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[6])), "%g", &c_ms->tand) != 1) error_mes("Error: c_ms->tand"); if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->subparam_text[7])), "%g", &c_ms->rough) != 1) error_mes("Error: c_ms->rough"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[7])->entry))); c_ms->rough = c_ms->rough * conv_length[curr_unit][LENGTH_M]; } /* * get_c_microstrip_comp * get and assign microstrip component parameters * into microstrip structure */ void get_c_microstrip_comp(trans_win * mwin, c_microstrip * c_ms) { short curr_unit; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->component_param_text[0])), "%g", &c_ms->f) != 1) error_mes("Error: c_ms->f"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->component_param_combo[0])->entry))); c_ms->f = c_ms->f * conv_freq[curr_unit][FREQ_HZ]; } /* * get_c_microstrip_elec * get and assign microstrip electrical parameters * into microstrip structure */ void get_c_microstrip_elec(trans_win * mwin, c_microstrip * c_ms) { short curr_unit; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->electrical_param_text[0])), "%g", &c_ms->Z0e) != 1) error_mes("Error: c_ms->Z0e"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->electrical_param_combo[0])->entry))); c_ms->Z0e = c_ms->Z0e * conv_res[curr_unit][RES_OHM]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->electrical_param_text[1])), "%g", &c_ms->Z0o) != 1) error_mes("Error: c_ms->Z0o"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->electrical_param_combo[1])->entry))); c_ms->Z0o = c_ms->Z0o * conv_res[curr_unit][RES_OHM]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->electrical_param_text[2])), "%g", &c_ms->ang_l_e) != 1) error_mes("Error: c_ms->ang_l_e"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->electrical_param_combo[2])->entry))); c_ms->ang_l_e = c_ms->ang_l_e * conv_ang[curr_unit][ANG_RAD]; } /* * get_c_microstrip_phys * get and assign microstrip physical parameters * into microstrip structure */ void get_c_microstrip_phys(trans_win * mwin, c_microstrip * c_ms) { short curr_unit; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->physical_param_text[0])), "%g", &c_ms->w) != 1) error_mes("Error: c_ms->w"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->physical_param_combo[0])->entry))); c_ms->w = c_ms->w * conv_length[curr_unit][LENGTH_M]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->physical_param_text[1])), "%g", &c_ms->s) != 1) error_mes("Error: c_ms->s"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->physical_param_combo[1])->entry))); c_ms->s = c_ms->s * conv_length[curr_unit][LENGTH_M]; if (sscanf(gtk_entry_get_text(GTK_ENTRY(mwin->physical_param_text[2])), "%g", &c_ms->l) != 1) error_mes("Error: c_ms->l"); curr_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->physical_param_combo[2])->entry))); c_ms->l = c_ms->l * conv_length[curr_unit][LENGTH_M]; } static void show_results(trans_win * mwin, c_microstrip * c_ms) { gchar *text, *results; short required_unit; /*allocate memory for text */ if ((text = (char *) malloc(10 * sizeof(char))) == NULL) { perror("text error: malloc"); exit(-1); } required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->electrical_param_combo[0])->entry))); sprintf(text, "%g", (float) (c_ms->Z0e * conv_res[RES_OHM][required_unit])); gtk_entry_set_text(GTK_ENTRY(mwin->electrical_param_text[0]), text); required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->electrical_param_combo[1])->entry))); sprintf(text, "%g", (float) (c_ms->Z0o * conv_res[RES_OHM][required_unit])); gtk_entry_set_text(GTK_ENTRY(mwin->electrical_param_text[1]), text); required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->electrical_param_combo[1])->entry))); sprintf(text, "%g", (float) (c_ms->ang_l_e * conv_ang[ANG_RAD][required_unit])); gtk_entry_set_text(GTK_ENTRY(mwin->electrical_param_text[2]), text); free(text); if ((text = (char *) malloc(500 * sizeof(char))) == NULL) { perror("results text error: malloc"); exit(-1); } if ((results = (char *) malloc(500 * sizeof(char))) == NULL) { perror("results text error: malloc"); exit(-1); } required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->physical_param_combo[1])->entry))); sprintf(results, "er_eff_e = %.4g\n", c_ms->er_eff_e); sprintf(text, "er_eff_o = %.4g\n", c_ms->er_eff_o); strcat(results, text); sprintf(text, "Conductor Losses Even = %.4g dB\n", c_ms->atten_cond_e); strcat(results, text); sprintf(text, "Conductor Losses Odd = %.4g dB\n", c_ms->atten_cond_o); strcat(results, text); sprintf(text, "Dielectric Losses Even = %.4g dB\n", c_ms->atten_dielectric_e); strcat(results, text); sprintf(text, "Dielectric Losses Odd = %.4g dB\n", c_ms->atten_dielectric_o); strcat(results, text); required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[4])->entry))); sprintf(text, "Skin Depth = %.4g %s\n", (c_ms->skindepth * conv_length[LENGTH_M][required_unit]), length_unit_text(getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->subparam_combo[4])->entry))))); strcat(results, text); gtk_label_set(GTK_LABEL(mwin->results_text), results); free(results); free(text); } /* * analysis function */ void analyze_c_microstrip(GtkWidget * widget, trans_win * mwin) { /* trans_win *mwin = (trans_win *) data; */ c_microstrip *c_ms; /*allocate memory for pointer mw */ if ((c_ms = g_malloc(sizeof(c_microstrip))) != NULL) { /* Get and assign substrate parameters */ get_c_microstrip_sub(mwin, c_ms); /* Get and assign component parameters */ get_c_microstrip_comp(mwin, c_ms); /* Get and assign physical parameters */ get_c_microstrip_phys(mwin, c_ms); /* compute coupled microstrip parameters */ calc_c_microstrip(c_ms); /* print results in the subwindow */ show_results(mwin, c_ms); if (statusexists) { if (statusint != CONSISTENT) { gtk_label_set_text(GTK_LABEL(mwin->status), "Values are consistent"); } } statusint = CONSISTENT; } else { perror("malloc c_ms"); exit(-1); } } void syn_fun(double *f1, double *f2, double s_h, double w_h, double Z0_e, double Z0_o, c_microstrip * c_ms) { gfloat h; h = c_ms->h; c_ms->s = s_h * h; c_ms->w = w_h * h; /* compute coupled microstrip parameters */ calc_c_microstrip(c_ms); *f1 = c_ms->Z0e - Z0_e; *f2 = c_ms->Z0o - Z0_o; //g_print("syn_fun: f1 = %e\tf2 = %e\n", *f1, *f2); } /* * synthesis function */ void synthesize_c_microstrip(GtkWidget * widget, trans_win * mwin) { gchar *text; short required_unit; c_microstrip *c_ms = NULL; gfloat Z0_e, Z0_o; gdouble f1, f2, ft1, ft2, j11, j12, j21, j22, d_s_h, d_w_h, err; gdouble eps = 1e-04; gfloat h, w_h, s_h; /* allocate memory for pointer c_ms */ if ((c_ms = g_malloc(sizeof(c_microstrip))) != NULL) { /* Get and assign substrate parameters */ get_c_microstrip_sub(mwin, c_ms); /* Get and assign component parameters */ get_c_microstrip_comp(mwin, c_ms); /* Get and assign electrical parameters */ get_c_microstrip_elec(mwin, c_ms); /* Get and assign physical parameters */ /* at present it is required only for getting strips length */ get_c_microstrip_phys(mwin, c_ms); /* required value of Z0_e and Z0_o */ Z0_e = c_ms->Z0e; Z0_o = c_ms->Z0o; /* calculate width and use for initial value in Newton's method */ synth_width(c_ms); h = c_ms->h; w_h = c_ms->w / h; s_h = c_ms->s / h; /* rather crude Newton-Rhapson */ do { /* compute Jacobian */ syn_fun(&ft1, &ft2, s_h + eps, w_h, Z0_e, Z0_o, c_ms); j11 = (ft1 - f1) / eps; j21 = (ft2 - f2) / eps; syn_fun(&ft1, &ft2, s_h, w_h + eps, Z0_e, Z0_o, c_ms); j12 = (ft1 - f1) / eps; j22 = (ft2 - f2) / eps; /* compute next step; increments of s_h and w_h */ d_s_h = (-f1 * j22 + f2 * j12) / (j11 * j22 - j21 * j12); d_w_h = (-f2 * j11 + f1 * j21) / (j11 * j22 - j21 * j12); //g_print("j11 = %e\tj12 = %e\tj21 = %e\tj22 = %e\n", j11, j12, j21, j22); //g_print("det = %e\n", j11*j22 - j21*j22); //g_print("d_s_h = %e\td_w_h = %e\n", d_s_h, d_w_h); s_h += d_s_h; w_h += d_w_h; /* compute the error with the new values of s_h and w_h */ syn_fun(&f1, &f2, s_h, w_h, Z0_e, Z0_o, c_ms); err = sqrt(f1 * f1 + f2 * f2); /* converged ? */ } while (err > 1e-04); /* denormalize computed width and spacing */ c_ms->s = s_h * h; c_ms->w = w_h * h; /*allocate memory for text */ if ((text = (char *) malloc(10 * sizeof(char))) == NULL) { perror("text error: malloc"); exit(-1); } required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->physical_param_combo[0])->entry))); sprintf(text, "%g", (float) (c_ms->w * conv_length[LENGTH_M][required_unit])); gtk_entry_set_text(GTK_ENTRY(mwin->physical_param_text[0]), text); required_unit = getunit(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(mwin->physical_param_combo[1])->entry))); sprintf(text, "%g", (float) (c_ms->s * conv_length[LENGTH_M][required_unit])); gtk_entry_set_text(GTK_ENTRY(mwin->physical_param_text[1]), text); calc_c_microstrip(c_ms); /* print results in the subwindow */ show_results(mwin, c_ms); if (statusexists) { if (statusint != CONSISTENT) { gtk_label_set_text(GTK_LABEL(mwin->status), "Values are consistent"); } } statusint = CONSISTENT; } else { perror("malloc c_ms"); exit(-1); } } /* * the window aspect */ /*void c_microstrip_win (GtkWidget *parent) */ void c_microstrip_win(GtkWidget * parent) /*c_microstrip_win (trans_gui *tg) */ { short row; /* if there is a window that already exists kill it first */ if (main_body_window != NULL) { gtk_widget_destroy(main_body_window); g_free (twin); twin = g_malloc(sizeof(*twin)); } setup_transgui(C_MICROSTRIP, parent, twin); for (row = 0; row <= 1; row++) { gtk_widget_set_sensitive(GTK_WIDGET(twin->physical_param_fix[row]), FALSE); } gtk_signal_connect(GTK_OBJECT(twin->Analbutton), "clicked", GTK_SIGNAL_FUNC(analyze_c_microstrip), twin); gtk_signal_connect(GTK_OBJECT(twin->Synbutton), "clicked", GTK_SIGNAL_FUNC(synthesize_c_microstrip), twin); /* GTK_SIGNAL_FUNC (synthesize_c_microstrip), twin); */ if (statusint == INCONSISTENT) { analyze_c_microstrip(parent, (trans_win *) twin); } for (row = 0; row <= 1; row++) { gtk_signal_connect(GTK_OBJECT(twin->electrical_param_text[row]), "changed", GTK_SIGNAL_FUNC(setstatus), twin); } /* return twin; */ /* free(twin); */ } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/rectwaveguide.c������������������������������������������������������������������0000644�0001750�0001750�00000044242�07520053030�012662� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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 <stdio.h> #include <gtk/gtk.h> #include <string.h> #include <math.h> #include "rectwaveguide.h" /*char *drawing_filename;*/ /*char *image_dir;*/ gboolean widthfixed, heightfixed; /* * get_rectwaveguide_sub * get and assign rectwaveguide substrate parameters * into rectwaveguide structure */ /* * returns k */ gfloat kval (rectwaveguide *rw) { gfloat mur, er, f; gfloat kval; mur = rw->mur; er = rw->er; f = rw->f; kval = 2. * M_PI * f * sqrt(mur * er)/C0; return kval; } /* * given mode numbers m and n * returns cutoff kc value */ gfloat kc (rectwaveguide *rw, int m, int n) { gfloat a, b; gfloat kcval; a = rw->a; b = rw->b; kcval = sqrt(pow((m*M_PI/a),2.0) + pow((n*M_PI/b),2.0)); return kcval; } /* * given mode numbers m and n * returns cutoff fc value */ gfloat fc (rectwaveguide *rw, int m, int n) { gfloat mur, er; gfloat fcval; mur = rw->mur; er = rw->er; fcval = (kc(rw, m, n) * C0)/ (2 * M_PI * sqrt(mur * er)); return fcval; } /* * alphac - returns attenuation due to conductor losses for all propagating * modes in the waveguide */ gfloat alphac (rectwaveguide *rw) { gfloat a, b, sigma, mur, f; gfloat Rs, k, f_c; gfloat ac; short m, n, mmax, nmax; a = rw->a; b = rw->b; mur = rw->mur; sigma = rw->sigma; f = rw->f; Rs = sqrt((M_PI * f * mur* MU0)/sigma); k = kval(rw); ac = 0.0; mmax = (int) floor (f/fc(rw,1,0)); nmax = mmax; /* below from Ramo, Whinnery & Van Duzer */ /* TE(m,n) modes */ for (n = 0; n<= nmax; n++){ for (m = 1; m <= mmax; m++){ f_c = fc(rw, m, n); if (f > f_c) { switch (n) { case 0: ac += (Rs/(b * 120.0 * M_PI * sqrt(1.0 - pow((f_c/f),2.0)))) * (1.0 + ((2 * b/a)*pow((f_c/f),2.0))); break; default: ac += ((2. * Rs)/(b * 120.0 * M_PI * sqrt(1.0 - pow((f_c/f),2.0)))) * (((1. + (b/a))*pow((f_c/f),2.0)) + ((1. - pow((f_c/f),2.0)) * (((b/a)*(((b/a)*pow(m,2.)) + pow(n,2.)))/ (pow((b*m/a),2.0) + pow(n,2.0))))); break; } } } } /* TM(m,n) modes */ for (n = 1; n<= nmax; n++) { for (m = 1; m<= mmax; m++) { f_c = fc(rw, m, n); if (f > f_c) { ac += ((2. * Rs)/(b * 120.0 * M_PI * sqrt(1.0 - pow((f_c/f),2.0)))) * (((pow(m,2.0)*pow((b/a),3.0)) + pow(n,2.))/ ((pow((m*b/a),2.)) + pow(n,2.0))); } } } ac = ac * 20.0 * log10(exp(1.)); /* convert from Np/m to db/m */ return ac; } /* * alphac_cutoff - returns attenuation for a cutoff wg */ gfloat alphac_cutoff (rectwaveguide *rw) { gfloat acc; acc = sqrt(pow(kc(rw,1,0),2.0) - pow(kval(rw),2.0)); acc = 20 * log10(exp(1.0)) * acc; return acc; } /* * returns attenuation due to dielectric losses */ gfloat alphad(rectwaveguide *rw) { gfloat tand; gfloat k, beta; gfloat ad; tand = rw->tand; k = kval(rw); beta = sqrt(pow(k,2.) - pow(kc(rw,1,0),2.0)); ad = (pow(k,2.0) * tand)/(2.0 * beta); ad = ad * 20.0 * log10(exp(1.)); /* convert from Np/m to db/m */ return ad; } void get_rectwaveguide_sub (trans_win *rwin, rectwaveguide *rw) { if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->subparam_text[0])), "%g", &rw->er) != 1) error_mes("Error: rw->er"); if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->subparam_text[1])), "%g", &rw->mur) != 1) error_mes("Error: rw->mur"); if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->subparam_text[2])), "%g", &rw->sigma) != 1) error_mes("Error: rw->sigma"); if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->subparam_text[3])), "%g", &rw->tand) != 1) error_mes("Error: rw->tand"); if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->subparam_text[4])), "%g", &rw->tanm) != 1) error_mes("Error: rw->tanm"); } /* * get_rectwaveguide_comp * get and assign rectwaveguide component parameters * into rectwaveguide structure */ void get_rectwaveguide_comp (trans_win *rwin, rectwaveguide *rw) { short curr_unit; if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->component_param_text[0])), "%g", &rw->f) != 1) error_mes("Error: rw->f"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->component_param_combo[0])->entry))); rw->f = rw->f * conv_freq[curr_unit][FREQ_HZ]; } /* * get_rectwaveguide_elec * get and assign rectwaveguide electrical parameters * into rectwaveguide structure */ void get_rectwaveguide_elec (trans_win *rwin, rectwaveguide *rw) { short curr_unit; if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->electrical_param_text[0])), "%g", &rw->Z0) != 1) error_mes("Error: rw->Z0"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->electrical_param_combo[0])->entry))); rw->Z0 = rw->Z0 * conv_res[curr_unit][RES_OHM]; if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->electrical_param_text[1])), "%g", &rw->ang_l) != 1) error_mes("Error: rw->ang_l"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->electrical_param_combo[1])->entry))); rw->ang_l = rw->ang_l * conv_ang[curr_unit][ANG_RAD]; } /* * get_rectwaveguide_phys * get and assign rectwaveguide physical parameters * into rectwaveguide structure */ void get_rectwaveguide_phys (trans_win *rwin, rectwaveguide *rw) { short curr_unit; if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->physical_param_text[0])), "%g", &rw->a) != 1) error_mes("Error: rw->a"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->physical_param_combo[0])->entry))); rw->a = rw->a * conv_length[curr_unit][LENGTH_M]; if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->physical_param_text[1])), "%g", &rw->b) != 1) error_mes("Error: rw->b"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->physical_param_combo[1])->entry))); rw->b = rw->b * conv_length[curr_unit][LENGTH_M]; if (sscanf (gtk_entry_get_text(GTK_ENTRY (rwin->physical_param_text[2])), "%g", &rw->l) != 1) error_mes("Error: rw->l"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->physical_param_combo[2])->entry))); rw->l = rw->l * conv_length[curr_unit][LENGTH_M]; } /* * analyze_rectwaveguide - analysis function */ void analyze_rectwaveguide (GtkWidget *parent, trans_win *rwin) { gchar *text, *results, *temp; rectwaveguide *rw; short required_unit; gfloat lambda_g; gfloat k; gfloat beta; short m, n, mmax, nmax; gfloat f; gfloat a,b; /*allocate memory for text */ if ((text = (char *) malloc(10*sizeof(char))) == NULL){ perror("text error: malloc"); exit(-1); } /*allocate memory for pointer rw */ if ((rw = g_malloc(sizeof *rw)) != NULL) { /* Get and assign substrate parameters */ get_rectwaveguide_sub(rwin, rw); /* Get and assign component parameters */ get_rectwaveguide_comp(rwin, rw); /* Get and assign physical parameters */ get_rectwaveguide_phys(rwin, rw); f = rw->f; a = rw->a; b = rw->b; k = kval(rw); if (kc(rw,1,0) <= k) { /*propagating modes */ beta = sqrt(pow(k,2.) - pow(kc(rw,1,0),2.0)); lambda_g = (2. * M_PI)/beta; /* rw->Z0 = (k * 120. * M_PI)/beta; */ rw->Z0 = 2.0 * 120.0 * M_PI * (b/a) * 1/ sqrt(1.0 - pow((fc(rw,1,0)/f),2.0)); /* calculate electrical angle */ lambda_g = (2. * M_PI)/beta; rw->ang_l = (2.0 * M_PI * rw->l)/lambda_g; /* in radians */ rw->atten_cond = alphac (rw) * rw->l; rw->atten_dielectric = alphad (rw) * rw->l; rw->er_eff = (1.0 - pow((fc(rw,1,0)/rw->f),2.0)); } else { /*evanascent modes */ rw->Z0 = 0; rw->ang_l = 0; rw->er_eff = 0; rw->atten_dielectric = 0.0; rw->atten_cond = alphac_cutoff (rw) * rw->l; } required_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->electrical_param_combo[0])->entry))); sprintf(text,"%g", (float) (rw->Z0 * conv_res[RES_OHM][required_unit])); gtk_entry_set_text (GTK_ENTRY (rwin->electrical_param_text[0]), text); required_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->electrical_param_combo[1])->entry))); sprintf(text,"%g", (float) (rw->ang_l * conv_ang[ANG_RAD][required_unit])); gtk_entry_set_text (GTK_ENTRY (rwin->electrical_param_text[1]), text); free(text); if ((text = (char *) malloc(1000*sizeof(char))) == NULL){ perror("results text error: malloc"); exit(-1); } if ((results = (char *) malloc(1000*sizeof(char))) == NULL){ perror("results text error: malloc"); exit(-1); } if ((temp = (char *) malloc(1000*sizeof(char))) == NULL){ perror("results text error: malloc"); exit(-1); } sprintf(results, "\nEffective dielectic constant, er_eff = %.4g\n", rw->er_eff); required_unit = getunit(gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (rwin->physical_param_combo[2])->entry))); sprintf(text,"Conductor Losses = %.4g dB\n", rw->atten_cond); strcat(results,text); sprintf(text, "Dielectric Losses = %.4g dB\n", rw->atten_dielectric); strcat(results, text); if (f >= (2.*fc(rw,1,0))) { /* multiple modes possible in waveguide */ strcpy(text, "\nWarning: The following additional \nTE modes can propagate:\n"); strcat(results, text); /* mmax = floor(f/fc(rw,1,0));*/ mmax = 5; nmax = mmax; strcpy(text, " "); for (m = 2; m<= mmax; m++) { for (n=0; n<= nmax; n++) { if (f >= (fc(rw,m,n))){ sprintf(temp,"TE(%u,%u) ",m, n); strcat(text,temp); } } } strcat(results,text); strcat(results,"\n"); } if (f >= fc(rw,1,1)){ /*TM(1,1) mode possible*/ strcpy(text, "\nWarning: The following additional \nTM modes can propagate:\n"); strcat(results, text); /* mmax = floor(f/fc(rw,1,1));*/ mmax = 5; nmax = mmax; strcpy(text, " "); for (m = 1; m<= mmax; m++) { for (n=1; n<= nmax; n++) { if (f >= (fc(rw,m,n))){ sprintf(temp,"TM(%u,%u) ",m, n); strcat(text,temp); } } } strcat(results,text); strcat(results,"\n"); } gtk_label_set (GTK_LABEL (rwin->results_text), results); free(results); free(text); free(temp); if (statusexists){ if (statusint != CONSISTENT) { gtk_label_set_text (GTK_LABEL (rwin->status), "Values are consistent"); } } statusint = CONSISTENT; } else { perror("malloc rw"); exit(-1); } } /* * synthesize_rectwaveguide - synthesis function */ void synthesize_rectwaveguide (GtkWidget *parent, trans_win *rwin) { gchar *text, *results, *temp; rectwaveguide *rw; short required_unit; gfloat lambda_g; gfloat a, b, f; gfloat Z0; gfloat beta, k; short m, n, mmax, nmax; /*allocate memory for text */ if ((text = (char *) malloc(10*sizeof(char))) == NULL){ perror("text error: malloc"); exit(-1); } /*allocate memory for pointer rw */ if ((rw = g_malloc(sizeof *rw)) != NULL) { /* Get and assign substrate parameters */ get_rectwaveguide_sub(rwin, rw); /* Get and assign component parameters */ get_rectwaveguide_comp(rwin, rw); /* Get and assign electrical parameters */ get_rectwaveguide_elec(rwin, rw); /* Get and assign physical parameters */ get_rectwaveguide_phys(rwin, rw); f = rw->f; a = rw->a; b = rw->b; Z0 = rw->Z0; if (widthfixed) { /* solve for b */ rw->b = Z0 * a * sqrt(1.0 - pow((fc(rw,1,0)/f),2.0))/ (2. * 120. * M_PI); required_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->physical_param_combo[1])->entry))); sprintf(text,"%g", (float) (rw->b * conv_length[LENGTH_M][required_unit])); gtk_entry_set_text (GTK_ENTRY (rwin->physical_param_text[1]), text); } else { /* solve for a */ rw->a = sqrt(pow((2.0 * 120. * M_PI * b/Z0), 2.0) + pow((C0/(2.0 * f)),2.0)); required_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->physical_param_combo[0])->entry))); sprintf(text,"%g", (float) (rw->a * conv_length[LENGTH_M][required_unit])); gtk_entry_set_text (GTK_ENTRY (rwin->physical_param_text[0]), text); } k = kval (rw); beta = sqrt(pow(k,2.) - pow(kc(rw,1,0),2.0)); lambda_g = (2. * M_PI)/beta; rw->l = (rw->ang_l * lambda_g)/(2.0 * M_PI); /* in m */ required_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(rwin->physical_param_combo[2])->entry))); sprintf(text,"%g", (float) (rw->l * conv_length[LENGTH_M][required_unit])); gtk_entry_set_text (GTK_ENTRY (rwin->physical_param_text[2]), text); if (kc(rw,1,0) <= k) { /*propagating modes */ beta = sqrt(pow(k,2.) - pow(kc(rw,1,0),2.0)); lambda_g = (2. * M_PI)/beta; rw->atten_cond = alphac (rw) * rw->l; rw->atten_dielectric = alphad (rw) * rw->l; rw->er_eff = (1.0 - pow((fc(rw,1,0)/rw->f),2.0)); } else { /*evanascent modes */ rw->Z0 = 0; rw->ang_l = 0; rw->er_eff = 0; rw->atten_dielectric = 0.0; rw->atten_cond = alphac_cutoff (rw) * rw->l; } free(text); if ((text = (char *) malloc(500*sizeof(char))) == NULL){ perror("results text error: malloc"); exit(-1); } if ((results = (char *) malloc(500*sizeof(char))) == NULL){ perror("results text error: malloc"); exit(-1); } if ((temp = (char *) malloc(1000*sizeof(char))) == NULL){ perror("results text error: malloc"); exit(-1); } sprintf(results, "\nEffective dielectic constant, er_eff = %.4g\n", rw->er_eff); required_unit = getunit(gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (rwin->physical_param_combo[2])->entry))); sprintf(text,"Conductor Losses = %.4g dB\n", rw->atten_cond); strcat(results,text); sprintf(text, "Dielectric Losses = %.4g dB\n", rw->atten_dielectric); strcat(results, text); if (f >= (2.*fc(rw,1,0))) { /* multiple modes possible in waveguide */ strcpy(text, "\nWarning: The following additional \nTE modes can propagate:\n"); strcat(results, text); /* mmax = floor(f/fc(rw,1,0));*/ mmax = 5; nmax = mmax; strcpy(text, " "); for (m = 2; m<= mmax; m++) { for (n=0; n<= nmax; n++) { if (f >= (fc(rw,m,n))){ sprintf(temp,"TE(%u,%u) ",m, n); strcat(text,temp); } } } strcat(results,text); strcat(results,"\n"); } if (f >= fc(rw,1,1)){ /*TM(1,1) mode possible*/ strcpy(text, "\nWarning: The following additional \nTM modes can propagate:\n"); strcat(results, text); /* mmax = floor(f/fc(rw,1,1));*/ mmax = 5; nmax = mmax; strcpy(text, " "); for (m = 1; m<= mmax; m++) { for (n=1; n<= nmax; n++) { if (f >= (fc(rw,m,n))){ sprintf(temp,"TM(%u,%u) ",m, n); strcat(text,temp); } } } strcat(results,text); strcat(results,"\n"); } gtk_label_set (GTK_LABEL (rwin->results_text), results); free(results); free(text); free(temp); if (statusexists){ if (statusint != CONSISTENT) { gtk_label_set_text (GTK_LABEL (rwin->status), "Values are consistent"); } } statusint = CONSISTENT; } else { perror("malloc rw"); exit(-1); } } void fixwidth (GtkWidget *parent, trans_win *rwin) { gtk_label_set_text (GTK_LABEL (GTK_BIN (parent)->child), "Fixed"); gtk_widget_set_sensitive (GTK_WIDGET (parent), FALSE); gtk_label_set_text (GTK_LABEL (GTK_BIN (rwin->physical_param_fix[1])->child), "Fix"); gtk_widget_set_sensitive (GTK_WIDGET (rwin->physical_param_fix[1]), TRUE); widthfixed = TRUE; heightfixed = FALSE; } void fixheight (GtkWidget *parent, trans_win *rwin) { gtk_label_set_text (GTK_LABEL (GTK_BIN (parent)->child), "Fixed"); gtk_widget_set_sensitive (GTK_WIDGET (parent), FALSE); gtk_label_set_text (GTK_LABEL (GTK_BIN (rwin->physical_param_fix[0])->child), "Fix"); gtk_widget_set_sensitive (GTK_WIDGET (rwin->physical_param_fix[0]), TRUE); widthfixed = FALSE; heightfixed = TRUE; } /* * the window aspect */ void rectwaveguide_win (GtkWidget *parent) /*rectwaveguide_win (trans_gui *tg)*/ { short row; /* if there is a window that already exists kill it first */ if (main_body_window != NULL) { gtk_widget_destroy(main_body_window); g_free (twin); twin = g_malloc(sizeof(*twin)); } setup_transgui(RECTWAVEGUIDE, parent, twin); gtk_label_set_text (GTK_LABEL (GTK_BIN (twin->physical_param_fix[0])->child), "Fixed"); gtk_widget_set_sensitive (GTK_WIDGET (twin->physical_param_fix[0]), FALSE); widthfixed = TRUE; heightfixed = FALSE; for (row = 0; row<=1; row++) { switch(row) { case 0: gtk_signal_connect (GTK_OBJECT (twin->physical_param_fix[row]), "clicked", GTK_SIGNAL_FUNC (fixwidth), twin); break; case 1: gtk_signal_connect (GTK_OBJECT (twin->physical_param_fix[row]), "clicked", GTK_SIGNAL_FUNC (fixheight), twin); break; } } gtk_signal_connect (GTK_OBJECT (twin->Analbutton), "clicked", GTK_SIGNAL_FUNC (analyze_rectwaveguide), twin); gtk_signal_connect (GTK_OBJECT (twin->Synbutton), "clicked", GTK_SIGNAL_FUNC (synthesize_rectwaveguide), twin); if (statusint == INCONSISTENT) { analyze_rectwaveguide(parent, (trans_win *) twin); } for (row = 0; row<=1; row++){ gtk_signal_connect (GTK_OBJECT (twin->electrical_param_text[row]), "changed", GTK_SIGNAL_FUNC (setstatus), twin); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/coax.c���������������������������������������������������������������������������0000644�0001750�0001750�00000035660�07520053027�010770� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* * microstrip.c - Puts up window for microstrip and * performs the associated calculations */ #include <stdlib.h> #include <stdio.h> #include <gtk/gtk.h> #include <string.h> #include <math.h> #include "unitscombo.h" #include "coax.h" gboolean doutfixed, dinfixed; extern void error_mes (char *); /* * get_coax_sub * get and assign coax substrate parameters * into coax structure */ void get_coax_sub (trans_win *cwin, coax *cx) { if (sscanf (gtk_entry_get_text(GTK_ENTRY (cwin->subparam_text[0])), "%g", &cx->er) != 1) error_mes("Error: cx->er"); if (sscanf (gtk_entry_get_text(GTK_ENTRY (cwin->subparam_text[1])), "%g", &cx->mur) != 1) error_mes("Error: cx->mur"); if (sscanf (gtk_entry_get_text(GTK_ENTRY (cwin->subparam_text[2])), "%g", &cx->tand) != 1) error_mes("Error: cx->tand"); if (sscanf (gtk_entry_get_text(GTK_ENTRY (cwin->subparam_text[3])), "%g", &cx->sigma) != 1) error_mes("Error: cx->sigma"); } /* * get_coax_comp * get and assign coax component parameters * into coax structure */ void get_coax_comp (trans_win *cwin, coax *cx) { short curr_unit; if (sscanf (gtk_entry_get_text(GTK_ENTRY (cwin->component_param_text[0])), "%g", &cx->f) != 1) error_mes("Error: cx->f"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (cwin->component_param_combo[0])->entry))); cx->f = cx->f * conv_freq[curr_unit][FREQ_HZ]; } /* * get_coax_elec * get and assign coax electrical parameters * into coax structure */ void get_coax_elec (trans_win *cwin, coax *cx) { short curr_unit; if (sscanf (gtk_entry_get_text(GTK_ENTRY (cwin->electrical_param_text[0])), "%g", &cx->Z0) != 1) error_mes("Error: cx->Z0"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (cwin->electrical_param_combo[0])->entry))); cx->Z0 = cx->Z0 * conv_res[curr_unit][RES_OHM]; if (sscanf (gtk_entry_get_text(GTK_ENTRY (cwin->electrical_param_text[1])), "%g", &cx->ang_l) != 1) error_mes("Error: cx->ang_l"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (cwin->electrical_param_combo[1])->entry))); cx->ang_l = cx->ang_l * conv_ang[curr_unit][ANG_RAD]; } /* * get_coax_phys * get and assign coax physical parameters * into coax structure */ void get_coax_phys (trans_win *cwin, coax *cx) { short curr_unit; if (sscanf (gtk_entry_get_text(GTK_ENTRY (cwin->physical_param_text[0])), "%g", &cx->din) != 1) error_mes("Error: cx->din"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (cwin->physical_param_combo[0])->entry))); cx->din = cx->din * conv_length[curr_unit][LENGTH_M]; if (sscanf (gtk_entry_get_text(GTK_ENTRY (cwin->physical_param_text[1])), "%g", &cx->dout) != 1) error_mes("Error: cx->dout"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (cwin->physical_param_combo[1])->entry))); cx->dout = cx->dout * conv_length[curr_unit][LENGTH_M]; if (sscanf (gtk_entry_get_text(GTK_ENTRY (cwin->physical_param_text[2])), "%g", &cx->l) != 1) error_mes("Error: cx->l"); curr_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (cwin->physical_param_combo[2])->entry))); cx->l = cx->l * conv_length[curr_unit][LENGTH_M]; } void fixdin (GtkWidget *parent, trans_win *cwin) { gtk_label_set_text (GTK_LABEL (GTK_BIN (parent)->child), "Fixed"); gtk_widget_set_sensitive (GTK_WIDGET (parent), FALSE); gtk_label_set_text (GTK_LABEL (GTK_BIN (cwin->physical_param_fix[1])->child), "Fix"); gtk_widget_set_sensitive (GTK_WIDGET (cwin->physical_param_fix[1]), TRUE); dinfixed = TRUE; doutfixed = FALSE; } void fixdout (GtkWidget *parent, trans_win *cwin) { gtk_label_set_text (GTK_LABEL (GTK_BIN (parent)->child), "Fixed"); gtk_widget_set_sensitive (GTK_WIDGET (parent), FALSE); gtk_label_set_text (GTK_LABEL (GTK_BIN (cwin->physical_param_fix[0])->child), "Fix"); gtk_widget_set_sensitive (GTK_WIDGET (cwin->physical_param_fix[0]), TRUE); dinfixed = FALSE; doutfixed = TRUE; } gfloat alphad_coax (coax *cx) { gfloat f, er, tand, ad; f = cx->f; er = cx->er; tand = cx->tand; ad = (M_PI/C0) * f * sqrt(er) * tand; ad = ad * 8.686; return ad; } gfloat alphac_coax (coax *cx) { gfloat er, mur, din, dout; gfloat f, Rs, sigma; gfloat ac; er = cx->er; mur = cx->mur; sigma = cx->sigma; f = cx->f; din = cx->din; dout = cx->dout; Rs = sqrt((M_PI * f * mur* MU0)/sigma); ac = (0.5 * sqrt(er)) * (((1/din) + (1/dout))/log(dout/din)) * (Rs/(120. * M_PI)); ac = ac * 8.686; return ac; } /* * analyze_coax - analysis function */ void analyze_coax (GtkWidget *parent, trans_win *cwin) { gchar *text, *results, *temp; coax *cx; short required_unit; gfloat lambda_g; short m, n; gfloat fc; /*allocate memory for text */ if ((text = (char *) malloc(10*sizeof(char))) == NULL){ perror("text error: malloc"); exit(-1); } /*allocate memory for pointer cx */ if ((cx = g_malloc(sizeof *cx)) != NULL) { /* Get and assign substrate parameters */ get_coax_sub(cwin, cx); /* Get and assign component parameters */ get_coax_comp(cwin, cx); /* Get and assign physical parameters */ get_coax_phys(cwin, cx); if (cx->din != 0.0){ cx->Z0 = (60.0/sqrt(cx->er))*log(cx->dout/cx->din); } lambda_g = (C0/(cx->f))/sqrt(cx->er * cx->mur); /* calculate electrical angle */ cx->ang_l = (2.0 * M_PI * cx->l)/lambda_g; /* in radians */ cx->atten_dielectric = alphad_coax (cx) * cx->l; cx->atten_cond = alphac_coax (cx) * cx->l; required_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (cwin->electrical_param_combo[0])->entry))); sprintf(text,"%g", (float) (cx->Z0 * conv_res[RES_OHM][required_unit])); gtk_entry_set_text (GTK_ENTRY (cwin->electrical_param_text[0]), text); required_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(cwin->electrical_param_combo[1])->entry))); sprintf(text,"%g", (float) (cx->ang_l * conv_ang[ANG_RAD][required_unit])); gtk_entry_set_text (GTK_ENTRY (cwin->electrical_param_text[1]), text); free(text); if ((text = (char *) malloc(1000*sizeof(char))) == NULL){ perror("results text error: malloc"); exit (-1); } if ((results = (char *) malloc(1000*sizeof(char))) == NULL){ perror("results text error: malloc"); exit (-1); } if ((temp = (char *) malloc(1000*sizeof(char))) == NULL){ perror("results text error: malloc"); exit (-1); } sprintf(results,"Conductor Losses = %.4g dB\n", cx->atten_cond); sprintf(text, "Dielectric Losses = %.4g dB\n", cx->atten_dielectric); strcat(results, text); n = 1; fc = C0 / (M_PI * (cx->dout + cx->din)/(float) n); if (fc <= cx->f) { strcpy(text, "\nWarning: The following additional \nTE modes can propagate:\n TE(1,1) "); strcat(results, text); strcpy(text, " "); m = 2; fc = C0 / (2 * (cx->dout - cx->din)/(float) (m-1)); while ((fc <= cx->f) && (m<10)) { sprintf(temp, "TE(n,%d) ",m); strcat(text,temp); m++; fc = C0 / (2 * (cx->dout - cx->din)/(float) (m-1)); } strcat(results, text); strcat(results,"\n\n"); } m = 1; fc = C0 / (2 * (cx->dout - cx->din)/(float) m); if (fc <= cx->f) { strcpy(text, "\nWarning: The following additional \nTM modes can propagate:\n"); strcat(results, text); strcpy(text, " "); while ((fc <= cx->f) && (m<10)) { sprintf(temp, "TM(n,%d) ",m); strcat(text,temp); m++; fc = C0 / (2 * (cx->dout - cx->din)/(float) m); } strcat(results,text); strcat(results,"\n"); } gtk_label_set (GTK_LABEL (cwin->results_text), results); free(results); free(text); free(temp); if (statusexists){ if (statusint != CONSISTENT) { gtk_label_set_text (GTK_LABEL (cwin->status), "Values are consistent"); } } statusint = CONSISTENT; } else { perror("malloc cx"); exit (-1); } } /* * synthesize_coax - synthesis function */ void synthesize_coax (GtkWidget *parent, trans_win *cwin) { gchar *text, *results, *temp; coax *cx; short required_unit; gfloat lambda_g; gfloat f, er, din, dout, Z0; gfloat fc; short m, n; /*allocate memory for text */ if ((text = (char *) malloc(10*sizeof(char))) == NULL){ perror("text error: malloc"); exit (-1); } /* allocate memory for cx */ if ((cx = g_malloc (sizeof *cx)) != NULL) { /* Get and assign substrate parameters */ get_coax_sub(cwin, cx); /* Get and assign component parameters */ get_coax_comp(cwin, cx); /* Get and assign electrical parameters */ get_coax_elec (cwin, cx); /* Get and assign physical parameters */ get_coax_phys(cwin, cx); f = cx->f; din = cx->din; dout = cx->dout; Z0 = cx->Z0; er = cx->er; if (doutfixed) { /* solve for din */ cx->din = dout / exp(Z0*sqrt(er)/60.0); required_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(cwin->physical_param_combo[0])->entry))); sprintf(text,"%g", (float) (cx->din * conv_length[LENGTH_M][required_unit])); gtk_entry_set_text (GTK_ENTRY (cwin->physical_param_text[0]), text); } else { /* solve for dout */ cx->dout = din * exp(Z0*sqrt(er)/60.0); required_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(cwin->physical_param_combo[1])->entry))); sprintf(text,"%g", (float) (cx->dout * conv_length[LENGTH_M][required_unit])); gtk_entry_set_text (GTK_ENTRY (cwin->physical_param_text[1]), text); } lambda_g = (C0/(cx->f))/sqrt(cx->er * cx->mur); /* calculate physical length */ cx->l = (lambda_g * cx->ang_l)/(2.0 * M_PI); /* in m */ required_unit = getunit (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(cwin->physical_param_combo[2])->entry))); sprintf(text,"%g", (float) (cx->l * conv_length[LENGTH_M][required_unit])); gtk_entry_set_text (GTK_ENTRY (cwin->physical_param_text[2]), text); cx->atten_dielectric = alphad_coax (cx) * cx->l; cx->atten_cond = alphac_coax (cx) * cx->l; free(text); if ((text = (char *) malloc(1000*sizeof(char))) == NULL){ perror("results text error: malloc"); exit (-1); } if ((results = (char *) malloc(1000*sizeof(char))) == NULL){ perror("results text error: malloc"); exit (-1); } if ((temp = (char *) malloc(1000*sizeof(char))) == NULL){ perror("results text error: malloc"); exit (-1); } sprintf(results,"Conductor Losses = %.4g dB\n", cx->atten_cond); sprintf(text, "Dielectric Losses = %.4g dB\n", cx->atten_dielectric); strcat(results, text); n = 1; fc = C0 / (M_PI * (cx->dout + cx->din)/(float) n); if (fc <= cx->f) { strcpy(text, "\nWarning: The following additional \nTE modes can propagate:\n TE(1,1) "); strcat(results, text); strcpy(text, " "); m = 2; fc = C0 / (2 * (cx->dout - cx->din)/(float) (m-1)); while ((fc <= cx->f) && (m<10)) { sprintf(temp, "TE(n,%d) ",m); strcat(text,temp); m++; fc = C0 / (2 * (cx->dout - cx->din)/(float) (m-1)); } strcat(results, text); strcat(results,"\n\n"); } m = 1; fc = C0 / (2 * (cx->dout - cx->din)/(float) m); if (fc <= cx->f) { strcpy(text, "\nWarning: The following additional \nTM modes can propagate:\n"); strcat(results, text); strcpy(text, " "); while ((fc <= cx->f) && (m<10)) { sprintf(temp, "TM(n,%d) ",m); strcat(text,temp); m++; fc = C0 / (2 * (cx->dout - cx->din)/(float) m); } strcat(results,text); strcat(results,"\n"); } gtk_label_set (GTK_LABEL (cwin->results_text), results); free(results); free(text); free(temp); if (statusexists){ if (statusint != CONSISTENT) { gtk_label_set_text (GTK_LABEL (cwin->status), "Values are consistent"); } } statusint = CONSISTENT; } else { perror("malloc cx"); exit (-1); } } /* * the window aspect */ void coax_win (GtkWidget *parent) { short row; /* if there is a window that already exists kill it first */ if (main_body_window != NULL) { gtk_widget_destroy(main_body_window); g_free (twin); twin = g_malloc(sizeof(*twin)); } setup_transgui(COAX, parent, twin); gtk_label_set_text (GTK_LABEL (GTK_BIN (twin->physical_param_fix[1])->child), "Fixed"); gtk_widget_set_sensitive (GTK_WIDGET (twin->physical_param_fix[1]), FALSE); doutfixed = TRUE; dinfixed = FALSE; for (row = 0; row<=1; row++) { switch(row) { case 0: gtk_signal_connect (GTK_OBJECT (twin->physical_param_fix[row]), "clicked", GTK_SIGNAL_FUNC (fixdin), twin); break; case 1: gtk_signal_connect (GTK_OBJECT (twin->physical_param_fix[row]), "clicked", GTK_SIGNAL_FUNC (fixdout), twin); break; } } gtk_signal_connect (GTK_OBJECT (twin->Analbutton), "clicked", GTK_SIGNAL_FUNC (analyze_coax), twin); gtk_signal_connect (GTK_OBJECT (twin->Synbutton), "clicked", GTK_SIGNAL_FUNC (synthesize_coax), twin); if (statusint == INCONSISTENT) { analyze_coax(parent, (trans_win *) twin); } for (row = 0; row<=1; row++){ gtk_signal_connect (GTK_OBJECT (twin->electrical_param_text[row]), "changed", GTK_SIGNAL_FUNC (setstatus), twin); } } ��������������������������������������������������������������������������������transcalc-0.14/src/callback_general.c���������������������������������������������������������������0000644�0001750�0001750�00000003655�07514527644�013304� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* callback_general.c * General purpose callbacks */ #include <stdlib.h> #include <stdio.h> #include <gtk/gtk.h> #include "transcalc.h" #include "callback_general.h" gint delete_event (GtkWidget *widget, GdkEvent *event, gpointer data) { /* If you return FALSE in the "delete_event" signal handler, * GTK will emit the "destroy" signal. Returning TRUE means * you don't want the window to be destroyed. * This is useful for popping up 'are you sure you want to quit?' * type dialogs. */ return FALSE; } void destroy( GtkWidget *widget, gpointer data ) { FILE *fp; char *save_filename = get_save_filename (); fp = fopen(save_filename, "w"); g_free (save_filename); trc_file_save (fp, SAVE_END); gtk_main_quit(); } void setstatus (GtkWidget *widget, trans_win *parent) /* trans_gui *tg)*/ { gchar *textentry; /*allocate memory for textentry */ if ((textentry = (char *) malloc(200*sizeof(char))) == NULL){ perror("help text error: malloc"); return; } sprintf(textentry,"Parameters changed: Values may be inconsistent"); statusint = INCONSISTENT; gtk_label_set_text (GTK_LABEL (parent->status), textentry); free(textentry); } �����������������������������������������������������������������������������������transcalc-0.14/src/fnmatch.c������������������������������������������������������������������������0000644�0001750�0001750�00000012515�07520053027�011450� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #if defined (CONFIG_BROKETS) /* We use <config.h> instead of "config.h" so that a compilation using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h (which it would do because it found this file in $srcdir). */ #include <config.h> #else #include "config.h" #endif #endif #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif /* This code to undef const added in libiberty. */ #ifndef __STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include <errno.h> #include <fnmatch.h> #include <ctype.h> /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #if defined (_LIBC) || !defined (__GNU_LIBRARY__) #if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) extern int errno; #endif /* Match STRING against the filename pattern PATTERN, returning zero if it matches, nonzero if not. */ int fnmatch (pattern, string, flags) const char *pattern; const char *string; int flags; { register const char *p = pattern, *n = string; register char c; /* Note that this evalutes C many times. */ #define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c)) while ((c = *p++) != '\0') { c = FOLD (c); switch (c) { case '?': if (*n == '\0') return FNM_NOMATCH; else if ((flags & FNM_FILE_NAME) && *n == '/') return FNM_NOMATCH; else if ((flags & FNM_PERIOD) && *n == '.' && (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) return FNM_NOMATCH; break; case '\\': if (!(flags & FNM_NOESCAPE)) { c = *p++; c = FOLD (c); } if (FOLD (*n) != c) return FNM_NOMATCH; break; case '*': if ((flags & FNM_PERIOD) && *n == '.' && (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) return FNM_NOMATCH; for (c = *p++; c == '?' || c == '*'; c = *p++, ++n) if (((flags & FNM_FILE_NAME) && *n == '/') || (c == '?' && *n == '\0')) return FNM_NOMATCH; if (c == '\0') return 0; { char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c; c1 = FOLD (c1); for (--p; *n != '\0'; ++n) if ((c == '[' || FOLD (*n) == c1) && fnmatch (p, n, flags & ~FNM_PERIOD) == 0) return 0; return FNM_NOMATCH; } case '[': { /* Nonzero if the sense of the character class is inverted. */ register int not; if (*n == '\0') return FNM_NOMATCH; if ((flags & FNM_PERIOD) && *n == '.' && (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) return FNM_NOMATCH; not = (*p == '!' || *p == '^'); if (not) ++p; c = *p++; for (;;) { register char cstart = c, cend = c; if (!(flags & FNM_NOESCAPE) && c == '\\') cstart = cend = *p++; cstart = cend = FOLD (cstart); if (c == '\0') /* [ (unterminated) loses. */ return FNM_NOMATCH; c = *p++; c = FOLD (c); if ((flags & FNM_FILE_NAME) && c == '/') /* [/] can never match. */ return FNM_NOMATCH; if (c == '-' && *p != ']') { cend = *p++; if (!(flags & FNM_NOESCAPE) && cend == '\\') cend = *p++; if (cend == '\0') return FNM_NOMATCH; cend = FOLD (cend); c = *p++; } if (FOLD (*n) >= cstart && FOLD (*n) <= cend) goto matched; if (c == ']') break; } if (!not) return FNM_NOMATCH; break; matched:; /* Skip the rest of the [...] that already matched. */ while (c != ']') { if (c == '\0') /* [... (unterminated) loses. */ return FNM_NOMATCH; c = *p++; if (!(flags & FNM_NOESCAPE) && c == '\\') /* XXX 1003.2d11 is unclear if this is right. */ ++p; } if (not) return FNM_NOMATCH; } break; default: if (c != FOLD (*n)) return FNM_NOMATCH; } ++n; } if (*n == '\0') return 0; if ((flags & FNM_LEADING_DIR) && *n == '/') /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */ return 0; return FNM_NOMATCH; } #endif /* _LIBC or not __GNU_LIBRARY__. */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/units.h��������������������������������������������������������������������������0000644�0001750�0001750�00000003511�07310030503�011162� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* * units.h */ #ifndef __UNITS_H #define __UNITS_H #define FREQ_GHZ 0 #define FREQ_HZ 1 #define FREQ_KHZ 2 #define FREQ_MHZ 3 #define LENGTH_MIL 0 #define LENGTH_CM 1 #define LENGTH_MM 2 #define LENGTH_M 3 #define LENGTH_UM 4 #define LENGTH_IN 5 #define LENGTH_FT 6 #define RES_OHM 0 #define RES_KOHM 1 #define ANG_DEG 0 #define ANG_RAD 1 /* #define in_to_m(a) (a*2.54e-2) #define mil_to_m(a) (1e-3*in_to_m(a)) #define cm_to_m(a) (a*1e-2) #define mm_to_m(a) (a*1e-3) #define um_to_m(a) (a*1e-6) #define ft_to_m(a) (a*12*2.54e-2) #define m_to_in(a) (a/2.54e-2) #define m_to_mil(a) (m_to_in(a)*1000) #define m_to_cm(a) (a*100.) #define m_to_mm(a) (a*1000.) #define m_to_um(a) (a*1e6) #define m_to_ft(a) (a/0.3048) #define ghz_to_hz(a) (a*1e9) #define khz_to_hz(a) (a*1e3) #define mhz_to_hz(a) (a*1e6) #define hz_to_ghz(a) (a*1e-9) #define hz_to_khz(a) (a*1e-3) #define hz_to_mhz(a) (a*1e-6) #define rad_to_deg(a) (a*180.0/M_PI) #define deg_to_rad(a) (a*M_PI/180.0) #define kohm_to_ohm(a) (a*1000.0) #define ohm_to_kohm(a) (a/1000.0) */ short length_unit, freq_unit, res_unit, ang_unit; #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/transcalc.h����������������������������������������������������������������������0000644�0001750�0001750�00000011657�07522027776�012033� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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. */ /* transcalc.h */ #ifndef __TRANSCALC_H #define __TRANSCALC_H #include <config.h> #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <string.h> #ifdef HAVE_PWD_H /* on mingw32 there is no pwd.h */ #include <pwd.h> #endif #include <math.h> #include <gtk/gtk.h> #include "units.h" #if !HAVE_STRCPY # if HAVE_BCOPY # define strcpy(dest, src) bcopy (src, dest, 1 + strlen (src)) # else /* !HAVE_BCOPY */ error no strcpy or bcopy # endif /* HAVE_BCOPY */ #endif /* HAVE_STRCPY */ GtkWidget *main_body_window; GtkWidget *transtype_combo; /*GtkWidget *status;*/ #define MICROSTRIP 0 #define RECTWAVEGUIDE 1 #define COAX 2 #define C_MICROSTRIP 3 #define NUMSUBPARS 9 #define NUMCOMPPARS 3 #define NUMPHYSPARS 4 #define NUMELECPARS 4 #define SUBPARAMTYPE 0 #define COMPPARAMTYPE 1 #define PHYSPARAMTYPE 2 #define ELECPARAMTYPE 3 #ifndef M_PI #define M_PI 3.14159265358979323846 /* pi */ #endif /* * The foolwing constant values are from * The NIST Reference on Constants, Units and Uncertainty * * CODATA Recommended Values of the Fundamental Physical Constants: 1998 * Peter J. Mohr and Barry N. Taylor * National Institute of standards and Technology, Gaithersburg, MD 20899-8401 * * available at http://physics.nist.gov/constants */ #define MU0 (4*M_PI*1e-7) /* permeability */ #define ER0 (8.854187817e-12) /* permittivity */ #define C0 (299792458) /* speed of light m/s*/ #define CONSISTENT 0 /* status of fields in calculation */ #define INCONSISTENT 1 /*config directory*/ #define TRC_CONFIG_DIRECTORY ".transcalc" #define TRC_CONFIG_DIRECTORY_MODE S_IRWXU #define TRC_CONFIG_FILE TRC_CONFIG_DIRECTORY "/transcalc.cfg" #define TRC_SAVE_FILE TRC_CONFIG_DIRECTORY "/transcalc.trc" #define SAVE_OPER 0 #define SAVE_END 1 #define LOAD_OPER 0 #define LOAD_INIT 1 typedef struct _trans_win { GtkWidget *subparam_frame; GtkWidget *subparam_table; GtkWidget *subparam_text[NUMSUBPARS]; GtkWidget *subparam_combo[NUMSUBPARS]; GtkWidget *component_param_frame; GtkWidget *component_param_table; GtkWidget *component_param_text[NUMCOMPPARS]; GtkWidget *component_param_combo[NUMCOMPPARS]; GtkWidget *physical_param_frame; GtkWidget *physical_param_table; GtkWidget *physical_param_text[NUMPHYSPARS]; GtkWidget *physical_param_combo[NUMPHYSPARS]; GtkWidget *physical_param_fix[2]; GtkWidget *Synbutton; GtkWidget *Analbutton; GtkWidget *electrical_param_frame; GtkWidget *electrical_param_table; GtkWidget *electrical_param_text[NUMELECPARS]; GtkWidget *electrical_param_combo[NUMELECPARS]; GtkWidget *drawing_frame; GtkWidget *results_frame; GtkWidget *results_text; GtkWidget *status_frame; GtkWidget *status; } trans_win; typedef struct _trans_gui { GtkWidget *mainwindow; GtkWidget *menu; GtkWidget *vertbox; GtkWidget *body; } trans_gui; typedef struct _tgui_trans { trans_gui *topgui; trans_win *twin; } tgui_trans; typedef struct _trans_label { char *substrate_label_name[NUMSUBPARS]; char *component_label_name[NUMCOMPPARS]; char *physical_label_name[NUMPHYSPARS]; char *electrical_label_name[NUMELECPARS]; char *stooltips_helptext[NUMSUBPARS]; char *ctooltips_helptext[NUMCOMPPARS]; char *ptooltips_helptext[NUMPHYSPARS]; char *etooltips_helptext[NUMELECPARS]; } trans_label; typedef struct _trans_value { gfloat subparams_value[NUMSUBPARS]; gfloat component_params_value[NUMCOMPPARS]; gfloat physical_params_value[NUMPHYSPARS]; gfloat electrical_params_value[NUMELECPARS]; } trans_value; short current_transtype; trans_win *twin; short statusint; trans_gui *tgui; gboolean statusexists; int main_window_width, main_window_height; void error_mes(gchar * text); extern gint delete_event (GtkWidget *, GdkEvent *, gpointer); extern void destroy (GtkWidget *, gpointer); /*extern GtkWidget *setup_body (GtkWidget *);*/ extern GtkWidget *setup_body (trans_gui *); /*extern void analyze_microstrip (GtkWidget *, tgui_trans *);*/ extern void analyze_microstrip (GtkWidget *, trans_win *); /*extern void analyze_microstrip (GtkWidget *);*/ #define MAX_ERROR 0.000001 #endif ���������������������������������������������������������������������������������transcalc-0.14/src/setup_menu.h���������������������������������������������������������������������0000644�0001750�0001750�00000001650�07514036161�012222� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* setup_menu.h * * Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * 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 _SETUP_MENU_H_ #define _SETUP_MENU_H_ GtkWidget *setup_menu (trans_gui *tgui); #endif /* #ifndef _SETUP_MENU_H_ */ ����������������������������������������������������������������������������������������transcalc-0.14/src/unitscombo.h���������������������������������������������������������������������0000644�0001750�0001750�00000001743�07514544005�012224� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* unitscombo.h * * Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * 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 _UNITSCOMBO_H_ #define _UNITSCOMBO_H_ gint getunit (gchar *text); gchar *length_unit_text (short unitint); extern short transtype_int (void); #endif /* _UNITSCOMBO_H_ */ �����������������������������transcalc-0.14/src/menu.h���������������������������������������������������������������������������0000644�0001750�0001750�00000002313�07310030503�010763� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* menu.h */ #ifndef __MENU_H #define __MENU_H /*GtkWidget *setup_menu (GtkWidget *, GtkWidget *);*/ void analyze_CB ( GtkWidget *); void synthesizeCB (GtkWidget *); void make_main_menu (GtkWidget *, GtkWidget *, GtkWidget **); GtkWidget *setup_menu (trans_gui *); extern gint delete_event(GtkWidget *, GdkEvent *, gpointer); extern void destroy(GtkWidget *, gpointer); extern void optionsCB(gpointer); extern void helpCB(gpointer); extern void aboutCB(gpointer); #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/help.h���������������������������������������������������������������������������0000644�0001750�0001750�00000005306�07715455270�011001� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* help.h * * Added myself in the ABOUTTEXT, 8-) ! C.G. */ #ifndef __HELP_H #define __HELP_H #include <config.h> void helpCB(gpointer); void aboutCB(gpointer); #define HELPTEXT \ "\n\ AUTHORS:\n\ \n\ Gopal Narayanan <gopal@astro.umass.edu>\n\ Claudio Girardi <claudio.girardi@ieee.org>\n\ \n\ TRANSCALC is an analysis and synthesis tool for calculating the electrical\n\ and physical properties of different kinds of RF and microwave transmission\n\ lines.\n\ \n\ Transcalc was somewhat inspired by the functionality of Agilent Technologies' \n\ commercial program linecalc. Transcalc is built using the GIMP toolkit (GTK) for\n\ its GUI interface. \n\ \n\ For each type of transmission line, using dialog boxes, you can enter values\n\ for the various parameters, and either calculate its electrical\n\ properties, or use the given electrical requirements to sythesize physical \n\ parameters of the required transmission line.\n\ \n\ Available transmission lines: \n\ \n\ microstrip\n\ rectangular waveguide\n\ coaxial line\n\ coupled microstrips\n\ \n\ " #define ABOUTTEXT \ "\n\ Gopal Narayanan <gopal@astro.umass.edu>\n\ \n\ Copyright (C) 2001-2002 Gopal Narayanan <gopal@astro.umass.edu>\n\ Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org>\ \n\ This program is free software; you can redistribute it and/or\n\ modify it under the terms of the GNU General Public License\n\ as published by the Free Software Foundation; either version 2\n\ of the License, or (at your option) any later version.\n\ \n\ This program is distributed in the hope that it will be useful,\n\ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ GNU General Public License for more details.\n\ \n\ You should have received a copy of the GNU General Public License\n\ along with this program; if not, write to the Free Software\n\ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n\ USA.\n\ \n\ \n\ " #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/body.h���������������������������������������������������������������������������0000644�0001750�0001750�00000002406�07517414100�010767� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* body.h * added c_microstrip_win(), C.G. */ #ifndef __BODY_H #define __BODY_H #include "transcalc.h" /*GtkWidget *setup_body (GtkWidget *);*/ GtkWidget *setup_body (trans_gui *); /*void transtype (gpointer); */ void transtype (GtkWidget *, gpointer); short transtype_int (void); /*extern trans_win *microstrip_win (GtkWidget *);*/ extern trans_win *microstrip_win (trans_gui *); extern trans_win *rectwaveguide_win (trans_gui *); extern trans_win *coax_win (trans_gui *); extern trans_win *c_microstrip_win (trans_gui *); #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/options.h������������������������������������������������������������������������0000644�0001750�0001750�00000002033�07310030503�011511� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* options.h */ #ifndef __OPTIONS_H #define __OPTIONS_H void options_freq_combo_CB ( GtkWidget *, gpointer); void options_length_combo_CB ( GtkWidget *, gpointer); void options_res_combo_CB ( GtkWidget *, gpointer); void options_ang_combo_CB ( GtkWidget *, gpointer); void optionCB (gpointer); #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/setup.h��������������������������������������������������������������������������0000644�0001750�0001750�00000002236�07514544004�011177� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* setup.h */ #ifndef __SETUP_H #define __SETUP_H #include "transcalc.h" #include "units.h" #include "convert.h" extern void pack_image_in_box (GtkWidget *, gchar *); extern void setup_label (short, trans_label *); extern void setup_values (short, trans_value *); extern GtkWidget *setup_combo_widget (short, short); extern void setup_status (GtkWidget *, trans_win *); void setstatus (GtkWidget *, trans_win *); #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/file_io.h������������������������������������������������������������������������0000644�0001750�0001750�00000001767�07514036161�011455� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* file_io.h * * Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * 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 _FILE_IO_H_ #define _FILE_IO_H_ #define TC_FILE_LOAD 0 #define TC_FILE_SAVE 1 void file_dialog(gpointer callback_data, guint callback_action, GtkWidget *widget); #endif /* #ifndef _FILE_IO_H_ */ ���������transcalc-0.14/src/microstrip.h���������������������������������������������������������������������0000644�0001750�0001750�00000006021�07520053030�012215� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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 __MICROSTRIP_H #define __MICROSTRIP_H #include "transcalc.h" #include "units.h" #include "convert.h" /* type = 0 substrate param type = 1 component param type = 2 physical param type = 3 electrical param */ typedef struct _microstrip { gfloat er; /* dielectric constant */ gfloat mur; /* mag. permeability */ gfloat h; /* height of substrate */ gfloat ht; /* height to the top of box */ gfloat t; /* thickness of top metal */ gfloat sigma; /* Conductivity of the metal */ gfloat tand; /* Dielectric Loss Tangent */ gfloat rough; /* Roughness of top metal */ gfloat f; /* Frequency of operation */ gfloat w; /* width of line */ gfloat l; /* length of line */ gfloat Z0_0; /* static characteristic impedance */ gfloat Z0; /* characteristic impedance */ gfloat ang_l; /* Electrical length in angle */ gfloat er_eff_0; /* Static effective dielectric constant */ gfloat er_eff; /* Effective dielectric constant */ gfloat mur_eff; /* Effective mag. permeability */ gfloat w_eff; /* Effective width of line */ gfloat atten_dielectric; /* Loss in dielectric (dB) */ gfloat atten_cond; /* Loss in conductors (dB) */ gfloat skindepth; /* Skin depth in mils */ /* private params */ gfloat Z0_h_1; /* homogeneous stripline impedance */ } microstrip; gfloat delta_q_thickness(gfloat u, gfloat t_h); void microstrip_Z0(microstrip * ms); void microstrip_dispersion(microstrip * ms); void analyze_microstrip(GtkWidget *, trans_win *); void synthesize_microstrip(GtkWidget *, trans_win *); void microstrip_win(GtkWidget *); /* gfloat er_eff_freq (microstrip *); gfloat alpha_c (microstrip *); gfloat alpha_c_roughness (microstrip *); gfloat alpha_dielectric (microstrip *); gfloat char_impedance_ht (microstrip *); gfloat synth_width (microstrip *); gfloat skin_depth (microstrip *); gfloat ereff_dispersion (microstrip *); gfloat Z0_dispersion (microstrip *); void dispersion (microstrip *); void error_mes (gchar *); void get_microstrip_sub (trans_win *, microstrip *); void get_microstrip_comp (trans_win *, microstrip *); void get_microstrip_phys (trans_win *, microstrip *); void get_microstrip_elec (trans_win *, microstrip *); */ extern void setup_transgui(int, GtkWidget *, trans_win *); extern void setstatus(GtkWidget *, trans_win *); #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/c_microstrip.h�������������������������������������������������������������������0000644�0001750�0001750�00000012402�07520053027�012525� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2002 Claudio Girardi <in3otd@qsl.net> 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 _C_MICROSTRIP_H_ #define _C_MICROSTRIP_H_ #include "transcalc.h" #include "units.h" #include "convert.h" /* type = 0 substrate param type = 1 component param type = 2 physical param type = 3 electrical param */ /** * struct _c_microstrip - coupled microstrips * * @er: relative dielectric constant * @mur: relative magnetic permeability * @h: height of substrate * @ht: height to the top of box * @t: thickness of top metal * @sigma: conductivity of the metal * @tand: dielectric loss tangent * @rough: roughness of top metal * @f: frequency of operation * @w: width of lines * @w_t_e: even-mode thickness-corrected line width * @w_t_o: odd-mode thickness-corrected line width * @l: length of lines * @s: spacing of lines * @Z0_e_0: static even-mode impedance * @Z0_o_0: static odd-mode impedance * @Z0e: even-mode impedance * @Z0o: odd-mode impedance * @c_e: even-mode capacitance * @c_o: odd-mode capacitance * @ang_l_e: even-mode electrical length as angle * @ang_l_o: odd-mode electrical length as angle * @er_eff_e: even-mode effective dielectric constant * @er_eff_o: odd-mode effective dielectric constant * @er_eff_e_0: static even-mode effective dielectric constant * @er_eff_o_0: static odd-mode effective dielectric constant * @er_eff: FIXME: dummy * @mur_eff: effective mag. permeability * @w_eff: effective width of line * @atten_dielectric_e: even-mode dielectric losses [dB] * @atten_cond_e: even-mode conductors losses [dB] * @atten_dielectric_o: odd-mode dielectric losses [dB] * @atten_cond_o: odd-mode conductors losses [dB] * @skindepth: skin depth in mils * * coupled microstrip struct */ typedef struct _c_microstrip { gfloat er; /* dielectric constant */ gfloat mur; /* mag. permeability */ gfloat h; /* height of substrate */ gfloat ht; /* height to the top of box */ gfloat t; /* thickness of top metal */ gfloat sigma; /* Conductivity of the metal */ gfloat tand; /* Dielectric Loss Tangent */ gfloat rough; /* Roughness of top metal */ gfloat f; /* Frequency of operation */ gfloat w; /* width of lines */ gfloat w_t_e; /* even-mode thickness-corrected line width */ gfloat w_t_o; /* odd-mode thickness-corrected line width */ gfloat l; /* length of lines */ gfloat s; /* spacing of lines */ gfloat Z0_e_0; /* static even-mode impedance */ gfloat Z0_o_0; /* static odd-mode impedance */ gfloat Z0e; /* even-mode impedance */ gfloat Z0o; /* odd-mode impedance */ gfloat c_e; /* even-mode capacitance */ gfloat c_o; /* odd-mode capacitance */ gfloat ang_l_e; /* even-mode electrical length in angle */ gfloat ang_l_o; /* odd-mode electrical length in angle */ gfloat er_eff_e; /* even-mode effective dielectric constant */ gfloat er_eff_o; /* odd-mode effective dielectric constant */ gfloat er_eff_e_0; /* static even-mode effective dielectric constant */ gfloat er_eff_o_0; /* static odd-mode effective dielectric constant */ gfloat er_eff; /* FIXME: dummy */ gfloat mur_eff; /* Effective mag. permeability */ gfloat w_eff; /* Effective width of line */ gfloat atten_dielectric_e; /* even-mode dielectric losses (dB) */ gfloat atten_cond_e; /* even-mode conductors losses (dB) */ gfloat atten_dielectric_o; /* odd-mode dielectric losses (dB) */ gfloat atten_cond_o; /* odd-mode conductors losses (dB) */ gfloat skindepth; /* Skin depth in mils */ } c_microstrip; /* gfloat ereff (microstrip *); gfloat mur_eff (microstrip *); gfloat w_eff (microstrip *); gfloat er_eff_freq (microstrip *); gfloat alpha_c (microstrip *); gfloat alpha_c_roughness (microstrip *); gfloat alpha_dielectric (microstrip *); gfloat char_impedance_ht (microstrip *); gfloat char_impedance (microstrip *); gfloat synth_width (microstrip *); gfloat skin_depth (microstrip *); gfloat ereff_dispersion (microstrip *); gfloat Z0_dispersion (microstrip *); void dispersion (microstrip *); void error_mes (gchar *); void get_microstrip_sub (trans_win *, microstrip *); void get_microstrip_comp (trans_win *, microstrip *); void get_microstrip_phys (trans_win *, microstrip *); void get_microstrip_elec (trans_win *, microstrip *); void analyze_microstrip (GtkWidget *, trans_win *); void synthesize_microstrip (GtkWidget *, trans_win *); */ void c_microstrip_win(GtkWidget *); extern void setup_transgui(int, GtkWidget *, trans_win *); extern void setstatus(GtkWidget *, trans_win *); #endif /* _C_MICROSTRIP_H_ */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/rectwaveguide.h������������������������������������������������������������������0000644�0001750�0001750�00000005570�07514544004�012701� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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 __RECTWAVEGUIDE_H #define __RECTWAVEGUIDE_H #include "transcalc.h" #include "units.h" #include "convert.h" /* type = 0 substrate param type = 1 component param type = 2 physical param type = 3 electrical param */ typedef struct _rectwaveguide { gfloat er; /* dielectric constant */ gfloat mur; /* mag. permeability */ gfloat sigma; /* Conductivity of the metal */ gfloat tand; /* Dielectric Loss Tangent */ gfloat tanm; /* Magnetic Loss Tangent */ gfloat f; /* Frequency of operation */ gfloat a; /* width of waveguide */ gfloat b; /* height of waveguide */ gfloat l; /* length of waveguide */ gfloat Z0; /* characteristic impedance */ gfloat ang_l; /* Electrical length in angle */ gfloat er_eff; /* Effective dielectric constant */ gfloat mur_eff; /* Effective mag. permeability */ gfloat atten_dielectric; /* Loss in dielectric (dB) */ gfloat atten_cond; /* Loss in conductors (dB) */ gfloat skindepth; /* Skin depth in mils */ gfloat fc10; /* Cutoff frequency for TE10 mode */ } rectwaveguide; gfloat kval (rectwaveguide *); gfloat kc (rectwaveguide *, int, int); gfloat fc (rectwaveguide *, int, int); gfloat alphac (rectwaveguide *); gfloat alphac_cutoff (rectwaveguide *); gfloat alphad (rectwaveguide *); void get_rectwaveguide_sub (trans_win *, rectwaveguide *); void get_rectwaveguide_comp (trans_win *, rectwaveguide *); void get_rectwaveguide_phys (trans_win *, rectwaveguide *); void get_rectwaveguide_elec (trans_win *, rectwaveguide *); void analyze_rectwaveguide (GtkWidget *, trans_win *); void synthesize_rectwaveguide (GtkWidget *, trans_win *); void fixwidth (GtkWidget *, trans_win *); void fixheight (GtkWidget *, trans_win *); void rectwaveguide_win (GtkWidget *); extern void setup_transgui (int, GtkWidget *, trans_win *); extern void setup_transgui (int, GtkWidget *, trans_win *); extern void setstatus (GtkWidget *, trans_win *); extern void error_mes (gchar *); extern gint getunit (gchar *); #endif ����������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/coax.h���������������������������������������������������������������������������0000644�0001750�0001750�00000004274�07314675555�011013� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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 __COAX_H #define __COAX_H #include "transcalc.h" #include "units.h" #include "convert.h" typedef struct _coax { gfloat er; /* dielectric constant */ gfloat mur; /* rel. permeability */ gfloat tand; /* Dielectric Loss Tangent */ gfloat sigma; /* Conductivity of the metal */ gfloat f; /* Frequency of operation */ gfloat din; /* Inner diameter of cable */ gfloat dout; /* Outer diameter of cable */ gfloat l; /* Length of cable */ gfloat Z0; /* characteristic impedance */ gfloat ang_l; /* Electrical length in angle */ gfloat er_eff; /* Effective dielectric constant */ gfloat atten_dielectric; /* Loss in dielectric (dB) */ gfloat atten_cond; /* Loss in conductors (dB) */ gfloat fc; /* Cutoff frequency for higher order modes */ } coax; void get_coax_sub (trans_win *, coax *); void get_coax_comp (trans_win *, coax *); void get_coax_phys (trans_win *, coax *); void get_coax_elec (trans_win *, coax *); void fixdin (GtkWidget *, trans_win *); void fixdout (GtkWidget *, trans_win *); gfloat alphad_coax (coax *); gfloat alphac_coax (coax *); void analyze_coax (GtkWidget *, trans_win *); void synthesize_coax (GtkWidget *, trans_win *); void coax_win (GtkWidget *); extern void setup_transgui (int, GtkWidget *, trans_win *); extern void setstatus (GtkWidget *, trans_win *); #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/src/convert.h������������������������������������������������������������������������0000644�0001750�0001750�00000003626�07310030503�011507� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* * units.h */ #ifndef __CONVERT_H #define __CONVERT_H #include <math.h> #ifndef M_PI #define M_PI 3.14159265358979323846 /* pi */ #endif #ifndef M_E #define M_E 2.7182818284590452354 /* e */ #endif static gfloat conv_length[7][7] = { { 1.0, 2.54e-3, 2.54e-2, 2.54e-5, 25.4, 1.e-3, 1./12000}, {1./2.54e-3, 1.0, 10.0, 1.e-2, 1.e4, 1./2.54, 1./30.48}, {1./2.54e-2, 1./10., 1.0, 1.e-3, 1.e3, 1./25.4, 1./304.8}, {1./2.54e-5, 1.e2, 1.e3, 1.0, 1.e6, 1./2.54e-2, 1./0.3048}, {1./25.4, 1.e-4, 1.e-3, 1.e-6, 1.0, 1./2.54e4, 1./3.048e5}, {1.e3, 2.54, 25.4, 2.54e-2, 2.54e4, 1.0, 1./12.}, {1.2e4, 30.48, 304.8, 0.3048, 3.048e5, 12.0, 1.0} }; static gfloat conv_freq[4][4] = { { 1.0, 1.e9, 1.e6, 1.e3}, { 1.e-9, 1.0, 1.e-3, 1.e-6}, { 1.e-6, 1.e3, 1.0, 1.e-3}, { 1.e-3, 1.e6, 1.e3, 1.0} }; static gfloat conv_res[2][2] = { {1.0, 1.e-3}, {1.e3, 1.0} }; static gfloat conv_ang[2][2] = { {1.0, M_PI/180.0}, {180.0/M_PI, 1.0} }; #endif ����������������������������������������������������������������������������������������������������������transcalc-0.14/src/callback_general.h���������������������������������������������������������������0000644�0001750�0001750�00000001676�07514544004�013277� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> 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. */ /* callback_general.h */ #ifndef __CALLBACK_GENERAL_H #define __CALLBACK_GENERAL_H extern char *get_save_filename (void); extern gint trc_file_save (FILE *, short); extern short transtype_int (void); #endif ������������������������������������������������������������������transcalc-0.14/src/fnmatch.h������������������������������������������������������������������������0000644�0001750�0001750�00000004547�07520053027�011463� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _FNMATCH_H #define _FNMATCH_H 1 #ifdef __cplusplus extern "C" { #endif #if defined (__cplusplus) || (defined (__STDC__) && __STDC__) #undef __P #define __P(args) args #else /* Not C++ or ANSI C. */ #undef __P #define __P(args) () /* We can get away without defining `const' here only because in this file it is used only inside the prototype for `fnmatch', which is elided in non-ANSI C where `const' is problematical. */ #endif /* C++ or ANSI C. */ /* We #undef these before defining them because some losing systems (HP-UX A.08.07 for example) define these in <unistd.h>. */ #undef FNM_PATHNAME #undef FNM_NOESCAPE #undef FNM_PERIOD /* Bits set in the FLAGS argument to `fnmatch'. */ #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) #define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ #endif /* Value returned by `fnmatch' if STRING does not match PATTERN. */ #define FNM_NOMATCH 1 /* Match STRING against the filename pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ extern int fnmatch __P ((const char *__pattern, const char *__string, int __flags)); #ifdef __cplusplus } #endif #endif /* fnmatch.h */ ���������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/images/������������������������������������������������������������������������������0000777�0001750�0001750�00000000000�07715600454�010432� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/images/Makefile.am�������������������������������������������������������������������0000644�0001750�0001750�00000000325�07514544741�012405� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������imagedir = $(datadir)/transcalc/images/ IMAGES = \ microstrip.jpg \ rectwaveguide.jpg \ coax.jpg \ c_microstrip.jpg image_DATA = $(IMAGES) EXTRA_DIST = $(IMAGES) CLEANFILES = *~ DISTCLEANFILES = .deps/*.P �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/images/Makefile.in�������������������������������������������������������������������0000644�0001750�0001750�00000013227�07715577462�012434� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated automatically by automake 1.4-p4 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@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ DATADIRNAME = @DATADIRNAME@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LIB = @LIB@ LN_S = @LN_S@ LTLIB = @LTLIB@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ PACKAGE = @PACKAGE@ PATHSEP = @PATHSEP@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ ms_librarian = @ms_librarian@ imagedir = $(datadir)/transcalc/images/ IMAGES = microstrip.jpg rectwaveguide.jpg coax.jpg c_microstrip.jpg image_DATA = $(IMAGES) EXTRA_DIST = $(IMAGES) CLEANFILES = *~ DISTCLEANFILES = .deps/*.P mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DATA = $(image_DATA) DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps images/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status install-imageDATA: $(image_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(imagedir) @list='$(image_DATA)'; for p in $$list; do \ if test -f $(srcdir)/$$p; then \ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(imagedir)/$$p"; \ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(imagedir)/$$p; \ else if test -f $$p; then \ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(imagedir)/$$p"; \ $(INSTALL_DATA) $$p $(DESTDIR)$(imagedir)/$$p; \ fi; fi; \ done uninstall-imageDATA: @$(NORMAL_UNINSTALL) list='$(image_DATA)'; for p in $$list; do \ rm -f $(DESTDIR)$(imagedir)/$$p; \ done tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = images distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-imageDATA install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-imageDATA uninstall: uninstall-am all-am: Makefile $(DATA) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(imagedir) mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am distclean: distclean-am maintainer-clean-am: 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-am .PHONY: uninstall-imageDATA install-imageDATA 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 \ 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: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/images/microstrip.jpg����������������������������������������������������������������0000644�0001750�0001750�00000024561�07310030503�013232� ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������JFIF��P�P���C�    $.' ",#(7),01444'9=82<.342�C  2!!22222222222222222222222222222222222222222222222222���"������������ ����}�!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������� ���w�!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz� ��?�{Ե?_XAiֶ}ʖ[$2K#ڧz�z,�? �ѷuP?��C�~lGOe�Q@�#ڧz�z??s?͗�#AE�s�j9��{T�\�6_]�=ߛ/GS=s=tP?��C�~lGOe�Q@�#ڧz�z??s?͗�#AE�s�j9��{T�\�6_]�=ߛ/GS=s=tP?��C�~lGOe�Q@�#ڧz�z??s?͗�#AE�s�j9��{T�\�6_]�=ߛ/G/3Ŀ |CoYAG58R]h|ʓy� ��*?-�{=gV6 �? �ѷuPEPEPEPEPEPK.˞]gj;*t .!P%)$MT9AA V%8!yc5, rI'B-8!onlE:aDl.#pb9IE;(Qh6u輛{u7~ӦzhTrk[,{zdy1<`vueRDhF>$ rQM:Q|Q-R02%C!P JvJ֍O&6҄mk׾�sT�zYBcֳ\ްlвfR r22{g!|Rp?@}y# H5fӖ)y(KJ\x7U_,s `` q\1U, 4Qgw8UI=(2WCBJ5I4h}R{2y"mB:!0IUTefQE2B`� �F_Ow=?Q�h�? �ѷuW?g�%Y�U ( ( ( ( (eTmdh#b(pG8{3ʏ%v.2|Q;mo).# 2 [t[}:$UL y<Q C kQTDU�>SJ\szvwvQLz8InN$YG{ tVGF,R <Oԫ^A $M}OSoou {`wcdkq�feVŗOJKۘeb|#򢑉�igj'ʓ rj%5/uTU{;a.%Aa<dA Yci8Rp$z wVOL_K-ԟc:>Ʒ@#< {isTevOȸIaeT.h#`0G"I{5*7ι*F{ ;ww'I�I$��拫lylkI'��9$�Hkk5_ߦ?g"�F2qA# Us=Ђ4}E¾`� �F_Ow=?Q�h�? �ѷuW?g�%Y�U ( ( ( (kiwwy"Fp8i_[Y}�"k..#ɷlDqR>yg 9!QG) 1qFQaT��t(qQaNqolncs`r762� ̪Ƨʷ:Em̓58�32f6o7%vvN'j$ 3Lqq7u wc;QW'dkrqIfff<[oqsA*92<G*9 'THU I�;Е@sH3z$g�@)A)Z"';%n*9̺~JX&,o$2FUajKOOL$J9YeS ~ >s|:{$zk$GpɀN2IV�$,=<t*;ww'I�I$��H6P�`  A&n6ȹ=A1  �J_+ZIw'RJyek1anK 8,ρNxg yBxcf[m pdλ,o/ EFv" II0#PԠ|8.m�.߾4U;cezQ:oLerJ*zN ¾`� �F_Ow=?Q�i{=gV6 �? �ѷuPEPEPE,j=lRfqyQdnކdz$R[C5b4a۴.�%c sZqE0ƱDAP8�Si=XQ8g俤aNqolncs`r762� ̪Ƨʷ:Em̓58�32f6o7%vvN'j$L>\MBU\dY(+h$yR(bRI#TP2I'�BW�O<VI<PĥF dO�޲]jx/"xba%U*ACxf# ]jx/"xba%U*ACxf#٭Z/�-«_R^ΐ[298ܒ@$Ee-C/#=$�:@Lu_Zekl;jj%| cVVS+EKߛWenoF/?r֙ߎdI--6ӝWkDC JlJ O/{Ucl`Y-36d)dl9$5hWXK$|#4lNI8 !+|ZYWI4n-{QEbHQE�Ww=?Q�k��*?-�{=gV6 �? �ѷuPE լ76FH A VVw־&үgV[i9N7,܎KcNoķZ|K닫+;9br(y%AO YJ]wPVi9%s9tKUko|ɪL4vK8g#dt=G͒1E0ƱDAP8�S-a5b!Ʃc؃*'5Z]YRiW ?VPȷ v1ٰvF�fUcS[B"6fnld�U3Lqq7u wc;QW'dkrqIfff04ϰ}P+v3rvF;W'$ffm *9 'THU I�;Е@O<1)y$($�w Z;Ȟ+Iki"g`rʧA| Z;Ȟ+Iki"g`rʧA|kvpe pN�$�I�Q}kYKy{:Ao�drI�p&]Zhgm:`2A%c d24TEV^Jn=�OP5/D=[i% -C^B +` ;ku+cscY%9$I$I4ZZCck11,ĒĜI$I$gRh*UsJ+e0ym"h%BG"WR0A%a<Ķ62"b#C>*>?FM/t[}FI `<he(d 6:m"8P%��8�1]%�QE��%O�T6Z~`� �F@�g�%Y�U?(z?mt�QEjMi-[\v0ʘ`8;P`x*9 ѬqFm%Q I,?&Dr|a0b=)Ypw|#qwtc#$A A氂mO{*TN(ޫ۶j?VPȷ v1ٰvF�fUlvm"I>٪]xAte1AsƎ}͸: ]5ڹ8$33l:ppvian.&NqqrWngj*rvN2I,TsO<1)y$($�wDm*E J^I$`I$�*%֧'&ZHYyD?wo2%֧'&ZHYyD?wo=ݿe/"*e-C/#=$�:@iXM}}:m wn݀�rI$�$&9NJHb[mkgWJ<:XRQ3Cߞ]E~z45/D=[i% -C^B +` ;ku+cscY%9$I$I4}:;[XS$ʼn$rY$$I$jMZΥU*Þyۉlle>'1DZF ,9}U~}&A<k$:|NcXr9 - +{x$qơU ���8A VG  HB(��q=MpK<,0B<c@Hr��@y�%F�U�O K],M=ldA_)ZFGSd8GԃYZn^ET|GC�?h(z�Ѳ�Ca�n렮~J�`w]�W:mقH[?T 㞝*#?T��j*\bFV ѓK>L1}DʪU\w;8$t;G=*X 8fIVmD0`Re#ZQ<Uvpɧ\WnKf́-LHGGBJtF.mrSg;dˆ H 9 �V.Iz}#2=Փ`-mu 2]p(V#񶺢#;.Ymy׿ּm*E J^I$`I$�*%֧'&ZHYyD?wo<-NM\N9pyF\�T6]{>֛V5 M*k hWsv�I �9$94ja5+ݻv�$�@&Π<V$3cdeAV];+H[X EKߩ_yFis+wz)|uI Rc Sl5GGVS+ A&llm8mcL $K31f$XI$IN?.�bI$3bI%$I$SZd ^t(mv[dOww1VC A!w_sEO<Ķ62"b#C>*>b!($ qUE��8�1DCkoQH8P��p�bjzlrU<7 I�M!۲ OTҭY^WA ScԀ0I Gaaqk濼\$2�VKh�w%ǍF6p!Y-#,VW;H8A VG  HB(��qvW�/'\'5A VG  HB(��qܲOm"ii%wsbPI=M\/#Ӵ۫镚+h^g2($=�k6τ,ΒK9<]#\x\NK/QBu5ɝ=QZ_0~P�G�e;J�`�lPXۺ+��*�FA@ne<6S1lyp4aF?T\?�j*Zo*F* �F4R]; QcBg-y`}㡫qjL�dy-8`Mrk?|mOp6s~::Μv2pu35K{_L>Tzj˶bv`:i*r2mk?j:g/W2ng0.D0Sn1/|V/.u AIl@ɕHޘ :Gn^_jW#VYi!xc ycڲ.H 2_#;IVFi>8k7Qm6\;2U�RF⍴pȝr(̷e )Q.Y`TPocѶnn�+quۺ*HJ<v[>muM]<Kαo$E!'@8W]3EAĽ]:;[]kK�ޣI%,ĒKI$I46?asR(l3c*~ۀmf?�['�jQL霰#ݒ[]Si� O=�dGC�AM/�sr[ mZ;(Y28H*N y?go�}'TN^^,o&@>T'9n}C-"ŭVΑ  H%TP0���8iݭVD0D#=-Q@� �bjwzΕlϫieqli�`@vKƩa� c[Y&]^vQ E 2 :Mq1(X֬)WT1G$g}_+t` t7~9׶1[Yz d -,>.U _piݭVD0D#=-Q@� �brFK SWHx[:D0D#;Q@��'%>���g4�?)�O?\o9}� ĞmkI)FU W; oH|t ǹC;0u?)�O?Tt{_]m+-WN6W~ `A <=85>b~[wz4o/Siֵd?�['�j.]Ş}hVn�;� ��*?-}?_0~P�G�e0=J�`w[X D 7z=gV6UKN,n _]eʤoמ𩓲j[MZ)3)*r2 }AqOo gW^od]Od�?�['�NΌcRPJ_2}ͅش\41(%b>Y6nLBE $?ǧZ֢ v DԔ5׻xTV\(-$1:č[r6�>WNeN�g-o\Gꨱ.]dR+ �LnWt[Ğ[ۈ;(9㸺H7X!pePHG1H²G\_nDx BeeVIv�ʦ!/iOnz8Woŕ䚮3ن .�Rp`��= }F;Y<_ H pU A*rikq=Wf}EX$8=VLB#޸mcd9K6q-C;ȘHᡅ ʯϹ؂mmⷷ8`GjQ@��Qoop8*��ڞo[,"e<;cM�`@ni6S-esPBliX H�h>5mB+0|i@rK[@w̓!|*<FQjYCJ�CZ۸~d %Qz$q IH(UE @a[QN+N5A8-d(R4P0Er7p(=Ů{qgu<1-’\�9mFdy2>;]d[E  �kY8; `OyE/?yEVWw=?Q�k��*?-�{=gV6 �? �ѷuPEPEPEP\|# jV_,\vܤn: h@�vR]t%$iJ%(\/Zfr^-|lΡw4^0T<'�aY?xf?!6GR@cL8HP x>خ[n>kӢg ْ5e$ ~\:Ǭz5*v�wڞo[,"e<;cM�`@IPi! F佼1_fI8a$x\Q}k]4 #r^ $0<. +8bHEHB(P:�; rjqZ*MaӂOw#8bHEHB(P:�; uW1Š( ifNhܥ8v=zqgCk2xKio6G,1a_άZ"H.Vxè=3::^QEe]Rd[E  �kG"��q�ipBj@�ABNdT76[k袊�?h(z�Ѳ�%O�T6Z�?(z?mt�Ca�n렠(((({vza[92,G]S�,<m d騪x vqE*FQFSQE�QE�QE�QE�QE��%O�T6Z~`� �F@�g�%Y�U;%ֳ&iZto*ڬ 92B;Tj9��GOe�=ߛ/G�?s?͗�#��C�~l: +�{T�\�6_G#ڧz�z�(S=s=j9��GOe�=ߛ/G�?s?͗�#��C�~l: +�{T�\�6_G#ڧz�z�(S=s=j9��GOe�=ߛ/G�?s?͗�#��C�~l: +�{T�\�6_G#ڧz�z�+;J�`�l�j9�''ڌw潮]G_ux@I Xt�����������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/images/rectwaveguide.jpg�������������������������������������������������������������0000644�0001750�0001750�00000017572�07310030503�013701� ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������JFIF��P�P���C�    $.' ",#(7),01444'9=82<.342�C  2!!22222222222222222222222222222222222222222222222222���"������������ ����}�!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������� ���w�!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz� ��?�8 uw_U&c[VBh$$!f$Ү=ߛ/Ggc�+Z(�{T�\�6_G#ڧz�z(S=s=j9�렢9�GOe�=ߛ/G��?s?͗�#��C�~l (�{T�\�6_G#ڧz�z(S=s=j9�렢9�GOe�=ߛ/G��?s?͗�#��C�~l (�{T�\�6_G#ڧz�z(S=s=j9�렢9�GOe�=ߛ/G��?s?͗�#o~ӯY^3PXat_aL-O#v�sş�Hh�<Y�aX�ֺ =�!V?" ( ( ( ( ( (OSoou {`wcdkq�feV�Т༾n"֮#|yj�T듴8s1ߵܠ((((�sş�Hkgc�+Z�<=�!V?"�sş�Hk((((+?S[B"6fnld�U OSoou {`wcdkq�feV43>mi.0n.J݌E\NI%4ϰ}P+v3rvF;W'$ffm �x!(T)$r(eu#x 1XO6qM;KXFa$·ϵܨym"h%BG"WR0A%hWXK$|#4lNI8 !+|Z]�(�(�(�+<Y�aX�ֺ =�!V?"gc�+Z+<Y�aX�ֺ �(�(�(�(=O>U?i.2-m݌nvlF@X�?VPȷ v1ٰvF�fUcL>\MBU\dY3Lqq7u wc;QW'dkrqIfffР((ym"h%BG"WR0AhWXK$|#4lNI8 !+|Z]ʎx!(T)$r(eu#x 1@QXpO6qM;KXFa$·ϵܠ((�sş�Hkgc�+Z�<=�!V?"�sş�Hk+߆)-M6I,Pڡf%$95-ӧ9_{UYzG芒20<d7A2MG,l-P2 >+Xmek󃸮-,+ewW97wiB^X,V٣aϳy<7ȓߜmv/^+FV{{^,Xg+2--OSoou {`wcdkq�feVqm+SbMn򶿏?VPȷ v1ٰvF�fUcL>\MBU\dY3Lqq7u wc;QW'dkrqIfffЫ9Š((((ym"h%BG"WR0A[Y^iQ<66C=-<2`,ԃ/���os�Z"E8ʰ2=E�ΎˊY4FF or,#)_Rw.p (\�9 �VW?x±���?+ZA\�9 �VP7WVVqwq&7I+U<u VO!)HbpFSzT>;>͝ϖDv5;_[LŮg x6=b…?Wrҷɿ֘G#FFېS2= BiaNqolncs`r762� ̪bv*jcNbҭnuی|F#`gi0JF 3*3Lqq7u wc;QW'dkrqIfff43>mi.0n.J݌E\NI%BIlT)[ES$(�(�(�+��8�?�O�_�ӏ�s�?(z?mhjz|{x~Ө\d[ۻ;#\̓3*ian.&NqqrWngj*rvN2I,e9xfdE**A襓K-ni-$`.rO9 {+Ÿ+gk)J n''�Mftiԭ?c_|Βt{k]jh0um$\a߹N.ʭ?g+^¹�sş�Hkgc�+Z0<Y�aX�֯jWVz%.1,O�Vv�?+ZAI ([wWs\xgTx'|aX`Mk#~|3~o$S.GGV|OEG&GG֗#ȭ{�#'^S[WRDn5wEkh7pvrv0Cu[X9/RHPmAi[楴RX[6qZB�*AVS � V+ x 69p0�HC=egլd/ RHee8*  QE�QE�QE���b��F�?/���os�[PY*7;6#s` �ʬjz|{x~Ө\d[ۻ;#\̓3*ian.&NqqrWngj*rvN2I,}͸: ]5ڹ8$33hQUo#;;l(^WG�$ nÌ\Gij^Eκm0FB<re ku;u']If"I[''!$<YȳWu)bg-XN�U[Ջ59t=xRo=KsUUQU` _:q;2U yktV瞦\zs�?+ZA\�9 �Vsş�Hj\:XXK�זc9Q{x±�tpWѓ�/K�bi鶷:rs L �Fq^i2z̓kI#6՘Ƴ]}Zv:Hȟ/jǙNKO=J/>i%ٿ52�W+q ]V[o:e226B(|GsC2VAK,kk#GiCr81GCٜ}T|)fLQkUcOf(WJ R V8ZDe�C4aycu2~º%ͭê~Ng<*#1 ,rĀ,R9  .mnq9HFeF$Fz=SN�7Q{IѰC)A0 }F;Y<_ H pU A*qsC}]PO?y'3cN9X@)al㺵̅*T XAR@",QE�W?�#_�q��\�֟5�ؿ��ѿoA@gz|{x~Ө\d[ۻ;#\̓3*aNqolncs`r762� ̪ƙ}͸: ]5ڹ8$33�f6o7%vvN'j$jHz,8#F(ßFR? |9� ɿ�JecEi}�#Z,?lYLa'j$d8p15D&EP (�gc�+Z+<Y�aX�րsş�Hkgc�+Z(;]ѭA\iwo*A> 1GP;W+].8-mk:\\4Q�*nU|6y�d`A�CE�?Z2u= X*i̝^_9]oZ{, ^xz$5T'#i*{-'X{-ŹbAAAO4}_Ktn#=# ؁\+k%iݖf]=�FFN"9dyR'x\N򺮴i>}lom9-n!| VA�N+'\;?s4 IHK $^Q?2 1R + `@! <�C4aycu2~º%ͭê~Ng<*#1 ,rĀ,R9  .mnq9HFeF$Fz=SN�7Q{IѰC)AQO2R$2`AHA���8�?�y{_xq<7rwȻdI)|$d$,r2Eu JAPAP>=O>U?i.2-m݌nvlF@X?VPȷ v1ٰvF�fUcL>\MBU\dY 3Lqq7u wc;QW'dkrqIfffТGewVwvQ*^ ��I @݇;"suơC=WȲE%WH(=ua-y"ۊF>H:I$ (R5=piI|_]ʖ7vue#9ۧ:պ(wJטQE ( =�!V?"�sş�Hh�<Y�aX�ֺ =�!V?" dQG) 1qFQaT��t( (2�`#�_<w<yicceMUfR46@# S;jꊝ5?]}FK[_H 0U�@ +k ė6$jp2D� #=6ZMdXι]#GfV;1i H*PH`r4M5sT5}<7_{yc R6 U 8 s]u6p6l.48At�d,x`+mC1㐾<?"X/5Gm>gl2n@̈}͸: ]5ڹ8$33 \!7u�CZ¶^]E T<ƨKNru:kkM6>m dg ��O�L hksF/#pقXc8&E^Fʴh}==;mtJ׉tmQyژ8nv@;g(&YȳWu)bg-XN�U^ Zcr}PhYXo۝vuj)9sMXC B^ >m5}/]Q[pQE�QE�QE�W?x±�t{C,�Ek@9 �VW?x±�t�QE�QE�U{ ]Nk+{ik#y^;(CȢe~TzO8�I�.72ߡ<gh.>ՠ1(*Bx8T-]1e{])Bv&{p2U,Y+޺NR3ہ,@'�*��'�H�W_߈K&ۼލ�7+}j(<Ьձ^iY'ʼ(V謚FX&1[JwhEer>e瑙֓o(X'FpAAyyYq#J�1>[_lQE2B(((�sş�Hkgc�+Z�<=�!V?"�sş�Hk((b̳ʪU\@>h>;Q@?x{:_-�V<o�d+DmIbٿti23|z�IV֯RAխ\Q"2+~VsO5Kpۦx NX4bWc%�eg((�(�(�(�+<Y�aX�ֺ =�!V?"gc�+Z+ZU6 No0+E@J"v㰨� �\��� �\��/~��(/~�? �\��� �\��/~��(/~�? �\��� �\��/~��(/~�? �\��� �\��/~��(/~�? �\��� �\��/~��(/~�? �\��� �\��/~��+<Y�aX�֏Ct?{{�ǫCIlHg�HΙ繒wwک37E{P��������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/images/coax.jpg����������������������������������������������������������������������0000644�0001750�0001750�00000021516�07314675555�012020� ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������JFIF��P�P���C�    $.' ",#(7),01444'9=82<.342�C  2!!22222222222222222222222222222222222222222222222222���"������������ ����}�!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������� ���w�!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz� ��?�{Ե?_XAiֶ}ʖ[$2K#ڧz�z,�? �ѷuP?��C�~lGOe�Q@�#ڧz�z??s?͗�#AE�s�j9��{T�\�6_]�=ߛ/GS=s=tP?��C�~lGOe�Q@�#ڧz�z??s?͗�#AE�s�j9��{T�\�6_]�=ߛ/GS=s=tP?��C�~lGOe�Q@�#ڧz�z??s?͗�#AE�s�j9��{T�\�6_]�=ߛ/G/3Ŀ |CoYAG58R]h|ʓy� ��*?-�{=gV6 �? �ѷuPEPEPEPEPEPEPEPEORԡ-IIdp[y$"@$��r4Ph(#[:dlč2l 9*ck=C]NcVӒc<�: +Y7j.ȅa,c|+n WD' T20ؠ(`� �F_Ow=?Q�h�? �ѷuW?g�%Y�U ( ( ( ( ( ( (OSoou {`wcdkq�feV�5=O>U?i.2-m݌nvlF@X4ϰ}P+v3rvF;W'$ffcL>\MBU\dYe^w2/MA2;"VKĴ3/]w-xOEAq6[m LP90 0yzv I)@Hr',�g�lIsDJdaw!+nt6iӝV_nC}coku U Eg~++<۽6e(Qdc= 7ۊC=o̞l I9@2z?(z?me%f0I΂( ?h(z�Ѳ�%O�T6Z�?(z?mt�Ca�n렠(((((+?S[B"6fnld�U OSoou {`wcdkq�feV43>mi.0n.J݌E\NI%4ϰ}P+v3rvF;W'$ffkh_f y@' Ol=pqI.YEWe K{z�̷*(m<̎I$l�KNMl$B B$ )!rO6M[X{RaUh年#?M"+y8`vEA4QO"*r~jJ@!pđDTQt�vfZ_י**q>K:� E{҉䭪X@=v 0R;3O�_�ӏ�s�a/#k,Z9wqĩYOp 20N70Qn,QE+;J�`�l|GC�=J�`w]sPXۺ(�(�(�(�(�?VPȷ v1ٰvF�fU`S[B"6fnld�U3Lqq7u wc;QW'dkrqIfff43>mi.0n.J݌E\NI%KQihw|+3+\Q-Hd9U v6O`N Aii}Hm̸e#@$I&Kx~I)%lrI{ �0*ZwilZ6ByP6|F"B?yg 9; [8 s*6H pp %4)Ϩ68$$T*�_�ӏ�s���8�?�z 6^;B;2:6~G9 lW>$PgJ^,eP>`:) >c<gVj;pYb*IEE]-}:qu`r1gd%>2' kVr0pi}lv~e'<s H/6WzInFW$ -$eV4ܨ�r|GC�?h(z�Ѳ՜�Ca�n렮~J�`w]�QE�QE�QE�QY*7;6#s` �ʬ�jz|{x~Ө\d[ۻ;#\̓3*ian.&NqqrWngj*rvN2I,ƙ}͸: ]5ڹ8$33[D_j0lͳ*8\{d냎 &MAuG-^Kp8鹿=I�ܨG29${}��-98슓!UEԉ n,͞ rz'v,OSan*r3EKqE*FQFQNP)-GW?�#_�q��\�֟5�ؿ��ѿoAR@QEg]}m|(ϑ.:t_%v.}K,kk#GiCr81GCٜ}T|)Q C kQTDU�E0ƱDAP8�SKv;QL+;J�`�l|GC�=J�`w]sPXۺ(�;w}7 3t'2N�&۲&(QEg:Ֆbo/EDv=\�I�q):Iqv;;8QI ڊͱGt/L_ K5# np\QJTH.N1-Mr#|gpVB%?;s…U]{Ķ& 'l.%1Uj,JNU%VQ4mIBJ"kKCy,Cpn"h0²HݵW.vn$bM +/8;�nр hhVH#xI\mdž  YXu _kmjieTRzoOw !I<>s!S<峐BOYIURFL  AH*إgQYiqE*FQFV/���os�Z�b��F�?Aw Ig$Ҫ[@Q#~8QzY>�d�y�2Է$mc)uEUQ@Q@|GC�?h(z�Ѳ�Ca�n렮~J�`w]�QE�so6o#H �JW FaאHPpH9v -u;`Y]t#A-7DڜZF1 eHppk w�z0 Ewj_)/]|ݝmvPugwmEBp��$s>%t/oY^=9~S>ؙ` Wf7z9HSn[���44<+sF_E 'fYT9ǰs'[g2_b7t͹^Eg~uaw`Ep]lX@̾LvPo^$ &L]0Dq- YT Eq -ȹaޠl����^ u+{-Z_5ʳŨDQ!s,0t 9qk-vsgV֮g�RAww0EVS.-s TR9XzwR\ mbJ!q=z moxR�25kmm[XfmtERB[3nO/iLZ[K3({���*یanaVO:t0|'ZxΒX-rhu#̚Lg' T5�ؿ��ѿn`:\REjw{*J^[$u&< (eTmdh#b(pG8{3ʏ%v.4c9R+fRTd>cf-FI[r]˶ DN2ǩ5Q C kQTDU�>*5\.ʖ6syvu{!zU(~AES$(�+;J�`�l|GC�=J�`w]sPXۺycWUm8�4WEP{"1Q<� $�HE޲ߔ!N=lpު7,U]w|) t _vmMc~_ aeda:o|vr @ 5vPFgwm! 10�����vqBQݷ,/+,׀8����bNi.Hmy˫KoW2c'ζb�v0X g #Z)47S^$]ܨ8gP@+M eTmdh#b(pG8{3ʏ%Ú :]l`KTb ( Ф~x.lî[lcsʀ �9IRIm]C}AO*XvAa;YUC,4-*Ig-/83gMBwb*GI|]|^#9R+fRTd>e^iXK;¨I*լ`l} @��[|jFmI*^^  m%H cZj:n�}(Pga2 ?3yQdQG) 1qFQaT��tOޚ,t"-˹fw{jSv2J;- ( ( ( ( ��*?-}?_0~P�G�e��*�Fլ76FH A b�Ca�n렠i Z~h,ōmLY�0N]|S/VQwHnGFGF}N0Nj֕fX.pA@¼ b0 qRei-:= QZJV$^䑿{y",^w2M.AbfYd9y_f>�����;(J#3e~�����,VugߘV\ɪL4vK8g#dt=G͒ɪL4vK8g#dt=G͒1E0ƱDAP8�Qz_(!5(*" *�?=�`,�_'�K?W?Z>j]/*H�kidc ME]w?&՛~�nz5SKaմmBeXn#"ʅVTWG(IJg]Zmp F-�$�� ɣE \p�!'FpAAyyaiMM 1�q��bj\v (!EPEPEP_0~P�G�e;J�`�lPXۺ+��*�FA@oo$Y޺Rۃ,A�3,vqBQݷ,/+,׀8����bV~* ˖Y5IF6)qr pc8PY5IF6)qr pc8S pxso,. #0rdW�.s¨u:JO٫+ۭ۫QG) 1qFQaT��t˫Xo-7ޙ 0pq9&2zCuko{nvOtrulP ME�N��?) kZ5~N~_}J:`șdۜ8<gnSkau$xE�u# '� RԞu'qq; y! 9IT\-ky�]Cy}.xtmaw"KpAAyyD�>jv>jd�#9 Q�Vhqe:KC÷yX8*]j1Eyo~., 63JU@ܮA@95'w}?uNW"i-7om֝z/Ǥ].q̌*FqtA Z5ζq!T_%o0۬P`HqJg@# s^[k+; n#Ԗ_q\.E;TMƑi]]%i"]Up'{8'ciZ:TY-׀x iG,vP2Aj(M;XI-)4/ {*8stB s6lviJ8=/5Sf(<(�+;J�`�l|GC�=J�`w]sPXۺ(�]B!Kzc;~Rx80p5qN.dQG) 1qFQaT��txkK-0v`@vdds"RqRVkBթNj$ԗ^]:UUvZJeUw\ʌ�TԨnax'MѶ22A@ A�k?�TDh)m?%ޟZOַY_u.<dU' NNO;(!1Bݙ$rN8Ҳ�ejo~~1mf{y^^3{b pw+/=~7S?mV"p9E\m\Aqy%Is1@=kh�T'얿ey[ǙsͷnuQҭ亇P@c?ѲI8 ݓι(dzqSUӮ%,2T*ckGm#Xm@QxHkfMgu((�(�(�(�?h(z�Ѳ�%O�T6Z�?(z?mt.5KMoRӧ;yV`eue'͉9ڣ�{T�\�6_@�=ߛ/GS=s=�tW?��C�~lGOe�Q\�#ڧz�z??s?͗�#AU'Ҵȯ.,-f\B郑##�{T�\�6_G#ڧz�zM'QctE+81$}Zdv^UIE�؜|>UzJ�{T�\�6_G#ڧz�zv3ns(YcWP0 =>�GOe�=ߛ/GWtW?��C�~lGOe�Q\�#ڧz�z??s?͗�#AEs�j9��{T�\�6_@�=ߛ/GS=s=�tW?��C�~lGOe�Ww=?Q�k�?s?͗�#^Þ [-޷x#KX$ �9 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/images/c_microstrip.jpg��������������������������������������������������������������0000644�0001750�0001750�00000030413�07514036330�013537� ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������JFIF�������C�    $.' ",#(7),01444'9=82<.342�C  2!!22222222222222222222222222222222222222222222222222���"������������ ����}�!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������� ���w�!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz� ��?� nSny}Iuu3�n^ ѩc.I=+c/~�< �$_ �K]�s��Q�n�?ZotP?�n�?Zo�WAE�s��Q�n�?ZotP?�n�?Zo�WAE�s��TW^ Q mް7 8 pGKEN)c.̊YnޝO7!c �Ufk8,QϩK!ɖ3#1X !X[bJqo'<[}n) JfӤUH'� u7�n�?Zo�WAEQ��ֹ�=UZ<wIqJ]!%A88*Xo- tmA 9#@#N -1 �\��/~�Ͱ) |/đ|^˘ Sh�O FT�WeS {b0p*W^i�{�!_k=��ֹ�=WnԮiɝM231�Rw2�js��Q�n�?ZotS � �\��)]ڮdMFfc5W?x±���yZ�襮�<RA@Q@Q@Q@Q@TԮḟ7f;t ��I�%Ƹ$p�I �9$9mͷPL_<-usU#ZqIse&7]Nf<E3M(Ä8E+pN8$j-Mo2I;\9!$ +^xmm常8` $Q@$�<ME}}8U*09YS gX`SJةժ+KD%w]ѶK*אx bI <pr,J0n2J�<*t0[\$6UeYr8܌UM7mg{-EdKf&)xʟ a֯c W+ubbۓqć8{?�OrƳB1`IG*>`9S|߱֝:jw7׷_{}hV} e7AZcm|G crIU5w^_QYַSjW qn4&€_Fw"ppv{_W?x±�t{C,�EkL' *�E-tI熿k� �(�(�(�)ȰbD,d9MrM*eb9ԓ.Qpֶ\%ms{l c'$8�^73ݞxmm常8` $Q@$�<qq,pI*I<�9x ])!q%U`rLAHڱ X'77w� A6qRCKK9THfO 7ϵbܢ]jy,xbclUEAqyUc ']jy,xbclUEAqyUcG˱6YclK<�B)@AVUe[ADC8*��jճ\%kt:v2 =ۖݷ9)܍3 ռߟl[m=wFh;t,|l�Y2`{ؒkb*[HD)$eDqJQ~ V"*M~v:2Yw�6w4U/Qw| 2tޙ$UܱG</ ѬH]eX P4ԋM[O12۔f5^ٛ=Z[m^8>}EeHmARZ7*>ޜr^!$6 RE  q*t@`U5;=cTMmsD @/]R8�\��<K[CLo/~9B1?H&кsJX;ߗͮ?Ŷx6OYYfԿ+( H ]<Iaup2sh{ 2W?x±�t{C,�EkT`�yZ�襮�<RA@Q@Q@ 6v<5N $�I�$6wHFH-Ԝp3n*خGы\jd3>7]̋$R[eyԍ҃чP+zyᵷX$/$0UE$x�sDko-ıH^I$`I$�mv+複OĖrV2A#?wojģUkZ7*O�ak__E$:|N$JVi8)3|V-+y֧W&1]Y4Q0xww_&=aoC yu䳳ⱉwWqVv L9WɏV"8 "% qUE��8�AVG$Pġ#5 `��ڤ9ݎ AFM& #_C!4L\Q5i6XGIYe2"%t|)8<;n$ʒXDcB{gbn'�*Ta<y/}yz1稽W~<)8<;n$ʒXDcB{gbn'�*�孢�Q x2Jzy,FUQrAQ7VEJ$E `+s-9rr쒱 krUv xIS {7fxMe%,4ˍ~IrF\J��#8  AZ?/_)Ut4wQ�?Fa|DB+?7搕\"K:/9b-eWha{5btQ> wk* ;`n g9Υ;N8Y+91<n$l|єmZTyoM~K�?ǡ*E&=m"aC"V?y O@K6?l̷.`ystqp61nG*N6+{C,�Ek]s�?+Z?xkV)kO<5�`_PECuۺ[MI6�zpAX}̊Xp&v8e<nCb0 ص̺_[B՝ݶEc/+ ׂy�H�G$yys07HO_SJgDY-կ>!�m`gO,q ΜV (U/uo?ԖKԤI>LQ)3> ]:*lݞxmm常8` $Q@$�<qq,pI*I<�9x ])!q%U`rLAHڱRV0AWI-,R#e< F~ >Ջrƞyu䳳ⱉwWqVv L9WɏHCЀyu䳳ⱉwWqVv L9WɏV"8 "% qUE��8�AVG$Pġ#5 `��ڤ9ݎ <[mHGީ,܇) l 4eZ@Bݒbۓ.D"̶ Hg!M&10JxW–L@@6GK>H�*T#2U'=n#A)WE6Bu #X Y @8hs`* �D(''ynrr擻 �_�?gs�Z�`?/�3�ܭ/ni1H#/ t'*HXRHꑢgcu$jמ2:eY,ٶ|27EX -aɾ{+wy߱*.+wu:}*izM$\tr$Pk#%C?ƾZvZ vn"fąb c 9/]VF3;`�bbK1$~œ%z~Ռ鿇]TaZT:uhp&iU?u \.rMnUKyr'wL3*Íp2 "[Y&"nCǼ0d @MyFubE˷mw5s�?+ZA\�9 �VFO'�UZ+' *�E-t�UKyr'wL3*Íp2 "Q0FW7miQ8s<qq,pI*I<�90=vrZ#Hn@Xm 0$t .W>L6\iY HGT~cmU=n.ݶ}&n"HtIig*i)pR3xf[V4˭O%Lc8ha >*>L{Bއ8O<YX;ث;&ǫ[ADC8*��j +h#(bPTP0��RSaq*ׯnLnȋ24&Q#ϵ@6;<@8*x^24O",o,ЙD>qیPo-mۤ +zb(K8MA �PpU'=Rٿh.zW^¾g/|Q>]Y 2@U::(9S9e)MI݅a��`?/�3�?f���\�V��7 l$1<h(I=Hꑢgcu$ڝ-B; ?.fU>Iʠ1cLe VoF�]{ ujXvh2.M6U@7bc4Dk{4oH,ZIoǖc���FgY7$ifF-$7wc1���/WAZ+eZpV|ߟ�ȫ�b��E?]eZpn˩H &;h#͓d.A�Ә5(o[VI;dwR ( �U������t�W?x±�t{C,�Ek@?xkV)kO<5�`_PEP?'%�Uj}c�,Ry:T90?ٙUNW? a'%�Uj)5r'ta{w>JYВ9671^Lwe؂"HBGjQ@��p:uo&EIV)&{RDKS}gp ~�ti/EL9á\ wV(ΓU;vvtGX׮#'i4y\=M$r:a e@>^6+1;B$^!OK t~tN姐)&J8݆'ɵ [h6+C ޘg$F!s�FPH�*s^EQj_-mۤ +zb(K8MA �W)˚N7'v�#7���_�?gs�[Z�_h)Hꑢgcu$I"C+FYԓW]j>.!/^C*Iw1i?+g E >VoF�_jZl, `ꗐʪ&enO>Wehz%[٣~FidbM#}v<>�0��4{=m,т.ŞFf=N ��~z4~U5h�[V^L 2c<0AA 9RԦKtՎ]JD1FIl @Ar�462ݣI=Ĥ' � ���� �æ[q#'$w �����U@ko-ıH^I$`I$�0� ; _[5tx+ = -BDl7p}Nm4¹�sş�Hkgc�+ZB<RA\�?xkV)k( #I")gm.*'n\ѵխx$o-%#|$4$&u*!+ִI<;:j:\XFV8 =6s'ue�!V�a tND.}y4CF5G{q0Q Ak-| @!!4Mi5ikuFRTGRi-_!Jtdד_9� h֖G/٥6Im+K pP1mHB�W9B)&s%ݜJYbrBIxܲA<7V\[J6 dGkRrwfr'vIX3�K�G�O���F?v›$ O,)fv8 ROaD$1<h(I=y棩]U}+O[soC090e;N:yd, ۷d>YFҢ+vw=U=mͼ +m8吰6 nݐT}v if9wv,6�1p(P��i:Ueh$1W˻c$`������]]O܆[/ԪS)]V^L 2c<0AA 9pԵ)t5cR@LvђG&8!P\�;7MLhi%G2Oq)I @8�����m$HI% <�]�g�����@P�<qq,pI*I<�9yᵷX$/$0UE$x�s^^iy bYbI# %ģx$ϖ&2jW7~BXXH q(  fo[4P efU<}�`���)?o_3%JRvE,4kJK! �|�dߦ�ׅjNӂbUů+<Y�aX�ֺ =�!V?"3<RA\�?xkV)k((#UχfPM9YhTڧ-lN vovZʒ1A G\:u2x_Kiq#,Soι {Dr _I;w$Nݴ}dQFX0T$ _}^'V~~Mo@G<uٱǦ]Jj)_04F*rȈ*-Ŗ]WU-ʸXh؁Fy` XʕDpےvۡkO–)kօX=|NPqYm1g=W3zmvbBTerqeܤLYsfkh^E<n_03I# 7$;�xwu,=: !]OC걩;GϧrWw,:ߌWҴ643c SK㧖B-vASNmiZ ir'�@����KIiZxoW1W{gw8I3z������ �_B eghI(5{5Om�ǫ>ĺM?O/Nb2D}�UI]0̼L ?ijZpn˩H &;h#͓d.A�ƛæ[q#'$w �����U@'MLh,9{e2O!�r%8�����:ͥ3{THaC#c$MBݒsTnמxmm常8` $Q@$�מw6,VD6.$m0\jCL>]mcV|cxu% WyeIKHǕ!$dV Yf<}Xt� ���Ƃit�Cw\}4tzuivUE�YePqG�,p:�����Y?.j�Q}�B�-rwwTn ?b�+g(t&Ry7d=ym]se�sg_d6f79ϿZ?.j�Vpv￙ӊPPV[}o֮gc�+ZسYOfі#fsc{C,�Ek['sϔ\]xI熿k� �$_ �K] ( (95"Yiksȭ.#x7 L3rǯoZ̼���d?y۶9q:wμ_J[70rV֬XIYn.V�<@"C(6oD@$Z6*`rpދy]A^ȖL3)\`8vZ5<kGn[?8rMKg߮s\uaFa̭4n s9d!z>��UkvN-~Ia9Hlv jW4x?|m2� nX�}S�?r�ȫ�b��E?W5-Jd]7MXԤ@dɂ2T @${}j󿽙:n R |ɪ]$6LH2T @ruD RIivԧW…\*����+KMa-8Id̓JAy�������*jIY]R4Rpg5{1tM2kuD2;j]('OJt<W&e+'/D+4JJV@w`jw2!ӭ!ϛ]Y"RD+-HʒVU)4.Jhy\<̪yN7H@@����J:1RSXxJMY;m2<i]H#oo�c�Xd?*�?ks�+Zc⫿d�9c�=O�?� nkQG${֫�;}�j?bzl۷�?ks�+a>->5!@Sd צy]gN)ً:jQ7f�= vQXBbe-3I3gqӥc{C,�Ek]s�?+Z[c͔O<5�`_W?O'�UZ(QE^+DS<꡷f !lPzt?X�}S�?rq½X+FM/Sm?E]:e|һ|ߓӮ8X�}S�?rS<WkgRMh&<ٲ7d󃷏C]g{ToV}-鮦O#?T���V${Zgk:<KjXGd;e]i#�:-ͫZBnl R@A @$&u*!+tFF"=1A,Td1$.Ҹ 6uF4.F7Gm=Go�^]ma1/L;:A Ȇ(wɄP>Xd1e4@;*(�+SJ,Y$drN ^K+Fp I+cϩ;�^GA$ O,)fv8 ROa^y_ROxtYʺ>I�$@13_ROxtYʺ>I�$@13mhz%[٣~FidbM#}v<>�0�%A)?o'LR%7i]l@2yT<n ���.Erۻ8m݅ckqcqf4@R{f$ c^x٬jk7HF@Rtf<*TM{i%V<ֵ[[E)gFcSRGjj+'oK�8�‡unnމ �іTl]+NcY˴*1q:p?*DSWlQ+~- =�!V?"�sş�HjCO<5�`_W?O'�UZ(�(̶{-.0;(j �խEKM5HY?h7y-υ/#ͮIl;$}rjo{5Om�ǫӳ�o;?f۴�?zvw5ӧNh/y)}d�kйo=G �խEi_rhϵ�}�B�-.j�Vr�_7kwiy_ -.M"% fs L.L0L�"|IK_*UhH=JC*6".mU-3HӴkf, x�@��+8FW�_wɮgζ馷ݺFgY7$ifF-$7wc1���/Es6ۻ8$ܝQEQE�QE�QE�{C,�Ek]s�?+ZO'�UZ+M'mKf;xHe,U('AW?᣼a�@M�h+h7C�?᣼a�@M�h+h7C�?᣼a�@M�h ! i�k+icy!PIr;|~>YWTm?FۢeVL31.9�Gx�EY_ w}?}?E|� o;G4w?�߉Y}?E|� o;G4w?�߉�}?E|� o;G4w?�߉�}?E|� o;G4w?�߉�}?E|� o;G4w?�߉�}?E|� o;G4w?�߉�}?E|� o;G4w?�߉�}?E|� o;G4w?�߉�}?\�9 �V0�n�~&��IyZ/;THmAI=w�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/docs/��������������������������������������������������������������������������������0000777�0001750�0001750�00000000000�07715600454�010115� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/docs/Makefile.am���������������������������������������������������������������������0000644�0001750�0001750�00000000310�07310030503�012036� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to create Makefile.in EXTRA_DIST = transcalc.sgml transcalc.1 man_MANS = transcalc.1 pkgdata_DATA = BUILT_SOURCES = CLEANFILES = *~ DISTCLEANFILES = .deps/*.P������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������transcalc-0.14/docs/Makefile.in���������������������������������������������������������������������0000644�0001750�0001750�00000015721�07715577462�012120� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated automatically by automake 1.4-p4 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@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ DATADIRNAME = @DATADIRNAME@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LIB = @LIB@ LN_S = @LN_S@ LTLIB = @LTLIB@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ PACKAGE = @PACKAGE@ PATHSEP = @PATHSEP@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ ms_librarian = @ms_librarian@ EXTRA_DIST = transcalc.sgml transcalc.1 man_MANS = transcalc.1 pkgdata_DATA = BUILT_SOURCES = CLEANFILES = *~ DISTCLEANFILES = .deps/*.P mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = man1dir = $(mandir)/man1 MANS = $(man_MANS) NROFF = nroff DATA = $(pkgdata_DATA) DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps docs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status install-man1: $(mkinstalldirs) $(DESTDIR)$(man1dir) @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done install-man: $(MANS) @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-man1 uninstall-man: @$(NORMAL_UNINSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f $(srcdir)/$$p; then \ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p"; \ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p; \ else if test -f $$p; then \ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p"; \ $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \ fi; fi; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) list='$(pkgdata_DATA)'; for p in $$list; do \ rm -f $(DESTDIR)$(pkgdatadir)/$$p; \ done tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = docs distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-man install-pkgdataDATA install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-man uninstall-pkgdataDATA uninstall: uninstall-am all-am: Makefile $(MANS) $(DATA) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(pkgdatadir) mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am distclean: distclean-am maintainer-clean-am: 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-am .PHONY: install-man1 uninstall-man1 install-man uninstall-man \ uninstall-pkgdataDATA install-pkgdataDATA 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 \ 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: �����������������������������������������������transcalc-0.14/docs/transcalc.sgml������������������������������������������������������������������0000644�0001750�0001750�00000011762�07514544004�012671� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!doctype refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [ <!-- Run docbook-to-man transcalc.sgml >transcal.1 --> <!-- Fill in your name for FIRSTNAME and SURNAME. --> <!ENTITY dhfirstname "<firstname>Gopal</firstname>"> <!ENTITY dhsurname "<surname>Narayanan</surname>"> <!-- Please adjust the date whenever revising the manpage. --> <!ENTITY dhdate "<date>May 30, 2001</date>"> <!-- SECTION should be 1-8, maybe w/ subsection other parameters are allowed: see man(7), man(1). --> <!ENTITY dhsection "<manvolnum>1</manvolnum>"> <!ENTITY dhemail "<email>(gopal@astro.umass.edu)</email>"> <!ENTITY dhusername "Gopal Narayanan"> <!ENTITY cgemail "<email>(claudio.girardi@ieee.org)</email>"> <!ENTITY cgusername "Claudio Girardi"> <!ENTITY dhucpackage "<refentrytitle>transcalc</refentrytitle>"> <!ENTITY dhpackage "transcalc"> <!ENTITY gnu "<acronym>GNU</acronym>"> ]> <refentry> <docinfo> <address> &dhemail; </address> <author> &dhfirstname; &dhsurname; </author> <copyright> <year>2001-2002</year> <holder>&dhusername;</holder> </copyright> &dhdate; </docinfo> <refmeta> &dhucpackage; &dhsection; </refmeta> <refnamediv> <refname>&dhpackage;</refname> <refpurpose>analysis and synthesis tool for microwave and RF transmsision lines</refpurpose> </refnamediv> <refsynopsisdiv> <cmdsynopsis> <command>&dhpackage;</command> <arg><option>-h/--help</option></arg> <arg><option>-v/--version</option></arg> <!-- <arg><option>{filename}</option></arg> --> </cmdsynopsis> </refsynopsisdiv> <refsect1> <title>DESCRIPTION &dhpackage; is an analysis and synthesis tool for calculating the electrical and physical properties of different kinds of RF and microwave transmission lines. Transcalc allows you to interactively edit substrate, component, physical and electrical parameters of a given transmission line. For each type of transmission line, using entry boxes, you can enter values for the various parameters, and either calculate its electrical properties (press Analyze button or function key F3), or use the given electrical requirements to sythesize (press Synthesize button or function key F4) physical parameters of the required transmission line. When run for the first time Transcalc creates a .transcalc directory under the user's home directory, where some configuration information is stored. Transcalc remembers the last transmission line parameters used when the user exits and presents those parameters when restarted. Calculated results are updated and presented within the user interface. Moving the mouse over the parameter labels pops up a more helpful tooltip about that parameter. For example, if you wonder what "Er" stands for, move the mouse over it and a helpful tooltip tells you that it stands for relative permittivity. Transcalc knows and converts between many unit types for length, frequency, resistance and angles. Default units can be saved by using the File->Options menu. Calculated results include conductor and dielectric losses in decibels (dB). OPTIONS Transcalc has few command line options at this point. Causes transcalc to print its version number (a string on the form MAJOR.MINOR, like 0.10) to the standard output, and then exit. x AUTHOR &dhpackage; was written by &dhusername; &dhemail; and &cgusername; &cgemail;. &dhpackage; is available at http://transcalc.sourceforge.net/ . transcalc-0.14/docs/transcalc.10000644000175000017500000000656307514544004012072 .\" This -*- nroff -*- file has been generated from .\" DocBook SGML with docbook-to-man on Debian GNU/Linux. ...\" ...\" transcript compatibility for postscript use. ...\" ...\" synopsis: .P! ...\" .de P! \\&. .fl \" force out current output buffer \\!%PB \\!/showpage{}def ...\" the following is from Ken Flowers -- it prevents dictionary overflows \\!/tempdict 200 dict def tempdict begin .fl \" prolog .sy cat \\$1\" bring in postscript file ...\" the following line matches the tempdict above \\!end % tempdict % \\!PE \\!. .sp \\$2u \" move below the image .. .de pF .ie \\*(f1 .ds f1 \\n(.f .el .ie \\*(f2 .ds f2 \\n(.f .el .ie \\*(f3 .ds f3 \\n(.f .el .ie \\*(f4 .ds f4 \\n(.f .el .tm ? font overflow .ft \\$1 .. .de fP .ie !\\*(f4 \{\ . ft \\*(f4 . ds f4\" ' br \} .el .ie !\\*(f3 \{\ . ft \\*(f3 . ds f3\" ' br \} .el .ie !\\*(f2 \{\ . ft \\*(f2 . ds f2\" ' br \} .el .ie !\\*(f1 \{\ . ft \\*(f1 . ds f1\" ' br \} .el .tm ? font underflow .. .ds f1\" .ds f2\" .ds f3\" .ds f4\" '\" t .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH "transcalc" "1" .SH "NAME" transcalc \(em analysis and synthesis tool for microwave and RF transmsision lines .SH "SYNOPSIS" .PP \fBtranscalc\fP [\fB-h/--help\fP] [\fB-v/--version\fP] .SH "DESCRIPTION" .PP \fBtranscalc\fP is an analysis and synthesis tool for calculating the electrical and physical properties of different kinds of RF and microwave transmission lines. .PP \fBTranscalc\fP allows you to interactively edit substrate, component, physical and electrical parameters of a given transmission line. For each type of transmission line, using entry boxes, you can enter values for the various parameters, and either calculate its electrical properties (press Analyze button or function key F3), or use the given electrical requirements to sythesize (press Synthesize button or function key F4) physical parameters of the required transmission line. .PP When run for the first time \fBTranscalc\fP creates a .transcalc directory under the user's home directory, where some configuration information is stored. \fBTranscalc\fP remembers the last transmission line parameters used when the user exits and presents those parameters when restarted. .PP Calculated results are updated and presented within the user interface. Moving the mouse over the parameter labels pops up a more helpful tooltip about that parameter. For example, if you wonder what "Er" stands for, move the mouse over it and a helpful tooltip tells you that it stands for relative permittivity. .PP \fBTranscalc\fP knows and converts between many unit types for length, frequency, resistance and angles. Default units can be saved by using the File->Options menu. Calculated results include conductor and dielectric losses in decibels (dB). .SH "OPTIONS" .PP \fBTranscalc\fP has few command line options at this point. .IP "\fB-v, --version\fP " 10 Causes transcalc to print its version number (a string on the form MAJOR.MINOR, like 0.10) to the standard output, and then exit. .SH "AUTHOR" .PP \fBtranscalc\fP was written by Gopal Narayanan (gopal@astro.umass.edu) and Claudio Girardi (claudio.girardi@ieee.org). \fBtranscalc\fP is available at \fIhttp://transcalc.sourceforge.net/ (link to URL http://transcalc.sourceforge.net/) \fR. ...\" created by instant / docbook-to-man, Mon 15 Jul 2002, 08:29 transcalc-0.14/examples/0000777000175000017500000000000007715600454011003 5transcalc-0.14/examples/Makefile.am0000644000175000017500000000043207514036161012745 examplesdir = $(datadir)/transcalc/examples/ EXAMPLES = \ example1.trc \ 000.trc \ cstrip_kj_1.trc \ hp.trc \ ustrip_jansen.trc \ 001.trc \ cstrip_kj_2.trc \ ustrip50fr4.trc examples_DATA = $(EXAMPLES) EXTRA_DIST = $(EXAMPLES) CLEANFILES = *~ DISTCLEANFILES = .deps/*.P transcalc-0.14/examples/Makefile.in0000644000175000017500000001341307715577462013002 # Makefile.in generated automatically by automake 1.4-p4 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@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ DATADIRNAME = @DATADIRNAME@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LIB = @LIB@ LN_S = @LN_S@ LTLIB = @LTLIB@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ PACKAGE = @PACKAGE@ PATHSEP = @PATHSEP@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ ms_librarian = @ms_librarian@ examplesdir = $(datadir)/transcalc/examples/ EXAMPLES = example1.trc 000.trc cstrip_kj_1.trc hp.trc ustrip_jansen.trc 001.trc cstrip_kj_2.trc ustrip50fr4.trc examples_DATA = $(EXAMPLES) EXTRA_DIST = $(EXAMPLES) CLEANFILES = *~ DISTCLEANFILES = .deps/*.P mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DATA = $(examples_DATA) DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps examples/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(examplesdir) @list='$(examples_DATA)'; for p in $$list; do \ if test -f $(srcdir)/$$p; then \ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(examplesdir)/$$p"; \ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(examplesdir)/$$p; \ else if test -f $$p; then \ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(examplesdir)/$$p"; \ $(INSTALL_DATA) $$p $(DESTDIR)$(examplesdir)/$$p; \ fi; fi; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) list='$(examples_DATA)'; for p in $$list; do \ rm -f $(DESTDIR)$(examplesdir)/$$p; \ done tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = examples distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-examplesDATA install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-examplesDATA uninstall: uninstall-am all-am: Makefile $(DATA) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(examplesdir) mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am distclean: distclean-am maintainer-clean-am: 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-am .PHONY: uninstall-examplesDATA install-examplesDATA 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 \ 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: transcalc-0.14/examples/example1.trc0000644000175000017500000000056007514036161013141 # This file was automatically generated # by transcalc on Tue Mar 26 20:28:34 2002 # # It is suggested not to edit this file directly, use transcalc instead # Microstrip 9.8 NA 1 NA 25 mil 1e+20 mil 0.2 mil 4.1e+07 NA 0.0001 NA 0 mil NULL NA 5 GHz NULL NA NULL NA 24 mil 1 m NULL NA NULL NA Fix 0 Fix 0 50.1927 Ohm 15503.8 Deg NULL NA NULL NA Values are consistent transcalc-0.14/examples/000.trc0000644000175000017500000000060307514036161011722 # This file was automatically generated # by transcalc on Tue May 28 22:21:48 2002 # # It is suggested not to edit this file directly, use transcalc instead # Coupled Microstrip 4.3 NA 1 NA 8.27 mil 1e+20 mil 0.68 mil 4.1e+07 NA 0 NA 0 mil NULL NA 10 GHz NULL NA NULL NA 8.66 mil 5.31 mil 1000 mil NULL NA Fix 0 Fix 0 83.4684 Ohm 55.0893 Ohm 558.723 Deg NULL NA Values are consistent transcalc-0.14/examples/cstrip_kj_1.trc0000644000175000017500000000057407514036161013642 # This file was automatically generated # by transcalc on Tue May 28 22:22:37 2002 # # It is suggested not to edit this file directly, use transcalc instead # Coupled Microstrip 2.35 NA 1 NA 0.79 mm 1e+20 mil 0 mil 4.1e+07 NA 0 NA 0 mil NULL NA 30 GHz NULL NA NULL NA 1.7775 mm 0.079 mm 1 m NULL NA Fix 0 Fix 0 79.2774 Ohm 37.9028 Ohm 53079.3 Deg NULL NA Values are consistent transcalc-0.14/examples/hp.trc0000644000175000017500000000056007514036161012034 # This file was automatically generated # by transcalc on Tue May 28 22:23:07 2002 # # It is suggested not to edit this file directly, use transcalc instead # Coupled Microstrip 9.9 NA 1 NA 645 um 3.9e34 mil 5 um 4.1e+07 NA 0 NA 0 mil NULL NA 0 GHz NULL NA NULL NA 609 um 64.5 mil 1 m NULL NA Fix 0 Fix 0 52.4574 Ohm 48.4099 Ohm 0 Deg NULL NA Values are consistent transcalc-0.14/examples/ustrip_jansen.trc0000644000175000017500000000055607514036161014316 # This file was automatically generated # by transcalc on Tue May 28 22:23:57 2002 # # It is suggested not to edit this file directly, use transcalc instead # Microstrip 9.9 NA 1 NA 0.64 mm 1e+20 m 5 um 4.1e+07 NA 0.0005 NA 0.25 um NULL NA 3 GHz NULL NA NULL NA 0.6 mm 1 m NULL NA NULL NA Fix 0 Fix 0 50.4142 Ohm 9267.71 Deg NULL NA NULL NA Values are consistent transcalc-0.14/examples/001.trc0000644000175000017500000000060307514036161011723 # This file was automatically generated # by transcalc on Tue May 28 22:22:07 2002 # # It is suggested not to edit this file directly, use transcalc instead # Coupled Microstrip 4.3 NA 1 NA 8.27 mil 1e+20 mil 0.68 mil 4.1e+07 NA 0 NA 0 mil NULL NA 10 GHz NULL NA NULL NA 8.66 mil 5.31 mil 1000 mil NULL NA Fix 0 Fix 0 83.4684 Ohm 55.0893 Ohm 558.723 Deg NULL NA Values are consistent transcalc-0.14/examples/cstrip_kj_2.trc0000644000175000017500000000057307514036161013642 # This file was automatically generated # by transcalc on Tue May 28 22:22:48 2002 # # It is suggested not to edit this file directly, use transcalc instead # Coupled Microstrip 9.9 NA 1 NA 0.64 mm 1e+20 mil 5 um 4.1e+07 NA 0.0005 NA 0.25 um NULL NA 3 GHz NULL NA NULL NA 0.6 mm 0.5 mm 1 m NULL NA Fix 0 Fix 0 58.7958 Ohm 41.4711 Ohm 9722.33 Deg NULL NA Values are consistent transcalc-0.14/examples/ustrip50fr4.trc0000644000175000017500000000054607514036161013540 # This file was automatically generated # by transcalc on Tue May 28 22:23:36 2002 # # It is suggested not to edit this file directly, use transcalc instead # Microstrip 4.3 NA 1 NA 210 um 1e+20 mil 30 um 4.1e+07 NA 0.025 NA 0 um NULL NA 0 GHz NULL NA NULL NA 380 um 1 m NULL NA NULL NA Fix 0 Fix 0 50.7347 Ohm 0 Deg NULL NA NULL NA Values are consistent