diff options
author | Peter Galbavy <peter@cvs.openbsd.org> | 1998-07-21 13:20:29 +0000 |
---|---|---|
committer | Peter Galbavy <peter@cvs.openbsd.org> | 1998-07-21 13:20:29 +0000 |
commit | 43b686d61558c0957f1779c747214ddef20a2252 (patch) | |
tree | 99fb41dbccee40683a84fe98aa3c6a9784911bf2 /lib/libpthread/config | |
parent | ea12e8eb2f8d4c89e854d9381f85ce8fb4688ad0 (diff) |
Complete initial import from mySQL 3.22.4 (mit-pthreads/).
Lots of dross to move and remove yet.
At minimum:
o remove GNU config and GNU Makefiles
o build arch directory and migrate away machdep/
o rebuild BSD Makefiles
o move notes etc. into doc/
Diffstat (limited to 'lib/libpthread/config')
-rwxr-xr-x | lib/libpthread/config/COPYING.GNU | 339 | ||||
-rwxr-xr-x | lib/libpthread/config/COPYRIGHT | 4 | ||||
-rwxr-xr-x | lib/libpthread/config/GNUmakefile.in | 129 | ||||
-rw-r--r-- | lib/libpthread/config/Makefile.in | 52 | ||||
-rw-r--r-- | lib/libpthread/config/acconfig.h | 73 | ||||
-rwxr-xr-x | lib/libpthread/config/aclocal.m4 | 94 | ||||
-rwxr-xr-x | lib/libpthread/config/config.flags.in | 80 | ||||
-rw-r--r-- | lib/libpthread/config/config.guess | 480 | ||||
-rwxr-xr-x | lib/libpthread/config/config.h.in | 315 | ||||
-rw-r--r-- | lib/libpthread/config/config.sub | 794 | ||||
-rw-r--r-- | lib/libpthread/config/configure | 3161 | ||||
-rwxr-xr-x | lib/libpthread/config/configure.in | 672 | ||||
-rw-r--r-- | lib/libpthread/config/configure.org | 2874 | ||||
-rw-r--r-- | lib/libpthread/config/install-sh | 238 |
14 files changed, 9305 insertions, 0 deletions
diff --git a/lib/libpthread/config/COPYING.GNU b/lib/libpthread/config/COPYING.GNU new file mode 100755 index 00000000000..a43ea2126fb --- /dev/null +++ b/lib/libpthread/config/COPYING.GNU @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 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 + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/lib/libpthread/config/COPYRIGHT b/lib/libpthread/config/COPYRIGHT new file mode 100755 index 00000000000..ba3ac43c589 --- /dev/null +++ b/lib/libpthread/config/COPYRIGHT @@ -0,0 +1,4 @@ +The files config.guess and config.sub in this directory come from the GNU +autoconf distribution, and are covered by the GNU Public License, which may +be found in the file COPYING.GNU. They are the only files covered by the +GPL. diff --git a/lib/libpthread/config/GNUmakefile.in b/lib/libpthread/config/GNUmakefile.in new file mode 100755 index 00000000000..7c06ee367e6 --- /dev/null +++ b/lib/libpthread/config/GNUmakefile.in @@ -0,0 +1,129 @@ +# === GNUmakefile ============================================================= +# Copyright (c) 1991, 1992, 1993 Chris Provenzano, proven@athena.mit.edu +# +# Description: This file is for creating libpthread.a +# +# 1.00 93/11/17 proven +# -Put all the .o files into one file libpthread.a +# -Initial cut for pthreads. +# + +INSTALL_PATH = $(exec_prefix) + + BINDIR = $(INSTALL_PATH)/bin + LIBDIR = $(INSTALL_PATH)/lib + MANDIR = $(INSTALL_PATH)/man + INCDIR = $(INSTALL_PATH)/include + SUBINCDIR = $(INCDIR)/pthread + + AR = ar + AS = gas + CFLAGS = -I. -Iinclude -I$(srcdir)/include -DPTHREAD_KERNEL \ + @CFLAGS@ + CXXFLAGS = -I. -Iinclude -I$(srcdir)/include -DPTHREAD_KERNEL \ + @CXXFLAGS@ + LD = gld + + CSRC = + + PTHREAD_DIR = pthreads stdlib stdio gen + DIRS = $(PTHREAD_DIR) + + HEADERS = + + LIBRARIES = libpthread.a + + .CURDIR = . + +# force correct default target +all: + +############################################################################### +# +# Read in any special flags that config knows about +include config.flags + +# What the heck. Convert srcdir to absolute form so it looks prettier. +srcdir := $(shell cd $(srcfoo) && pwd) + +################################################################################ +# +# Here starts the nitty grity part of the Makefile. + +all-lib : libpthread.a + +include ${srcdir}/pthreads/GNUmakefile.inc +include ${srcdir}/stdlib/GNUmakefile.inc +include ${srcdir}/stdio/GNUmakefile.inc +include ${srcdir}/string/GNUmakefile.inc +include ${srcdir}/gen/GNUmakefile.inc +include ${srcdir}/net/GNUmakefile.inc +include ${srcdir}/scripts/GNUmakefile.inc + +REGULAR_OBJS= $(subst .cc,.o,$(SRCS)) +REGULAR_OBJS:= $(subst .c,.o,$(REGULAR_OBJS)) +REGULAR_OBJS:= $(subst .S,.o,$(REGULAR_OBJS)) +OBJS= $(REGULAR_OBJS) $(EXTRA_OBJS) +REALOBJS = $(addprefix obj/, $(OBJS)) + +$(REALOBJS) : $(config) $(types) $(paths) + +# Since we do not have a list of the relevant files we do a make clean +# before copying everyting to the distribution directory. +distdir: + $(MAKE) clean + cp -a . $(distdir) + # Remove symlinks that the distribution should not have. + rm -f $(distdir)/config.cache \ + $(distdir)/include/pthread/machdep.h \ + $(distdir)/include/pthread/posix.h \ + $(distdir)/include/sys \ + $(distdir)/machdep.c \ + $(distdir)/syscall.S \ + $(distdir)/syscall-template.S + +clean: + rm -f a.out core maketmp makeout $(LIBRARIES) $(BINARIES) libpthread.* + rm -rf obj + cd tests && $(MAKE) clean && cd .. + +install-lib: $(LIBRARIES) install-dirs + for x in $(LIBRARIES); \ + do install $$x $(DESTDIR)$(LIBDIR); \ + done + +# Removed make install since mysql uses this in place. +# install-lib install-include install-bin +install: + +libpthread.a: obj/libpthread.a + rm -f libpthread.a + ln -s obj/libpthread.a . + +obj/libpthread.a: ${REALOBJS} + rm -f libpthread.a obj/new.a obj/libpthread.a + cd obj && \ + ar r new.a ${OBJS} && \ + $(RANLIB) new.a && \ + mv -f new.a libpthread.a && \ + cd .. + +# For examining a combined symbol table, sizes, &c. +libpthread.o: ${REALOBJS} + cd obj && ld -r -o ../libpthread.o ${OBJS} && cd .. + +obj/x: + if [ -d obj ]; then true; else mkdir obj; fi + cp /dev/null obj/x + +GNUmakefile: config.status ${srcdir}/config/GNUmakefile.in + $(SHELL) config.status + +obj/%.o: %.c obj/x + $(CC) $(CFLAGS) -c $< -o $@ + +obj/%.o: %.cc obj/x + $(CXX) $(CXXFLAGS) $(CFLAGS) -c $< -o $@ + +obj/%.o: %.S obj/x + $(CC) $(CFLAGS) -c $< -o $@ diff --git a/lib/libpthread/config/Makefile.in b/lib/libpthread/config/Makefile.in new file mode 100644 index 00000000000..f5f5ba5247b --- /dev/null +++ b/lib/libpthread/config/Makefile.in @@ -0,0 +1,52 @@ +# @(#)Makefile 5.2 (Berkeley) 3/5/91 +# + +LIB=pthread +#NOPIC= +#NOPROFILE=1 +CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/include -I${srcdir}/include -DPTHREAD_KERNEL +CDEBUGFLAGS= @CFLAGS@ +CFLAGS+= ${CDEBUGFLAGS} +# CFLAGS+= ${CPPFLAGS} <- done by bsd.lib.mk +CFLAGS+= ${CPPFLAGS} +LIBDIR= $(exec_prefix)/lib +BINDIR= $(exec_prefix)/bin +INCDIR= $(exec_prefix)/include +MANDIR= $(exec_prefix)/man + +.OBJDIR != if test -d ${.CURDIR}/obj ; then true ; else mkdir ${.CURDIR}/obj || exit 1 ; fi ; echo ${.CURDIR}/obj + +# Standard bsd install rules look for the "install" program, rather than +# using some variable. So, hack things so that that install rule works. +BINGRP != echo " " `groups` " " | sed 's/ [0-9][0-9]* / /g' | awk '{print $$1}' +BINOWN != echo $${USER} +LIBMODE = 644 # so ranlib can run! + +.include "config.flags" + +# %!$@ pmake seems to automagically cd into the obj directory, so relative +# srcdir references are completely botched. Try to figure out an absolute +# pathname for srcdir here, and live with it. +srcdir = $(srctop) + +beforeinstall: install-dirs + +.include "${srcdir}/pthreads/Makefile.inc" +.include "${srcdir}/stdlib/Makefile.inc" +.include "${srcdir}/stdio/Makefile.inc" +.include "${srcdir}/string/Makefile.inc" +.include "${srcdir}/gen/Makefile.inc" +.include "${srcdir}/net/Makefile.inc" +.include "${srcdir}/scripts/Makefile.inc" + +$(OBJS) : $(config) $(types) $(paths) + +Makefile: ${srcdir}/config/Makefile.in + cd ${.CURDIR} && sh config.status + +all-lib : libpthread.a +# Removed make install since mysql uses this in place. +#install : install-bin install-include +install: + +.include <bsd.lib.mk> diff --git a/lib/libpthread/config/acconfig.h b/lib/libpthread/config/acconfig.h new file mode 100644 index 00000000000..14552b0d851 --- /dev/null +++ b/lib/libpthread/config/acconfig.h @@ -0,0 +1,73 @@ +/* Does the OS already support struct timespec */ +#undef _OS_HAS_TIMESPEC + +/* For networking code: an integral type the size of an IP address (4 + octets). Determined by examining return values from certain + functions. */ +#undef pthread_ipaddr_type + +/* For networking code: an integral type the size of an IP port number + (2 octets). Determined by examining return values from certain + functions. */ +#undef pthread_ipport_type + +/* type of clock_t, from system header files */ +#undef pthread_clock_t + +/* Specially named so grep processing will find it and put it into the + generated ac-types.h. */ +#undef pthread_have_va_list_h + +/* type of size_t, from system header files */ +#undef pthread_size_t + +/* type of ssize_t, from system header files */ +#undef pthread_ssize_t + +/* type of time_t, from system header files */ +#undef pthread_time_t + +/* type of fpos_t, from system header files */ +#undef pthread_fpos_t + +/* type of off_t, from system header files */ +#undef pthread_off_t + +/* type of va_list, from system header files */ +#undef pthread_va_list + +/* type of sigset_t, from system header files */ +#undef pthread_sigset_t + +/* I don't know why the native compiler definitions aren't sufficient + for this. */ +#undef sunos4 + +/* define if the linker hauls in certain static data from libc even when + you don't want it to. yes, this description is bogus, but chris added + the need for this, without describing the problem. */ +#undef LD_LINKS_STATIC_DATA + +/* define if the system reissues the SIGCHLD if the handler reinstalls + * itself before calling wait() + */ +#undef BROKEN_SIGNALS + +/* where are terminal devices to be found? */ +#undef _PATH_PTY + +/* what directory holds the time zone info on this system? */ +#undef _PATH_TZDIR + +/* what file indicates the local time zone? */ +#undef _PATH_TZFILE + +/* Paths for various networking support files. */ +#undef _PATH_RESCONF +#undef _PATH_HOSTS +#undef _PATH_NETWORKS +#undef _PATH_PROTOCOLS +#undef _PATH_SERVICES + +/* Path for Bourne shell. */ +#undef _PATH_BSHELL diff --git a/lib/libpthread/config/aclocal.m4 b/lib/libpthread/config/aclocal.m4 new file mode 100755 index 00000000000..2a5cd3e9cbf --- /dev/null +++ b/lib/libpthread/config/aclocal.m4 @@ -0,0 +1,94 @@ +dnl Autoconf extensions for pthreads package. +dnl +ifelse(regexp(AC_DEFINE(xxxxx),.*@@@.*),-1,,[define(IS_AUTOHEADER)])])dnl +dnl +dnl Now, the real stuff needed by the pthreads package. +dnl +AC_DEFUN([PTHREADS_CHECK_ONE_SYSCALL], +[AC_MSG_CHECKING(for syscall $1) +AC_CACHE_VAL(pthreads_cv_syscall_$1, +AC_TRY_LINK([ +/* FIXME: This list should be generated from info in configure.in. */ +#ifdef HAVE_SYSCALL_H +#include <syscall.h> +#else +#ifdef HAVE_SYS_SYSCALL_H +#include <sys/syscall.h> +#else +where is your syscall header file?? +#endif +#endif +],[ +int x; +x = SYS_$1 ; +], +eval pthreads_cv_syscall_$1=yes, +eval pthreads_cv_syscall_$1=no)) +if eval test \$pthreads_cv_syscall_$1 = yes ; then + pthreads_syscall_present=yes + available_syscalls="$available_syscalls $1" +dnl Can't just do the obvious substitution here or autoheader gets +dnl sorta confused. (Sigh.) Getting the requoting of the brackets right +dnl would be a pain too. + macroname=HAVE_SYSCALL_`echo $1 | tr '[[[a-z]]]' '[[[A-Z]]]'` + AC_DEFINE_UNQUOTED($macroname) +else + pthreads_syscall_present=no + missing_syscalls="$missing_syscalls $1" +fi +AC_MSG_RESULT($pthreads_syscall_present) +])dnl +dnl +AC_DEFUN(PTHREADS_CHECK_SYSCALLS,dnl +ifdef([IS_AUTOHEADER],[# +dnl Need to fake out autoheader, since there's no way to add a new class +dnl of features to generate config.h.in entries for. +@@@syscalls="$1"@@@ +@@@funcs="$funcs syscall_`echo $syscalls | sed 's/ / syscall_/g'`"@@@ +], +[pthreads_syscall_list="$1" +for pthreads_syscallname in $pthreads_syscall_list ; do + PTHREADS_CHECK_ONE_SYSCALL([$]pthreads_syscallname) +done +]))dnl +dnl +dnl Requote each argument. +define([requote], [ifelse($#, 0, , $#, 1, "$1", + "$1" [requote(builtin(shift,$@))])])dnl +dnl +dnl Determine proper typedef value for a typedef name, and define a +dnl C macro to expand to that type. (A shell variable with that value +dnl is also created.) If none of the specified types to try match, the +dnl macro is left undefined, and the shell variable empty. If the +dnl typedef name cannot be found in the specified header files, this +dnl test errors out; perhaps it should be changed to simply leave the +dnl macro undefined... +dnl +dnl PTHREADS_FIND_TYPE(typedefname,varname,includes,possible values...) +dnl +AC_DEFUN(PTHREADS_FIND_TYPE, +ifdef([IS_AUTOHEADER],[# +@@@syms="$syms $2"@@@ +],[dnl +AC_MSG_CHECKING(type of $1) +AC_CACHE_VAL(pthreads_cv_type_$1, +[AC_TRY_COMPILE([$3],[ extern $1 foo; ], +[ for try_type in [requote(builtin(shift,builtin(shift,builtin(shift,$@))))] ; do + AC_TRY_COMPILE([$3],[ extern $1 foo; extern $try_type foo; ], + [ pthreads_cv_type_$1="$try_type" ; break ]) + done], + AC_MSG_ERROR(Can't find system typedef for $1.))]) +if test -n "$pthreads_cv_type_$1" ; then + AC_DEFINE_UNQUOTED($2,$pthreads_cv_type_$1) +fi +$2=$pthreads_cv_type_$1 +AC_MSG_RESULT($pthreads_cv_type_$1)]))dnl +dnl +dnl +dnl Like above, but the list of types to try is pre-specified. +dnl +AC_DEFUN(PTHREADS_FIND_INTEGRAL_TYPE,[ +PTHREADS_FIND_TYPE([$1], [$2], [$3], + int, unsigned int, long, unsigned long, + short, unsigned short, char, unsigned char, + long long, unsigned long long)])dnl diff --git a/lib/libpthread/config/config.flags.in b/lib/libpthread/config/config.flags.in new file mode 100755 index 00000000000..3d16423a045 --- /dev/null +++ b/lib/libpthread/config/config.flags.in @@ -0,0 +1,80 @@ +# Since the real configure script runs from the config subdirectory, +# compensate here... +srctop= @srctop@ +srcfoo= $(srctop) + +prefix= @prefix@ +exec_prefix= @exec_prefix@ + +cpu = @target_cpu@ +os = @target_os@ + +MISSING_SYSCALLS = @missing_syscalls@ +AVAILABLE_SYSCALLS = @available_syscalls@ +SYSCALL_EXCEPTIONS = @SYSCALL_EXCEPTIONS@ +HAVE_SYSCALL_TEMPLATE = @HAVE_SYSCALL_TEMPLATE@ + +CC = @CC@ +CXX = @CXX@ +CPP = @CPP@ +SHELL = /bin/sh +RANLIB = @RANLIB@ +# Should use autoconf to find these. Currently our makefiles are inconsistent. +#AR = ar +#AS = gas +#LD = gld + +install-dirs: + for d in $(INSTALL_PATH) $(BINDIR) $(LIBDIR) $(INCDIR) ; do \ + test -d $(DESTDIR)$$d || mkdir $(DESTDIR)$$d || exit 1 ; \ + done + +config.status: @srcdir@/configure + cd ${.CURDIR} && $(SHELL) config.status --recheck +config.flags: config.status @srcdir@/config.flags.in + cd ${.CURDIR} && $(SHELL) config.status + +realclean: clean + cd tests && $(MAKE) realclean && cd .. + rm -f $(LINKS) config.status config.flags config.cache \ + Makefile GNUmakefile + +types=$(.CURDIR)/include/pthread/ac-types.h +$(types) : config.h + echo '#ifndef pthread_size_t' > $(types).new + egrep '^#define pthread_' $(.CURDIR)/config.h >> $(types).new + echo '#endif' >> $(types).new + mv -f $(types).new $(types) + +config=$(.CURDIR)/include/pthread/config.h +$(config) : config.h + echo '#ifndef _SYS___CONFIG_H_' > $(config).new + echo '#define _SYS___CONFIG_H_' >> $(config).new + -egrep '^#define _OS_HAS' $(.CURDIR)/config.h >> $(config).new + echo '#endif' >> $(config).new + mv -f $(config).new $(config) + +paths=$(.CURDIR)/include/pthread/paths.h +$(paths) : config.h + echo '#ifndef _SYS___PATHS_H_' > $(paths).new + echo '#define _SYS___PATHS_H_' >> $(paths).new + egrep '^#define _PATH' $(.CURDIR)/config.h >> $(paths).new + echo '#endif' >> $(paths).new + mv -f $(paths).new $(paths) + +all-tests: all-lib + cd ${.CURDIR}/tests && $(MAKE) all +check: all-lib + cd ${.CURDIR}/tests && $(MAKE) check +all : all-lib all-bin + +install-bin: all-bin install-dirs + for x in $(SCRIPTS) ; do \ + install $$x $(DESTDIR)$(BINDIR); \ + done + +install-include: install-dirs + (cd ${srcdir}/include && tar chf - .)|(cd $(DESTDIR)$(INCDIR) && tar xf -) + if [ -d config ]; then true; else \ + (cd ${.CURDIR}/include && tar chf - .)|(cd $(DESTDIR)$(INCDIR) && tar xf -); fi + (cd $(DESTDIR)$(INCDIR) && find . \( -name CVS -o -name \*~ \) -print | xargs rm -rf) diff --git a/lib/libpthread/config/config.guess b/lib/libpthread/config/config.guess new file mode 100644 index 00000000000..7fb2d744e03 --- /dev/null +++ b/lib/libpthread/config/config.guess @@ -0,0 +1,480 @@ +#!/bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner <bothner@cygnus.com>. +# The master version of this file is at the FSF in /home/gd/gnu/lib. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit system type (host/target name). +# +# Only a few systems have been added to this list; please add others +# (but try to keep the structure clean). +# + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:V*:*) + # After 1.2, OSF1 uses "V1.3" for uname -r. + echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'` + exit 0 ;; + alpha:OSF1:*:*) + # 1.2 uses "1.2" for uname -r. + echo alpha-dec-osf${UNAME_RELEASE} + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + Pyramid*:OSx*:*:*) + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + sun4*:SunOS:5.*:*) + echo sparc-sun-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:*:*) + # 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 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + mips:*:5*:RISCos) + echo mips-mips-riscos${UNAME_RELEASE} + 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:*:*) + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ + -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + 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${UNAME_RELEASE} + exit 0 ;; + i[34]86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >dummy.c + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if grep bos410 /usr/include/stdio.h >/dev/null 2>&1; then + IBM_REV=4.1 + elif grep bos411 /usr/include/stdio.h >/dev/null 2>&1; then + IBM_REV=4.1.1 + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + *: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/[3478]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/7?? | 9000/8?7 ) HP_ARCH=hppa1.1 ;; + 9000/8?? ) HP_ARCH=hppa1.0 ;; + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >dummy.c + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + hp7??:OSF1:*:* | hp8?7:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + 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:UNICOS:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:UNICOS:*:*) + echo ymp-cray-unicos + exit 0 ;; + CRAY-2:UNICOS:*:*) + echo cray2-cray-unicos + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + i[34]86:BSD/386:*:* | *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + 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[34]86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*) + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i[34]86:*:3.2:*) + if /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL + elif test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL + else + echo ${UNAME_MACHINE}-unknown-sysv32 + fi + exit 0 ;; + i?86:*:5:7) + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE} + exit 0 ;; + Intel:Mach:3*:*) + echo i386-unknown-mach3 + 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 ;; + M680[234]0:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0) + uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3 && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m680[234]0:LynxOS:2.2*:*) + echo m68k-lynx-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i[34]86:LynxOS:2.2*:*) + echo i386-lynx-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.2*:*) + echo sparc-lynx-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.2*:*) + echo rs6000-lynx-lynxos${UNAME_RELEASE} + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >dummy.c <<EOF +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 + printf ("m68k-sony-newsos\n"); 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`; + printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3"); + 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-unknown-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_) + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 +rm -f dummy.c dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +#echo '(Unable to guess system type)' 1>&2 + +exit 1 diff --git a/lib/libpthread/config/config.h.in b/lib/libpthread/config/config.h.in new file mode 100755 index 00000000000..6efdcf68d44 --- /dev/null +++ b/lib/libpthread/config/config.h.in @@ -0,0 +1,315 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define to `long' if <sys/types.h> doesn't define. */ +#undef off_t + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +#undef size_t + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you can safely include both <sys/time.h> and <time.h>. */ +#undef TIME_WITH_SYS_TIME + +/* Does the OS already support struct timespec */ +#undef _OS_HAS_TIMESPEC + +/* For networking code: an integral type the size of an IP address (4 + octets). Determined by examining return values from certain + functions. */ +#undef pthread_ipaddr_type + +/* For networking code: an integral type the size of an IP port number + (2 octets). Determined by examining return values from certain + functions. */ +#undef pthread_ipport_type + +/* type of clock_t, from system header files */ +#undef pthread_clock_t + +/* Specially named so grep processing will find it and put it into the + generated ac-types.h. */ +#undef pthread_have_va_list_h + +/* type of size_t, from system header files */ +#undef pthread_size_t + +/* type of ssize_t, from system header files */ +#undef pthread_ssize_t + +/* type of time_t, from system header files */ +#undef pthread_time_t + +/* type of fpos_t, from system header files */ +#undef pthread_fpos_t + +/* type of off_t, from system header files */ +#undef pthread_off_t + +/* type of va_list, from system header files */ +#undef pthread_va_list + +/* I don't know why the native compiler definitions aren't sufficient + for this. */ +#undef sunos4 + +/* define if the linker hauls in certain static data from libc even when + you don't want it to. yes, this description is bogus, but chris added + the need for this, without describing the problem. */ +#undef LD_LINKS_STATIC_DATA + +/* define if the system reissues the SIGCHLD if the handler reinstalls + * itself before calling wait() + */ +#undef BROKEN_SIGNALS + +/* where are terminal devices to be found? */ +#undef _PATH_PTY + +/* what directory holds the time zone info on this system? */ +#undef _PATH_TZDIR + +/* what file indicates the local time zone? */ +#undef _PATH_TZFILE + +/* Paths for various networking support files. */ +#undef _PATH_RESCONF +#undef _PATH_HOSTS +#undef _PATH_NETWORKS +#undef _PATH_PROTOCOLS +#undef _PATH_SERVICES + +/* Path for Bourne shell. */ +#undef _PATH_BSHELL + +/* Define if you have the syscall_accept function. */ +#undef HAVE_SYSCALL_ACCEPT + +/* Define if you have the syscall_bind function. */ +#undef HAVE_SYSCALL_BIND + +/* Define if you have the syscall_chdir function. */ +#undef HAVE_SYSCALL_CHDIR + +/* Define if you have the syscall_chmod function. */ +#undef HAVE_SYSCALL_CHMOD + +/* Define if you have the syscall_chown function. */ +#undef HAVE_SYSCALL_CHOWN + +/* Define if you have the syscall_close function. */ +#undef HAVE_SYSCALL_CLOSE + +/* Define if you have the syscall_connect function. */ +#undef HAVE_SYSCALL_CONNECT + +/* Define if you have the syscall_creat function. */ +#undef HAVE_SYSCALL_CREAT + +/* Define if you have the syscall_dup function. */ +#undef HAVE_SYSCALL_DUP + +/* Define if you have the syscall_dup2 function. */ +#undef HAVE_SYSCALL_DUP2 + +/* Define if you have the syscall_execve function. */ +#undef HAVE_SYSCALL_EXECVE + +/* Define if you have the syscall_exit function. */ +#undef HAVE_SYSCALL_EXIT + +/* Define if you have the syscall_fchmod function. */ +#undef HAVE_SYSCALL_FCHMOD + +/* Define if you have the syscall_fchown function. */ +#undef HAVE_SYSCALL_FCHOWN + +/* Define if you have the syscall_fcntl function. */ +#undef HAVE_SYSCALL_FCNTL + +/* Define if you have the syscall_flock function. */ +#undef HAVE_SYSCALL_FLOCK + +/* Define if you have the syscall_fork function. */ +#undef HAVE_SYSCALL_FORK + +/* Define if you have the syscall_fstat function. */ +#undef HAVE_SYSCALL_FSTAT + +/* Define if you have the syscall_fstatfs function. */ +#undef HAVE_SYSCALL_FSTATFS + +/* Define if you have the syscall_ftruncate function. */ +#undef HAVE_SYSCALL_FTRUNCATE + +/* Define if you have the syscall_getdents function. */ +#undef HAVE_SYSCALL_GETDENTS + +/* Define if you have the syscall_getdirentries function. */ +#undef HAVE_SYSCALL_GETDIRENTRIES + +/* Define if you have the syscall_getdtablesize function. */ +#undef HAVE_SYSCALL_GETDTABLESIZE + +/* Define if you have the syscall_getmsg function. */ +#undef HAVE_SYSCALL_GETMSG + +/* Define if you have the syscall_getpeername function. */ +#undef HAVE_SYSCALL_GETPEERNAME + +/* Define if you have the syscall_getpgrp function. */ +#undef HAVE_SYSCALL_GETPGRP + +/* Define if you have the syscall_getsockname function. */ +#undef HAVE_SYSCALL_GETSOCKNAME + +/* Define if you have the syscall_getsockopt function. */ +#undef HAVE_SYSCALL_GETSOCKOPT + +/* Define if you have the syscall_ioctl function. */ +#undef HAVE_SYSCALL_IOCTL + +/* Define if you have the syscall_ksigaction function. */ +#undef HAVE_SYSCALL_KSIGACTION + +/* Define if you have the syscall_link function. */ +#undef HAVE_SYSCALL_LINK + +/* Define if you have the syscall_listen function. */ +#undef HAVE_SYSCALL_LISTEN + +/* Define if you have the syscall_lseek function. */ +#undef HAVE_SYSCALL_LSEEK + +/* Define if you have the syscall_lstat function. */ +#undef HAVE_SYSCALL_LSTAT + +/* Define if you have the syscall_open function. */ +#undef HAVE_SYSCALL_OPEN + +/* Define if you have the syscall_pgrpsys function. */ +#undef HAVE_SYSCALL_PGRPSYS + +/* Define if you have the syscall_pipe function. */ +#undef HAVE_SYSCALL_PIPE + +/* Define if you have the syscall_poll function. */ +#undef HAVE_SYSCALL_POLL + +/* Define if you have the syscall_putmsg function. */ +#undef HAVE_SYSCALL_PUTMSG + +/* Define if you have the syscall_read function. */ +#undef HAVE_SYSCALL_READ + +/* Define if you have the syscall_readdir function. */ +#undef HAVE_SYSCALL_READDIR + +/* Define if you have the syscall_readv function. */ +#undef HAVE_SYSCALL_READV + +/* Define if you have the syscall_recv function. */ +#undef HAVE_SYSCALL_RECV + +/* Define if you have the syscall_recvfrom function. */ +#undef HAVE_SYSCALL_RECVFROM + +/* Define if you have the syscall_recvmsg function. */ +#undef HAVE_SYSCALL_RECVMSG + +/* Define if you have the syscall_rename function. */ +#undef HAVE_SYSCALL_RENAME + +/* Define if you have the syscall_select function. */ +#undef HAVE_SYSCALL_SELECT + +/* Define if you have the syscall_send function. */ +#undef HAVE_SYSCALL_SEND + +/* Define if you have the syscall_sendmsg function. */ +#undef HAVE_SYSCALL_SENDMSG + +/* Define if you have the syscall_sendto function. */ +#undef HAVE_SYSCALL_SENDTO + +/* Define if you have the syscall_setsockopt function. */ +#undef HAVE_SYSCALL_SETSOCKOPT + +/* Define if you have the syscall_shutdown function. */ +#undef HAVE_SYSCALL_SHUTDOWN + +/* Define if you have the syscall_sigaction function. */ +#undef HAVE_SYSCALL_SIGACTION + +/* Define if you have the syscall_sigpause function. */ +#undef HAVE_SYSCALL_SIGPAUSE + +/* Define if you have the syscall_sigprocmask function. */ +#undef HAVE_SYSCALL_SIGPROCMASK + +/* Define if you have the syscall_sigsuspend function. */ +#undef HAVE_SYSCALL_SIGSUSPEND + +/* Define if you have the syscall_socket function. */ +#undef HAVE_SYSCALL_SOCKET + +/* Define if you have the syscall_socketcall function. */ +#undef HAVE_SYSCALL_SOCKETCALL + +/* Define if you have the syscall_socketpair function. */ +#undef HAVE_SYSCALL_SOCKETPAIR + +/* Define if you have the syscall_stat function. */ +#undef HAVE_SYSCALL_STAT + +/* Define if you have the syscall_unlink function. */ +#undef HAVE_SYSCALL_UNLINK + +/* Define if you have the syscall_wait3 function. */ +#undef HAVE_SYSCALL_WAIT3 + +/* Define if you have the syscall_wait4 function. */ +#undef HAVE_SYSCALL_WAIT4 + +/* Define if you have the syscall_waitpid function. */ +#undef HAVE_SYSCALL_WAITPID + +/* Define if you have the syscall_waitsys function. */ +#undef HAVE_SYSCALL_WAITSYS + +/* Define if you have the syscall_write function. */ +#undef HAVE_SYSCALL_WRITE + +/* Define if you have the syscall_writev function. */ +#undef HAVE_SYSCALL_WRITEV + +/* Define if you have the vfork function. */ +#undef HAVE_VFORK + +/* Define if you have the <alloc.h> header file. */ +#undef HAVE_ALLOC_H + +/* Define if you have the <sys/filio.h> header file. */ +#undef HAVE_SYS_FILIO_H + +/* Define if you have the <sys/syscall.h> header file. */ +#undef HAVE_SYS_SYSCALL_H + +/* Define if you have the <sys/termio.h> header file. */ +#undef HAVE_SYS_TERMIO_H + +/* Define if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H + +/* Define if you have the <syscall.h> header file. */ +#undef HAVE_SYSCALL_H + +/* Define if you have the <termio.h> header file. */ +#undef HAVE_TERMIO_H + +/* Define if you have the <termios.h> header file. */ +#undef HAVE_TERMIOS_H diff --git a/lib/libpthread/config/config.sub b/lib/libpthread/config/config.sub new file mode 100644 index 00000000000..26bba506ef7 --- /dev/null +++ b/lib/libpthread/config/config.sub @@ -0,0 +1,794 @@ +#!/bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +esac + +# Separate what the user gave into CPU-COMPANY and OS (if any). +basic_machine=`echo $1 | sed 's/-[^-]*$//'` +if [ $basic_machine != $1 ] +then os=`echo $1 | sed 's/.*-/-/'` +else os=; fi + +### 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 ) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -lynx) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; +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 | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ + | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ + | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ + | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ + | pdp11 | mips64el | mips64orion | mips64orionel ) + basic_machine=$basic_machine-unknown + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \ + | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ + | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ + | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ + | pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* ) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigados) + basic_machine=m68k-cbm + os=-amigados + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + 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 + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[3456]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-sysv32 + ;; + i[3456]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-sysv4 + ;; + i[3456]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-sysv + ;; + i[3456]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium-*) + # We will change tis to say i586 once there has been + # time for various packages to start to recognize that. + basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + ps2) + basic_machine=i386-ibm + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + mips) + basic_machine=mips-mips + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux|'` + ;; + # 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[3456]* \ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ + | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ + | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -freebsd* | -openbsd* \ + |-riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -winnt*) + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigados + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-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 + ;; + *-masscomp) + os=-rtu + ;; + *) + 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 + ;; + -lynxos*) + vendor=lynx + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os diff --git a/lib/libpthread/config/configure b/lib/libpthread/config/configure new file mode 100644 index 00000000000..b103492f524 --- /dev/null +++ b/lib/libpthread/config/configure @@ -0,0 +1,3161 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.12 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help +--enable-dce-compat DCE compatibility" +ac_default_prefix=/usr/local/pthreads + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.12" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=config.flags.in + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + +# Check whether --enable-dce-compat or --disable-dce-compat was given. +if test "${enable_dce_compat+set}" = set; then + enableval="$enable_dce_compat" + { echo "configure: error: Actually, DCE compatibility doesn't work yet..." 1>&2; exit 1; } + +else + true + +fi + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:539: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:568: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:616: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <<EOF +#line 626 "configure" +#include "confdefs.h" +main(){return(0);} +EOF +if { (eval echo configure:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:650: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:655: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:679: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +for ac_prog in $CCC c++ g++ gcc CC cxx cc++ +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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:711: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CXX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CXX="$ac_cv_prog_CXX" +if test -n "$CXX"; then + echo "$ac_t""$CXX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$CXX" && break +done +test -n "$CXX" || CXX="gcc" + + +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:742: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext <<EOF +#line 752 "configure" +#include "confdefs.h" +main(){return(0);} +EOF +if { (eval echo configure:756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cxx_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cxx_cross=no + else + ac_cv_prog_cxx_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cxx_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 +if test $ac_cv_prog_cxx_works = no; then + { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:782: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 +cross_compiling=$ac_cv_prog_cxx_cross + +echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +echo "configure:787: checking whether we are using GNU C++" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.C <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gxx=yes +else + ac_cv_prog_gxx=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gxx" 1>&6 + +if test $ac_cv_prog_gxx = yes; then + GXX=yes + ac_test_CXXFLAGS="${CXXFLAGS+set}" + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS= + echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +echo "configure:811: checking whether ${CXX-g++} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.cc +if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then + ac_cv_prog_cxx_g=yes +else + ac_cv_prog_cxx_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" + elif test $ac_cv_prog_cxx_g = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-O2" + fi +else + GXX= + test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" +fi + +echo $ac_n "checking compiler availability and simple error detection""... $ac_c" 1>&6 +echo "configure:839: checking compiler availability and simple error detection" >&5 +cat > conftest.$ac_ext <<EOF +#line 841 "configure" +#include "confdefs.h" + +int main() { + exit(0); +; return 0; } +EOF +if { (eval echo configure:848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat > conftest.$ac_ext <<EOF +#line 852 "configure" +#include "confdefs.h" + +int main() { + syntax errors galore! +; return 0; } +EOF +if { (eval echo configure:859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + { echo "configure: error: Can't detect syntax errors! Is CC set right?" 1>&2; exit 1; } +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + true +fi +rm -f conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: Can't compile test program! Is CC set right?" 1>&2; exit 1; } +fi +rm -f conftest* + +cat > conftest.$ac_ext <<EOF +#line 878 "configure" +#include "confdefs.h" + +int main() { + + typedef int Integer; + extern int i; + extern Integer i; + +; return 0; } +EOF +if { (eval echo configure:889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: Can't redeclare variables with this compiler??" 1>&2; exit 1; } +fi +rm -f conftest* +cat > conftest.$ac_ext <<EOF +#line 899 "configure" +#include "confdefs.h" + +int main() { + + typedef long Long; + extern int i; + extern Long i; + +; return 0; } +EOF +if { (eval echo configure:910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + { echo "configure: error: Compiler doesn't detect conflicting declarations." 1>&2; exit 1; } +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +echo "$ac_t""ok" 1>&6 + +if test $ac_cv_prog_gcc = yes ; then + CFLAGS="$CFLAGS -Werror" +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:925: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +#line 940 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +#line 957 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:989: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + + +# Do some error checking and defaulting for the host and target type. +# The inputs are: +# configure --host=HOST --target=TARGET --build=BUILD NONOPT +# +# The rules are: +# 1. You are not allowed to specify --host, --target, and nonopt at the +# same time. +# 2. Host defaults to nonopt. +# 3. If nonopt is not specified, then host defaults to the current host, +# as determined by config.guess. +# 4. Target and build default to nonopt. +# 5. If nonopt is not specified, then target and build default to host. + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +case $host---$target---$nonopt in +NONE---*---* | *---NONE---* | *---*---NONE) ;; +*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; +esac + + +# Make sure we can run config.sub. +if $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:1065: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`$ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:1086: checking target system type" >&5 + +target_alias=$target +case "$target_alias" in +NONE) + case $nonopt in + NONE) target_alias=$host_alias ;; + *) target_alias=$nonopt ;; + esac ;; +esac + +target=`$ac_config_sub $target_alias` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$target" 1>&6 + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:1104: checking build system type" >&5 + +build_alias=$build +case "$build_alias" in +NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; +esac + +build=`$ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$build" 1>&6 + +test "$host_alias" != "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + + +syscall=NONE +sysincludes=NONE + +# Treat all x86 machines the same. +# (Yet below, we pretend we can distinguish between the MIPS r2000 and r4000?) +# (What about 680x0 machines?) +case $host in + i[456]86-*) + host=`echo $host | sed 's/^i[456]86/i386/'` + host_cpu=i386 + ;; +esac + +# Here, you should set the following variables: +# name +# The "name" of this configuration. Used for "engine-*.c" file name, +# default for syscall file names. Chris seems to have a thing for +# putting "-" between OS and version number, but the configure script +# will already have $host_cpu and $host_os available for you to use +# in constructing a name. +# sysincludes +# Name of machdep directory with "sys" include file +# replacements, if any. This directory is optional; +# if you don't provide it, don't set this variable. +# except +# Names of any syscalls that shouldn't be generated +# from the template, if any. +# syscall +# Base name of the syscall template files, if not the +# same as <name>. If they're the same, omit this. +# +# Also, you may define random symbols and update CFLAGS if +# necessary. However, for ease of porting to new machines, +# it's best if you can create portable autoconf tests for +# whatever you're trying to do, rather than hard-coding it +# here based on the OS name. So please, try to keep this +# section as minimal as possible. + +except="" +name=$host_cpu-$host_os + +case $host in + alpha-*-netbsd1.3*) + name=alpha-netbsd-1.3 + sysincludes=netbsd-1.1 + except="fork lseek pipe sigsuspend sigprocmask fstat" + ;; + alpha-*-netbsd1.1* | alpha-*-netbsd1.2*) + name=alpha-netbsd-1.1 + sysincludes=netbsd-1.1 + except="fork lseek pipe sigsuspend sigprocmask" + ;; + alpha-*-osf*) + name=alpha-osf1 + sysincludes=alpha-osf1 + except="fork sigsuspend" + if test $ac_cv_prog_gcc = no ; then + CFLAGS="$CFLAGS -std" + fi + ;; + hppa1.0-*-hpux10.20 | hppa1.1-*-hpux10.20) + name=hppa-hpux-10.20 + sysincludes=hpux-10.20 + except="fork" + ;; + hppa1.1-*-hpux*9.*) + name=hppa-hpux-9.03 + sysincludes=hpux-9.03 + # hpux-9.03.mk seems to be missing; what should this be? + except="fork" + ;; + sparc-*-sunos4.1.3* | sparc-*-sunos4.1.4*) + name=sparc-sunos-4.1.3 + sysincludes=sunos-4.1.3 + syscall=sparc-sunos4 + except="fork pipe getpgrp getdirentries" + cat >> confdefs.h <<\EOF +#define sunos4 1 +EOF + # is this really needed?? + ;; + sparc-*-solaris2.3* | sparc-*-solaris2.4*) + name=sparc-sunos-5.3 + sysincludes=sunos-5.3 + except="fork sigaction" + # Should really come up with a test for this... + cat >> confdefs.h <<\EOF +#define LD_LINKS_STATIC_DATA 1 +EOF + + cat >> confdefs.h <<\EOF +#define BROKEN_SIGNALS 1 +EOF + + ;; + sparc-*-solaris2*) + name=sparc-sunos-5.3 + sysincludes=sunos-5.5 + except="fork sigaction" + # Should really come up with a test for this... + cat >> confdefs.h <<\EOF +#define LD_LINKS_STATIC_DATA 1 +EOF + + cat >> confdefs.h <<\EOF +#define BROKEN_SIGNALS 1 +EOF + + ;; + sparc-*-netbsd1.0A | sparc-*-netbsd1.1* | sparc-*-netbsd1.2*) + name=sparc-sunos-4.1.3 + sysincludes=netbsd-1.0 + syscall=sparc-netbsd-1.1 + except="pipe fork sigprocmask sigsuspend" + ;; + i386-*-openbsd2.*) + name=i386-openbsd-2.0 + sysincludes=openbsd-2.0 + except="fork lseek ftruncate sigsuspend sigprocmask" + ;; + i386-*-linux*) + name=i386-linux-1.0 + sysincludes=linux-1.0 + ;; + i386-*-bsdi1.1) + name=i386-bsdi-1.1 + sysincludes=bsdi-1.1 + ;; + i386-*-bsdi2.0* | i386-*-bsdi2.1*) + name=i386-bsdi-2.0 + sysincludes=bsdi-2.0 + syscall=i386-bsdi-2.0 + except="fork lseek ftruncate sigsuspend" + ;; + i386-*-netbsd1.3*) + name=i386-netbsd-1.3 + sysincludes=netbsd-1.1 + except="fork lseek ftruncate pipe sigsuspend sigprocmask fstat" + ;; + i386-*-netbsd1.1* | i386-*-netbsd1.2*) + name=i386-netbsd-1.0 + sysincludes=netbsd-1.1 + syscall=i386-netbsd-1.1 + except="fork lseek ftruncate pipe sigsuspend sigprocmask" + ;; + i386-*-netbsd1.0*) + name=i386-netbsd-1.0 + sysincludes=netbsd-1.0 + except="fork lseek ftruncate sigsuspend" + ;; + i386-*-netbsd0.9*) + name=i386-netbsd-0.9 + sysincludes=netbsd-0.9 + ;; + m68*-*-netbsd*) + name=m68000-netbsd + ;; + i386-*-freebsd2.*) + name=i386-freebsd-2.0 + sysincludes=freebsd-2.0 + except="fork lseek ftruncate sigsuspend sigprocmask" + ;; + romp-*-bsd*) + name=romp-bsd + ;; + mips-dec-ultrix*) + name=r2000-ultrix-4.2 + sysincludes=ultrix-4.2 + except="fork pipe" + ;; + mips-sgi-irix*) + name=ip22-irix-5.2 + sysincludes=irix-5.2 + except="fstat stat" + cat >> confdefs.h <<\EOF +#define BROKEN_SIGNALS 1 +EOF + + ;; + i386-*-sco3.2v5*) + name=i386-sco3.2.5 + sysincludes=i386-sco3.2.5 + syscall=i386-sco3.2.5 + except="select socketcall accept bind connect getpeername getsockname getsockopt setsockopt listen recv recvfrom recvmsg send sendmsg sendto shutdown socket socketpair fork fcntl dup2 fstat fchmod fchown ftruncate pipe getdirentries sigaction sigpause wait3 waitpid getdtablesize" + ;; + *) + { echo "configure: error: System type $host not recognized or not supported. +See $srcdir/configure.in for supported systems." 1>&2; exit 1; } + exit 1 + ;; +esac + +SYSCALL_EXCEPTIONS=$except + + +for ac_hdr in sys/termio.h termios.h termio.h alloc.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1326: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1331 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +ac_safe=`echo "va_list.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for va_list.h""... $ac_c" 1>&6 +echo "configure:1365: checking for va_list.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1370 "configure" +#include "confdefs.h" +#include <va_list.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define pthread_have_va_list_h 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +for ac_hdr in syscall.h sys/syscall.h sys/filio.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1404: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1409 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +pthreads_syscall_list="open write read creat close fcntl lseek dup2 dup pipe + fchmod fchown execve fstat lstat link unlink chdir chown chmod stat + rename select getdtablesize ioctl ftruncate flock fstatfs + sigsuspend sigaction sigpause sigprocmask ksigaction + getdents readdir getdirentries + wait4 wait3 waitpid waitsys + socket bind connect accept listen getsockopt setsockopt socketpair + poll putmsg getmsg + socketcall + + pgrpsys + + exit + readv writev send sendto sendmsg recv recvfrom recvmsg + getpeername getsockname + shutdown + getpgrp fork" +for pthreads_syscallname in $pthreads_syscall_list ; do + echo $ac_n "checking for syscall $pthreads_syscallname""... $ac_c" 1>&6 +echo "configure:1460: checking for syscall $pthreads_syscallname" >&5 +if eval "test \"`echo '$''{'pthreads_cv_syscall_$pthreads_syscallname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1465 "configure" +#include "confdefs.h" + +/* FIXME: This list should be generated from info in configure.in. */ +#ifdef HAVE_SYSCALL_H +#include <syscall.h> +#else +#ifdef HAVE_SYS_SYSCALL_H +#include <sys/syscall.h> +#else +where is your syscall header file?? +#endif +#endif + +int main() { + +int x; +x = SYS_$pthreads_syscallname ; + +; return 0; } +EOF +if { (eval echo configure:1486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval pthreads_cv_syscall_$pthreads_syscallname=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval pthreads_cv_syscall_$pthreads_syscallname=no +fi +rm -f conftest* +fi + +if eval test \$pthreads_cv_syscall_$pthreads_syscallname = yes ; then + pthreads_syscall_present=yes + available_syscalls="$available_syscalls $pthreads_syscallname" + macroname=HAVE_SYSCALL_`echo $pthreads_syscallname | tr '[a-z]' '[A-Z]'` + cat >> confdefs.h <<EOF +#define $macroname 1 +EOF + +else + pthreads_syscall_present=no + missing_syscalls="$missing_syscalls $pthreads_syscallname" +fi +echo "$ac_t""$pthreads_syscall_present" 1>&6 + +done + + + + + + +## Determine some typedef values from the system header files. +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1521: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1526 "configure" +#include "confdefs.h" +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1551 "configure" +#include "confdefs.h" +#include <string.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1569 "configure" +#include "confdefs.h" +#include <stdlib.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext <<EOF +#line 1590 "configure" +#include "confdefs.h" +#include <ctype.h> +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:1625: checking for off_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1630 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:1658: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1663 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:1691: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1696 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <signal.h> +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:1713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <<EOF +#define RETSIGTYPE $ac_cv_type_signal +EOF + + +echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +echo "configure:1732: checking for ssize_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1737 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_ssize_t=yes +else + rm -rf conftest* + ac_cv_type_ssize_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 +if test $ac_cv_type_ssize_t = no; then + cat >> confdefs.h <<\EOF +#define ssize_t int +EOF + +fi + +echo $ac_n "checking for time_t""... $ac_c" 1>&6 +echo "configure:1765: checking for time_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1770 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "time_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_time_t=yes +else + rm -rf conftest* + ac_cv_type_time_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_time_t" 1>&6 +if test $ac_cv_type_time_t = no; then + cat >> confdefs.h <<\EOF +#define time_t long +EOF + +fi + +for ac_hdr in sys/time.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1801: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1806 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:1838: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1843 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/time.h> +#include <time.h> +int main() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:1852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + + +echo $ac_n "checking for struct timespec in sys/time.h""... $ac_c" 1>&6 +echo "configure:1874: checking for struct timespec in sys/time.h" >&5 +if eval "test \"`echo '$''{'pthreads_cv_timespec_in_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1879 "configure" +#include "confdefs.h" +#include <sys/time.h> +int main() { +struct timespec foo; +; return 0; } +EOF +if { (eval echo configure:1886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_timespec_in_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + pthreads_cv_timespec_in_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$pthreads_cv_timespec_in_time" 1>&6 +if test $pthreads_cv_timespec_in_time = yes ; then + cat >> confdefs.h <<\EOF +#define _OS_HAS_TIMESPEC 1 +EOF + +fi + + + +echo $ac_n "checking type of size_t""... $ac_c" 1>&6 +echo "configure:1909: checking type of size_t" >&5 +if eval "test \"`echo '$''{'pthreads_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1914 "configure" +#include "confdefs.h" + +#include <stddef.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { + extern size_t foo; +; return 0; } +EOF +if { (eval echo configure:1927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 1931 "configure" +#include "confdefs.h" + +#include <stddef.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { + extern size_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:1944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_size_t="$try_type" ; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: Can't find system typedef for size_t." 1>&2; exit 1; } +fi +rm -f conftest* +fi + +if test -n "$pthreads_cv_type_size_t" ; then + cat >> confdefs.h <<EOF +#define pthread_size_t $pthreads_cv_type_size_t +EOF + +fi +pthread_size_t=$pthreads_cv_type_size_t +echo "$ac_t""$pthreads_cv_type_size_t" 1>&6 + +echo $ac_n "checking type of ssize_t""... $ac_c" 1>&6 +echo "configure:1972: checking type of ssize_t" >&5 +if eval "test \"`echo '$''{'pthreads_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1977 "configure" +#include "confdefs.h" + +#include <stddef.h> +#include <stdlib.h> +#include <unistd.h> + +int main() { + extern ssize_t foo; +; return 0; } +EOF +if { (eval echo configure:1988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 1992 "configure" +#include "confdefs.h" + +#include <stddef.h> +#include <stdlib.h> +#include <unistd.h> + +int main() { + extern ssize_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:2003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_ssize_t="$try_type" ; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: Can't find system typedef for ssize_t." 1>&2; exit 1; } +fi +rm -f conftest* +fi + +if test -n "$pthreads_cv_type_ssize_t" ; then + cat >> confdefs.h <<EOF +#define pthread_ssize_t $pthreads_cv_type_ssize_t +EOF + +fi +pthread_ssize_t=$pthreads_cv_type_ssize_t +echo "$ac_t""$pthreads_cv_type_ssize_t" 1>&6 + +echo $ac_n "checking type of clock_t""... $ac_c" 1>&6 +echo "configure:2031: checking type of clock_t" >&5 +if eval "test \"`echo '$''{'pthreads_cv_type_clock_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2036 "configure" +#include "confdefs.h" + +#include <stddef.h> +#if TIME_WITH_SYS_TIME +# include <time.h> +# include <sys/time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + +int main() { + extern clock_t foo; +; return 0; } +EOF +if { (eval echo configure:2055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 2059 "configure" +#include "confdefs.h" + +#include <stddef.h> +#if TIME_WITH_SYS_TIME +# include <time.h> +# include <sys/time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + +int main() { + extern clock_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:2078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_clock_t="$try_type" ; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: Can't find system typedef for clock_t." 1>&2; exit 1; } +fi +rm -f conftest* +fi + +if test -n "$pthreads_cv_type_clock_t" ; then + cat >> confdefs.h <<EOF +#define pthread_clock_t $pthreads_cv_type_clock_t +EOF + +fi +pthread_clock_t=$pthreads_cv_type_clock_t +echo "$ac_t""$pthreads_cv_type_clock_t" 1>&6 + +echo $ac_n "checking type of time_t""... $ac_c" 1>&6 +echo "configure:2106: checking type of time_t" >&5 +if eval "test \"`echo '$''{'pthreads_cv_type_time_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2111 "configure" +#include "confdefs.h" + +#include <stddef.h> +#if TIME_WITH_SYS_TIME +# include <time.h> +# include <sys/time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + +int main() { + extern time_t foo; +; return 0; } +EOF +if { (eval echo configure:2130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 2134 "configure" +#include "confdefs.h" + +#include <stddef.h> +#if TIME_WITH_SYS_TIME +# include <time.h> +# include <sys/time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + +int main() { + extern time_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:2153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_time_t="$try_type" ; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: Can't find system typedef for time_t." 1>&2; exit 1; } +fi +rm -f conftest* +fi + +if test -n "$pthreads_cv_type_time_t" ; then + cat >> confdefs.h <<EOF +#define pthread_time_t $pthreads_cv_type_time_t +EOF + +fi +pthread_time_t=$pthreads_cv_type_time_t +echo "$ac_t""$pthreads_cv_type_time_t" 1>&6 +echo $ac_n "checking for fpos_t in stdio.h""... $ac_c" 1>&6 +echo "configure:2180: checking for fpos_t in stdio.h" >&5 +if eval "test \"`echo '$''{'pthreads_cv_fpos_t_in_stdio'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2185 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +fpos_t position; +; return 0; } +EOF +if { (eval echo configure:2192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_fpos_t_in_stdio=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + pthreads_cv_fpos_t_in_stdio=no +fi +rm -f conftest* +fi + +echo "$ac_t""$pthreads_cv_fpos_t_in_stdio" 1>&6 +if test $pthreads_cv_fpos_t_in_stdio = yes ; then + +echo $ac_n "checking type of fpos_t""... $ac_c" 1>&6 +echo "configure:2208: checking type of fpos_t" >&5 +if eval "test \"`echo '$''{'pthreads_cv_type_fpos_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2213 "configure" +#include "confdefs.h" + +#include <stdio.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { + extern fpos_t foo; +; return 0; } +EOF +if { (eval echo configure:2226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 2230 "configure" +#include "confdefs.h" + +#include <stdio.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { + extern fpos_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:2243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_fpos_t="$try_type" ; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: Can't find system typedef for fpos_t." 1>&2; exit 1; } +fi +rm -f conftest* +fi + +if test -n "$pthreads_cv_type_fpos_t" ; then + cat >> confdefs.h <<EOF +#define pthread_fpos_t $pthreads_cv_type_fpos_t +EOF + +fi +pthread_fpos_t=$pthreads_cv_type_fpos_t +echo "$ac_t""$pthreads_cv_type_fpos_t" 1>&6 +else + cat >> confdefs.h <<\EOF +#define fpos_t off_t +EOF + + cat >> confdefs.h <<\EOF +#define pthread_fpos_t pthread_off_t +EOF + +fi + +echo $ac_n "checking type of off_t""... $ac_c" 1>&6 +echo "configure:2281: checking type of off_t" >&5 +if eval "test \"`echo '$''{'pthreads_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2286 "configure" +#include "confdefs.h" + +#include <stdio.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { + extern off_t foo; +; return 0; } +EOF +if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 2303 "configure" +#include "confdefs.h" + +#include <stdio.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { + extern off_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_off_t="$try_type" ; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: Can't find system typedef for off_t." 1>&2; exit 1; } +fi +rm -f conftest* +fi + +if test -n "$pthreads_cv_type_off_t" ; then + cat >> confdefs.h <<EOF +#define pthread_off_t $pthreads_cv_type_off_t +EOF + +fi +pthread_off_t=$pthreads_cv_type_off_t +echo "$ac_t""$pthreads_cv_type_off_t" 1>&6 +echo $ac_n "checking type of va_list""... $ac_c" 1>&6 +echo "configure:2343: checking type of va_list" >&5 +if eval "test \"`echo '$''{'pthreads_cv_type_va_list'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2348 "configure" +#include "confdefs.h" +#include <stdarg.h> +int main() { + extern va_list foo; +; return 0; } +EOF +if { (eval echo configure:2355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "char *" "char **" "void *" "void **" "int *" "long *" ; do + cat > conftest.$ac_ext <<EOF +#line 2359 "configure" +#include "confdefs.h" +#include <stdarg.h> +int main() { + extern va_list foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:2366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_va_list="$try_type" ; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: Can't find system typedef for va_list." 1>&2; exit 1; } +fi +rm -f conftest* +fi + +if test -n "$pthreads_cv_type_va_list" ; then + cat >> confdefs.h <<EOF +#define pthread_va_list $pthreads_cv_type_va_list +EOF + +fi +pthread_va_list=$pthreads_cv_type_va_list +echo "$ac_t""$pthreads_cv_type_va_list" 1>&6 + +arpa_headers="#include <sys/types.h> +#include <arpa/nameser.h>" + +echo $ac_n "checking IP address type""... $ac_c" 1>&6 +echo "configure:2397: checking IP address type" >&5 +if eval "test \"`echo '$''{'pthread_cv_type_ipaddr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2402 "configure" +#include "confdefs.h" +$arpa_headers +int main() { + &_getlong; +; return 0; } +EOF +if { (eval echo configure:2409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + for type in "unsigned long" "unsigned int" ; do + cat > conftest.$ac_ext <<EOF +#line 2414 "configure" +#include "confdefs.h" +$arpa_headers +int main() { +extern $type _getlong (); +; return 0; } +EOF +if { (eval echo configure:2421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + pthread_cv_type_ipaddr="$type" + break + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "configure: warning: Can't compile _getlong reference." 1>&2 +fi +rm -f conftest* + if test "$pthread_cv_type_ipaddr" = "" ; then + echo "configure: warning: Can't determine _getlong return type." 1>&2 + echo "configure: warning: Defaulting to unsigned long." 1>&2 + pthread_cv_type_ipaddr="unsigned long" + fi + +fi + +echo "$ac_t""$pthread_cv_type_ipaddr" 1>&6 +cat >> confdefs.h <<EOF +#define pthread_ipaddr_type $pthread_cv_type_ipaddr +EOF + + +echo $ac_n "checking IP port type""... $ac_c" 1>&6 +echo "configure:2456: checking IP port type" >&5 +if eval "test \"`echo '$''{'pthread_cv_type_ipport'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2461 "configure" +#include "confdefs.h" +$arpa_headers +int main() { + &_getshort; +; return 0; } +EOF +if { (eval echo configure:2468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + for type in "unsigned short" "unsigned int" ; do + cat > conftest.$ac_ext <<EOF +#line 2473 "configure" +#include "confdefs.h" +$arpa_headers +int main() { +extern $type _getshort (); +; return 0; } +EOF +if { (eval echo configure:2480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + pthread_cv_type_ipport="$type" + break + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "configure: warning: Can't compile _getshort reference." 1>&2 +fi +rm -f conftest* + if test "$pthread_cv_type_ipport" = "" ; then + echo "configure: warning: Can't determine _getshort return type." 1>&2 + echo "configure: warning: Defaulting to unsigned short." 1>&2 + pthread_cv_type_ipport="unsigned short" + fi + +fi + +echo "$ac_t""$pthread_cv_type_ipport" 1>&6 +cat >> confdefs.h <<EOF +#define pthread_ipport_type $pthread_cv_type_ipport +EOF + + +echo $ac_n "checking pathname for terminal devices directory""... $ac_c" 1>&6 +echo "configure:2515: checking pathname for terminal devices directory" >&5 +if eval "test \"`echo '$''{'pthread_cv_pty_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -d /devices/pseudo ; then + pty_path=/devices/pseudo/ + else + pty_path=/dev/ + fi + pthread_cv_pty_path=$pty_path + +fi + +cat >> confdefs.h <<EOF +#define _PATH_PTY "$pthread_cv_pty_path" +EOF + +echo "$ac_t""$pthread_cv_pty_path" 1>&6 + +echo $ac_n "checking directory name for time zone info""... $ac_c" 1>&6 +echo "configure:2535: checking directory name for time zone info" >&5 +tzdir=NONE +for f in /usr/lib/zoneinfo /usr/share/zoneinfo /usr/share/lib/zoneinfo /etc/zoneinfo /usr/local/lib/zoneinfo +do + if test -d $f ; then + tzdir=$f + break + fi +done +case $tzdir in +NONE) + echo "configure: warning: Can't find zoneinfo directory." 1>&2 + echo "configure: warning: Defaulting zoneinfo directory to NULL." 1>&2 + tzdir=NULL + ;; +esac +cat >> confdefs.h <<EOF +#define _PATH_TZDIR "$tzdir" +EOF + +echo "$ac_t""$tzdir" 1>&6 + +echo $ac_n "checking filename for local time zone""... $ac_c" 1>&6 +echo "configure:2558: checking filename for local time zone" >&5 +tzfile=NONE +for f in $tzdir/localtime /etc/localtime +do + if test -f $f ; then + tzfile=$f + break + fi +done +case $tzfile in +NONE) # Should this default to tzdir/localtime? + echo "configure: warning: Can't find local time zone file." 1>&2 + if test tzdir = NULL ; then + echo "configure: warning: Defaulting local time zone file to NULL" 1>&2 + tzfile=NULL + else + echo "configure: warning: Defaulting local time zone file to $tzdir/localtime." 1>&2 + tzfile=$tzdir/localtime + fi + ;; +esac +cat >> confdefs.h <<EOF +#define _PATH_TZFILE "$tzfile" +EOF + +echo "$ac_t""$tzfile" 1>&6 + +cat >> confdefs.h <<\EOF +#define _PATH_RESCONF "/etc/resolv.conf" +EOF + +cat >> confdefs.h <<\EOF +#define _PATH_HOSTS "/etc/hosts" +EOF + +cat >> confdefs.h <<\EOF +#define _PATH_NETWORKS "/etc/networks" +EOF + +cat >> confdefs.h <<\EOF +#define _PATH_PROTOCOLS "/etc/protocols" +EOF + +cat >> confdefs.h <<\EOF +#define _PATH_SERVICES "/etc/services" +EOF + + +cat >> confdefs.h <<\EOF +#define _PATH_BSHELL "/bin/sh" +EOF + + +for ac_func in vfork +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2614: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2619 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +srctop=`cd ${srcdir}/..;pwd` + + +# Now we deal with symlinks &c. + +test -d include || mkdir include || \ + { echo "configure: error: Can't create include directory." 1>&2; exit 1; } + +test -d include/pthread || mkdir include/pthread || \ + { echo "configure: error: Can't create include/pthread directory." 1>&2; exit 1; } + +test -d lib || mkdir lib || \ + { echo "configure: error: Can't create lib directory." 1>&2; exit 1; } + +test -d lib/libpthreadutil || mkdir lib/libpthreadutil || \ + { echo "configure: error: Can't create lib/libpthreadutil directory." 1>&2; exit 1; } + +test -d bin || mkdir bin || \ + { echo "configure: error: Can't create bin directory." 1>&2; exit 1; } + +test -d bin/finger || mkdir bin/finger || \ + { echo "configure: error: Can't create bin directory." 1>&2; exit 1; } + +test -d tests || mkdir tests || \ + { echo "configure: error: Can't create tests directory." 1>&2; exit 1; } + +if test x$syscall = xNONE ; then + syscall=$name +fi + +links="include/pthread/machdep.h include/pthread/posix.h \ + machdep.c syscall.S" +targets="../machdep/engine-$name.h ../machdep/posix-$sysincludes.h \ + ../machdep/engine-$name.c ../machdep/syscall-$syscall.S" + +# Both these targets are optional. (Autoconf-generated configure scripts +# will require the existence of link targets, so check before adding them +# to the list.) +if test x$sysincludes != xNONE ; then + links="$links include/sys" + targets="$targets ../machdep/$sysincludes" +fi + +syscall_file=../machdep/syscall-template-$syscall.S +if test -r $srcdir/$syscall_file ; then + links="$links syscall-template.S" + targets="$targets $syscall_file" + HAVE_SYSCALL_TEMPLATE=yes +else + # This really isn't a fatal problem. In fact, it's expected, initially, + # for some targets. This is just to persuade people to fix the targets + # they deal with to provide some sort of template. + # + # Eventually this file probably will be required... + echo "configure: warning: No syscall template file syscall-template-$syscall.S found." 1>&2 + HAVE_SYSCALL_TEMPLATE=no +fi + + + + +if test x$makefile_frag != x ; then + makefile_frag=${srcdir}/$makefile_frag +else + makefile_frag=/dev/null +fi + + + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.12" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "config.flags GNUmakefile Makefile \ + lib/Makefile:../lib/Makefile.in \ + lib/libpthreadutil/Makefile:../lib/libpthreadutil/Makefile.in \ + bin/Makefile:../bin/Makefile.in \ + bin/finger/Makefile:../bin/finger/Makefile.in \ + tests/Makefile:../tests/Makefile.in config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@CC@%$CC%g +s%@CXX@%$CXX%g +s%@CPP@%$CPP%g +s%@RANLIB@%$RANLIB%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@target@%$target%g +s%@target_alias@%$target_alias%g +s%@target_cpu@%$target_cpu%g +s%@target_vendor@%$target_vendor%g +s%@target_os@%$target_os%g +s%@build@%$build%g +s%@build_alias@%$build_alias%g +s%@build_cpu@%$build_cpu%g +s%@build_vendor@%$build_vendor%g +s%@build_os@%$build_os%g +s%@SYSCALL_EXCEPTIONS@%$SYSCALL_EXCEPTIONS%g +s%@available_syscalls@%$available_syscalls%g +s%@missing_syscalls@%$missing_syscalls%g +s%@srctop@%$srctop%g +s%@HAVE_SYSCALL_TEMPLATE@%$HAVE_SYSCALL_TEMPLATE%g +/@makefile_frag@/r $makefile_frag +s%@makefile_frag@%%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"config.flags GNUmakefile Makefile \ + lib/Makefile:../lib/Makefile.in \ + lib/libpthreadutil/Makefile:../lib/libpthreadutil/Makefile.in \ + bin/Makefile:../bin/Makefile.in \ + bin/finger/Makefile:../bin/finger/Makefile.in \ + tests/Makefile:../tests/Makefile.in"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# 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='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <<EOF + CONFIG_HEADERS="config.h" +EOF +cat >> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. 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.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# 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.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF + +cat >> $CONFIG_STATUS <<EOF +ac_sources="$targets" +ac_dests="$links" +EOF + +cat >> $CONFIG_STATUS <<\EOF +srcdir=$ac_given_srcdir +while test -n "$ac_sources"; do + set $ac_dests; ac_dest=$1; shift; ac_dests=$* + set $ac_sources; ac_source=$1; shift; ac_sources=$* + + echo "linking $srcdir/$ac_source to $ac_dest" + + if test ! -r $srcdir/$ac_source; then + { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } + fi + rm -f $ac_dest + + # Make relative symlinks. + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` + if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then + # The dest file is in a subdirectory. + test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" + ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dest_dir_suffix. + ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dest_dir_suffix= ac_dots= + fi + + case "$srcdir" in + [/$]*) ac_rel_source="$srcdir/$ac_source" ;; + *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; + esac + + # Make a symlink if possible; otherwise try a hard link. + if ln -s $ac_rel_source $ac_dest 2>/dev/null || + ln $srcdir/$ac_source $ac_dest; then : + else + { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } + fi +done +EOF +cat >> $CONFIG_STATUS <<EOF + +EOF +cat >> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/lib/libpthread/config/configure.in b/lib/libpthread/config/configure.in new file mode 100755 index 00000000000..0673c52f123 --- /dev/null +++ b/lib/libpthread/config/configure.in @@ -0,0 +1,672 @@ +dnl Some reminders: +dnl "dnl" is a "delete to newline" command for m4 - the remainder of the +dnl line it's on, including the newline, will be discarded +dnl "#" comments will usually be copied through +dnl "[]" are quoting characters; use changequote around code that really +dnl needs to use them, but try not to invoke autoconf macros +dnl within such code +dnl +dnl When you change this file, re-run "autoreconf" -- that'll automatically +dnl re-run both autoconf and autoheader. +dnl +dnl +dnl To do: +dnl CLOCKS_PER_SEC (default 100, Ultrix differs) +dnl CLK_TCK (default 100, Ultrix differs) +dnl clockid_t (not on all systems) +dnl timer_t (not on all systems) +dnl +dnl +dnl Now, the real stuff. +dnl +dnl This must be first. +AC_INIT(config.flags.in) +dnl +dnl This file does require autoconf 2.0 or better... +dnl +AC_PREREQ(2.0)dnl +dnl +dnl Hook for the "--enable-dce-compat" option, when Chris actually +dnl implements it. +dnl +AC_ARG_ENABLE(dce-compat, + --enable-dce-compat DCE compatibility, +[dnl "true" action + AC_MSG_ERROR([Actually, DCE compatibility doesn't work yet...]) +], +[dnl "false" action + true +]) + +dnl What C compiler? +AC_PROG_CC +AC_PROG_CXX +dnl Apparently autoconf doesn't test to see if the C compiler it locates +dnl actually works... oops! +AC_MSG_CHECKING(compiler availability and simple error detection) +AC_TRY_COMPILE(,[ exit(0); ],[ + dnl true + AC_TRY_COMPILE(,[ syntax errors galore! ], + dnl true + AC_MSG_ERROR(Can't detect syntax errors! Is CC set right?), + dnl false + true)], + dnl false + AC_MSG_ERROR(Can't compile test program! Is CC set right?)) + +AC_TRY_COMPILE(,[ + typedef int Integer; + extern int i; + extern Integer i; +], , AC_MSG_ERROR(Can't redeclare variables with this compiler??)) +AC_TRY_COMPILE(,[ + typedef long Long; + extern int i; + extern Long i; +], AC_MSG_ERROR(Compiler doesn't detect conflicting declarations.)) +AC_MSG_RESULT(ok) + +if test $ac_cv_prog_gcc = yes ; then + CFLAGS="$CFLAGS -Werror" +fi + +AC_PROG_CPP + +AC_PROG_RANLIB + +dnl Default value of prefix should be /usr/local/pthreads, not /usr/local. +AC_PREFIX_DEFAULT(/usr/local/pthreads) + +dnl Determine $host, by guessing if necessary. +AC_CANONICAL_SYSTEM + +syscall=NONE +sysincludes=NONE + +# Treat all x86 machines the same. +# (Yet below, we pretend we can distinguish between the MIPS r2000 and r4000?) +# (What about 680x0 machines?) +changequote(,)dnl +case $host in + i[456]86-*) + host=`echo $host | sed 's/^i[456]86/i386/'` + host_cpu=i386 + ;; +esac +changequote([,])dnl + +# Here, you should set the following variables: +# name +# The "name" of this configuration. Used for "engine-*.c" file name, +# default for syscall file names. Chris seems to have a thing for +# putting "-" between OS and version number, but the configure script +# will already have $host_cpu and $host_os available for you to use +# in constructing a name. +# sysincludes +# Name of machdep directory with "sys" include file +# replacements, if any. This directory is optional; +# if you don't provide it, don't set this variable. +# except +# Names of any syscalls that shouldn't be generated +# from the template, if any. +# syscall +# Base name of the syscall template files, if not the +# same as <name>. If they're the same, omit this. +# +# Also, you may define random symbols and update CFLAGS if +# necessary. However, for ease of porting to new machines, +# it's best if you can create portable autoconf tests for +# whatever you're trying to do, rather than hard-coding it +# here based on the OS name. So please, try to keep this +# section as minimal as possible. + +except="" +name=$host_cpu-$host_os + +case $host in + alpha-*-netbsd1.3*) + name=alpha-netbsd-1.3 + sysincludes=netbsd-1.1 + except="fork lseek pipe sigsuspend sigprocmask fstat" + ;; + alpha-*-netbsd1.1* | alpha-*-netbsd1.2*) + name=alpha-netbsd-1.1 + sysincludes=netbsd-1.1 + except="fork lseek pipe sigsuspend sigprocmask" + ;; + alpha-*-osf*) + name=alpha-osf1 + sysincludes=alpha-osf1 + except="fork sigsuspend" + if test $ac_cv_prog_gcc = no ; then + CFLAGS="$CFLAGS -std" + fi + ;; + hppa1.0-*-hpux10.20 | hppa1.1-*-hpux10.20) + name=hppa-hpux-10.20 + sysincludes=hpux-10.20 + except="fork" + ;; + hppa1.1-*-hpux*9.*) + name=hppa-hpux-9.03 + sysincludes=hpux-9.03 + # hpux-9.03.mk seems to be missing; what should this be? + except="fork" + ;; + sparc-*-sunos4.1.3* | sparc-*-sunos4.1.4*) + name=sparc-sunos-4.1.3 + sysincludes=sunos-4.1.3 + syscall=sparc-sunos4 + except="fork pipe getpgrp getdirentries" + AC_DEFINE(sunos4) # is this really needed?? + ;; + sparc-*-solaris2.3* | sparc-*-solaris2.4*) + name=sparc-sunos-5.3 + sysincludes=sunos-5.3 + except="fork sigaction" + # Should really come up with a test for this... + AC_DEFINE(LD_LINKS_STATIC_DATA) + AC_DEFINE(BROKEN_SIGNALS) + ;; + sparc-*-solaris2*) + name=sparc-sunos-5.3 + sysincludes=sunos-5.5 + except="fork sigaction" + # Should really come up with a test for this... + AC_DEFINE(LD_LINKS_STATIC_DATA) + AC_DEFINE(BROKEN_SIGNALS) + ;; + sparc-*-netbsd1.0A | sparc-*-netbsd1.1* | sparc-*-netbsd1.2*) + name=sparc-sunos-4.1.3 + sysincludes=netbsd-1.0 + syscall=sparc-netbsd-1.1 + except="pipe fork sigprocmask sigsuspend" + ;; + i386-*-openbsd2.*) + name=i386-openbsd-2.0 + sysincludes=openbsd-2.0 + except="fork lseek ftruncate sigsuspend sigprocmask" + ;; + i386-*-linux*) + name=i386-linux-1.0 + sysincludes=linux-1.0 + ;; + i386-*-bsdi1.1) + name=i386-bsdi-1.1 + sysincludes=bsdi-1.1 + ;; + i386-*-bsdi2.0* | i386-*-bsdi2.1*) + name=i386-bsdi-2.0 + sysincludes=bsdi-2.0 + syscall=i386-bsdi-2.0 + except="fork lseek ftruncate sigsuspend" + ;; + i386-*-netbsd1.3*) + name=i386-netbsd-1.3 + sysincludes=netbsd-1.1 + except="fork lseek ftruncate pipe sigsuspend sigprocmask fstat" + ;; + i386-*-netbsd1.1* | i386-*-netbsd1.2*) + name=i386-netbsd-1.0 + sysincludes=netbsd-1.1 + syscall=i386-netbsd-1.1 + except="fork lseek ftruncate pipe sigsuspend sigprocmask" + ;; + i386-*-netbsd1.0*) + name=i386-netbsd-1.0 + sysincludes=netbsd-1.0 + except="fork lseek ftruncate sigsuspend" + ;; + i386-*-netbsd0.9*) + name=i386-netbsd-0.9 + sysincludes=netbsd-0.9 + ;; + m68*-*-netbsd*) + name=m68000-netbsd + ;; + i386-*-freebsd2.*) + name=i386-freebsd-2.0 + sysincludes=freebsd-2.0 + except="fork lseek ftruncate sigsuspend sigprocmask" + ;; + romp-*-bsd*) + name=romp-bsd + ;; + mips-dec-ultrix*) + name=r2000-ultrix-4.2 + sysincludes=ultrix-4.2 + except="fork pipe" + ;; + mips-sgi-irix*) + name=ip22-irix-5.2 + sysincludes=irix-5.2 + except="fstat stat" + AC_DEFINE(BROKEN_SIGNALS) + ;; + i386-*-sco3.2v5*) + name=i386-sco3.2.5 + sysincludes=i386-sco3.2.5 + syscall=i386-sco3.2.5 + except="select socketcall accept bind connect getpeername getsockname getsockopt setsockopt listen recv recvfrom recvmsg send sendmsg sendto shutdown socket socketpair fork fcntl dup2 fstat fchmod fchown ftruncate pipe getdirentries sigaction sigpause wait3 waitpid getdtablesize" + ;; + *) + AC_MSG_ERROR(System type $host not recognized or not supported. +See $srcdir/configure.in for supported systems.) + exit 1 + ;; +esac + +SYSCALL_EXCEPTIONS=$except +AC_SUBST(SYSCALL_EXCEPTIONS) + +AC_CHECK_HEADERS(sys/termio.h termios.h termio.h alloc.h) + +dnl Don't use AC_CHECK_HEADERS for this one, we want to define a special +dnl symbol name starting with pthread_ if it's found. +AC_CHECK_HEADER(va_list.h, AC_DEFINE(pthread_have_va_list_h)) + +dnl Generate a list of system calls that we could generate. We later use +dnl a syscall template .S file to produce a .o file for each syscall. This +dnl is a bit better for porting and development purposes than having every +dnl syscall listed for every target system; this way we only need the +dnl template, and special hanlding for only those syscalls that can't be +dnl handled by the templates. +AC_CHECK_HEADERS(syscall.h sys/syscall.h sys/filio.h) + +PTHREADS_CHECK_SYSCALLS(open write read creat close fcntl lseek dup2 dup pipe + fchmod fchown execve fstat lstat link unlink chdir chown chmod stat + rename select getdtablesize ioctl ftruncate flock fstatfs + dnl - signals + sigsuspend sigaction sigpause sigprocmask ksigaction + dnl - directory reading + getdents readdir getdirentries + dnl - variants of `wait' syscalls + wait4 wait3 waitpid waitsys + dnl - BSD socket calls + socket bind connect accept listen getsockopt setsockopt socketpair + dnl - SYSV stream calls + poll putmsg getmsg + dnl - Linux version uses one syscall + socketcall + + dnl - Process info + pgrpsys + + exit + readv writev send sendto sendmsg recv recvfrom recvmsg + getpeername getsockname + shutdown + getpgrp fork) + +AC_SUBST(available_syscalls) +AC_SUBST(missing_syscalls) + +dnl Disabled for now -- generates warnings from autoconf. +dnl ## Check some type sizes. +dnl AC_CHECK_SIZEOF(int) +dnl AC_CHECK_SIZEOF(long) +dnl AC_CHECK_SIZEOF(char *) + +## Determine some typedef values from the system header files. +dnl +dnl Autoconf provides these automatically. They provide reasonable +dnl fallbacks if the standard header files don't define the typedef names. +dnl +dnl AC_TYPE_MODE_T +AC_TYPE_OFF_T +dnl AC_TYPE_PID_T +AC_TYPE_SIZE_T +dnl AC_TYPE_UID_T +AC_TYPE_SIGNAL +dnl +dnl Default these types if their definitions can't be found. +dnl +AC_CHECK_TYPE(ssize_t,int) +AC_CHECK_TYPE(time_t,long) +dnl +AC_CHECK_HEADERS(sys/time.h) +AC_HEADER_TIME + +dnl +dnl Check for the existence of these types +dnl +dnl struct timespec +dnl +AC_MSG_CHECKING(for struct timespec in sys/time.h) +AC_CACHE_VAL(pthreads_cv_timespec_in_time, + AC_TRY_COMPILE([#include <sys/time.h>], [struct timespec foo;], + pthreads_cv_timespec_in_time=yes, pthreads_cv_timespec_in_time=no)) +AC_MSG_RESULT($pthreads_cv_timespec_in_time) +if test $pthreads_cv_timespec_in_time = yes ; then + AC_DEFINE(_OS_HAS_TIMESPEC) +fi + + +dnl +dnl Usage: PTHREADS_FIND_TYPE(system-typedef-name, new-macro-name, +dnl list-of-includes-in-square-brackets, +dnl comma-separated-list-of-types-to-try) +dnl +dnl PTHREADS_FIND_INTEGRAL_TYPE automatically provides a set of integral +dnl types, and does not permit specification of additional types. +dnl +dnl The specified types must all be able to work as prefixes -- i.e., no +dnl direct specification of array or function types. If you need such +dnl types, add typedefs for them to include/pthread/xtypes.h, and include +dnl that in the set of header files. For simple struct types, you can +dnl try including the definition directly here, but it had better not +dnl contain any commas or square brackets. +dnl +dnl If necessary, you can include other preprocessing commands and such +dnl in the `includes' portion. +dnl +dnl Note: For now, each of these needs a corresponding entry +dnl in acconfig.h. +dnl +dnl size_t +dnl +PTHREADS_FIND_INTEGRAL_TYPE(size_t, pthread_size_t, [ +#include <stddef.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif +]) +dnl +dnl ssize_t +dnl +PTHREADS_FIND_INTEGRAL_TYPE(ssize_t, pthread_ssize_t, [ +#include <stddef.h> +#include <stdlib.h> +#include <unistd.h> +]) +dnl +dnl clock_t ---FIXME I don't know if this is the right set of header files. KR +dnl +PTHREADS_FIND_INTEGRAL_TYPE(clock_t, pthread_clock_t, [ +#include <stddef.h> +#if TIME_WITH_SYS_TIME +# include <time.h> +# include <sys/time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif +]) +dnl +dnl time_t +dnl +PTHREADS_FIND_INTEGRAL_TYPE(time_t, pthread_time_t, [ +#include <stddef.h> +#if TIME_WITH_SYS_TIME +# include <time.h> +# include <sys/time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif +]) +dnl +dnl fpos_t +dnl +dnl If fpos_t isn't defined in stdio.h, define it to be off_t. It +dnl looks like AC_CHECK_TYPE won't work for this, because it doesn't +dnl include stdio.h. +dnl +AC_MSG_CHECKING(for fpos_t in stdio.h) +AC_CACHE_VAL(pthreads_cv_fpos_t_in_stdio, + AC_TRY_COMPILE([#include <stdio.h>], [fpos_t position;], + pthreads_cv_fpos_t_in_stdio=yes, pthreads_cv_fpos_t_in_stdio=no)) +AC_MSG_RESULT($pthreads_cv_fpos_t_in_stdio) +if test $pthreads_cv_fpos_t_in_stdio = yes ; then + PTHREADS_FIND_INTEGRAL_TYPE(fpos_t, pthread_fpos_t, [ +#include <stdio.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif +]) +else + AC_DEFINE(fpos_t,off_t) + AC_DEFINE(pthread_fpos_t,pthread_off_t) +fi +dnl +dnl off_t +dnl +PTHREADS_FIND_INTEGRAL_TYPE(off_t, pthread_off_t, [ +#include <stdio.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif +]) +dnl +dnl va_list -- This one could be tricky. Fortunately, on some systems, +dnl we can just include the gcc stdarg.h header file if we can't determine +dnl the type here. Won't work for non-gcc configurations though. +dnl +PTHREADS_FIND_TYPE(va_list, pthread_va_list, [#include <stdarg.h>], + char *, char **, void *, void **, int *, long *) +dnl +dnl + +arpa_headers="#include <sys/types.h> +#include <arpa/nameser.h>" + +dnl +dnl Type for network (IP) addresses, 32 bits. +dnl For now, I'm assuming that the return type from _getlong is it. +dnl +AC_MSG_CHECKING(IP address type) +AC_CACHE_VAL(pthread_cv_type_ipaddr, + AC_TRY_COMPILE($arpa_headers,[ &_getlong; ],[ + for type in "unsigned long" "unsigned int" ; do + AC_TRY_COMPILE($arpa_headers, extern $type _getlong ();,[ + pthread_cv_type_ipaddr="$type" + break + ]) + done + ],[ AC_MSG_WARN(Can't compile _getlong reference.) ]) + if test "$pthread_cv_type_ipaddr" = "" ; then + AC_MSG_WARN(Can't determine _getlong return type.) + AC_MSG_WARN(Defaulting to unsigned long.) + pthread_cv_type_ipaddr="unsigned long" + fi +) +AC_MSG_RESULT($pthread_cv_type_ipaddr) +AC_DEFINE_UNQUOTED(pthread_ipaddr_type,$pthread_cv_type_ipaddr) + +dnl +dnl Type for network (IP) ports, 16 bits. +dnl For now, I'm assuming that the return type from _getshort is it. +dnl +AC_MSG_CHECKING(IP port type) +AC_CACHE_VAL(pthread_cv_type_ipport, + AC_TRY_COMPILE($arpa_headers,[ &_getshort; ],[ + for type in "unsigned short" "unsigned int" ; do + AC_TRY_COMPILE($arpa_headers, extern $type _getshort ();,[ + pthread_cv_type_ipport="$type" + break + ]) + done + ],[ AC_MSG_WARN(Can't compile _getshort reference.) ]) + if test "$pthread_cv_type_ipport" = "" ; then + AC_MSG_WARN(Can't determine _getshort return type.) + AC_MSG_WARN(Defaulting to unsigned short.) + pthread_cv_type_ipport="unsigned short" + fi +) +AC_MSG_RESULT($pthread_cv_type_ipport) +AC_DEFINE_UNQUOTED(pthread_ipport_type,$pthread_cv_type_ipport) + +dnl +dnl Guess where terminal devices are stored. This is for use in the +dnl ttyname() implementation provided here. +dnl +AC_MSG_CHECKING(pathname for terminal devices directory) +AC_CACHE_VAL(pthread_cv_pty_path, + if test -d /devices/pseudo ; then + pty_path=/devices/pseudo/ + else + pty_path=/dev/ + fi + pthread_cv_pty_path=$pty_path +) +AC_DEFINE_UNQUOTED(_PATH_PTY,"$pthread_cv_pty_path") +AC_MSG_RESULT($pthread_cv_pty_path) + +dnl +dnl Look for timezone info, for use in ctime. +dnl +AC_MSG_CHECKING(directory name for time zone info) +tzdir=NONE +for f in /usr/lib/zoneinfo /usr/share/zoneinfo /usr/share/lib/zoneinfo /etc/zoneinfo /usr/local/lib/zoneinfo +do + if test -d $f ; then + tzdir=$f + break + fi +done +case $tzdir in +NONE) + AC_MSG_WARN(Can't find zoneinfo directory.) + AC_MSG_WARN(Defaulting zoneinfo directory to NULL.) + tzdir=NULL + ;; +esac +AC_DEFINE_UNQUOTED(_PATH_TZDIR,"$tzdir") +AC_MSG_RESULT($tzdir) + +AC_MSG_CHECKING(filename for local time zone) +tzfile=NONE +for f in $tzdir/localtime /etc/localtime +do + if test -f $f ; then + tzfile=$f + break + fi +done +case $tzfile in +NONE) # Should this default to tzdir/localtime? + AC_MSG_WARN(Can't find local time zone file.) + if test tzdir = NULL ; then + AC_MSG_WARN(Defaulting local time zone file to NULL) + tzfile=NULL + else + AC_MSG_WARN(Defaulting local time zone file to $tzdir/localtime.) + tzfile=$tzdir/localtime + fi + ;; +esac +AC_DEFINE_UNQUOTED(_PATH_TZFILE,"$tzfile") +AC_MSG_RESULT($tzfile) + +dnl +dnl Network stuff. At the moment, I don't think there are any other +dnl values we should expect. If we find a system that does store these +dnl files elsewhere -- or doesn't have them all -- then run some tests. +dnl +AC_DEFINE(_PATH_RESCONF, "/etc/resolv.conf") +AC_DEFINE(_PATH_HOSTS, "/etc/hosts") +AC_DEFINE(_PATH_NETWORKS, "/etc/networks") +AC_DEFINE(_PATH_PROTOCOLS, "/etc/protocols") +AC_DEFINE(_PATH_SERVICES, "/etc/services") + +dnl +dnl Other stuff +dnl +AC_DEFINE(_PATH_BSHELL, "/bin/sh") + +dnl If the system provides vfork, autoconf scripts will detect it. +dnl So we should hide it. +AC_CHECK_FUNCS(vfork) + +srctop=`cd ${srcdir}/..;pwd` +AC_SUBST(srctop) + +# Now we deal with symlinks &c. + +test -d include || mkdir include || \ + AC_MSG_ERROR(Can't create include directory.) + +test -d include/pthread || mkdir include/pthread || \ + AC_MSG_ERROR(Can't create include/pthread directory.) + +test -d lib || mkdir lib || \ + AC_MSG_ERROR(Can't create lib directory.) + +test -d lib/libpthreadutil || mkdir lib/libpthreadutil || \ + AC_MSG_ERROR(Can't create lib/libpthreadutil directory.) + +test -d bin || mkdir bin || \ + AC_MSG_ERROR(Can't create bin directory.) + +test -d bin/finger || mkdir bin/finger || \ + AC_MSG_ERROR(Can't create bin directory.) + +test -d tests || mkdir tests || \ + AC_MSG_ERROR(Can't create tests directory.) + +if test x$syscall = xNONE ; then + syscall=$name +fi + +links="include/pthread/machdep.h include/pthread/posix.h \ + machdep.c syscall.S" +targets="../machdep/engine-$name.h ../machdep/posix-$sysincludes.h \ + ../machdep/engine-$name.c ../machdep/syscall-$syscall.S" + +# Both these targets are optional. (Autoconf-generated configure scripts +# will require the existence of link targets, so check before adding them +# to the list.) +if test x$sysincludes != xNONE ; then + links="$links include/sys" + targets="$targets ../machdep/$sysincludes" +fi + +syscall_file=../machdep/syscall-template-$syscall.S +if test -r $srcdir/$syscall_file ; then + links="$links syscall-template.S" + targets="$targets $syscall_file" + HAVE_SYSCALL_TEMPLATE=yes +else + # This really isn't a fatal problem. In fact, it's expected, initially, + # for some targets. This is just to persuade people to fix the targets + # they deal with to provide some sort of template. + # + # Eventually this file probably will be required... + AC_MSG_WARN(No syscall template file syscall-template-$syscall.S found.) + HAVE_SYSCALL_TEMPLATE=no +fi +AC_SUBST(HAVE_SYSCALL_TEMPLATE) + +dnl Now tell it to make the links. +dnl (The links are actually made by config.status.) +AC_LINK_FILES($targets, $links) + +if test x$makefile_frag != x ; then + makefile_frag=${srcdir}/$makefile_frag +else + makefile_frag=/dev/null +fi +dnl Drop in file indicated by $makefile_frag on *the line after* the +dnl magic @makefile_frag@ sequence. +AC_SUBST_FILE(makefile_frag) + + +dnl Generate output files... +AC_CONFIG_HEADER(config.h) + +dnl This must be last. +AC_OUTPUT(config.flags GNUmakefile Makefile \ + lib/Makefile:../lib/Makefile.in \ + lib/libpthreadutil/Makefile:../lib/libpthreadutil/Makefile.in \ + bin/Makefile:../bin/Makefile.in \ + bin/finger/Makefile:../bin/finger/Makefile.in \ + tests/Makefile:../tests/Makefile.in) diff --git a/lib/libpthread/config/configure.org b/lib/libpthread/config/configure.org new file mode 100644 index 00000000000..f8526844a24 --- /dev/null +++ b/lib/libpthread/config/configure.org @@ -0,0 +1,2874 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.10 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help +--enable-dce-compat DCE compatibility" +ac_default_prefix=/usr/local/pthreads + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.10" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LANG+set}" = set; then LANG=C; export LANG; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=config.flags.in + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + +# Check whether --enable-dce-compat or --disable-dce-compat was given. +if test "${enable_dce_compat+set}" = set; then + enableval="$enable_dce_compat" + { echo "configure: error: Actually, DCE compatibility doesn't work yet..." 1>&2; exit 1; } + +else + true + +fi + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +if test $ac_cv_prog_gcc = yes; then + GCC=yes + if test "${CFLAGS+set}" != set; then + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_gcc_g=yes +else + ac_cv_prog_gcc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 + if test $ac_cv_prog_gcc_g = yes; then + CFLAGS="-g -O" + else + CFLAGS="-O" + fi + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +for ac_prog in $CCC c++ g++ gcc CC cxx +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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CXX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CXX="$ac_cv_prog_CXX" +if test -n "$CXX"; then + echo "$ac_t""$CXX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$CXX" && break +done +test -n "$CXX" || CXX="gcc" + + +echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.C <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gxx=yes +else + ac_cv_prog_gxx=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gxx" 1>&6 +if test $ac_cv_prog_gxx = yes; then + GXX=yes + if test "${CXXFLAGS+set}" != set; then + echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.cc +if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then + ac_cv_prog_gxx_g=yes +else + ac_cv_prog_gxx_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6 + if test $ac_cv_prog_gxx_g = yes; then + CXXFLAGS="-g -O" + else + CXXFLAGS="-O" + fi + fi +else + GXX= + test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" +fi + +echo $ac_n "checking compiler availability and simple error detection""... $ac_c" 1>&6 +cat > conftest.$ac_ext <<EOF +#line 735 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { + exit(0); +; return 0; } +EOF +if { (eval echo configure:743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat > conftest.$ac_ext <<EOF +#line 747 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { + syntax errors galore! +; return 0; } +EOF +if { (eval echo configure:755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + { echo "configure: error: Can't detect syntax errors! Is CC set right?" 1>&2; exit 1; } +else + rm -rf conftest* + true +fi +rm -f conftest* + +else + rm -rf conftest* + { echo "configure: error: Can't compile test program! Is CC set right?" 1>&2; exit 1; } +fi +rm -f conftest* + + +cat > conftest.$ac_ext <<EOF +#line 772 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { + + typedef int Integer; + extern int i; + extern Integer i; + +; return 0; } +EOF +if { (eval echo configure:784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : +else + rm -rf conftest* + { echo "configure: error: Can't redeclare variables with this compiler??" 1>&2; exit 1; } +fi +rm -f conftest* + +cat > conftest.$ac_ext <<EOF +#line 793 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { + + typedef long Long; + extern int i; + extern Long i; + +; return 0; } +EOF +if { (eval echo configure:805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + { echo "configure: error: Compiler doesn't detect conflicting declarations." 1>&2; exit 1; } +fi +rm -f conftest* + +echo "$ac_t""ok" 1>&6 + +if test $ac_cv_prog_gcc = yes ; then + CFLAGS="$CFLAGS -Werror" +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +#line 832 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +#line 847 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + + +# Do some error checking and defaulting for the host and target type. +# The inputs are: +# configure --host=HOST --target=TARGET --build=BUILD NONOPT +# +# The rules are: +# 1. You are not allowed to specify --host, --target, and nonopt at the +# same time. +# 2. Host defaults to nonopt. +# 3. If nonopt is not specified, then host defaults to the current host, +# as determined by config.guess. +# 4. Target and build default to nonopt. +# 5. If nonopt is not specified, then target and build default to host. + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +case $host---$target---$nonopt in +NONE---*---* | *---NONE---* | *---*---NONE) ;; +*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; +esac + + +# Make sure we can run config.sub. +if $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`$ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +echo $ac_n "checking target system type""... $ac_c" 1>&6 + +target_alias=$target +case "$target_alias" in +NONE) + case $nonopt in + NONE) target_alias=$host_alias ;; + *) target_alias=$nonopt ;; + esac ;; +esac + +target=`$ac_config_sub $target_alias` +target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +echo "$ac_t""$target" 1>&6 + +echo $ac_n "checking build system type""... $ac_c" 1>&6 + +build_alias=$build +case "$build_alias" in +NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; +esac + +build=`$ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +echo "$ac_t""$build" 1>&6 + +test "$host_alias" != "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + + +syscall=NONE +sysincludes=NONE + +# Treat all x86 machines the same. +# (Yet below, we pretend we can distinguish between the MIPS r2000 and r4000?) +# (What about 680x0 machines?) +case $host in + i[456]86-*) + host=`echo $host | sed 's/^i[456]86/i386/'` + host_cpu=i386 + ;; +esac + +# Here, you should set the following variables: +# name +# The "name" of this configuration. Used for "engine-*.c" file name, +# default for syscall file names. Chris seems to have a thing for +# putting "-" between OS and version number, but the configure script +# will already have $host_cpu and $host_os available for you to use +# in constructing a name. +# sysincludes +# Name of machdep directory with "sys" include file +# replacements, if any. This directory is optional; +# if you don't provide it, don't set this variable. +# except +# Names of any syscalls that shouldn't be generated +# from the template, if any. +# syscall +# Base name of the syscall template files, if not the +# same as <name>. If they're the same, omit this. +# +# Also, you may define random symbols and update CFLAGS if +# necessary. However, for ease of porting to new machines, +# it's best if you can create portable autoconf tests for +# whatever you're trying to do, rather than hard-coding it +# here based on the OS name. So please, try to keep this +# section as minimal as possible. + +except="" +name=$host_cpu-$host_os + +case $host in + alpha-*-netbsd1.1* | alpha-*-netbsd1.2*) + name=alpha-netbsd-1.1 + sysincludes=netbsd-1.1 + except="fork lseek pipe sigsuspend sigprocmask" + ;; + alpha-*-osf*) + name=alpha-osf1 + sysincludes=alpha-osf1 + except="fork sigsuspend" + if test $ac_cv_prog_gcc = no ; then + CFLAGS="$CFLAGS -std" + fi + ;; + hppa1.1-*-hpux*) + name=hppa-hpux-9.03 + sysincludes=hpux-9.03 + # hpux-9.03.mk seems to be missing; what should this be? + except="fork" + ;; + sparc-*-sunos4.1.3* | sparc-*-sunos4.1.4*) + name=sparc-sunos-4.1.3 + sysincludes=sunos-4.1.3 + syscall=sparc-sunos4 + except="fork pipe getpgrp getdirentries" + cat >> confdefs.h <<\EOF +#define sunos4 1 +EOF + # is this really needed?? + ;; + sparc-*-solaris2*) + name=sparc-sunos-5.3 + sysincludes=sunos-5.3 + except="fork sigaction" + # Should really come up with a test for this... + cat >> confdefs.h <<\EOF +#define LD_LINKS_STATIC_DATA 1 +EOF + + cat >> confdefs.h <<\EOF +#define BROKEN_SIGNALS 1 +EOF + + ;; + sparc-*-netbsd1.0A | sparc-*-netbsd1.1* | sparc-*-netbsd1.2*) + name=sparc-sunos-4.1.3 + sysincludes=netbsd-1.0 + syscall=sparc-netbsd-1.1 + except="pipe fork sigprocmask sigsuspend" + ;; + i386-*-linux*) + name=i386-linux-1.0 + sysincludes=linux-1.0 + ;; + i386-*-bsdi1.1) + name=i386-bsdi-1.1 + sysincludes=bsdi-1.1 + ;; + i386-*-bsdi2.0* | i386-*-bsdi2.1*) + name=i386-bsdi-2.0 + sysincludes=bsdi-2.0 + syscall=i386-bsdi-2.0 + except="fork lseek sigsuspend" + ;; + i386-*-netbsd1.1* | i386-*-netbsd1.2*) + name=i386-netbsd-1.0 + sysincludes=netbsd-1.1 + syscall=i386-netbsd-1.1 + except="fork lseek pipe sigsuspend sigprocmask" + ;; + i386-*-netbsd1.0*) + name=i386-netbsd-1.0 + sysincludes=netbsd-1.0 + except="fork lseek sigsuspend" + ;; + i386-*-netbsd0.9*) + name=i386-netbsd-0.9 + sysincludes=netbsd-0.9 + ;; + m68*-*-netbsd*) + name=m68000-netbsd + ;; + i386-*-freebsd2.*) + name=i386-freebsd-2.0 + sysincludes=freebsd-2.0 + except="fork lseek sigsuspend sigprocmask" + ;; + romp-*-bsd*) + name=romp-bsd + ;; + mips-dec-ultrix*) + name=r2000-ultrix-4.2 + sysincludes=ultrix-4.2 + except="fork pipe" + ;; + mips-sgi-irix*) + name=ip22-irix-5.2 + sysincludes=irix-5.2 + except="fstat stat" + cat >> confdefs.h <<\EOF +#define BROKEN_SIGNALS 1 +EOF + + ;; + *) + { echo "configure: error: System type $host not recognized or not supported. +See $srcdir/configure.in for supported systems." 1>&2; exit 1; } + exit 1 + ;; +esac + +SYSCALL_EXCEPTIONS=$except + + +for ac_hdr in sys/termio.h termios.h termio.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1174 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +ac_safe=`echo "va_list.h" | tr './\055' '___'` +echo $ac_n "checking for va_list.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1210 "configure" +#include "confdefs.h" +#include <va_list.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define pthread_have_va_list_h 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +for ac_hdr in syscall.h sys/syscall.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1246 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +pthreads_syscall_list="open write read creat close fcntl lseek dup2 dup pipe + fchmod fchown execve fstat lstat link unlink chdir chown chmod stat + rename select getdtablesize ioctl ftruncate + sigsuspend sigaction sigpause sigprocmask ksigaction + getdents readdir getdirentries + wait4 wait3 waitpid waitsys + socket bind connect accept listen getsockopt setsockopt socketpair + poll putmsg getmsg + socketcall + + pgrpsys + + exit + readv writev send sendto sendmsg recv recvfrom recvmsg + getpeername getsockname + shutdown + getpgrp fork" +for pthreads_syscallname in $pthreads_syscall_list ; do + echo $ac_n "checking for syscall $pthreads_syscallname""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthreads_cv_syscall_$pthreads_syscallname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1299 "configure" +#include "confdefs.h" + +/* FIXME: This list should be generated from info in configure.in. */ +#ifdef HAVE_SYSCALL_H +#include <syscall.h> +#else +#ifdef HAVE_SYS_SYSCALL_H +#include <sys/syscall.h> +#else +where is your syscall header file?? +#endif +#endif + +int main() { return 0; } +int t() { + +int x; +x = SYS_$pthreads_syscallname ; + +; return 0; } +EOF +if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + rm -rf conftest* + eval pthreads_cv_syscall_$pthreads_syscallname=yes +else + rm -rf conftest* + eval pthreads_cv_syscall_$pthreads_syscallname=no +fi +rm -f conftest* + +fi + +if eval test \$pthreads_cv_syscall_$pthreads_syscallname = yes ; then + pthreads_syscall_present=yes + available_syscalls="$available_syscalls $pthreads_syscallname" + macroname=HAVE_SYSCALL_`echo $pthreads_syscallname | tr '[a-z]' '[A-Z]'` + cat >> confdefs.h <<EOF +#define $macroname 1 +EOF + +else + pthreads_syscall_present=no + missing_syscalls="$missing_syscalls $pthreads_syscallname" +fi +echo "$ac_t""$pthreads_syscall_present" 1>&6 + +done + + + + + + +## Determine some typedef values from the system header files. +# If we cannot run a trivial program, we must be cross compiling. +echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_cross=yes +else +cat > conftest.$ac_ext <<EOF +#line 1363 "configure" +#include "confdefs.h" +main(){return(0);} +EOF +{ (eval echo configure:1367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +if test -s conftest && (./conftest; exit) 2>/dev/null; then + ac_cv_c_cross=no +else + ac_cv_c_cross=yes +fi +fi +rm -fr conftest* +fi + +echo "$ac_t""$ac_cv_c_cross" 1>&6 +cross_compiling=$ac_cv_c_cross + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1385 "configure" +#include "confdefs.h" +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1408 "configure" +#include "confdefs.h" +#include <string.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1426 "configure" +#include "confdefs.h" +#include <stdlib.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else +cat > conftest.$ac_ext <<EOF +#line 1447 "configure" +#include "confdefs.h" +#include <ctype.h> +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +{ (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +if test -s conftest && (./conftest; exit) 2>/dev/null; then + : +else + ac_cv_header_stdc=no +fi +fi +rm -fr conftest* +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1482 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "off_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1513 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1544 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "ssize_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_ssize_t=yes +else + rm -rf conftest* + ac_cv_type_ssize_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 +if test $ac_cv_type_ssize_t = no; then + cat >> confdefs.h <<\EOF +#define ssize_t int +EOF + +fi + +echo $ac_n "checking for time_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1575 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "time_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_time_t=yes +else + rm -rf conftest* + ac_cv_type_time_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_time_t" 1>&6 +if test $ac_cv_type_time_t = no; then + cat >> confdefs.h <<\EOF +#define time_t long +EOF + +fi + +for ac_hdr in sys/time.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1609 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1643 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/time.h> +#include <time.h> +int main() { return 0; } +int t() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:1653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + + +echo $ac_n "checking for struct timespec in sys/time.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthreads_cv_timespec_in_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1678 "configure" +#include "confdefs.h" +#include <sys/time.h> +int main() { return 0; } +int t() { +struct timespec foo; +; return 0; } +EOF +if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_timespec_in_time=yes +else + rm -rf conftest* + pthreads_cv_timespec_in_time=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$pthreads_cv_timespec_in_time" 1>&6 +if test $pthreads_cv_timespec_in_time = yes ; then + cat >> confdefs.h <<\EOF +#define _OS_HAS_TIMESPEC 1 +EOF + +fi + + + +echo $ac_n "checking type of size_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthreads_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1712 "configure" +#include "confdefs.h" + +#include <stddef.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { return 0; } +int t() { + extern size_t foo; +; return 0; } +EOF +if { (eval echo configure:1726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 1730 "configure" +#include "confdefs.h" + +#include <stddef.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { return 0; } +int t() { + extern size_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:1744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_size_t="$try_type" ; break +fi +rm -f conftest* + + done +else + rm -rf conftest* + { echo "configure: error: Can't find system typedef for size_t." 1>&2; exit 1; } +fi +rm -f conftest* + +fi + +if test -n "$pthreads_cv_type_size_t" ; then + cat >> confdefs.h <<EOF +#define pthread_size_t $pthreads_cv_type_size_t +EOF + +fi +pthread_size_t=$pthreads_cv_type_size_t +echo "$ac_t""$pthreads_cv_type_size_t" 1>&6 + +echo $ac_n "checking type of ssize_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthreads_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1773 "configure" +#include "confdefs.h" + +#include <stddef.h> +#include <stdlib.h> +#include <unistd.h> + +int main() { return 0; } +int t() { + extern ssize_t foo; +; return 0; } +EOF +if { (eval echo configure:1785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 1789 "configure" +#include "confdefs.h" + +#include <stddef.h> +#include <stdlib.h> +#include <unistd.h> + +int main() { return 0; } +int t() { + extern ssize_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:1801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_ssize_t="$try_type" ; break +fi +rm -f conftest* + + done +else + rm -rf conftest* + { echo "configure: error: Can't find system typedef for ssize_t." 1>&2; exit 1; } +fi +rm -f conftest* + +fi + +if test -n "$pthreads_cv_type_ssize_t" ; then + cat >> confdefs.h <<EOF +#define pthread_ssize_t $pthreads_cv_type_ssize_t +EOF + +fi +pthread_ssize_t=$pthreads_cv_type_ssize_t +echo "$ac_t""$pthreads_cv_type_ssize_t" 1>&6 + +echo $ac_n "checking type of clock_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthreads_cv_type_clock_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1830 "configure" +#include "confdefs.h" + +#include <stddef.h> +#if TIME_WITH_SYS_TIME +# include <time.h> +# include <sys/time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + +int main() { return 0; } +int t() { + extern clock_t foo; +; return 0; } +EOF +if { (eval echo configure:1850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 1854 "configure" +#include "confdefs.h" + +#include <stddef.h> +#if TIME_WITH_SYS_TIME +# include <time.h> +# include <sys/time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + +int main() { return 0; } +int t() { + extern clock_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:1874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_clock_t="$try_type" ; break +fi +rm -f conftest* + + done +else + rm -rf conftest* + { echo "configure: error: Can't find system typedef for clock_t." 1>&2; exit 1; } +fi +rm -f conftest* + +fi + +if test -n "$pthreads_cv_type_clock_t" ; then + cat >> confdefs.h <<EOF +#define pthread_clock_t $pthreads_cv_type_clock_t +EOF + +fi +pthread_clock_t=$pthreads_cv_type_clock_t +echo "$ac_t""$pthreads_cv_type_clock_t" 1>&6 + +echo $ac_n "checking type of time_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthreads_cv_type_time_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1903 "configure" +#include "confdefs.h" + +#include <stddef.h> +#if TIME_WITH_SYS_TIME +# include <time.h> +# include <sys/time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + +int main() { return 0; } +int t() { + extern time_t foo; +; return 0; } +EOF +if { (eval echo configure:1923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 1927 "configure" +#include "confdefs.h" + +#include <stddef.h> +#if TIME_WITH_SYS_TIME +# include <time.h> +# include <sys/time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + +int main() { return 0; } +int t() { + extern time_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:1947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_time_t="$try_type" ; break +fi +rm -f conftest* + + done +else + rm -rf conftest* + { echo "configure: error: Can't find system typedef for time_t." 1>&2; exit 1; } +fi +rm -f conftest* + +fi + +if test -n "$pthreads_cv_type_time_t" ; then + cat >> confdefs.h <<EOF +#define pthread_time_t $pthreads_cv_type_time_t +EOF + +fi +pthread_time_t=$pthreads_cv_type_time_t +echo "$ac_t""$pthreads_cv_type_time_t" 1>&6 +echo $ac_n "checking for fpos_t in stdio.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthreads_cv_fpos_t_in_stdio'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1975 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { return 0; } +int t() { +fpos_t position; +; return 0; } +EOF +if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_fpos_t_in_stdio=yes +else + rm -rf conftest* + pthreads_cv_fpos_t_in_stdio=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$pthreads_cv_fpos_t_in_stdio" 1>&6 +if test $pthreads_cv_fpos_t_in_stdio = yes ; then + +echo $ac_n "checking type of fpos_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthreads_cv_type_fpos_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2002 "configure" +#include "confdefs.h" + +#include <stdio.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { return 0; } +int t() { + extern fpos_t foo; +; return 0; } +EOF +if { (eval echo configure:2016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 2020 "configure" +#include "confdefs.h" + +#include <stdio.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { return 0; } +int t() { + extern fpos_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:2034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_fpos_t="$try_type" ; break +fi +rm -f conftest* + + done +else + rm -rf conftest* + { echo "configure: error: Can't find system typedef for fpos_t." 1>&2; exit 1; } +fi +rm -f conftest* + +fi + +if test -n "$pthreads_cv_type_fpos_t" ; then + cat >> confdefs.h <<EOF +#define pthread_fpos_t $pthreads_cv_type_fpos_t +EOF + +fi +pthread_fpos_t=$pthreads_cv_type_fpos_t +echo "$ac_t""$pthreads_cv_type_fpos_t" 1>&6 +else + cat >> confdefs.h <<\EOF +#define fpos_t off_t +EOF + + cat >> confdefs.h <<\EOF +#define pthread_fpos_t pthread_off_t +EOF + +fi + +echo $ac_n "checking type of off_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthreads_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2073 "configure" +#include "confdefs.h" + +#include <stdio.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { return 0; } +int t() { + extern off_t foo; +; return 0; } +EOF +if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do + cat > conftest.$ac_ext <<EOF +#line 2091 "configure" +#include "confdefs.h" + +#include <stdio.h> +#include <sys/types.h> +#ifdef STDC_HEADERS +#include <stdlib.h> +#endif + +int main() { return 0; } +int t() { + extern off_t foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:2105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_off_t="$try_type" ; break +fi +rm -f conftest* + + done +else + rm -rf conftest* + { echo "configure: error: Can't find system typedef for off_t." 1>&2; exit 1; } +fi +rm -f conftest* + +fi + +if test -n "$pthreads_cv_type_off_t" ; then + cat >> confdefs.h <<EOF +#define pthread_off_t $pthreads_cv_type_off_t +EOF + +fi +pthread_off_t=$pthreads_cv_type_off_t +echo "$ac_t""$pthreads_cv_type_off_t" 1>&6 +echo $ac_n "checking type of va_list""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthreads_cv_type_va_list'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2133 "configure" +#include "confdefs.h" +#include <stdarg.h> +int main() { return 0; } +int t() { + extern va_list foo; +; return 0; } +EOF +if { (eval echo configure:2141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + for try_type in "char *" "char **" "void *" "void **" "int *" "long *" ; do + cat > conftest.$ac_ext <<EOF +#line 2145 "configure" +#include "confdefs.h" +#include <stdarg.h> +int main() { return 0; } +int t() { + extern va_list foo; extern $try_type foo; +; return 0; } +EOF +if { (eval echo configure:2153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + pthreads_cv_type_va_list="$try_type" ; break +fi +rm -f conftest* + + done +else + rm -rf conftest* + { echo "configure: error: Can't find system typedef for va_list." 1>&2; exit 1; } +fi +rm -f conftest* + +fi + +if test -n "$pthreads_cv_type_va_list" ; then + cat >> confdefs.h <<EOF +#define pthread_va_list $pthreads_cv_type_va_list +EOF + +fi +pthread_va_list=$pthreads_cv_type_va_list +echo "$ac_t""$pthreads_cv_type_va_list" 1>&6 + +arpa_headers="#include <sys/types.h> +#include <arpa/nameser.h>" + +echo $ac_n "checking IP address type""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthread_cv_type_ipaddr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2185 "configure" +#include "confdefs.h" +$arpa_headers +int main() { return 0; } +int t() { + &_getlong; +; return 0; } +EOF +if { (eval echo configure:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + for type in "unsigned long" "unsigned int" ; do + cat > conftest.$ac_ext <<EOF +#line 2198 "configure" +#include "confdefs.h" +$arpa_headers +int main() { return 0; } +int t() { +extern $type _getlong (); +; return 0; } +EOF +if { (eval echo configure:2206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + pthread_cv_type_ipaddr="$type" + break + +fi +rm -f conftest* + + done + +else + rm -rf conftest* + echo "configure: warning: Can't compile _getlong reference." 1>&2 +fi +rm -f conftest* + + if test "$pthread_cv_type_ipaddr" = "" ; then + echo "configure: warning: Can't determine _getlong return type." 1>&2 + echo "configure: warning: Defaulting to unsigned long." 1>&2 + pthread_cv_type_ipaddr="unsigned long" + fi + +fi + +echo "$ac_t""$pthread_cv_type_ipaddr" 1>&6 +cat >> confdefs.h <<EOF +#define pthread_ipaddr_type $pthread_cv_type_ipaddr +EOF + + +echo $ac_n "checking IP port type""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthread_cv_type_ipport'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2242 "configure" +#include "confdefs.h" +$arpa_headers +int main() { return 0; } +int t() { + &_getshort; +; return 0; } +EOF +if { (eval echo configure:2250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + for type in "unsigned short" "unsigned int" ; do + cat > conftest.$ac_ext <<EOF +#line 2255 "configure" +#include "confdefs.h" +$arpa_headers +int main() { return 0; } +int t() { +extern $type _getshort (); +; return 0; } +EOF +if { (eval echo configure:2263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + pthread_cv_type_ipport="$type" + break + +fi +rm -f conftest* + + done + +else + rm -rf conftest* + echo "configure: warning: Can't compile _getshort reference." 1>&2 +fi +rm -f conftest* + + if test "$pthread_cv_type_ipport" = "" ; then + echo "configure: warning: Can't determine _getshort return type." 1>&2 + echo "configure: warning: Defaulting to unsigned short." 1>&2 + pthread_cv_type_ipport="unsigned short" + fi + +fi + +echo "$ac_t""$pthread_cv_type_ipport" 1>&6 +cat >> confdefs.h <<EOF +#define pthread_ipport_type $pthread_cv_type_ipport +EOF + + +echo $ac_n "checking pathname for terminal devices directory""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'pthread_cv_pty_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -d /devices/pseudo ; then + pty_path=/devices/pseudo/ + else + pty_path=/dev/ + fi + pthread_cv_pty_path=$pty_path + +fi + +cat >> confdefs.h <<EOF +#define _PATH_PTY "$pthread_cv_pty_path" +EOF + +echo "$ac_t""$pthread_cv_pty_path" 1>&6 + +echo $ac_n "checking directory name for time zone info""... $ac_c" 1>&6 +tzdir=NONE +for f in /usr/lib/zoneinfo /usr/share/zoneinfo /usr/share/lib/zoneinfo /etc/zoneinfo /usr/local/lib/zoneinfo +do + if test -d $f ; then + tzdir=$f + break + fi +done +case $tzdir in +NONE) + echo "configure: warning: Can't find zoneinfo directory." 1>&2 + echo "configure: warning: Defaulting zoneinfo directory to NULL." 1>&2 + tzdir=NULL + ;; +esac +cat >> confdefs.h <<EOF +#define _PATH_TZDIR "$tzdir" +EOF + +echo "$ac_t""$tzdir" 1>&6 + +echo $ac_n "checking filename for local time zone""... $ac_c" 1>&6 +tzfile=NONE +for f in $tzdir/localtime /etc/localtime +do + if test -f $f ; then + tzfile=$f + break + fi +done +case $tzfile in +NONE) # Should this default to tzdir/localtime? + echo "configure: warning: Can't find local time zone file." 1>&2 + if test tzdir = NULL ; then + echo "configure: warning: Defaulting local time zone file to NULL" 1>&2 + tzfile=NULL + else + echo "configure: warning: Defaulting local time zone file to $tzdir/localtime." 1>&2 + tzfile=$tzdir/localtime + fi + ;; +esac +cat >> confdefs.h <<EOF +#define _PATH_TZFILE "$tzfile" +EOF + +echo "$ac_t""$tzfile" 1>&6 + +cat >> confdefs.h <<\EOF +#define _PATH_RESCONF "/etc/resolv.conf" +EOF + +cat >> confdefs.h <<\EOF +#define _PATH_HOSTS "/etc/hosts" +EOF + +cat >> confdefs.h <<\EOF +#define _PATH_NETWORKS "/etc/networks" +EOF + +cat >> confdefs.h <<\EOF +#define _PATH_PROTOCOLS "/etc/protocols" +EOF + +cat >> confdefs.h <<\EOF +#define _PATH_SERVICES "/etc/services" +EOF + + +cat >> confdefs.h <<\EOF +#define _PATH_BSHELL "/bin/sh" +EOF + + +for ac_func in vfork +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2395 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +srctop=`cd ${srcdir}/..;pwd` + + +# Now we deal with symlinks &c. + +test -d include || mkdir include || \ + { echo "configure: error: Can't create include directory." 1>&2; exit 1; } + +test -d include/pthread || mkdir include/pthread || \ + { echo "configure: error: Can't create include/pthread directory." 1>&2; exit 1; } + +test -d lib || mkdir lib || \ + { echo "configure: error: Can't create lib directory." 1>&2; exit 1; } + +test -d lib/libpthreadutil || mkdir lib/libpthreadutil || \ + { echo "configure: error: Can't create lib/libpthreadutil directory." 1>&2; exit 1; } + +test -d bin || mkdir bin || \ + { echo "configure: error: Can't create bin directory." 1>&2; exit 1; } + +test -d bin/finger || mkdir bin/finger || \ + { echo "configure: error: Can't create bin directory." 1>&2; exit 1; } + +test -d tests || mkdir tests || \ + { echo "configure: error: Can't create tests directory." 1>&2; exit 1; } + +if test x$syscall = xNONE ; then + syscall=$name +fi + +links="include/pthread/machdep.h include/pthread/posix.h \ + machdep.c syscall.S" +targets="../machdep/engine-$name.h ../machdep/posix-$sysincludes.h \ + ../machdep/engine-$name.c ../machdep/syscall-$syscall.S" + +# Both these targets are optional. (Autoconf-generated configure scripts +# will require the existence of link targets, so check before adding them +# to the list.) +if test x$sysincludes != xNONE ; then + links="$links include/sys" + targets="$targets ../machdep/$sysincludes" +fi + +syscall_file=../machdep/syscall-template-$syscall.S +if test -r $srcdir/$syscall_file ; then + links="$links syscall-template.S" + targets="$targets $syscall_file" + HAVE_SYSCALL_TEMPLATE=yes +else + # This really isn't a fatal problem. In fact, it's expected, initially, + # for some targets. This is just to persuade people to fix the targets + # they deal with to provide some sort of template. + # + # Eventually this file probably will be required... + echo "configure: warning: No syscall template file syscall-template-$syscall.S found." 1>&2 + HAVE_SYSCALL_TEMPLATE=no +fi + + + + +if test x$makefile_frag != x ; then + makefile_frag=${srcdir}/$makefile_frag +else + makefile_frag=/dev/null +fi + + + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# 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 | + sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ + >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.10" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "config.flags GNUmakefile Makefile \ + lib/Makefile:../lib/Makefile.in \ + lib/libpthreadutil/Makefile:../lib/libpthreadutil/Makefile.in \ + bin/Makefile:../bin/Makefile.in \ + bin/finger/Makefile:../bin/finger/Makefile.in \ + tests/Makefile:../tests/Makefile.in config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@CC@%$CC%g +s%@CXX@%$CXX%g +s%@CPP@%$CPP%g +s%@RANLIB@%$RANLIB%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@target@%$target%g +s%@target_alias@%$target_alias%g +s%@target_cpu@%$target_cpu%g +s%@target_vendor@%$target_vendor%g +s%@target_os@%$target_os%g +s%@build@%$build%g +s%@build_alias@%$build_alias%g +s%@build_cpu@%$build_cpu%g +s%@build_vendor@%$build_vendor%g +s%@build_os@%$build_os%g +s%@SYSCALL_EXCEPTIONS@%$SYSCALL_EXCEPTIONS%g +s%@available_syscalls@%$available_syscalls%g +s%@missing_syscalls@%$missing_syscalls%g +s%@srctop@%$srctop%g +s%@HAVE_SYSCALL_TEMPLATE@%$HAVE_SYSCALL_TEMPLATE%g +/@makefile_frag@/r $makefile_frag +s%@makefile_frag@%%g + +CEOF +EOF +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"config.flags GNUmakefile Makefile \ + lib/Makefile:../lib/Makefile.in \ + lib/libpthreadutil/Makefile:../lib/libpthreadutil/Makefile.in \ + bin/Makefile:../bin/Makefile.in \ + bin/finger/Makefile:../bin/finger/Makefile.in \ + tests/Makefile:../tests/Makefile.in"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust relative srcdir, etc. for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +fi; done +rm -f conftest.subs + +# 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='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + cp $ac_given_srcdir/$ac_file_in conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. 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.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# 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.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. +# Maximum number of lines to put in a single here document. +ac_max_here_lines=12 + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF + +cat >> $CONFIG_STATUS <<EOF +ac_sources="$targets" +ac_dests="$links" +EOF + +cat >> $CONFIG_STATUS <<\EOF +srcdir=$ac_given_srcdir +while test -n "$ac_sources"; do + set $ac_dests; ac_dest=$1; shift; ac_dests=$* + set $ac_sources; ac_source=$1; shift; ac_sources=$* + + echo "linking $srcdir/$ac_source to $ac_dest" + + if test ! -r $srcdir/$ac_source; then + { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } + fi + rm -f $ac_dest + + # Make relative symlinks. + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` + if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then + # The dest file is in a subdirectory. + test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" + ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dest_dir_suffix. + ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dest_dir_suffix= ac_dots= + fi + + case "$srcdir" in + [/$]*) ac_rel_source="$srcdir/$ac_source" ;; + *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; + esac + + # Make a symlink if possible; otherwise try a hard link. + if ln -s $ac_rel_source $ac_dest 2>/dev/null || + ln $srcdir/$ac_source $ac_dest; then : + else + { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } + fi +done + + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/lib/libpthread/config/install-sh b/lib/libpthread/config/install-sh new file mode 100644 index 00000000000..ab74c882e92 --- /dev/null +++ b/lib/libpthread/config/install-sh @@ -0,0 +1,238 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5. +# +# 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. +# + + +# 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}" + +tranformbasename="" +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=: + 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 |