aboutsummaryrefslogtreecommitdiff
path: root/cvs/cvsweb.cgi/code/nel/configure.in?rev=1.55&content-type=text/x-cvsweb-markup&hideattic=0&sortby=rev/index.html
blob: 43e9d1b5a548c15b110d709167c868034ef0d2b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD><style>		A { color:black }</style>
<!-- hennerik CVSweb $Revision: 1.93 $ -->
<TITLE>code/nel/configure.in - view - 1.55</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee">
<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="configure.in?hideattic=0&amp;sortby=rev"><IMG SRC="/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="configure.in?hideattic=0&amp;sortby=rev">configure.in</A>
 CVS log</b> <IMG SRC="/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to  <a href="/cvs/cvsweb.cgi/?hideattic=0&amp;sortby=rev">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?hideattic=0&amp;sortby=rev">code</a> / <a href="/cvs/cvsweb.cgi/code/nel/?hideattic=0&amp;sortby=rev">nel</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File:  <a href="/cvs/cvsweb.cgi/?hideattic=0&amp;sortby=rev">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?hideattic=0&amp;sortby=rev">code</a> / <a href="/cvs/cvsweb.cgi/code/nel/?hideattic=0&amp;sortby=rev">nel</a> / <a href="/cvs/cvsweb.cgi/code/nel/configure.in?hideattic=0&amp;sortby=rev">configure.in</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/nel/configure.in?rev=1.55&amp;hideattic=0&amp;sortby=rev" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nel/configure.in?rev=1.55','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
Revision <B>1.55</B>, <i>Wed Nov  7 16:25:13 2001 UTC</i> (8 months, 2 weeks ago) by <i>valignat</i>
<BR>Branch: <b>MAIN</b>
<BR>Changes since <b>1.54: +7 -1
 lines</b><PRE>
BUGFIX on the libs options list for nel.
</PRE>
</td></tr></table><HR noshade><PRE>dnl
dnl Configuration script for NeL
dnl
dnl $Id: configure.in,v 1.55 2001/11/07 16:25:13 valignat Exp $
dnl 

dnl Process this file with autoconf to produce a configure script.

AC_INIT(include/nel/nel.h)


dnl MAJOR_VERSION correspond to the CURRENT interface number.
dnl MINOR_VERSION correspond to the interface REVISION (implementation)
dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; number.
dnl PICO_VERSION correspond to the interface AGE, which is the number
dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;of previous additional interfaces supported by this library.
dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;It must be less than or equal to CURRENT.

MAJOR_VERSION=0
MINOR_VERSION=3
PICO_VERSION=0

VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PICO_VERSION

AM_INIT_AUTOMAKE(nel,$VERSION)

LIBTOOL_VERSION=$MAJOR_VERSION:$MINOR_VERSION:$PICO_VERSION

AC_SUBST(VERSION)
AC_SUBST(LIBTOOL_VERSION)

AM_CONFIG_HEADER(include/nelconfig.h)


dnl The following hack should ensure that configure doesnt add optimizing
dnl or debugging flags to CFLAGS or CXXFLAGS
CFLAGS=&quot;$CFLAGS -ftemplate-depth-24&quot;
CXXFLAGS=&quot;$CXXFLAGS -ftemplate-depth-24&quot;


dnl ====================================================================
dnl Checks NeL modules (net, 3d, ai) to install / Disable

dnl the misc is mandatory, it is use by the other modules.
NEL_SUBDIRS=&quot;misc&quot;

dnl Network library
AC_ARG_ENABLE( net,
 &nbsp; &nbsp;[ &nbsp;--disable-net &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; disable compilation and install of NeL Network.],
 &nbsp; &nbsp;, enable_net=yes )

if test $enable_net = &quot;no&quot;;
then
 &nbsp; AC_MSG_RESULT(disable NEL Network.)
else
 &nbsp; NEL_SUBDIRS=&quot;$NEL_SUBDIRS net&quot;
fi

dnl 3D library
AC_ARG_ENABLE( 3d,
 &nbsp; &nbsp;[ &nbsp;--disable-3d &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;disable compilation and install of NeL 3D.],
 &nbsp; &nbsp;, enable_3d=yes )

