From: <pdo...@us...> - 2010-07-25 06:59:53
|
Revision: 13996 http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=13996&view=rev Author: pdontthink Date: 2010-07-25 06:59:40 +0000 (Sun, 25 Jul 2010) Log Message: ----------- Committing differences to IMAP Proxy version 1.2 Modified Paths: -------------- trunk/imap_proxy/ChangeLog trunk/imap_proxy/Makefile.in trunk/imap_proxy/README trunk/imap_proxy/config.h.in trunk/imap_proxy/configure trunk/imap_proxy/imapproxy.spec trunk/imap_proxy/include/common.h trunk/imap_proxy/include/imapproxy.h trunk/imap_proxy/scripts/imapproxy.conf trunk/imap_proxy/scripts/imapproxy.init trunk/imap_proxy/src/becomenonroot.c trunk/imap_proxy/src/config.c trunk/imap_proxy/src/hash.c trunk/imap_proxy/src/icc.c trunk/imap_proxy/src/imapcommon.c trunk/imap_proxy/src/logging.c trunk/imap_proxy/src/main.c trunk/imap_proxy/src/pimpstat.c trunk/imap_proxy/src/request.c Added Paths: ----------- trunk/imap_proxy/COPYING trunk/imap_proxy/README.debian trunk/imap_proxy/README.ssl trunk/imap_proxy/acconfig.h trunk/imap_proxy/aclocal.m4 trunk/imap_proxy/configure.in trunk/imap_proxy/copyright trunk/imap_proxy/pkginfo trunk/imap_proxy/prototype Removed Paths: ------------- trunk/imap_proxy/src/COPYING trunk/imap_proxy/src/base64.c Added: trunk/imap_proxy/COPYING =================================================================== --- trunk/imap_proxy/COPYING (rev 0) +++ trunk/imap_proxy/COPYING 2010-07-25 06:59:40 UTC (rev 13996) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Modified: trunk/imap_proxy/ChangeLog =================================================================== --- trunk/imap_proxy/ChangeLog 2010-07-25 06:37:19 UTC (rev 13995) +++ trunk/imap_proxy/ChangeLog 2010-07-25 06:59:40 UTC (rev 13996) @@ -1,5 +1,97 @@ -2003-04-16 Dave McMurtrie <dg...@pi...> +2003-05-22 Dave McMurtrie <dav...@ho...> + * Version 1.2 released. + +2003-05-21 Dave McMurtrie <dav...@ho...> + + * Many many many comment changes to GPL the distribution. + +2003-05-15 Dave McMurtrie <dav...@ho...> + + * imapproxy.h: included netinet/in.h. + + * configure.in: Applied patch by Ken Murchison <ke...@oc...> + to fix build issues on FreeBSD and SUSE. + + * acconfig.h: Newly contributed by Ken Murchison <ke...@oc...> + to clean up build process. + + * pimpstat.c: Patch by Ken Murchison <ke...@oc...> to clean up + build process. + + * main.c: Patch by Ken Murchison <ke...@oc...> to clean up build + process. + + * request.c: Patch by Ken Murchison <ke...@oc...> to clean up + build process. + + * imapcommon.c: Modified Get_Server_conn() to deal with possible + unsolicited, untagged capability response from server on + successful login. + +2003-05-13 Dave McMurtrie <dav...@ho...> + + * imapproxy.h, imapcommon.c, main.c, request.c, pimpstat.c, + configure.in, Makefile.in: Applied patches by Ken Murchison + <ke...@oc...> to clean up build process. + + * imapcommon.c, main.c: Replaced all AF_INET constant usage with + PF_INET constants. + +2003-05-08 Dave McMurtrie <dav...@ho...> + + * configure.in: Applied patch by Ken Murchison <ke...@oc...> to + deal with krb5/openssl issue. + + * request.c: Added code to send any untagged server responses back to + a client on logout. + +2003-05-06 Dave McMurtrie <dav...@ho...> + + * prototype: Added by Ken Murchison <ke...@oc...> to allow + building Sun packages. + + * pkginfo: Added by Ken Murchison <ke...@oc...> to allow building + Sun packages. + + * copyright: Added by Ken Murchison <ke...@oc...> to allow building + Sun packages. + + * base64.c: Removed this source file. It's no longer needed. + + * COPYING: Removed this file. It was only related to base64.c. + + * imapproxy.h: Applied patch by Ken Murchison <ke...@oc...> to + remove base64 function prototypes. + + * imapcommon.c: Applied patch by Ken Murchison <ke...@oc...> to + remove Solaris md5 library dependencies (use openssl instead). + + * request.c: Applied patch by Ken Murchison <ke...@oc...> to + replace base64 calls with openssl routines. + +2003-04-29 Dave McMurtrie <dav...@ho...> + + * imapproxy.h: Applied patch by Ken Murchison <ke...@oc...> to + add SSL/TLS support. + + * config.c: Applied patch by Ken Murchison <ke...@oc...> to add + SSL/TLS support. + + * icc.c: Applied patch by Ken Murchison <ke...@oc...> to add + SSL/TLS support. + + * main.c: Applied patch by Ken Murchison <ke...@oc...> to add + SSL/TLS support. + + * request.c: Applied patch by Ken Murchison <ke...@oc...> to add + SSL/TLS support. + + * imapcommon.c: Applied patch by Ken Murchison <ke...@oc...> to + add SSL/TLS support. + +2003-04-16 Dave McMurtrie <dav...@ho...> + * Version 1.1.5 released. * logging.c: Newly introduced to allow syslog configuration. @@ -27,11 +119,11 @@ * Added spec file for rpm based systems -2003-02-25 Dave McMurtrie <dg...@pi...> +2003-02-25 Dave McMurtrie <dav...@ho...> * Version 1.1.4 released. -2003-02-20 Dave McMurtrie <dg...@pi...> +2003-02-20 Dave McMurtrie <dav...@ho...> * imapcommon.c: Get_Server_sd() now attempts to re-authenticate to the real server if it encounters a non-matching password. @@ -44,7 +136,7 @@ * request.c: Raw_Proxy() now sends the server an UNSELECT instead of a CLOSE if the server supports it. -2003-02-19 Dave McMurtrie <dg...@pi...> +2003-02-19 Dave McMurtrie <dav...@ho...> * Version 1.1.3 released. @@ -66,15 +158,15 @@ cmd_authenticate_login() function and additional code necessary to support "AUTHENTICATE LOGIN". -2003-02-17 Dave McMurtrie <dg...@pi...> +2003-02-17 Dave McMurtrie <dav...@ho...> * config.c: added an fclose() for the config file that I had forgotten. -2003-02-14 Dave McMurtrie <dg...@pi...> +2003-02-14 Dave McMurtrie <dav...@ho...> * request.c: added lseek() call in cmd_newlog(). -2003-01-27 Dave McMurtrie <dg...@pi...> +2003-01-27 Dave McMurtrie <dav...@ho...> * Version 1.1.2 released. @@ -95,11 +187,11 @@ * pimpstat.c: added patch for linux support by Frode Nordahl <fr...@po...> -2003-01-23 Dave McMurtrie <dg...@pi...> +2003-01-23 Dave McMurtrie <dav...@ho...> * imapcommon.c: NonSyncLiteral flag was not being cleared properly. -2003-01-22 Dave McMurtrie <dg...@pi...> +2003-01-22 Dave McMurtrie <dav...@ho...> * Version 1.1.1 released. @@ -113,12 +205,12 @@ * imapcommon.c: Added logic to support passwords sent as string literals on login. -2002-12-18 Dave McMurtrie <dg...@pi...> +2002-12-18 Dave McMurtrie <dav...@ho...> * imapcommon.c: Fixed bug in for loop that does string literal processing. -2002-12-17 Dave McMurtrie <dg...@pi...> +2002-12-17 Dave McMurtrie <dav...@ho...> * Global configuration file support added. @@ -129,12 +221,12 @@ * main.c: changed accepted command line arguments. -2002-09-06 Dave McMurtrie <dg...@pi...> +2002-09-06 Dave McMurtrie <dav...@ho...> * main.c: added code to ignore SIGPIPE so EPIPE on a failed send() won't kill us. Also ignore SIGHUP. -2002-08-30 Dave McMurtrie <dg...@pi...> +2002-08-30 Dave McMurtrie <dav...@ho...> * main.c: added initialization of the trace mutex that I forgot. @@ -142,14 +234,14 @@ * added total client logins counter. -2002-08-29 Dave McMurtrie <dg...@pi...> +2002-08-29 Dave McMurtrie <dav...@ho...> * Pitt common functions moved out of external libraries into this source tree. * imapcommon.c: fixed nasty socket descriptor leak. -2002-08-28 Dave McMurtrie <dg...@pi...> +2002-08-28 Dave McMurtrie <dav...@ho...> * replaced all internal logging calls with standard syslog calls. @@ -160,15 +252,15 @@ * request.c: added poll() timeout in raw proxy loop. -2002-08-27 Dave McMurtrie <dg...@pi...> +2002-08-27 Dave McMurtrie <dav...@ho...> * request.c: no longer do a hostname lookup. Just log IP instead. -2002-07-18 Dave McMurtrie <dg...@pi...> +2002-07-18 Dave McMurtrie <dav...@ho...> * request.c: added p_dumpicc and p_newlog commands. renamed trace command to p_trace. -2002-07-03 Dave McMurtrie <dg...@pi...> +2002-07-03 Dave McMurtrie <dav...@ho...> * Version 1.0 released. Modified: trunk/imap_proxy/Makefile.in =================================================================== --- trunk/imap_proxy/Makefile.in 2010-07-25 06:37:19 UTC (rev 13995) +++ trunk/imap_proxy/Makefile.in 2010-07-25 06:59:40 UTC (rev 13996) @@ -4,6 +4,8 @@ # Fixed to work with configure script # by Devrim SERAL <de...@ga...> +# Cleaned up by Ken Murchison + ## Tuneables # Paths @@ -24,10 +26,9 @@ CC = @CC@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ -OSLIBS = @LIBS@ +LIBS = @LIBS@ DEFINES = @DEFINES@ -OS = @OS@ -FLAGS = $(CPPFLAGS) @CFLAGS@ -I/usr/include -I./include $(OS) +FLAGS = $(CPPFLAGS) @CFLAGS@ -I. -I./include INSTALL = @INSTALL@ EBIN = $(sbindir) @@ -35,34 +36,18 @@ ETC = /etc # ETC = @sysconfdir@ -# Compiler flags -#CC = gcc -#RANLIB = : -#CFLAGS = -I./include -DLINUX -#LDLIBS = -# Man sections -#MANLIB = 3 -#MANADM = 1m - ## Nothing to change after this point # Libraries -# Solaris -#XYD_LIB = -lpthread -lmd5 -lsocket -lnsl -# Linux -#XYD_LIB = -lpthread -lnsl -lcrypto +XYD_LIB = $(LIBS) +TAT_LIB = @LIB_CURSES@ -#TAT_LIB = -lcurses - - -XYD_LIB = $(OSLIBS) -TAT_LIB = @NCURLIB@ - # Object files -XYD_OBJ = ./src/icc.o ./src/main.o ./src/imapcommon.o ./src/request.o ./src/hash.o ./src/becomenonroot.o ./src/config.o ./src/base64.o ./src/logging.o +XYD_OBJ = ./src/icc.o ./src/main.o ./src/imapcommon.o ./src/request.o \ + ./src/hash.o ./src/becomenonroot.o ./src/config.o ./src/logging.o TAT_OBJ = ./src/pimpstat.o ./src/config.o # Final targets @@ -80,7 +65,7 @@ $(CC) $(CFLAGS) $(FLAGS) -c -o $@ $< $(XYD_BIN): $(XYD_OBJ) - $(CC) -o $@ $(XYD_OBJ) $(XYD_LIB) + $(CC) -o $@ $(XYD_OBJ) $(LDFLAGS) $(XYD_LIB) $(TAT_BIN): $(TAT_OBJ) $(CC) -o $@ $(TAT_OBJ) $(TAT_LIB) @@ -107,4 +92,6 @@ $(INSTALL) -o root -g sys -m 0755 ./scripts/imapproxy.conf $(rpm_prefix)/etc $(INSTALL) -o root -g sys -m 0755 ./scripts/imapproxy.init $(rpm_prefix)/etc/init.d/imapproxy +pkg: + pkgmk -o -r . #### Modified: trunk/imap_proxy/README =================================================================== --- trunk/imap_proxy/README 2010-07-25 06:37:19 UTC (rev 13995) +++ trunk/imap_proxy/README 2010-07-25 06:59:40 UTC (rev 13996) @@ -1,36 +1,41 @@ - Copyright 2002, University of Pittsburgh + Copyright (c) 2002,2003 Dave McMurtrie -This directory contains the source distribution of the University of Pittsburgh -IMAP proxy server. +This directory contains the source distribution of up-imapproxy. -Send any bugs, questions, comments, patches, kind words, feature requests, -or hostile words to: +If you find any bugs in up-imapproxy, please visit http://bugs.imapproxy.org -d...@pi... - If you want to subscribe to the imapproxy-info mailing list, visit: http://lists.pitt.edu/mailman/listinfo/imapproxy-info -############################################################################## -KNOWN ISSUES -############################################################################## +For some Debian specific issues that have come up, read the file README.debian. -Currently, the proxy has only been tested on Solaris and Linux. -I received FreeBSD patches that I still haven't had time to incorporate. -Sorry... If enough people need it and bug me about it, I'll probably -find the motivation to finish it. +To read a little bit about SSL support in imapproxy, read README.ssl. +There's not much in the README.ssl file except a pointer to better +documentation that's already available. Please feel free to contribute more +complete documentation if you have the time. ############################################################################## HOW TO BUILD ############################################################################## +Before you build imapproxy, you're going to need to obtain the OpenSSL +libraries. Build and install them, then you're ready to move on. + It should be pretty painless: ./configure make +If the configure script yells about not being able to find libcrypto or +other SSL related stuff, you'll have to specify the location of your OpenSSL +libraries when you invoke the configure script. Something like this should do +it: + +./configure --with-openssl=/usr/local/ssl + + "make install" will attempt to install the following files: /usr/local/sbin/in.imapproxyd @@ -46,6 +51,7 @@ /etc/rc2.d/S99imapproxy /etc/rc0.d/K10imapproxy +"make pkg" will attempt to install a sun package into /var/spool/package. After you successfully build the proxy server, you'll need to edit the global configuration file to suit your needs. By default, the proxy @@ -53,8 +59,8 @@ can change this at runtime by supplying the -f argument to /usr/local/sbin/in.imapproxyd. -/usr/local/sbin/pimpstat is the Pitt IMap Proxy Statistical tool. It's a -curses-based application that you can use to monitor the proxy server. It's +/usr/local/sbin/pimpstat is the Polling Imap Mail Proxy Statistical tool. It's +a curses-based application that you can use to monitor the proxy server. It's aware of the same global configuration file as the proxy server, and can also be told to look at a different configuration file by supplying it as a parameter with the -f argument. Both pimpstat and in.imapproxyd must be using @@ -132,8 +138,29 @@ ------------------- The syslog LOG_UPT() priority mask. Read more about what this does in the syslog(3C) manpage. Any of the possible priorities specified in the -syslog(3c) manpage my be specified here. +syslog(3C) manpage my be specified here. +tls_ca_file +----------- +File containing one or more Certificate Authority (CA) certificates. +See README.ssl for more information. + +tls_ca_path +----------- +Path to directory with certificates of CAs. This directory must have +filenames with the hashed value of the certificate (see openssl(1)). +See README.ssl for more information. + +tls_cert_file +------------- +File containing the certificate presented by imapproxy to the server for +client authentication during STARTTLS. See README.ssl for more information. + +tls_key_file +------------ +File containing the private key belonging to the client certificate. See +README.ssl for more information. + ############################################################################## ADDITIONAL COMMANDS: ############################################################################## @@ -177,8 +204,9 @@ Happy proxying, -Dave +Dave <dav...@ho...> + _________ / | / | Added: trunk/imap_proxy/README.debian =================================================================== --- trunk/imap_proxy/README.debian (rev 0) +++ trunk/imap_proxy/README.debian 2010-07-25 06:59:40 UTC (rev 13996) @@ -0,0 +1,45 @@ +Michael Faurot <mfaurot at atww.org> submitted some helpful information +for people building and installing up-imapproxy on Debian Linux systems. +I've included his information here, exactly as he submitted it. + + +o) On a Debian system that uses UW IMAP you'll need to rename + /etc/rc2.d/S99rmnologin to something like S98rmnologin. Then be + sure the rc script for imapproxy is run as S99imapproxy. + This insures that when imapproxy goes to query the imap + daemon, the imap daemon will actually say it's ready. UW IMAP + respects the /etc/nologin file, and if imapproxy queries while + /etc/nologin is still present, imapproxy will fail to start. + Debian creates /etc/nologin during the early stages of bootup, + to prevent premature logins, and then removes it in the last + stages of going multiuser. + + +o) Add a PATH statement close to the top of the rc script + and then adjust the call to basename not to use a full + pathname. The original script called /bin/basename. On a + Debian system basename is in /usr/bin. For example: + + PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:" + export PATH + + +o) If building against locally created OpenSSL libraries that + have been installed into the default locations under + /usr/local these variables will need to be exported before + running "configure": + + CFLAGS="-I/usr/local/ssl/include" + LIBS="-L/usr/local/ssl/lib" + export CFLAGS LIBS + + +o) I built my installation of imapproxy against my own locally + compiled copies of OpenSSL's static libraries on a Debian stable + system. It appears, from some messages that were on the + mailing list, that people attempting to build imapproxy using + the stock Debian OpenSSL libraries may not realize they also + need to install the development package for OpenSSL to get its + headers and libraries. That can be done like this: + + apt-get install libssl-dev Added: trunk/imap_proxy/README.ssl =================================================================== --- trunk/imap_proxy/README.ssl (rev 0) +++ trunk/imap_proxy/README.ssl 2010-07-25 06:59:40 UTC (rev 13996) @@ -0,0 +1,23 @@ +up-imapproxy now supports SSL/TLS between the proxy server and the real +IMAP server. It does not support SSL/TLS between a client (usually webmail) +and the proxy server. The idea here is that you can run the imap proxy on +the same machine as your webserver. If you're using SSL/TLS to your webserver, +the webserver can then send plaintext auth to the proxy without the password +ever crossing the network, then the proxy can use SSL/TLS to the IMAP server. + +The proxy will only use SSL if the real imap server forces it to do so by +advertising LOGINDISABLED in the capability string. +This brings up the obvious point that if the server advertises LOGINDISABLED +and the proxy isn't built with SSL support, things aren't going to work. + +There are four configuration file options that you'll have to set in order +for SSL to work. They are tls_ca_file, tls_ca_path, tls_cert_file and +tls_key_file. + +I haven't had time to write my own ssl tuturial (and I might never) but you +can find a wealth of information here: + +http://www.sendmail.org/~ca/email/starttls.html + +If anyone wants to contribute to this project by submitting some good +documentation about configuring up-imapproxy with SSL, it would be appreciated. Added: trunk/imap_proxy/acconfig.h =================================================================== --- trunk/imap_proxy/acconfig.h (rev 0) +++ trunk/imap_proxy/acconfig.h 2010-07-25 06:59:40 UTC (rev 13996) @@ -0,0 +1,32 @@ + +#ifndef _IMAPROXY_CONFIG_H +#define _IMAPROXY_CONFIG_H + +@TOP@ + +/* Define if you have the nfds_t typedef. */ +#undef HAVE_NFDS_T + +@BOTTOM@ + +#if HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif + +#ifndef MAP_FAILED +#define MAP_FAILED ((void *) -1) +#endif + +#if HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif + +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + +#ifndef HAVE_NFDS_T +typedef unsigned int nfds_t; +#endif + +#endif /* _IMAPROXY_CONFIG_H */ Added: trunk/imap_proxy/aclocal.m4 =================================================================== --- trunk/imap_proxy/aclocal.m4 (rev 0) +++ trunk/imap_proxy/aclocal.m4 2010-07-25 06:59:40 UTC (rev 13996) @@ -0,0 +1,24 @@ +dnl ## +dnl ## Check for an ANSI C typedef in a header +dnl ## +dnl ## configure.in: +dnl ## AC_CHECK_TYPEDEF(<typedef>, <header>) +dnl ## acconfig.h: +dnl ## #undef HAVE_<typedef> +dnl ## + +AC_DEFUN(AC_CHECK_TYPEDEF,[dnl +AC_REQUIRE([AC_HEADER_STDC])dnl +AC_MSG_CHECKING(for typedef $1) +AC_CACHE_VAL(ac_cv_typedef_$1, +[AC_EGREP_CPP(dnl +changequote(<<,>>)dnl +<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl +changequote([,]), [ +#include <$2> +], ac_cv_typedef_$1=yes, ac_cv_typedef_$1=no)])dnl +AC_MSG_RESULT($ac_cv_typedef_$1) +if test $ac_cv_typedef_$1 = yes; then + AC_DEFINE(HAVE_[]translit($1, [a-z], [A-Z])) +fi +]) Modified: trunk/imap_proxy/config.h.in =================================================================== --- trunk/imap_proxy/config.h.in 2010-07-25 06:37:19 UTC (rev 13995) +++ trunk/imap_proxy/config.h.in 2010-07-25 06:59:40 UTC (rev 13996) @@ -1,85 +1,112 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ +/* config.h.in. Generated from configure.in by autoheader. */ -/* Define to empty if the keyword does not work. */ -#undef const +#ifndef _IMAPROXY_CONFIG_H +#define _IMAPROXY_CONFIG_H -/* Define if you don't have vprintf but do have _doprnt. */ -#undef HAVE_DOPRNT -/* Define if you have the vprintf function. */ -#undef HAVE_VPRINTF +/* Define if you have the nfds_t typedef. */ +#undef HAVE_NFDS_T -/* Define if you have the wait3 system call. */ -#undef HAVE_WAIT3 -/* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H -/* Define if the `setpgrp' function takes no argument. */ -#undef SETPGRP_VOID +/* Define to 1 if you have the `crypto' library (-lcrypto). */ +#undef HAVE_LIBCRYPTO -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS +/* Define to 1 if you have the `c_r' library (-lc_r). */ +#undef HAVE_LIBC_R -/* Define if you can safely include both <sys/time.h> and <time.h>. */ -#undef TIME_WITH_SYS_TIME +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL -/* Define if you have the regcomp function. */ -#undef HAVE_REGCOMP +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#undef HAVE_LIBPTHREAD -/* Define if you have the select function. */ -#undef HAVE_SELECT +/* Define to 1 if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET -/* Define if you have the socket function. */ -#undef HAVE_SOCKET +/* Define to 1 if you have the `ssl' library (-lssl). */ +#undef HAVE_LIBSSL -/* Define if you have the strcspn function. */ -#undef HAVE_STRCSPN +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H -/* Define if you have the strdup function. */ -#undef HAVE_STRDUP +/* Define to 1 if you have the `poll' function. */ +#undef HAVE_POLL -/* Define if you have the strtol function. */ -#undef HAVE_STRTOL +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET -/* Define if you have the <fcntl.h> header file. */ -#undef HAVE_FCNTL_H +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H -/* Define if you have the <malloc.h> header file. */ -#undef HAVE_MALLOC_H +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H -/* Define if you have the <strings.h> header file. */ +/* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H -/* Define if you have the <sys/file.h> header file. */ -#undef HAVE_SYS_FILE_H +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H -/* Define if you have the <sys/ioctl.h> header file. */ -#undef HAVE_SYS_IOCTL_H +/* Define to 1 if you have the <sys/mman.h> header file. */ +#undef HAVE_SYS_MMAN_H -/* Define if you have the <sys/time.h> header file. */ -#undef HAVE_SYS_TIME_H +/* Define to 1 if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H -/* Define if you have the <syslog.h> header file. */ -#undef HAVE_SYSLOG_H +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H -/* Define if you have the <unistd.h> header file. */ +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Define if you have the c library (-lc). */ -#undef HAVE_LIBC +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT -/* Define if you have the crypto library (-lcrypto). */ -#undef HAVE_LIBCRYPTO +/* Define to the full name of this package. */ +#undef PACKAGE_NAME -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING -/* Define if you have the og library (-log). */ -#undef HAVE_LIBOG +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET +/* Define to the version of this package. */ +#undef PACKAGE_VERSION -/* Define DEFAULT_CONFIG_FILE */ -#undef DEFAULT_CONFIG_FILE +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +#if HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif + +#ifndef MAP_FAILED +#define MAP_FAILED ((void *) -1) +#endif + +#if HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif + +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + +#ifndef HAVE_NFDS_T +typedef unsigned int nfds_t; +#endif + +#endif /* _IMAPROXY_CONFIG_H */ Modified: trunk/imap_proxy/configure =================================================================== --- trunk/imap_proxy/configure 2010-07-25 06:37:19 UTC (rev 13995) +++ trunk/imap_proxy/configure 2010-07-25 06:59:40 UTC (rev 13996) @@ -1,26 +1,309 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.53. # +# 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. -# Defaults: -ac_help= +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + +# Name of the executable. +as_me=`(basename "$0") 2>/dev/null || +$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" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.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 + 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 + +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 || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export 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 -# Any additions from configure.in: +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= + +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#if HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#if STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# if HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#if HAVE_STRINGS_H +# include <strings.h> +#endif +#if HAVE_INTTYPES_H +# include <inttypes.h> +#else +# if HAVE_STDINT_H +# include <stdint.h> +# endif +#endif +#if HAVE_UNISTD_H +# include <unistd.h> +#endif" + + # 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. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -29,10 +312,15 @@ silent= site= srcdir= -target=NONE 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' @@ -46,17 +334,9 @@ infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -64,59 +344,59 @@ continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + 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" ;; + 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" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + 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=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + 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'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -125,95 +405,47 @@ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in ... [truncated message content] |