├── mmc.c ├── mmc.h ├── match.c ├── match.h ├── config.h ├── fdwatch.c ├── fdwatch.h ├── libhttpd.c ├── libhttpd.h ├── thttpd.8 ├── thttpd.c ├── timers.c ├── timers.h ├── Makefile.in ├── cgi-src ├── phf.c ├── ssi.8 ├── ssi.c ├── Makefile.in ├── redirect.8 └── redirect.c ├── tdate_parse.c ├── tdate_parse.h ├── extras ├── makeweb.1 ├── makeweb.c ├── Makefile.in ├── syslogtocern ├── syslogtocern.8 ├── htpasswd.1 └── htpasswd.c ├── thttpd.conf ├── samples ├── simplecgi.c ├── formPost.html ├── index.html ├── form.html ├── mult.c ├── viewData.c └── formPost.c ├── mime_encodings.txt ├── version.h ├── .gitignore ├── index.html ├── contrib └── redhat-rpm │ ├── thttpd.conf │ ├── thttpd.init │ └── thttpd.spec ├── cgi-bin └── printenv ├── scripts ├── 500.thttpd-rotate ├── thttpd_wrapper └── thttpd.sh ├── FILES ├── strerror.c ├── INSTALL ├── README.md ├── TODO ├── configure.in ├── mime_types.txt ├── aclocal.m4 ├── install-sh ├── config.guess ├── config.sub └── configure /mmc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/mmc.c -------------------------------------------------------------------------------- /mmc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/mmc.h -------------------------------------------------------------------------------- /match.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/match.c -------------------------------------------------------------------------------- /match.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/match.h -------------------------------------------------------------------------------- /config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/config.h -------------------------------------------------------------------------------- /fdwatch.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/fdwatch.c -------------------------------------------------------------------------------- /fdwatch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/fdwatch.h -------------------------------------------------------------------------------- /libhttpd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/libhttpd.c -------------------------------------------------------------------------------- /libhttpd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/libhttpd.h -------------------------------------------------------------------------------- /thttpd.8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/thttpd.8 -------------------------------------------------------------------------------- /thttpd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/thttpd.c -------------------------------------------------------------------------------- /timers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/timers.c -------------------------------------------------------------------------------- /timers.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/timers.h -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/Makefile.in -------------------------------------------------------------------------------- /cgi-src/phf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/cgi-src/phf.c -------------------------------------------------------------------------------- /cgi-src/ssi.8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/cgi-src/ssi.8 -------------------------------------------------------------------------------- /cgi-src/ssi.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/cgi-src/ssi.c -------------------------------------------------------------------------------- /tdate_parse.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/tdate_parse.c -------------------------------------------------------------------------------- /tdate_parse.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/tdate_parse.h -------------------------------------------------------------------------------- /extras/makeweb.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/extras/makeweb.1 -------------------------------------------------------------------------------- /extras/makeweb.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/extras/makeweb.c -------------------------------------------------------------------------------- /cgi-src/Makefile.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/cgi-src/Makefile.in -------------------------------------------------------------------------------- /cgi-src/redirect.8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/cgi-src/redirect.8 -------------------------------------------------------------------------------- /cgi-src/redirect.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/cgi-src/redirect.c -------------------------------------------------------------------------------- /extras/Makefile.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/extras/Makefile.in -------------------------------------------------------------------------------- /extras/syslogtocern: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/extras/syslogtocern -------------------------------------------------------------------------------- /extras/syslogtocern.8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larryhe/tinyhttpd/HEAD/extras/syslogtocern.8 -------------------------------------------------------------------------------- /thttpd.conf: -------------------------------------------------------------------------------- 1 | dir=/usr/local/www 2 | user=larry 3 | port=80 4 | host=0.0.0.0 5 | cgipat=**.cgi 6 | logfile=/usr/local/www/logs/thttpd_log 7 | pidfile=/var/run/thttpd.pid 8 | -------------------------------------------------------------------------------- /samples/simplecgi.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main(void) { 3 | printf("Content-Type: text/plain;charset=us-ascii\n\n"); 4 | printf("Hello world in C\n\n"); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /mime_encodings.txt: -------------------------------------------------------------------------------- 1 | # mime_encodings.txt 2 | # 3 | # A list of file extensions followed by the corresponding MIME encoding. 4 | # Extensions not found in the table proceed to the mime_types table. 5 | 6 | Z compress 7 | gz gzip 8 | uu x-uuencode 9 | -------------------------------------------------------------------------------- /samples/formPost.html: -------------------------------------------------------------------------------- 1 |
3 |
Your input (80 chars max.):
4 |
5 |
6 |
7 | -------------------------------------------------------------------------------- /samples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Sample page running on thttpd 6 | 7 | 8 | 9 |

Hello world!

10 | 11 | 12 | -------------------------------------------------------------------------------- /version.h: -------------------------------------------------------------------------------- 1 | /* version.h - version defines for thttpd and libhttpd */ 2 | 3 | #ifndef _VERSION_H_ 4 | #define _VERSION_H_ 5 | 6 | #define SERVER_SOFTWARE "thttpd/2.28 04Feb2018" 7 | #define SERVER_ADDRESS "http://www.acme.com/software/thttpd/" 8 | 9 | #endif /* _VERSION_H_ */ 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | config.log 3 | confdefs.h 4 | Makefile 5 | cgi-src/Makefile 6 | cgi-src/phf 7 | cgi-src/redirect 8 | cgi-src/ssi 9 | config.cache 10 | config.status 11 | extras/Makefile 12 | extras/htpasswd 13 | extras/makeweb 14 | mime_encodings.h 15 | mime_types.h 16 | thttpd 17 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | thttpd is running 3 | 4 | 5 |

thttpd is running

6 | 7 |

8 | Looks like you got it working. Congrats. 9 | 10 |

11 | Here's a link to the thttpd web pages. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /contrib/redhat-rpm/thttpd.conf: -------------------------------------------------------------------------------- 1 | # This section overrides defaults 2 | dir=/home/httpd/html 3 | chroot 4 | user=httpd# default = nobody 5 | logfile=/var/log/thttpd.log 6 | pidfile=/var/run/thttpd.pid 7 | # This section _documents_ defaults in effect 8 | # port=80 9 | # nosymlink# default = !chroot 10 | # novhost 11 | # nocgipat 12 | # nothrottles 13 | # host=0.0.0.0 14 | # charset=iso-8859-1 15 | -------------------------------------------------------------------------------- /samples/form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | form submition 6 | 7 | 8 | 9 |

10 |
11 |
12 |
13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /cgi-bin/printenv: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | date=`date -u '+%a, %d %b %Y %H:%M:%S %Z'` 4 | 5 | cat << EOF 6 | Content-type: text/plain 7 | Expires: $date 8 | 9 | CGI printenv 10 | 11 | EOF 12 | 13 | echo 'Date:' 14 | date 15 | echo 16 | echo 'Id:' 17 | id 18 | echo 19 | echo 'Env:' 20 | printenv 21 | echo 22 | if [ "$CONTENT_LENGTH" != "" ] ; then 23 | if [ "$CONTENT_LENGTH" -ne 0 ] ; then 24 | echo 'Input:' 25 | echo 26 | dd bs=1 count=$CONTENT_LENGTH 27 | echo 28 | fi 29 | fi 30 | -------------------------------------------------------------------------------- /extras/htpasswd.1: -------------------------------------------------------------------------------- 1 | .TH htpasswd 1 "05 May 1998" 2 | .SH NAME 3 | htpasswd - manipulate HTTP-server password files 4 | .SH SYNOPSIS 5 | .B htpasswd 6 | .RB [ -c ] 7 | .I passwordfile 8 | .I username 9 | .SH DESCRIPTION 10 | .PP 11 | Sets a user's password in an httpd-style password file. 12 | The -c flag creates a new file. 13 | .SH AUTHOR 14 | Rob McCool. 15 | Modified 29aug97 by Jef Poskanzer to accept new password on stdin, 16 | if stdin is a pipe or file. This is necessary for use from CGI. 17 | -------------------------------------------------------------------------------- /scripts/500.thttpd-rotate: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # thttpd-rotate - nightly script to rotate thttpd's log files on FreeBSD 4 | # 5 | # This goes in /etc/periodic/daily. It rotates the log files and then 6 | # tells thttpd to re-open its log file. 7 | 8 | cd /usr/local/www/chroot/logs 9 | rm -f thttpd_log.7.gz 10 | mv thttpd_log.6.gz thttpd_log.7.gz 11 | mv thttpd_log.5.gz thttpd_log.6.gz 12 | mv thttpd_log.4.gz thttpd_log.5.gz 13 | mv thttpd_log.3.gz thttpd_log.4.gz 14 | mv thttpd_log.2.gz thttpd_log.3.gz 15 | mv thttpd_log.1.gz thttpd_log.2.gz 16 | mv thttpd_log thttpd_log.1 17 | kill -HUP `cat /var/run/thttpd.pid` 18 | sleep 1 19 | gzip -f thttpd_log.1 20 | -------------------------------------------------------------------------------- /samples/mult.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main(void) 4 | { 5 | char *data; 6 | long m,n; 7 | printf("%s%c%c\n", "Content-Type:text/html;charset=iso-8859-1",13,10); 8 | printf("Multiplication results\n"); 9 | printf("

Multiplication results

\n"); 10 | data = getenv("QUERY_STRING"); 11 | if(data == NULL) 12 | printf("

Error! Error in passing data from form to script."); 13 | else if(sscanf(data,"m=%ld&n=%ld",&m,&n)!=2) 14 | printf("

Error! Invalid data. Data must be numeric."); 15 | else 16 | printf("

The product of %ld and %ld is %ld.",m,n,m*n); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /scripts/thttpd_wrapper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # thttpd_wrapper - wrapper script for thttpd on FreeBSD 4 | # 5 | # This goes in /usr/local/sbin. It backgrounds itself, and then runs 6 | # thttpd in a loop. If thttpd exits then the script restarts it automatically. 7 | # 8 | # The -D flag tells thttpd to *not* put itself into the background, 9 | # and the -C flag tells it to get the rest of its configuration from 10 | # the specified config file. 11 | 12 | ( 13 | while true ; do 14 | /usr/local/sbin/thttpd -D -C /usr/local/www/thttpd_config 15 | if [ -f /var/run/nologin ] ; then 16 | exit 17 | fi 18 | sleep 10 19 | egrep ' thttpd[:\[]' /var/log/messages | 20 | tail -33 | 21 | mail -s "thttpd on `hostname` restarted" root 22 | done 23 | ) & 24 | -------------------------------------------------------------------------------- /samples/viewData.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #define DATAFILE "./data.txt" 4 | 5 | int main (void){ 6 | FILE *f = fopen(DATAFILE, "r"); 7 | int ch; 8 | if(f == NULL){ 9 | printf("%s%c%c\n", "Content-Type:text/html;charset=iso-8859-1", 13, 10); 10 | printf("Failure\n"); 11 | printf("

Unable to open data file, sorry!

"); 12 | }else{ 13 | printf("%s%c%c\n", "Content-Type: text/html;charset=iso-8859-1", 13, 10); 14 | printf(""); 20 | } 21 | printf("
Go back"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /FILES: -------------------------------------------------------------------------------- 1 | FILES 2 | INSTALL 3 | Makefile.in 4 | README 5 | TODO 6 | aclocal.m4 7 | cgi-bin/printenv 8 | cgi-src/Makefile.in 9 | cgi-src/redirect.8 10 | cgi-src/redirect.c 11 | cgi-src/phf.c 12 | cgi-src/ssi.8 13 | cgi-src/ssi.c 14 | config.guess 15 | config.h 16 | config.sub 17 | configure 18 | configure.in 19 | extras/Makefile.in 20 | extras/htpasswd.1 21 | extras/htpasswd.c 22 | extras/makeweb.1 23 | extras/makeweb.c 24 | extras/syslogtocern 25 | extras/syslogtocern.8 26 | index.html 27 | install-sh 28 | libhttpd.c 29 | libhttpd.h 30 | match.c 31 | match.h 32 | mime_encodings.txt 33 | mime_types.txt 34 | mmc.c 35 | mmc.h 36 | strerror.c 37 | tdate_parse.c 38 | tdate_parse.h 39 | thttpd.8 40 | thttpd.c 41 | fdwatch.c 42 | fdwatch.h 43 | timers.c 44 | timers.h 45 | version.h 46 | scripts/500.thttpd-rotate 47 | scripts/thttpd.sh 48 | scripts/thttpd_wrapper 49 | contrib/redhat-rpm/thttpd.spec 50 | contrib/redhat-rpm/thttpd.init 51 | contrib/redhat-rpm/thttpd.conf 52 | -------------------------------------------------------------------------------- /scripts/thttpd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # thttpd.sh - startup script for thttpd on FreeBSD 4 | # 5 | # This should be manually installed as: 6 | # /usr/local/etc/rc.d/thttpd 7 | # It gets run at boot-time. 8 | # 9 | # Variables available: 10 | # thttpd_enable='YES' 11 | # thttpd_program='/usr/local/sbin/thttpd' 12 | # thttpd_pidfile='/var/run/thttpd.pid' 13 | # thttpd_devfs=... 14 | # thttpd_flags=... 15 | # 16 | # PROVIDE: thttpd 17 | # REQUIRE: LOGIN FILESYSTEMS 18 | # KEYWORD: shutdown 19 | 20 | . /etc/rc.subr 21 | 22 | name='thttpd' 23 | rcvar='thttpd_enable' 24 | start_precmd='thttpd_precmd' 25 | stop_cmd='thttpd_stop' 26 | thttpd_enable_defval='NO' 27 | 28 | load_rc_config "$name" 29 | command="${thttpd_program:-/usr/local/sbin/${name}}" 30 | pidfile="${thttpd_pidfile:-/var/run/${name}.pid}" 31 | command_args="-i ${pidfile}" 32 | 33 | thttpd_precmd () 34 | { 35 | if [ -n "$thttpd_devfs" ] ; then 36 | mount -t devfs devfs "$thttpd_devfs" 37 | devfs -m "$thttpd_devfs" rule -s 1 applyset 38 | devfs -m "$thttpd_devfs" rule -s 2 applyset 39 | fi 40 | } 41 | 42 | thttpd_stop () 43 | { 44 | kill -USR1 `cat "$pidfile"` 45 | } 46 | 47 | run_rc_command "$1" 48 | -------------------------------------------------------------------------------- /contrib/redhat-rpm/thttpd.init: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # The following two lines enable chkconfig(1) to manipulate this script 3 | # chkconfig: 2345 99 01 4 | # description: control Jef Poskanzer's tiny/turbo/throttling http daemon 5 | 6 | # source function library 7 | . /etc/rc.d/init.d/functions 8 | 9 | pidfile=/var/run/thttpd.pid 10 | pid=`cat $pidfile 2>/dev/null` 11 | 12 | if test -n "$pid" && kill -0 $pid 2>/dev/null; then 13 | dead=no 14 | else 15 | dead=yes 16 | fi 17 | 18 | die(){ 19 | echo -n "$*"; echo_failure; echo '' 20 | exit 1; 21 | } 22 | 23 | case "$1" in 24 | start) test "$dead" = yes || die thttpd is already running 25 | echo -n "Starting thttpd: " 26 | daemon /usr/sbin/thttpd -C /etc/thttpd.conf 27 | touch /var/lock/subsys/thttpd 28 | echo_success;echo '' 29 | exit 0 30 | ;; 31 | stop) echo -n "Gently shutting down thttpd: " 32 | signal=USR1 33 | ;; 34 | kill) echo -n "Violently killing thttpd: " 35 | signal=INT 36 | ;; 37 | status) status thttpd; exit $?;; 38 | restart) $0 stop; sleep 2; exec $0 start;; 39 | *) die "Usage: thttpd {start|stop|restart|status}";; 40 | esac 41 | 42 | test "$dead" = no || die thttpd is not running 43 | kill -$signal $pid 44 | sleep 2 45 | kill -0 $pid 2>/dev/null && die "thttpd[$pid] will not die" 46 | rm -f /var/lock/subsys/thttpd 47 | echo_success; echo '' 48 | -------------------------------------------------------------------------------- /strerror.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1988 Regents of the University of California. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms are permitted 6 | * provided that the above copyright notice and this paragraph are 7 | * duplicated in all such forms and that any documentation, 8 | * advertising materials, and other materials related to such 9 | * distribution and use acknowledge that the software was developed 10 | * by the University of California, Berkeley. The name of the 11 | * University may not be used to endorse or promote products derived 12 | * from this software without specific prior written permission. 13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 | */ 17 | 18 | #if defined(LIBC_SCCS) && !defined(lint) 19 | static char sccsid[] = "@(#)strerror.c 5.1 (Berkeley) 4/9/89"; 20 | #endif /* LIBC_SCCS and not lint */ 21 | 22 | #include 23 | 24 | #include 25 | 26 | char * 27 | strerror(errnum) 28 | int errnum; 29 | { 30 | extern int sys_nerr; 31 | extern char *sys_errlist[]; 32 | static char ebuf[20]; 33 | 34 | if ((unsigned int)errnum < sys_nerr) 35 | return(sys_errlist[errnum]); 36 | (void)sprintf(ebuf, "Unknown error: %d", errnum); 37 | return(ebuf); 38 | } 39 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | To build: 2 | 3 | % ./configure 4 | 5 | Edit config.h to change the configuration options if necessary. 6 | 7 | % make 8 | 9 | 10 | To install: 11 | 12 | % make install 13 | 14 | Edit one of your system rc files to run thttpd at boot time. Do NOT 15 | run it from inetd, that setup is inefficient so thttpd doesn't support it. 16 | 17 | 18 | Red Hat: 19 | 20 | On Red Hat Linux systems you can use RPM to install thttpd, like so: 21 | 22 | cd /usr/src/redhat/SOURCES 23 | wget http://www.acme.com/software/thttpd/thttpd-2.28.tar.gz 24 | rpm -ta thttpd-2.28.tar.gz 25 | rpm -i /usr/src/redhat/RPMS/i386/thttpd-2.28-1.i386.rpm 26 | 27 | 28 | Solaris: 29 | 30 | If you're running Solaris and you want to use the security-enhancing 31 | chroot feature, then you must create the TCP device files in the chroot 32 | tree. There is no way around this, Solaris needs these files to accept 33 | network connections. You need /dev/tcp, which is a symbolic link like so: 34 | /dev/tcp -> ../devices/pseudo/clone@0:tcp 35 | And you also need the file it points to: 36 | crw-rw-rw- bin 11, 42 May 24 21:32 /devices/pseudo/clone@0:tcp 37 | You probably need some other files too, such as shared libraries and 38 | a tmp directory. Check out the man page for ftpd, it has a big long 39 | shell script for setting up an anonymous ftp area that should also 40 | work for thttpd. 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | tinyhttpd 2 | ========= 3 | 4 | This is a github mirror of thttpd (http://www.acme.com/software/thttpd/) 5 | 6 | thttpd - tiny/turbo/throttling HTTP server 7 | version 2.28 of 04Feb2018 8 | 9 | thttpd is a simple, small, portable, fast, and secure HTTP server. 10 | 11 | Simple: It handles only the minimum necessary to implement HTTP/1.1. 12 | 13 | Small: See the size comparison chart at 14 | http://www.acme.com/software/thttpd/notes.html#sizes. It also has a 15 | very small run-time size, since it does not fork and is very careful about 16 | memory allocation. 17 | 18 | Portable: It compiles cleanly on FreeBSD 2.x/3.x, SunOS 4.1.x, Solaris 2.x, 19 | BSD/OS 2.x, Linux 1.2.x, OSF/1 (on a 64-bit Alpha), and no doubt many others. 20 | 21 | Fast: In typical use it's about as fast as the best full-featured servers 22 | (Apache, NCSA, Netscape). Under extreme load it's much faster. 23 | 24 | Secure: It goes to great lengths to protect the web server machine 25 | against attacks and breakins from other sites. 26 | 27 | It also has one extremely useful feature (URL-traffic-based throttling) that 28 | no other server currently has. 29 | 30 | See the manual entry for more details. See the INSTALL file for 31 | configuration and installation instructions. Check the web page 32 | (http://www.acme.com/software/thttpd/) for updates, or add yourself to 33 | the mailing list by sending a "subscribe" to thttpd-announce-request@mail.acme.com. 34 | 35 | Comments to: 36 | Jef Poskanzer jef@mail.acme.com http://www.acme.com/jef/ 37 | -------------------------------------------------------------------------------- /samples/formPost.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #define MAXLEN 80 4 | #define EXTRA 5 5 | #define MAXINPUT MAXLEN+EXTRA+2 6 | #define DATAFILE "./data.txt" 7 | 8 | void decode(char *src, char *last, char *dest){ 9 | for (; src != last; src++, dest++) { 10 | if(*src == '+'){ 11 | *dest = ' '; 12 | }else if(*src == '%'){ 13 | int code; 14 | if(sscanf(src+1, "%2x", &code) != 1){ 15 | code = '?'; 16 | } 17 | *dest = code; 18 | src += 2; 19 | }else{ 20 | *dest = *src; 21 | } 22 | } 23 | *dest = '\n'; 24 | *++dest = '\0'; 25 | } 26 | 27 | int main(void){ 28 | char *lenstr; 29 | char input[MAXINPUT], data[MAXINPUT]; 30 | long len; 31 | printf("%s%c%c\n", "Content-Type: text/html;charset=iso-8859-1", 13, 10); 32 | printf("Reponse\n"); 33 | lenstr = getenv("CONTENT_LENGTH"); 34 | if(lenstr == NULL || sscanf(lenstr, "%ld", &len) != 1 || len > MAXLEN){ 35 | printf("

Error in invocation- worng form probably"); 36 | }else{ 37 | FILE *f; 38 | fgets(input, len+1, stdin); 39 | decode(input+EXTRA, input+len, data); 40 | f = fopen(DATAFILE, "a"); 41 | if(f == NULL){ 42 | printf("

Sorry, cannot store your data."); 43 | }else{ 44 | fputs(data, f); 45 | } 46 | fclose(f); 47 | printf("

Thank you! the following contribution of yours has been stored:
%s", data); 48 | printf("
View content of Data file"); 49 | } 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | - - - - - - - - - - high priority - - - - - - - - - - 2 | 3 | IPv6 not working right. 4 | 5 | Problem with ACME News downloads. PATH_INFO interferes with the authorization. 6 | 7 | Why is the client's IP address showing up in paths? 8 | 9 | Fetches with numeric IP addresses and no Host: header are screwing up the 10 | vhost code? 11 | 143.90.193.229 - - [06/Apr/2000:09:21:34 -0700] "GET /209.133.38.22/software/thttpd/ HTTP/1.0" 200 12093 "http://www.dbphotography.demon.co.uk/index.html" "Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)" 12 | 143.90.193.229 - - [06/Apr/2000:09:21:37 -0700] "GET /143.90.193.229/software/thttpd/anvil_thttpd.gif HTTP/1.0" 403 - "http://www.acme.com/software/thttpd/" "Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)" 13 | 14 | Have directory indexing skip files that start with dot? Except ..? 15 | In libhttpd.c: 16 | + if (*(de->d_name) == '.' && *(de->d_name+1) != '.') 17 | + continue; 18 | namlen = NAMLEN(de); 19 | 20 | Add comment on INDEX_NAMES that it should be simple filenames only. 21 | 22 | The error page generated for non-local referers should include the 23 | original URL as an active link. 24 | 25 | Make open in mmc.c use O_NONBLOCK flag, to prevent DOS attack via 26 | a named pipe? 27 | 28 | - - - - - - - - - - later - - - - - - - - - - 29 | 30 | Document how symlinks interact with .htpasswd - authorization is checked 31 | on the result of the symlink, and not the origin. 32 | 33 | SIGHUP log re-opening doesn't work if you started as root. 34 | 35 | Change redirect to put the Refresh command in the HTTP headers, instead of 36 | a META tag. 37 | 38 | Add TCP_NODELAY, but after CGIs get spawned. 39 | 40 | Add stat cache? 1 minute expiry? 41 | 42 | Ifdef the un-close-on-exec CGI thing for Linux only. 43 | 44 | Add keep-alives, via a new state in thttpd.c. 45 | 46 | - - - - - - - - - - someday - - - - - - - - - - 47 | 48 | The special world-permissions checking is probably bogus. For one 49 | thing, it doesn't handle restrictive permissions on parent directories 50 | properly. It should probably just go away. 51 | 52 | redirect should interpret a path with a trailing / as /index.html 53 | 54 | ssi should change $cwd to the source document's location. 55 | 56 | Allow .throttle files in individual directories. 57 | 58 | Log-digesting scripts. 59 | 60 | Config web page. 61 | Common errors: 62 | Not realizing that -c overrides CGI_PATTERN instead of augmenting it. 63 | Using a directory name for the -c pattern. 64 | 65 | - - - - - - - - - - 3.x - - - - - - - - - - 66 | 67 | Tasklets re-write. 68 | 69 | - - - - - - - - - - general - - - - - - - - - - 70 | 71 | Release process: 72 | - update version number in version.h README INSTALL and 73 | contrib/redhat-rpm/thttpd.spec 74 | - do a tdiff and update the local installation 75 | - do an rcstreeinfo, and check in all files 76 | - make tar 77 | - mv it to .. 78 | - update version number in ../thttpd.html 79 | - update ~acmeweb/updates.html 80 | - mail announcement to thttpd-announce 81 | -------------------------------------------------------------------------------- /configure.in: -------------------------------------------------------------------------------- 1 | dnl Process this file with autoconf to produce a configure script. 2 | 3 | AC_INIT(thttpd.c) 4 | 5 | AC_CANONICAL_SYSTEM 6 | 7 | AC_PROG_CC 8 | 9 | V_CCOPT="-O" 10 | if test "$GCC" = yes ; then 11 | AC_MSG_CHECKING(gcc version) 12 | AC_CACHE_VAL(ac_cv_lbl_gcc_vers, 13 | ac_cv_lbl_gcc_vers=`$CC -dumpversion 2>&1 | \ 14 | sed -e 's/\..*//'`) 15 | AC_MSG_RESULT($ac_cv_lbl_gcc_vers) 16 | if test "$ac_cv_lbl_gcc_vers" -gt 1 ; then 17 | V_CCOPT="-O2" 18 | fi 19 | fi 20 | if test -f .devel ; then 21 | V_CCOPT="-g $V_CCOPT -ansi -pedantic -U__STRICT_ANSI__ -Wall -Wpointer-arith -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wno-long-long" 22 | fi 23 | 24 | dnl 25 | dnl maybe this should be a loop 26 | dnl 27 | AC_MSG_CHECKING(how to link static binaries) 28 | AC_CACHE_VAL(ac_cv_lbl_static_flag, 29 | ac_cv_lbl_static_flag=unknown 30 | echo 'main() {}' > conftest.c 31 | if test "$GCC" != yes ; then 32 | trial_flag="-Bstatic" 33 | test=`$CC $trial_flag -o conftest conftest.c 2>&1` 34 | if test -z "$test" ; then 35 | ac_cv_lbl_static_flag="$trial_flag" 36 | fi 37 | rm -f conftest 38 | fi 39 | if test "$ac_cv_lbl_static_flag" = unknown ; then 40 | trial_flag="-static" 41 | test=`$CC $trial_flag -o conftest conftest.c 2>&1` 42 | if test -z "$test" ; then 43 | ac_cv_lbl_static_flag="$trial_flag" 44 | fi 45 | rm -f conftest 46 | fi 47 | rm conftest.c) 48 | AC_MSG_RESULT($ac_cv_lbl_static_flag) 49 | if test "$ac_cv_lbl_static_flag" != unknown ; then 50 | V_STATICFLAG="$ac_cv_lbl_static_flag" 51 | fi 52 | 53 | AC_MSG_CHECKING(for __progname) 54 | AC_CACHE_VAL(ac_cv_extern__progname, 55 | AC_TRY_LINK([], 56 | [extern char *__progname; 57 | puts(__progname)], 58 | ac_cv_extern__progname=yes, 59 | ac_cv_extern__progname=no)) 60 | if test $ac_cv_extern__progname = yes ; then 61 | AC_DEFINE(HAVE__PROGNAME) 62 | AC_MSG_RESULT(yes) 63 | else 64 | AC_MSG_RESULT(no) 65 | fi 66 | 67 | AC_CHECK_HEADERS(fcntl.h grp.h memory.h paths.h poll.h sys/poll.h sys/devpoll.h sys/event.h osreldate.h) 68 | AC_HEADER_TIME 69 | AC_HEADER_DIRENT 70 | 71 | d="/usr/local/v6/lib" 72 | AC_MSG_CHECKING(for $d) 73 | if test -d $d; then 74 | AC_MSG_RESULT(yes (Adding -L$d to LDFLAGS)) 75 | LDFLAGS="$LDFLAGS -L$d" 76 | else 77 | AC_MSG_RESULT(no) 78 | fi 79 | 80 | dnl 81 | dnl Most operating systems have gethostbyname() in the default searched 82 | dnl libraries (i.e. libc): 83 | dnl 84 | V_NETLIBS="" 85 | AC_CHECK_FUNC(gethostbyname, , 86 | # Some OSes (eg. Solaris) place it in libnsl: 87 | AC_LBL_CHECK_LIB(nsl, gethostbyname, 88 | V_NETLIBS="-lnsl $V_NETLIBS", 89 | # Some strange OSes (SINIX) have it in libsocket: 90 | AC_LBL_CHECK_LIB(socket, gethostbyname, 91 | V_NETLIBS="-lsocket $V_NETLIBS", 92 | # Unfortunately libsocket sometimes depends on libnsl. 93 | # AC_CHECK_LIB's API is essentially broken so the 94 | # following ugliness is necessary: 95 | AC_LBL_CHECK_LIB(socket, gethostbyname, 96 | V_NETLIBS="-lsocket -lnsl $V_NETLIBS", 97 | AC_CHECK_LIB(resolv, gethostbyname, 98 | V_NETLIBS="-lresolv $V_NETLIBS"), 99 | -lnsl)))) 100 | AC_CHECK_FUNC(socket, , 101 | AC_CHECK_LIB(socket, socket, 102 | V_NETLIBS="-lsocket $V_NETLIBS", 103 | AC_LBL_CHECK_LIB(socket, socket, 104 | V_NETLIBS="-lsocket -lnsl $V_NETLIBS", , -lnsl))) 105 | 106 | AC_CHECK_LIB(inet6, main) 107 | 108 | AC_CHECK_FUNC(crypt, , AC_CHECK_LIB(crypt, crypt)) 109 | AC_CHECK_FUNC(hstrerror, , 110 | AC_CHECK_LIB(resolv, hstrerror, V_NETLIBS="-lresolv $V_NETLIBS")) 111 | 112 | AC_REPLACE_FUNCS(strerror) 113 | AC_CHECK_FUNCS(waitpid vsnprintf daemon setsid setlogin getaddrinfo getnameinfo gai_strerror kqueue sigset atoll) 114 | AC_FUNC_MMAP 115 | 116 | case "$target_os" in 117 | solaris*) 118 | dnl Solaris's select() is a bad wrapper routine. 119 | AC_CHECK_FUNCS(poll) 120 | ;; 121 | *) 122 | AC_CHECK_FUNCS(select poll) 123 | ;; 124 | esac 125 | 126 | AC_ACME_TM_GMTOFF 127 | AC_ACME_INT64T 128 | AC_ACME_SOCKLENT 129 | 130 | AC_PROG_MAKE_SET 131 | AC_PROG_INSTALL 132 | 133 | AC_SUBST(DEFS) 134 | AC_SUBST(V_CCOPT) 135 | AC_SUBST(V_STATICFLAG) 136 | AC_SUBST(V_NETLIBS) 137 | 138 | AC_OUTPUT(Makefile cgi-src/Makefile extras/Makefile) 139 | -------------------------------------------------------------------------------- /contrib/redhat-rpm/thttpd.spec: -------------------------------------------------------------------------------- 1 | Summary: Throttleable lightweight httpd server 2 | Name: thttpd 3 | Version: 2.28 4 | Release: 1 5 | Group: Networking 6 | URL: http://www.acme.com/software/thttpd 7 | Source0: http://www.acme.com/software/thttpd/thttpd-%{PACKAGE_VERSION}.tar.gz 8 | Copyright: distributable (BSD) 9 | BuildRoot: /tmp/thttpd-root 10 | 11 | %description 12 | Thttpd is a very compact no-frills httpd serving daemon that can handle 13 | very high loads. While lacking many of the advanced features of 14 | Apachee, thttpd operates without forking and is extremely efficient in 15 | memory use. Basic support for cgi scripts, authentication, and ssi is 16 | provided for. Advanced features include the ability to throttle traffic. 17 | 18 | %prep 19 | %setup 20 | 21 | ./configure --prefix=/usr 22 | 23 | %build 24 | make \ 25 | WEBDIR=/home/httpd/html \ 26 | BINDIR=/usr/sbin prefix=/usr \ 27 | CGIBINDIR=/home/httpd/cgi-bin 28 | 29 | %install 30 | 31 | mkdir -p $RPM_BUILD_ROOT/home/httpd/{cgi-bin,logs} 32 | mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d 33 | mkdir -p $RPM_BUILD_ROOT/usr/man/man{1,8} 34 | mkdir -p $RPM_BUILD_ROOT/usr/sbin 35 | install contrib/redhat-rpm/thttpd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/thttpd 36 | install contrib/redhat-rpm/thttpd.conf $RPM_BUILD_ROOT/etc/ 37 | make -i prefix=$RPM_BUILD_ROOT/usr install 38 | 39 | %pre 40 | 41 | grep '^httpd:' /etc/passwd >/dev/null || \ 42 | /usr/sbin/adduser -r httpd 43 | 44 | %post 45 | /sbin/chkconfig --add thttpd 46 | 47 | %preun 48 | /sbin/chkconfig --del thttpd 49 | 50 | %clean 51 | rm -rf $RPM_BUILD_ROOT 52 | 53 | %files 54 | %defattr(-,bin,bin) 55 | %doc [A-Z]* 56 | %attr(2755, httpd, httpd) /usr/sbin/makeweb 57 | /usr/sbin/htpasswd 58 | /usr/sbin/syslogtocern 59 | /usr/sbin/thttpd 60 | %attr(-, httpd, httpd) /home/httpd 61 | %attr(0755, root, root) /etc/rc.d/init.d/thttpd 62 | %config /etc/thttpd.conf 63 | %doc /usr/man/man*/* 64 | 65 | %changelog 66 | 67 | * Mon Dec 29 2003 Jef Poskanzer 68 | - Updated to 2.26 69 | 70 | * Sat Dec 20 2003 Jef Poskanzer 71 | - Updated to 2.25b 72 | 73 | * Mon Oct 27 2003 Jef Poskanzer 74 | - Updated to 2.25 75 | 76 | * Sat Sep 13 2003 Jef Poskanzer 77 | - Updated to 2.24 78 | 79 | * Sat May 25 2002 Jef Poskanzer 80 | - Updated to 2.23 81 | 82 | * Mon Jul 09 2001 Jef Poskanzer 83 | - Updated to 2.22 84 | 85 | * Thu Apr 26 2001 Jef Poskanzer 86 | - Updated to 2.21c 87 | 88 | * Mon Apr 23 2001 Jef Poskanzer 89 | - Updated to 2.21b 90 | 91 | * Mon Oct 02 2000 Jef Poskanzer 92 | - Updated to 2.21 93 | 94 | * Wed Sep 13 2000 Jef Poskanzer 95 | - Updated to 2.20 96 | 97 | * Mon Sep 11 2000 Bennett Todd 98 | - added thttpd.conf, took config info out of init script 99 | - switched to logging in /var/log, used pidfile 100 | 101 | * Thu Jun 15 2000 Jef Poskanzer 102 | - Updated to 2.19 103 | 104 | * Thu May 18 2000 Jef Poskanzer 105 | - Updated to 2.18 106 | 107 | * Fri Mar 17 2000 Jef Poskanzer 108 | - Updated to 2.17 109 | 110 | * Mon Feb 28 2000 Jef Poskanzer 111 | - Updated to 2.16 112 | 113 | * Thu Feb 03 2000 Jef Poskanzer 114 | - Updated to 2.15 115 | 116 | * Thu Jan 21 2000 Jef Poskanzer 117 | - Updated to 2.14 118 | 119 | * Thu Jan 6 2000 Jef Poskanzer 120 | - Updated to 2.13 121 | 122 | * Mon Jan 3 2000 Bennett Todd 123 | - updated to 2.12, tweaked to move thttpd.init into tarball 124 | 125 | * Mon Dec 13 1999 Bennett Todd 126 | - Updated to 2.09 127 | 128 | * Fri Dec 10 1999 Bennett Todd 129 | - Updated to 2.08 130 | 131 | * Wed Nov 24 1999 Bennett Todd 132 | - updated to 2.06, parameterized Version string in source url 133 | - changed to use "make install", simplified %files list 134 | 135 | * Wed Nov 10 1999 Bennett Todd 136 | - Version 2.05, reset release to 1 137 | - dropped bugfix patch since Jef included that 138 | - streamlined install 139 | 140 | * Sun Jul 25 1999 Bennett Todd 141 | - Release 4, added mime type swf 142 | 143 | * Mon May 3 1999 Bennett Todd 144 | - Release 2, added patch to set cgi-timelimit up to 10 minutes 145 | fm default 30 seconds 146 | 147 | * Wed Feb 10 1999 Bennett Todd 148 | - based on 2.00-2, bumped to 2.04, reset release back to 1 149 | - fixed a couple of broken entries in %install to reference $RPM_BUILD_ROOT 150 | - simplified %files to populate /usr/doc/... with just [A-Z]* (TODO had gone 151 | away, this simplification makes it liklier to be trivially portable to 152 | future releases). 153 | - added %doc tags for the man pages 154 | 155 | -------------------------------------------------------------------------------- /mime_types.txt: -------------------------------------------------------------------------------- 1 | # mime_types.txt 2 | # 3 | # A list of file extensions followed by the corresponding MIME type. 4 | # Extensions not found in the table are returned as text/plain. 5 | 6 | a application/octet-stream 7 | aab application/x-authorware-bin 8 | aam application/x-authorware-map 9 | aas application/x-authorware-seg 10 | ai application/postscript 11 | aif audio/x-aiff 12 | aifc audio/x-aiff 13 | aiff audio/x-aiff 14 | asc text/plain; charset=%s 15 | asf video/x-ms-asf 16 | asx video/x-ms-asf 17 | au audio/basic 18 | avi video/x-msvideo 19 | bcpio application/x-bcpio 20 | bin application/octet-stream 21 | bmp image/bmp 22 | cdf application/x-netcdf 23 | class application/x-java-vm 24 | cpio application/x-cpio 25 | cpt application/mac-compactpro 26 | crl application/x-pkcs7-crl 27 | crt application/x-x509-ca-cert 28 | csh application/x-csh 29 | css text/css; charset=%s 30 | dcr application/x-director 31 | dir application/x-director 32 | djv image/vnd.djvu 33 | djvu image/vnd.djvu 34 | dll application/octet-stream 35 | dms application/octet-stream 36 | doc application/msword 37 | dtd text/xml; charset=%s 38 | dump application/octet-stream 39 | dvi application/x-dvi 40 | dxr application/x-director 41 | eps application/postscript 42 | etx text/x-setext 43 | exe application/octet-stream 44 | ez application/andrew-inset 45 | fgd application/x-director 46 | fh image/x-freehand 47 | fh4 image/x-freehand 48 | fh5 image/x-freehand 49 | fh7 image/x-freehand 50 | fhc image/x-freehand 51 | gif image/gif 52 | gtar application/x-gtar 53 | hdf application/x-hdf 54 | hqx application/mac-binhex40 55 | htm text/html; charset=%s 56 | html text/html; charset=%s 57 | ice x-conference/x-cooltalk 58 | ief image/ief 59 | iges model/iges 60 | igs model/iges 61 | iv application/x-inventor 62 | jar application/x-java-archive 63 | jfif image/jpeg 64 | jpe image/jpeg 65 | jpeg image/jpeg 66 | jpg image/jpeg 67 | js application/x-javascript 68 | kar audio/midi 69 | kml application/vnd.google-earth.kml+xml 70 | kmz application/vnd.google-earth.kmz 71 | latex application/x-latex 72 | lha application/octet-stream 73 | loc application/xml-loc 74 | lzh application/octet-stream 75 | m3u audio/x-mpegurl 76 | man application/x-troff-man 77 | mathml application/mathml+xml 78 | me application/x-troff-me 79 | mesh model/mesh 80 | mid audio/midi 81 | midi audio/midi 82 | mif application/vnd.mif 83 | mime message/rfc822 84 | mml application/mathml+xml 85 | mov video/quicktime 86 | movie video/x-sgi-movie 87 | mp2 audio/mpeg 88 | mp3 audio/mpeg 89 | mp4 video/mp4 90 | mpe video/mpeg 91 | mpeg video/mpeg 92 | mpg video/mpeg 93 | mpga audio/mpeg 94 | ms application/x-troff-ms 95 | msh model/mesh 96 | mv video/x-sgi-movie 97 | mxu video/vnd.mpegurl 98 | nc application/x-netcdf 99 | o application/octet-stream 100 | oda application/oda 101 | ogg application/ogg 102 | pac application/x-ns-proxy-autoconfig 103 | pbm image/x-portable-bitmap 104 | pdb chemical/x-pdb 105 | pdf application/pdf 106 | pgm image/x-portable-graymap 107 | pgn application/x-chess-pgn 108 | png image/png 109 | pnm image/x-portable-anymap 110 | ppm image/x-portable-pixmap 111 | ppt application/vnd.ms-powerpoint 112 | ps application/postscript 113 | qt video/quicktime 114 | ra audio/x-realaudio 115 | ram audio/x-pn-realaudio 116 | ras image/x-cmu-raster 117 | rdf application/rdf+xml 118 | rgb image/x-rgb 119 | rm audio/x-pn-realaudio 120 | roff application/x-troff 121 | rpm audio/x-pn-realaudio-plugin 122 | rss application/rss+xml 123 | rtf text/rtf; charset=%s 124 | rtx text/richtext; charset=%s 125 | sgm text/sgml; charset=%s 126 | sgml text/sgml; charset=%s 127 | sh application/x-sh 128 | shar application/x-shar 129 | silo model/mesh 130 | sit application/x-stuffit 131 | skd application/x-koan 132 | skm application/x-koan 133 | skp application/x-koan 134 | skt application/x-koan 135 | smi application/smil 136 | smil application/smil 137 | snd audio/basic 138 | so application/octet-stream 139 | spl application/x-futuresplash 140 | src application/x-wais-source 141 | stc application/vnd.sun.xml.calc.template 142 | std application/vnd.sun.xml.draw.template 143 | sti application/vnd.sun.xml.impress.template 144 | stw application/vnd.sun.xml.writer.template 145 | sv4cpio application/x-sv4cpio 146 | sv4crc application/x-sv4crc 147 | svg image/svg+xml 148 | svgz image/svg+xml 149 | swf application/x-shockwave-flash 150 | sxc application/vnd.sun.xml.calc 151 | sxd application/vnd.sun.xml.draw 152 | sxg application/vnd.sun.xml.writer.global 153 | sxi application/vnd.sun.xml.impress 154 | sxm application/vnd.sun.xml.math 155 | sxw application/vnd.sun.xml.writer 156 | t application/x-troff 157 | tar application/x-tar 158 | tcl application/x-tcl 159 | tex application/x-tex 160 | texi application/x-texinfo 161 | texinfo application/x-texinfo 162 | tif image/tiff 163 | tiff image/tiff 164 | tr application/x-troff 165 | tsp application/dsptype 166 | tsv text/tab-separated-values; charset=%s 167 | txt text/plain; charset=%s 168 | ustar application/x-ustar 169 | vcd application/x-cdlink 170 | vrml model/vrml 171 | vx video/x-rad-screenplay 172 | wav audio/x-wav 173 | wax audio/x-ms-wax 174 | wbmp image/vnd.wap.wbmp 175 | wbxml application/vnd.wap.wbxml 176 | wm video/x-ms-wm 177 | wma audio/x-ms-wma 178 | wmd application/x-ms-wmd 179 | wml text/vnd.wap.wml 180 | wmlc application/vnd.wap.wmlc 181 | wmls text/vnd.wap.wmlscript 182 | wmlsc application/vnd.wap.wmlscriptc 183 | wmv video/x-ms-wmv 184 | wmx video/x-ms-wmx 185 | wmz application/x-ms-wmz 186 | wrl model/vrml 187 | wsrc application/x-wais-source 188 | wvx video/x-ms-wvx 189 | xbm image/x-xbitmap 190 | xht application/xhtml+xml; charset=%s 191 | xhtml application/xhtml+xml; charset=%s 192 | xls application/vnd.ms-excel 193 | xml text/xml; charset=%s 194 | xpm image/x-xpixmap 195 | xsl text/xml; charset=%s 196 | xwd image/x-xwindowdump 197 | xyz chemical/x-xyz 198 | zip application/zip 199 | -------------------------------------------------------------------------------- /extras/htpasswd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * htpasswd.c: simple program for manipulating password file for NCSA httpd 3 | * 4 | * Rob McCool 5 | */ 6 | 7 | /* Modified 29aug97 by Jef Poskanzer to accept new password on stdin, 8 | ** if stdin is a pipe or file. This is necessary for use from CGI. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #define LF 10 20 | #define CR 13 21 | 22 | #define MAX_STRING_LEN 256 23 | 24 | int tfd; 25 | char temp_template[] = "/tmp/htp.XXXXXX"; 26 | 27 | void interrupted(int); 28 | 29 | static char * strd(char *s) { 30 | char *d; 31 | 32 | d=(char *)malloc(strlen(s) + 1); 33 | strcpy(d,s); 34 | return(d); 35 | } 36 | 37 | static void getword(char *word, char *line, char stop) { 38 | int x = 0,y; 39 | 40 | for(x=0;((line[x]) && (line[x] != stop));x++) 41 | word[x] = line[x]; 42 | 43 | word[x] = '\0'; 44 | if(line[x]) ++x; 45 | y=0; 46 | 47 | while((line[y++] = line[x++])); 48 | } 49 | 50 | static int my_getline(char *s, int n, FILE *f) { 51 | int i=0; 52 | 53 | while(1) { 54 | s[i] = (char)fgetc(f); 55 | 56 | if(s[i] == CR) 57 | s[i] = fgetc(f); 58 | 59 | if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) { 60 | s[i] = '\0'; 61 | return (feof(f) ? 1 : 0); 62 | } 63 | ++i; 64 | } 65 | } 66 | 67 | static void putline(FILE *f,char *l) { 68 | int x; 69 | 70 | for(x=0;l[x];x++) fputc(l[x],f); 71 | fputc('\n',f); 72 | } 73 | 74 | 75 | /* From local_passwd.c (C) Regents of Univ. of California blah blah */ 76 | static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */ 77 | "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; 78 | 79 | static void to64(char *s, long v, int n) { 80 | while (--n >= 0) { 81 | *s++ = itoa64[v&0x3f]; 82 | v >>= 6; 83 | } 84 | } 85 | 86 | #ifdef MPE 87 | /* MPE lacks getpass() and a way to suppress stdin echo. So for now, just 88 | issue the prompt and read the results with echo. (Ugh). */ 89 | 90 | char *getpass(const char *prompt) { 91 | 92 | static char password[81]; 93 | 94 | fputs(prompt,stderr); 95 | gets((char *)&password); 96 | 97 | if (strlen((char *)&password) > 8) { 98 | password[8]='\0'; 99 | } 100 | 101 | return (char *)&password; 102 | } 103 | #endif 104 | 105 | static void 106 | add_password( char* user, FILE* f ) 107 | { 108 | char pass[100]; 109 | char* pw; 110 | char* cpw; 111 | char salt[3]; 112 | 113 | if ( ! isatty( fileno( stdin ) ) ) 114 | { 115 | (void) fgets( pass, sizeof(pass), stdin ); 116 | if ( pass[strlen(pass) - 1] == '\n' ) 117 | pass[strlen(pass) - 1] = '\0'; 118 | pw = pass; 119 | } 120 | else 121 | { 122 | pw = strd( (char*) getpass( "New password:" ) ); 123 | if ( strcmp( pw, (char*) getpass( "Re-type new password:" ) ) != 0 ) 124 | { 125 | (void) fprintf( stderr, "They don't match, sorry.\n" ); 126 | if ( tfd != -1 ) 127 | unlink( temp_template ); 128 | exit( 1 ); 129 | } 130 | } 131 | (void) srandom( (int) time( (time_t*) 0 ) ); 132 | to64( &salt[0], random(), 2 ); 133 | cpw = crypt( pw, salt ); 134 | (void) fprintf( f, "%s:%s\n", user, cpw ); 135 | } 136 | 137 | static void usage(void) { 138 | fprintf(stderr,"Usage: htpasswd [-c] passwordfile username\n"); 139 | fprintf(stderr,"The -c flag creates a new file.\n"); 140 | exit(1); 141 | } 142 | 143 | void interrupted(int signo) { 144 | fprintf(stderr,"Interrupted.\n"); 145 | if(tfd != -1) unlink(temp_template); 146 | exit(1); 147 | } 148 | 149 | int main(int argc, char *argv[]) { 150 | FILE *tfp,*f; 151 | char user[MAX_STRING_LEN]; 152 | char line[MAX_STRING_LEN]; 153 | char l[MAX_STRING_LEN]; 154 | char w[MAX_STRING_LEN]; 155 | char command[MAX_STRING_LEN]; 156 | int found; 157 | 158 | tfd = -1; 159 | signal(SIGINT,(void (*)(int))interrupted); 160 | if(argc == 4) { 161 | if(strcmp(argv[1],"-c")) 162 | usage(); 163 | if(!(tfp = fopen(argv[2],"w"))) { 164 | fprintf(stderr,"Could not open passwd file %s for writing.\n", 165 | argv[2]); 166 | perror("fopen"); 167 | exit(1); 168 | } 169 | printf("Adding password for %s.\n",argv[3]); 170 | add_password(argv[3],tfp); 171 | fclose(tfp); 172 | exit(0); 173 | } else if(argc != 3) usage(); 174 | 175 | tfd = mkstemp(temp_template); 176 | if(!(tfp = fdopen(tfd,"w"))) { 177 | fprintf(stderr,"Could not open temp file.\n"); 178 | exit(1); 179 | } 180 | 181 | if(!(f = fopen(argv[1],"r"))) { 182 | fprintf(stderr, 183 | "Could not open passwd file %s for reading.\n",argv[1]); 184 | fprintf(stderr,"Use -c option to create new one.\n"); 185 | exit(1); 186 | } 187 | strncpy(user,argv[2],sizeof(user)-1); 188 | user[sizeof(user)-1] = '\0'; 189 | 190 | found = 0; 191 | while(!(my_getline(line,MAX_STRING_LEN,f))) { 192 | if(found || (line[0] == '#') || (!line[0])) { 193 | putline(tfp,line); 194 | continue; 195 | } 196 | strcpy(l,line); 197 | getword(w,l,':'); 198 | if(strcmp(user,w)) { 199 | putline(tfp,line); 200 | continue; 201 | } 202 | else { 203 | printf("Changing password for user %s\n",user); 204 | add_password(user,tfp); 205 | found = 1; 206 | } 207 | } 208 | if(!found) { 209 | printf("Adding user %s\n",user); 210 | add_password(user,tfp); 211 | } 212 | fclose(f); 213 | fclose(tfp); 214 | sprintf(command,"cp %s %s",temp_template,argv[1]); 215 | system(command); 216 | unlink(temp_template); 217 | exit(0); 218 | } 219 | -------------------------------------------------------------------------------- /aclocal.m4: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Improved version of AC_CHECK_LIB 3 | dnl 4 | dnl Thanks to John Hawkinson (jhawk@mit.edu) 5 | dnl 6 | dnl usage: 7 | dnl 8 | dnl AC_LBL_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, 9 | dnl ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) 10 | dnl 11 | dnl results: 12 | dnl 13 | dnl LIBS 14 | dnl 15 | 16 | define(AC_LBL_CHECK_LIB, 17 | [AC_MSG_CHECKING([for $2 in -l$1]) 18 | dnl Use a cache variable name containing both the library and function name, 19 | dnl because the test really is for library $1 defining function $2, not 20 | dnl just for library $1. Separate tests with the same $1 and different $2's 21 | dnl may have different results. 22 | ac_lib_var=`echo $1['_']$2['_']$5 | sed 'y%./+- %__p__%'` 23 | AC_CACHE_VAL(ac_cv_lbl_lib_$ac_lib_var, 24 | [ac_save_LIBS="$LIBS" 25 | LIBS="-l$1 $5 $LIBS" 26 | AC_TRY_LINK(dnl 27 | ifelse([$2], [main], , dnl Avoid conflicting decl of main. 28 | [/* Override any gcc2 internal prototype to avoid an error. */ 29 | ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus 30 | extern "C" 31 | #endif 32 | ])dnl 33 | [/* We use char because int might match the return type of a gcc2 34 | builtin and then its argument prototype would still apply. */ 35 | char $2(); 36 | ]), 37 | [$2()], 38 | eval "ac_cv_lbl_lib_$ac_lib_var=yes", 39 | eval "ac_cv_lbl_lib_$ac_lib_var=no") 40 | LIBS="$ac_save_LIBS" 41 | ])dnl 42 | if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then 43 | AC_MSG_RESULT(yes) 44 | ifelse([$3], , 45 | [changequote(, )dnl 46 | ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ 47 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` 48 | changequote([, ])dnl 49 | AC_DEFINE_UNQUOTED($ac_tr_lib) 50 | LIBS="-l$1 $LIBS" 51 | ], [$3]) 52 | else 53 | AC_MSG_RESULT(no) 54 | ifelse([$4], , , [$4 55 | ])dnl 56 | fi 57 | ]) 58 | 59 | dnl 60 | dnl AC_LBL_LIBRARY_NET 61 | dnl 62 | dnl This test is for network applications that need socket() and 63 | dnl gethostbyname() -ish functions. Under Solaris, those applications 64 | dnl need to link with "-lsocket -lnsl". Under IRIX, they need to link 65 | dnl with "-lnsl" but should *not* link with "-lsocket" because 66 | dnl libsocket.a breaks a number of things (for instance: 67 | dnl gethostbyname() under IRIX 5.2, and snoop sockets under most 68 | dnl versions of IRIX). 69 | dnl 70 | dnl Unfortunately, many application developers are not aware of this, 71 | dnl and mistakenly write tests that cause -lsocket to be used under 72 | dnl IRIX. It is also easy to write tests that cause -lnsl to be used 73 | dnl under operating systems where neither are necessary (or useful), 74 | dnl such as SunOS 4.1.4, which uses -lnsl for TLI. 75 | dnl 76 | dnl This test exists so that every application developer does not test 77 | dnl this in a different, and subtly broken fashion. 78 | 79 | dnl It has been argued that this test should be broken up into two 80 | dnl seperate tests, one for the resolver libraries, and one for the 81 | dnl libraries necessary for using Sockets API. Unfortunately, the two 82 | dnl are carefully intertwined and allowing the autoconf user to use 83 | dnl them independantly potentially results in unfortunate ordering 84 | dnl dependancies -- as such, such component macros would have to 85 | dnl carefully use indirection and be aware if the other components were 86 | dnl executed. Since other autoconf macros do not go to this trouble, 87 | dnl and almost no applications use sockets without the resolver, this 88 | dnl complexity has not been implemented. 89 | dnl 90 | dnl The check for libresolv is in case you are attempting to link 91 | dnl statically and happen to have a libresolv.a lying around (and no 92 | dnl libnsl.a). 93 | dnl 94 | AC_DEFUN(AC_LBL_LIBRARY_NET, [ 95 | # Most operating systems have gethostbyname() in the default searched 96 | # libraries (i.e. libc): 97 | AC_CHECK_FUNC(gethostbyname, , 98 | # Some OSes (eg. Solaris) place it in libnsl: 99 | AC_LBL_CHECK_LIB(nsl, gethostbyname, , 100 | # Some strange OSes (SINIX) have it in libsocket: 101 | AC_LBL_CHECK_LIB(socket, gethostbyname, , 102 | # Unfortunately libsocket sometimes depends on libnsl. 103 | # AC_CHECK_LIB's API is essentially broken so the 104 | # following ugliness is necessary: 105 | AC_LBL_CHECK_LIB(socket, gethostbyname, 106 | LIBS="-lsocket -lnsl $LIBS", 107 | AC_CHECK_LIB(resolv, gethostbyname), 108 | -lnsl)))) 109 | AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket, , 110 | AC_LBL_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", , 111 | -lnsl))) 112 | # DLPI needs putmsg under HPUX so test for -lstr while we're at it 113 | AC_CHECK_LIB(str, putmsg) 114 | ]) 115 | 116 | dnl 117 | dnl Checks to see if struct tm has the BSD tm_gmtoff member 118 | dnl 119 | dnl usage: 120 | dnl 121 | dnl AC_ACME_TM_GMTOFF 122 | dnl 123 | dnl results: 124 | dnl 125 | dnl HAVE_TM_GMTOFF (defined) 126 | dnl 127 | AC_DEFUN(AC_ACME_TM_GMTOFF, 128 | [AC_MSG_CHECKING(if struct tm has tm_gmtoff member) 129 | AC_CACHE_VAL(ac_cv_acme_tm_has_tm_gmtoff, 130 | AC_TRY_COMPILE([ 131 | # include 132 | # include ], 133 | [u_int i = sizeof(((struct tm *)0)->tm_gmtoff)], 134 | ac_cv_acme_tm_has_tm_gmtoff=yes, 135 | ac_cv_acme_tm_has_tm_gmtoff=no)) 136 | AC_MSG_RESULT($ac_cv_acme_tm_has_tm_gmtoff) 137 | if test $ac_cv_acme_tm_has_tm_gmtoff = yes ; then 138 | AC_DEFINE(HAVE_TM_GMTOFF) 139 | fi]) 140 | 141 | dnl 142 | dnl Checks to see if int64_t exists 143 | dnl 144 | dnl usage: 145 | dnl 146 | dnl AC_ACME_INT64T 147 | dnl 148 | dnl results: 149 | dnl 150 | dnl HAVE_INT64T (defined) 151 | dnl 152 | AC_DEFUN(AC_ACME_INT64T, 153 | [AC_MSG_CHECKING(if int64_t exists) 154 | AC_CACHE_VAL(ac_cv_acme_int64_t, 155 | AC_TRY_COMPILE([ 156 | # include ], 157 | [int64_t i64], 158 | ac_cv_acme_int64_t=yes, 159 | ac_cv_acme_int64_t=no)) 160 | AC_MSG_RESULT($ac_cv_acme_int64_t) 161 | if test $ac_cv_acme_int64_t = yes ; then 162 | AC_DEFINE(HAVE_INT64T) 163 | fi]) 164 | 165 | dnl 166 | dnl Checks to see if socklen_t exists 167 | dnl 168 | dnl usage: 169 | dnl 170 | dnl AC_ACME_SOCKLENT 171 | dnl 172 | dnl results: 173 | dnl 174 | dnl HAVE_SOCKLENT (defined) 175 | dnl 176 | AC_DEFUN(AC_ACME_SOCKLENT, 177 | [AC_MSG_CHECKING(if socklen_t exists) 178 | AC_CACHE_VAL(ac_cv_acme_socklen_t, 179 | AC_TRY_COMPILE([ 180 | # include 181 | # include ], 182 | [socklen_t slen], 183 | ac_cv_acme_socklen_t=yes, 184 | ac_cv_acme_socklen_t=no)) 185 | AC_MSG_RESULT($ac_cv_acme_socklen_t) 186 | if test $ac_cv_acme_socklen_t = yes ; then 187 | AC_DEFINE(HAVE_SOCKLENT) 188 | fi]) 189 | -------------------------------------------------------------------------------- /install-sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # install - install a program, script, or datafile 4 | # This comes from X11R5 (mit/util/scripts/install.sh). 5 | # 6 | # Copyright 1991 by the Massachusetts Institute of Technology 7 | # 8 | # Permission to use, copy, modify, distribute, and sell this software and its 9 | # documentation for any purpose is hereby granted without fee, provided that 10 | # the above copyright notice appear in all copies and that both that 11 | # copyright notice and this permission notice appear in supporting 12 | # documentation, and that the name of M.I.T. not be used in advertising or 13 | # publicity pertaining to distribution of the software without specific, 14 | # written prior permission. M.I.T. makes no representations about the 15 | # suitability of this software for any purpose. It is provided "as is" 16 | # without express or implied warranty. 17 | # 18 | # Calling this script install-sh is preferred over install.sh, to prevent 19 | # `make' implicit rules from creating a file called install from it 20 | # when there is no Makefile. 21 | # 22 | # This script is compatible with the BSD install script, but was written 23 | # from scratch. It can only install one file at a time, a restriction 24 | # shared with many OS's install programs. 25 | 26 | 27 | # set DOITPROG to echo to test this script 28 | 29 | # Don't use :- since 4.3BSD and earlier shells don't like it. 30 | doit="${DOITPROG-}" 31 | 32 | 33 | # put in absolute paths if you don't have them in your path; or use env. vars. 34 | 35 | mvprog="${MVPROG-mv}" 36 | cpprog="${CPPROG-cp}" 37 | chmodprog="${CHMODPROG-chmod}" 38 | chownprog="${CHOWNPROG-chown}" 39 | chgrpprog="${CHGRPPROG-chgrp}" 40 | stripprog="${STRIPPROG-strip}" 41 | rmprog="${RMPROG-rm}" 42 | mkdirprog="${MKDIRPROG-mkdir}" 43 | 44 | transformbasename="" 45 | transform_arg="" 46 | instcmd="$mvprog" 47 | chmodcmd="$chmodprog 0755" 48 | chowncmd="" 49 | chgrpcmd="" 50 | stripcmd="" 51 | rmcmd="$rmprog -f" 52 | mvcmd="$mvprog" 53 | src="" 54 | dst="" 55 | dir_arg="" 56 | 57 | while [ x"$1" != x ]; do 58 | case $1 in 59 | -c) instcmd="$cpprog" 60 | shift 61 | continue;; 62 | 63 | -d) dir_arg=true 64 | shift 65 | continue;; 66 | 67 | -m) chmodcmd="$chmodprog $2" 68 | shift 69 | shift 70 | continue;; 71 | 72 | -o) chowncmd="$chownprog $2" 73 | shift 74 | shift 75 | continue;; 76 | 77 | -g) chgrpcmd="$chgrpprog $2" 78 | shift 79 | shift 80 | continue;; 81 | 82 | -s) stripcmd="$stripprog" 83 | shift 84 | continue;; 85 | 86 | -t=*) transformarg=`echo $1 | sed 's/-t=//'` 87 | shift 88 | continue;; 89 | 90 | -b=*) transformbasename=`echo $1 | sed 's/-b=//'` 91 | shift 92 | continue;; 93 | 94 | *) if [ x"$src" = x ] 95 | then 96 | src=$1 97 | else 98 | # this colon is to work around a 386BSD /bin/sh bug 99 | : 100 | dst=$1 101 | fi 102 | shift 103 | continue;; 104 | esac 105 | done 106 | 107 | if [ x"$src" = x ] 108 | then 109 | echo "install: no input file specified" 110 | exit 1 111 | else 112 | true 113 | fi 114 | 115 | if [ x"$dir_arg" != x ]; then 116 | dst=$src 117 | src="" 118 | 119 | if [ -d $dst ]; then 120 | instcmd=: 121 | else 122 | instcmd=mkdir 123 | fi 124 | else 125 | 126 | # Waiting for this to be detected by the "$instcmd $src $dsttmp" command 127 | # might cause directories to be created, which would be especially bad 128 | # if $src (and thus $dsttmp) contains '*'. 129 | 130 | if [ -f $src -o -d $src ] 131 | then 132 | true 133 | else 134 | echo "install: $src does not exist" 135 | exit 1 136 | fi 137 | 138 | if [ x"$dst" = x ] 139 | then 140 | echo "install: no destination specified" 141 | exit 1 142 | else 143 | true 144 | fi 145 | 146 | # If destination is a directory, append the input filename; if your system 147 | # does not like double slashes in filenames, you may need to add some logic 148 | 149 | if [ -d $dst ] 150 | then 151 | dst="$dst"/`basename $src` 152 | else 153 | true 154 | fi 155 | fi 156 | 157 | ## this sed command emulates the dirname command 158 | dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` 159 | 160 | # Make sure that the destination directory exists. 161 | # this part is taken from Noah Friedman's mkinstalldirs script 162 | 163 | # Skip lots of stat calls in the usual case. 164 | if [ ! -d "$dstdir" ]; then 165 | defaultIFS=' 166 | ' 167 | IFS="${IFS-${defaultIFS}}" 168 | 169 | oIFS="${IFS}" 170 | # Some sh's can't handle IFS=/ for some reason. 171 | IFS='%' 172 | set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` 173 | IFS="${oIFS}" 174 | 175 | pathcomp='' 176 | 177 | while [ $# -ne 0 ] ; do 178 | pathcomp="${pathcomp}${1}" 179 | shift 180 | 181 | if [ ! -d "${pathcomp}" ] ; 182 | then 183 | $mkdirprog "${pathcomp}" 184 | else 185 | true 186 | fi 187 | 188 | pathcomp="${pathcomp}/" 189 | done 190 | fi 191 | 192 | if [ x"$dir_arg" != x ] 193 | then 194 | $doit $instcmd $dst && 195 | 196 | if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && 197 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && 198 | if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && 199 | if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi 200 | else 201 | 202 | # If we're going to rename the final executable, determine the name now. 203 | 204 | if [ x"$transformarg" = x ] 205 | then 206 | dstfile=`basename $dst` 207 | else 208 | dstfile=`basename $dst $transformbasename | 209 | sed $transformarg`$transformbasename 210 | fi 211 | 212 | # don't allow the sed command to completely eliminate the filename 213 | 214 | if [ x"$dstfile" = x ] 215 | then 216 | dstfile=`basename $dst` 217 | else 218 | true 219 | fi 220 | 221 | # Make a temp file name in the proper directory. 222 | 223 | dsttmp=$dstdir/#inst.$$# 224 | 225 | # Move or copy the file name to the temp name 226 | 227 | $doit $instcmd $src $dsttmp && 228 | 229 | trap "rm -f ${dsttmp}" 0 && 230 | 231 | # and set any options; do chmod last to preserve setuid bits 232 | 233 | # If any of these fail, we abort the whole thing. If we want to 234 | # ignore errors from any of these, just make sure not to ignore 235 | # errors from the above "$doit $instcmd $src $dsttmp" command. 236 | 237 | if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && 238 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && 239 | if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && 240 | if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && 241 | 242 | # Now rename the file to the real destination. 243 | 244 | $doit $rmcmd -f $dstdir/$dstfile && 245 | $doit $mvcmd $dsttmp $dstdir/$dstfile 246 | 247 | fi && 248 | 249 | 250 | exit 0 251 | -------------------------------------------------------------------------------- /config.guess: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Attempt to guess a canonical system name. 3 | # Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc. 4 | # 5 | # This file is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | # 19 | # As a special exception to the GNU General Public License, if you 20 | # distribute this file as part of a program that contains a 21 | # configuration script generated by Autoconf, you may include it under 22 | # the same distribution terms that you use for the rest of that program. 23 | 24 | # Written by Per Bothner . 25 | # The master version of this file is at the FSF in /home/gd/gnu/lib. 26 | # 27 | # This script attempts to guess a canonical system name similar to 28 | # config.sub. If it succeeds, it prints the system name on stdout, and 29 | # exits with 0. Otherwise, it exits with 1. 30 | # 31 | # The plan is that this can be called by configure scripts if you 32 | # don't specify an explicit system type (host/target name). 33 | # 34 | # Only a few systems have been added to this list; please add others 35 | # (but try to keep the structure clean). 36 | # 37 | 38 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 39 | # (ghazi@noc.rutgers.edu 8/24/94.) 40 | if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 41 | PATH=$PATH:/.attbin ; export PATH 42 | fi 43 | 44 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 45 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 46 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 47 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 48 | 49 | trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 50 | 51 | # Note: order is significant - the case branches are not exclusive. 52 | 53 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 54 | alpha:OSF1:*:*) 55 | # A Vn.n version is a released version. 56 | # A Tn.n version is a released field test version. 57 | # A Xn.n version is an unreleased experimental baselevel. 58 | # 1.2 uses "1.2" for uname -r. 59 | echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'` 60 | exit 0 ;; 61 | 21064:Windows_NT:50:3) 62 | echo alpha-dec-winnt3.5 63 | exit 0 ;; 64 | Amiga*:UNIX_System_V:4.0:*) 65 | echo m68k-cbm-sysv4 66 | exit 0;; 67 | amiga:NetBSD:*:*) 68 | echo m68k-cbm-netbsd${UNAME_RELEASE} 69 | exit 0 ;; 70 | amiga:OpenBSD:*:*) 71 | echo m68k-cbm-openbsd${UNAME_RELEASE} 72 | exit 0 ;; 73 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 74 | echo arm-acorn-riscix${UNAME_RELEASE} 75 | exit 0;; 76 | Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) 77 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 78 | if test "`(/bin/universe) 2>/dev/null`" = att ; then 79 | echo pyramid-pyramid-sysv3 80 | else 81 | echo pyramid-pyramid-bsd 82 | fi 83 | exit 0 ;; 84 | NILE:*:*:dcosx) 85 | echo pyramid-pyramid-svr4 86 | exit 0 ;; 87 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 88 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 89 | exit 0 ;; 90 | i86pc:SunOS:5.*:*) 91 | echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 92 | exit 0 ;; 93 | sun4*:SunOS:6*:*) 94 | # According to config.sub, this is the proper way to canonicalize 95 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but 96 | # it's likely to be more like Solaris than SunOS4. 97 | echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 98 | exit 0 ;; 99 | sun4*:SunOS:*:*) 100 | case "`/usr/bin/arch -k`" in 101 | Series*|S4*) 102 | UNAME_RELEASE=`uname -v` 103 | ;; 104 | esac 105 | # Japanese Language versions have a version number like `4.1.3-JL'. 106 | echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 107 | exit 0 ;; 108 | sun3*:SunOS:*:*) 109 | echo m68k-sun-sunos${UNAME_RELEASE} 110 | exit 0 ;; 111 | aushp:SunOS:*:*) 112 | echo sparc-auspex-sunos${UNAME_RELEASE} 113 | exit 0 ;; 114 | atari*:NetBSD:*:*) 115 | echo m68k-atari-netbsd${UNAME_RELEASE} 116 | exit 0 ;; 117 | atari*:OpenBSD:*:*) 118 | echo m68k-atari-openbsd${UNAME_RELEASE} 119 | exit 0 ;; 120 | sun3*:NetBSD:*:*) 121 | echo m68k-sun-netbsd${UNAME_RELEASE} 122 | exit 0 ;; 123 | sun3*:OpenBSD:*:*) 124 | echo m68k-sun-openbsd${UNAME_RELEASE} 125 | exit 0 ;; 126 | mac68k:NetBSD:*:*) 127 | echo m68k-apple-netbsd${UNAME_RELEASE} 128 | exit 0 ;; 129 | mac68k:OpenBSD:*:*) 130 | echo m68k-apple-openbsd${UNAME_RELEASE} 131 | exit 0 ;; 132 | powerpc:machten:*:*) 133 | echo powerpc-apple-machten${UNAME_RELEASE} 134 | exit 0 ;; 135 | RISC*:Mach:*:*) 136 | echo mips-dec-mach_bsd4.3 137 | exit 0 ;; 138 | RISC*:ULTRIX:*:*) 139 | echo mips-dec-ultrix${UNAME_RELEASE} 140 | exit 0 ;; 141 | VAX*:ULTRIX*:*:*) 142 | echo vax-dec-ultrix${UNAME_RELEASE} 143 | exit 0 ;; 144 | mips:*:*:UMIPS | mips:*:*:RISCos) 145 | sed 's/^ //' << EOF >dummy.c 146 | int main (argc, argv) int argc; char **argv; { 147 | #if defined (host_mips) && defined (MIPSEB) 148 | #if defined (SYSTYPE_SYSV) 149 | printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 150 | #endif 151 | #if defined (SYSTYPE_SVR4) 152 | printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 153 | #endif 154 | #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 155 | printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 156 | #endif 157 | #endif 158 | exit (-1); 159 | } 160 | EOF 161 | ${CC-cc} dummy.c -o dummy \ 162 | && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 163 | && rm dummy.c dummy && exit 0 164 | rm -f dummy.c dummy 165 | echo mips-mips-riscos${UNAME_RELEASE} 166 | exit 0 ;; 167 | Night_Hawk:Power_UNIX:*:*) 168 | echo powerpc-harris-powerunix 169 | exit 0 ;; 170 | m88k:CX/UX:7*:*) 171 | echo m88k-harris-cxux7 172 | exit 0 ;; 173 | m88k:*:4*:R4*) 174 | echo m88k-motorola-sysv4 175 | exit 0 ;; 176 | m88k:*:3*:R3*) 177 | echo m88k-motorola-sysv3 178 | exit 0 ;; 179 | AViiON:dgux:*:*) 180 | # DG/UX returns AViiON for all architectures 181 | UNAME_PROCESSOR=`/usr/bin/uname -p` 182 | if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then 183 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ 184 | -o ${TARGET_BINARY_INTERFACE}x = x ] ; then 185 | echo m88k-dg-dgux${UNAME_RELEASE} 186 | else 187 | echo m88k-dg-dguxbcs${UNAME_RELEASE} 188 | fi 189 | else echo i586-dg-dgux${UNAME_RELEASE} 190 | fi 191 | exit 0 ;; 192 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) 193 | echo m88k-dolphin-sysv3 194 | exit 0 ;; 195 | M88*:*:R3*:*) 196 | # Delta 88k system running SVR3 197 | echo m88k-motorola-sysv3 198 | exit 0 ;; 199 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 200 | echo m88k-tektronix-sysv3 201 | exit 0 ;; 202 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 203 | echo m68k-tektronix-bsd 204 | exit 0 ;; 205 | *:IRIX*:*:*) 206 | echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 207 | exit 0 ;; 208 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 209 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 210 | exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 211 | i?86:AIX:*:*) 212 | echo i386-ibm-aix 213 | exit 0 ;; 214 | *:AIX:2:3) 215 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 216 | sed 's/^ //' << EOF >dummy.c 217 | #include 218 | 219 | main() 220 | { 221 | if (!__power_pc()) 222 | exit(1); 223 | puts("powerpc-ibm-aix3.2.5"); 224 | exit(0); 225 | } 226 | EOF 227 | ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 228 | rm -f dummy.c dummy 229 | echo rs6000-ibm-aix3.2.5 230 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 231 | echo rs6000-ibm-aix3.2.4 232 | else 233 | echo rs6000-ibm-aix3.2 234 | fi 235 | exit 0 ;; 236 | *:AIX:*:4) 237 | if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then 238 | IBM_ARCH=rs6000 239 | else 240 | IBM_ARCH=powerpc 241 | fi 242 | if [ -x /usr/bin/oslevel ] ; then 243 | IBM_REV=`/usr/bin/oslevel` 244 | else 245 | IBM_REV=4.${UNAME_RELEASE} 246 | fi 247 | echo ${IBM_ARCH}-ibm-aix${IBM_REV} 248 | exit 0 ;; 249 | *:AIX:*:*) 250 | echo rs6000-ibm-aix 251 | exit 0 ;; 252 | ibmrt:4.4BSD:*|romp-ibm:BSD:*) 253 | echo romp-ibm-bsd4.4 254 | exit 0 ;; 255 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and 256 | echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 257 | exit 0 ;; # report: romp-ibm BSD 4.3 258 | *:BOSX:*:*) 259 | echo rs6000-bull-bosx 260 | exit 0 ;; 261 | DPX/2?00:B.O.S.:*:*) 262 | echo m68k-bull-sysv3 263 | exit 0 ;; 264 | 9000/[34]??:4.3bsd:1.*:*) 265 | echo m68k-hp-bsd 266 | exit 0 ;; 267 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 268 | echo m68k-hp-bsd4.4 269 | exit 0 ;; 270 | 9000/[3478]??:HP-UX:*:*) 271 | case "${UNAME_MACHINE}" in 272 | 9000/31? ) HP_ARCH=m68000 ;; 273 | 9000/[34]?? ) HP_ARCH=m68k ;; 274 | 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; 275 | 9000/8?? ) HP_ARCH=hppa1.0 ;; 276 | esac 277 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 278 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} 279 | exit 0 ;; 280 | 3050*:HI-UX:*:*) 281 | sed 's/^ //' << EOF >dummy.c 282 | #include 283 | int 284 | main () 285 | { 286 | long cpu = sysconf (_SC_CPU_VERSION); 287 | /* The order matters, because CPU_IS_HP_MC68K erroneously returns 288 | true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 289 | results, however. */ 290 | if (CPU_IS_PA_RISC (cpu)) 291 | { 292 | switch (cpu) 293 | { 294 | case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 295 | case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 296 | case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 297 | default: puts ("hppa-hitachi-hiuxwe2"); break; 298 | } 299 | } 300 | else if (CPU_IS_HP_MC68K (cpu)) 301 | puts ("m68k-hitachi-hiuxwe2"); 302 | else puts ("unknown-hitachi-hiuxwe2"); 303 | exit (0); 304 | } 305 | EOF 306 | ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 307 | rm -f dummy.c dummy 308 | echo unknown-hitachi-hiuxwe2 309 | exit 0 ;; 310 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 311 | echo hppa1.1-hp-bsd 312 | exit 0 ;; 313 | 9000/8??:4.3bsd:*:*) 314 | echo hppa1.0-hp-bsd 315 | exit 0 ;; 316 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 317 | echo hppa1.1-hp-osf 318 | exit 0 ;; 319 | hp8??:OSF1:*:*) 320 | echo hppa1.0-hp-osf 321 | exit 0 ;; 322 | i?86:OSF1:*:*) 323 | if [ -x /usr/sbin/sysversion ] ; then 324 | echo ${UNAME_MACHINE}-unknown-osf1mk 325 | else 326 | echo ${UNAME_MACHINE}-unknown-osf1 327 | fi 328 | exit 0 ;; 329 | parisc*:Lites*:*:*) 330 | echo hppa1.1-hp-lites 331 | exit 0 ;; 332 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 333 | echo c1-convex-bsd 334 | exit 0 ;; 335 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 336 | if getsysinfo -f scalar_acc 337 | then echo c32-convex-bsd 338 | else echo c2-convex-bsd 339 | fi 340 | exit 0 ;; 341 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 342 | echo c34-convex-bsd 343 | exit 0 ;; 344 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 345 | echo c38-convex-bsd 346 | exit 0 ;; 347 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 348 | echo c4-convex-bsd 349 | exit 0 ;; 350 | CRAY*X-MP:*:*:*) 351 | echo xmp-cray-unicos 352 | exit 0 ;; 353 | CRAY*Y-MP:*:*:*) 354 | echo ymp-cray-unicos${UNAME_RELEASE} 355 | exit 0 ;; 356 | CRAY*[A-Z]90:*:*:*) 357 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 358 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 359 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ 360 | exit 0 ;; 361 | CRAY*TS:*:*:*) 362 | echo t90-cray-unicos${UNAME_RELEASE} 363 | exit 0 ;; 364 | CRAY-2:*:*:*) 365 | echo cray2-cray-unicos 366 | exit 0 ;; 367 | F300:UNIX_System_V:*:*) 368 | FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` 369 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 370 | echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 371 | exit 0 ;; 372 | F301:UNIX_System_V:*:*) 373 | echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` 374 | exit 0 ;; 375 | hp3[0-9][05]:NetBSD:*:*) 376 | echo m68k-hp-netbsd${UNAME_RELEASE} 377 | exit 0 ;; 378 | hp3[0-9][05]:OpenBSD:*:*) 379 | echo m68k-hp-openbsd${UNAME_RELEASE} 380 | exit 0 ;; 381 | i?86:BSD/386:*:* | *:BSD/OS:*:*) 382 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 383 | exit 0 ;; 384 | *:FreeBSD:*:*) 385 | echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 386 | exit 0 ;; 387 | *:NetBSD:*:*) 388 | echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 389 | exit 0 ;; 390 | *:OpenBSD:*:*) 391 | echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 392 | exit 0 ;; 393 | i*:CYGWIN*:*) 394 | echo i386-pc-cygwin32 395 | exit 0 ;; 396 | p*:CYGWIN*:*) 397 | echo powerpcle-unknown-cygwin32 398 | exit 0 ;; 399 | prep*:SunOS:5.*:*) 400 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 401 | exit 0 ;; 402 | *:GNU:*:*) 403 | echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 404 | exit 0 ;; 405 | *:Linux:*:*) 406 | # The BFD linker knows what the default object file format is, so 407 | # first see if it will tell us. 408 | ld_help_string=`ld --help 2>&1` 409 | if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then 410 | echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0 411 | elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then 412 | echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 413 | elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then 414 | echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 415 | elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then 416 | echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 417 | elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then 418 | echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 419 | elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then 420 | echo "powerpc-unknown-linux-gnu" ; exit 0 421 | elif test "${UNAME_MACHINE}" = "alpha" ; then 422 | echo alpha-unknown-linux-gnu ; exit 0 423 | elif test "${UNAME_MACHINE}" = "sparc" ; then 424 | echo sparc-unknown-linux-gnu ; exit 0 425 | else 426 | # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us 427 | # useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout. 428 | test ! -d /usr/lib/ldscripts/. \ 429 | && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 430 | # Determine whether the default compiler is a.out or elf 431 | cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 445 | rm -f dummy.c dummy 446 | fi ;; 447 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions 448 | # are messed up and put the nodename in both sysname and nodename. 449 | i?86:DYNIX/ptx:4*:*) 450 | echo i386-sequent-sysv4 451 | exit 0 ;; 452 | i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) 453 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 454 | echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} 455 | else 456 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} 457 | fi 458 | exit 0 ;; 459 | i?86:*:3.2:*) 460 | if test -f /usr/options/cb.name; then 461 | UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then 464 | UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` 465 | (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 466 | (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ 467 | && UNAME_MACHINE=i586 468 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 469 | else 470 | echo ${UNAME_MACHINE}-pc-sysv32 471 | fi 472 | exit 0 ;; 473 | Intel:Mach:3*:*) 474 | echo i386-pc-mach3 475 | exit 0 ;; 476 | paragon:*:*:*) 477 | echo i860-intel-osf1 478 | exit 0 ;; 479 | i860:*:4.*:*) # i860-SVR4 480 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 481 | echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 482 | else # Add other i860-SVR4 vendors below as they are discovered. 483 | echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 484 | fi 485 | exit 0 ;; 486 | mini*:CTIX:SYS*5:*) 487 | # "miniframe" 488 | echo m68010-convergent-sysv 489 | exit 0 ;; 490 | M68*:*:R3V[567]*:*) 491 | test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 492 | 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) 493 | OS_REL='' 494 | test -r /etc/.relid \ 495 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 496 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 497 | && echo i486-ncr-sysv4.3${OS_REL} && exit 0 498 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 499 | && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 500 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 501 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 502 | && echo i486-ncr-sysv4 && exit 0 ;; 503 | m68*:LynxOS:2.*:*) 504 | echo m68k-unknown-lynxos${UNAME_RELEASE} 505 | exit 0 ;; 506 | mc68030:UNIX_System_V:4.*:*) 507 | echo m68k-atari-sysv4 508 | exit 0 ;; 509 | i?86:LynxOS:2.*:*) 510 | echo i386-unknown-lynxos${UNAME_RELEASE} 511 | exit 0 ;; 512 | TSUNAMI:LynxOS:2.*:*) 513 | echo sparc-unknown-lynxos${UNAME_RELEASE} 514 | exit 0 ;; 515 | rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) 516 | echo rs6000-unknown-lynxos${UNAME_RELEASE} 517 | exit 0 ;; 518 | SM[BE]S:UNIX_SV:*:*) 519 | echo mips-dde-sysv${UNAME_RELEASE} 520 | exit 0 ;; 521 | RM*:SINIX-*:*:*) 522 | echo mips-sni-sysv4 523 | exit 0 ;; 524 | *:SINIX-*:*:*) 525 | if uname -p 2>/dev/null >/dev/null ; then 526 | UNAME_MACHINE=`(uname -p) 2>/dev/null` 527 | echo ${UNAME_MACHINE}-sni-sysv4 528 | else 529 | echo ns32k-sni-sysv 530 | fi 531 | exit 0 ;; 532 | *:UNIX_System_V:4*:FTX*) 533 | # From Gerald Hewes . 534 | # How about differentiating between stratus architectures? -djm 535 | echo hppa1.1-stratus-sysv4 536 | exit 0 ;; 537 | *:*:*:FTX*) 538 | # From seanf@swdc.stratus.com. 539 | echo i860-stratus-sysv4 540 | exit 0 ;; 541 | mc68*:A/UX:*:*) 542 | echo m68k-apple-aux${UNAME_RELEASE} 543 | exit 0 ;; 544 | R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) 545 | if [ -d /usr/nec ]; then 546 | echo mips-nec-sysv${UNAME_RELEASE} 547 | else 548 | echo mips-unknown-sysv${UNAME_RELEASE} 549 | fi 550 | exit 0 ;; 551 | PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 552 | # says 553 | echo i586-unisys-sysv4 554 | exit 0 ;; 555 | esac 556 | 557 | #echo '(No uname command or uname output not recognized.)' 1>&2 558 | #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 559 | 560 | cat >dummy.c < 563 | # include 564 | #endif 565 | main () 566 | { 567 | #if defined (sony) 568 | #if defined (MIPSEB) 569 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 570 | I don't know.... */ 571 | printf ("mips-sony-bsd\n"); exit (0); 572 | #else 573 | #include 574 | printf ("m68k-sony-newsos%s\n", 575 | #ifdef NEWSOS4 576 | "4" 577 | #else 578 | "" 579 | #endif 580 | ); exit (0); 581 | #endif 582 | #endif 583 | 584 | #if defined (__arm) && defined (__acorn) && defined (__unix) 585 | printf ("arm-acorn-riscix"); exit (0); 586 | #endif 587 | 588 | #if defined (hp300) && !defined (hpux) 589 | printf ("m68k-hp-bsd\n"); exit (0); 590 | #endif 591 | 592 | #if defined (NeXT) 593 | #if !defined (__ARCHITECTURE__) 594 | #define __ARCHITECTURE__ "m68k" 595 | #endif 596 | int version; 597 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 598 | printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 599 | exit (0); 600 | #endif 601 | 602 | #if defined (MULTIMAX) || defined (n16) 603 | #if defined (UMAXV) 604 | printf ("ns32k-encore-sysv\n"); exit (0); 605 | #else 606 | #if defined (CMU) 607 | printf ("ns32k-encore-mach\n"); exit (0); 608 | #else 609 | printf ("ns32k-encore-bsd\n"); exit (0); 610 | #endif 611 | #endif 612 | #endif 613 | 614 | #if defined (__386BSD__) 615 | printf ("i386-pc-bsd\n"); exit (0); 616 | #endif 617 | 618 | #if defined (sequent) 619 | #if defined (i386) 620 | printf ("i386-sequent-dynix\n"); exit (0); 621 | #endif 622 | #if defined (ns32000) 623 | printf ("ns32k-sequent-dynix\n"); exit (0); 624 | #endif 625 | #endif 626 | 627 | #if defined (_SEQUENT_) 628 | struct utsname un; 629 | 630 | uname(&un); 631 | 632 | if (strncmp(un.version, "V2", 2) == 0) { 633 | printf ("i386-sequent-ptx2\n"); exit (0); 634 | } 635 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 636 | printf ("i386-sequent-ptx1\n"); exit (0); 637 | } 638 | printf ("i386-sequent-ptx\n"); exit (0); 639 | 640 | #endif 641 | 642 | #if defined (vax) 643 | #if !defined (ultrix) 644 | printf ("vax-dec-bsd\n"); exit (0); 645 | #else 646 | printf ("vax-dec-ultrix\n"); exit (0); 647 | #endif 648 | #endif 649 | 650 | #if defined (alliant) && defined (i860) 651 | printf ("i860-alliant-bsd\n"); exit (0); 652 | #endif 653 | 654 | exit (1); 655 | } 656 | EOF 657 | 658 | ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 659 | rm -f dummy.c dummy 660 | 661 | # Apollos put the system type in the environment. 662 | 663 | test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 664 | 665 | # Convex versions that predate uname can use getsysinfo(1) 666 | 667 | if [ -x /usr/convex/getsysinfo ] 668 | then 669 | case `getsysinfo -f cpu_type` in 670 | c1*) 671 | echo c1-convex-bsd 672 | exit 0 ;; 673 | c2*) 674 | if getsysinfo -f scalar_acc 675 | then echo c32-convex-bsd 676 | else echo c2-convex-bsd 677 | fi 678 | exit 0 ;; 679 | c34*) 680 | echo c34-convex-bsd 681 | exit 0 ;; 682 | c38*) 683 | echo c38-convex-bsd 684 | exit 0 ;; 685 | c4*) 686 | echo c4-convex-bsd 687 | exit 0 ;; 688 | esac 689 | fi 690 | 691 | #echo '(Unable to guess system type)' 1>&2 692 | 693 | exit 1 694 | -------------------------------------------------------------------------------- /config.sub: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Configuration validation subroutine script, version 1.1. 3 | # Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. 4 | # This file is (in principle) common to ALL GNU software. 5 | # The presence of a machine in this file suggests that SOME GNU software 6 | # can handle that machine. It does not imply ALL GNU software can. 7 | # 8 | # This file is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 2 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place - Suite 330, 21 | # Boston, MA 02111-1307, USA. 22 | 23 | # As a special exception to the GNU General Public License, if you 24 | # distribute this file as part of a program that contains a 25 | # configuration script generated by Autoconf, you may include it under 26 | # the same distribution terms that you use for the rest of that program. 27 | 28 | # Configuration subroutine to validate and canonicalize a configuration type. 29 | # Supply the specified configuration type as an argument. 30 | # If it is invalid, we print an error message on stderr and exit with code 1. 31 | # Otherwise, we print the canonical config type on stdout and succeed. 32 | 33 | # This file is supposed to be the same for all GNU packages 34 | # and recognize all the CPU types, system types and aliases 35 | # that are meaningful with *any* GNU software. 36 | # Each package is responsible for reporting which valid configurations 37 | # it does not support. The user should be able to distinguish 38 | # a failure to support a valid configuration from a meaningless 39 | # configuration. 40 | 41 | # The goal of this file is to map all the various variations of a given 42 | # machine specification into a single specification in the form: 43 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 44 | # or in some cases, the newer four-part form: 45 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 46 | # It is wrong to echo any other type of specification. 47 | 48 | if [ x$1 = x ] 49 | then 50 | echo Configuration name missing. 1>&2 51 | echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 52 | echo "or $0 ALIAS" 1>&2 53 | echo where ALIAS is a recognized configuration type. 1>&2 54 | exit 1 55 | fi 56 | 57 | # First pass through any local machine types. 58 | case $1 in 59 | *local*) 60 | echo $1 61 | exit 0 62 | ;; 63 | *) 64 | ;; 65 | esac 66 | 67 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 68 | # Here we must recognize all the valid KERNEL-OS combinations. 69 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 70 | case $maybe_os in 71 | linux-gnu*) 72 | os=-$maybe_os 73 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 74 | ;; 75 | *) 76 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` 77 | if [ $basic_machine != $1 ] 78 | then os=`echo $1 | sed 's/.*-/-/'` 79 | else os=; fi 80 | ;; 81 | esac 82 | 83 | ### Let's recognize common machines as not being operating systems so 84 | ### that things like config.sub decstation-3100 work. We also 85 | ### recognize some manufacturers as not being operating systems, so we 86 | ### can provide default operating systems below. 87 | case $os in 88 | -sun*os*) 89 | # Prevent following clause from handling this invalid input. 90 | ;; 91 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 92 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 93 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 94 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 95 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 96 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 97 | -apple) 98 | os= 99 | basic_machine=$1 100 | ;; 101 | -hiux*) 102 | os=-hiuxwe2 103 | ;; 104 | -sco5) 105 | os=sco3.2v5 106 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 107 | ;; 108 | -sco4) 109 | os=-sco3.2v4 110 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 111 | ;; 112 | -sco3.2.[4-9]*) 113 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 114 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 115 | ;; 116 | -sco3.2v[4-9]*) 117 | # Don't forget version if it is 3.2v4 or newer. 118 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 119 | ;; 120 | -sco*) 121 | os=-sco3.2v2 122 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 123 | ;; 124 | -isc) 125 | os=-isc2.2 126 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 127 | ;; 128 | -clix*) 129 | basic_machine=clipper-intergraph 130 | ;; 131 | -isc*) 132 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 133 | ;; 134 | -lynx*) 135 | os=-lynxos 136 | ;; 137 | -ptx*) 138 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 139 | ;; 140 | -windowsnt*) 141 | os=`echo $os | sed -e 's/windowsnt/winnt/'` 142 | ;; 143 | -psos*) 144 | os=-psos 145 | ;; 146 | esac 147 | 148 | # Decode aliases for certain CPU-COMPANY combinations. 149 | case $basic_machine in 150 | # Recognize the basic CPU types without company name. 151 | # Some are omitted here because they have special meanings below. 152 | tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \ 153 | | arme[lb] | pyramid \ 154 | | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ 155 | | alpha | we32k | ns16k | clipper | i370 | sh \ 156 | | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \ 157 | | pdp11 | mips64el | mips64orion | mips64orionel \ 158 | | sparc | sparclet | sparclite | sparc64) 159 | basic_machine=$basic_machine-unknown 160 | ;; 161 | # We use `pc' rather than `unknown' 162 | # because (1) that's what they normally are, and 163 | # (2) the word "unknown" tends to confuse beginning users. 164 | i[3456]86) 165 | basic_machine=$basic_machine-pc 166 | ;; 167 | # Object if more than one company name word. 168 | *-*-*) 169 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 170 | exit 1 171 | ;; 172 | # Recognize the basic CPU types with company name. 173 | vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \ 174 | | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ 175 | | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ 176 | | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ 177 | | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ 178 | | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ 179 | | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ 180 | | mips64el-* | mips64orion-* | mips64orionel-* | f301-*) 181 | ;; 182 | # Recognize the various machine names and aliases which stand 183 | # for a CPU type and a company and sometimes even an OS. 184 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 185 | basic_machine=m68000-att 186 | ;; 187 | 3b*) 188 | basic_machine=we32k-att 189 | ;; 190 | alliant | fx80) 191 | basic_machine=fx80-alliant 192 | ;; 193 | altos | altos3068) 194 | basic_machine=m68k-altos 195 | ;; 196 | am29k) 197 | basic_machine=a29k-none 198 | os=-bsd 199 | ;; 200 | amdahl) 201 | basic_machine=580-amdahl 202 | os=-sysv 203 | ;; 204 | amiga | amiga-*) 205 | basic_machine=m68k-cbm 206 | ;; 207 | amigados) 208 | basic_machine=m68k-cbm 209 | os=-amigados 210 | ;; 211 | amigaunix | amix) 212 | basic_machine=m68k-cbm 213 | os=-sysv4 214 | ;; 215 | apollo68) 216 | basic_machine=m68k-apollo 217 | os=-sysv 218 | ;; 219 | aux) 220 | basic_machine=m68k-apple 221 | os=-aux 222 | ;; 223 | balance) 224 | basic_machine=ns32k-sequent 225 | os=-dynix 226 | ;; 227 | convex-c1) 228 | basic_machine=c1-convex 229 | os=-bsd 230 | ;; 231 | convex-c2) 232 | basic_machine=c2-convex 233 | os=-bsd 234 | ;; 235 | convex-c32) 236 | basic_machine=c32-convex 237 | os=-bsd 238 | ;; 239 | convex-c34) 240 | basic_machine=c34-convex 241 | os=-bsd 242 | ;; 243 | convex-c38) 244 | basic_machine=c38-convex 245 | os=-bsd 246 | ;; 247 | cray | ymp) 248 | basic_machine=ymp-cray 249 | os=-unicos 250 | ;; 251 | cray2) 252 | basic_machine=cray2-cray 253 | os=-unicos 254 | ;; 255 | [ctj]90-cray) 256 | basic_machine=c90-cray 257 | os=-unicos 258 | ;; 259 | crds | unos) 260 | basic_machine=m68k-crds 261 | ;; 262 | da30 | da30-*) 263 | basic_machine=m68k-da30 264 | ;; 265 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 266 | basic_machine=mips-dec 267 | ;; 268 | delta | 3300 | motorola-3300 | motorola-delta \ 269 | | 3300-motorola | delta-motorola) 270 | basic_machine=m68k-motorola 271 | ;; 272 | delta88) 273 | basic_machine=m88k-motorola 274 | os=-sysv3 275 | ;; 276 | dpx20 | dpx20-*) 277 | basic_machine=rs6000-bull 278 | os=-bosx 279 | ;; 280 | dpx2* | dpx2*-bull) 281 | basic_machine=m68k-bull 282 | os=-sysv3 283 | ;; 284 | ebmon29k) 285 | basic_machine=a29k-amd 286 | os=-ebmon 287 | ;; 288 | elxsi) 289 | basic_machine=elxsi-elxsi 290 | os=-bsd 291 | ;; 292 | encore | umax | mmax) 293 | basic_machine=ns32k-encore 294 | ;; 295 | fx2800) 296 | basic_machine=i860-alliant 297 | ;; 298 | genix) 299 | basic_machine=ns32k-ns 300 | ;; 301 | gmicro) 302 | basic_machine=tron-gmicro 303 | os=-sysv 304 | ;; 305 | h3050r* | hiux*) 306 | basic_machine=hppa1.1-hitachi 307 | os=-hiuxwe2 308 | ;; 309 | h8300hms) 310 | basic_machine=h8300-hitachi 311 | os=-hms 312 | ;; 313 | harris) 314 | basic_machine=m88k-harris 315 | os=-sysv3 316 | ;; 317 | hp300-*) 318 | basic_machine=m68k-hp 319 | ;; 320 | hp300bsd) 321 | basic_machine=m68k-hp 322 | os=-bsd 323 | ;; 324 | hp300hpux) 325 | basic_machine=m68k-hp 326 | os=-hpux 327 | ;; 328 | hp9k2[0-9][0-9] | hp9k31[0-9]) 329 | basic_machine=m68000-hp 330 | ;; 331 | hp9k3[2-9][0-9]) 332 | basic_machine=m68k-hp 333 | ;; 334 | hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) 335 | basic_machine=hppa1.1-hp 336 | ;; 337 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) 338 | basic_machine=hppa1.0-hp 339 | ;; 340 | hppa-next) 341 | os=-nextstep3 342 | ;; 343 | i370-ibm* | ibm*) 344 | basic_machine=i370-ibm 345 | os=-mvs 346 | ;; 347 | # I'm not sure what "Sysv32" means. Should this be sysv3.2? 348 | i[3456]86v32) 349 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 350 | os=-sysv32 351 | ;; 352 | i[3456]86v4*) 353 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 354 | os=-sysv4 355 | ;; 356 | i[3456]86v) 357 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 358 | os=-sysv 359 | ;; 360 | i[3456]86sol2) 361 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 362 | os=-solaris2 363 | ;; 364 | iris | iris4d) 365 | basic_machine=mips-sgi 366 | case $os in 367 | -irix*) 368 | ;; 369 | *) 370 | os=-irix4 371 | ;; 372 | esac 373 | ;; 374 | isi68 | isi) 375 | basic_machine=m68k-isi 376 | os=-sysv 377 | ;; 378 | m88k-omron*) 379 | basic_machine=m88k-omron 380 | ;; 381 | magnum | m3230) 382 | basic_machine=mips-mips 383 | os=-sysv 384 | ;; 385 | merlin) 386 | basic_machine=ns32k-utek 387 | os=-sysv 388 | ;; 389 | miniframe) 390 | basic_machine=m68000-convergent 391 | ;; 392 | mips3*-*) 393 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 394 | ;; 395 | mips3*) 396 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 397 | ;; 398 | ncr3000) 399 | basic_machine=i486-ncr 400 | os=-sysv4 401 | ;; 402 | news | news700 | news800 | news900) 403 | basic_machine=m68k-sony 404 | os=-newsos 405 | ;; 406 | news1000) 407 | basic_machine=m68030-sony 408 | os=-newsos 409 | ;; 410 | news-3600 | risc-news) 411 | basic_machine=mips-sony 412 | os=-newsos 413 | ;; 414 | next | m*-next ) 415 | basic_machine=m68k-next 416 | case $os in 417 | -nextstep* ) 418 | ;; 419 | -ns2*) 420 | os=-nextstep2 421 | ;; 422 | *) 423 | os=-nextstep3 424 | ;; 425 | esac 426 | ;; 427 | nh3000) 428 | basic_machine=m68k-harris 429 | os=-cxux 430 | ;; 431 | nh[45]000) 432 | basic_machine=m88k-harris 433 | os=-cxux 434 | ;; 435 | nindy960) 436 | basic_machine=i960-intel 437 | os=-nindy 438 | ;; 439 | np1) 440 | basic_machine=np1-gould 441 | ;; 442 | pa-hitachi) 443 | basic_machine=hppa1.1-hitachi 444 | os=-hiuxwe2 445 | ;; 446 | paragon) 447 | basic_machine=i860-intel 448 | os=-osf 449 | ;; 450 | pbd) 451 | basic_machine=sparc-tti 452 | ;; 453 | pbb) 454 | basic_machine=m68k-tti 455 | ;; 456 | pc532 | pc532-*) 457 | basic_machine=ns32k-pc532 458 | ;; 459 | pentium | p5) 460 | basic_machine=i586-intel 461 | ;; 462 | pentiumpro | p6) 463 | basic_machine=i686-intel 464 | ;; 465 | pentium-* | p5-*) 466 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 467 | ;; 468 | pentiumpro-* | p6-*) 469 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 470 | ;; 471 | k5) 472 | # We don't have specific support for AMD's K5 yet, so just call it a Pentium 473 | basic_machine=i586-amd 474 | ;; 475 | nexen) 476 | # We don't have specific support for Nexgen yet, so just call it a Pentium 477 | basic_machine=i586-nexgen 478 | ;; 479 | pn) 480 | basic_machine=pn-gould 481 | ;; 482 | power) basic_machine=rs6000-ibm 483 | ;; 484 | ppc) basic_machine=powerpc-unknown 485 | ;; 486 | ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 487 | ;; 488 | ppcle | powerpclittle | ppc-le | powerpc-little) 489 | basic_machine=powerpcle-unknown 490 | ;; 491 | ppcle-* | powerpclittle-*) 492 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 493 | ;; 494 | ps2) 495 | basic_machine=i386-ibm 496 | ;; 497 | rm[46]00) 498 | basic_machine=mips-siemens 499 | ;; 500 | rtpc | rtpc-*) 501 | basic_machine=romp-ibm 502 | ;; 503 | sequent) 504 | basic_machine=i386-sequent 505 | ;; 506 | sh) 507 | basic_machine=sh-hitachi 508 | os=-hms 509 | ;; 510 | sps7) 511 | basic_machine=m68k-bull 512 | os=-sysv2 513 | ;; 514 | spur) 515 | basic_machine=spur-unknown 516 | ;; 517 | sun2) 518 | basic_machine=m68000-sun 519 | ;; 520 | sun2os3) 521 | basic_machine=m68000-sun 522 | os=-sunos3 523 | ;; 524 | sun2os4) 525 | basic_machine=m68000-sun 526 | os=-sunos4 527 | ;; 528 | sun3os3) 529 | basic_machine=m68k-sun 530 | os=-sunos3 531 | ;; 532 | sun3os4) 533 | basic_machine=m68k-sun 534 | os=-sunos4 535 | ;; 536 | sun4os3) 537 | basic_machine=sparc-sun 538 | os=-sunos3 539 | ;; 540 | sun4os4) 541 | basic_machine=sparc-sun 542 | os=-sunos4 543 | ;; 544 | sun4sol2) 545 | basic_machine=sparc-sun 546 | os=-solaris2 547 | ;; 548 | sun3 | sun3-*) 549 | basic_machine=m68k-sun 550 | ;; 551 | sun4) 552 | basic_machine=sparc-sun 553 | ;; 554 | sun386 | sun386i | roadrunner) 555 | basic_machine=i386-sun 556 | ;; 557 | symmetry) 558 | basic_machine=i386-sequent 559 | os=-dynix 560 | ;; 561 | tower | tower-32) 562 | basic_machine=m68k-ncr 563 | ;; 564 | udi29k) 565 | basic_machine=a29k-amd 566 | os=-udi 567 | ;; 568 | ultra3) 569 | basic_machine=a29k-nyu 570 | os=-sym1 571 | ;; 572 | vaxv) 573 | basic_machine=vax-dec 574 | os=-sysv 575 | ;; 576 | vms) 577 | basic_machine=vax-dec 578 | os=-vms 579 | ;; 580 | vpp*|vx|vx-*) 581 | basic_machine=f301-fujitsu 582 | ;; 583 | vxworks960) 584 | basic_machine=i960-wrs 585 | os=-vxworks 586 | ;; 587 | vxworks68) 588 | basic_machine=m68k-wrs 589 | os=-vxworks 590 | ;; 591 | vxworks29k) 592 | basic_machine=a29k-wrs 593 | os=-vxworks 594 | ;; 595 | xmp) 596 | basic_machine=xmp-cray 597 | os=-unicos 598 | ;; 599 | xps | xps100) 600 | basic_machine=xps100-honeywell 601 | ;; 602 | none) 603 | basic_machine=none-none 604 | os=-none 605 | ;; 606 | 607 | # Here we handle the default manufacturer of certain CPU types. It is in 608 | # some cases the only manufacturer, in others, it is the most popular. 609 | mips) 610 | basic_machine=mips-mips 611 | ;; 612 | romp) 613 | basic_machine=romp-ibm 614 | ;; 615 | rs6000) 616 | basic_machine=rs6000-ibm 617 | ;; 618 | vax) 619 | basic_machine=vax-dec 620 | ;; 621 | pdp11) 622 | basic_machine=pdp11-dec 623 | ;; 624 | we32k) 625 | basic_machine=we32k-att 626 | ;; 627 | sparc) 628 | basic_machine=sparc-sun 629 | ;; 630 | cydra) 631 | basic_machine=cydra-cydrome 632 | ;; 633 | orion) 634 | basic_machine=orion-highlevel 635 | ;; 636 | orion105) 637 | basic_machine=clipper-highlevel 638 | ;; 639 | *) 640 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 641 | exit 1 642 | ;; 643 | esac 644 | 645 | # Here we canonicalize certain aliases for manufacturers. 646 | case $basic_machine in 647 | *-digital*) 648 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 649 | ;; 650 | *-commodore*) 651 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 652 | ;; 653 | *) 654 | ;; 655 | esac 656 | 657 | # Decode manufacturer-specific aliases for certain operating systems. 658 | 659 | if [ x"$os" != x"" ] 660 | then 661 | case $os in 662 | # First match some system type aliases 663 | # that might get confused with valid system types. 664 | # -solaris* is a basic system type, with this one exception. 665 | -solaris1 | -solaris1.*) 666 | os=`echo $os | sed -e 's|solaris1|sunos4|'` 667 | ;; 668 | -solaris) 669 | os=-solaris2 670 | ;; 671 | -unixware* | svr4*) 672 | os=-sysv4 673 | ;; 674 | -gnu/linux*) 675 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 676 | ;; 677 | # First accept the basic system types. 678 | # The portable systems comes first. 679 | # Each alternative MUST END IN A *, to match a version number. 680 | # -sysv* is not here because it comes later, after sysvr4. 681 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 682 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 683 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 684 | | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ 685 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 686 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 687 | | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ 688 | | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ 689 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 690 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 691 | | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 692 | | -linux-gnu* | -uxpv*) 693 | # Remember, each alternative MUST END IN *, to match a version number. 694 | ;; 695 | -linux*) 696 | os=`echo $os | sed -e 's|linux|linux-gnu|'` 697 | ;; 698 | -sunos5*) 699 | os=`echo $os | sed -e 's|sunos5|solaris2|'` 700 | ;; 701 | -sunos6*) 702 | os=`echo $os | sed -e 's|sunos6|solaris3|'` 703 | ;; 704 | -osfrose*) 705 | os=-osfrose 706 | ;; 707 | -osf*) 708 | os=-osf 709 | ;; 710 | -utek*) 711 | os=-bsd 712 | ;; 713 | -dynix*) 714 | os=-bsd 715 | ;; 716 | -acis*) 717 | os=-aos 718 | ;; 719 | -ctix* | -uts*) 720 | os=-sysv 721 | ;; 722 | -ns2 ) 723 | os=-nextstep2 724 | ;; 725 | # Preserve the version number of sinix5. 726 | -sinix5.*) 727 | os=`echo $os | sed -e 's|sinix|sysv|'` 728 | ;; 729 | -sinix*) 730 | os=-sysv4 731 | ;; 732 | -triton*) 733 | os=-sysv3 734 | ;; 735 | -oss*) 736 | os=-sysv3 737 | ;; 738 | -svr4) 739 | os=-sysv4 740 | ;; 741 | -svr3) 742 | os=-sysv3 743 | ;; 744 | -sysvr4) 745 | os=-sysv4 746 | ;; 747 | # This must come after -sysvr4. 748 | -sysv*) 749 | ;; 750 | -xenix) 751 | os=-xenix 752 | ;; 753 | -none) 754 | ;; 755 | *) 756 | # Get rid of the `-' at the beginning of $os. 757 | os=`echo $os | sed 's/[^-]*-//'` 758 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 759 | exit 1 760 | ;; 761 | esac 762 | else 763 | 764 | # Here we handle the default operating systems that come with various machines. 765 | # The value should be what the vendor currently ships out the door with their 766 | # machine or put another way, the most popular os provided with the machine. 767 | 768 | # Note that if you're going to try to match "-MANUFACTURER" here (say, 769 | # "-sun"), then you have to tell the case statement up towards the top 770 | # that MANUFACTURER isn't an operating system. Otherwise, code above 771 | # will signal an error saying that MANUFACTURER isn't an operating 772 | # system, and we'll never get to this point. 773 | 774 | case $basic_machine in 775 | *-acorn) 776 | os=-riscix1.2 777 | ;; 778 | arm*-semi) 779 | os=-aout 780 | ;; 781 | pdp11-*) 782 | os=-none 783 | ;; 784 | *-dec | vax-*) 785 | os=-ultrix4.2 786 | ;; 787 | m68*-apollo) 788 | os=-domain 789 | ;; 790 | i386-sun) 791 | os=-sunos4.0.2 792 | ;; 793 | m68000-sun) 794 | os=-sunos3 795 | # This also exists in the configure program, but was not the 796 | # default. 797 | # os=-sunos4 798 | ;; 799 | *-tti) # must be before sparc entry or we get the wrong os. 800 | os=-sysv3 801 | ;; 802 | sparc-* | *-sun) 803 | os=-sunos4.1.1 804 | ;; 805 | *-ibm) 806 | os=-aix 807 | ;; 808 | *-hp) 809 | os=-hpux 810 | ;; 811 | *-hitachi) 812 | os=-hiux 813 | ;; 814 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 815 | os=-sysv 816 | ;; 817 | *-cbm) 818 | os=-amigados 819 | ;; 820 | *-dg) 821 | os=-dgux 822 | ;; 823 | *-dolphin) 824 | os=-sysv3 825 | ;; 826 | m68k-ccur) 827 | os=-rtu 828 | ;; 829 | m88k-omron*) 830 | os=-luna 831 | ;; 832 | *-next ) 833 | os=-nextstep 834 | ;; 835 | *-sequent) 836 | os=-ptx 837 | ;; 838 | *-crds) 839 | os=-unos 840 | ;; 841 | *-ns) 842 | os=-genix 843 | ;; 844 | i370-*) 845 | os=-mvs 846 | ;; 847 | *-next) 848 | os=-nextstep3 849 | ;; 850 | *-gould) 851 | os=-sysv 852 | ;; 853 | *-highlevel) 854 | os=-bsd 855 | ;; 856 | *-encore) 857 | os=-bsd 858 | ;; 859 | *-sgi) 860 | os=-irix 861 | ;; 862 | *-siemens) 863 | os=-sysv4 864 | ;; 865 | *-masscomp) 866 | os=-rtu 867 | ;; 868 | f301-fujitsu) 869 | os=-uxpv 870 | ;; 871 | *) 872 | os=-none 873 | ;; 874 | esac 875 | fi 876 | 877 | # Here we handle the case where we know the os, and the CPU type, but not the 878 | # manufacturer. We pick the logical manufacturer. 879 | vendor=unknown 880 | case $basic_machine in 881 | *-unknown) 882 | case $os in 883 | -riscix*) 884 | vendor=acorn 885 | ;; 886 | -sunos*) 887 | vendor=sun 888 | ;; 889 | -aix*) 890 | vendor=ibm 891 | ;; 892 | -hpux*) 893 | vendor=hp 894 | ;; 895 | -hiux*) 896 | vendor=hitachi 897 | ;; 898 | -unos*) 899 | vendor=crds 900 | ;; 901 | -dgux*) 902 | vendor=dg 903 | ;; 904 | -luna*) 905 | vendor=omron 906 | ;; 907 | -genix*) 908 | vendor=ns 909 | ;; 910 | -mvs*) 911 | vendor=ibm 912 | ;; 913 | -ptx*) 914 | vendor=sequent 915 | ;; 916 | -vxsim* | -vxworks*) 917 | vendor=wrs 918 | ;; 919 | -aux*) 920 | vendor=apple 921 | ;; 922 | esac 923 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 924 | ;; 925 | esac 926 | 927 | echo $basic_machine$os 928 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Guess values for system-dependent variables and create Makefiles. 4 | # Generated automatically using autoconf version 2.13 5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. 6 | # 7 | # This configure script is free software; the Free Software Foundation 8 | # gives unlimited permission to copy, distribute and modify it. 9 | 10 | # Defaults: 11 | ac_help= 12 | ac_default_prefix=/usr/local 13 | # Any additions from configure.in: 14 | 15 | # Initialize some variables set by options. 16 | # The variables have the same names as the options, with 17 | # dashes changed to underlines. 18 | build=NONE 19 | cache_file=./config.cache 20 | exec_prefix=NONE 21 | host=NONE 22 | no_create= 23 | nonopt=NONE 24 | no_recursion= 25 | prefix=NONE 26 | program_prefix=NONE 27 | program_suffix=NONE 28 | program_transform_name=s,x,x, 29 | silent= 30 | site= 31 | srcdir= 32 | target=NONE 33 | verbose= 34 | x_includes=NONE 35 | x_libraries=NONE 36 | bindir='${exec_prefix}/bin' 37 | sbindir='${exec_prefix}/sbin' 38 | libexecdir='${exec_prefix}/libexec' 39 | datadir='${prefix}/share' 40 | sysconfdir='${prefix}/etc' 41 | sharedstatedir='${prefix}/com' 42 | localstatedir='${prefix}/var' 43 | libdir='${exec_prefix}/lib' 44 | includedir='${prefix}/include' 45 | oldincludedir='/usr/include' 46 | infodir='${prefix}/info' 47 | mandir='${prefix}/man' 48 | 49 | # Initialize some other variables. 50 | subdirs= 51 | MFLAGS= MAKEFLAGS= 52 | SHELL=${CONFIG_SHELL-/bin/sh} 53 | # Maximum number of lines to put in a shell here document. 54 | ac_max_here_lines=12 55 | 56 | ac_prev= 57 | for ac_option 58 | do 59 | 60 | # If the previous option needs an argument, assign it. 61 | if test -n "$ac_prev"; then 62 | eval "$ac_prev=\$ac_option" 63 | ac_prev= 64 | continue 65 | fi 66 | 67 | case "$ac_option" in 68 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 69 | *) ac_optarg= ;; 70 | esac 71 | 72 | # Accept the important Cygnus configure options, so we can diagnose typos. 73 | 74 | case "$ac_option" in 75 | 76 | -bindir | --bindir | --bindi | --bind | --bin | --bi) 77 | ac_prev=bindir ;; 78 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 79 | bindir="$ac_optarg" ;; 80 | 81 | -build | --build | --buil | --bui | --bu) 82 | ac_prev=build ;; 83 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) 84 | build="$ac_optarg" ;; 85 | 86 | -cache-file | --cache-file | --cache-fil | --cache-fi \ 87 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 88 | ac_prev=cache_file ;; 89 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 90 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 91 | cache_file="$ac_optarg" ;; 92 | 93 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) 94 | ac_prev=datadir ;; 95 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ 96 | | --da=*) 97 | datadir="$ac_optarg" ;; 98 | 99 | -disable-* | --disable-*) 100 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` 101 | # Reject names that are not valid shell variable names. 102 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then 103 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 104 | fi 105 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` 106 | eval "enable_${ac_feature}=no" ;; 107 | 108 | -enable-* | --enable-*) 109 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` 110 | # Reject names that are not valid shell variable names. 111 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then 112 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 113 | fi 114 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` 115 | case "$ac_option" in 116 | *=*) ;; 117 | *) ac_optarg=yes ;; 118 | esac 119 | eval "enable_${ac_feature}='$ac_optarg'" ;; 120 | 121 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 122 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 123 | | --exec | --exe | --ex) 124 | ac_prev=exec_prefix ;; 125 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 126 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 127 | | --exec=* | --exe=* | --ex=*) 128 | exec_prefix="$ac_optarg" ;; 129 | 130 | -gas | --gas | --ga | --g) 131 | # Obsolete; use --with-gas. 132 | with_gas=yes ;; 133 | 134 | -help | --help | --hel | --he) 135 | # Omit some internal or obsolete options to make the list less imposing. 136 | # This message is too long to be a string in the A/UX 3.1 sh. 137 | cat << EOF 138 | Usage: configure [options] [host] 139 | Options: [defaults in brackets after descriptions] 140 | Configuration: 141 | --cache-file=FILE cache test results in FILE 142 | --help print this message 143 | --no-create do not create output files 144 | --quiet, --silent do not print \`checking...' messages 145 | --version print the version of autoconf that created configure 146 | Directory and file names: 147 | --prefix=PREFIX install architecture-independent files in PREFIX 148 | [$ac_default_prefix] 149 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 150 | [same as prefix] 151 | --bindir=DIR user executables in DIR [EPREFIX/bin] 152 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] 153 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] 154 | --datadir=DIR read-only architecture-independent data in DIR 155 | [PREFIX/share] 156 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] 157 | --sharedstatedir=DIR modifiable architecture-independent data in DIR 158 | [PREFIX/com] 159 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] 160 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] 161 | --includedir=DIR C header files in DIR [PREFIX/include] 162 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] 163 | --infodir=DIR info documentation in DIR [PREFIX/info] 164 | --mandir=DIR man documentation in DIR [PREFIX/man] 165 | --srcdir=DIR find the sources in DIR [configure dir or ..] 166 | --program-prefix=PREFIX prepend PREFIX to installed program names 167 | --program-suffix=SUFFIX append SUFFIX to installed program names 168 | --program-transform-name=PROGRAM 169 | run sed PROGRAM on installed program names 170 | EOF 171 | cat << EOF 172 | Host type: 173 | --build=BUILD configure for building on BUILD [BUILD=HOST] 174 | --host=HOST configure for HOST [guessed] 175 | --target=TARGET configure for TARGET [TARGET=HOST] 176 | Features and packages: 177 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 178 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 179 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 180 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 181 | --x-includes=DIR X include files are in DIR 182 | --x-libraries=DIR X library files are in DIR 183 | EOF 184 | if test -n "$ac_help"; then 185 | echo "--enable and --with options recognized:$ac_help" 186 | fi 187 | exit 0 ;; 188 | 189 | -host | --host | --hos | --ho) 190 | ac_prev=host ;; 191 | -host=* | --host=* | --hos=* | --ho=*) 192 | host="$ac_optarg" ;; 193 | 194 | -includedir | --includedir | --includedi | --included | --include \ 195 | | --includ | --inclu | --incl | --inc) 196 | ac_prev=includedir ;; 197 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 198 | | --includ=* | --inclu=* | --incl=* | --inc=*) 199 | includedir="$ac_optarg" ;; 200 | 201 | -infodir | --infodir | --infodi | --infod | --info | --inf) 202 | ac_prev=infodir ;; 203 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 204 | infodir="$ac_optarg" ;; 205 | 206 | -libdir | --libdir | --libdi | --libd) 207 | ac_prev=libdir ;; 208 | -libdir=* | --libdir=* | --libdi=* | --libd=*) 209 | libdir="$ac_optarg" ;; 210 | 211 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 212 | | --libexe | --libex | --libe) 213 | ac_prev=libexecdir ;; 214 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 215 | | --libexe=* | --libex=* | --libe=*) 216 | libexecdir="$ac_optarg" ;; 217 | 218 | -localstatedir | --localstatedir | --localstatedi | --localstated \ 219 | | --localstate | --localstat | --localsta | --localst \ 220 | | --locals | --local | --loca | --loc | --lo) 221 | ac_prev=localstatedir ;; 222 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 223 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ 224 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 225 | localstatedir="$ac_optarg" ;; 226 | 227 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 228 | ac_prev=mandir ;; 229 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 230 | mandir="$ac_optarg" ;; 231 | 232 | -nfp | --nfp | --nf) 233 | # Obsolete; use --without-fp. 234 | with_fp=no ;; 235 | 236 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 237 | | --no-cr | --no-c) 238 | no_create=yes ;; 239 | 240 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 241 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 242 | no_recursion=yes ;; 243 | 244 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 245 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 246 | | --oldin | --oldi | --old | --ol | --o) 247 | ac_prev=oldincludedir ;; 248 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 249 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 250 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 251 | oldincludedir="$ac_optarg" ;; 252 | 253 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 254 | ac_prev=prefix ;; 255 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 256 | prefix="$ac_optarg" ;; 257 | 258 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ 259 | | --program-pre | --program-pr | --program-p) 260 | ac_prev=program_prefix ;; 261 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ 262 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 263 | program_prefix="$ac_optarg" ;; 264 | 265 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ 266 | | --program-suf | --program-su | --program-s) 267 | ac_prev=program_suffix ;; 268 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ 269 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 270 | program_suffix="$ac_optarg" ;; 271 | 272 | -program-transform-name | --program-transform-name \ 273 | | --program-transform-nam | --program-transform-na \ 274 | | --program-transform-n | --program-transform- \ 275 | | --program-transform | --program-transfor \ 276 | | --program-transfo | --program-transf \ 277 | | --program-trans | --program-tran \ 278 | | --progr-tra | --program-tr | --program-t) 279 | ac_prev=program_transform_name ;; 280 | -program-transform-name=* | --program-transform-name=* \ 281 | | --program-transform-nam=* | --program-transform-na=* \ 282 | | --program-transform-n=* | --program-transform-=* \ 283 | | --program-transform=* | --program-transfor=* \ 284 | | --program-transfo=* | --program-transf=* \ 285 | | --program-trans=* | --program-tran=* \ 286 | | --progr-tra=* | --program-tr=* | --program-t=*) 287 | program_transform_name="$ac_optarg" ;; 288 | 289 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 290 | | -silent | --silent | --silen | --sile | --sil) 291 | silent=yes ;; 292 | 293 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 294 | ac_prev=sbindir ;; 295 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 296 | | --sbi=* | --sb=*) 297 | sbindir="$ac_optarg" ;; 298 | 299 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ 300 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 301 | | --sharedst | --shareds | --shared | --share | --shar \ 302 | | --sha | --sh) 303 | ac_prev=sharedstatedir ;; 304 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 305 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 306 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 307 | | --sha=* | --sh=*) 308 | sharedstatedir="$ac_optarg" ;; 309 | 310 | -site | --site | --sit) 311 | ac_prev=site ;; 312 | -site=* | --site=* | --sit=*) 313 | site="$ac_optarg" ;; 314 | 315 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 316 | ac_prev=srcdir ;; 317 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 318 | srcdir="$ac_optarg" ;; 319 | 320 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 321 | | --syscon | --sysco | --sysc | --sys | --sy) 322 | ac_prev=sysconfdir ;; 323 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 324 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 325 | sysconfdir="$ac_optarg" ;; 326 | 327 | -target | --target | --targe | --targ | --tar | --ta | --t) 328 | ac_prev=target ;; 329 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 330 | target="$ac_optarg" ;; 331 | 332 | -v | -verbose | --verbose | --verbos | --verbo | --verb) 333 | verbose=yes ;; 334 | 335 | -version | --version | --versio | --versi | --vers) 336 | echo "configure generated by autoconf version 2.13" 337 | exit 0 ;; 338 | 339 | -with-* | --with-*) 340 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` 341 | # Reject names that are not valid shell variable names. 342 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then 343 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 344 | fi 345 | ac_package=`echo $ac_package| sed 's/-/_/g'` 346 | case "$ac_option" in 347 | *=*) ;; 348 | *) ac_optarg=yes ;; 349 | esac 350 | eval "with_${ac_package}='$ac_optarg'" ;; 351 | 352 | -without-* | --without-*) 353 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` 354 | # Reject names that are not valid shell variable names. 355 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then 356 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 357 | fi 358 | ac_package=`echo $ac_package| sed 's/-/_/g'` 359 | eval "with_${ac_package}=no" ;; 360 | 361 | --x) 362 | # Obsolete; use --with-x. 363 | with_x=yes ;; 364 | 365 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 366 | | --x-incl | --x-inc | --x-in | --x-i) 367 | ac_prev=x_includes ;; 368 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 369 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 370 | x_includes="$ac_optarg" ;; 371 | 372 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ 373 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 374 | ac_prev=x_libraries ;; 375 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 376 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 377 | x_libraries="$ac_optarg" ;; 378 | 379 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } 380 | ;; 381 | 382 | *) 383 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then 384 | echo "configure: warning: $ac_option: invalid host type" 1>&2 385 | fi 386 | if test "x$nonopt" != xNONE; then 387 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } 388 | fi 389 | nonopt="$ac_option" 390 | ;; 391 | 392 | esac 393 | done 394 | 395 | if test -n "$ac_prev"; then 396 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } 397 | fi 398 | 399 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 400 | 401 | # File descriptor usage: 402 | # 0 standard input 403 | # 1 file creation 404 | # 2 errors and warnings 405 | # 3 some systems may open it to /dev/tty 406 | # 4 used on the Kubota Titan 407 | # 6 checking for... messages and results 408 | # 5 compiler messages saved in config.log 409 | if test "$silent" = yes; then 410 | exec 6>/dev/null 411 | else 412 | exec 6>&1 413 | fi 414 | exec 5>./config.log 415 | 416 | echo "\ 417 | This file contains any messages produced by compilers while 418 | running configure, to aid debugging if configure makes a mistake. 419 | " 1>&5 420 | 421 | # Strip out --no-create and --no-recursion so they do not pile up. 422 | # Also quote any args containing shell metacharacters. 423 | ac_configure_args= 424 | for ac_arg 425 | do 426 | case "$ac_arg" in 427 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 428 | | --no-cr | --no-c) ;; 429 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 430 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; 431 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) 432 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; 433 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; 434 | esac 435 | done 436 | 437 | # NLS nuisances. 438 | # Only set these to C if already set. These must not be set unconditionally 439 | # because not all systems understand e.g. LANG=C (notably SCO). 440 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! 441 | # Non-C LC_CTYPE values break the ctype check. 442 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi 443 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi 444 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi 445 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi 446 | 447 | # confdefs.h avoids OS command line length limits that DEFS can exceed. 448 | rm -rf conftest* confdefs.h 449 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. 450 | echo > confdefs.h 451 | 452 | # A filename unique to this package, relative to the directory that 453 | # configure is in, which we can look for to find out if srcdir is correct. 454 | ac_unique_file=thttpd.c 455 | 456 | # Find the source files, if location was not specified. 457 | if test -z "$srcdir"; then 458 | ac_srcdir_defaulted=yes 459 | # Try the directory containing this script, then its parent. 460 | ac_prog=$0 461 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` 462 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. 463 | srcdir=$ac_confdir 464 | if test ! -r $srcdir/$ac_unique_file; then 465 | srcdir=.. 466 | fi 467 | else 468 | ac_srcdir_defaulted=no 469 | fi 470 | if test ! -r $srcdir/$ac_unique_file; then 471 | if test "$ac_srcdir_defaulted" = yes; then 472 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } 473 | else 474 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } 475 | fi 476 | fi 477 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` 478 | 479 | # Prefer explicitly selected file to automatically selected ones. 480 | if test -z "$CONFIG_SITE"; then 481 | if test "x$prefix" != xNONE; then 482 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" 483 | else 484 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 485 | fi 486 | fi 487 | for ac_site_file in $CONFIG_SITE; do 488 | if test -r "$ac_site_file"; then 489 | echo "loading site script $ac_site_file" 490 | . "$ac_site_file" 491 | fi 492 | done 493 | 494 | if test -r "$cache_file"; then 495 | echo "loading cache $cache_file" 496 | . $cache_file 497 | else 498 | echo "creating cache $cache_file" 499 | > $cache_file 500 | fi 501 | 502 | ac_ext=c 503 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 504 | ac_cpp='$CPP $CPPFLAGS' 505 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 506 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 507 | cross_compiling=$ac_cv_prog_cc_cross 508 | 509 | ac_exeext= 510 | ac_objext=o 511 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 512 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 513 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 514 | ac_n= ac_c=' 515 | ' ac_t=' ' 516 | else 517 | ac_n=-n ac_c= ac_t= 518 | fi 519 | else 520 | ac_n= ac_c='\c' ac_t= 521 | fi 522 | 523 | 524 | 525 | ac_aux_dir= 526 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do 527 | if test -f $ac_dir/install-sh; then 528 | ac_aux_dir=$ac_dir 529 | ac_install_sh="$ac_aux_dir/install-sh -c" 530 | break 531 | elif test -f $ac_dir/install.sh; then 532 | ac_aux_dir=$ac_dir 533 | ac_install_sh="$ac_aux_dir/install.sh -c" 534 | break 535 | fi 536 | done 537 | if test -z "$ac_aux_dir"; then 538 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } 539 | fi 540 | ac_config_guess=$ac_aux_dir/config.guess 541 | ac_config_sub=$ac_aux_dir/config.sub 542 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. 543 | 544 | 545 | # Do some error checking and defaulting for the host and target type. 546 | # The inputs are: 547 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT 548 | # 549 | # The rules are: 550 | # 1. You are not allowed to specify --host, --target, and nonopt at the 551 | # same time. 552 | # 2. Host defaults to nonopt. 553 | # 3. If nonopt is not specified, then host defaults to the current host, 554 | # as determined by config.guess. 555 | # 4. Target and build default to nonopt. 556 | # 5. If nonopt is not specified, then target and build default to host. 557 | 558 | # The aliases save the names the user supplied, while $host etc. 559 | # will get canonicalized. 560 | case $host---$target---$nonopt in 561 | NONE---*---* | *---NONE---* | *---*---NONE) ;; 562 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; 563 | esac 564 | 565 | 566 | # Make sure we can run config.sub. 567 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : 568 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } 569 | fi 570 | 571 | echo $ac_n "checking host system type""... $ac_c" 1>&6 572 | echo "configure:573: checking host system type" >&5 573 | 574 | host_alias=$host 575 | case "$host_alias" in 576 | NONE) 577 | case $nonopt in 578 | NONE) 579 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : 580 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } 581 | fi ;; 582 | *) host_alias=$nonopt ;; 583 | esac ;; 584 | esac 585 | 586 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` 587 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 588 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 589 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 590 | echo "$ac_t""$host" 1>&6 591 | 592 | echo $ac_n "checking target system type""... $ac_c" 1>&6 593 | echo "configure:594: checking target system type" >&5 594 | 595 | target_alias=$target 596 | case "$target_alias" in 597 | NONE) 598 | case $nonopt in 599 | NONE) target_alias=$host_alias ;; 600 | *) target_alias=$nonopt ;; 601 | esac ;; 602 | esac 603 | 604 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` 605 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 606 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 607 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 608 | echo "$ac_t""$target" 1>&6 609 | 610 | echo $ac_n "checking build system type""... $ac_c" 1>&6 611 | echo "configure:612: checking build system type" >&5 612 | 613 | build_alias=$build 614 | case "$build_alias" in 615 | NONE) 616 | case $nonopt in 617 | NONE) build_alias=$host_alias ;; 618 | *) build_alias=$nonopt ;; 619 | esac ;; 620 | esac 621 | 622 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` 623 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 624 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 625 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 626 | echo "$ac_t""$build" 1>&6 627 | 628 | test "$host_alias" != "$target_alias" && 629 | test "$program_prefix$program_suffix$program_transform_name" = \ 630 | NONENONEs,x,x, && 631 | program_prefix=${target_alias}- 632 | 633 | 634 | # Extract the first word of "gcc", so it can be a program name with args. 635 | set dummy gcc; ac_word=$2 636 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 637 | echo "configure:638: checking for $ac_word" >&5 638 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 639 | echo $ac_n "(cached) $ac_c" 1>&6 640 | else 641 | if test -n "$CC"; then 642 | ac_cv_prog_CC="$CC" # Let the user override the test. 643 | else 644 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 645 | ac_dummy="$PATH" 646 | for ac_dir in $ac_dummy; do 647 | test -z "$ac_dir" && ac_dir=. 648 | if test -f $ac_dir/$ac_word; then 649 | ac_cv_prog_CC="gcc" 650 | break 651 | fi 652 | done 653 | IFS="$ac_save_ifs" 654 | fi 655 | fi 656 | CC="$ac_cv_prog_CC" 657 | if test -n "$CC"; then 658 | echo "$ac_t""$CC" 1>&6 659 | else 660 | echo "$ac_t""no" 1>&6 661 | fi 662 | 663 | if test -z "$CC"; then 664 | # Extract the first word of "cc", so it can be a program name with args. 665 | set dummy cc; ac_word=$2 666 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 667 | echo "configure:668: checking for $ac_word" >&5 668 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 669 | echo $ac_n "(cached) $ac_c" 1>&6 670 | else 671 | if test -n "$CC"; then 672 | ac_cv_prog_CC="$CC" # Let the user override the test. 673 | else 674 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 675 | ac_prog_rejected=no 676 | ac_dummy="$PATH" 677 | for ac_dir in $ac_dummy; do 678 | test -z "$ac_dir" && ac_dir=. 679 | if test -f $ac_dir/$ac_word; then 680 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then 681 | ac_prog_rejected=yes 682 | continue 683 | fi 684 | ac_cv_prog_CC="cc" 685 | break 686 | fi 687 | done 688 | IFS="$ac_save_ifs" 689 | if test $ac_prog_rejected = yes; then 690 | # We found a bogon in the path, so make sure we never use it. 691 | set dummy $ac_cv_prog_CC 692 | shift 693 | if test $# -gt 0; then 694 | # We chose a different compiler from the bogus one. 695 | # However, it has the same basename, so the bogon will be chosen 696 | # first if we set CC to just the basename; use the full file name. 697 | shift 698 | set dummy "$ac_dir/$ac_word" "$@" 699 | shift 700 | ac_cv_prog_CC="$@" 701 | fi 702 | fi 703 | fi 704 | fi 705 | CC="$ac_cv_prog_CC" 706 | if test -n "$CC"; then 707 | echo "$ac_t""$CC" 1>&6 708 | else 709 | echo "$ac_t""no" 1>&6 710 | fi 711 | 712 | if test -z "$CC"; then 713 | case "`uname -s`" in 714 | *win32* | *WIN32*) 715 | # Extract the first word of "cl", so it can be a program name with args. 716 | set dummy cl; ac_word=$2 717 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 718 | echo "configure:719: checking for $ac_word" >&5 719 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 720 | echo $ac_n "(cached) $ac_c" 1>&6 721 | else 722 | if test -n "$CC"; then 723 | ac_cv_prog_CC="$CC" # Let the user override the test. 724 | else 725 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 726 | ac_dummy="$PATH" 727 | for ac_dir in $ac_dummy; do 728 | test -z "$ac_dir" && ac_dir=. 729 | if test -f $ac_dir/$ac_word; then 730 | ac_cv_prog_CC="cl" 731 | break 732 | fi 733 | done 734 | IFS="$ac_save_ifs" 735 | fi 736 | fi 737 | CC="$ac_cv_prog_CC" 738 | if test -n "$CC"; then 739 | echo "$ac_t""$CC" 1>&6 740 | else 741 | echo "$ac_t""no" 1>&6 742 | fi 743 | ;; 744 | esac 745 | fi 746 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } 747 | fi 748 | 749 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 750 | echo "configure:751: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 751 | 752 | ac_ext=c 753 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 754 | ac_cpp='$CPP $CPPFLAGS' 755 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 756 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 757 | cross_compiling=$ac_cv_prog_cc_cross 758 | 759 | cat > conftest.$ac_ext << EOF 760 | 761 | #line 762 "configure" 762 | #include "confdefs.h" 763 | 764 | main(){return(0);} 765 | EOF 766 | if { (eval echo configure:767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 767 | ac_cv_prog_cc_works=yes 768 | # If we can't run a trivial program, we are probably using a cross compiler. 769 | if (./conftest; exit) 2>/dev/null; then 770 | ac_cv_prog_cc_cross=no 771 | else 772 | ac_cv_prog_cc_cross=yes 773 | fi 774 | else 775 | echo "configure: failed program was:" >&5 776 | cat conftest.$ac_ext >&5 777 | ac_cv_prog_cc_works=no 778 | fi 779 | rm -fr conftest* 780 | ac_ext=c 781 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 782 | ac_cpp='$CPP $CPPFLAGS' 783 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 784 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 785 | cross_compiling=$ac_cv_prog_cc_cross 786 | 787 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 788 | if test $ac_cv_prog_cc_works = no; then 789 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } 790 | fi 791 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 792 | echo "configure:793: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 793 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 794 | cross_compiling=$ac_cv_prog_cc_cross 795 | 796 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 797 | echo "configure:798: checking whether we are using GNU C" >&5 798 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 799 | echo $ac_n "(cached) $ac_c" 1>&6 800 | else 801 | cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 807 | ac_cv_prog_gcc=yes 808 | else 809 | ac_cv_prog_gcc=no 810 | fi 811 | fi 812 | 813 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 814 | 815 | if test $ac_cv_prog_gcc = yes; then 816 | GCC=yes 817 | else 818 | GCC= 819 | fi 820 | 821 | ac_test_CFLAGS="${CFLAGS+set}" 822 | ac_save_CFLAGS="$CFLAGS" 823 | CFLAGS= 824 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 825 | echo "configure:826: checking whether ${CC-cc} accepts -g" >&5 826 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 827 | echo $ac_n "(cached) $ac_c" 1>&6 828 | else 829 | echo 'void f(){}' > conftest.c 830 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then 831 | ac_cv_prog_cc_g=yes 832 | else 833 | ac_cv_prog_cc_g=no 834 | fi 835 | rm -f conftest* 836 | 837 | fi 838 | 839 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 840 | if test "$ac_test_CFLAGS" = set; then 841 | CFLAGS="$ac_save_CFLAGS" 842 | elif test $ac_cv_prog_cc_g = yes; then 843 | if test "$GCC" = yes; then 844 | CFLAGS="-g -O2" 845 | else 846 | CFLAGS="-g" 847 | fi 848 | else 849 | if test "$GCC" = yes; then 850 | CFLAGS="-O2" 851 | else 852 | CFLAGS= 853 | fi 854 | fi 855 | 856 | 857 | V_CCOPT="-O" 858 | if test "$GCC" = yes ; then 859 | echo $ac_n "checking gcc version""... $ac_c" 1>&6 860 | echo "configure:861: checking gcc version" >&5 861 | if eval "test \"`echo '$''{'ac_cv_lbl_gcc_vers'+set}'`\" = set"; then 862 | echo $ac_n "(cached) $ac_c" 1>&6 863 | else 864 | ac_cv_lbl_gcc_vers=`$CC -dumpversion 2>&1 | \ 865 | sed -e 's/\..*//'` 866 | fi 867 | 868 | echo "$ac_t""$ac_cv_lbl_gcc_vers" 1>&6 869 | if test "$ac_cv_lbl_gcc_vers" -gt 1 ; then 870 | V_CCOPT="-O2" 871 | fi 872 | fi 873 | if test -f .devel ; then 874 | V_CCOPT="-g $V_CCOPT -ansi -pedantic -U__STRICT_ANSI__ -Wall -Wpointer-arith -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wno-long-long" 875 | fi 876 | 877 | echo $ac_n "checking how to link static binaries""... $ac_c" 1>&6 878 | echo "configure:879: checking how to link static binaries" >&5 879 | if eval "test \"`echo '$''{'ac_cv_lbl_static_flag'+set}'`\" = set"; then 880 | echo $ac_n "(cached) $ac_c" 1>&6 881 | else 882 | ac_cv_lbl_static_flag=unknown 883 | echo 'main() {}' > conftest.c 884 | if test "$GCC" != yes ; then 885 | trial_flag="-Bstatic" 886 | test=`$CC $trial_flag -o conftest conftest.c 2>&1` 887 | if test -z "$test" ; then 888 | ac_cv_lbl_static_flag="$trial_flag" 889 | fi 890 | rm -f conftest 891 | fi 892 | if test "$ac_cv_lbl_static_flag" = unknown ; then 893 | trial_flag="-static" 894 | test=`$CC $trial_flag -o conftest conftest.c 2>&1` 895 | if test -z "$test" ; then 896 | ac_cv_lbl_static_flag="$trial_flag" 897 | fi 898 | rm -f conftest 899 | fi 900 | rm conftest.c 901 | fi 902 | 903 | echo "$ac_t""$ac_cv_lbl_static_flag" 1>&6 904 | if test "$ac_cv_lbl_static_flag" != unknown ; then 905 | V_STATICFLAG="$ac_cv_lbl_static_flag" 906 | fi 907 | 908 | echo $ac_n "checking for __progname""... $ac_c" 1>&6 909 | echo "configure:910: checking for __progname" >&5 910 | if eval "test \"`echo '$''{'ac_cv_extern__progname'+set}'`\" = set"; then 911 | echo $ac_n "(cached) $ac_c" 1>&6 912 | else 913 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 923 | rm -rf conftest* 924 | ac_cv_extern__progname=yes 925 | else 926 | echo "configure: failed program was:" >&5 927 | cat conftest.$ac_ext >&5 928 | rm -rf conftest* 929 | ac_cv_extern__progname=no 930 | fi 931 | rm -f conftest* 932 | fi 933 | 934 | if test $ac_cv_extern__progname = yes ; then 935 | cat >> confdefs.h <<\EOF 936 | #define HAVE__PROGNAME 1 937 | EOF 938 | 939 | echo "$ac_t""yes" 1>&6 940 | else 941 | echo "$ac_t""no" 1>&6 942 | fi 943 | 944 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 945 | echo "configure:946: checking how to run the C preprocessor" >&5 946 | # On Suns, sometimes $CPP names a directory. 947 | if test -n "$CPP" && test -d "$CPP"; then 948 | CPP= 949 | fi 950 | if test -z "$CPP"; then 951 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then 952 | echo $ac_n "(cached) $ac_c" 1>&6 953 | else 954 | # This must be in double quotes, not single quotes, because CPP may get 955 | # substituted into the Makefile and "${CC-cc}" will confuse make. 956 | CPP="${CC-cc} -E" 957 | # On the NeXT, cc -E runs the code through the compiler's parser, 958 | # not just through cpp. 959 | cat > conftest.$ac_ext < 963 | Syntax Error 964 | EOF 965 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 966 | { (eval echo configure:967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 967 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 968 | if test -z "$ac_err"; then 969 | : 970 | else 971 | echo "$ac_err" >&5 972 | echo "configure: failed program was:" >&5 973 | cat conftest.$ac_ext >&5 974 | rm -rf conftest* 975 | CPP="${CC-cc} -E -traditional-cpp" 976 | cat > conftest.$ac_ext < 980 | Syntax Error 981 | EOF 982 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 983 | { (eval echo configure:984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 984 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 985 | if test -z "$ac_err"; then 986 | : 987 | else 988 | echo "$ac_err" >&5 989 | echo "configure: failed program was:" >&5 990 | cat conftest.$ac_ext >&5 991 | rm -rf conftest* 992 | CPP="${CC-cc} -nologo -E" 993 | cat > conftest.$ac_ext < 997 | Syntax Error 998 | EOF 999 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1000 | { (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1001 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1002 | if test -z "$ac_err"; then 1003 | : 1004 | else 1005 | echo "$ac_err" >&5 1006 | echo "configure: failed program was:" >&5 1007 | cat conftest.$ac_ext >&5 1008 | rm -rf conftest* 1009 | CPP=/lib/cpp 1010 | fi 1011 | rm -f conftest* 1012 | fi 1013 | rm -f conftest* 1014 | fi 1015 | rm -f conftest* 1016 | ac_cv_prog_CPP="$CPP" 1017 | fi 1018 | CPP="$ac_cv_prog_CPP" 1019 | else 1020 | ac_cv_prog_CPP="$CPP" 1021 | fi 1022 | echo "$ac_t""$CPP" 1>&6 1023 | 1024 | for ac_hdr in fcntl.h grp.h memory.h paths.h poll.h sys/poll.h sys/devpoll.h sys/event.h osreldate.h 1025 | do 1026 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1027 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1028 | echo "configure:1029: checking for $ac_hdr" >&5 1029 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1030 | echo $ac_n "(cached) $ac_c" 1>&6 1031 | else 1032 | cat > conftest.$ac_ext < 1036 | EOF 1037 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1038 | { (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1039 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1040 | if test -z "$ac_err"; then 1041 | rm -rf conftest* 1042 | eval "ac_cv_header_$ac_safe=yes" 1043 | else 1044 | echo "$ac_err" >&5 1045 | echo "configure: failed program was:" >&5 1046 | cat conftest.$ac_ext >&5 1047 | rm -rf conftest* 1048 | eval "ac_cv_header_$ac_safe=no" 1049 | fi 1050 | rm -f conftest* 1051 | fi 1052 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1053 | echo "$ac_t""yes" 1>&6 1054 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 1055 | cat >> confdefs.h <&6 1061 | fi 1062 | done 1063 | 1064 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 1065 | echo "configure:1066: checking whether time.h and sys/time.h may both be included" >&5 1066 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then 1067 | echo $ac_n "(cached) $ac_c" 1>&6 1068 | else 1069 | cat > conftest.$ac_ext < 1073 | #include 1074 | #include 1075 | int main() { 1076 | struct tm *tp; 1077 | ; return 0; } 1078 | EOF 1079 | if { (eval echo configure:1080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1080 | rm -rf conftest* 1081 | ac_cv_header_time=yes 1082 | else 1083 | echo "configure: failed program was:" >&5 1084 | cat conftest.$ac_ext >&5 1085 | rm -rf conftest* 1086 | ac_cv_header_time=no 1087 | fi 1088 | rm -f conftest* 1089 | fi 1090 | 1091 | echo "$ac_t""$ac_cv_header_time" 1>&6 1092 | if test $ac_cv_header_time = yes; then 1093 | cat >> confdefs.h <<\EOF 1094 | #define TIME_WITH_SYS_TIME 1 1095 | EOF 1096 | 1097 | fi 1098 | 1099 | ac_header_dirent=no 1100 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h 1101 | do 1102 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1103 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 1104 | echo "configure:1105: checking for $ac_hdr that defines DIR" >&5 1105 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then 1106 | echo $ac_n "(cached) $ac_c" 1>&6 1107 | else 1108 | cat > conftest.$ac_ext < 1112 | #include <$ac_hdr> 1113 | int main() { 1114 | DIR *dirp = 0; 1115 | ; return 0; } 1116 | EOF 1117 | if { (eval echo configure:1118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1118 | rm -rf conftest* 1119 | eval "ac_cv_header_dirent_$ac_safe=yes" 1120 | else 1121 | echo "configure: failed program was:" >&5 1122 | cat conftest.$ac_ext >&5 1123 | rm -rf conftest* 1124 | eval "ac_cv_header_dirent_$ac_safe=no" 1125 | fi 1126 | rm -f conftest* 1127 | fi 1128 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then 1129 | echo "$ac_t""yes" 1>&6 1130 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 1131 | cat >> confdefs.h <&6 1137 | fi 1138 | done 1139 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. 1140 | if test $ac_header_dirent = dirent.h; then 1141 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 1142 | echo "configure:1143: checking for opendir in -ldir" >&5 1143 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` 1144 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 1145 | echo $ac_n "(cached) $ac_c" 1>&6 1146 | else 1147 | ac_save_LIBS="$LIBS" 1148 | LIBS="-ldir $LIBS" 1149 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1162 | rm -rf conftest* 1163 | eval "ac_cv_lib_$ac_lib_var=yes" 1164 | else 1165 | echo "configure: failed program was:" >&5 1166 | cat conftest.$ac_ext >&5 1167 | rm -rf conftest* 1168 | eval "ac_cv_lib_$ac_lib_var=no" 1169 | fi 1170 | rm -f conftest* 1171 | LIBS="$ac_save_LIBS" 1172 | 1173 | fi 1174 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 1175 | echo "$ac_t""yes" 1>&6 1176 | LIBS="$LIBS -ldir" 1177 | else 1178 | echo "$ac_t""no" 1>&6 1179 | fi 1180 | 1181 | else 1182 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 1183 | echo "configure:1184: checking for opendir in -lx" >&5 1184 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` 1185 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 1186 | echo $ac_n "(cached) $ac_c" 1>&6 1187 | else 1188 | ac_save_LIBS="$LIBS" 1189 | LIBS="-lx $LIBS" 1190 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1203 | rm -rf conftest* 1204 | eval "ac_cv_lib_$ac_lib_var=yes" 1205 | else 1206 | echo "configure: failed program was:" >&5 1207 | cat conftest.$ac_ext >&5 1208 | rm -rf conftest* 1209 | eval "ac_cv_lib_$ac_lib_var=no" 1210 | fi 1211 | rm -f conftest* 1212 | LIBS="$ac_save_LIBS" 1213 | 1214 | fi 1215 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 1216 | echo "$ac_t""yes" 1>&6 1217 | LIBS="$LIBS -lx" 1218 | else 1219 | echo "$ac_t""no" 1>&6 1220 | fi 1221 | 1222 | fi 1223 | 1224 | 1225 | d="/usr/local/v6/lib" 1226 | echo $ac_n "checking for $d""... $ac_c" 1>&6 1227 | echo "configure:1228: checking for $d" >&5 1228 | if test -d $d; then 1229 | echo "$ac_t""yes (Adding -L$d to LDFLAGS)" 1>&6 1230 | LDFLAGS="$LDFLAGS -L$d" 1231 | else 1232 | echo "$ac_t""no" 1>&6 1233 | fi 1234 | 1235 | V_NETLIBS="" 1236 | echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 1237 | echo "configure:1238: checking for gethostbyname" >&5 1238 | if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then 1239 | echo $ac_n "(cached) $ac_c" 1>&6 1240 | else 1241 | cat > conftest.$ac_ext < 1247 | /* Override any gcc2 internal prototype to avoid an error. */ 1248 | /* We use char because int might match the return type of a gcc2 1249 | builtin and then its argument prototype would still apply. */ 1250 | char gethostbyname(); 1251 | 1252 | int main() { 1253 | 1254 | /* The GNU C library defines this for functions which it implements 1255 | to always fail with ENOSYS. Some functions are actually named 1256 | something starting with __ and the normal name is an alias. */ 1257 | #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) 1258 | choke me 1259 | #else 1260 | gethostbyname(); 1261 | #endif 1262 | 1263 | ; return 0; } 1264 | EOF 1265 | if { (eval echo configure:1266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1266 | rm -rf conftest* 1267 | eval "ac_cv_func_gethostbyname=yes" 1268 | else 1269 | echo "configure: failed program was:" >&5 1270 | cat conftest.$ac_ext >&5 1271 | rm -rf conftest* 1272 | eval "ac_cv_func_gethostbyname=no" 1273 | fi 1274 | rm -f conftest* 1275 | fi 1276 | 1277 | if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then 1278 | echo "$ac_t""yes" 1>&6 1279 | : 1280 | else 1281 | echo "$ac_t""no" 1>&6 1282 | # Some OSes (eg. Solaris) place it in libnsl: 1283 | echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 1284 | echo "configure:1285: checking for gethostbyname in -lnsl" >&5 1285 | ac_lib_var=`echo nsl'_'gethostbyname'_' | sed 'y%./+- %__p__%'` 1286 | if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then 1287 | echo $ac_n "(cached) $ac_c" 1>&6 1288 | else 1289 | ac_save_LIBS="$LIBS" 1290 | LIBS="-lnsl $LIBS" 1291 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1304 | rm -rf conftest* 1305 | eval "ac_cv_lbl_lib_$ac_lib_var=yes" 1306 | else 1307 | echo "configure: failed program was:" >&5 1308 | cat conftest.$ac_ext >&5 1309 | rm -rf conftest* 1310 | eval "ac_cv_lbl_lib_$ac_lib_var=no" 1311 | fi 1312 | rm -f conftest* 1313 | LIBS="$ac_save_LIBS" 1314 | 1315 | fi 1316 | if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then 1317 | echo "$ac_t""yes" 1>&6 1318 | V_NETLIBS="-lnsl $V_NETLIBS" 1319 | else 1320 | echo "$ac_t""no" 1>&6 1321 | # Some strange OSes (SINIX) have it in libsocket: 1322 | echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6 1323 | echo "configure:1324: checking for gethostbyname in -lsocket" >&5 1324 | ac_lib_var=`echo socket'_'gethostbyname'_' | sed 'y%./+- %__p__%'` 1325 | if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then 1326 | echo $ac_n "(cached) $ac_c" 1>&6 1327 | else 1328 | ac_save_LIBS="$LIBS" 1329 | LIBS="-lsocket $LIBS" 1330 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1343 | rm -rf conftest* 1344 | eval "ac_cv_lbl_lib_$ac_lib_var=yes" 1345 | else 1346 | echo "configure: failed program was:" >&5 1347 | cat conftest.$ac_ext >&5 1348 | rm -rf conftest* 1349 | eval "ac_cv_lbl_lib_$ac_lib_var=no" 1350 | fi 1351 | rm -f conftest* 1352 | LIBS="$ac_save_LIBS" 1353 | 1354 | fi 1355 | if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then 1356 | echo "$ac_t""yes" 1>&6 1357 | V_NETLIBS="-lsocket $V_NETLIBS" 1358 | else 1359 | echo "$ac_t""no" 1>&6 1360 | # Unfortunately libsocket sometimes depends on libnsl. 1361 | # AC_CHECK_LIB's API is essentially broken so the 1362 | # following ugliness is necessary: 1363 | echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6 1364 | echo "configure:1365: checking for gethostbyname in -lsocket" >&5 1365 | ac_lib_var=`echo socket'_'gethostbyname'_'-lnsl | sed 'y%./+- %__p__%'` 1366 | if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then 1367 | echo $ac_n "(cached) $ac_c" 1>&6 1368 | else 1369 | ac_save_LIBS="$LIBS" 1370 | LIBS="-lsocket -lnsl $LIBS" 1371 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1384 | rm -rf conftest* 1385 | eval "ac_cv_lbl_lib_$ac_lib_var=yes" 1386 | else 1387 | echo "configure: failed program was:" >&5 1388 | cat conftest.$ac_ext >&5 1389 | rm -rf conftest* 1390 | eval "ac_cv_lbl_lib_$ac_lib_var=no" 1391 | fi 1392 | rm -f conftest* 1393 | LIBS="$ac_save_LIBS" 1394 | 1395 | fi 1396 | if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then 1397 | echo "$ac_t""yes" 1>&6 1398 | V_NETLIBS="-lsocket -lnsl $V_NETLIBS" 1399 | else 1400 | echo "$ac_t""no" 1>&6 1401 | echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6 1402 | echo "configure:1403: checking for gethostbyname in -lresolv" >&5 1403 | ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'` 1404 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 1405 | echo $ac_n "(cached) $ac_c" 1>&6 1406 | else 1407 | ac_save_LIBS="$LIBS" 1408 | LIBS="-lresolv $LIBS" 1409 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1422 | rm -rf conftest* 1423 | eval "ac_cv_lib_$ac_lib_var=yes" 1424 | else 1425 | echo "configure: failed program was:" >&5 1426 | cat conftest.$ac_ext >&5 1427 | rm -rf conftest* 1428 | eval "ac_cv_lib_$ac_lib_var=no" 1429 | fi 1430 | rm -f conftest* 1431 | LIBS="$ac_save_LIBS" 1432 | 1433 | fi 1434 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 1435 | echo "$ac_t""yes" 1>&6 1436 | V_NETLIBS="-lresolv $V_NETLIBS" 1437 | else 1438 | echo "$ac_t""no" 1>&6 1439 | fi 1440 | 1441 | fi 1442 | 1443 | fi 1444 | 1445 | fi 1446 | 1447 | fi 1448 | 1449 | echo $ac_n "checking for socket""... $ac_c" 1>&6 1450 | echo "configure:1451: checking for socket" >&5 1451 | if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then 1452 | echo $ac_n "(cached) $ac_c" 1>&6 1453 | else 1454 | cat > conftest.$ac_ext < 1460 | /* Override any gcc2 internal prototype to avoid an error. */ 1461 | /* We use char because int might match the return type of a gcc2 1462 | builtin and then its argument prototype would still apply. */ 1463 | char socket(); 1464 | 1465 | int main() { 1466 | 1467 | /* The GNU C library defines this for functions which it implements 1468 | to always fail with ENOSYS. Some functions are actually named 1469 | something starting with __ and the normal name is an alias. */ 1470 | #if defined (__stub_socket) || defined (__stub___socket) 1471 | choke me 1472 | #else 1473 | socket(); 1474 | #endif 1475 | 1476 | ; return 0; } 1477 | EOF 1478 | if { (eval echo configure:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1479 | rm -rf conftest* 1480 | eval "ac_cv_func_socket=yes" 1481 | else 1482 | echo "configure: failed program was:" >&5 1483 | cat conftest.$ac_ext >&5 1484 | rm -rf conftest* 1485 | eval "ac_cv_func_socket=no" 1486 | fi 1487 | rm -f conftest* 1488 | fi 1489 | 1490 | if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then 1491 | echo "$ac_t""yes" 1>&6 1492 | : 1493 | else 1494 | echo "$ac_t""no" 1>&6 1495 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 1496 | echo "configure:1497: checking for socket in -lsocket" >&5 1497 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` 1498 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 1499 | echo $ac_n "(cached) $ac_c" 1>&6 1500 | else 1501 | ac_save_LIBS="$LIBS" 1502 | LIBS="-lsocket $LIBS" 1503 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1516 | rm -rf conftest* 1517 | eval "ac_cv_lib_$ac_lib_var=yes" 1518 | else 1519 | echo "configure: failed program was:" >&5 1520 | cat conftest.$ac_ext >&5 1521 | rm -rf conftest* 1522 | eval "ac_cv_lib_$ac_lib_var=no" 1523 | fi 1524 | rm -f conftest* 1525 | LIBS="$ac_save_LIBS" 1526 | 1527 | fi 1528 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 1529 | echo "$ac_t""yes" 1>&6 1530 | V_NETLIBS="-lsocket $V_NETLIBS" 1531 | else 1532 | echo "$ac_t""no" 1>&6 1533 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 1534 | echo "configure:1535: checking for socket in -lsocket" >&5 1535 | ac_lib_var=`echo socket'_'socket'_'-lnsl | sed 'y%./+- %__p__%'` 1536 | if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then 1537 | echo $ac_n "(cached) $ac_c" 1>&6 1538 | else 1539 | ac_save_LIBS="$LIBS" 1540 | LIBS="-lsocket -lnsl $LIBS" 1541 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1554 | rm -rf conftest* 1555 | eval "ac_cv_lbl_lib_$ac_lib_var=yes" 1556 | else 1557 | echo "configure: failed program was:" >&5 1558 | cat conftest.$ac_ext >&5 1559 | rm -rf conftest* 1560 | eval "ac_cv_lbl_lib_$ac_lib_var=no" 1561 | fi 1562 | rm -f conftest* 1563 | LIBS="$ac_save_LIBS" 1564 | 1565 | fi 1566 | if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then 1567 | echo "$ac_t""yes" 1>&6 1568 | V_NETLIBS="-lsocket -lnsl $V_NETLIBS" 1569 | else 1570 | echo "$ac_t""no" 1>&6 1571 | fi 1572 | 1573 | fi 1574 | 1575 | fi 1576 | 1577 | 1578 | echo $ac_n "checking for main in -linet6""... $ac_c" 1>&6 1579 | echo "configure:1580: checking for main in -linet6" >&5 1580 | ac_lib_var=`echo inet6'_'main | sed 'y%./+-%__p_%'` 1581 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 1582 | echo $ac_n "(cached) $ac_c" 1>&6 1583 | else 1584 | ac_save_LIBS="$LIBS" 1585 | LIBS="-linet6 $LIBS" 1586 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1595 | rm -rf conftest* 1596 | eval "ac_cv_lib_$ac_lib_var=yes" 1597 | else 1598 | echo "configure: failed program was:" >&5 1599 | cat conftest.$ac_ext >&5 1600 | rm -rf conftest* 1601 | eval "ac_cv_lib_$ac_lib_var=no" 1602 | fi 1603 | rm -f conftest* 1604 | LIBS="$ac_save_LIBS" 1605 | 1606 | fi 1607 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 1608 | echo "$ac_t""yes" 1>&6 1609 | ac_tr_lib=HAVE_LIB`echo inet6 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ 1610 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` 1611 | cat >> confdefs.h <&6 1619 | fi 1620 | 1621 | 1622 | echo $ac_n "checking for crypt""... $ac_c" 1>&6 1623 | echo "configure:1624: checking for crypt" >&5 1624 | if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then 1625 | echo $ac_n "(cached) $ac_c" 1>&6 1626 | else 1627 | cat > conftest.$ac_ext < 1633 | /* Override any gcc2 internal prototype to avoid an error. */ 1634 | /* We use char because int might match the return type of a gcc2 1635 | builtin and then its argument prototype would still apply. */ 1636 | char crypt(); 1637 | 1638 | int main() { 1639 | 1640 | /* The GNU C library defines this for functions which it implements 1641 | to always fail with ENOSYS. Some functions are actually named 1642 | something starting with __ and the normal name is an alias. */ 1643 | #if defined (__stub_crypt) || defined (__stub___crypt) 1644 | choke me 1645 | #else 1646 | crypt(); 1647 | #endif 1648 | 1649 | ; return 0; } 1650 | EOF 1651 | if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1652 | rm -rf conftest* 1653 | eval "ac_cv_func_crypt=yes" 1654 | else 1655 | echo "configure: failed program was:" >&5 1656 | cat conftest.$ac_ext >&5 1657 | rm -rf conftest* 1658 | eval "ac_cv_func_crypt=no" 1659 | fi 1660 | rm -f conftest* 1661 | fi 1662 | 1663 | if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then 1664 | echo "$ac_t""yes" 1>&6 1665 | : 1666 | else 1667 | echo "$ac_t""no" 1>&6 1668 | echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 1669 | echo "configure:1670: checking for crypt in -lcrypt" >&5 1670 | ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` 1671 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 1672 | echo $ac_n "(cached) $ac_c" 1>&6 1673 | else 1674 | ac_save_LIBS="$LIBS" 1675 | LIBS="-lcrypt $LIBS" 1676 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1689 | rm -rf conftest* 1690 | eval "ac_cv_lib_$ac_lib_var=yes" 1691 | else 1692 | echo "configure: failed program was:" >&5 1693 | cat conftest.$ac_ext >&5 1694 | rm -rf conftest* 1695 | eval "ac_cv_lib_$ac_lib_var=no" 1696 | fi 1697 | rm -f conftest* 1698 | LIBS="$ac_save_LIBS" 1699 | 1700 | fi 1701 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 1702 | echo "$ac_t""yes" 1>&6 1703 | ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/^a-zA-Z0-9_/_/g' \ 1704 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` 1705 | cat >> confdefs.h <&6 1713 | fi 1714 | 1715 | fi 1716 | 1717 | echo $ac_n "checking for hstrerror""... $ac_c" 1>&6 1718 | echo "configure:1719: checking for hstrerror" >&5 1719 | if eval "test \"`echo '$''{'ac_cv_func_hstrerror'+set}'`\" = set"; then 1720 | echo $ac_n "(cached) $ac_c" 1>&6 1721 | else 1722 | cat > conftest.$ac_ext < 1728 | /* Override any gcc2 internal prototype to avoid an error. */ 1729 | /* We use char because int might match the return type of a gcc2 1730 | builtin and then its argument prototype would still apply. */ 1731 | char hstrerror(); 1732 | 1733 | int main() { 1734 | 1735 | /* The GNU C library defines this for functions which it implements 1736 | to always fail with ENOSYS. Some functions are actually named 1737 | something starting with __ and the normal name is an alias. */ 1738 | #if defined (__stub_hstrerror) || defined (__stub___hstrerror) 1739 | choke me 1740 | #else 1741 | hstrerror(); 1742 | #endif 1743 | 1744 | ; return 0; } 1745 | EOF 1746 | if { (eval echo configure:1747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1747 | rm -rf conftest* 1748 | eval "ac_cv_func_hstrerror=yes" 1749 | else 1750 | echo "configure: failed program was:" >&5 1751 | cat conftest.$ac_ext >&5 1752 | rm -rf conftest* 1753 | eval "ac_cv_func_hstrerror=no" 1754 | fi 1755 | rm -f conftest* 1756 | fi 1757 | 1758 | if eval "test \"`echo '$ac_cv_func_'hstrerror`\" = yes"; then 1759 | echo "$ac_t""yes" 1>&6 1760 | : 1761 | else 1762 | echo "$ac_t""no" 1>&6 1763 | echo $ac_n "checking for hstrerror in -lresolv""... $ac_c" 1>&6 1764 | echo "configure:1765: checking for hstrerror in -lresolv" >&5 1765 | ac_lib_var=`echo resolv'_'hstrerror | sed 'y%./+-%__p_%'` 1766 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 1767 | echo $ac_n "(cached) $ac_c" 1>&6 1768 | else 1769 | ac_save_LIBS="$LIBS" 1770 | LIBS="-lresolv $LIBS" 1771 | cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1784 | rm -rf conftest* 1785 | eval "ac_cv_lib_$ac_lib_var=yes" 1786 | else 1787 | echo "configure: failed program was:" >&5 1788 | cat conftest.$ac_ext >&5 1789 | rm -rf conftest* 1790 | eval "ac_cv_lib_$ac_lib_var=no" 1791 | fi 1792 | rm -f conftest* 1793 | LIBS="$ac_save_LIBS" 1794 | 1795 | fi 1796 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 1797 | echo "$ac_t""yes" 1>&6 1798 | V_NETLIBS="-lresolv $V_NETLIBS" 1799 | else 1800 | echo "$ac_t""no" 1>&6 1801 | fi 1802 | 1803 | fi 1804 | 1805 | 1806 | for ac_func in strerror 1807 | do 1808 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1809 | echo "configure:1810: checking for $ac_func" >&5 1810 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1811 | echo $ac_n "(cached) $ac_c" 1>&6 1812 | else 1813 | cat > conftest.$ac_ext < 1819 | /* Override any gcc2 internal prototype to avoid an error. */ 1820 | /* We use char because int might match the return type of a gcc2 1821 | builtin and then its argument prototype would still apply. */ 1822 | char $ac_func(); 1823 | 1824 | int main() { 1825 | 1826 | /* The GNU C library defines this for functions which it implements 1827 | to always fail with ENOSYS. Some functions are actually named 1828 | something starting with __ and the normal name is an alias. */ 1829 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) 1830 | choke me 1831 | #else 1832 | $ac_func(); 1833 | #endif 1834 | 1835 | ; return 0; } 1836 | EOF 1837 | if { (eval echo configure:1838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1838 | rm -rf conftest* 1839 | eval "ac_cv_func_$ac_func=yes" 1840 | else 1841 | echo "configure: failed program was:" >&5 1842 | cat conftest.$ac_ext >&5 1843 | rm -rf conftest* 1844 | eval "ac_cv_func_$ac_func=no" 1845 | fi 1846 | rm -f conftest* 1847 | fi 1848 | 1849 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 1850 | echo "$ac_t""yes" 1>&6 1851 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1852 | cat >> confdefs.h <&6 1858 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" 1859 | fi 1860 | done 1861 | 1862 | 1863 | for ac_func in waitpid vsnprintf daemon setsid setlogin getaddrinfo getnameinfo gai_strerror kqueue sigset atoll 1864 | do 1865 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1866 | echo "configure:1867: checking for $ac_func" >&5 1867 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1868 | echo $ac_n "(cached) $ac_c" 1>&6 1869 | else 1870 | cat > conftest.$ac_ext < 1876 | /* Override any gcc2 internal prototype to avoid an error. */ 1877 | /* We use char because int might match the return type of a gcc2 1878 | builtin and then its argument prototype would still apply. */ 1879 | char $ac_func(); 1880 | 1881 | int main() { 1882 | 1883 | /* The GNU C library defines this for functions which it implements 1884 | to always fail with ENOSYS. Some functions are actually named 1885 | something starting with __ and the normal name is an alias. */ 1886 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) 1887 | choke me 1888 | #else 1889 | $ac_func(); 1890 | #endif 1891 | 1892 | ; return 0; } 1893 | EOF 1894 | if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1895 | rm -rf conftest* 1896 | eval "ac_cv_func_$ac_func=yes" 1897 | else 1898 | echo "configure: failed program was:" >&5 1899 | cat conftest.$ac_ext >&5 1900 | rm -rf conftest* 1901 | eval "ac_cv_func_$ac_func=no" 1902 | fi 1903 | rm -f conftest* 1904 | fi 1905 | 1906 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 1907 | echo "$ac_t""yes" 1>&6 1908 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1909 | cat >> confdefs.h <&6 1915 | fi 1916 | done 1917 | 1918 | for ac_hdr in unistd.h 1919 | do 1920 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1921 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1922 | echo "configure:1923: checking for $ac_hdr" >&5 1923 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1924 | echo $ac_n "(cached) $ac_c" 1>&6 1925 | else 1926 | cat > conftest.$ac_ext < 1930 | EOF 1931 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1932 | { (eval echo configure:1933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1933 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1934 | if test -z "$ac_err"; then 1935 | rm -rf conftest* 1936 | eval "ac_cv_header_$ac_safe=yes" 1937 | else 1938 | echo "$ac_err" >&5 1939 | echo "configure: failed program was:" >&5 1940 | cat conftest.$ac_ext >&5 1941 | rm -rf conftest* 1942 | eval "ac_cv_header_$ac_safe=no" 1943 | fi 1944 | rm -f conftest* 1945 | fi 1946 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1947 | echo "$ac_t""yes" 1>&6 1948 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 1949 | cat >> confdefs.h <&6 1955 | fi 1956 | done 1957 | 1958 | for ac_func in getpagesize 1959 | do 1960 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1961 | echo "configure:1962: checking for $ac_func" >&5 1962 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1963 | echo $ac_n "(cached) $ac_c" 1>&6 1964 | else 1965 | cat > conftest.$ac_ext < 1971 | /* Override any gcc2 internal prototype to avoid an error. */ 1972 | /* We use char because int might match the return type of a gcc2 1973 | builtin and then its argument prototype would still apply. */ 1974 | char $ac_func(); 1975 | 1976 | int main() { 1977 | 1978 | /* The GNU C library defines this for functions which it implements 1979 | to always fail with ENOSYS. Some functions are actually named 1980 | something starting with __ and the normal name is an alias. */ 1981 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) 1982 | choke me 1983 | #else 1984 | $ac_func(); 1985 | #endif 1986 | 1987 | ; return 0; } 1988 | EOF 1989 | if { (eval echo configure:1990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1990 | rm -rf conftest* 1991 | eval "ac_cv_func_$ac_func=yes" 1992 | else 1993 | echo "configure: failed program was:" >&5 1994 | cat conftest.$ac_ext >&5 1995 | rm -rf conftest* 1996 | eval "ac_cv_func_$ac_func=no" 1997 | fi 1998 | rm -f conftest* 1999 | fi 2000 | 2001 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2002 | echo "$ac_t""yes" 1>&6 2003 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2004 | cat >> confdefs.h <&6 2010 | fi 2011 | done 2012 | 2013 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 2014 | echo "configure:2015: checking for working mmap" >&5 2015 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then 2016 | echo $ac_n "(cached) $ac_c" 1>&6 2017 | else 2018 | if test "$cross_compiling" = yes; then 2019 | ac_cv_func_mmap_fixed_mapped=no 2020 | else 2021 | cat > conftest.$ac_ext < 2047 | #include 2048 | #include 2049 | 2050 | /* This mess was copied from the GNU getpagesize.h. */ 2051 | #ifndef HAVE_GETPAGESIZE 2052 | # ifdef HAVE_UNISTD_H 2053 | # include 2054 | # endif 2055 | 2056 | /* Assume that all systems that can run configure have sys/param.h. */ 2057 | # ifndef HAVE_SYS_PARAM_H 2058 | # define HAVE_SYS_PARAM_H 1 2059 | # endif 2060 | 2061 | # ifdef _SC_PAGESIZE 2062 | # define getpagesize() sysconf(_SC_PAGESIZE) 2063 | # else /* no _SC_PAGESIZE */ 2064 | # ifdef HAVE_SYS_PARAM_H 2065 | # include 2066 | # ifdef EXEC_PAGESIZE 2067 | # define getpagesize() EXEC_PAGESIZE 2068 | # else /* no EXEC_PAGESIZE */ 2069 | # ifdef NBPG 2070 | # define getpagesize() NBPG * CLSIZE 2071 | # ifndef CLSIZE 2072 | # define CLSIZE 1 2073 | # endif /* no CLSIZE */ 2074 | # else /* no NBPG */ 2075 | # ifdef NBPC 2076 | # define getpagesize() NBPC 2077 | # else /* no NBPC */ 2078 | # ifdef PAGESIZE 2079 | # define getpagesize() PAGESIZE 2080 | # endif /* PAGESIZE */ 2081 | # endif /* no NBPC */ 2082 | # endif /* no NBPG */ 2083 | # endif /* no EXEC_PAGESIZE */ 2084 | # else /* no HAVE_SYS_PARAM_H */ 2085 | # define getpagesize() 8192 /* punt totally */ 2086 | # endif /* no HAVE_SYS_PARAM_H */ 2087 | # endif /* no _SC_PAGESIZE */ 2088 | 2089 | #endif /* no HAVE_GETPAGESIZE */ 2090 | 2091 | #ifdef __cplusplus 2092 | extern "C" { void *malloc(unsigned); } 2093 | #else 2094 | char *malloc(); 2095 | #endif 2096 | 2097 | int 2098 | main() 2099 | { 2100 | char *data, *data2, *data3; 2101 | int i, pagesize; 2102 | int fd; 2103 | 2104 | pagesize = getpagesize(); 2105 | 2106 | /* 2107 | * First, make a file with some known garbage in it. 2108 | */ 2109 | data = malloc(pagesize); 2110 | if (!data) 2111 | exit(1); 2112 | for (i = 0; i < pagesize; ++i) 2113 | *(data + i) = rand(); 2114 | umask(0); 2115 | fd = creat("conftestmmap", 0600); 2116 | if (fd < 0) 2117 | exit(1); 2118 | if (write(fd, data, pagesize) != pagesize) 2119 | exit(1); 2120 | close(fd); 2121 | 2122 | /* 2123 | * Next, try to mmap the file at a fixed address which 2124 | * already has something else allocated at it. If we can, 2125 | * also make sure that we see the same garbage. 2126 | */ 2127 | fd = open("conftestmmap", O_RDWR); 2128 | if (fd < 0) 2129 | exit(1); 2130 | data2 = malloc(2 * pagesize); 2131 | if (!data2) 2132 | exit(1); 2133 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); 2134 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, 2135 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) 2136 | exit(1); 2137 | for (i = 0; i < pagesize; ++i) 2138 | if (*(data + i) != *(data2 + i)) 2139 | exit(1); 2140 | 2141 | /* 2142 | * Finally, make sure that changes to the mapped area 2143 | * do not percolate back to the file as seen by read(). 2144 | * (This is a bug on some variants of i386 svr4.0.) 2145 | */ 2146 | for (i = 0; i < pagesize; ++i) 2147 | *(data2 + i) = *(data2 + i) + 1; 2148 | data3 = malloc(pagesize); 2149 | if (!data3) 2150 | exit(1); 2151 | if (read(fd, data3, pagesize) != pagesize) 2152 | exit(1); 2153 | for (i = 0; i < pagesize; ++i) 2154 | if (*(data + i) != *(data3 + i)) 2155 | exit(1); 2156 | close(fd); 2157 | unlink("conftestmmap"); 2158 | exit(0); 2159 | } 2160 | 2161 | EOF 2162 | if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2163 | then 2164 | ac_cv_func_mmap_fixed_mapped=yes 2165 | else 2166 | echo "configure: failed program was:" >&5 2167 | cat conftest.$ac_ext >&5 2168 | rm -fr conftest* 2169 | ac_cv_func_mmap_fixed_mapped=no 2170 | fi 2171 | rm -fr conftest* 2172 | fi 2173 | 2174 | fi 2175 | 2176 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 2177 | if test $ac_cv_func_mmap_fixed_mapped = yes; then 2178 | cat >> confdefs.h <<\EOF 2179 | #define HAVE_MMAP 1 2180 | EOF 2181 | 2182 | fi 2183 | 2184 | 2185 | case "$target_os" in 2186 | solaris*) 2187 | for ac_func in poll 2188 | do 2189 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2190 | echo "configure:2191: checking for $ac_func" >&5 2191 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2192 | echo $ac_n "(cached) $ac_c" 1>&6 2193 | else 2194 | cat > conftest.$ac_ext < 2200 | /* Override any gcc2 internal prototype to avoid an error. */ 2201 | /* We use char because int might match the return type of a gcc2 2202 | builtin and then its argument prototype would still apply. */ 2203 | char $ac_func(); 2204 | 2205 | int main() { 2206 | 2207 | /* The GNU C library defines this for functions which it implements 2208 | to always fail with ENOSYS. Some functions are actually named 2209 | something starting with __ and the normal name is an alias. */ 2210 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) 2211 | choke me 2212 | #else 2213 | $ac_func(); 2214 | #endif 2215 | 2216 | ; return 0; } 2217 | EOF 2218 | if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2219 | rm -rf conftest* 2220 | eval "ac_cv_func_$ac_func=yes" 2221 | else 2222 | echo "configure: failed program was:" >&5 2223 | cat conftest.$ac_ext >&5 2224 | rm -rf conftest* 2225 | eval "ac_cv_func_$ac_func=no" 2226 | fi 2227 | rm -f conftest* 2228 | fi 2229 | 2230 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2231 | echo "$ac_t""yes" 1>&6 2232 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2233 | cat >> confdefs.h <&6 2239 | fi 2240 | done 2241 | 2242 | ;; 2243 | *) 2244 | for ac_func in select poll 2245 | do 2246 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2247 | echo "configure:2248: checking for $ac_func" >&5 2248 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2249 | echo $ac_n "(cached) $ac_c" 1>&6 2250 | else 2251 | cat > conftest.$ac_ext < 2257 | /* Override any gcc2 internal prototype to avoid an error. */ 2258 | /* We use char because int might match the return type of a gcc2 2259 | builtin and then its argument prototype would still apply. */ 2260 | char $ac_func(); 2261 | 2262 | int main() { 2263 | 2264 | /* The GNU C library defines this for functions which it implements 2265 | to always fail with ENOSYS. Some functions are actually named 2266 | something starting with __ and the normal name is an alias. */ 2267 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) 2268 | choke me 2269 | #else 2270 | $ac_func(); 2271 | #endif 2272 | 2273 | ; return 0; } 2274 | EOF 2275 | if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2276 | rm -rf conftest* 2277 | eval "ac_cv_func_$ac_func=yes" 2278 | else 2279 | echo "configure: failed program was:" >&5 2280 | cat conftest.$ac_ext >&5 2281 | rm -rf conftest* 2282 | eval "ac_cv_func_$ac_func=no" 2283 | fi 2284 | rm -f conftest* 2285 | fi 2286 | 2287 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2288 | echo "$ac_t""yes" 1>&6 2289 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2290 | cat >> confdefs.h <&6 2296 | fi 2297 | done 2298 | 2299 | ;; 2300 | esac 2301 | 2302 | echo $ac_n "checking if struct tm has tm_gmtoff member""... $ac_c" 1>&6 2303 | echo "configure:2304: checking if struct tm has tm_gmtoff member" >&5 2304 | if eval "test \"`echo '$''{'ac_cv_acme_tm_has_tm_gmtoff'+set}'`\" = set"; then 2305 | echo $ac_n "(cached) $ac_c" 1>&6 2306 | else 2307 | cat > conftest.$ac_ext < 2312 | # include 2313 | int main() { 2314 | u_int i = sizeof(((struct tm *)0)->tm_gmtoff) 2315 | ; return 0; } 2316 | EOF 2317 | if { (eval echo configure:2318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2318 | rm -rf conftest* 2319 | ac_cv_acme_tm_has_tm_gmtoff=yes 2320 | else 2321 | echo "configure: failed program was:" >&5 2322 | cat conftest.$ac_ext >&5 2323 | rm -rf conftest* 2324 | ac_cv_acme_tm_has_tm_gmtoff=no 2325 | fi 2326 | rm -f conftest* 2327 | fi 2328 | 2329 | echo "$ac_t""$ac_cv_acme_tm_has_tm_gmtoff" 1>&6 2330 | if test $ac_cv_acme_tm_has_tm_gmtoff = yes ; then 2331 | cat >> confdefs.h <<\EOF 2332 | #define HAVE_TM_GMTOFF 1 2333 | EOF 2334 | 2335 | fi 2336 | echo $ac_n "checking if int64_t exists""... $ac_c" 1>&6 2337 | echo "configure:2338: checking if int64_t exists" >&5 2338 | if eval "test \"`echo '$''{'ac_cv_acme_int64_t'+set}'`\" = set"; then 2339 | echo $ac_n "(cached) $ac_c" 1>&6 2340 | else 2341 | cat > conftest.$ac_ext < 2346 | int main() { 2347 | int64_t i64 2348 | ; return 0; } 2349 | EOF 2350 | if { (eval echo configure:2351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2351 | rm -rf conftest* 2352 | ac_cv_acme_int64_t=yes 2353 | else 2354 | echo "configure: failed program was:" >&5 2355 | cat conftest.$ac_ext >&5 2356 | rm -rf conftest* 2357 | ac_cv_acme_int64_t=no 2358 | fi 2359 | rm -f conftest* 2360 | fi 2361 | 2362 | echo "$ac_t""$ac_cv_acme_int64_t" 1>&6 2363 | if test $ac_cv_acme_int64_t = yes ; then 2364 | cat >> confdefs.h <<\EOF 2365 | #define HAVE_INT64T 1 2366 | EOF 2367 | 2368 | fi 2369 | echo $ac_n "checking if socklen_t exists""... $ac_c" 1>&6 2370 | echo "configure:2371: checking if socklen_t exists" >&5 2371 | if eval "test \"`echo '$''{'ac_cv_acme_socklen_t'+set}'`\" = set"; then 2372 | echo $ac_n "(cached) $ac_c" 1>&6 2373 | else 2374 | cat > conftest.$ac_ext < 2379 | # include 2380 | int main() { 2381 | socklen_t slen 2382 | ; return 0; } 2383 | EOF 2384 | if { (eval echo configure:2385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2385 | rm -rf conftest* 2386 | ac_cv_acme_socklen_t=yes 2387 | else 2388 | echo "configure: failed program was:" >&5 2389 | cat conftest.$ac_ext >&5 2390 | rm -rf conftest* 2391 | ac_cv_acme_socklen_t=no 2392 | fi 2393 | rm -f conftest* 2394 | fi 2395 | 2396 | echo "$ac_t""$ac_cv_acme_socklen_t" 1>&6 2397 | if test $ac_cv_acme_socklen_t = yes ; then 2398 | cat >> confdefs.h <<\EOF 2399 | #define HAVE_SOCKLENT 1 2400 | EOF 2401 | 2402 | fi 2403 | 2404 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 2405 | echo "configure:2406: checking whether ${MAKE-make} sets \${MAKE}" >&5 2406 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` 2407 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then 2408 | echo $ac_n "(cached) $ac_c" 1>&6 2409 | else 2410 | cat > conftestmake <<\EOF 2411 | all: 2412 | @echo 'ac_maketemp="${MAKE}"' 2413 | EOF 2414 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. 2415 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` 2416 | if test -n "$ac_maketemp"; then 2417 | eval ac_cv_prog_make_${ac_make}_set=yes 2418 | else 2419 | eval ac_cv_prog_make_${ac_make}_set=no 2420 | fi 2421 | rm -f conftestmake 2422 | fi 2423 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then 2424 | echo "$ac_t""yes" 1>&6 2425 | SET_MAKE= 2426 | else 2427 | echo "$ac_t""no" 1>&6 2428 | SET_MAKE="MAKE=${MAKE-make}" 2429 | fi 2430 | 2431 | # Find a good install program. We prefer a C program (faster), 2432 | # so one script is as good as another. But avoid the broken or 2433 | # incompatible versions: 2434 | # SysV /etc/install, /usr/sbin/install 2435 | # SunOS /usr/etc/install 2436 | # IRIX /sbin/install 2437 | # AIX /bin/install 2438 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 2439 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args 2440 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 2441 | # ./install, which can be erroneously created by make from ./install.sh. 2442 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 2443 | echo "configure:2444: checking for a BSD compatible install" >&5 2444 | if test -z "$INSTALL"; then 2445 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then 2446 | echo $ac_n "(cached) $ac_c" 1>&6 2447 | else 2448 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" 2449 | for ac_dir in $PATH; do 2450 | # Account for people who put trailing slashes in PATH elements. 2451 | case "$ac_dir/" in 2452 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; 2453 | *) 2454 | # OSF1 and SCO ODT 3.0 have their own names for install. 2455 | # Don't use installbsd from OSF since it installs stuff as root 2456 | # by default. 2457 | for ac_prog in ginstall scoinst install; do 2458 | if test -f $ac_dir/$ac_prog; then 2459 | if test $ac_prog = install && 2460 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then 2461 | # AIX install. It has an incompatible calling convention. 2462 | : 2463 | else 2464 | ac_cv_path_install="$ac_dir/$ac_prog -c" 2465 | break 2 2466 | fi 2467 | fi 2468 | done 2469 | ;; 2470 | esac 2471 | done 2472 | IFS="$ac_save_IFS" 2473 | 2474 | fi 2475 | if test "${ac_cv_path_install+set}" = set; then 2476 | INSTALL="$ac_cv_path_install" 2477 | else 2478 | # As a last resort, use the slow shell script. We don't cache a 2479 | # path for INSTALL within a source directory, because that will 2480 | # break other packages using the cache if that directory is 2481 | # removed, or if the path is relative. 2482 | INSTALL="$ac_install_sh" 2483 | fi 2484 | fi 2485 | echo "$ac_t""$INSTALL" 1>&6 2486 | 2487 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. 2488 | # It thinks the first close brace ends the variable substitution. 2489 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 2490 | 2491 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' 2492 | 2493 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 2494 | 2495 | 2496 | 2497 | 2498 | 2499 | 2500 | 2501 | trap '' 1 2 15 2502 | cat > confcache <<\EOF 2503 | # This file is a shell script that caches the results of configure 2504 | # tests run on this system so they can be shared between configure 2505 | # scripts and configure runs. It is not useful on other systems. 2506 | # If it contains results you don't want to keep, you may remove or edit it. 2507 | # 2508 | # By default, configure uses ./config.cache as the cache file, 2509 | # creating it if it does not exist already. You can give configure 2510 | # the --cache-file=FILE option to use a different cache file; that is 2511 | # what configure does when it calls configure scripts in 2512 | # subdirectories, so they share the cache. 2513 | # Giving --cache-file=/dev/null disables caching, for debugging configure. 2514 | # config.status only pays attention to the cache file if you give it the 2515 | # --recheck option to rerun configure. 2516 | # 2517 | EOF 2518 | # The following way of writing the cache mishandles newlines in values, 2519 | # but we know of no workaround that is simple, portable, and efficient. 2520 | # So, don't put newlines in cache variables' values. 2521 | # Ultrix sh set writes to stderr and can't be redirected directly, 2522 | # and sets the high bit in the cache file unless we assign to the vars. 2523 | (set) 2>&1 | 2524 | case `(ac_space=' '; set | grep ac_space) 2>&1` in 2525 | *ac_space=\ *) 2526 | # `set' does not quote correctly, so add quotes (double-quote substitution 2527 | # turns \\\\ into \\, and sed turns \\ into \). 2528 | sed -n \ 2529 | -e "s/'/'\\\\''/g" \ 2530 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" 2531 | ;; 2532 | *) 2533 | # `set' quotes correctly as required by POSIX, so do not add quotes. 2534 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' 2535 | ;; 2536 | esac >> confcache 2537 | if cmp -s $cache_file confcache; then 2538 | : 2539 | else 2540 | if test -w $cache_file; then 2541 | echo "updating cache $cache_file" 2542 | cat confcache > $cache_file 2543 | else 2544 | echo "not updating unwritable cache $cache_file" 2545 | fi 2546 | fi 2547 | rm -f confcache 2548 | 2549 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 2550 | 2551 | test "x$prefix" = xNONE && prefix=$ac_default_prefix 2552 | # Let make expand exec_prefix. 2553 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 2554 | 2555 | # Any assignment to VPATH causes Sun make to only execute 2556 | # the first set of double-colon rules, so remove it if not needed. 2557 | # If there is a colon in the path, we need to keep it. 2558 | if test "x$srcdir" = x.; then 2559 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' 2560 | fi 2561 | 2562 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 2563 | 2564 | # Transform confdefs.h into DEFS. 2565 | # Protect against shell expansion while executing Makefile rules. 2566 | # Protect against Makefile macro expansion. 2567 | cat > conftest.defs <<\EOF 2568 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g 2569 | s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g 2570 | s%\[%\\&%g 2571 | s%\]%\\&%g 2572 | s%\$%$$%g 2573 | EOF 2574 | DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` 2575 | rm -f conftest.defs 2576 | 2577 | 2578 | # Without the "./", some shells look in PATH for config.status. 2579 | : ${CONFIG_STATUS=./config.status} 2580 | 2581 | echo creating $CONFIG_STATUS 2582 | rm -f $CONFIG_STATUS 2583 | cat > $CONFIG_STATUS </dev/null | sed 1q`: 2589 | # 2590 | # $0 $ac_configure_args 2591 | # 2592 | # Compiler output produced by configure, useful for debugging 2593 | # configure, is in ./config.log if it exists. 2594 | 2595 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" 2596 | for ac_option 2597 | do 2598 | case "\$ac_option" in 2599 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 2600 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" 2601 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; 2602 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) 2603 | echo "$CONFIG_STATUS generated by autoconf version 2.13" 2604 | exit 0 ;; 2605 | -help | --help | --hel | --he | --h) 2606 | echo "\$ac_cs_usage"; exit 0 ;; 2607 | *) echo "\$ac_cs_usage"; exit 1 ;; 2608 | esac 2609 | done 2610 | 2611 | ac_given_srcdir=$srcdir 2612 | ac_given_INSTALL="$INSTALL" 2613 | 2614 | trap 'rm -fr `echo "Makefile cgi-src/Makefile extras/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 2615 | EOF 2616 | cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF 2621 | $ac_vpsub 2622 | $extrasub 2623 | s%@SHELL@%$SHELL%g 2624 | s%@CFLAGS@%$CFLAGS%g 2625 | s%@CPPFLAGS@%$CPPFLAGS%g 2626 | s%@CXXFLAGS@%$CXXFLAGS%g 2627 | s%@FFLAGS@%$FFLAGS%g 2628 | s%@DEFS@%$DEFS%g 2629 | s%@LDFLAGS@%$LDFLAGS%g 2630 | s%@LIBS@%$LIBS%g 2631 | s%@exec_prefix@%$exec_prefix%g 2632 | s%@prefix@%$prefix%g 2633 | s%@program_transform_name@%$program_transform_name%g 2634 | s%@bindir@%$bindir%g 2635 | s%@sbindir@%$sbindir%g 2636 | s%@libexecdir@%$libexecdir%g 2637 | s%@datadir@%$datadir%g 2638 | s%@sysconfdir@%$sysconfdir%g 2639 | s%@sharedstatedir@%$sharedstatedir%g 2640 | s%@localstatedir@%$localstatedir%g 2641 | s%@libdir@%$libdir%g 2642 | s%@includedir@%$includedir%g 2643 | s%@oldincludedir@%$oldincludedir%g 2644 | s%@infodir@%$infodir%g 2645 | s%@mandir@%$mandir%g 2646 | s%@host@%$host%g 2647 | s%@host_alias@%$host_alias%g 2648 | s%@host_cpu@%$host_cpu%g 2649 | s%@host_vendor@%$host_vendor%g 2650 | s%@host_os@%$host_os%g 2651 | s%@target@%$target%g 2652 | s%@target_alias@%$target_alias%g 2653 | s%@target_cpu@%$target_cpu%g 2654 | s%@target_vendor@%$target_vendor%g 2655 | s%@target_os@%$target_os%g 2656 | s%@build@%$build%g 2657 | s%@build_alias@%$build_alias%g 2658 | s%@build_cpu@%$build_cpu%g 2659 | s%@build_vendor@%$build_vendor%g 2660 | s%@build_os@%$build_os%g 2661 | s%@CC@%$CC%g 2662 | s%@CPP@%$CPP%g 2663 | s%@LIBOBJS@%$LIBOBJS%g 2664 | s%@SET_MAKE@%$SET_MAKE%g 2665 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g 2666 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g 2667 | s%@INSTALL_DATA@%$INSTALL_DATA%g 2668 | s%@V_CCOPT@%$V_CCOPT%g 2669 | s%@V_STATICFLAG@%$V_STATICFLAG%g 2670 | s%@V_NETLIBS@%$V_NETLIBS%g 2671 | 2672 | CEOF 2673 | EOF 2674 | 2675 | cat >> $CONFIG_STATUS <<\EOF 2676 | 2677 | # Split the substitutions into bite-sized pieces for seds with 2678 | # small command number limits, like on Digital OSF/1 and HP-UX. 2679 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. 2680 | ac_file=1 # Number of current file. 2681 | ac_beg=1 # First line for current file. 2682 | ac_end=$ac_max_sed_cmds # Line after last line for current file. 2683 | ac_more_lines=: 2684 | ac_sed_cmds="" 2685 | while $ac_more_lines; do 2686 | if test $ac_beg -gt 1; then 2687 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file 2688 | else 2689 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file 2690 | fi 2691 | if test ! -s conftest.s$ac_file; then 2692 | ac_more_lines=false 2693 | rm -f conftest.s$ac_file 2694 | else 2695 | if test -z "$ac_sed_cmds"; then 2696 | ac_sed_cmds="sed -f conftest.s$ac_file" 2697 | else 2698 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" 2699 | fi 2700 | ac_file=`expr $ac_file + 1` 2701 | ac_beg=$ac_end 2702 | ac_end=`expr $ac_end + $ac_max_sed_cmds` 2703 | fi 2704 | done 2705 | if test -z "$ac_sed_cmds"; then 2706 | ac_sed_cmds=cat 2707 | fi 2708 | EOF 2709 | 2710 | cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF 2715 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then 2716 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 2717 | case "$ac_file" in 2718 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` 2719 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 2720 | *) ac_file_in="${ac_file}.in" ;; 2721 | esac 2722 | 2723 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. 2724 | 2725 | # Remove last slash and all that follows it. Not all systems have dirname. 2726 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` 2727 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 2728 | # The file is in a subdirectory. 2729 | test ! -d "$ac_dir" && mkdir "$ac_dir" 2730 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" 2731 | # A "../" for each directory in $ac_dir_suffix. 2732 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` 2733 | else 2734 | ac_dir_suffix= ac_dots= 2735 | fi 2736 | 2737 | case "$ac_given_srcdir" in 2738 | .) srcdir=. 2739 | if test -z "$ac_dots"; then top_srcdir=. 2740 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; 2741 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; 2742 | *) # Relative path. 2743 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" 2744 | top_srcdir="$ac_dots$ac_given_srcdir" ;; 2745 | esac 2746 | 2747 | case "$ac_given_INSTALL" in 2748 | [/$]*) INSTALL="$ac_given_INSTALL" ;; 2749 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; 2750 | esac 2751 | 2752 | echo creating "$ac_file" 2753 | rm -f "$ac_file" 2754 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." 2755 | case "$ac_file" in 2756 | *Makefile*) ac_comsub="1i\\ 2757 | # $configure_input" ;; 2758 | *) ac_comsub= ;; 2759 | esac 2760 | 2761 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` 2762 | sed -e "$ac_comsub 2763 | s%@configure_input@%$configure_input%g 2764 | s%@srcdir@%$srcdir%g 2765 | s%@top_srcdir@%$top_srcdir%g 2766 | s%@INSTALL@%$INSTALL%g 2767 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file 2768 | fi; done 2769 | rm -f conftest.s* 2770 | 2771 | EOF 2772 | cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF 2776 | 2777 | exit 0 2778 | EOF 2779 | chmod +x $CONFIG_STATUS 2780 | rm -fr confdefs* $ac_clean_files 2781 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 2782 | 2783 | --------------------------------------------------------------------------------