if test $enable_3d = &quot;no&quot;;
then
 &nbsp; AC_MSG_RESULT(disable NEL 3D.)
else
 &nbsp; NEL_SUBDIRS=&quot;$NEL_SUBDIRS 3d&quot;
fi

dnl PACS library
AC_ARG_ENABLE( pacs,
 &nbsp; &nbsp;[ &nbsp;--disable-pacs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;disable compilation and install of NeL PACS.],
 &nbsp; &nbsp;, enable_pacs=yes )

if test $enable_pacs = &quot;no&quot;;
then
 &nbsp; AC_MSG_RESULT(disable NEL PACS.)
else
 &nbsp; NEL_SUBDIRS=&quot;$NEL_SUBDIRS pacs&quot;
fi

dnl Sound library
AC_ARG_ENABLE( sound,
 &nbsp; &nbsp;[ &nbsp;--enable-sound &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enable compilation and install of NeL Sound.],
 &nbsp; &nbsp;, enable_sound=no )

if test $enable_sound = &quot;yes&quot;;
then
 &nbsp; AC_MSG_RESULT(enable NEL Sound.)
 &nbsp; NEL_SUBDIRS=&quot;$NEL_SUBDIRS sound&quot;
fi

dnl AI library
AC_ARG_ENABLE( ai,
 &nbsp; &nbsp;[ &nbsp;--enable-ai &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enable compilation and install of NeL AI.],
 &nbsp; &nbsp;, enable_ai=no )

if test $enable_ai = &quot;yes&quot;;
then
 &nbsp; AC_MSG_RESULT(enable NEL AI.)
 &nbsp; NEL_SUBDIRS=&quot;$NEL_SUBDIRS ai&quot;
fi

AC_SUBST(enable_net)
AC_SUBST(enable_3d)
AC_SUBST(enable_pacs)
AC_SUBST(enable_sound)
AC_SUBST(enable_ai)

AC_SUBST(NEL_SUBDIRS)


dnl ====================================================================
dnl Checks for programs.

AC_PROG_MAKE_SET

AC_PROG_CC
AC_PROG_CXX

AM_PROG_LIBTOOL

AM_SANITY_CHECK

AC_PROG_YACC
AM_PROG_LEX

AC_PROG_INSTALL


dnl ==========
dnl Python
dnl ==========

AC_ARG_WITH( python,
 &nbsp; &nbsp;[ &nbsp;--with-python=&lt;path&gt; &nbsp; &nbsp;path to the Python prefix installation directory.
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local],
 &nbsp; &nbsp;[ PYTHON_PREFIX=$withval
 &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(using Python located in $withval.)]
)

if test ! &quot;$PYTHON_PREFIX&quot; = &quot;&quot;
then
 &nbsp; &nbsp;PATH=&quot;$PYTHON_PREFIX/bin:$PATH&quot;
fi

AC_ARG_WITH( python-version,
 &nbsp; &nbsp;[ &nbsp;--with-python-version=&lt;version&gt;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Python version to use, e.g. 1.5],
 &nbsp; &nbsp;[ PYTHON_VERSION=$withval
 &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(using Python $withval.)]
)

if test ! &quot;$PYTHON_VERSION&quot; = &quot;&quot;
then
 &nbsp; &nbsp;PYTHON_EXEC=&quot;python$PYTHON_VERSION&quot;
else
 &nbsp; &nbsp;PYTHON_EXEC=&quot;python python2.0 python1.5&quot;
fi

AC_PATH_PROGS(PYTHON, $PYTHON_EXEC, no, $PATH)
if test &quot;$PYTHON&quot; = &quot;no&quot; -a &quot;$enable_ai&quot; = &quot;yes&quot;
then
 &nbsp; &nbsp;AC_MSG_ERROR([Python is needed to compile NeL (www.python.org)])
fi


dnl ====================================================================
dnl Configure Settings

dnl Use C++ compiler as a default for the compilation test.
AC_LANG_CPLUSPLUS


dnl ====================================================================
dnl Checks for typedefs, structures, and compiler characteristics.

