/[LeafOK_CVS]/pvpgn-1.7.4/src/configure.in
ViewVC logotype

Contents of /pvpgn-1.7.4/src/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Tue Jun 6 03:41:37 2006 UTC (19 years, 9 months ago) by sysadm
Branch: GNU, MAIN
CVS Tags: arelease, HEAD
Changes since 1.1: +0 -0 lines
no message

1 #
2 # Copyright (C) 1999 Rob Crittenden (rcrit@greyoak.com)
3 # Copyright (C) 1999,2000 Ross Combs (rocombs@cs.nmsu.edu)
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 #
19
20 # Process this file with autoconf to produce a configure script.
21 AC_INIT(bnetd/handle_bnet.c)
22 AC_CONFIG_HEADER(config.h)
23
24 AUTOCONF_CONFIG_DIR="autoconf"
25 AC_CONFIG_AUX_DIR(${AUTOCONF_CONFIG_DIR})
26 builtin(include,autoconf/ccstdc.m4)
27 builtin(include,autoconf/mkdir.m4)
28
29 AC_CANONICAL_SYSTEM
30
31 # Checks for programs.
32 AC_PROG_CC
33 AC_PROG_INSTALL
34
35 # Checks compiler.
36 AC_PROG_CPP
37
38 # Checks for systems.
39 AC_AIX
40 AC_ISC_POSIX
41 AC_MINIX
42
43 # Custom checks.
44 zwarnflags=""
45 AC_ARG_WITH(warn, [ --with-warn enable compiler warnings], [zwarnflags="-pedantic -Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wunreachable-code -Winline -Wpacked -Wno-sign-compare"])
46
47 zlangflags=""
48 AC_ARG_WITH(ansi, [ --with-ansi use ANSI C mode], [zlangflags="-ansi -pedantic"])
49
50 extra_include=""
51 AC_ARG_WITH(includes, [ --with-includes=DIR search include DIR for header files], [
52 case "x$withval" in
53 x/*|x.*)
54 AC_MSG_RESULT([adding ${withval} to include search path])
55 if test ! -d ${withval}; then
56 AC_MSG_RESULT([Warning: directory ${withval} does not exist])
57 fi
58 extra_include="${extra_include} -I${withval}"
59 ;;
60 *)
61 AC_MSG_RESULT([not adding any includes])
62 ;;
63 esac])
64
65 extra_lib_dir=""
66 AC_ARG_WITH(libraries, [ --with-libraries=DIR search library DIR for libraries], [
67 case "x${withval}" in
68 x/*|x.*)
69 AC_MSG_RESULT([adding ${withval} to library search path])
70 if test ! -d ${withval}; then
71 AC_MSG_RESULT([Warning: directory ${withval} does not exist])
72 fi
73 extra_lib_dir="${extra_lib_dir} -L${withval}"
74 ;;
75 *)
76 AC_MSG_RESULT([not adding any libs])
77 ;;
78 esac])
79
80 extra_lib=""
81 AC_ARG_WITH(efence, [ --with-efence link with Electric Fence to find memory problems], [extra_lib="${extra_lib} -lefence"])
82
83 AC_ARG_WITH(mysql, [ --with-mysql include MySQL user accounts support], [ac_with_mysql='yes'])
84
85 AC_ARG_WITH(pgsql, [ --with-pgsql include PostgreSQL user accounts support], [ac_with_pgsql='yes'])
86
87 AC_ARG_WITH(mssql, [ --with-mssql include MSSQL user accounts support (requires FreeTDS includes/libs)], [ac_with_mssql='yes'])
88
89 extra_define=""
90 dnl Enable poll()
91 AC_ARG_ENABLE(poll,
92 [ --enable-poll Enable poll() instead of select(). Normally poll
93 is preferred over select, but configure knows poll
94 is broken on some platforms. If you think you are
95 smarter than the configure script, you may enable
96 poll with this option.
97 --disable-poll Disable the use of poll().],
98 [
99 case "$enableval" in
100 yes)
101 echo "Forcing poll() to be enabled"
102 ac_cv_func_poll='yes'
103 ;;
104 no)
105 echo "Forcing poll() to be disabled"
106 ac_cv_func_poll='no'
107 ;;
108 esac
109 ])
110
111 dnl Shamesly stolen from squid 2.3 configure.in
112 dnl This has to be before AC_CHECK_FUNCS
113 # Disable poll() on certain platforms. Override by setting ac_cv_func_poll
114 # when running configure.
115 if test -z "$ac_cv_func_poll"; then
116 case "$host" in
117 [alpha-dec-osf3.*])
118 # John Kay (jkay@nlanr.net) 19970818
119 echo "disabling poll for $host..."
120 ac_cv_func_poll='no'
121 ;;
122 [*-hp-hpux*.*])
123 # Duane Wessels
124 echo "disabling poll for $host..."
125 ac_cv_func_poll='no'
126 ;;
127 [*-linux-*])
128 # Henrik Nordstrom (hno@hem.passagen.se) 19980817
129 # poll is problematic on Linux. We disable it
130 # by default until Linux gets it right.
131 rev=`uname -r | awk -F. '{printf "%03d%03d",$1,$2}'`
132 if test $rev -lt 002002; then
133 echo "disabling poll for $host < 2.2..."
134 ac_cv_func_poll='no'
135 fi
136 ;;
137 [powerpc-ibm-aix4.1.*])
138 # Mike Laster (mlaster@metavillage.com) 19981021
139 echo "disabling poll for $host..."
140 ac_cv_func_poll='no'
141 ;;
142 [*-pc-sco3.2*])
143 # Robert Side <rside@aiinc.bc.ca>
144 # Mon, 18 Jan 1999 17:48:00 GMT
145 echo "disabling poll for $host..."
146 ac_cv_func_poll='no'
147 ;;
148 esac
149 fi
150
151 # disable parts of the build process
152 AC_ARG_ENABLE(bnetd,
153 [ --enable-bnetd Enable building of bnetd server (default)
154 --disable-bnetd Disable building of bnetd server])
155 AC_ARG_ENABLE(d2cs,
156 [ --enable-d2cs Enable building of d2cs server (default)
157 --disable-d2cs Disable building of d2cs server])
158 AC_ARG_ENABLE(d2dbs,
159 [ --enable-d2dbs Enable building of d2dbs server (default)
160 --disable-d2dbs Disable building of d2dbs server])
161
162 LDFLAGS="${LDFLAGS} ${extra_lib_dir}"
163 LIBS="${LIBS} ${extra_lib}"
164 CFLAGS="${CFLAGS} ${zlangflags} ${zwarnflags}"
165 DEFINES="${DEFINES} ${extra_define}"
166 CPPFLAGS="${CPPFLAGS} ${extra_include}"
167
168 # This is our invention so we have to substitute it ourselves
169 # autoconf uses DEFS
170 AC_SUBST(DEFINES)
171 AC_SUBST(enable_bnetd)
172 AC_SUBST(enable_d2cs)
173 AC_SUBST(enable_d2dbs)
174
175 # Checks for compiler quirks.
176 AC_PROG_GCC_TRADITIONAL
177 AM_PROG_CC_STDC
178 AC_C_CONST
179 AC_C_INLINE
180 #AC_EXEEXT
181
182 # Checks for libraries.
183 AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"])
184
185 AC_CHECK_LIB(z, compress, [LIBS="$LIBS -lz"])
186
187 mysql_include_path=""
188 dnl Detecting mysql paths
189 if test "$ac_with_mysql" = "yes" ; then
190 echo -n "checking for mysql include path ... "
191 mysql_try_includes="/usr/include /usr/include/mysql /usr/local/include /usr/local/include/mysql /usr/local/mysql/include /usr/local/mysql/include/mysql"
192 for i in `echo ${mysql_try_includes}`; do
193 if test -f "${i}/mysql.h" ; then
194 echo ${i}
195 CPPFLAGS="${CPPFLAGS} -I${i}"
196 mysql_include_path=${i}
197 break
198 fi
199 done
200 fi
201
202 mysql_lib_path=""
203 if test "$ac_with_mysql" = "yes" ; then
204 AC_CHECK_LIB(mysqlclient, mysql_init , [DEFINES="${DEFINES} -DWITH_SQL_MYSQL" ; LIBS="${LIBS} -lmysqlclient"], [
205 echo -n "checking for mysql lib path ... "
206 mysql_try_libs="/usr/lib /usr/lib/mysql /usr/local/lib /usr/local/lib/mysql /usr/local/mysql/lib /usr/local/mysql/lib/mysql"
207 for i in `echo ${mysql_try_libs}`; do
208 if test -f "${i}/libmysqlclient.so" -o -f "${i}/libmysqlclient.a" ; then
209 echo ${i}
210 save_ldflags="${LDFLAGS}"
211 LDFLAGS="${LDFLAGS} -L${i}"
212 AC_CHECK_LIB(mysqlclient, mysql_close , [DEFINES="${DEFINES} -DWITH_SQL_MYSQL" ; LIBS="${LIBS} -lmysqlclient" ; mysql_lib_path="${i}"], [LDFLAGS="${save_ldflags}"])
213 break
214 fi
215 done
216 ])
217 fi
218
219 pgsql_include_path=""
220 dnl Detecting pgsql paths
221 if test "$ac_with_pgsql" = "yes" ; then
222 echo -n "checking for pgsql include path ... "
223 pgsql_try_includes="/usr/include /usr/include/pgsql /usr/local/include /usr/local/include/pgsql /usr/local/pgsql/include"
224 for i in `echo ${pgsql_try_includes}`; do
225 if test -f "${i}/libpq-fe.h" ; then
226 echo ${i}
227 CPPFLAGS="${CPPFLAGS} -I${i}"
228 pgsql_include_path=${i}
229 break
230 fi
231 done
232 fi
233
234 pgsql_lib_path=""
235 if test "$ac_with_pgsql" = "yes" ; then
236 AC_CHECK_LIB(pq, PQsetdbLogin , [DEFINES="${DEFINES} -DWITH_SQL_PGSQL" ; LIBS="${LIBS} -lpq"], [
237 echo -n "checking for pgsql lib path ... "
238 pgsql_try_libs="/usr/lib /usr/lib/pgsql /usr/local/lib /usr/local/lib/pgsql /usr/local/pgsql/lib"
239 for i in `echo ${pgsql_try_libs}`; do
240 if test -f "${i}/libpq.so" -o -f "${i}/libpq.a" ; then
241 echo ${i}
242 save_ldflags="${LDFLAGS}"
243 LDFLAGS="${LDFLAGS} -L${i}"
244 AC_CHECK_LIB(pq, PQfinish , [DEFINES="${DEFINES} -DWITH_SQL_PGSQL" ; LIBS="${LIBS} -lpq" ; pgsql_lib_path="${i}"], [LDFLAGS="${save_ldflags}"])
245 break
246 fi
247 done
248 ])
249 fi
250
251 mssql_include_path=""
252 dnl Detecting mssql paths
253 if test "$ac_with_mssql" = "yes" ; then
254 echo -n "checking for mssql/FreeTDS include path ... "
255 mssql_try_includes="/usr/include /usr/include/freetds /usr/local/include /usr/local/include/freetds /usr/local/freetds/include"
256 for i in `echo ${mssql_try_includes}`; do
257 if test -f "${i}/sqlfront.h" ; then
258 echo ${i}
259 CPPFLAGS="${CPPFLAGS} -I${i}"
260 mssql_include_path=${i}
261 break
262 fi
263 done
264 fi
265
266 mssql_lib_path=""
267 if test "$ac_with_mssql" = "yes" ; then
268 AC_CHECK_LIB(sybdb, dbinit, [DEFINES="${DEFINES} -DWITH_SQL_MSSQL" ; LIBS="${LIBS} -lsybdb"], [
269 echo -n "checking for mssql/FreeTDS lib path ... "
270 mssql_try_libs="/usr/lib /usr/lib/freetds /usr/local/lib /usr/local/lib/freetds /usr/local/freetds/lib"
271 for i in `echo ${mssql_try_libs}`; do
272 if test -f "${i}/libsybdb.so" -o -f "${i}/libsybdb.a" ; then
273 echo ${i}
274 save_ldflags="${LDFLAGS}"
275 LDFLAGS="${LDFLAGS} -L${i}"
276 AC_CHECK_LIB(sybdb, dbclose, [DEFINES="${DEFINES} -DWITH_SQL_MSSQL" ; LIBS="${LIBS} -lsybdb" ; mssql_lib_path="${i}"], [LDFLAGS="${save_ldflags}"])
277 break
278 fi
279 done
280 ])
281 fi
282
283 AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])
284 AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])
285 AC_CHECK_LIB(resolv, inet_aton, [LIBS="$LIBS -lresolv"])
286 dnl BeOS BONE...
287 AC_CHECK_LIB(bind, __inet_aton, [LIBS="$LIBS -lbind"])
288 case "$host" in
289 [*-beos*])
290 if test "$ac_cv_lib_bind___inet_aton" = "yes"; then
291 dnl force things, AC_CHECK_FUNC will never get the mangled versions anyway.
292 echo "Forcing inet_aton() and inet_ntoa() to be enabled"
293 ac_cv_func_inet_aton='yes'
294 ac_cv_func_inet_ntoa='yes'
295 fi
296 ;;
297 esac
298
299 # Checks for header files.
300 AC_HEADER_DIRENT
301 AC_HEADER_STDC
302 AC_HEADER_TIME
303 AC_HEADER_STAT
304 AC_CHECK_HEADERS(fcntl.h sys/time.h time.h sys/select.h string.h strings.h unistd.h stdarg.h varargs.h malloc.h sys/utsname.h sys/timeb.h sys/socket.h sys/param.h netinet/in.h arpa/inet.h netdb.h termios.h stddef.h memory.h sys/types.h sys/wait.h sys/ioctl.h stdint.h sys/file.h limits.h poll.h sys/poll.h stropts.h sys/stropts.h sys/stat.h pwd.h grp.h dir.h direct.h sys/mman.h sys/event.h sys/epoll.h sys/resource.h assert.h)
305
306 # Checks for typedefs and structures
307 AC_STRUCT_TM
308 AC_TYPE_PID_T
309 AC_TYPE_SIGNAL
310 AC_TYPE_OFF_T
311 AC_TYPE_SIZE_T
312 AC_CHECK_SIZEOF(unsigned char, 1)
313 AC_CHECK_SIZEOF(unsigned short, 2)
314 AC_CHECK_SIZEOF(unsigned int, 4)
315 AC_CHECK_SIZEOF(unsigned long, 4)
316 AC_CHECK_SIZEOF(unsigned long long, 0)
317
318 # Checks for library functions.
319 AC_FUNC_MMAP
320 AC_FUNC_STRFTIME
321 AC_FUNC_VPRINTF
322 AC_FUNC_SETPGRP
323 AC_FUNC_CLOSEDIR_VOID
324 AC_FUNC_MKDIR_ARGS
325 AC_CHECK_FUNCS(gethostname gettimeofday select socket strdup strtoul strerror inet_aton inet_ntoa uname recv send recvfrom sendto uname fork getpid sigaction sigprocmask sigaddset setpgid setpgrp ftime strcasecmp strncasecmp stricmp strnicmp chdir difftime strchr strrchr index rindex memcpy memset memmove bcopy wait waitpid pipe getenv ioctl setsid mktime poll gethostbyname getservbyname getlogin pow getpwnam getgrnam getuid getgid setuid setgid mkdir _mkdir strsep getopt kqueue setitimer epoll_create getrlimit vsnprintf _vsnprintf)
326
327 if test X"${am_cv_prog_cc_stdc}" = X"no"; then
328 COMPILEANSI1='${PREPROCESS} $< | sed '"'"'s/^# *\([0-9][0-9]*\) *\([^ ]*[a-z][^ ]*\) *.*$$/#line \1 \2/'"'"' | ${SRC_ACDIR}/ansi2knr > ${SRC_SRCDIR}/.ansi2knr_tmp.c'
329 COMPILEANSI2='${COMPILE} ${SRC_SRCDIR}/.ansi2knr_tmp.c -o $@'
330 COMPILEANSI3='@${RMF} ${SRC_SRCDIR}/.ansi2knr_tmp.c'
331 ANSI2KNR_TMP='${SRC_SRCDIR}/.ansi2knr_tmp.c'
332 ANSI2KNR_DEP='${SRC_ACDIR}/ansi2knr'
333 else
334 COMPILEANSI1='${COMPILE} $< -o $@'
335 COMPILEANSI2='@:'
336 COMPILEANSI3='@:'
337 ANSI2KNR_TMP=''
338 ANSI2KNR_DEP=''
339 fi
340 AC_SUBST(COMPILEANSI1)
341 AC_SUBST(COMPILEANSI2)
342 AC_SUBST(COMPILEANSI3)
343 AC_SUBST(ANSI2KNR_TMP)
344 AC_SUBST(ANSI2KNR_DEP)
345
346 AC_OUTPUT(Makefile)

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1