summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christopher Powell 2003-07-22 04:17:59 +0000
committerGravatar Christopher Powell 2003-07-22 04:17:59 +0000
commit6cefab259d0b783b85df4518d0d48dab0e11389b (patch)
tree74343578540827eef162a20462a8cc0c3e9e0e38
parent27c519a31da825ca27aa48e1a2d3dc7b45921852 (diff)
Changes on the way to 1.19. This is probably going to be 1.19b1. Detail:1.19b1
* Hostnames are now converted to lowercase in the mass-virtual naming section. The loop that converts dots to underscores has been optimized as well. * Migration to autoconf * New directive LogSQLTableType allows one to specify the kind of table that the module makes during table creation (e.g. InnoDB, MyISAM). Thanks to Jim Turner for the suggestion and patch. If your MySQL server does not support the specified type, it will create a MyISAM table instead. * Directives can now be placed in the 'main' server config and will be inherited by the virtual hosts. This means a LOT less repetition: you only specify the item once to have it inherited, but it can still be overridden on a virtualhost level.
-rw-r--r--CHANGELOG37
-rw-r--r--Documentation/documentation.lyx20
-rw-r--r--Makefile.in (renamed from Makefile)75
-rw-r--r--config.in23
-rwxr-xr-xconfig.sub1411
-rwxr-xr-xconfigure2548
-rw-r--r--configure.in186
-rwxr-xr-xinstall-sh251
-rw-r--r--mod_log_sql.c208
9 files changed, 4661 insertions, 98 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 5547eea..dbcd39e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,11 +1,8 @@
1$Id: CHANGELOG,v 1.21 2003/03/27 01:58:42 helios Exp $ 1$Id: CHANGELOG,v 1.22 2003/07/22 04:17:53 helios Exp $
2 2
3TODO: 3TODO:
4* Rethink documentation flow and rewrite? 4* Port connection portion to other DBMS? Genericize the module? Start with
5* Port connection portion to other DBMS? Genericize the module? Start with
6 PostgreSQL. 5 PostgreSQL.
7* GNU autoconf
8* merge server config into vh config
9* port to Apache 2.x 6* port to Apache 2.x
10* does determining table name in massvirtual mode upon every request 7* does determining table name in massvirtual mode upon every request
11 cause performance degradation? If so fix. 8 cause performance degradation? If so fix.
@@ -15,9 +12,39 @@ TODO:
15* ignore by cookie 12* ignore by cookie
16* tool to import logs into SQL 13* tool to import logs into SQL
17* Directive to yes/no create ancillary tables (or just access table) 14* Directive to yes/no create ancillary tables (or just access table)
15* break module into separate code files for maintenance ease
18 16
19CHANGES: 17CHANGES:
20 18
191.19b1:
20* Hostnames are now converted to lowercase in the mass-virtual naming section.
21 The loop that converts dots to underscores has been optimized as well.
22* Migration to autoconf
23* New directive LogSQLTableType allows one to specify the kind of table that
24 the module makes during table creation (e.g. InnoDB, MyISAM). Thanks to Jim
25 Turner for the suggestion and patch. If your MySQL server does not support
26 the specified type, it will create a MyISAM table instead.
27* Directives can now be placed in the 'main' server config and will be
28 inherited by the virtual hosts. This means a LOT less repetition: you only
29 specify the item once to have it inherited, but it can still be overridden
30 on a virtualhost level. These can be specified in this manner:
31
32 LogSQLTransferLogTable
33 LogSQLTransferLogFormat
34 LogSQLPreserveFile
35 LogSQLNotesLogTable
36 LogSQLHeadersInLogTable
37 LogSQLHeadersOutLogTable
38 LogSQLCookieLogTable
39 LogSQLRemhostIgnore
40 LogSQLRequestIgnore
41 LogSQLRequestAccept
42 LogSQLWhichNotes
43 LogSQLWhichHeadersOut
44 LogSQLWhichHeadersIn
45 LogSQLWhichCookies
46 LogSQLWhichCookie
47
211.18: 481.18:
22* Delayed inserts (a MySQL extension) are now available at compile-time. 49* Delayed inserts (a MySQL extension) are now available at compile-time.
23 THIS IS UGLY because there seems to be a bug in the way MySQL returns 50 THIS IS UGLY because there seems to be a bug in the way MySQL returns
diff --git a/Documentation/documentation.lyx b/Documentation/documentation.lyx
index dfbf353..eeb6af5 100644
--- a/Documentation/documentation.lyx
+++ b/Documentation/documentation.lyx
@@ -1061,10 +1061,24 @@ mysql> create database apachelogs;
1061\end_inset 1061\end_inset
1062 1062
1063If you want to hand-create the tables, run the enclosed 'create-tables' 1063If you want to hand-create the tables, run the enclosed 'create-tables'
1064 SQL script as follows: 1064 SQL script as follows (
1065\begin_inset Quotes eld
1066\end_inset
1067
1068create_tables.sql
1069\begin_inset Quotes erd
1070\end_inset
1071
1072 needs to be in your current working directory).
1065\begin_deeper 1073\begin_deeper
1066\layout LyX-Code 1074\layout LyX-Code
1067 1075
1076mysql> use apachelogs
1077\layout LyX-Code
1078
1079Database changed
1080\layout LyX-Code
1081
1068mysql> source create_tables.sql 1082mysql> source create_tables.sql
1069\end_deeper 1083\end_deeper
1070\layout Enumerate 1084\layout Enumerate
@@ -1081,9 +1095,7 @@ Create a specific MySQL userid that httpd will use to authenticate and enter
1081\layout LyX-Code 1095\layout LyX-Code
1082 1096
1083mysql> grant insert,create on apachelogs.* to loguser@my.apachemachine.com 1097mysql> grant insert,create on apachelogs.* to loguser@my.apachemachine.com
1084\layout LyX-Code 1098 identified by 'l0gger';
1085
1086identified by 'l0gger';
1087\end_deeper 1099\end_deeper
1088\layout Enumerate 1100\layout Enumerate
1089 1101
diff --git a/Makefile b/Makefile.in
index af38739..5a365bc 100644
--- a/Makefile
+++ b/Makefile.in
@@ -1,25 +1,11 @@
1# $Id: Makefile,v 1.21 2002/12/18 22:56:37 helios Exp $ 1# $Id: Makefile.in,v 1.1 2003/07/22 04:17:53 helios Exp $
2
3###########################################################################
4# Important:
5# Adjust these values as outlined in section "Installation" in the docs.
6# Not all are needed at all times.
7
8APACHESOURCE = /usr/local/src/apache_1.3.27-dso
9APACHEINSTALLED = /usr/local/Apache
10APACHEHEADERS = /usr/local/Apache/include
11APXS = $(APACHEINSTALLED)/bin/apxs
12
13MYSQLLIBRARIES = /usr/lib
14MYSQLHEADERS = /usr/include/mysql
15
16#MODSSLHEADERS = /usr/local/src/apache_1.3.27-dso/src/modules/ssl
17#DB1HEADERS = /usr/include/db1
18 2
19########################################################################### 3###########################################################################
20# Don't uncomment this without reading the "Optimizing for a busy database" 4# Don't uncomment this without reading the "Optimizing for a busy database"
21# section in the documentation (under "Advanced logging scenarios"). 5# section in the documentation (under "Advanced logging scenarios").
22 6
7#@DEFS@
8
23#MYSQLDELAYED = -DWANT_DELAYED_MYSQL_INSERT 9#MYSQLDELAYED = -DWANT_DELAYED_MYSQL_INSERT
24 10
25########################################################################### 11###########################################################################
@@ -29,22 +15,20 @@ MLMVERS = 1.18
29#APXSGDB = -Wc,-g 15#APXSGDB = -Wc,-g
30APXSOPTS = -Wc,-O2 -Wc,-Wall 16APXSOPTS = -Wc,-O2 -Wc,-Wall
31STATOPTS = -fpic -O2 -Wall 17STATOPTS = -fpic -O2 -Wall
32CC = gcc 18CC = @CC@
33INSTALL = /usr/bin/install -m 664 19INSTALL = @INSTALL@ -m 664
34RM = /bin/rm 20RM = @RM@
35LYX = /usr/bin/lyx 21LYX = @LYX@
36LATEX = /usr/bin/latex 22LATEX = @LATEX@
37DVIPS = /usr/bin/dvips 23DVIPS = @DVIPS@
38LINKS = /usr/bin/lynx 24LINKS = @LINKS@
39L2H = /usr/bin/latex2html 25L2H = @L2H@
40WEBSERV = gw0.corp 26WEBSERV = gw0.corp
41 27
42STATFLAGS = -I$(APACHEHEADERS) 28ifeq (@HAVE_MODSSL@, 1)
43SOFLAGS = -L$(MYSQLLIBRARIES) -lmysqlclient -lz 29 FLAGS = -DEAPI -I@MYSQLHDRDIR@ $(MYSQLDELAYED) -I@APSRCDIR@/src/modules/ssl -DWANT_SSL_LOGGING
44ifdef MODSSLHEADERS
45 FLAGS = -DEAPI -I$(MYSQLHEADERS) $(MYSQLDELAYED) -I$(MODSSLHEADERS) -I$(DB1HEADERS) -DWANT_SSL_LOGGING
46else 30else
47 FLAGS = -DEAPI -I$(MYSQLHEADERS) $(MYSQLDELAYED) 31 FLAGS = -DEAPI -I@MYSQLHDRDIR@ $(MYSQLDELAYED)
48endif 32endif
49 33
50all: 34all:
@@ -58,19 +42,19 @@ dso: mod_log_sql.so
58static: mod_log_sql.o 42static: mod_log_sql.o
59 43
60mod_log_sql.so: mod_log_sql.c Makefile 44mod_log_sql.so: mod_log_sql.c Makefile
61 $(APXS) -c $(APXSGDB) $(APXSOPTS) $(FLAGS) $(SOFLAGS) mod_log_sql.c 45 @APXSDIR@/apxs -c $(APXSGDB) $(APXSOPTS) $(FLAGS) -L@MYSQLLIBDIR@ @LIBS@ mod_log_sql.c
62 46
63mod_log_sql.o: mod_log_sql.c Makefile 47mod_log_sql.o: mod_log_sql.c Makefile
64 $(CC) $(STATOPTS) $(FLAGS) $(STATFLAGS) -c mod_log_sql.c 48 $(CC) $(STATOPTS) $(FLAGS) -I@APHDRDIR@ -c mod_log_sql.c
65 49
66dsoinstall: dso 50dsoinstall: dso
67 $(APXS) -i mod_log_sql.so 51 @APXSDIR@/apxs -i mod_log_sql.so
68 52
69statinstall: static 53statinstall: static
70 $(INSTALL) -d -m 755 $(APACHESOURCE)/src/modules/sql 54 $(INSTALL) -d -m 755 @APSRCDIR@/src/modules/sql
71 $(INSTALL) mod_log_sql.c $(APACHESOURCE)/src/modules/sql/mod_log_sql.c 55 $(INSTALL) mod_log_sql.c @APSRCDIR@/src/modules/sql/mod_log_sql.c
72 $(INSTALL) Makefile $(APACHESOURCE)/src/modules/sql/Makefile 56 $(INSTALL) Makefile @APSRCDIR@/src/modules/sql/Makefile
73 $(INSTALL) mod_log_sql.o $(APACHESOURCE)/src/modules/sql/mod_log_sql.o 57 $(INSTALL) mod_log_sql.o @APSRCDIR@/src/modules/sql/mod_log_sql.o
74 58
75clean: 59clean:
76 $(RM) -rf *.o *.so 60 $(RM) -rf *.o *.so
@@ -80,16 +64,19 @@ clean:
80 $(RM) -f Documentation/*.ps 64 $(RM) -f Documentation/*.ps
81 $(RM) -f Documentation/*.txt 65 $(RM) -f Documentation/*.txt
82 66
67distclean: clean
68 $(RM) -f config.log config.status config.cache config.guess confdefs.h Makefile config.h
69
83distro: documentation 70distro: documentation
84 @scp CHANGELOG $(WEBSERV):$(APACHEINSTALLED)/html/mod_log_sql/docs 71 @scp CHANGELOG $(WEBSERV):@APDSTDIR@/html/mod_log_sql/docs
85 @scp Documentation/*.ps $(WEBSERV):$(APACHEINSTALLED)/html/mod_log_sql/docs 72 @scp Documentation/*.ps $(WEBSERV):@APDSTDIR@/html/mod_log_sql/docs
86 @scp Documentation/HTML/*.html $(WEBSERV):$(APACHEINSTALLED)/html/mod_log_sql/docs/ 73 @scp Documentation/HTML/*.html $(WEBSERV):@APDSTDIR@/html/mod_log_sql/docs/
87 @scp Documentation/HTML/*.png $(WEBSERV):$(APACHEINSTALLED)/html/mod_log_sql/docs/ 74 @scp Documentation/HTML/*.png $(WEBSERV):@APDSTDIR@/html/mod_log_sql/docs/
88 @cd ..; tar jcf mod_log_sql-$(MLMVERS).tar.bz2 --exclude mod_log_sql/CVS --exclude mod_log_sql/Documentation/CVS --exclude mod_log_sql/Documentation/HTML/CVS --exclude ".directory" mod_log_sql/; scp mod_log_sql-$(MLMVERS).tar.bz2 $(WEBSERV):$(APACHEINSTALLED)/html/mod_log_sql/; rm -f mod_log_sql-$(MLMVERS).tar.bz2 75 @cd ..; tar jcf mod_log_sql-$(MLMVERS).tar.bz2 --exclude mod_log_sql/CVS --exclude mod_log_sql/Documentation/CVS --exclude mod_log_sql/Documentation/HTML/CVS --exclude ".directory" mod_log_sql/; scp mod_log_sql-$(MLMVERS).tar.bz2 $(WEBSERV):@APDSTDIR@/html/mod_log_sql/; rm -f mod_log_sql-$(MLMVERS).tar.bz2
89 @ssh $(WEBSERV) "ln -sf mod_log_sql-$(MLMVERS).tar.bz2 $(APACHEINSTALLED)/html/mod_log_sql/mod_log_sql.tar.bz2" 76 @ssh $(WEBSERV) "ln -sf mod_log_sql-$(MLMVERS).tar.bz2 @APDSTDIR@/html/mod_log_sql/mod_log_sql.tar.bz2"
90 77
91pre-distro: documentation 78pre-distro: documentation
92 @cd ..; tar jcf mod_log_sql-$(MLMVERS).tar.bz2 --exclude mod_log_sql/CVS --exclude mod_log_sql/Documentation/CVS --exclude mod_log_sql/Documentation/HTML/CVS --exclude ".directory" mod_log_sql/; scp mod_log_sql-$(MLMVERS).tar.bz2 $(WEBSERV):$(APACHEINSTALLED)/html/mod_log_sql/; rm -f mod_log_sql-$(MLMVERS).tar.bz2 79 @cd ..; tar jcf mod_log_sql-$(MLMVERS).tar.bz2 --exclude mod_log_sql/CVS --exclude mod_log_sql/Documentation/CVS --exclude mod_log_sql/Documentation/HTML/CVS --exclude ".directory" mod_log_sql/; scp mod_log_sql-$(MLMVERS).tar.bz2 $(WEBSERV):@APDSTDIR@/html/mod_log_sql/; rm -f mod_log_sql-$(MLMVERS).tar.bz2
93 80
94documentation: Documentation/documentation.lyx 81documentation: Documentation/documentation.lyx
95 @echo "Creating LaTeX docs..." 82 @echo "Creating LaTeX docs..."
diff --git a/config.in b/config.in
new file mode 100644
index 0000000..62d7675
--- /dev/null
+++ b/config.in
@@ -0,0 +1,23 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4/* Architecture type */
5#define __LINUX 0
6#define __NETBSD 0
7#define __OPENBSD 0
8#define __SOLARIS 0
9#define __SUNOS 0
10#define __FREEBSD 0
11#define __BSDI 0
12#define __MACOSX 0
13
14/* Autodetected bits */
15#define STDC_HEADERS 0
16#define TIME_WITH_SYS_TIME 0
17#define TM_IN_SYS_TIME 0
18#define RETSIGTYPE void
19#define HAVE_STRFTIME 0
20#define HAVE_STRSTR 0
21#define HAVE_ATOI 0
22
23#endif
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..393f13d
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1411 @@
1#! /bin/sh
2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
4# Free Software Foundation, Inc.
5
6timestamp='2001-09-07'
7
8# This file is (in principle) common to ALL GNU software.
9# The presence of a machine in this file suggests that SOME GNU software
10# can handle that machine. It does not imply ALL GNU software can.
11#
12# This file is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place - Suite 330,
25# Boston, MA 02111-1307, USA.
26
27# As a special exception to the GNU General Public License, if you
28# distribute this file as part of a program that contains a
29# configuration script generated by Autoconf, you may include it under
30# the same distribution terms that you use for the rest of that program.
31
32# Please send patches to <config-patches@gnu.org>.
33#
34# Configuration subroutine to validate and canonicalize a configuration type.
35# Supply the specified configuration type as an argument.
36# If it is invalid, we print an error message on stderr and exit with code 1.
37# Otherwise, we print the canonical config type on stdout and succeed.
38
39# This file is supposed to be the same for all GNU packages
40# and recognize all the CPU types, system types and aliases
41# that are meaningful with *any* GNU software.
42# Each package is responsible for reporting which valid configurations
43# it does not support. The user should be able to distinguish
44# a failure to support a valid configuration from a meaningless
45# configuration.
46
47# The goal of this file is to map all the various variations of a given
48# machine specification into a single specification in the form:
49# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
50# or in some cases, the newer four-part form:
51# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
52# It is wrong to echo any other type of specification.
53
54me=`echo "$0" | sed -e 's,.*/,,'`
55
56usage="\
57Usage: $0 [OPTION] CPU-MFR-OPSYS
58 $0 [OPTION] ALIAS
59
60Canonicalize a configuration name.
61
62Operation modes:
63 -h, --help print this help, then exit
64 -t, --time-stamp print date of last modification, then exit
65 -v, --version print version number, then exit
66
67Report bugs and patches to <config-patches@gnu.org>."
68
69version="\
70GNU config.sub ($timestamp)
71
72Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
73Free Software Foundation, Inc.
74
75This is free software; see the source for copying conditions. There is NO
76warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
77
78help="
79Try \`$me --help' for more information."
80
81# Parse command line
82while test $# -gt 0 ; do
83 case $1 in
84 --time-stamp | --time* | -t )
85 echo "$timestamp" ; exit 0 ;;
86 --version | -v )
87 echo "$version" ; exit 0 ;;
88 --help | --h* | -h )
89 echo "$usage"; exit 0 ;;
90 -- ) # Stop option processing
91 shift; break ;;
92 - ) # Use stdin as input.
93 break ;;
94 -* )
95 echo "$me: invalid option $1$help"
96 exit 1 ;;
97
98 *local*)
99 # First pass through any local machine types.
100 echo $1
101 exit 0;;
102
103 * )
104 break ;;
105 esac
106done
107
108case $# in
109 0) echo "$me: missing argument$help" >&2
110 exit 1;;
111 1) ;;
112 *) echo "$me: too many arguments$help" >&2
113 exit 1;;
114esac
115
116# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
117# Here we must recognize all the valid KERNEL-OS combinations.
118maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
119case $maybe_os in
120 nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
121 os=-$maybe_os
122 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
123 ;;
124 *)
125 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
126 if [ $basic_machine != $1 ]
127 then os=`echo $1 | sed 's/.*-/-/'`
128 else os=; fi
129 ;;
130esac
131
132### Let's recognize common machines as not being operating systems so
133### that things like config.sub decstation-3100 work. We also
134### recognize some manufacturers as not being operating systems, so we
135### can provide default operating systems below.
136case $os in
137 -sun*os*)
138 # Prevent following clause from handling this invalid input.
139 ;;
140 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
141 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
142 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
143 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
144 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
145 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
146 -apple | -axis)
147 os=
148 basic_machine=$1
149 ;;
150 -sim | -cisco | -oki | -wec | -winbond)
151 os=
152 basic_machine=$1
153 ;;
154 -scout)
155 ;;
156 -wrs)
157 os=-vxworks
158 basic_machine=$1
159 ;;
160 -chorusos*)
161 os=-chorusos
162 basic_machine=$1
163 ;;
164 -chorusrdb)
165 os=-chorusrdb
166 basic_machine=$1
167 ;;
168 -hiux*)
169 os=-hiuxwe2
170 ;;
171 -sco5)
172 os=-sco3.2v5
173 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
174 ;;
175 -sco4)
176 os=-sco3.2v4
177 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
178 ;;
179 -sco3.2.[4-9]*)
180 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 ;;
183 -sco3.2v[4-9]*)
184 # Don't forget version if it is 3.2v4 or newer.
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 ;;
187 -sco*)
188 os=-sco3.2v2
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -udk*)
192 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
193 ;;
194 -isc)
195 os=-isc2.2
196 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
197 ;;
198 -clix*)
199 basic_machine=clipper-intergraph
200 ;;
201 -isc*)
202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 ;;
204 -lynx*)
205 os=-lynxos
206 ;;
207 -ptx*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
209 ;;
210 -windowsnt*)
211 os=`echo $os | sed -e 's/windowsnt/winnt/'`
212 ;;
213 -psos*)
214 os=-psos
215 ;;
216 -mint | -mint[0-9]*)
217 basic_machine=m68k-atari
218 os=-mint
219 ;;
220esac
221
222# Decode aliases for certain CPU-COMPANY combinations.
223case $basic_machine in
224 # Recognize the basic CPU types without company name.
225 # Some are omitted here because they have special meanings below.
226 1750a | 580 \
227 | a29k \
228 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
229 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
230 | c4x | clipper \
231 | d10v | d30v | dsp16xx \
232 | fr30 \
233 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
234 | i370 | i860 | i960 | ia64 \
235 | m32r | m68000 | m68k | m88k | mcore \
236 | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
237 | mips64vr4100 | mips64vr4100el | mips64vr4300 \
238 | mips64vr4300el | mips64vr5000 | mips64vr5000el \
239 | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
240 | mipsisa32 \
241 | mn10200 | mn10300 \
242 | ns16k | ns32k \
243 | openrisc \
244 | pdp10 | pdp11 | pj | pjl \
245 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
246 | pyramid \
247 | s390 | s390x \
248 | sh | sh[34] | sh[34]eb | shbe | shle \
249 | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
250 | stormy16 | strongarm \
251 | tahoe | thumb | tic80 | tron \
252 | v850 \
253 | we32k \
254 | x86 | xscale \
255 | z8k)
256 basic_machine=$basic_machine-unknown
257 ;;
258 m6811 | m68hc11 | m6812 | m68hc12)
259 # Motorola 68HC11/12.
260 basic_machine=$basic_machine-unknown
261 os=-none
262 ;;
263 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
264 ;;
265
266 # We use `pc' rather than `unknown'
267 # because (1) that's what they normally are, and
268 # (2) the word "unknown" tends to confuse beginning users.
269 i*86 | x86_64)
270 basic_machine=$basic_machine-pc
271 ;;
272 # Object if more than one company name word.
273 *-*-*)
274 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
275 exit 1
276 ;;
277 # Recognize the basic CPU types with company name.
278 580-* \
279 | a29k-* \
280 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
281 | alphapca5[67]-* | arc-* \
282 | arm-* | armbe-* | armle-* | armv*-* \
283 | bs2000-* \
284 | c[123]* | c30-* | [cjt]90-* | c54x-* \
285 | clipper-* | cray2-* | cydra-* \
286 | d10v-* | d30v-* \
287 | elxsi-* \
288 | f30[01]-* | f700-* | fr30-* | fx80-* \
289 | h8300-* | h8500-* \
290 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
291 | i*86-* | i860-* | i960-* | ia64-* \
292 | m32r-* \
293 | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
294 | m88110-* | m88k-* | mcore-* \
295 | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
296 | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
297 | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
298 | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
299 | none-* | np1-* | ns16k-* | ns32k-* \
300 | orion-* \
301 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
302 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
303 | pyramid-* \
304 | romp-* | rs6000-* \
305 | s390-* | s390x-* \
306 | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
307 | sparc-* | sparc64-* | sparc86x-* | sparclite-* \
308 | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
309 | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
310 | v850-* | vax-* \
311 | we32k-* \
312 | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
313 | ymp-* \
314 | z8k-*)
315 ;;
316 # Recognize the various machine names and aliases which stand
317 # for a CPU type and a company and sometimes even an OS.
318 386bsd)
319 basic_machine=i386-unknown
320 os=-bsd
321 ;;
322 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
323 basic_machine=m68000-att
324 ;;
325 3b*)
326 basic_machine=we32k-att
327 ;;
328 a29khif)
329 basic_machine=a29k-amd
330 os=-udi
331 ;;
332 adobe68k)
333 basic_machine=m68010-adobe
334 os=-scout
335 ;;
336 alliant | fx80)
337 basic_machine=fx80-alliant
338 ;;
339 altos | altos3068)
340 basic_machine=m68k-altos
341 ;;
342 am29k)
343 basic_machine=a29k-none
344 os=-bsd
345 ;;
346 amdahl)
347 basic_machine=580-amdahl
348 os=-sysv
349 ;;
350 amiga | amiga-*)
351 basic_machine=m68k-unknown
352 ;;
353 amigaos | amigados)
354 basic_machine=m68k-unknown
355 os=-amigaos
356 ;;
357 amigaunix | amix)
358 basic_machine=m68k-unknown
359 os=-sysv4
360 ;;
361 apollo68)
362 basic_machine=m68k-apollo
363 os=-sysv
364 ;;
365 apollo68bsd)
366 basic_machine=m68k-apollo
367 os=-bsd
368 ;;
369 aux)
370 basic_machine=m68k-apple
371 os=-aux
372 ;;
373 balance)
374 basic_machine=ns32k-sequent
375 os=-dynix
376 ;;
377 convex-c1)
378 basic_machine=c1-convex
379 os=-bsd
380 ;;
381 convex-c2)
382 basic_machine=c2-convex
383 os=-bsd
384 ;;
385 convex-c32)
386 basic_machine=c32-convex
387 os=-bsd
388 ;;
389 convex-c34)
390 basic_machine=c34-convex
391 os=-bsd
392 ;;
393 convex-c38)
394 basic_machine=c38-convex
395 os=-bsd
396 ;;
397 cray | ymp)
398 basic_machine=ymp-cray
399 os=-unicos
400 ;;
401 cray2)
402 basic_machine=cray2-cray
403 os=-unicos
404 ;;
405 [cjt]90)
406 basic_machine=${basic_machine}-cray
407 os=-unicos
408 ;;
409 crds | unos)
410 basic_machine=m68k-crds
411 ;;
412 cris | cris-* | etrax*)
413 basic_machine=cris-axis
414 ;;
415 da30 | da30-*)
416 basic_machine=m68k-da30
417 ;;
418 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
419 basic_machine=mips-dec
420 ;;
421 delta | 3300 | motorola-3300 | motorola-delta \
422 | 3300-motorola | delta-motorola)
423 basic_machine=m68k-motorola
424 ;;
425 delta88)
426 basic_machine=m88k-motorola
427 os=-sysv3
428 ;;
429 dpx20 | dpx20-*)
430 basic_machine=rs6000-bull
431 os=-bosx
432 ;;
433 dpx2* | dpx2*-bull)
434 basic_machine=m68k-bull
435 os=-sysv3
436 ;;
437 ebmon29k)
438 basic_machine=a29k-amd
439 os=-ebmon
440 ;;
441 elxsi)
442 basic_machine=elxsi-elxsi
443 os=-bsd
444 ;;
445 encore | umax | mmax)
446 basic_machine=ns32k-encore
447 ;;
448 es1800 | OSE68k | ose68k | ose | OSE)
449 basic_machine=m68k-ericsson
450 os=-ose
451 ;;
452 fx2800)
453 basic_machine=i860-alliant
454 ;;
455 genix)
456 basic_machine=ns32k-ns
457 ;;
458 gmicro)
459 basic_machine=tron-gmicro
460 os=-sysv
461 ;;
462 go32)
463 basic_machine=i386-pc
464 os=-go32
465 ;;
466 h3050r* | hiux*)
467 basic_machine=hppa1.1-hitachi
468 os=-hiuxwe2
469 ;;
470 h8300hms)
471 basic_machine=h8300-hitachi
472 os=-hms
473 ;;
474 h8300xray)
475 basic_machine=h8300-hitachi
476 os=-xray
477 ;;
478 h8500hms)
479 basic_machine=h8500-hitachi
480 os=-hms
481 ;;
482 harris)
483 basic_machine=m88k-harris
484 os=-sysv3
485 ;;
486 hp300-*)
487 basic_machine=m68k-hp
488 ;;
489 hp300bsd)
490 basic_machine=m68k-hp
491 os=-bsd
492 ;;
493 hp300hpux)
494 basic_machine=m68k-hp
495 os=-hpux
496 ;;
497 hp3k9[0-9][0-9] | hp9[0-9][0-9])
498 basic_machine=hppa1.0-hp
499 ;;
500 hp9k2[0-9][0-9] | hp9k31[0-9])
501 basic_machine=m68000-hp
502 ;;
503 hp9k3[2-9][0-9])
504 basic_machine=m68k-hp
505 ;;
506 hp9k6[0-9][0-9] | hp6[0-9][0-9])
507 basic_machine=hppa1.0-hp
508 ;;
509 hp9k7[0-79][0-9] | hp7[0-79][0-9])
510 basic_machine=hppa1.1-hp
511 ;;
512 hp9k78[0-9] | hp78[0-9])
513 # FIXME: really hppa2.0-hp
514 basic_machine=hppa1.1-hp
515 ;;
516 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
517 # FIXME: really hppa2.0-hp
518 basic_machine=hppa1.1-hp
519 ;;
520 hp9k8[0-9][13679] | hp8[0-9][13679])
521 basic_machine=hppa1.1-hp
522 ;;
523 hp9k8[0-9][0-9] | hp8[0-9][0-9])
524 basic_machine=hppa1.0-hp
525 ;;
526 hppa-next)
527 os=-nextstep3
528 ;;
529 hppaosf)
530 basic_machine=hppa1.1-hp
531 os=-osf
532 ;;
533 hppro)
534 basic_machine=hppa1.1-hp
535 os=-proelf
536 ;;
537 i370-ibm* | ibm*)
538 basic_machine=i370-ibm
539 ;;
540# I'm not sure what "Sysv32" means. Should this be sysv3.2?
541 i*86v32)
542 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
543 os=-sysv32
544 ;;
545 i*86v4*)
546 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
547 os=-sysv4
548 ;;
549 i*86v)
550 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
551 os=-sysv
552 ;;
553 i*86sol2)
554 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
555 os=-solaris2
556 ;;
557 i386mach)
558 basic_machine=i386-mach
559 os=-mach
560 ;;
561 i386-vsta | vsta)
562 basic_machine=i386-unknown
563 os=-vsta
564 ;;
565 iris | iris4d)
566 basic_machine=mips-sgi
567 case $os in
568 -irix*)
569 ;;
570 *)
571 os=-irix4
572 ;;
573 esac
574 ;;
575 isi68 | isi)
576 basic_machine=m68k-isi
577 os=-sysv
578 ;;
579 m88k-omron*)
580 basic_machine=m88k-omron
581 ;;
582 magnum | m3230)
583 basic_machine=mips-mips
584 os=-sysv
585 ;;
586 merlin)
587 basic_machine=ns32k-utek
588 os=-sysv
589 ;;
590 mingw32)
591 basic_machine=i386-pc
592 os=-mingw32
593 ;;
594 miniframe)
595 basic_machine=m68000-convergent
596 ;;
597 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
598 basic_machine=m68k-atari
599 os=-mint
600 ;;
601 mipsel*-linux*)
602 basic_machine=mipsel-unknown
603 os=-linux-gnu
604 ;;
605 mips*-linux*)
606 basic_machine=mips-unknown
607 os=-linux-gnu
608 ;;
609 mips3*-*)
610 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
611 ;;
612 mips3*)
613 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
614 ;;
615 mmix*)
616 basic_machine=mmix-knuth
617 os=-mmixware
618 ;;
619 monitor)
620 basic_machine=m68k-rom68k
621 os=-coff
622 ;;
623 msdos)
624 basic_machine=i386-pc
625 os=-msdos
626 ;;
627 mvs)
628 basic_machine=i370-ibm
629 os=-mvs
630 ;;
631 ncr3000)
632 basic_machine=i486-ncr
633 os=-sysv4
634 ;;
635 netbsd386)
636 basic_machine=i386-unknown
637 os=-netbsd
638 ;;
639 netwinder)
640 basic_machine=armv4l-rebel
641 os=-linux
642 ;;
643 news | news700 | news800 | news900)
644 basic_machine=m68k-sony
645 os=-newsos
646 ;;
647 news1000)
648 basic_machine=m68030-sony
649 os=-newsos
650 ;;
651 news-3600 | risc-news)
652 basic_machine=mips-sony
653 os=-newsos
654 ;;
655 necv70)
656 basic_machine=v70-nec
657 os=-sysv
658 ;;
659 next | m*-next )
660 basic_machine=m68k-next
661 case $os in
662 -nextstep* )
663 ;;
664 -ns2*)
665 os=-nextstep2
666 ;;
667 *)
668 os=-nextstep3
669 ;;
670 esac
671 ;;
672 nh3000)
673 basic_machine=m68k-harris
674 os=-cxux
675 ;;
676 nh[45]000)
677 basic_machine=m88k-harris
678 os=-cxux
679 ;;
680 nindy960)
681 basic_machine=i960-intel
682 os=-nindy
683 ;;
684 mon960)
685 basic_machine=i960-intel
686 os=-mon960
687 ;;
688 nonstopux)
689 basic_machine=mips-compaq
690 os=-nonstopux
691 ;;
692 np1)
693 basic_machine=np1-gould
694 ;;
695 nsr-tandem)
696 basic_machine=nsr-tandem
697 ;;
698 op50n-* | op60c-*)
699 basic_machine=hppa1.1-oki
700 os=-proelf
701 ;;
702 OSE68000 | ose68000)
703 basic_machine=m68000-ericsson
704 os=-ose
705 ;;
706 os68k)
707 basic_machine=m68k-none
708 os=-os68k
709 ;;
710 pa-hitachi)
711 basic_machine=hppa1.1-hitachi
712 os=-hiuxwe2
713 ;;
714 paragon)
715 basic_machine=i860-intel
716 os=-osf
717 ;;
718 pbd)
719 basic_machine=sparc-tti
720 ;;
721 pbb)
722 basic_machine=m68k-tti
723 ;;
724 pc532 | pc532-*)
725 basic_machine=ns32k-pc532
726 ;;
727 pentium | p5 | k5 | k6 | nexgen)
728 basic_machine=i586-pc
729 ;;
730 pentiumpro | p6 | 6x86 | athlon)
731 basic_machine=i686-pc
732 ;;
733 pentiumii | pentium2)
734 basic_machine=i686-pc
735 ;;
736 pentium-* | p5-* | k5-* | k6-* | nexgen-*)
737 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
738 ;;
739 pentiumpro-* | p6-* | 6x86-* | athlon-*)
740 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
741 ;;
742 pentiumii-* | pentium2-*)
743 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
744 ;;
745 pn)
746 basic_machine=pn-gould
747 ;;
748 power) basic_machine=power-ibm
749 ;;
750 ppc) basic_machine=powerpc-unknown
751 ;;
752 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
753 ;;
754 ppcle | powerpclittle | ppc-le | powerpc-little)
755 basic_machine=powerpcle-unknown
756 ;;
757 ppcle-* | powerpclittle-*)
758 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
759 ;;
760 ppc64) basic_machine=powerpc64-unknown
761 ;;
762 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
763 ;;
764 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
765 basic_machine=powerpc64le-unknown
766 ;;
767 ppc64le-* | powerpc64little-*)
768 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
769 ;;
770 ps2)
771 basic_machine=i386-ibm
772 ;;
773 pw32)
774 basic_machine=i586-unknown
775 os=-pw32
776 ;;
777 rom68k)
778 basic_machine=m68k-rom68k
779 os=-coff
780 ;;
781 rm[46]00)
782 basic_machine=mips-siemens
783 ;;
784 rtpc | rtpc-*)
785 basic_machine=romp-ibm
786 ;;
787 sa29200)
788 basic_machine=a29k-amd
789 os=-udi
790 ;;
791 sequent)
792 basic_machine=i386-sequent
793 ;;
794 sh)
795 basic_machine=sh-hitachi
796 os=-hms
797 ;;
798 sparclite-wrs)
799 basic_machine=sparclite-wrs
800 os=-vxworks
801 ;;
802 sps7)
803 basic_machine=m68k-bull
804 os=-sysv2
805 ;;
806 spur)
807 basic_machine=spur-unknown
808 ;;
809 st2000)
810 basic_machine=m68k-tandem
811 ;;
812 stratus)
813 basic_machine=i860-stratus
814 os=-sysv4
815 ;;
816 sun2)
817 basic_machine=m68000-sun
818 ;;
819 sun2os3)
820 basic_machine=m68000-sun
821 os=-sunos3
822 ;;
823 sun2os4)
824 basic_machine=m68000-sun
825 os=-sunos4
826 ;;
827 sun3os3)
828 basic_machine=m68k-sun
829 os=-sunos3
830 ;;
831 sun3os4)
832 basic_machine=m68k-sun
833 os=-sunos4
834 ;;
835 sun4os3)
836 basic_machine=sparc-sun
837 os=-sunos3
838 ;;
839 sun4os4)
840 basic_machine=sparc-sun
841 os=-sunos4
842 ;;
843 sun4sol2)
844 basic_machine=sparc-sun
845 os=-solaris2
846 ;;
847 sun3 | sun3-*)
848 basic_machine=m68k-sun
849 ;;
850 sun4)
851 basic_machine=sparc-sun
852 ;;
853 sun386 | sun386i | roadrunner)
854 basic_machine=i386-sun
855 ;;
856 sv1)
857 basic_machine=sv1-cray
858 os=-unicos
859 ;;
860 symmetry)
861 basic_machine=i386-sequent
862 os=-dynix
863 ;;
864 t3e)
865 basic_machine=t3e-cray
866 os=-unicos
867 ;;
868 tic54x | c54x*)
869 basic_machine=tic54x-unknown
870 os=-coff
871 ;;
872 tx39)
873 basic_machine=mipstx39-unknown
874 ;;
875 tx39el)
876 basic_machine=mipstx39el-unknown
877 ;;
878 tower | tower-32)
879 basic_machine=m68k-ncr
880 ;;
881 udi29k)
882 basic_machine=a29k-amd
883 os=-udi
884 ;;
885 ultra3)
886 basic_machine=a29k-nyu
887 os=-sym1
888 ;;
889 v810 | necv810)
890 basic_machine=v810-nec
891 os=-none
892 ;;
893 vaxv)
894 basic_machine=vax-dec
895 os=-sysv
896 ;;
897 vms)
898 basic_machine=vax-dec
899 os=-vms
900 ;;
901 vpp*|vx|vx-*)
902 basic_machine=f301-fujitsu
903 ;;
904 vxworks960)
905 basic_machine=i960-wrs
906 os=-vxworks
907 ;;
908 vxworks68)
909 basic_machine=m68k-wrs
910 os=-vxworks
911 ;;
912 vxworks29k)
913 basic_machine=a29k-wrs
914 os=-vxworks
915 ;;
916 w65*)
917 basic_machine=w65-wdc
918 os=-none
919 ;;
920 w89k-*)
921 basic_machine=hppa1.1-winbond
922 os=-proelf
923 ;;
924 windows32)
925 basic_machine=i386-pc
926 os=-windows32-msvcrt
927 ;;
928 xmp)
929 basic_machine=xmp-cray
930 os=-unicos
931 ;;
932 xps | xps100)
933 basic_machine=xps100-honeywell
934 ;;
935 z8k-*-coff)
936 basic_machine=z8k-unknown
937 os=-sim
938 ;;
939 none)
940 basic_machine=none-none
941 os=-none
942 ;;
943
944# Here we handle the default manufacturer of certain CPU types. It is in
945# some cases the only manufacturer, in others, it is the most popular.
946 w89k)
947 basic_machine=hppa1.1-winbond
948 ;;
949 op50n)
950 basic_machine=hppa1.1-oki
951 ;;
952 op60c)
953 basic_machine=hppa1.1-oki
954 ;;
955 mips)
956 if [ x$os = x-linux-gnu ]; then
957 basic_machine=mips-unknown
958 else
959 basic_machine=mips-mips
960 fi
961 ;;
962 romp)
963 basic_machine=romp-ibm
964 ;;
965 rs6000)
966 basic_machine=rs6000-ibm
967 ;;
968 vax)
969 basic_machine=vax-dec
970 ;;
971 pdp10)
972 # there are many clones, so DEC is not a safe bet
973 basic_machine=pdp10-unknown
974 ;;
975 pdp11)
976 basic_machine=pdp11-dec
977 ;;
978 we32k)
979 basic_machine=we32k-att
980 ;;
981 sh3 | sh4 | sh3eb | sh4eb)
982 basic_machine=sh-unknown
983 ;;
984 sparc | sparcv9 | sparcv9b)
985 basic_machine=sparc-sun
986 ;;
987 cydra)
988 basic_machine=cydra-cydrome
989 ;;
990 orion)
991 basic_machine=orion-highlevel
992 ;;
993 orion105)
994 basic_machine=clipper-highlevel
995 ;;
996 mac | mpw | mac-mpw)
997 basic_machine=m68k-apple
998 ;;
999 pmac | pmac-mpw)
1000 basic_machine=powerpc-apple
1001 ;;
1002 c4x*)
1003 basic_machine=c4x-none
1004 os=-coff
1005 ;;
1006 *-unknown)
1007 # Make sure to match an already-canonicalized machine name.
1008 ;;
1009 *)
1010 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1011 exit 1
1012 ;;
1013esac
1014
1015# Here we canonicalize certain aliases for manufacturers.
1016case $basic_machine in
1017 *-digital*)
1018 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1019 ;;
1020 *-commodore*)
1021 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1022 ;;
1023 *)
1024 ;;
1025esac
1026
1027# Decode manufacturer-specific aliases for certain operating systems.
1028
1029if [ x"$os" != x"" ]
1030then
1031case $os in
1032 # First match some system type aliases
1033 # that might get confused with valid system types.
1034 # -solaris* is a basic system type, with this one exception.
1035 -solaris1 | -solaris1.*)
1036 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1037 ;;
1038 -solaris)
1039 os=-solaris2
1040 ;;
1041 -svr4*)
1042 os=-sysv4
1043 ;;
1044 -unixware*)
1045 os=-sysv4.2uw
1046 ;;
1047 -gnu/linux*)
1048 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1049 ;;
1050 # First accept the basic system types.
1051 # The portable systems comes first.
1052 # Each alternative MUST END IN A *, to match a version number.
1053 # -sysv* is not here because it comes later, after sysvr4.
1054 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1055 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1056 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1057 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1058 | -aos* \
1059 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1060 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1061 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
1062 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1063 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1064 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1065 | -chorusos* | -chorusrdb* \
1066 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1067 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
1068 | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
1069 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1070 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1071 | -os2* | -vos*)
1072 # Remember, each alternative MUST END IN *, to match a version number.
1073 ;;
1074 -qnx*)
1075 case $basic_machine in
1076 x86-* | i*86-*)
1077 ;;
1078 *)
1079 os=-nto$os
1080 ;;
1081 esac
1082 ;;
1083 -nto*)
1084 os=-nto-qnx
1085 ;;
1086 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1087 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1088 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1089 ;;
1090 -mac*)
1091 os=`echo $os | sed -e 's|mac|macos|'`
1092 ;;
1093 -linux*)
1094 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1095 ;;
1096 -sunos5*)
1097 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1098 ;;
1099 -sunos6*)
1100 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1101 ;;
1102 -opened*)
1103 os=-openedition
1104 ;;
1105 -wince*)
1106 os=-wince
1107 ;;
1108 -osfrose*)
1109 os=-osfrose
1110 ;;
1111 -osf*)
1112 os=-osf
1113 ;;
1114 -utek*)
1115 os=-bsd
1116 ;;
1117 -dynix*)
1118 os=-bsd
1119 ;;
1120 -acis*)
1121 os=-aos
1122 ;;
1123 -386bsd)
1124 os=-bsd
1125 ;;
1126 -ctix* | -uts*)
1127 os=-sysv
1128 ;;
1129 -ns2 )
1130 os=-nextstep2
1131 ;;
1132 -nsk*)
1133 os=-nsk
1134 ;;
1135 # Preserve the version number of sinix5.
1136 -sinix5.*)
1137 os=`echo $os | sed -e 's|sinix|sysv|'`
1138 ;;
1139 -sinix*)
1140 os=-sysv4
1141 ;;
1142 -triton*)
1143 os=-sysv3
1144 ;;
1145 -oss*)
1146 os=-sysv3
1147 ;;
1148 -svr4)
1149 os=-sysv4
1150 ;;
1151 -svr3)
1152 os=-sysv3
1153 ;;
1154 -sysvr4)
1155 os=-sysv4
1156 ;;
1157 # This must come after -sysvr4.
1158 -sysv*)
1159 ;;
1160 -ose*)
1161 os=-ose
1162 ;;
1163 -es1800*)
1164 os=-ose
1165 ;;
1166 -xenix)
1167 os=-xenix
1168 ;;
1169 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1170 os=-mint
1171 ;;
1172 -none)
1173 ;;
1174 *)
1175 # Get rid of the `-' at the beginning of $os.
1176 os=`echo $os | sed 's/[^-]*-//'`
1177 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1178 exit 1
1179 ;;
1180esac
1181else
1182
1183# Here we handle the default operating systems that come with various machines.
1184# The value should be what the vendor currently ships out the door with their
1185# machine or put another way, the most popular os provided with the machine.
1186
1187# Note that if you're going to try to match "-MANUFACTURER" here (say,
1188# "-sun"), then you have to tell the case statement up towards the top
1189# that MANUFACTURER isn't an operating system. Otherwise, code above
1190# will signal an error saying that MANUFACTURER isn't an operating
1191# system, and we'll never get to this point.
1192
1193case $basic_machine in
1194 *-acorn)
1195 os=-riscix1.2
1196 ;;
1197 arm*-rebel)
1198 os=-linux
1199 ;;
1200 arm*-semi)
1201 os=-aout
1202 ;;
1203 pdp10-*)
1204 os=-tops20
1205 ;;
1206 pdp11-*)
1207 os=-none
1208 ;;
1209 *-dec | vax-*)
1210 os=-ultrix4.2
1211 ;;
1212 m68*-apollo)
1213 os=-domain
1214 ;;
1215 i386-sun)
1216 os=-sunos4.0.2
1217 ;;
1218 m68000-sun)
1219 os=-sunos3
1220 # This also exists in the configure program, but was not the
1221 # default.
1222 # os=-sunos4
1223 ;;
1224 m68*-cisco)
1225 os=-aout
1226 ;;
1227 mips*-cisco)
1228 os=-elf
1229 ;;
1230 mips*-*)
1231 os=-elf
1232 ;;
1233 *-tti) # must be before sparc entry or we get the wrong os.
1234 os=-sysv3
1235 ;;
1236 sparc-* | *-sun)
1237 os=-sunos4.1.1
1238 ;;
1239 *-be)
1240 os=-beos
1241 ;;
1242 *-ibm)
1243 os=-aix
1244 ;;
1245 *-wec)
1246 os=-proelf
1247 ;;
1248 *-winbond)
1249 os=-proelf
1250 ;;
1251 *-oki)
1252 os=-proelf
1253 ;;
1254 *-hp)
1255 os=-hpux
1256 ;;
1257 *-hitachi)
1258 os=-hiux
1259 ;;
1260 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1261 os=-sysv
1262 ;;
1263 *-cbm)
1264 os=-amigaos
1265 ;;
1266 *-dg)
1267 os=-dgux
1268 ;;
1269 *-dolphin)
1270 os=-sysv3
1271 ;;
1272 m68k-ccur)
1273 os=-rtu
1274 ;;
1275 m88k-omron*)
1276 os=-luna
1277 ;;
1278 *-next )
1279 os=-nextstep
1280 ;;
1281 *-sequent)
1282 os=-ptx
1283 ;;
1284 *-crds)
1285 os=-unos
1286 ;;
1287 *-ns)
1288 os=-genix
1289 ;;
1290 i370-*)
1291 os=-mvs
1292 ;;
1293 *-next)
1294 os=-nextstep3
1295 ;;
1296 *-gould)
1297 os=-sysv
1298 ;;
1299 *-highlevel)
1300 os=-bsd
1301 ;;
1302 *-encore)
1303 os=-bsd
1304 ;;
1305 *-sgi)
1306 os=-irix
1307 ;;
1308 *-siemens)
1309 os=-sysv4
1310 ;;
1311 *-masscomp)
1312 os=-rtu
1313 ;;
1314 f30[01]-fujitsu | f700-fujitsu)
1315 os=-uxpv
1316 ;;
1317 *-rom68k)
1318 os=-coff
1319 ;;
1320 *-*bug)
1321 os=-coff
1322 ;;
1323 *-apple)
1324 os=-macos
1325 ;;
1326 *-atari*)
1327 os=-mint
1328 ;;
1329 *)
1330 os=-none
1331 ;;
1332esac
1333fi
1334
1335# Here we handle the case where we know the os, and the CPU type, but not the
1336# manufacturer. We pick the logical manufacturer.
1337vendor=unknown
1338case $basic_machine in
1339 *-unknown)
1340 case $os in
1341 -riscix*)
1342 vendor=acorn
1343 ;;
1344 -sunos*)
1345 vendor=sun
1346 ;;
1347 -aix*)
1348 vendor=ibm
1349 ;;
1350 -beos*)
1351 vendor=be
1352 ;;
1353 -hpux*)
1354 vendor=hp
1355 ;;
1356 -mpeix*)
1357 vendor=hp
1358 ;;
1359 -hiux*)
1360 vendor=hitachi
1361 ;;
1362 -unos*)
1363 vendor=crds
1364 ;;
1365 -dgux*)
1366 vendor=dg
1367 ;;
1368 -luna*)
1369 vendor=omron
1370 ;;
1371 -genix*)
1372 vendor=ns
1373 ;;
1374 -mvs* | -opened*)
1375 vendor=ibm
1376 ;;
1377 -ptx*)
1378 vendor=sequent
1379 ;;
1380 -vxsim* | -vxworks*)
1381 vendor=wrs
1382 ;;
1383 -aux*)
1384 vendor=apple
1385 ;;
1386 -hms*)
1387 vendor=hitachi
1388 ;;
1389 -mpw* | -macos*)
1390 vendor=apple
1391 ;;
1392 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1393 vendor=atari
1394 ;;
1395 -vos*)
1396 vendor=stratus
1397 ;;
1398 esac
1399 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1400 ;;
1401esac
1402
1403echo $basic_machine$os
1404exit 0
1405
1406# Local variables:
1407# eval: (add-hook 'write-file-hooks 'time-stamp)
1408# time-stamp-start: "timestamp='"
1409# time-stamp-format: "%:y-%02m-%02d"
1410# time-stamp-end: "'"
1411# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..a1c4bba
--- /dev/null
+++ b/configure
@@ -0,0 +1,2548 @@
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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-apache=DIR Where to look for Apache's installation"
16ac_help="$ac_help
17 --with-apache-source=DIR Where to look for Apache sources [${APSRCDIR}]"
18ac_help="$ac_help
19 --with-apache-headers=DIR Where to look for Apache's header files"
20ac_help="$ac_help
21 --with-apxs=DIR Where to look for apxs"
22ac_help="$ac_help
23 --with-mysql-headers=DIR Where to look for MySQL headers"
24ac_help="$ac_help
25 --with-mysql-libs=DIR Where to look for MySQL libraries"
26ac_help="$ac_help
27 --disable-ssl Do not attempt to compile in SSL support"
28
29# Initialize some variables set by options.
30# The variables have the same names as the options, with
31# dashes changed to underlines.
32build=NONE
33cache_file=./config.cache
34exec_prefix=NONE
35host=NONE
36no_create=
37nonopt=NONE
38no_recursion=
39prefix=NONE
40program_prefix=NONE
41program_suffix=NONE
42program_transform_name=s,x,x,
43silent=
44site=
45srcdir=
46target=NONE
47verbose=
48x_includes=NONE
49x_libraries=NONE
50bindir='${exec_prefix}/bin'
51sbindir='${exec_prefix}/sbin'
52libexecdir='${exec_prefix}/libexec'
53datadir='${prefix}/share'
54sysconfdir='${prefix}/etc'
55sharedstatedir='${prefix}/com'
56localstatedir='${prefix}/var'
57libdir='${exec_prefix}/lib'
58includedir='${prefix}/include'
59oldincludedir='/usr/include'
60infodir='${prefix}/info'
61mandir='${prefix}/man'
62
63# Initialize some other variables.
64subdirs=
65MFLAGS= MAKEFLAGS=
66SHELL=${CONFIG_SHELL-/bin/sh}
67# Maximum number of lines to put in a shell here document.
68ac_max_here_lines=12
69
70ac_prev=
71for ac_option
72do
73
74 # If the previous option needs an argument, assign it.
75 if test -n "$ac_prev"; then
76 eval "$ac_prev=\$ac_option"
77 ac_prev=
78 continue
79 fi
80
81 case "$ac_option" in
82 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
83 *) ac_optarg= ;;
84 esac
85
86 # Accept the important Cygnus configure options, so we can diagnose typos.
87
88 case "$ac_option" in
89
90 -bindir | --bindir | --bindi | --bind | --bin | --bi)
91 ac_prev=bindir ;;
92 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
93 bindir="$ac_optarg" ;;
94
95 -build | --build | --buil | --bui | --bu)
96 ac_prev=build ;;
97 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
98 build="$ac_optarg" ;;
99
100 -cache-file | --cache-file | --cache-fil | --cache-fi \
101 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
102 ac_prev=cache_file ;;
103 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
104 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
105 cache_file="$ac_optarg" ;;
106
107 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
108 ac_prev=datadir ;;
109 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
110 | --da=*)
111 datadir="$ac_optarg" ;;
112
113 -disable-* | --disable-*)
114 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
115 # Reject names that are not valid shell variable names.
116 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
117 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118 fi
119 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120 eval "enable_${ac_feature}=no" ;;
121
122 -enable-* | --enable-*)
123 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
124 # Reject names that are not valid shell variable names.
125 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
126 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
127 fi
128 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
129 case "$ac_option" in
130 *=*) ;;
131 *) ac_optarg=yes ;;
132 esac
133 eval "enable_${ac_feature}='$ac_optarg'" ;;
134
135 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
136 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
137 | --exec | --exe | --ex)
138 ac_prev=exec_prefix ;;
139 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
140 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
141 | --exec=* | --exe=* | --ex=*)
142 exec_prefix="$ac_optarg" ;;
143
144 -gas | --gas | --ga | --g)
145 # Obsolete; use --with-gas.
146 with_gas=yes ;;
147
148 -help | --help | --hel | --he)
149 # Omit some internal or obsolete options to make the list less imposing.
150 # This message is too long to be a string in the A/UX 3.1 sh.
151 cat << EOF
152Usage: configure [options] [host]
153Options: [defaults in brackets after descriptions]
154Configuration:
155 --cache-file=FILE cache test results in FILE
156 --help print this message
157 --no-create do not create output files
158 --quiet, --silent do not print \`checking...' messages
159 --version print the version of autoconf that created configure
160Directory and file names:
161 --prefix=PREFIX install architecture-independent files in PREFIX
162 [$ac_default_prefix]
163 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
164 [same as prefix]
165 --bindir=DIR user executables in DIR [EPREFIX/bin]
166 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
167 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
168 --datadir=DIR read-only architecture-independent data in DIR
169 [PREFIX/share]
170 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
171 --sharedstatedir=DIR modifiable architecture-independent data in DIR
172 [PREFIX/com]
173 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
174 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
175 --includedir=DIR C header files in DIR [PREFIX/include]
176 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
177 --infodir=DIR info documentation in DIR [PREFIX/info]
178 --mandir=DIR man documentation in DIR [PREFIX/man]
179 --srcdir=DIR find the sources in DIR [configure dir or ..]
180 --program-prefix=PREFIX prepend PREFIX to installed program names
181 --program-suffix=SUFFIX append SUFFIX to installed program names
182 --program-transform-name=PROGRAM
183 run sed PROGRAM on installed program names
184EOF
185 cat << EOF
186Host type:
187 --build=BUILD configure for building on BUILD [BUILD=HOST]
188 --host=HOST configure for HOST [guessed]
189 --target=TARGET configure for TARGET [TARGET=HOST]
190Features and packages:
191 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
192 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
193 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
194 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
195 --x-includes=DIR X include files are in DIR
196 --x-libraries=DIR X library files are in DIR
197EOF
198 if test -n "$ac_help"; then
199 echo "--enable and --with options recognized:$ac_help"
200 fi
201 exit 0 ;;
202
203 -host | --host | --hos | --ho)
204 ac_prev=host ;;
205 -host=* | --host=* | --hos=* | --ho=*)
206 host="$ac_optarg" ;;
207
208 -includedir | --includedir | --includedi | --included | --include \
209 | --includ | --inclu | --incl | --inc)
210 ac_prev=includedir ;;
211 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
212 | --includ=* | --inclu=* | --incl=* | --inc=*)
213 includedir="$ac_optarg" ;;
214
215 -infodir | --infodir | --infodi | --infod | --info | --inf)
216 ac_prev=infodir ;;
217 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
218 infodir="$ac_optarg" ;;
219
220 -libdir | --libdir | --libdi | --libd)
221 ac_prev=libdir ;;
222 -libdir=* | --libdir=* | --libdi=* | --libd=*)
223 libdir="$ac_optarg" ;;
224
225 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
226 | --libexe | --libex | --libe)
227 ac_prev=libexecdir ;;
228 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
229 | --libexe=* | --libex=* | --libe=*)
230 libexecdir="$ac_optarg" ;;
231
232 -localstatedir | --localstatedir | --localstatedi | --localstated \
233 | --localstate | --localstat | --localsta | --localst \
234 | --locals | --local | --loca | --loc | --lo)
235 ac_prev=localstatedir ;;
236 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
237 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
238 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
239 localstatedir="$ac_optarg" ;;
240
241 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
242 ac_prev=mandir ;;
243 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
244 mandir="$ac_optarg" ;;
245
246 -nfp | --nfp | --nf)
247 # Obsolete; use --without-fp.
248 with_fp=no ;;
249
250 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
251 | --no-cr | --no-c)
252 no_create=yes ;;
253
254 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
255 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
256 no_recursion=yes ;;
257
258 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
259 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
260 | --oldin | --oldi | --old | --ol | --o)
261 ac_prev=oldincludedir ;;
262 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
263 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
264 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
265 oldincludedir="$ac_optarg" ;;
266
267 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
268 ac_prev=prefix ;;
269 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
270 prefix="$ac_optarg" ;;
271
272 -program-prefix | --program-prefix | --program-prefi | --program-pref \
273 | --program-pre | --program-pr | --program-p)
274 ac_prev=program_prefix ;;
275 -program-prefix=* | --program-prefix=* | --program-prefi=* \
276 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
277 program_prefix="$ac_optarg" ;;
278
279 -program-suffix | --program-suffix | --program-suffi | --program-suff \
280 | --program-suf | --program-su | --program-s)
281 ac_prev=program_suffix ;;
282 -program-suffix=* | --program-suffix=* | --program-suffi=* \
283 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
284 program_suffix="$ac_optarg" ;;
285
286 -program-transform-name | --program-transform-name \
287 | --program-transform-nam | --program-transform-na \
288 | --program-transform-n | --program-transform- \
289 | --program-transform | --program-transfor \
290 | --program-transfo | --program-transf \
291 | --program-trans | --program-tran \
292 | --progr-tra | --program-tr | --program-t)
293 ac_prev=program_transform_name ;;
294 -program-transform-name=* | --program-transform-name=* \
295 | --program-transform-nam=* | --program-transform-na=* \
296 | --program-transform-n=* | --program-transform-=* \
297 | --program-transform=* | --program-transfor=* \
298 | --program-transfo=* | --program-transf=* \
299 | --program-trans=* | --program-tran=* \
300 | --progr-tra=* | --program-tr=* | --program-t=*)
301 program_transform_name="$ac_optarg" ;;
302
303 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
304 | -silent | --silent | --silen | --sile | --sil)
305 silent=yes ;;
306
307 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
308 ac_prev=sbindir ;;
309 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
310 | --sbi=* | --sb=*)
311 sbindir="$ac_optarg" ;;
312
313 -sharedstatedir | --sharedstatedir | --sharedstatedi \
314 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
315 | --sharedst | --shareds | --shared | --share | --shar \
316 | --sha | --sh)
317 ac_prev=sharedstatedir ;;
318 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
319 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
320 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
321 | --sha=* | --sh=*)
322 sharedstatedir="$ac_optarg" ;;
323
324 -site | --site | --sit)
325 ac_prev=site ;;
326 -site=* | --site=* | --sit=*)
327 site="$ac_optarg" ;;
328
329 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
330 ac_prev=srcdir ;;
331 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
332 srcdir="$ac_optarg" ;;
333
334 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
335 | --syscon | --sysco | --sysc | --sys | --sy)
336 ac_prev=sysconfdir ;;
337 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
338 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
339 sysconfdir="$ac_optarg" ;;
340
341 -target | --target | --targe | --targ | --tar | --ta | --t)
342 ac_prev=target ;;
343 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
344 target="$ac_optarg" ;;
345
346 -v | -verbose | --verbose | --verbos | --verbo | --verb)
347 verbose=yes ;;
348
349 -version | --version | --versio | --versi | --vers)
350 echo "configure generated by autoconf version 2.13"
351 exit 0 ;;
352
353 -with-* | --with-*)
354 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
355 # Reject names that are not valid shell variable names.
356 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
357 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358 fi
359 ac_package=`echo $ac_package| sed 's/-/_/g'`
360 case "$ac_option" in
361 *=*) ;;
362 *) ac_optarg=yes ;;
363 esac
364 eval "with_${ac_package}='$ac_optarg'" ;;
365
366 -without-* | --without-*)
367 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
368 # Reject names that are not valid shell variable names.
369 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
370 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
371 fi
372 ac_package=`echo $ac_package| sed 's/-/_/g'`
373 eval "with_${ac_package}=no" ;;
374
375 --x)
376 # Obsolete; use --with-x.
377 with_x=yes ;;
378
379 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
380 | --x-incl | --x-inc | --x-in | --x-i)
381 ac_prev=x_includes ;;
382 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
383 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
384 x_includes="$ac_optarg" ;;
385
386 -x-libraries | --x-libraries | --x-librarie | --x-librari \
387 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
388 ac_prev=x_libraries ;;
389 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
390 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
391 x_libraries="$ac_optarg" ;;
392
393 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
394 ;;
395
396 *)
397 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
398 echo "configure: warning: $ac_option: invalid host type" 1>&2
399 fi
400 if test "x$nonopt" != xNONE; then
401 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
402 fi
403 nonopt="$ac_option"
404 ;;
405
406 esac
407done
408
409if test -n "$ac_prev"; then
410 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
411fi
412
413trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
414
415# File descriptor usage:
416# 0 standard input
417# 1 file creation
418# 2 errors and warnings
419# 3 some systems may open it to /dev/tty
420# 4 used on the Kubota Titan
421# 6 checking for... messages and results
422# 5 compiler messages saved in config.log
423if test "$silent" = yes; then
424 exec 6>/dev/null
425else
426 exec 6>&1
427fi
428exec 5>./config.log
429
430echo "\
431This file contains any messages produced by compilers while
432running configure, to aid debugging if configure makes a mistake.
433" 1>&5
434
435# Strip out --no-create and --no-recursion so they do not pile up.
436# Also quote any args containing shell metacharacters.
437ac_configure_args=
438for ac_arg
439do
440 case "$ac_arg" in
441 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
442 | --no-cr | --no-c) ;;
443 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
444 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
445 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
446 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
447 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
448 esac
449done
450
451# NLS nuisances.
452# Only set these to C if already set. These must not be set unconditionally
453# because not all systems understand e.g. LANG=C (notably SCO).
454# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
455# Non-C LC_CTYPE values break the ctype check.
456if test "${LANG+set}" = set; then LANG=C; export LANG; fi
457if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
458if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
459if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
460
461# confdefs.h avoids OS command line length limits that DEFS can exceed.
462rm -rf conftest* confdefs.h
463# AIX cpp loses on an empty file, so make sure it contains at least a newline.
464echo > confdefs.h
465
466# A filename unique to this package, relative to the directory that
467# configure is in, which we can look for to find out if srcdir is correct.
468ac_unique_file=mod_log_sql.c
469
470# Find the source files, if location was not specified.
471if test -z "$srcdir"; then
472 ac_srcdir_defaulted=yes
473 # Try the directory containing this script, then its parent.
474 ac_prog=$0
475 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
476 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
477 srcdir=$ac_confdir
478 if test ! -r $srcdir/$ac_unique_file; then
479 srcdir=..
480 fi
481else
482 ac_srcdir_defaulted=no
483fi
484if test ! -r $srcdir/$ac_unique_file; then
485 if test "$ac_srcdir_defaulted" = yes; then
486 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
487 else
488 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
489 fi
490fi
491srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
492
493# Prefer explicitly selected file to automatically selected ones.
494if test -z "$CONFIG_SITE"; then
495 if test "x$prefix" != xNONE; then
496 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
497 else
498 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
499 fi
500fi
501for ac_site_file in $CONFIG_SITE; do
502 if test -r "$ac_site_file"; then
503 echo "loading site script $ac_site_file"
504 . "$ac_site_file"
505 fi
506done
507
508if test -r "$cache_file"; then
509 echo "loading cache $cache_file"
510 . $cache_file
511else
512 echo "creating cache $cache_file"
513 > $cache_file
514fi
515
516ac_ext=c
517# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
518ac_cpp='$CPP $CPPFLAGS'
519ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
520ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
521cross_compiling=$ac_cv_prog_cc_cross
522
523ac_exeext=
524ac_objext=o
525if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
526 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
527 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
528 ac_n= ac_c='
529' ac_t=' '
530 else
531 ac_n=-n ac_c= ac_t=
532 fi
533else
534 ac_n= ac_c='\c' ac_t=
535fi
536
537
538
539
540
541APDSTDIR="/usr/local/apache"
542APSRCDIR="/usr/local/src/apache-1.3.27"
543MYSQLHDRDIR="/usr/include/mysql"
544MYSQLLIBDIR="/usr/lib"
545
546# Check whether --with-apache or --without-apache was given.
547if test "${with_apache+set}" = set; then
548 withval="$with_apache"
549 APDSTDIR=${withval}
550fi
551
552
553APXSDIR="$APDSTDIR/bin"
554APHDRDIR="$APDSTDIR/include"
555
556# Check whether --with-apache-source or --without-apache-source was given.
557if test "${with_apache_source+set}" = set; then
558 withval="$with_apache_source"
559 APSRCDIR=${withval}
560fi
561
562
563# Check whether --with-apache-headers or --without-apache-headers was given.
564if test "${with_apache_headers+set}" = set; then
565 withval="$with_apache_headers"
566 APHDRDIR=${withval}
567fi
568
569
570# Check whether --with-apxs or --without-apxs was given.
571if test "${with_apxs+set}" = set; then
572 withval="$with_apxs"
573 APXSDIR=${withval}
574fi
575
576
577# Check whether --with-mysql-headers or --without-mysql-headers was given.
578if test "${with_mysql_headers+set}" = set; then
579 withval="$with_mysql_headers"
580 MYSQLHDRDIR=${withval}
581fi
582
583
584# Check whether --with-mysql-libs or --without-mysql-libs was given.
585if test "${with_mysql_libs+set}" = set; then
586 withval="$with_mysql_libs"
587 MYSQLLIBDIR=${withval}
588fi
589
590
591# Check whether --enable-ssl or --disable-ssl was given.
592if test "${enable_ssl+set}" = set; then
593 enableval="$enable_ssl"
594 WITHSSL=0
595else
596 WITHSSL=1
597fi
598
599
600
601
602
603
604
605
606
607
608echo "Using the following locations:"
609echo " Apache installed in $APDSTDIR"
610echo " Apache source in $APSRCDIR"
611echo " Apache headers in $APHDRDIR"
612echo " apxs in $APXSDIR"
613echo " MySQL headers in $MYSQLHDRDIR"
614echo " MySQL libraries in $MYSQLLIBDIR"
615
616
617ac_aux_dir=
618for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
619 if test -f $ac_dir/install-sh; then
620 ac_aux_dir=$ac_dir
621 ac_install_sh="$ac_aux_dir/install-sh -c"
622 break
623 elif test -f $ac_dir/install.sh; then
624 ac_aux_dir=$ac_dir
625 ac_install_sh="$ac_aux_dir/install.sh -c"
626 break
627 fi
628done
629if test -z "$ac_aux_dir"; then
630 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
631fi
632ac_config_guess=$ac_aux_dir/config.guess
633ac_config_sub=$ac_aux_dir/config.sub
634ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
635
636
637# Make sure we can run config.sub.
638if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
639else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
640fi
641
642echo $ac_n "checking host system type""... $ac_c" 1>&6
643echo "configure:644: checking host system type" >&5
644
645host_alias=$host
646case "$host_alias" in
647NONE)
648 case $nonopt in
649 NONE)
650 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
651 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
652 fi ;;
653 *) host_alias=$nonopt ;;
654 esac ;;
655esac
656
657host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
658host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
659host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
660host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
661echo "$ac_t""$host" 1>&6
662
663case "$host" in
664 *-linux*)
665 cat >> confdefs.h <<\EOF
666#define __LINUX 1
667EOF
668
669 ;;
670 *-netbsd*)
671 cat >> confdefs.h <<\EOF
672#define __NETBSD 1
673EOF
674
675 ;;
676 *-openbsd*)
677 cat >> confdefs.h <<\EOF
678#define __OPENBSD 1
679EOF
680
681 ;;
682 *-solaris*)
683 cat >> confdefs.h <<\EOF
684#define __SOLARIS 1
685EOF
686
687 ;;
688 *-sunos4*)
689 cat >> confdefs.h <<\EOF
690#define __SUNOS 1
691EOF
692
693 ;;
694 *-freebsd*)
695 cat >> confdefs.h <<\EOF
696#define __FREEBSD 1
697EOF
698
699 ;;
700 *-bsdi*)
701 cat >> confdefs.h <<\EOF
702#define __BSDI 1
703EOF
704
705 ;;
706 *-apple-darwin*)
707 cat >> confdefs.h <<\EOF
708#define __MACOSX 1
709EOF
710
711 ;;
712esac
713
714
715
716# Extract the first word of "gcc", so it can be a program name with args.
717set dummy gcc; ac_word=$2
718echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
719echo "configure:720: checking for $ac_word" >&5
720if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
721 echo $ac_n "(cached) $ac_c" 1>&6
722else
723 if test -n "$CC"; then
724 ac_cv_prog_CC="$CC" # Let the user override the test.
725else
726 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
727 ac_dummy="$PATH"
728 for ac_dir in $ac_dummy; do
729 test -z "$ac_dir" && ac_dir=.
730 if test -f $ac_dir/$ac_word; then
731 ac_cv_prog_CC="gcc"
732 break
733 fi
734 done
735 IFS="$ac_save_ifs"
736fi
737fi
738CC="$ac_cv_prog_CC"
739if test -n "$CC"; then
740 echo "$ac_t""$CC" 1>&6
741else
742 echo "$ac_t""no" 1>&6
743fi
744
745if test -z "$CC"; then
746 # Extract the first word of "cc", so it can be a program name with args.
747set dummy cc; ac_word=$2
748echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
749echo "configure:750: checking for $ac_word" >&5
750if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
751 echo $ac_n "(cached) $ac_c" 1>&6
752else
753 if test -n "$CC"; then
754 ac_cv_prog_CC="$CC" # Let the user override the test.
755else
756 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
757 ac_prog_rejected=no
758 ac_dummy="$PATH"
759 for ac_dir in $ac_dummy; do
760 test -z "$ac_dir" && ac_dir=.
761 if test -f $ac_dir/$ac_word; then
762 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
763 ac_prog_rejected=yes
764 continue
765 fi
766 ac_cv_prog_CC="cc"
767 break
768 fi
769 done
770 IFS="$ac_save_ifs"
771if test $ac_prog_rejected = yes; then
772 # We found a bogon in the path, so make sure we never use it.
773 set dummy $ac_cv_prog_CC
774 shift
775 if test $# -gt 0; then
776 # We chose a different compiler from the bogus one.
777 # However, it has the same basename, so the bogon will be chosen
778 # first if we set CC to just the basename; use the full file name.
779 shift
780 set dummy "$ac_dir/$ac_word" "$@"
781 shift
782 ac_cv_prog_CC="$@"
783 fi
784fi
785fi
786fi
787CC="$ac_cv_prog_CC"
788if test -n "$CC"; then
789 echo "$ac_t""$CC" 1>&6
790else
791 echo "$ac_t""no" 1>&6
792fi
793
794 if test -z "$CC"; then
795 case "`uname -s`" in
796 *win32* | *WIN32*)
797 # Extract the first word of "cl", so it can be a program name with args.
798set dummy cl; ac_word=$2
799echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
800echo "configure:801: checking for $ac_word" >&5
801if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
802 echo $ac_n "(cached) $ac_c" 1>&6
803else
804 if test -n "$CC"; then
805 ac_cv_prog_CC="$CC" # Let the user override the test.
806else
807 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
808 ac_dummy="$PATH"
809 for ac_dir in $ac_dummy; do
810 test -z "$ac_dir" && ac_dir=.
811 if test -f $ac_dir/$ac_word; then
812 ac_cv_prog_CC="cl"
813 break
814 fi
815 done
816 IFS="$ac_save_ifs"
817fi
818fi
819CC="$ac_cv_prog_CC"
820if test -n "$CC"; then
821 echo "$ac_t""$CC" 1>&6
822else
823 echo "$ac_t""no" 1>&6
824fi
825 ;;
826 esac
827 fi
828 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
829fi
830
831echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
832echo "configure:833: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
833
834ac_ext=c
835# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
836ac_cpp='$CPP $CPPFLAGS'
837ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
838ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
839cross_compiling=$ac_cv_prog_cc_cross
840
841cat > conftest.$ac_ext << EOF
842
843#line 844 "configure"
844#include "confdefs.h"
845
846main(){return(0);}
847EOF
848if { (eval echo configure:849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
849 ac_cv_prog_cc_works=yes
850 # If we can't run a trivial program, we are probably using a cross compiler.
851 if (./conftest; exit) 2>/dev/null; then
852 ac_cv_prog_cc_cross=no
853 else
854 ac_cv_prog_cc_cross=yes
855 fi
856else
857 echo "configure: failed program was:" >&5
858 cat conftest.$ac_ext >&5
859 ac_cv_prog_cc_works=no
860fi
861rm -fr conftest*
862ac_ext=c
863# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
864ac_cpp='$CPP $CPPFLAGS'
865ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
866ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
867cross_compiling=$ac_cv_prog_cc_cross
868
869echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
870if test $ac_cv_prog_cc_works = no; then
871 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
872fi
873echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
874echo "configure:875: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
875echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
876cross_compiling=$ac_cv_prog_cc_cross
877
878echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
879echo "configure:880: checking whether we are using GNU C" >&5
880if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
881 echo $ac_n "(cached) $ac_c" 1>&6
882else
883 cat > conftest.c <<EOF
884#ifdef __GNUC__
885 yes;
886#endif
887EOF
888if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
889 ac_cv_prog_gcc=yes
890else
891 ac_cv_prog_gcc=no
892fi
893fi
894
895echo "$ac_t""$ac_cv_prog_gcc" 1>&6
896
897if test $ac_cv_prog_gcc = yes; then
898 GCC=yes
899else
900 GCC=
901fi
902
903ac_test_CFLAGS="${CFLAGS+set}"
904ac_save_CFLAGS="$CFLAGS"
905CFLAGS=
906echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
907echo "configure:908: checking whether ${CC-cc} accepts -g" >&5
908if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
909 echo $ac_n "(cached) $ac_c" 1>&6
910else
911 echo 'void f(){}' > conftest.c
912if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
913 ac_cv_prog_cc_g=yes
914else
915 ac_cv_prog_cc_g=no
916fi
917rm -f conftest*
918
919fi
920
921echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
922if test "$ac_test_CFLAGS" = set; then
923 CFLAGS="$ac_save_CFLAGS"
924elif test $ac_cv_prog_cc_g = yes; then
925 if test "$GCC" = yes; then
926 CFLAGS="-g -O2"
927 else
928 CFLAGS="-g"
929 fi
930else
931 if test "$GCC" = yes; then
932 CFLAGS="-O2"
933 else
934 CFLAGS=
935 fi
936fi
937
938# Find a good install program. We prefer a C program (faster),
939# so one script is as good as another. But avoid the broken or
940# incompatible versions:
941# SysV /etc/install, /usr/sbin/install
942# SunOS /usr/etc/install
943# IRIX /sbin/install
944# AIX /bin/install
945# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
946# AFS /usr/afsws/bin/install, which mishandles nonexistent args
947# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
948# ./install, which can be erroneously created by make from ./install.sh.
949echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
950echo "configure:951: checking for a BSD compatible install" >&5
951if test -z "$INSTALL"; then
952if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
953 echo $ac_n "(cached) $ac_c" 1>&6
954else
955 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
956 for ac_dir in $PATH; do
957 # Account for people who put trailing slashes in PATH elements.
958 case "$ac_dir/" in
959 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
960 *)
961 # OSF1 and SCO ODT 3.0 have their own names for install.
962 # Don't use installbsd from OSF since it installs stuff as root
963 # by default.
964 for ac_prog in ginstall scoinst install; do
965 if test -f $ac_dir/$ac_prog; then
966 if test $ac_prog = install &&
967 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
968 # AIX install. It has an incompatible calling convention.
969 :
970 else
971 ac_cv_path_install="$ac_dir/$ac_prog -c"
972 break 2
973 fi
974 fi
975 done
976 ;;
977 esac
978 done
979 IFS="$ac_save_IFS"
980
981fi
982 if test "${ac_cv_path_install+set}" = set; then
983 INSTALL="$ac_cv_path_install"
984 else
985 # As a last resort, use the slow shell script. We don't cache a
986 # path for INSTALL within a source directory, because that will
987 # break other packages using the cache if that directory is
988 # removed, or if the path is relative.
989 INSTALL="$ac_install_sh"
990 fi
991fi
992echo "$ac_t""$INSTALL" 1>&6
993
994# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
995# It thinks the first close brace ends the variable substitution.
996test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
997
998test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
999
1000test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1001
1002echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1003echo "configure:1004: checking whether ln -s works" >&5
1004if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1005 echo $ac_n "(cached) $ac_c" 1>&6
1006else
1007 rm -f conftestdata
1008if ln -s X conftestdata 2>/dev/null
1009then
1010 rm -f conftestdata
1011 ac_cv_prog_LN_S="ln -s"
1012else
1013 ac_cv_prog_LN_S=ln
1014fi
1015fi
1016LN_S="$ac_cv_prog_LN_S"
1017if test "$ac_cv_prog_LN_S" = "ln -s"; then
1018 echo "$ac_t""yes" 1>&6
1019else
1020 echo "$ac_t""no" 1>&6
1021fi
1022
1023echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1024echo "configure:1025: checking whether ${MAKE-make} sets \${MAKE}" >&5
1025set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1026if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1027 echo $ac_n "(cached) $ac_c" 1>&6
1028else
1029 cat > conftestmake <<\EOF
1030all:
1031 @echo 'ac_maketemp="${MAKE}"'
1032EOF
1033# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1034eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1035if test -n "$ac_maketemp"; then
1036 eval ac_cv_prog_make_${ac_make}_set=yes
1037else
1038 eval ac_cv_prog_make_${ac_make}_set=no
1039fi
1040rm -f conftestmake
1041fi
1042if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1043 echo "$ac_t""yes" 1>&6
1044 SET_MAKE=
1045else
1046 echo "$ac_t""no" 1>&6
1047 SET_MAKE="MAKE=${MAKE-make}"
1048fi
1049
1050# Extract the first word of "rm", so it can be a program name with args.
1051set dummy rm; ac_word=$2
1052echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1053echo "configure:1054: checking for $ac_word" >&5
1054if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
1055 echo $ac_n "(cached) $ac_c" 1>&6
1056else
1057 case "$RM" in
1058 /*)
1059 ac_cv_path_RM="$RM" # Let the user override the test with a path.
1060 ;;
1061 ?:/*)
1062 ac_cv_path_RM="$RM" # Let the user override the test with a dos path.
1063 ;;
1064 *)
1065 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1066 ac_dummy="$PATH:/usr/bin:/usr/local/bin"
1067 for ac_dir in $ac_dummy; do
1068 test -z "$ac_dir" && ac_dir=.
1069 if test -f $ac_dir/$ac_word; then
1070 ac_cv_path_RM="$ac_dir/$ac_word"
1071 break
1072 fi
1073 done
1074 IFS="$ac_save_ifs"
1075 test -z "$ac_cv_path_RM" && ac_cv_path_RM="no"
1076 ;;
1077esac
1078fi
1079RM="$ac_cv_path_RM"
1080if test -n "$RM"; then
1081 echo "$ac_t""$RM" 1>&6
1082else
1083 echo "$ac_t""no" 1>&6
1084fi
1085
1086if test $RM = no; then
1087 { echo "configure: error: "rm not found in the PATH"" 1>&2; exit 1; }
1088fi
1089# Extract the first word of "apxs", so it can be a program name with args.
1090set dummy apxs; ac_word=$2
1091echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1092echo "configure:1093: checking for $ac_word" >&5
1093if eval "test \"`echo '$''{'ac_cv_path_APXS'+set}'`\" = set"; then
1094 echo $ac_n "(cached) $ac_c" 1>&6
1095else
1096 case "$APXS" in
1097 /*)
1098 ac_cv_path_APXS="$APXS" # Let the user override the test with a path.
1099 ;;
1100 ?:/*)
1101 ac_cv_path_APXS="$APXS" # Let the user override the test with a dos path.
1102 ;;
1103 *)
1104 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1105 ac_dummy="$APXSDIR"
1106 for ac_dir in $ac_dummy; do
1107 test -z "$ac_dir" && ac_dir=.
1108 if test -f $ac_dir/$ac_word; then
1109 ac_cv_path_APXS="$ac_dir/$ac_word"
1110 break
1111 fi
1112 done
1113 IFS="$ac_save_ifs"
1114 test -z "$ac_cv_path_APXS" && ac_cv_path_APXS="no"
1115 ;;
1116esac
1117fi
1118APXS="$ac_cv_path_APXS"
1119if test -n "$APXS"; then
1120 echo "$ac_t""$APXS" 1>&6
1121else
1122 echo "$ac_t""no" 1>&6
1123fi
1124
1125if test $APXS = no; then
1126 { echo "configure: error: "apxs not found. Please specify its location using --with-apxs"" 1>&2; exit 1; }
1127fi
1128
1129# Extract the first word of "lyx", so it can be a program name with args.
1130set dummy lyx; ac_word=$2
1131echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1132echo "configure:1133: checking for $ac_word" >&5
1133if eval "test \"`echo '$''{'ac_cv_path_LYX'+set}'`\" = set"; then
1134 echo $ac_n "(cached) $ac_c" 1>&6
1135else
1136 case "$LYX" in
1137 /*)
1138 ac_cv_path_LYX="$LYX" # Let the user override the test with a path.
1139 ;;
1140 ?:/*)
1141 ac_cv_path_LYX="$LYX" # Let the user override the test with a dos path.
1142 ;;
1143 *)
1144 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1145 ac_dummy="$PATH:/usr/local/bin"
1146 for ac_dir in $ac_dummy; do
1147 test -z "$ac_dir" && ac_dir=.
1148 if test -f $ac_dir/$ac_word; then
1149 ac_cv_path_LYX="$ac_dir/$ac_word"
1150 break
1151 fi
1152 done
1153 IFS="$ac_save_ifs"
1154 ;;
1155esac
1156fi
1157LYX="$ac_cv_path_LYX"
1158if test -n "$LYX"; then
1159 echo "$ac_t""$LYX" 1>&6
1160else
1161 echo "$ac_t""no" 1>&6
1162fi
1163
1164# Extract the first word of "latex", so it can be a program name with args.
1165set dummy latex; ac_word=$2
1166echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1167echo "configure:1168: checking for $ac_word" >&5
1168if eval "test \"`echo '$''{'ac_cv_path_LATEX'+set}'`\" = set"; then
1169 echo $ac_n "(cached) $ac_c" 1>&6
1170else
1171 case "$LATEX" in
1172 /*)
1173 ac_cv_path_LATEX="$LATEX" # Let the user override the test with a path.
1174 ;;
1175 ?:/*)
1176 ac_cv_path_LATEX="$LATEX" # Let the user override the test with a dos path.
1177 ;;
1178 *)
1179 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1180 ac_dummy="$PATH:/usr/local/bin"
1181 for ac_dir in $ac_dummy; do
1182 test -z "$ac_dir" && ac_dir=.
1183 if test -f $ac_dir/$ac_word; then
1184 ac_cv_path_LATEX="$ac_dir/$ac_word"
1185 break
1186 fi
1187 done
1188 IFS="$ac_save_ifs"
1189 ;;
1190esac
1191fi
1192LATEX="$ac_cv_path_LATEX"
1193if test -n "$LATEX"; then
1194 echo "$ac_t""$LATEX" 1>&6
1195else
1196 echo "$ac_t""no" 1>&6
1197fi
1198
1199# Extract the first word of "dvips", so it can be a program name with args.
1200set dummy dvips; ac_word=$2
1201echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1202echo "configure:1203: checking for $ac_word" >&5
1203if eval "test \"`echo '$''{'ac_cv_path_DVIPS'+set}'`\" = set"; then
1204 echo $ac_n "(cached) $ac_c" 1>&6
1205else
1206 case "$DVIPS" in
1207 /*)
1208 ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a path.
1209 ;;
1210 ?:/*)
1211 ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a dos path.
1212 ;;
1213 *)
1214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1215 ac_dummy="$PATH:/usr/local/bin"
1216 for ac_dir in $ac_dummy; do
1217 test -z "$ac_dir" && ac_dir=.
1218 if test -f $ac_dir/$ac_word; then
1219 ac_cv_path_DVIPS="$ac_dir/$ac_word"
1220 break
1221 fi
1222 done
1223 IFS="$ac_save_ifs"
1224 ;;
1225esac
1226fi
1227DVIPS="$ac_cv_path_DVIPS"
1228if test -n "$DVIPS"; then
1229 echo "$ac_t""$DVIPS" 1>&6
1230else
1231 echo "$ac_t""no" 1>&6
1232fi
1233
1234# Extract the first word of "lynx", so it can be a program name with args.
1235set dummy lynx; ac_word=$2
1236echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1237echo "configure:1238: checking for $ac_word" >&5
1238if eval "test \"`echo '$''{'ac_cv_path_LINKS'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241 case "$LINKS" in
1242 /*)
1243 ac_cv_path_LINKS="$LINKS" # Let the user override the test with a path.
1244 ;;
1245 ?:/*)
1246 ac_cv_path_LINKS="$LINKS" # Let the user override the test with a dos path.
1247 ;;
1248 *)
1249 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1250 ac_dummy="$PATH:/usr/local/bin"
1251 for ac_dir in $ac_dummy; do
1252 test -z "$ac_dir" && ac_dir=.
1253 if test -f $ac_dir/$ac_word; then
1254 ac_cv_path_LINKS="$ac_dir/$ac_word"
1255 break
1256 fi
1257 done
1258 IFS="$ac_save_ifs"
1259 ;;
1260esac
1261fi
1262LINKS="$ac_cv_path_LINKS"
1263if test -n "$LINKS"; then
1264 echo "$ac_t""$LINKS" 1>&6
1265else
1266 echo "$ac_t""no" 1>&6
1267fi
1268
1269# Extract the first word of "latex2html", so it can be a program name with args.
1270set dummy latex2html; ac_word=$2
1271echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1272echo "configure:1273: checking for $ac_word" >&5
1273if eval "test \"`echo '$''{'ac_cv_path_L2H'+set}'`\" = set"; then
1274 echo $ac_n "(cached) $ac_c" 1>&6
1275else
1276 case "$L2H" in
1277 /*)
1278 ac_cv_path_L2H="$L2H" # Let the user override the test with a path.
1279 ;;
1280 ?:/*)
1281 ac_cv_path_L2H="$L2H" # Let the user override the test with a dos path.
1282 ;;
1283 *)
1284 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1285 ac_dummy="$PATH:/usr/local/bin"
1286 for ac_dir in $ac_dummy; do
1287 test -z "$ac_dir" && ac_dir=.
1288 if test -f $ac_dir/$ac_word; then
1289 ac_cv_path_L2H="$ac_dir/$ac_word"
1290 break
1291 fi
1292 done
1293 IFS="$ac_save_ifs"
1294 ;;
1295esac
1296fi
1297L2H="$ac_cv_path_L2H"
1298if test -n "$L2H"; then
1299 echo "$ac_t""$L2H" 1>&6
1300else
1301 echo "$ac_t""no" 1>&6
1302fi
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312echo $ac_n "checking for main in -lz""... $ac_c" 1>&6
1313echo "configure:1314: checking for main in -lz" >&5
1314ac_lib_var=`echo z'_'main | sed 'y%./+-%__p_%'`
1315if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1316 echo $ac_n "(cached) $ac_c" 1>&6
1317else
1318 ac_save_LIBS="$LIBS"
1319LIBS="-lz $LIBS"
1320cat > conftest.$ac_ext <<EOF
1321#line 1322 "configure"
1322#include "confdefs.h"
1323
1324int main() {
1325main()
1326; return 0; }
1327EOF
1328if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1329 rm -rf conftest*
1330 eval "ac_cv_lib_$ac_lib_var=yes"
1331else
1332 echo "configure: failed program was:" >&5
1333 cat conftest.$ac_ext >&5
1334 rm -rf conftest*
1335 eval "ac_cv_lib_$ac_lib_var=no"
1336fi
1337rm -f conftest*
1338LIBS="$ac_save_LIBS"
1339
1340fi
1341if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1342 echo "$ac_t""yes" 1>&6
1343 LIBS="$LIBS -lz"
1344else
1345 echo "$ac_t""no" 1>&6
1346{ echo "configure: error: "libz not found. Compilation cannot continue without this library."" 1>&2; exit 1; }
1347fi
1348
1349echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
1350echo "configure:1351: checking for nanosleep" >&5
1351if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
1352 echo $ac_n "(cached) $ac_c" 1>&6
1353else
1354 cat > conftest.$ac_ext <<EOF
1355#line 1356 "configure"
1356#include "confdefs.h"
1357/* System header to define __stub macros and hopefully few prototypes,
1358 which can conflict with char nanosleep(); below. */
1359#include <assert.h>
1360/* Override any gcc2 internal prototype to avoid an error. */
1361/* We use char because int might match the return type of a gcc2
1362 builtin and then its argument prototype would still apply. */
1363char nanosleep();
1364
1365int main() {
1366
1367/* The GNU C library defines this for functions which it implements
1368 to always fail with ENOSYS. Some functions are actually named
1369 something starting with __ and the normal name is an alias. */
1370#if defined (__stub_nanosleep) || defined (__stub___nanosleep)
1371choke me
1372#else
1373nanosleep();
1374#endif
1375
1376; return 0; }
1377EOF
1378if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1379 rm -rf conftest*
1380 eval "ac_cv_func_nanosleep=yes"
1381else
1382 echo "configure: failed program was:" >&5
1383 cat conftest.$ac_ext >&5
1384 rm -rf conftest*
1385 eval "ac_cv_func_nanosleep=no"
1386fi
1387rm -f conftest*
1388fi
1389
1390if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
1391 echo "$ac_t""yes" 1>&6
1392 :
1393else
1394 echo "$ac_t""no" 1>&6
1395echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
1396echo "configure:1397: checking for nanosleep in -lrt" >&5
1397ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
1398if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1400else
1401 ac_save_LIBS="$LIBS"
1402LIBS="-lrt $LIBS"
1403cat > conftest.$ac_ext <<EOF
1404#line 1405 "configure"
1405#include "confdefs.h"
1406/* Override any gcc2 internal prototype to avoid an error. */
1407/* We use char because int might match the return type of a gcc2
1408 builtin and then its argument prototype would still apply. */
1409char nanosleep();
1410
1411int main() {
1412nanosleep()
1413; return 0; }
1414EOF
1415if { (eval echo configure:1416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1416 rm -rf conftest*
1417 eval "ac_cv_lib_$ac_lib_var=yes"
1418else
1419 echo "configure: failed program was:" >&5
1420 cat conftest.$ac_ext >&5
1421 rm -rf conftest*
1422 eval "ac_cv_lib_$ac_lib_var=no"
1423fi
1424rm -f conftest*
1425LIBS="$ac_save_LIBS"
1426
1427fi
1428if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1429 echo "$ac_t""yes" 1>&6
1430 LIBS="$LIBS -lrt"
1431else
1432 echo "$ac_t""no" 1>&6
1433{ echo "configure: error: "nanosleep function not available in librt."" 1>&2; exit 1; }
1434fi
1435
1436fi
1437
1438echo $ac_n "checking for mysql_init in -lmysqlclient""... $ac_c" 1>&6
1439echo "configure:1440: checking for mysql_init in -lmysqlclient" >&5
1440ac_lib_var=`echo mysqlclient'_'mysql_init | sed 'y%./+-%__p_%'`
1441if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1442 echo $ac_n "(cached) $ac_c" 1>&6
1443else
1444 ac_save_LIBS="$LIBS"
1445LIBS="-lmysqlclient $LIBS"
1446cat > conftest.$ac_ext <<EOF
1447#line 1448 "configure"
1448#include "confdefs.h"
1449/* Override any gcc2 internal prototype to avoid an error. */
1450/* We use char because int might match the return type of a gcc2
1451 builtin and then its argument prototype would still apply. */
1452char mysql_init();
1453
1454int main() {
1455mysql_init()
1456; return 0; }
1457EOF
1458if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1459 rm -rf conftest*
1460 eval "ac_cv_lib_$ac_lib_var=yes"
1461else
1462 echo "configure: failed program was:" >&5
1463 cat conftest.$ac_ext >&5
1464 rm -rf conftest*
1465 eval "ac_cv_lib_$ac_lib_var=no"
1466fi
1467rm -f conftest*
1468LIBS="$ac_save_LIBS"
1469
1470fi
1471if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1472 echo "$ac_t""yes" 1>&6
1473 LIBS="$LIBS -lmysqlclient"
1474else
1475 echo "$ac_t""no" 1>&6
1476{ echo "configure: error: "libmysqlclient not found. Please specify its location using --with-mysql-libs."" 1>&2; exit 1; }
1477fi
1478
1479
1480echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1481echo "configure:1482: checking how to run the C preprocessor" >&5
1482# On Suns, sometimes $CPP names a directory.
1483if test -n "$CPP" && test -d "$CPP"; then
1484 CPP=
1485fi
1486if test -z "$CPP"; then
1487if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1488 echo $ac_n "(cached) $ac_c" 1>&6
1489else
1490 # This must be in double quotes, not single quotes, because CPP may get
1491 # substituted into the Makefile and "${CC-cc}" will confuse make.
1492 CPP="${CC-cc} -E"
1493 # On the NeXT, cc -E runs the code through the compiler's parser,
1494 # not just through cpp.
1495 cat > conftest.$ac_ext <<EOF
1496#line 1497 "configure"
1497#include "confdefs.h"
1498#include <assert.h>
1499Syntax Error
1500EOF
1501ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1502{ (eval echo configure:1503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1503ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1504if test -z "$ac_err"; then
1505 :
1506else
1507 echo "$ac_err" >&5
1508 echo "configure: failed program was:" >&5
1509 cat conftest.$ac_ext >&5
1510 rm -rf conftest*
1511 CPP="${CC-cc} -E -traditional-cpp"
1512 cat > conftest.$ac_ext <<EOF
1513#line 1514 "configure"
1514#include "confdefs.h"
1515#include <assert.h>
1516Syntax Error
1517EOF
1518ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1519{ (eval echo configure:1520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1520ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1521if test -z "$ac_err"; then
1522 :
1523else
1524 echo "$ac_err" >&5
1525 echo "configure: failed program was:" >&5
1526 cat conftest.$ac_ext >&5
1527 rm -rf conftest*
1528 CPP="${CC-cc} -nologo -E"
1529 cat > conftest.$ac_ext <<EOF
1530#line 1531 "configure"
1531#include "confdefs.h"
1532#include <assert.h>
1533Syntax Error
1534EOF
1535ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1536{ (eval echo configure:1537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1537ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1538if test -z "$ac_err"; then
1539 :
1540else
1541 echo "$ac_err" >&5
1542 echo "configure: failed program was:" >&5
1543 cat conftest.$ac_ext >&5
1544 rm -rf conftest*
1545 CPP=/lib/cpp
1546fi
1547rm -f conftest*
1548fi
1549rm -f conftest*
1550fi
1551rm -f conftest*
1552 ac_cv_prog_CPP="$CPP"
1553fi
1554 CPP="$ac_cv_prog_CPP"
1555else
1556 ac_cv_prog_CPP="$CPP"
1557fi
1558echo "$ac_t""$CPP" 1>&6
1559
1560echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1561echo "configure:1562: checking for ANSI C header files" >&5
1562if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1563 echo $ac_n "(cached) $ac_c" 1>&6
1564else
1565 cat > conftest.$ac_ext <<EOF
1566#line 1567 "configure"
1567#include "confdefs.h"
1568#include <stdlib.h>
1569#include <stdarg.h>
1570#include <string.h>
1571#include <float.h>
1572EOF
1573ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1574{ (eval echo configure:1575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1575ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1576if test -z "$ac_err"; then
1577 rm -rf conftest*
1578 ac_cv_header_stdc=yes
1579else
1580 echo "$ac_err" >&5
1581 echo "configure: failed program was:" >&5
1582 cat conftest.$ac_ext >&5
1583 rm -rf conftest*
1584 ac_cv_header_stdc=no
1585fi
1586rm -f conftest*
1587
1588if test $ac_cv_header_stdc = yes; then
1589 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1590cat > conftest.$ac_ext <<EOF
1591#line 1592 "configure"
1592#include "confdefs.h"
1593#include <string.h>
1594EOF
1595if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1596 egrep "memchr" >/dev/null 2>&1; then
1597 :
1598else
1599 rm -rf conftest*
1600 ac_cv_header_stdc=no
1601fi
1602rm -f conftest*
1603
1604fi
1605
1606if test $ac_cv_header_stdc = yes; then
1607 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1608cat > conftest.$ac_ext <<EOF
1609#line 1610 "configure"
1610#include "confdefs.h"
1611#include <stdlib.h>
1612EOF
1613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1614 egrep "free" >/dev/null 2>&1; then
1615 :
1616else
1617 rm -rf conftest*
1618 ac_cv_header_stdc=no
1619fi
1620rm -f conftest*
1621
1622fi
1623
1624if test $ac_cv_header_stdc = yes; then
1625 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1626if test "$cross_compiling" = yes; then
1627 :
1628else
1629 cat > conftest.$ac_ext <<EOF
1630#line 1631 "configure"
1631#include "confdefs.h"
1632#include <ctype.h>
1633#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1634#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1635#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1636int main () { int i; for (i = 0; i < 256; i++)
1637if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1638exit (0); }
1639
1640EOF
1641if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1642then
1643 :
1644else
1645 echo "configure: failed program was:" >&5
1646 cat conftest.$ac_ext >&5
1647 rm -fr conftest*
1648 ac_cv_header_stdc=no
1649fi
1650rm -fr conftest*
1651fi
1652
1653fi
1654fi
1655
1656echo "$ac_t""$ac_cv_header_stdc" 1>&6
1657if test $ac_cv_header_stdc = yes; then
1658 cat >> confdefs.h <<\EOF
1659#define STDC_HEADERS 1
1660EOF
1661
1662fi
1663
1664echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1665echo "configure:1666: checking whether time.h and sys/time.h may both be included" >&5
1666if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1667 echo $ac_n "(cached) $ac_c" 1>&6
1668else
1669 cat > conftest.$ac_ext <<EOF
1670#line 1671 "configure"
1671#include "confdefs.h"
1672#include <sys/types.h>
1673#include <sys/time.h>
1674#include <time.h>
1675int main() {
1676struct tm *tp;
1677; return 0; }
1678EOF
1679if { (eval echo configure:1680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1680 rm -rf conftest*
1681 ac_cv_header_time=yes
1682else
1683 echo "configure: failed program was:" >&5
1684 cat conftest.$ac_ext >&5
1685 rm -rf conftest*
1686 ac_cv_header_time=no
1687fi
1688rm -f conftest*
1689fi
1690
1691echo "$ac_t""$ac_cv_header_time" 1>&6
1692if test $ac_cv_header_time = yes; then
1693 cat >> confdefs.h <<\EOF
1694#define TIME_WITH_SYS_TIME 1
1695EOF
1696
1697fi
1698
1699for ac_hdr in $APDSTDIR/include/httpd.h $APDSTDIR/include/http_config.h $APDSTDIR/include/http_log.h $APDSTDIR/include/http_core.h
1700do
1701ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1702echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1703echo "configure:1704: checking for $ac_hdr" >&5
1704if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1705 echo $ac_n "(cached) $ac_c" 1>&6
1706else
1707 cat > conftest.$ac_ext <<EOF
1708#line 1709 "configure"
1709#include "confdefs.h"
1710#include <$ac_hdr>
1711EOF
1712ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1713{ (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1714ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1715if test -z "$ac_err"; then
1716 rm -rf conftest*
1717 eval "ac_cv_header_$ac_safe=yes"
1718else
1719 echo "$ac_err" >&5
1720 echo "configure: failed program was:" >&5
1721 cat conftest.$ac_ext >&5
1722 rm -rf conftest*
1723 eval "ac_cv_header_$ac_safe=no"
1724fi
1725rm -f conftest*
1726fi
1727if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1728 echo "$ac_t""yes" 1>&6
1729 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1730 cat >> confdefs.h <<EOF
1731#define $ac_tr_hdr 1
1732EOF
1733
1734else
1735 echo "$ac_t""no" 1>&6
1736echo "** A required header cannot be located."
1737 echo " Please use the --with-apache option."; echo; exit 1
1738fi
1739done
1740
1741for ac_hdr in $MYSQLHDRDIR/mysql.h $MYSQLHDRDIR/mysqld_error.h
1742do
1743ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1744echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1745echo "configure:1746: checking for $ac_hdr" >&5
1746if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1747 echo $ac_n "(cached) $ac_c" 1>&6
1748else
1749 cat > conftest.$ac_ext <<EOF
1750#line 1751 "configure"
1751#include "confdefs.h"
1752#include <$ac_hdr>
1753EOF
1754ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1755{ (eval echo configure:1756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1756ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1757if test -z "$ac_err"; then
1758 rm -rf conftest*
1759 eval "ac_cv_header_$ac_safe=yes"
1760else
1761 echo "$ac_err" >&5
1762 echo "configure: failed program was:" >&5
1763 cat conftest.$ac_ext >&5
1764 rm -rf conftest*
1765 eval "ac_cv_header_$ac_safe=no"
1766fi
1767rm -f conftest*
1768fi
1769if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1770 echo "$ac_t""yes" 1>&6
1771 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1772 cat >> confdefs.h <<EOF
1773#define $ac_tr_hdr 1
1774EOF
1775
1776else
1777 echo "$ac_t""no" 1>&6
1778echo "** A required header cannot be located."
1779 echo " Please use the --with-mysql-headers option."; echo; exit 1
1780fi
1781done
1782
1783if test $WITHSSL = 1; then
1784for ac_file in $APSRCDIR/src/modules/ssl/mod_ssl.h
1785do
1786
1787ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
1788echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
1789echo "configure:1790: checking for $ac_file" >&5
1790if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1791 echo $ac_n "(cached) $ac_c" 1>&6
1792else
1793 if test "$cross_compiling" = yes; then
1794 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1795else
1796 if test -r $ac_file; then
1797 eval "ac_cv_file_$ac_safe=yes"
1798 else
1799 eval "ac_cv_file_$ac_safe=no"
1800 fi
1801fi
1802fi
1803if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1804 echo "$ac_t""yes" 1>&6
1805 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1806 cat >> confdefs.h <<EOF
1807#define $ac_tr_file 1
1808EOF
1809 ac_safe=`echo "db1/ndbm.h" | sed 'y%./+-%__p_%'`
1810echo $ac_n "checking for db1/ndbm.h""... $ac_c" 1>&6
1811echo "configure:1812: checking for db1/ndbm.h" >&5
1812if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1813 echo $ac_n "(cached) $ac_c" 1>&6
1814else
1815 cat > conftest.$ac_ext <<EOF
1816#line 1817 "configure"
1817#include "confdefs.h"
1818#include <db1/ndbm.h>
1819EOF
1820ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1821{ (eval echo configure:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1822ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1823if test -z "$ac_err"; then
1824 rm -rf conftest*
1825 eval "ac_cv_header_$ac_safe=yes"
1826else
1827 echo "$ac_err" >&5
1828 echo "configure: failed program was:" >&5
1829 cat conftest.$ac_ext >&5
1830 rm -rf conftest*
1831 eval "ac_cv_header_$ac_safe=no"
1832fi
1833rm -f conftest*
1834fi
1835if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1836 echo "$ac_t""yes" 1>&6
1837 HAVE_MODSSL=1
1838else
1839 echo "$ac_t""no" 1>&6
1840HAVE_MODSSL=0
1841fi
1842
1843else
1844 echo "$ac_t""no" 1>&6
1845HAVE_MODSSL=0
1846fi
1847done
1848
1849 if test $HAVE_MODSSL = 0; then
1850 echo "configure: warning: "SSL not enabled. Please use the --with-apache-source option if you want it enabled."" 1>&2
1851 fi
1852else
1853 echo "configure: warning: "SSL checking/capability disabled by commandline option."" 1>&2
1854 HAVE_MODSSL=0
1855fi
1856
1857
1858echo $ac_n "checking for working const""... $ac_c" 1>&6
1859echo "configure:1860: checking for working const" >&5
1860if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1861 echo $ac_n "(cached) $ac_c" 1>&6
1862else
1863 cat > conftest.$ac_ext <<EOF
1864#line 1865 "configure"
1865#include "confdefs.h"
1866
1867int main() {
1868
1869/* Ultrix mips cc rejects this. */
1870typedef int charset[2]; const charset x;
1871/* SunOS 4.1.1 cc rejects this. */
1872char const *const *ccp;
1873char **p;
1874/* NEC SVR4.0.2 mips cc rejects this. */
1875struct point {int x, y;};
1876static struct point const zero = {0,0};
1877/* AIX XL C 1.02.0.0 rejects this.
1878 It does not let you subtract one const X* pointer from another in an arm
1879 of an if-expression whose if-part is not a constant expression */
1880const char *g = "string";
1881ccp = &g + (g ? g-g : 0);
1882/* HPUX 7.0 cc rejects these. */
1883++ccp;
1884p = (char**) ccp;
1885ccp = (char const *const *) p;
1886{ /* SCO 3.2v4 cc rejects this. */
1887 char *t;
1888 char const *s = 0 ? (char *) 0 : (char const *) 0;
1889
1890 *t++ = 0;
1891}
1892{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1893 int x[] = {25, 17};
1894 const int *foo = &x[0];
1895 ++foo;
1896}
1897{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1898 typedef const int *iptr;
1899 iptr p = 0;
1900 ++p;
1901}
1902{ /* AIX XL C 1.02.0.0 rejects this saying
1903 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1904 struct s { int j; const int *ap[3]; };
1905 struct s *b; b->j = 5;
1906}
1907{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1908 const int foo = 10;
1909}
1910
1911; return 0; }
1912EOF
1913if { (eval echo configure:1914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1914 rm -rf conftest*
1915 ac_cv_c_const=yes
1916else
1917 echo "configure: failed program was:" >&5
1918 cat conftest.$ac_ext >&5
1919 rm -rf conftest*
1920 ac_cv_c_const=no
1921fi
1922rm -f conftest*
1923fi
1924
1925echo "$ac_t""$ac_cv_c_const" 1>&6
1926if test $ac_cv_c_const = no; then
1927 cat >> confdefs.h <<\EOF
1928#define const
1929EOF
1930
1931fi
1932
1933echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1934echo "configure:1935: checking whether struct tm is in sys/time.h or time.h" >&5
1935if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1936 echo $ac_n "(cached) $ac_c" 1>&6
1937else
1938 cat > conftest.$ac_ext <<EOF
1939#line 1940 "configure"
1940#include "confdefs.h"
1941#include <sys/types.h>
1942#include <time.h>
1943int main() {
1944struct tm *tp; tp->tm_sec;
1945; return 0; }
1946EOF
1947if { (eval echo configure:1948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1948 rm -rf conftest*
1949 ac_cv_struct_tm=time.h
1950else
1951 echo "configure: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
1953 rm -rf conftest*
1954 ac_cv_struct_tm=sys/time.h
1955fi
1956rm -f conftest*
1957fi
1958
1959echo "$ac_t""$ac_cv_struct_tm" 1>&6
1960if test $ac_cv_struct_tm = sys/time.h; then
1961 cat >> confdefs.h <<\EOF
1962#define TM_IN_SYS_TIME 1
1963EOF
1964
1965fi
1966
1967
1968echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1969echo "configure:1970: checking return type of signal handlers" >&5
1970if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1971 echo $ac_n "(cached) $ac_c" 1>&6
1972else
1973 cat > conftest.$ac_ext <<EOF
1974#line 1975 "configure"
1975#include "confdefs.h"
1976#include <sys/types.h>
1977#include <signal.h>
1978#ifdef signal
1979#undef signal
1980#endif
1981#ifdef __cplusplus
1982extern "C" void (*signal (int, void (*)(int)))(int);
1983#else
1984void (*signal ()) ();
1985#endif
1986
1987int main() {
1988int i;
1989; return 0; }
1990EOF
1991if { (eval echo configure:1992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1992 rm -rf conftest*
1993 ac_cv_type_signal=void
1994else
1995 echo "configure: failed program was:" >&5
1996 cat conftest.$ac_ext >&5
1997 rm -rf conftest*
1998 ac_cv_type_signal=int
1999fi
2000rm -f conftest*
2001fi
2002
2003echo "$ac_t""$ac_cv_type_signal" 1>&6
2004cat >> confdefs.h <<EOF
2005#define RETSIGTYPE $ac_cv_type_signal
2006EOF
2007
2008
2009echo $ac_n "checking for strftime""... $ac_c" 1>&6
2010echo "configure:2011: checking for strftime" >&5
2011if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
2012 echo $ac_n "(cached) $ac_c" 1>&6
2013else
2014 cat > conftest.$ac_ext <<EOF
2015#line 2016 "configure"
2016#include "confdefs.h"
2017/* System header to define __stub macros and hopefully few prototypes,
2018 which can conflict with char strftime(); below. */
2019#include <assert.h>
2020/* Override any gcc2 internal prototype to avoid an error. */
2021/* We use char because int might match the return type of a gcc2
2022 builtin and then its argument prototype would still apply. */
2023char strftime();
2024
2025int main() {
2026
2027/* The GNU C library defines this for functions which it implements
2028 to always fail with ENOSYS. Some functions are actually named
2029 something starting with __ and the normal name is an alias. */
2030#if defined (__stub_strftime) || defined (__stub___strftime)
2031choke me
2032#else
2033strftime();
2034#endif
2035
2036; return 0; }
2037EOF
2038if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2039 rm -rf conftest*
2040 eval "ac_cv_func_strftime=yes"
2041else
2042 echo "configure: failed program was:" >&5
2043 cat conftest.$ac_ext >&5
2044 rm -rf conftest*
2045 eval "ac_cv_func_strftime=no"
2046fi
2047rm -f conftest*
2048fi
2049
2050if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
2051 echo "$ac_t""yes" 1>&6
2052 cat >> confdefs.h <<\EOF
2053#define HAVE_STRFTIME 1
2054EOF
2055
2056else
2057 echo "$ac_t""no" 1>&6
2058# strftime is in -lintl on SCO UNIX.
2059echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
2060echo "configure:2061: checking for strftime in -lintl" >&5
2061ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
2062if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2063 echo $ac_n "(cached) $ac_c" 1>&6
2064else
2065 ac_save_LIBS="$LIBS"
2066LIBS="-lintl $LIBS"
2067cat > conftest.$ac_ext <<EOF
2068#line 2069 "configure"
2069#include "confdefs.h"
2070/* Override any gcc2 internal prototype to avoid an error. */
2071/* We use char because int might match the return type of a gcc2
2072 builtin and then its argument prototype would still apply. */
2073char strftime();
2074
2075int main() {
2076strftime()
2077; return 0; }
2078EOF
2079if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2080 rm -rf conftest*
2081 eval "ac_cv_lib_$ac_lib_var=yes"
2082else
2083 echo "configure: failed program was:" >&5
2084 cat conftest.$ac_ext >&5
2085 rm -rf conftest*
2086 eval "ac_cv_lib_$ac_lib_var=no"
2087fi
2088rm -f conftest*
2089LIBS="$ac_save_LIBS"
2090
2091fi
2092if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2093 echo "$ac_t""yes" 1>&6
2094 cat >> confdefs.h <<\EOF
2095#define HAVE_STRFTIME 1
2096EOF
2097
2098LIBS="-lintl $LIBS"
2099else
2100 echo "$ac_t""no" 1>&6
2101fi
2102
2103fi
2104
2105for ac_func in strstr atoi mysql_real_connect mysql_escape_string mysql_real_escape_string
2106do
2107echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2108echo "configure:2109: checking for $ac_func" >&5
2109if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2110 echo $ac_n "(cached) $ac_c" 1>&6
2111else
2112 cat > conftest.$ac_ext <<EOF
2113#line 2114 "configure"
2114#include "confdefs.h"
2115/* System header to define __stub macros and hopefully few prototypes,
2116 which can conflict with char $ac_func(); below. */
2117#include <assert.h>
2118/* Override any gcc2 internal prototype to avoid an error. */
2119/* We use char because int might match the return type of a gcc2
2120 builtin and then its argument prototype would still apply. */
2121char $ac_func();
2122
2123int main() {
2124
2125/* The GNU C library defines this for functions which it implements
2126 to always fail with ENOSYS. Some functions are actually named
2127 something starting with __ and the normal name is an alias. */
2128#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2129choke me
2130#else
2131$ac_func();
2132#endif
2133
2134; return 0; }
2135EOF
2136if { (eval echo configure:2137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2137 rm -rf conftest*
2138 eval "ac_cv_func_$ac_func=yes"
2139else
2140 echo "configure: failed program was:" >&5
2141 cat conftest.$ac_ext >&5
2142 rm -rf conftest*
2143 eval "ac_cv_func_$ac_func=no"
2144fi
2145rm -f conftest*
2146fi
2147
2148if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2149 echo "$ac_t""yes" 1>&6
2150 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2151 cat >> confdefs.h <<EOF
2152#define $ac_tr_func 1
2153EOF
2154
2155else
2156 echo "$ac_t""no" 1>&6
2157{ echo "configure: error: "a necessary function is not available."" 1>&2; exit 1; }
2158fi
2159done
2160
2161
2162trap '' 1 2 15
2163cat > confcache <<\EOF
2164# This file is a shell script that caches the results of configure
2165# tests run on this system so they can be shared between configure
2166# scripts and configure runs. It is not useful on other systems.
2167# If it contains results you don't want to keep, you may remove or edit it.
2168#
2169# By default, configure uses ./config.cache as the cache file,
2170# creating it if it does not exist already. You can give configure
2171# the --cache-file=FILE option to use a different cache file; that is
2172# what configure does when it calls configure scripts in
2173# subdirectories, so they share the cache.
2174# Giving --cache-file=/dev/null disables caching, for debugging configure.
2175# config.status only pays attention to the cache file if you give it the
2176# --recheck option to rerun configure.
2177#
2178EOF
2179# The following way of writing the cache mishandles newlines in values,
2180# but we know of no workaround that is simple, portable, and efficient.
2181# So, don't put newlines in cache variables' values.
2182# Ultrix sh set writes to stderr and can't be redirected directly,
2183# and sets the high bit in the cache file unless we assign to the vars.
2184(set) 2>&1 |
2185 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2186 *ac_space=\ *)
2187 # `set' does not quote correctly, so add quotes (double-quote substitution
2188 # turns \\\\ into \\, and sed turns \\ into \).
2189 sed -n \
2190 -e "s/'/'\\\\''/g" \
2191 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2192 ;;
2193 *)
2194 # `set' quotes correctly as required by POSIX, so do not add quotes.
2195 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2196 ;;
2197 esac >> confcache
2198if cmp -s $cache_file confcache; then
2199 :
2200else
2201 if test -w $cache_file; then
2202 echo "updating cache $cache_file"
2203 cat confcache > $cache_file
2204 else
2205 echo "not updating unwritable cache $cache_file"
2206 fi
2207fi
2208rm -f confcache
2209
2210trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2211
2212test "x$prefix" = xNONE && prefix=$ac_default_prefix
2213# Let make expand exec_prefix.
2214test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2215
2216# Any assignment to VPATH causes Sun make to only execute
2217# the first set of double-colon rules, so remove it if not needed.
2218# If there is a colon in the path, we need to keep it.
2219if test "x$srcdir" = x.; then
2220 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2221fi
2222
2223trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2224
2225DEFS=-DHAVE_CONFIG_H
2226
2227# Without the "./", some shells look in PATH for config.status.
2228: ${CONFIG_STATUS=./config.status}
2229
2230echo creating $CONFIG_STATUS
2231rm -f $CONFIG_STATUS
2232cat > $CONFIG_STATUS <<EOF
2233#! /bin/sh
2234# Generated automatically by configure.
2235# Run this file to recreate the current configuration.
2236# This directory was configured as follows,
2237# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2238#
2239# $0 $ac_configure_args
2240#
2241# Compiler output produced by configure, useful for debugging
2242# configure, is in ./config.log if it exists.
2243
2244ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2245for ac_option
2246do
2247 case "\$ac_option" in
2248 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2249 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2250 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2251 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2252 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2253 exit 0 ;;
2254 -help | --help | --hel | --he | --h)
2255 echo "\$ac_cs_usage"; exit 0 ;;
2256 *) echo "\$ac_cs_usage"; exit 1 ;;
2257 esac
2258done
2259
2260ac_given_srcdir=$srcdir
2261ac_given_INSTALL="$INSTALL"
2262
2263trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2264EOF
2265cat >> $CONFIG_STATUS <<EOF
2266
2267# Protect against being on the right side of a sed subst in config.status.
2268sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2269 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2270$ac_vpsub
2271$extrasub
2272s%@SHELL@%$SHELL%g
2273s%@CFLAGS@%$CFLAGS%g
2274s%@CPPFLAGS@%$CPPFLAGS%g
2275s%@CXXFLAGS@%$CXXFLAGS%g
2276s%@FFLAGS@%$FFLAGS%g
2277s%@DEFS@%$DEFS%g
2278s%@LDFLAGS@%$LDFLAGS%g
2279s%@LIBS@%$LIBS%g
2280s%@exec_prefix@%$exec_prefix%g
2281s%@prefix@%$prefix%g
2282s%@program_transform_name@%$program_transform_name%g
2283s%@bindir@%$bindir%g
2284s%@sbindir@%$sbindir%g
2285s%@libexecdir@%$libexecdir%g
2286s%@datadir@%$datadir%g
2287s%@sysconfdir@%$sysconfdir%g
2288s%@sharedstatedir@%$sharedstatedir%g
2289s%@localstatedir@%$localstatedir%g
2290s%@libdir@%$libdir%g
2291s%@includedir@%$includedir%g
2292s%@oldincludedir@%$oldincludedir%g
2293s%@infodir@%$infodir%g
2294s%@mandir@%$mandir%g
2295s%@APDSTDIR@%$APDSTDIR%g
2296s%@APSRCDIR@%$APSRCDIR%g
2297s%@MYSQLHDRDIR@%$MYSQLHDRDIR%g
2298s%@MYSQLLIBDIR@%$MYSQLLIBDIR%g
2299s%@APXSDIR@%$APXSDIR%g
2300s%@APHDRDIR@%$APHDRDIR%g
2301s%@host@%$host%g
2302s%@host_alias@%$host_alias%g
2303s%@host_cpu@%$host_cpu%g
2304s%@host_vendor@%$host_vendor%g
2305s%@host_os@%$host_os%g
2306s%@CC@%$CC%g
2307s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2308s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2309s%@INSTALL_DATA@%$INSTALL_DATA%g
2310s%@LN_S@%$LN_S%g
2311s%@SET_MAKE@%$SET_MAKE%g
2312s%@RM@%$RM%g
2313s%@APXS@%$APXS%g
2314s%@LYX@%$LYX%g
2315s%@LATEX@%$LATEX%g
2316s%@DVIPS@%$DVIPS%g
2317s%@LINKS@%$LINKS%g
2318s%@L2H@%$L2H%g
2319s%@CPP@%$CPP%g
2320s%@HAVE_MODSSL@%$HAVE_MODSSL%g
2321
2322CEOF
2323EOF
2324
2325cat >> $CONFIG_STATUS <<\EOF
2326
2327# Split the substitutions into bite-sized pieces for seds with
2328# small command number limits, like on Digital OSF/1 and HP-UX.
2329ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2330ac_file=1 # Number of current file.
2331ac_beg=1 # First line for current file.
2332ac_end=$ac_max_sed_cmds # Line after last line for current file.
2333ac_more_lines=:
2334ac_sed_cmds=""
2335while $ac_more_lines; do
2336 if test $ac_beg -gt 1; then
2337 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2338 else
2339 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2340 fi
2341 if test ! -s conftest.s$ac_file; then
2342 ac_more_lines=false
2343 rm -f conftest.s$ac_file
2344 else
2345 if test -z "$ac_sed_cmds"; then
2346 ac_sed_cmds="sed -f conftest.s$ac_file"
2347 else
2348 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2349 fi
2350 ac_file=`expr $ac_file + 1`
2351 ac_beg=$ac_end
2352 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2353 fi
2354done
2355if test -z "$ac_sed_cmds"; then
2356 ac_sed_cmds=cat
2357fi
2358EOF
2359
2360cat >> $CONFIG_STATUS <<EOF
2361
2362CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2363EOF
2364cat >> $CONFIG_STATUS <<\EOF
2365for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2366 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2367 case "$ac_file" in
2368 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2369 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2370 *) ac_file_in="${ac_file}.in" ;;
2371 esac
2372
2373 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2374
2375 # Remove last slash and all that follows it. Not all systems have dirname.
2376 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2377 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2378 # The file is in a subdirectory.
2379 test ! -d "$ac_dir" && mkdir "$ac_dir"
2380 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2381 # A "../" for each directory in $ac_dir_suffix.
2382 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2383 else
2384 ac_dir_suffix= ac_dots=
2385 fi
2386
2387 case "$ac_given_srcdir" in
2388 .) srcdir=.
2389 if test -z "$ac_dots"; then top_srcdir=.
2390 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2391 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2392 *) # Relative path.
2393 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2394 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2395 esac
2396
2397 case "$ac_given_INSTALL" in
2398 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2399 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2400 esac
2401
2402 echo creating "$ac_file"
2403 rm -f "$ac_file"
2404 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2405 case "$ac_file" in
2406 *Makefile*) ac_comsub="1i\\
2407# $configure_input" ;;
2408 *) ac_comsub= ;;
2409 esac
2410
2411 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2412 sed -e "$ac_comsub
2413s%@configure_input@%$configure_input%g
2414s%@srcdir@%$srcdir%g
2415s%@top_srcdir@%$top_srcdir%g
2416s%@INSTALL@%$INSTALL%g
2417" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2418fi; done
2419rm -f conftest.s*
2420
2421# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2422# NAME is the cpp macro being defined and VALUE is the value it is being given.
2423#
2424# ac_d sets the value in "#define NAME VALUE" lines.
2425ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2426ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2427ac_dC='\3'
2428ac_dD='%g'
2429# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2430ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2431ac_uB='\([ ]\)%\1#\2define\3'
2432ac_uC=' '
2433ac_uD='\4%g'
2434# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2435ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2436ac_eB='$%\1#\2define\3'
2437ac_eC=' '
2438ac_eD='%g'
2439
2440if test "${CONFIG_HEADERS+set}" != set; then
2441EOF
2442cat >> $CONFIG_STATUS <<EOF
2443 CONFIG_HEADERS="config.h:config.in"
2444EOF
2445cat >> $CONFIG_STATUS <<\EOF
2446fi
2447for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2448 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2449 case "$ac_file" in
2450 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2451 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2452 *) ac_file_in="${ac_file}.in" ;;
2453 esac
2454
2455 echo creating $ac_file
2456
2457 rm -f conftest.frag conftest.in conftest.out
2458 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2459 cat $ac_file_inputs > conftest.in
2460
2461EOF
2462
2463# Transform confdefs.h into a sed script conftest.vals that substitutes
2464# the proper values into config.h.in to produce config.h. And first:
2465# Protect against being on the right side of a sed subst in config.status.
2466# Protect against being in an unquoted here document in config.status.
2467rm -f conftest.vals
2468cat > conftest.hdr <<\EOF
2469s/[\\&%]/\\&/g
2470s%[\\$`]%\\&%g
2471s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2472s%ac_d%ac_u%gp
2473s%ac_u%ac_e%gp
2474EOF
2475sed -n -f conftest.hdr confdefs.h > conftest.vals
2476rm -f conftest.hdr
2477
2478# This sed command replaces #undef with comments. This is necessary, for
2479# example, in the case of _POSIX_SOURCE, which is predefined and required
2480# on some systems where configure will not decide to define it.
2481cat >> conftest.vals <<\EOF
2482s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2483EOF
2484
2485# Break up conftest.vals because some shells have a limit on
2486# the size of here documents, and old seds have small limits too.
2487
2488rm -f conftest.tail
2489while :
2490do
2491 ac_lines=`grep -c . conftest.vals`
2492 # grep -c gives empty output for an empty file on some AIX systems.
2493 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2494 # Write a limited-size here document to conftest.frag.
2495 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2496 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2497 echo 'CEOF
2498 sed -f conftest.frag conftest.in > conftest.out
2499 rm -f conftest.in
2500 mv conftest.out conftest.in
2501' >> $CONFIG_STATUS
2502 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2503 rm -f conftest.vals
2504 mv conftest.tail conftest.vals
2505done
2506rm -f conftest.vals
2507
2508cat >> $CONFIG_STATUS <<\EOF
2509 rm -f conftest.frag conftest.h
2510 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2511 cat conftest.in >> conftest.h
2512 rm -f conftest.in
2513 if cmp -s $ac_file conftest.h 2>/dev/null; then
2514 echo "$ac_file is unchanged"
2515 rm -f conftest.h
2516 else
2517 # Remove last slash and all that follows it. Not all systems have dirname.
2518 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2519 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2520 # The file is in a subdirectory.
2521 test ! -d "$ac_dir" && mkdir "$ac_dir"
2522 fi
2523 rm -f $ac_file
2524 mv conftest.h $ac_file
2525 fi
2526fi; done
2527
2528EOF
2529cat >> $CONFIG_STATUS <<EOF
2530
2531EOF
2532cat >> $CONFIG_STATUS <<\EOF
2533
2534exit 0
2535EOF
2536chmod +x $CONFIG_STATUS
2537rm -fr confdefs* $ac_clean_files
2538test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2539
2540
2541echo
2542if test $HAVE_MODSSL = 1; then
2543 echo "mod_ssl support has been compiled into this module"
2544else
2545 echo "no mod_ssl support"
2546fi
2547
2548echo
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..1103494
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,186 @@
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(mod_log_sql.c)
3
4AC_CONFIG_HEADER(config.h:config.in)
5
6dnl OVERRIDABLE DEFAULTS
7APDSTDIR="/usr/local/apache"
8APSRCDIR="/usr/local/src/apache-1.3.27"
9MYSQLHDRDIR="/usr/include/mysql"
10MYSQLLIBDIR="/usr/lib"
11
12dnl Check for command line arguments
13AC_ARG_WITH( apache,
14 [ --with-apache=DIR Where to look for Apache's installation],
15 APDSTDIR=${withval})
16
17APXSDIR="$APDSTDIR/bin"
18APHDRDIR="$APDSTDIR/include"
19
20AC_ARG_WITH( apache-source,
21 [ --with-apache-source=DIR Where to look for Apache sources [${APSRCDIR}]],
22 APSRCDIR=${withval})
23
24AC_ARG_WITH( apache-headers,
25 [ --with-apache-headers=DIR Where to look for Apache's header files],
26 APHDRDIR=${withval})
27
28AC_ARG_WITH( apxs,
29 [ --with-apxs=DIR Where to look for apxs],
30 APXSDIR=${withval})
31
32AC_ARG_WITH( mysql-headers,
33 [ --with-mysql-headers=DIR Where to look for MySQL headers],
34 MYSQLHDRDIR=${withval})
35
36AC_ARG_WITH( mysql-libs,
37 [ --with-mysql-libs=DIR Where to look for MySQL libraries],
38 MYSQLLIBDIR=${withval})
39
40AC_ARG_ENABLE( ssl,
41 [ --disable-ssl Do not attempt to compile in SSL support],
42 WITHSSL=0,
43 WITHSSL=1)
44
45
46AC_SUBST(APDSTDIR)
47AC_SUBST(APSRCDIR)
48AC_SUBST(MYSQLHDRDIR)
49AC_SUBST(MYSQLLIBDIR)
50AC_SUBST(APXSDIR)
51AC_SUBST(APHDRDIR)
52
53echo "Using the following locations:"
54echo " Apache installed in $APDSTDIR"
55echo " Apache source in $APSRCDIR"
56echo " Apache headers in $APHDRDIR"
57echo " apxs in $APXSDIR"
58echo " MySQL headers in $MYSQLHDRDIR"
59echo " MySQL libraries in $MYSQLLIBDIR"
60
61
62AC_CANONICAL_HOST
63case "$host" in
64 *-linux*)
65 AC_DEFINE(__LINUX)
66 ;;
67 *-netbsd*)
68 AC_DEFINE(__NETBSD)
69 ;;
70 *-openbsd*)
71 AC_DEFINE(__OPENBSD)
72 ;;
73 *-solaris*)
74 AC_DEFINE(__SOLARIS)
75 ;;
76 *-sunos4*)
77 AC_DEFINE(__SUNOS)
78 ;;
79 *-freebsd*)
80 AC_DEFINE(__FREEBSD)
81 ;;
82 *-bsdi*)
83 AC_DEFINE(__BSDI)
84 ;;
85 *-apple-darwin*)
86 AC_DEFINE(__MACOSX)
87 ;;
88esac
89
90
91
92dnl ====================================================================
93dnl Checks for programs.
94AC_PROG_CC
95AC_PROG_INSTALL
96AC_PROG_LN_S
97AC_PROG_MAKE_SET
98AC_PATH_PROG(RM, rm, no, $PATH:/usr/bin:/usr/local/bin)
99if test $RM = no; then
100 AC_MSG_ERROR("rm not found in the PATH")
101fi
102AC_PATH_PROG(APXS, apxs, no, $APXSDIR)
103if test $APXS = no; then
104 AC_MSG_ERROR("apxs not found. Please specify its location using --with-apxs")
105fi
106
107AC_PATH_PROG(LYX,lyx,,$PATH:/usr/local/bin)
108AC_PATH_PROG(LATEX,latex,,$PATH:/usr/local/bin)
109AC_PATH_PROG(DVIPS,dvips,,$PATH:/usr/local/bin)
110AC_PATH_PROG(LINKS,lynx,,$PATH:/usr/local/bin)
111AC_PATH_PROG(L2H,latex2html,,$PATH:/usr/local/bin)
112
113AC_SUBST(RM)
114AC_SUBST(LYX)
115AC_SUBST(LATEX)
116AC_SUBST(DVIPS)
117AC_SUBST(LINKS)
118AC_SUBST(L2H)
119
120dnl ====================================================================
121dnl Checks for libraries.
122AC_CHECK_LIB(z,
123 main,
124 LIBS="$LIBS -lz",
125 AC_MSG_ERROR("libz not found. Compilation cannot continue without this library.") )
126AC_CHECK_FUNC( nanosleep, ,
127 AC_CHECK_LIB(rt,
128 nanosleep,
129 LIBS="$LIBS -lrt",
130 AC_MSG_ERROR("nanosleep function not available in librt.") ) )
131AC_CHECK_LIB( mysqlclient,
132 mysql_init,
133 LIBS="$LIBS -lmysqlclient",
134 AC_MSG_ERROR("libmysqlclient not found. Please specify its location using --with-mysql-libs.") )
135
136dnl ====================================================================
137dnl Checks for header files.
138AC_HEADER_STDC
139AC_HEADER_TIME
140AC_CHECK_HEADERS($APDSTDIR/include/httpd.h $APDSTDIR/include/http_config.h $APDSTDIR/include/http_log.h $APDSTDIR/include/http_core.h,
141 ,
142 [ echo "** A required header cannot be located."
143 echo " Please use the --with-apache option."; echo; exit 1])
144AC_CHECK_HEADERS($MYSQLHDRDIR/mysql.h $MYSQLHDRDIR/mysqld_error.h,
145 ,
146 [ echo "** A required header cannot be located."
147 echo " Please use the --with-mysql-headers option."; echo; exit 1])
148if test $WITHSSL = 1; then
149AC_CHECK_FILES($APSRCDIR/src/modules/ssl/mod_ssl.h,
150 AC_CHECK_HEADER(db1/ndbm.h,HAVE_MODSSL=1,HAVE_MODSSL=0),
151 HAVE_MODSSL=0)
152 if test $HAVE_MODSSL = 0; then
153 AC_MSG_WARN("SSL not enabled. Please use the --with-apache-source option if you want it enabled.")
154 fi
155else
156 AC_MSG_WARN("SSL checking/capability disabled by commandline option.")
157 HAVE_MODSSL=0
158fi
159AC_SUBST(HAVE_MODSSL)
160
161dnl ====================================================================
162dnl Checks for typedefs, structures, and compiler characteristics.
163AC_C_CONST
164AC_STRUCT_TM
165
166dnl ====================================================================
167dnl Checks for library functions.
168AC_TYPE_SIGNAL
169AC_FUNC_STRFTIME
170AC_CHECK_FUNCS(strstr atoi mysql_real_connect mysql_escape_string mysql_real_escape_string, , AC_MSG_ERROR("a necessary function is not available."))
171
172dnl ====================================================================
173dnl Create the Makefile
174AC_OUTPUT(Makefile)
175
176dnl ====================================================================
177dnl Final output
178echo
179if test $HAVE_MODSSL = 1; then
180 echo "mod_ssl support has been compiled into this module"
181else
182 echo "no mod_ssl support"
183fi
184
185echo
186dnl echo $LIBS
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..e9de238
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,251 @@
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.
30doit="${DOITPROG-}"
31
32
33# put in absolute paths if you don't have them in your path; or use env. vars.
34
35mvprog="${MVPROG-mv}"
36cpprog="${CPPROG-cp}"
37chmodprog="${CHMODPROG-chmod}"
38chownprog="${CHOWNPROG-chown}"
39chgrpprog="${CHGRPPROG-chgrp}"
40stripprog="${STRIPPROG-strip}"
41rmprog="${RMPROG-rm}"
42mkdirprog="${MKDIRPROG-mkdir}"
43
44transformbasename=""
45transform_arg=""
46instcmd="$mvprog"
47chmodcmd="$chmodprog 0755"
48chowncmd=""
49chgrpcmd=""
50stripcmd=""
51rmcmd="$rmprog -f"
52mvcmd="$mvprog"
53src=""
54dst=""
55dir_arg=""
56
57while [ 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
105done
106
107if [ x"$src" = x ]
108then
109 echo "install: no input file specified"
110 exit 1
111else
112 true
113fi
114
115if [ x"$dir_arg" != x ]; then
116 dst=$src
117 src=""
118
119 if [ -d $dst ]; then
120 instcmd=:
121 chmodcmd=""
122 else
123 instcmd=mkdir
124 fi
125else
126
127# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
128# might cause directories to be created, which would be especially bad
129# if $src (and thus $dsttmp) contains '*'.
130
131 if [ -f $src -o -d $src ]
132 then
133 true
134 else
135 echo "install: $src does not exist"
136 exit 1
137 fi
138
139 if [ x"$dst" = x ]
140 then
141 echo "install: no destination specified"
142 exit 1
143 else
144 true
145 fi
146
147# If destination is a directory, append the input filename; if your system
148# does not like double slashes in filenames, you may need to add some logic
149
150 if [ -d $dst ]
151 then
152 dst="$dst"/`basename $src`
153 else
154 true
155 fi
156fi
157
158## this sed command emulates the dirname command
159dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
160
161# Make sure that the destination directory exists.
162# this part is taken from Noah Friedman's mkinstalldirs script
163
164# Skip lots of stat calls in the usual case.
165if [ ! -d "$dstdir" ]; then
166defaultIFS='
167'
168IFS="${IFS-${defaultIFS}}"
169
170oIFS="${IFS}"
171# Some sh's can't handle IFS=/ for some reason.
172IFS='%'
173set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
174IFS="${oIFS}"
175
176pathcomp=''
177
178while [ $# -ne 0 ] ; do
179 pathcomp="${pathcomp}${1}"
180 shift
181
182 if [ ! -d "${pathcomp}" ] ;
183 then
184 $mkdirprog "${pathcomp}"
185 else
186 true
187 fi
188
189 pathcomp="${pathcomp}/"
190done
191fi
192
193if [ x"$dir_arg" != x ]
194then
195 $doit $instcmd $dst &&
196
197 if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
198 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
199 if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
200 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
201else
202
203# If we're going to rename the final executable, determine the name now.
204
205 if [ x"$transformarg" = x ]
206 then
207 dstfile=`basename $dst`
208 else
209 dstfile=`basename $dst $transformbasename |
210 sed $transformarg`$transformbasename
211 fi
212
213# don't allow the sed command to completely eliminate the filename
214
215 if [ x"$dstfile" = x ]
216 then
217 dstfile=`basename $dst`
218 else
219 true
220 fi
221
222# Make a temp file name in the proper directory.
223
224 dsttmp=$dstdir/#inst.$$#
225
226# Move or copy the file name to the temp name
227
228 $doit $instcmd $src $dsttmp &&
229
230 trap "rm -f ${dsttmp}" 0 &&
231
232# and set any options; do chmod last to preserve setuid bits
233
234# If any of these fail, we abort the whole thing. If we want to
235# ignore errors from any of these, just make sure not to ignore
236# errors from the above "$doit $instcmd $src $dsttmp" command.
237
238 if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
239 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
240 if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
241 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
242
243# Now rename the file to the real destination.
244
245 $doit $rmcmd -f $dstdir/$dstfile &&
246 $doit $mvcmd $dsttmp $dstdir/$dstfile
247
248fi &&
249
250
251exit 0
diff --git a/mod_log_sql.c b/mod_log_sql.c
index f02243e..d2c4d1d 100644
--- a/mod_log_sql.c
+++ b/mod_log_sql.c
@@ -16,7 +16,17 @@
16/* ---------* 16/* ---------*
17 * INCLUDES * 17 * INCLUDES *
18 * ---------*/ 18 * ---------*/
19#include <time.h> 19#include "config.h"
20#if TIME_WITH_SYS_TIME
21 #include <sys/time.h>
22 #include <time.h>
23#else
24 #if TM_IN_SYS_TIME
25 #include <sys/time.h>
26 #else
27 #include <time.h>
28 #endif
29#endif
20#include <stdio.h> 30#include <stdio.h>
21#include <stdlib.h> 31#include <stdlib.h>
22#include <string.h> 32#include <string.h>
@@ -52,6 +62,7 @@ MYSQL logsql_server, *logsql_server_p = NULL;
52int logsql_massvirtual = 0; 62int logsql_massvirtual = 0;
53int logsql_createtables = 0; 63int logsql_createtables = 0;
54int logsql_forcepreserve = 0; 64int logsql_forcepreserve = 0;
65char *logsql_tabletype = NULL;
55char *logsql_dbname = NULL; 66char *logsql_dbname = NULL;
56char *logsql_dbhost = NULL; 67char *logsql_dbhost = NULL;
57char *logsql_dbuser = NULL; 68char *logsql_dbuser = NULL;
@@ -289,7 +300,7 @@ static const char *extract_request_duration(request_rec *r, char *a)
289{ 300{
290 char duration[22]; /* Long enough for 2^64 */ 301 char duration[22]; /* Long enough for 2^64 */
291 302
292 ap_snprintf(duration, sizeof(duration), "%ld", time(NULL) - r->request_time); 303 ap_snprintf(duration, sizeof(duration), "%ld", (long) time(NULL) - r->request_time);
293 return pstrdup(r->pool, duration); 304 return pstrdup(r->pool, duration);
294} 305}
295 306
@@ -494,7 +505,7 @@ static const char *extract_request_timestamp(request_rec *r, char *a)
494{ 505{
495 char tstr[32]; 506 char tstr[32];
496 507
497 ap_snprintf(tstr, 32, "%ld", time(NULL)); 508 ap_snprintf(tstr, 32, "%ld", (long) time(NULL));
498 return pstrdup(r->pool, tstr); 509 return pstrdup(r->pool, tstr);
499} 510}
500 511
@@ -815,6 +826,8 @@ int safe_create_tables(logsql_state *cls, request_rec *r)
815 char *create_hin = NULL; 826 char *create_hin = NULL;
816 char *create_cookies = NULL; 827 char *create_cookies = NULL;
817 828
829 char *type_suffix = NULL;
830
818 char *createprefix = "create table if not exists `"; 831 char *createprefix = "create table if not exists `";
819 char *access_suffix = 832 char *access_suffix =
820 "` (id char(19),\ 833 "` (id char(19),\
@@ -858,12 +871,15 @@ int safe_create_tables(logsql_state *cls, request_rec *r)
858 item varchar(80),\ 871 item varchar(80),\
859 val varchar(80))"; 872 val varchar(80))";
860 873
874 if (logsql_tabletype)
875 type_suffix = ap_pstrcat( r->pool, " TYPE=", logsql_tabletype, NULL );
876
861 /* Find memory long enough to hold the whole CREATE string + \0 */ 877 /* Find memory long enough to hold the whole CREATE string + \0 */
862 create_access = ap_pstrcat(r->pool, createprefix, cls->transfer_table_name, access_suffix, NULL); 878 create_access = ap_pstrcat(r->pool, createprefix, cls->transfer_table_name, access_suffix, type_suffix, NULL);
863 create_notes = ap_pstrcat(r->pool, createprefix, cls->notes_table_name, notes_suffix, NULL); 879 create_notes = ap_pstrcat(r->pool, createprefix, cls->notes_table_name, notes_suffix, type_suffix, NULL);
864 create_hout = ap_pstrcat(r->pool, createprefix, cls->hout_table_name, headers_suffix, NULL); 880 create_hout = ap_pstrcat(r->pool, createprefix, cls->hout_table_name, headers_suffix, type_suffix, NULL);
865 create_hin = ap_pstrcat(r->pool, createprefix, cls->hin_table_name, headers_suffix, NULL); 881 create_hin = ap_pstrcat(r->pool, createprefix, cls->hin_table_name, headers_suffix, type_suffix, NULL);
866 create_cookies= ap_pstrcat(r->pool, createprefix, cls->cookie_table_name, cookies_suffix, NULL); 882 create_cookies= ap_pstrcat(r->pool, createprefix, cls->cookie_table_name, cookies_suffix, type_suffix, NULL);
867 883
868 #ifdef DEBUG 884 #ifdef DEBUG
869 ap_log_error(APLOG_MARK,DEBUGLEVEL,r->server,"mod_log_sql: create string: %s", create_access); 885 ap_log_error(APLOG_MARK,DEBUGLEVEL,r->server,"mod_log_sql: create string: %s", create_access);
@@ -887,7 +903,8 @@ int safe_create_tables(logsql_state *cls, request_rec *r)
887 } 903 }
888 904
889 if ((create_results = safe_sql_query(r, create_hin))) { 905 if ((create_results = safe_sql_query(r, create_hin))) {
890 ap_log_error(APLOG_MARK,ERRLEVEL,r->server,"mod_log_sql: failed to create header_out table"); 906 ap_log_error(APLOG_MARK,
907 ERRLEVEL,r->server,"mod_log_sql: failed to create header_out table");
891 retval = create_results; 908 retval = create_results;
892 } 909 }
893 910
@@ -936,6 +953,17 @@ const char *set_log_sql_create(cmd_parms *parms, void *dummy, int flag)
936 return NULL; 953 return NULL;
937} 954}
938 955
956const char *set_log_sql_tabletype(cmd_parms *parms, void *dummy, char *arg)
957{
958 /* These are the legal table types according to the MySQL docs:
959 * TYPE = {BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM }
960 * However, for now the module does no checking. If MySQL is passed
961 * a table type it does not understand, it defaults to MyISAM. */
962
963 logsql_tabletype = arg;
964 return NULL;
965}
966
939const char *set_log_sql_db(cmd_parms *parms, void *dummy, char *arg) 967const char *set_log_sql_db(cmd_parms *parms, void *dummy, char *arg)
940{ 968{
941 logsql_dbname = arg; 969 logsql_dbname = arg;
@@ -1200,12 +1228,12 @@ void *log_sql_make_state(pool *p, server_rec *s)
1200 1228
1201 /* These defaults are overridable in the httpd.conf file. */ 1229 /* These defaults are overridable in the httpd.conf file. */
1202 cls->transfer_table_name = NULL; /* No default b/c we want its absence to disable logging */ 1230 cls->transfer_table_name = NULL; /* No default b/c we want its absence to disable logging */
1203 cls->transfer_log_format = "AbHhmRSsTUuv"; 1231 cls->transfer_log_format = NULL;
1204 cls->notes_table_name = "notes"; 1232 cls->notes_table_name = NULL;
1205 cls->hin_table_name = "headers_in"; 1233 cls->hin_table_name = NULL;
1206 cls->hout_table_name = "headers_out"; 1234 cls->hout_table_name = NULL;
1207 cls->cookie_table_name = "cookies"; 1235 cls->cookie_table_name = NULL;
1208 cls->preserve_file = "/tmp/sql-preserve"; 1236 cls->preserve_file = NULL;
1209 1237
1210 cls->transfer_ignore_list = make_array(p, 1, sizeof(char *)); 1238 cls->transfer_ignore_list = make_array(p, 1, sizeof(char *));
1211 cls->transfer_accept_list = make_array(p, 1, sizeof(char *)); 1239 cls->transfer_accept_list = make_array(p, 1, sizeof(char *));
@@ -1219,6 +1247,106 @@ void *log_sql_make_state(pool *p, server_rec *s)
1219 return (void *) cls; 1247 return (void *) cls;
1220} 1248}
1221 1249
1250static void *log_sql_merge_state(pool *p, void *basev, void *addv)
1251{
1252 /* Make room for the merged state */
1253 logsql_state *merged =
1254 (logsql_state*)ap_pcalloc(p, sizeof(logsql_state));
1255
1256 /* Fetch the two states to merge */
1257 logsql_state *parent = (logsql_state *) basev;
1258 logsql_state *child = (logsql_state *) addv;
1259
1260 /* Child can override these, otherwise they default to parent's choice.
1261 * If the parent didn't set them, create reasonable defaults for the
1262 * ones that should have such default settings. Leave the others null. */
1263
1264 merged->transfer_table_name = child->transfer_table_name ?
1265 child->transfer_table_name : parent->transfer_table_name;
1266 /* No default for transfer_table_name because we want its absence
1267 * to disable logging. */
1268
1269
1270 merged->transfer_log_format = child->transfer_log_format ?
1271 child->transfer_log_format : parent->transfer_log_format;
1272 if (!merged->transfer_log_format)
1273 merged->transfer_log_format = "AbHhmRSsTUuv";
1274
1275
1276 merged->preserve_file = child->preserve_file ?
1277 child->preserve_file : parent->preserve_file;
1278 if (!merged->preserve_file)
1279 merged->preserve_file = "/tmp/sql-preserve";
1280
1281
1282 merged->notes_table_name = child->notes_table_name ?
1283 child->notes_table_name : parent->notes_table_name;
1284 if (!merged->notes_table_name)
1285 merged->notes_table_name = "notes";
1286
1287
1288 merged->hin_table_name = child->hin_table_name ?
1289 child->hin_table_name : parent->hin_table_name;
1290 if (!merged->hin_table_name)
1291 merged->hin_table_name = "headers_in";
1292
1293
1294 merged->hout_table_name = child->hout_table_name ?
1295 child->hout_table_name : parent->hout_table_name;
1296 if (!merged->hout_table_name)
1297 merged->hout_table_name = "headers_out";
1298
1299
1300 merged->cookie_table_name = child->cookie_table_name ?
1301 child->cookie_table_name : parent->cookie_table_name;
1302 if (!merged->cookie_table_name)
1303 merged->cookie_table_name = "cookies";
1304
1305
1306 merged->transfer_ignore_list = child->transfer_ignore_list ?
1307 child->transfer_ignore_list : parent->transfer_ignore_list;
1308
1309 merged->transfer_accept_list = child->transfer_accept_list ?
1310 child->transfer_accept_list : parent->transfer_accept_list;
1311
1312 merged->remhost_ignore_list = child->remhost_ignore_list ?
1313 child->remhost_ignore_list : parent->remhost_ignore_list;
1314
1315 merged->notes_list = child->notes_list ?
1316 child->notes_list : parent->notes_list ;
1317
1318 merged->hin_list = child->hin_list ?
1319 child->hin_list : parent->hin_list ;
1320
1321 merged->hout_list = child->hout_list ?
1322 child->hout_list : parent->hout_list ;
1323
1324 merged->cookie_list = child->cookie_list ?
1325 child->cookie_list : parent->cookie_list ;
1326
1327 merged->cookie_name = child->cookie_name ?
1328 child->cookie_name : parent->cookie_name ;
1329
1330 return (void*) merged;
1331
1332 /* Here is how mod_log_config does it: */
1333
1334 /*
1335 multi_log_state *base = (multi_log_state *) basev;
1336 multi_log_state *add = (multi_log_state *) addv;
1337
1338 add->server_config_logs = base->config_logs;
1339 if (!add->default_format) {
1340 add->default_format_string = base->default_format_string;
1341 add->default_format = base->default_format;
1342 }
1343 add->formats = ap_overlay_tables(p, base->formats, add->formats);
1344
1345 return add;
1346 */
1347}
1348
1349
1222 1350
1223/* Setup of the available httpd.conf configuration commands. 1351/* Setup of the available httpd.conf configuration commands.
1224 * Structure: command, function called, NULL, where available, how many arguments, verbose description 1352 * Structure: command, function called, NULL, where available, how many arguments, verbose description
@@ -1245,7 +1373,7 @@ command_rec log_sql_cmds[] = {
1245 {"LogSQLMachineID", set_log_sql_machine_id, NULL, RSRC_CONF, TAKE1, 1373 {"LogSQLMachineID", set_log_sql_machine_id, NULL, RSRC_CONF, TAKE1,
1246 "Machine ID that the module will log, useful in web clusters to differentiate machines"} 1374 "Machine ID that the module will log, useful in web clusters to differentiate machines"}
1247 , 1375 ,
1248 {"LogSQLRequestAccept", add_log_sql_transfer_accept, NULL, RSRC_CONF, ITERATE, 1376 {"LogSQLRequestAccept", add_log_sql_transfer_accept, NULL, RSRC_CONF, ITERATE,
1249 "List of URIs to accept for logging. Accesses that don't match will not be logged"} 1377 "List of URIs to accept for logging. Accesses that don't match will not be logged"}
1250 , 1378 ,
1251 {"LogSQLRequestIgnore", add_log_sql_transfer_ignore, NULL, RSRC_CONF, ITERATE, 1379 {"LogSQLRequestIgnore", add_log_sql_transfer_ignore, NULL, RSRC_CONF, ITERATE,
@@ -1277,6 +1405,9 @@ command_rec log_sql_cmds[] = {
1277 , 1405 ,
1278 {"LogSQLSocketFile", set_log_sql_socket_file, NULL, RSRC_CONF, TAKE1, 1406 {"LogSQLSocketFile", set_log_sql_socket_file, NULL, RSRC_CONF, TAKE1,
1279 "Name of the file to employ for socket connections to database"} 1407 "Name of the file to employ for socket connections to database"}
1408 ,
1409 {"LogSQLTableType", set_log_sql_tabletype, NULL, RSRC_CONF, TAKE1,
1410 "What kind of table to create (MyISAM, InnoDB...) when creating tables"}
1280 , 1411 ,
1281 {"LogSQLTCPPort", set_log_sql_tcp_port, NULL, RSRC_CONF, TAKE1, 1412 {"LogSQLTCPPort", set_log_sql_tcp_port, NULL, RSRC_CONF, TAKE1,
1282 "Port number to use for TCP connections to database, defaults to 3306 if not set"} 1413 "Port number to use for TCP connections to database, defaults to 3306 if not set"}
@@ -1322,37 +1453,24 @@ int log_sql_transaction(request_rec *orig)
1322 char *i_tablename; 1453 char *i_tablename;
1323 char *o_tablename; 1454 char *o_tablename;
1324 char *c_tablename; 1455 char *c_tablename;
1325 unsigned int i;
1326 1456
1327 /* Find memory long enough to hold the table name + \0. */ 1457 /* Determine the hostname and convert it to all-lower-case.
1328 a_tablename = ap_pstrcat(orig->pool, access_base, ap_get_server_name(orig), NULL); 1458 * Also change any dots to underscores.
1329 n_tablename = ap_pstrcat(orig->pool, notes_base, ap_get_server_name(orig), NULL); 1459 */
1330 i_tablename = ap_pstrcat(orig->pool, hin_base, ap_get_server_name(orig), NULL); 1460 char *p;
1331 o_tablename = ap_pstrcat(orig->pool, hout_base, ap_get_server_name(orig), NULL); 1461 char *servname = (char *)ap_get_server_name(orig);
1332 c_tablename = ap_pstrcat(orig->pool, cookie_base, ap_get_server_name(orig), NULL); 1462 for (p = servname; *p != '\0'; p++) {
1333 1463 *p = tolower((unsigned char) *p);
1334 /* Transform any dots to underscores */ 1464 if (*p == '.') *p = '_';
1335 for (i = 0; i < strlen(a_tablename); i++) {
1336 if (a_tablename[i] == '.')
1337 a_tablename[i] = '_';
1338 }
1339 for (i = 0; i < strlen(n_tablename); i++) {
1340 if (n_tablename[i] == '.')
1341 n_tablename[i] = '_';
1342 }
1343 for (i = 0; i < strlen(i_tablename); i++) {
1344 if (i_tablename[i] == '.')
1345 i_tablename[i] = '_';
1346 }
1347 for (i = 0; i < strlen(o_tablename); i++) {
1348 if (o_tablename[i] == '.')
1349 o_tablename[i] = '_';
1350 }
1351 for (i = 0; i < strlen(c_tablename); i++) {
1352 if (c_tablename[i] == '.')
1353 c_tablename[i] = '_';
1354 } 1465 }
1355 1466
1467 /* Find memory long enough to hold the table name + \0. */
1468 a_tablename = ap_pstrcat(orig->pool, access_base, servname, NULL);
1469 n_tablename = ap_pstrcat(orig->pool, notes_base, servname, NULL);
1470 i_tablename = ap_pstrcat(orig->pool, hin_base, servname, NULL);
1471 o_tablename = ap_pstrcat(orig->pool, hout_base, servname, NULL);
1472 c_tablename = ap_pstrcat(orig->pool, cookie_base, servname, NULL);
1473
1356 /* Tell this virtual server its transfer table name, and 1474 /* Tell this virtual server its transfer table name, and
1357 * turn on create_tables, which is implied by massvirtual. 1475 * turn on create_tables, which is implied by massvirtual.
1358 */ 1476 */
@@ -1667,7 +1785,7 @@ module sql_log_module = {
1667 NULL, /* create per-dir config */ 1785 NULL, /* create per-dir config */
1668 NULL, /* merge per-dir config */ 1786 NULL, /* merge per-dir config */
1669 log_sql_make_state, /* create server config */ 1787 log_sql_make_state, /* create server config */
1670 NULL, /* merge server config */ 1788 log_sql_merge_state, /* merge server config */
1671 log_sql_cmds, /* config directive table */ 1789 log_sql_cmds, /* config directive table */
1672 NULL, /* [9] content handlers */ 1790 NULL, /* [9] content handlers */
1673 NULL, /* [2] URI-to-filename translation */ 1791 NULL, /* [2] URI-to-filename translation */