dnl Supress GCC &quot;multi-character character constant&quot; warnings.
if test &quot;X$CC&quot; = &quot;Xgcc&quot;;
then
 &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -Wno-multichar&quot;
fi

dnl Add the define _REENTRANT for a correct use of the threads
if test &quot;X$CC&quot; = &quot;Xgcc&quot;;
then
 &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -D_REENTRANT&quot;
fi



dnl ====================================================================
dnl Checks for header files.

AC_STDC_HEADERS
AC_CHECK_HEADERS(fcntl.h unistd.h)


dnl ==========
dnl X11
dnl ==========

AC_PATH_X
 &nbsp; &nbsp;
if test ! &quot;$no_x&quot; = &quot;yes&quot;
then
 &nbsp; &nbsp;if test ! X&quot;$x_libraries&quot; = X
 &nbsp; &nbsp;then
 &nbsp; &nbsp; &nbsp; &nbsp;LIBS=&quot;$LIBS -L$x_libraries&quot;
 &nbsp; &nbsp;fi
 &nbsp; &nbsp;if test ! X&quot;$x_includes&quot; = X
 &nbsp; &nbsp;then
 &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$x_includes&quot;
 &nbsp; &nbsp;fi
else
 &nbsp; &nbsp;if test &quot;$enable_3d&quot; = &quot;yes&quot;
 &nbsp; &nbsp;then
 &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR(X11 must be installed.)
 &nbsp; &nbsp;fi
fi


dnl ==========
dnl STLPort
dnl ==========

dnl Ask user for path to the STLport files location
AC_ARG_WITH( stlport,
 &nbsp; &nbsp;[ &nbsp;--with-stlport=&lt;path&gt; &nbsp; path to the STLPort install files directory.
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport])

AC_ARG_WITH( stlport-include,
 &nbsp; &nbsp;[ &nbsp;--with-stlport-include=&lt;path&gt;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort header files directory.
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/stlport])

AC_ARG_WITH( stlport-lib,
 &nbsp; &nbsp;[ &nbsp;--with-stlport-lib=&lt;path&gt;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort library files directory.
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/lib])

if test &quot;$with_stlport&quot; != &quot;no&quot;
then

# &nbsp; &nbsp;if test -z &quot;$with_stlport&quot; &amp;&amp; test -z &quot;$with_stlport_lib&quot; -o -z &quot;$with_stlport_include&quot; 
# &nbsp; &nbsp;then
# &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([You must call configure with the --with-stlport or --with-stlport-lib and with-stlport-include options.
#This tells configure where to find the STLPort files.])
# &nbsp; &nbsp;fi

 &nbsp; &nbsp;if test $with_stlport
 &nbsp; &nbsp;then
 &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(using STLPort files located in $with_stlport)

 &nbsp; &nbsp; &nbsp; &nbsp;STLPORT_CFLAGS=&quot;-I$with_stlport/stlport&quot;
 &nbsp; &nbsp; &nbsp; &nbsp;STLPORT_LIB=&quot;-L$with_stlport/lib&quot;
 &nbsp; &nbsp;fi
else
 &nbsp; &nbsp;no_stlport=&quot;yes&quot;
 &nbsp; &nbsp;AC_MSG_RESULT(*** Override the use of the STLPorts (EXPERIMENTAL) ***)
fi

if test -z &quot;$no_stlport&quot; -a &quot;$with_stlport_include&quot;
then
 &nbsp; &nbsp;AC_MSG_RESULT(using STLPort header files located in $with_stlport_include)
 &nbsp; &nbsp;STLPORT_CFLAGS=&quot;-I$with_stlport_include&quot;
fi

if test -z &quot;$no_stlport&quot; -a &nbsp;&quot;$with_stlport_lib&quot;
then
 &nbsp; &nbsp;AC_MSG_RESULT(using STLPort library files located in $with_stlport_lib)
 &nbsp; &nbsp;STLPORT_LIB=&quot;-L$with_stlport_lib&quot;
fi


dnl ==========
dnl OpenAL
dnl ==========

dnl Ask user for path to the OpenAL files location
AC_ARG_WITH( openal,
 &nbsp; &nbsp;[ &nbsp;--with-openal=&lt;path&gt; &nbsp; path to the OpenAL install files directory.
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])

AC_ARG_WITH( openal-include,
 &nbsp; &nbsp;[ &nbsp;--with-openal-include=&lt;path&gt;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL header files directory.
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])

AC_ARG_WITH( openal-lib,
 &nbsp; &nbsp;[ &nbsp;--with-openal-lib=&lt;path&gt;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL library files directory.
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])

if test $with_openal
then
 &nbsp; &nbsp;AC_MSG_RESULT(using OpenAL files located in $with_openal)

 &nbsp; &nbsp;OPENAL_CFLAGS=&quot;-I$with_openal/include&quot;
 &nbsp; &nbsp;OPENAL_LIB=&quot;-L$with_openal/lib&quot;
fi

if test &quot;$with_openal_include&quot;
then
 &nbsp; &nbsp;AC_MSG_RESULT(using OpenAL header files located in $with_openal_include)
 &nbsp; &nbsp;OPENAL_CFLAGS=&quot;-I$with_openal_include&quot;
fi

if test &quot;$with_openal_lib&quot;
then
 &nbsp; &nbsp;AC_MSG_RESULT(using OpenAL library files located in $with_openal_lib)
 &nbsp; &nbsp;OPENAL_LIB=&quot;-L$with_openal_lib&quot;
fi


dnl ==========
dnl Python
dnl ==========

PYTHON_PREFIX=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.prefix)'`
PYTHON_VERSION=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.version[[:3]])'`

PYTHON_CFLAGS=&quot;-I$PYTHON_PREFIX/include/python$PYTHON_VERSION&quot;
PYTHON_LIBS=&quot;-L$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config -lpython$PYTHON_VERSION&quot;

_CPPFLAGS=&quot;$CPPFLAGS&quot;
CPPFLAGS=&quot;$CXXFLAGS ${PYTHON_CFLAGS}&quot;

AC_SUBST(PYTHON_CFLAGS)

AC_MSG_CHECKING(for Python header files)
AC_EGREP_CPP( yo_python,
[#include &lt;Python.h&gt;
 &nbsp; yo_python
],
[ AC_MSG_RESULT(ok)],
 &nbsp;AC_MSG_RESULT(no)
 &nbsp;if test &quot;$enable_ai&quot; = &quot;yes&quot;
 &nbsp;then
 &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python is needed to compile NeL (www.python.org).])
 &nbsp;fi
)

CPPFLAGS=&quot;$_CPPFLAGS&quot;

AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_LIBS)


dnl ==========
dnl Debug/optimized compilation mode
dnl ==========

MAX_C_OPTIMIZE=&quot;-O6&quot;

dnl Build optimized or debug version ?
dnl First check for gcc and g++
if test &quot;$ac_cv_prog_gcc&quot; = &quot;yes&quot;
then
 &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
 &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;-O&quot;
 &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;$MAX_C_OPTIMIZE&quot;
else
 &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
 &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;&quot;
 &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;-O&quot;
fi

if test &quot;$ac_cv_prog_cxx_g&quot; = &quot;yes&quot;
then
 &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
 &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;-O&quot;
 &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O3&quot;
else
 &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
 &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;&quot;
 &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O&quot;
fi

AC_ARG_WITH(debug,
 &nbsp; &nbsp;[ &nbsp;--with-debug[=full] &nbsp; &nbsp; Build a debug version (huge libraries)
 &nbsp;--without-debug &nbsp; &nbsp; &nbsp; &nbsp; Build without debugging code (default)],
 &nbsp; &nbsp;[with_debug=$withval],
 &nbsp; &nbsp;[with_debug=no])

if test &quot;$with_debug&quot; = &quot;yes&quot;
then
 &nbsp; &nbsp;dnl Medium debug.
 &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC $CFLAGS&quot;
 &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX $CXXFLAGS&quot;
else
 &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;full&quot;
 &nbsp; &nbsp;then
 &nbsp; &nbsp; &nbsp; &nbsp;dnl Full debug. Very slow in some cases
 &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $CFLAGS&quot;
 &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $CXXFLAGS&quot;
 &nbsp; &nbsp;else
 &nbsp; &nbsp; &nbsp; &nbsp;dnl Optimized version. No debug
 &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$OPTIMIZE_CFLAGS $CFLAGS&quot;
 &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$OPTIMIZE_CXXFLAGS $CXXFLAGS&quot;
 &nbsp; &nbsp;fi
fi


dnl ==========
dnl LibXML
dnl ==========

AM_PATH_XML2( 2.0.0, , AC_MSG_ERROR(libxml2 must be installed.) )


dnl ====================================================================
dnl Checks for libraries.

dnl ==========
dnl STLPort
dnl ==========

if test -z &quot;$no_stlport&quot;
then

 &nbsp; &nbsp;if test X&quot;$STLPORT_CFLAGS&quot; != X
 &nbsp; &nbsp;then
 &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$STLPORT_CFLAGS $CXXFLAGS&quot;
 &nbsp; &nbsp;fi

 &nbsp; &nbsp;if test X&quot;$STLPORT_LIB&quot; != X
 &nbsp; &nbsp;then
 &nbsp; &nbsp; &nbsp; &nbsp;LIBS=&quot;$STLPORT_LIB $LIBS -lstlport_gcc&quot;
 &nbsp; &nbsp;fi

 &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
 &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $STLPORT_CFLAGS&quot;

 &nbsp; &nbsp;AC_MSG_CHECKING(for STLPort)
 &nbsp; &nbsp;AC_EGREP_CPP( yo_stlport,
 &nbsp; &nbsp;[#include &lt;algorithm&gt;
#ifdef __SGI_STL_PORT
 &nbsp; yo_stlport
#endif],
 &nbsp; &nbsp;[ AC_MSG_RESULT(yes)],
 &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([STLPort is needed to compile NeL (www.stlport.org).]) )

 &nbsp; &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
fi

dnl ==========
dnl FreeType 2
dnl ==========

dnl Check for the FreeType 2 library files
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)

if test &quot;$FREETYPE_CONFIG&quot; = &quot;no&quot; -a &quot;$enable_3d&quot; = &quot;yes&quot;
then
 &nbsp; &nbsp;AC_MSG_ERROR([Cannot find freetype-config: check your path.
 &nbsp; &nbsp;FreeType 2 library is needed to compile NeL (freetype.sourceforge.net).])
else
 &nbsp; &nbsp;FREETYPE_CFLAGS=`freetype-config --cflags`
 &nbsp; &nbsp;FREETYPE_LIBS=`freetype-config --libs`
fi

AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)

dnl Checking the FreeType 2 instalation
_CPPFLAGS=&quot;$CPPFLAGS&quot;
CPPFLAGS=&quot;$CXXFLAGS ${FREETYPE_CFLAGS}&quot;

AC_MSG_CHECKING(for FreeType 2 installation)
AC_EGREP_CPP( yo_freetype2,
[#include &lt;freetype/freetype.h&gt;
#if FREETYPE_MAJOR == 2
 &nbsp; yo_freetype2
#endif],
[ AC_MSG_RESULT(yes) ],
 &nbsp;if test &quot;$enable_3d&quot; = &quot;yes&quot;
 &nbsp;then
 &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Freetype 2 library is needed to compile NeL (freetype.sourceforge.net).])
 &nbsp;else
 &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
 &nbsp;fi
)

CPPFLAGS=&quot;$_CPPFLAGS&quot;


dnl ==========
dnl OpenGL
dnl ==========

dnl Checking the OpenGL installation
AC_MSG_CHECKING(for OpenGL)
AC_EGREP_CPP( yo_opengl,
[#include &lt;GL/gl.h&gt;
#if defined(GL_VERSION_1_2)
 &nbsp; yo_opengl
#endif],
[ AC_MSG_RESULT(yes) ],
 &nbsp;AC_MSG_RESULT(no)
 &nbsp;if test &quot;$enable_3d&quot; = &quot;yes&quot;
 &nbsp;then
 &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([OpenGL 1.2 is needed to compile NeL (www.mesa3d.org).])
 &nbsp;fi
)

dnl Checking the GLEXT version
AC_MSG_CHECKING(for &lt;GL/glext.h&gt; version)
AC_EGREP_CPP( yo_glext_version,
[#include &lt;GL/glext.h&gt;
#ifdef GL_GLEXT_VERSION
#if GL_GLEXT_VERSION &gt;= 7
 &nbsp; yo_glext_version
#endif
#endif],
[ AC_MSG_RESULT(ok) ],
 &nbsp;if test &quot;$enable_3d&quot; = &quot;yes&quot;
 &nbsp;then
 &nbsp; &nbsp; AC_MSG_RESULT(no)
 &nbsp; &nbsp; AC_MSG_ERROR([A newer version of &lt;GL/glext.h&gt; is needed to compile NeL (download it from <A HREF="http://oss.sgi.com/projects/ogl-sample/ABI/">http://oss.sgi.com/projects/ogl-sample/ABI/</A>).])
 &nbsp;fi
)


dnl ============================================
dnl Check for XF86VidMode extension (-lXxf86vm)
dnl ============================================
AC_MSG_CHECKING(&quot;for XF86VidMode extension&quot;)
AC_ARG_WITH( xf86vidmode,
 &nbsp; &nbsp;[ &nbsp;--with-xf86vidmode=&lt;path&gt;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the XF86VidMode lib.
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/X11R6/lib],
 &nbsp; &nbsp;[ VMLIB_DIR=$with_xf86vidmode
 &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(using VidMode library located in $with_xf86vidmode.)],
 &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(Compiling without Xf86VidMode and hence fullscreen support to compile with XF86VidMode support, use --with-xf86vidmode=&lt;pathtolib&gt;)
)

if test X&quot;$VMLIB_DIR&quot; != X;
then
 &nbsp; &nbsp;LIBS=&quot;-L$VMLIB_DIR -lXxf86vm $LIBS&quot;;
 &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -DXF86VIDMODE&quot;;
fi


dnl ==========
dnl OpenAL
dnl ==========

AC_SUBST(OPENAL_CFLAGS)
AC_SUBST(OPENAL_LIB)

_CPPFLAGS=&quot;$CPPFLAGS&quot;
CPPFLAGS=&quot;$CXXFLAGS $OPENAL_CFLAGS&quot;

AC_MSG_CHECKING(for OpenAL)
AC_EGREP_CPP( yo_openal,
[#include &lt;AL/altypes.h&gt;
#ifdef AL_VERSION
 &nbsp; yo_openal
#endif],
[ AC_MSG_RESULT(yes)],
 &nbsp;AC_MSG_RESULT(no)
 &nbsp;if test &quot;$enable_sound&quot; = &quot;yes&quot;
 &nbsp;then
 &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([OpenAL is needed to compile NeL (www.openal.org).])
 &nbsp;fi
)

CPPFLAGS=&quot;$_CPPFLAGS&quot;


dnl ====================================================================
dnl Checks for library functions.


dnl ====================================================================
dnl Output files to generate.

dnl What an ugly hack to try to get something cleanner ... i hope ...
AC_OUTPUT_COMMANDS(
 &nbsp; [cd include/nel &amp;&amp; ln -sfv ../nelconfig.h .]
)

AC_OUTPUT( Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/misc/Makefile &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/net/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/3d/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/pacs/Makefile &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/sound/Makefile &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/agent/Makefile &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/c/Makefile &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/character/Makefile \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/e/Makefile &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/fuzzy/Makefile &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/logic/Makefile &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/nimat/Makefile &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/pyserver/Makefile &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/script/Makefile &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include/nel/ai/tools/Makefile &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/misc/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/misc/config_file/Makefile &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/net/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/3d/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/3d/driver/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/3d/driver/opengl/Makefile &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/pacs/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/sound/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/sound/driver/Makefile &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/sound/driver/openal/Makefile &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/ai/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/ai/agent/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/ai/c/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/ai/character/Makefile &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/ai/fuzzy/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/ai/logic/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/ai/nimat/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/ai/pyserver/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/ai/script/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src/ai/tools/Makefile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nel-config &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\
)


dnl End of configure.in

</PRE>