Added support for detecting SSE4.1, SSE4.2, SSE5. Webpage changes.
[runtime.git] / configure.ad
1 #
2 #  configure.ad
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2000 - 2008 Pekka Riikonen
7 #
8 #  This program is free software; you can redistribute it and/or modify
9 #  it under the terms of the GNU General Public License as published by
10 #  the Free Software Foundation; version 2 of the License.
11 #
12 #  This program is distributed in the hope that it will be useful,
13 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #  GNU General Public License for more details.
16 #
17
18 AD_INIT
19 AC_CANONICAL_SYSTEM
20 AM_INIT_AUTOMAKE
21 AC_PREREQ(2.52)
22 AC_CONFIG_HEADERS(runtimedefs.h)
23
24 AC_PROG_INSTALL
25 AC_PROG_MAKE_SET
26
27 AC_PROG_LN_S
28 AC_PROG_EGREP
29 AC_SUBST(LN_S)
30 AC_PATH_PROG(sedpath, sed)
31
32 AC_PROG_CC
33 AM_PROG_AS
34 AC_C_INLINE
35 AC_C_CONST
36
37 AC_PROG_RANLIB
38 #ifdef SILC_DIST_INPLACE
39 AC_DISABLE_SHARED
40 #endif SILC_DIST_INPLACE
41 AC_PROG_LIBTOOL
42
43 SILC_TOP_SRCDIR=`pwd`
44
45 ##
46 ## Library versioning.
47 ##
48
49 # Do the releases and library versioning according to following rules:
50 #
51 #  - If any code has changed in library, increment RUNTIME_REVISION
52 #  - If API were added, removed or changed, set RUNTIME_REVISION to 0
53 #  - If API were added, removed or changed, increment RUNTIME_CURRENT
54 #  - If APi were added, increment RUNTIME_AGE
55 #  - If API were removed, set RUNTIME_AGE to 0
56 #
57
58 # Base version for library.
59 RUNTIME_BASE_VERSION=1.2
60
61 # libsilc versions
62 RUNTIME_CURRENT=1               # prev = 0
63 RUNTIME_REVISION=0              # prev = 0
64 RUNTIME_AGE=0                   # prev = 0
65
66 # Substitute the version numbers
67 AC_SUBST(RUNTIME_BASE_VERSION)
68 AC_SUBST(RUNTIME_CURRENT)
69 AC_SUBST(RUNTIME_REVISION)
70 AC_SUBST(RUNTIME_AGE)
71
72
73 ##
74 ##  Installation
75 ##
76
77 # Default installation destination
78 AC_PREFIX_DEFAULT(/usr/local)
79 if test "x$prefix" != xNONE; then
80   silc_prefix="$prefix"
81 else
82   silc_prefix="$ac_default_prefix"
83   prefix="$silc_prefix"
84 fi
85
86
87 ##
88 ## Detect CPU
89 ##
90
91 # Disable all CPU feature optimizations
92 AC_MSG_CHECKING(whether to enable CPU feature optimizations)
93 AC_ARG_ENABLE(cpu-optimizations,
94   [  --disable-cpu-optimizations  do not use any CPU feature optimizations],
95   [
96     AC_MSG_RESULT(no)
97     AC_DEFINE([SILC_NO_CPU_OPTIMIZATIONS], [], [SILC_NO_CPU_OPTIMIZATIONS])
98     want_cpu_optimizations=false
99   ],
100   [
101     AC_MSG_RESULT(yes)
102     want_cpu_optimizations=true
103   ])
104 AM_CONDITIONAL(SILC_NO_CPU_OPTIMIZATIONS,
105                test x$want_cpu_optimizations = xfalse)
106
107 SILC_SYSTEM_IS_SMP(AC_DEFINE([SILC_SMP], [], [SILC_SMP]), [],
108                    AC_DEFINE([SILC_SMP], [], [SILC_SMP]))
109 cpu_i386=false
110 cpu_i486=false
111 cpu_i586=false
112 cpu_i686=false
113 cpu_i786=false
114 cpu_x86_64=false
115 cpu_ppc=false
116 cpu_ia64=false
117 case "$host_cpu" in
118   # All following Intels are considered 32-bit CPUs.
119   i?86)
120     # All CPUs of today are considered i386 and i486 compatible */
121     AC_DEFINE([SILC_I386], [], [SILC_I386])
122     AC_DEFINE([SILC_I486], [], [SILC_I486])
123     cpu_i386=true
124     cpu_i486=true
125
126     if test "x$host_cpu" = "xi586"; then
127       AC_DEFINE([SILC_I586], [], [SILC_I586])
128       cpu_i586=true
129     fi
130
131     if test "x$host_cpu" = "xi686"; then
132       AC_DEFINE([SILC_I586], [], [SILC_I586])
133       AC_DEFINE([SILC_I686], [], [SILC_I686])
134       cpu_i586=true
135       cpu_i686=true
136     fi
137
138     if test "x$host_cpu" = "xi786"; then
139       AC_DEFINE([SILC_I586], [], [SILC_I586])
140       AC_DEFINE([SILC_I686], [], [SILC_I686])
141       AC_DEFINE([SILC_I786], [], [SILC_I786])
142       cpu_i586=true
143       cpu_i686=true
144       cpu_i786=true
145     fi
146
147     # Check for specific CPU features
148     SILC_CPU_FLAG(mmx, true, AC_DEFINE([SILC_CPU_MMX], [], [SILC_CPU_MMX]), [])
149     SILC_CPU_FLAG(sse2, true, AC_DEFINE([SILC_CPU_SSE2], [], [SILC_CPU_SSE2]), [])
150     SILC_CPU_FLAG(pni, true, AC_DEFINE([SILC_CPU_SSE3], [], [SILC_CPU_SSE3]), [])
151     SILC_CPU_FLAG(ssse3, true, AC_DEFINE([SILC_CPU_SSSE3], [], [SILC_CPU_SSSE3]), [])
152     SILC_CPU_FLAG(sse4a, true, AC_DEFINE([SILC_CPU_SSE4A], [], [SILC_CPU_SSE4A]), [])
153     SILC_CPU_FLAG(sse4_1, true, AC_DEFINE([SILC_CPU_SSE41], [], [SILC_CPU_SSE41]), [])
154     SILC_CPU_FLAG(sse4_2, true, AC_DEFINE([SILC_CPU_SSE42], [], [SILC_CPU_SSE42]), [])
155     SILC_CPU_FLAG(sse5, true, AC_DEFINE([SILC_CPU_SSE5], [], [SILC_CPU_SSE5]), [])
156     ;;
157
158   # Intel IA-64, 64-bit CPU (not x86_64 compatible)
159   ia64)
160     AC_DEFINE([SILC_IA64], [], [SILC_IA64])
161     cpu_ia64=true
162     ;;
163
164   # AMD/Intel x86_64, 64-bit CPU
165   x86_64)
166     AC_DEFINE([SILC_X86_64], [], [SILC_X86_64])
167     cpu_x86_64=true
168
169     # Check for specific CPU features
170     SILC_CPU_FLAG(mmx, true, AC_DEFINE([SILC_CPU_MMX], [], [SILC_CPU_MMX]), [])
171     SILC_CPU_FLAG(sse2, true, AC_DEFINE([SILC_CPU_SSE2], [], [SILC_CPU_SSE2]), [])
172     SILC_CPU_FLAG(pni, true, AC_DEFINE([SILC_CPU_SSE3], [], [SILC_CPU_SSE3]), [])
173     SILC_CPU_FLAG(ssse3, true, AC_DEFINE([SILC_CPU_SSSE3], [], [SILC_CPU_SSSE3]), [])
174     SILC_CPU_FLAG(sse4a, true, AC_DEFINE([SILC_CPU_SSE4A], [], [SILC_CPU_SSE4A]), [])
175     SILC_CPU_FLAG(sse4_1, true, AC_DEFINE([SILC_CPU_SSE41], [], [SILC_CPU_SSE41]), [])
176     SILC_CPU_FLAG(sse4_2, true, AC_DEFINE([SILC_CPU_SSE42], [], [SILC_CPU_SSE42]), [])
177     SILC_CPU_FLAG(sse5, true, AC_DEFINE([SILC_CPU_SSE5], [], [SILC_CPU_SSE5]), [])
178     ;;
179
180   # PowerPC, 32-bit and 64-bit CPUs
181   powerpc*)
182     AC_DEFINE([SILC_POWERPC], [], [SILC_POWERPC])
183     cpu_ppc=true
184     ;;
185 esac
186 AM_CONDITIONAL(SILC_I386, test x$cpu_i386 = xtrue)
187 AM_CONDITIONAL(SILC_I486, test x$cpu_i486 = xtrue)
188 AM_CONDITIONAL(SILC_I586, test x$cpu_i586 = xtrue)
189 AM_CONDITIONAL(SILC_I686, test x$cpu_i686 = xtrue)
190 AM_CONDITIONAL(SILC_7686, test x$cpu_i786 = xtrue)
191 AM_CONDITIONAL(SILC_X86_64, test x$cpu_x86_64 = xtrue)
192 AM_CONDITIONAL(SILC_POWERPC, test x$cpu_ppc = xtrue)
193 AM_CONDITIONAL(SILC_IA64, test x$cpu_ia64 = xtrue)
194
195 if test x$want_cpu_optimizations = xtrue; then
196   # Set some compiler options based on CPU
197   if test "x$CC" = "xicc"; then
198     # ICC flags
199     if test x$x_have_cpu_sse4_1 = xtrue; then
200       SILC_ADD_CFLAGS(-axS)
201     fi
202     if test x$x_have_cpu_ssse3 = xtrue; then
203       SILC_ADD_CFLAGS(-axT)
204     elif test x$x_have_cpu_pni = xtrue; then
205       SILC_ADD_CFLAGS(-axP)
206     elif test x$x_have_cpu_sse2 = xtrue; then
207       SILC_ADD_CFLAGS(-axW)
208     fi
209   else
210     # Other compilers
211     if test x$x_have_cpu_sse2 = xtrue; then
212       SILC_ADD_CFLAGS(-msse2)
213     fi
214     if test x$x_have_cpu_pni = xtrue; then
215       SILC_ADD_CFLAGS(-msse3)
216     fi
217     if test x$x_have_cpu_ssse3 = xtrue; then
218       SILC_ADD_CFLAGS(-mssse3)
219     fi
220     if test x$x_have_cpu_sse4_1 = xtrue; then
221       SILC_ADD_CFLAGS(-msse4)
222     fi
223   fi
224 fi
225
226
227 ##
228 ## Put here any platform specific stuff
229 ##
230
231 case "$target" in
232   *-*-linux*)
233     check_threads=true
234     CFLAGS=`echo $CFLAGS -D_GNU_SOURCE`
235     ;;
236   *-*-freebsd*)
237     check_threads=true
238     ;;
239   *-*-netbsd*)
240     check_threads=true
241     ;;
242   *-*-*bsd*)
243     check_threads=false
244     ;;
245   *)
246     check_threads=true
247     ;;
248 esac
249
250
251 ##
252 ## Header checking
253 ##
254 AC_HEADER_STDC
255 AC_HEADER_TIME
256 AC_HEADER_STAT
257
258 # More header checking
259 #
260 AC_CHECK_HEADERS(unistd.h string.h errno.h fcntl.h assert.h execinfo.h)
261 AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h stddef.h)
262 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h xti.h netdb.h sys/resource.h)
263 AC_CHECK_HEADERS(pwd.h grp.h termcap.h paths.h)
264 AC_CHECK_HEADERS(ncurses.h signal.h ctype.h utime.h dirent.h)
265 AC_CHECK_HEADERS(arpa/inet.h sys/mman.h limits.h termios.h locale.h langinfo.h)
266
267
268 ##
269 ## Data type checking
270 ##
271 AC_TYPE_SIGNAL
272 AC_TYPE_SIZE_T
273 AC_TYPE_MODE_T
274 AC_TYPE_UID_T
275 AC_TYPE_PID_T
276 AC_CHECK_SIZEOF(long long, 0)
277 AC_SUBST(SILC_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long)
278 AC_CHECK_SIZEOF(long, 0)
279 AC_SUBST(SILC_SIZEOF_LONG, $ac_cv_sizeof_long)
280 AC_CHECK_SIZEOF(int, 0)
281 AC_SUBST(SILC_SIZEOF_INT, $ac_cv_sizeof_int)
282 AC_CHECK_SIZEOF(short, 0)
283 AC_SUBST(SILC_SIZEOF_SHORT, $ac_cv_sizeof_short)
284 AC_CHECK_SIZEOF(char, 0)
285 AC_SUBST(SILC_SIZEOF_CHAR, $ac_cv_sizeof_char)
286 AC_CHECK_SIZEOF(void *, 0)
287 AC_SUBST(SILC_SIZEOF_VOID_P, $ac_cv_sizeof_void_p)
288 AC_CHECK_TYPES(long long)
289 AC_CHECK_TYPES(long double)
290
291 # Check for big-endian machines
292 AC_C_BIGENDIAN
293
294
295 ##
296 ## Compiler and compiler flag checks
297 ##
298
299 # Disable all compiler optimizations
300 AC_MSG_CHECKING(whether to enable compiler optimizations)
301 AC_ARG_ENABLE(optimizations,
302   [  --disable-optimizations do not use any compiler optimizations],
303   [
304     AC_MSG_RESULT(no)
305     AC_DEFINE([SILC_NO_CC_OPTIMIZATIONS], [], [SILC_NO_CC_OPTIMIZATIONS])
306     want_cc_optimizations=false
307   ],
308   [
309     AC_MSG_RESULT(yes)
310     want_cc_optimizations=true
311   ])
312 AM_CONDITIONAL(SILC_NO_CC_OPTIMIZATIONS, test x$want_cc_optimizations = xfalse)
313
314 if test "$GCC"; then
315   # GCC specific options
316   if test "x$summary_debug" = "xyes"; then
317     SILC_ADD_CFLAGS(-g)
318   else
319     SILC_ADD_CFLAGS(-g)
320   fi
321   SILC_ADD_CFLAGS(-Wall -finline-functions)
322   SILC_ADD_CFLAGS(-Wno-pointer-sign)
323 else
324   # Other compilers
325   case "$target" in
326     alpha*-dec-osf*)
327       SILC_ADD_CFLAGS(-g3)
328       ;;
329     mips*-sgi-irix*)
330       SILC_ADD_CFLAGS(-g3)
331       ;;
332     *)
333       SILC_ADD_CFLAGS(-g)
334       ;;
335   esac
336
337   # Intel C++ Compiler flags
338   if test "x$CC" = "xicc"; then
339     SILC_ADD_CFLAGS(-restrict)
340     SILC_ADD_CFLAGS(-finline-functions)
341
342     # Don't define __GNUC__ except for system includes
343     SILC_ADD_CFLAGS(-gcc-sys)
344   fi
345 fi
346
347 if test x$want_cc_optimizations = xtrue; then
348   if test "$GCC"; then
349     # GCC specific options
350     if test "x$summary_debug" = "xyes"; then
351       SILC_ADD_CFLAGS(-O)
352     else
353       SILC_ADD_CFLAGS(-O2)
354     fi
355   else
356     # Other compilers
357     case "$target" in
358       alpha*-dec-osf*)
359         SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
360         ;;
361       mips*-sgi-irix*)
362         SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
363         ;;
364       *)
365         SILC_ADD_CFLAGS(-O2, SILC_ADD_CFLAGS(-O))
366         ;;
367     esac
368   fi
369 fi
370
371
372 ##
373 ## Function and libary checking
374 ##
375 AC_CHECK_FUNCS(gethostname gethostbyaddr getservbyname getservbyport)
376 AC_CHECK_FUNCS(poll select listen bind shutdown close connect setsockopt)
377 AC_CHECK_FUNCS(setrlimit time ctime utime gettimeofday getrusage)
378 AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror)
379 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid sched_yield)
380 AC_CHECK_FUNCS(setgroups initgroups nl_langinfo nanosleep)
381 AC_CHECK_FUNCS(strchr snprintf strstr strcpy strncpy memcpy memset memmove)
382 AC_CHECK_FUNCS(setenv getenv putenv unsetenv clearenv backtrace)
383
384 # Check getopt_long
385 AC_CHECK_FUNC(getopt_long,
386   [
387     AC_DEFINE([HAVE_GETOPT_LONG], [], [HAVE_GETOPT_LONG])
388     have_getopt_long=1
389   ], have_getopt_long=0
390 )
391
392 # Check gethostbyname
393 AC_CHECK_FUNC(gethostbyname, [],
394   [
395     AC_CHECK_LIB(nsl, gethostbyname, LIBS="$LIBS -lnsl")
396     AC_CHECK_FUNC(res_gethostbyname, [],
397        AC_CHECK_LIB(resolv, res_gethostbyname, LIBS="$LIBS -lresolv")
398     )
399   ])
400
401 # Check socket
402 AC_CHECK_FUNC(socket, [],
403   AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
404 )
405
406 # Check clock_gettime
407 AC_CHECK_FUNC(clock_gettime, [],
408   [
409     AC_CHECK_LIB(rt, clock_gettime,
410                  [ LIBS="$LIBS -lrt"
411                    AC_DEFINE([HAVE_CLOCK_GETTIME], [], [HAVE_CLOCK_GETTIME])])
412   ])
413
414 # Check for epoll_wait and verify that epoll_create works
415 AC_CHECK_FUNC(epoll_wait,
416   [
417     AC_RUN_IFELSE(
418       [
419         #include <sys/epoll.h>
420         int main()
421         {
422           int ret = epoll_create(5);
423           if (ret < 0)
424             return 1;
425           close(ret);
426           return 0;
427         }
428       ],
429       [
430         AC_DEFINE([HAVE_EPOLL_WAIT], [1], [HAVE_EPOLL_WAIT])
431       ],
432     )
433   ])
434
435 # Check for va_copy
436 va_copy=false
437 __SILC_VA_COPY="#define __SILC_VA_COPY(dest, src) dest = src"
438 AC_MSG_CHECKING(for va_copy)
439 AC_TRY_COMPILE(
440   [
441     #include <stdarg.h>
442     #include <stdlib.h>
443   ],
444   [
445     int t(int x, ...)
446     {
447       va_list va, cp;
448       va_start(va, x);
449       va_copy(cp, va);
450       if (va_arg(cp, int) != 0xff11)
451         return 1;
452       va_end(va);
453       va_end(cp);
454       return 0;
455     }
456     int main()
457     {
458       return t(0, 0xff11);
459     }
460   ],
461   [
462     __SILC_VA_COPY="#define __SILC_VA_COPY(dest, src) va_copy(dest, src)"
463     AC_MSG_RESULT(yes)
464     va_copy=true
465   ],
466   [
467     AC_MSG_RESULT(no)
468     va_copy=false
469   ]
470 )
471
472 if test x$va_copy = xfalse; then
473   AC_MSG_CHECKING(for __va_copy)
474   AC_TRY_COMPILE(
475   [
476     #include <stdarg.h>
477     #include <stdlib.h>
478   ],
479   [
480     int t(int x, ...)
481     {
482       va_list va, cp;
483       va_start(va, x);
484       __va_copy(cp, va);
485       if (va_arg(cp, int) != 0xff11)
486         return 1;
487       va_end(va);
488       va_end(cp);
489       return 0;
490     }
491     int main()
492     {
493       return t(0, 0xff11);
494     }
495   ],
496   [
497     __SILC_VA_COPY="#define __SILC_VA_COPY(dest, src) __va_copy(dest, src)"
498     AC_MSG_RESULT(yes)
499     va_copy=true
500   ],
501   [
502     AC_MSG_RESULT(no)
503     va_copy=false
504   ]
505   )
506 fi
507
508 if test x$va_copy = xfalse; then
509   AC_RUN_IFELSE(
510     [
511       #include <stdarg.h>
512       #include <stdlib.h>
513       int t(int x, ...)
514       {
515         va_list va, cp;
516         va_start(va, x);
517         cp = va;
518         if (va_arg(cp, int) != 0xff11)
519           return 1;
520         va_end(va);
521         va_end(cp);
522         return 0;
523       }
524       int main()
525       {
526         return t(0, 0xff11);
527       }
528     ],
529     [va_copy=false],
530     [
531       AC_DEFINE([SILC_VA_COPY_ARRAY], [], [SILC_VA_COPY_ARRAY])
532       __SILC_VA_COPY="#define __SILC_VA_COPY(dest, src) memmove(dest, src, sizeof(va_list))"
533     ],
534     [va=copy=false]
535   )
536 fi
537 AC_SUBST(__SILC_VA_COPY)
538
539 # Check for timezone and tm_gmtoff for timezone information
540 AC_MSG_CHECKING(whether system has timezone)
541 AC_RUN_IFELSE(
542   [
543     #include <stdio.h>
544     #include <time.h>
545     int main()
546     {
547       timezone = 0;
548       return 0;
549     }
550   ],
551   [ AC_MSG_RESULT(yes)
552     AC_DEFINE([HAVE_TIMEZONE], [], [HAVE_TIMEZONE]) ],
553   [ AC_MSG_RESULT(no) ],
554   [ AC_MSG_RESULT(no) ]
555 )
556 AC_MSG_CHECKING(whether system has tm_gmtoff)
557 AC_RUN_IFELSE(
558   [
559     #include <stdio.h>
560     #include <time.h>
561     int main()
562     {
563       struct tm tm;
564       tm.tm_gmtoff = 0;
565       return 0;
566     }
567   ],
568   [ AC_MSG_RESULT(yes)
569     AC_DEFINE([HAVE_TM_GMTOFF], [], [HAVE_TM_GMTOFF]) ],
570   [ AC_MSG_RESULT(no) ],
571   [ AC_MSG_RESULT(no) ]
572 )
573 AC_MSG_CHECKING(whether system has __tm_gmtoff)
574 AC_RUN_IFELSE(
575   [
576     #include <stdio.h>
577     #include <time.h>
578     int main()
579     {
580       struct tm tm;
581       tm.__tm_gmtoff = 0;
582       return 0;
583     }
584   ],
585   [ AC_MSG_RESULT(yes)
586     AC_DEFINE([HAVE___TM_GMTOFF], [], [HAVE___TM_GMTOFF]) ],
587   [ AC_MSG_RESULT(no) ],
588   [ AC_MSG_RESULT(no) ]
589 )
590 AC_MSG_CHECKING(whether system has __tm_gmtoff__)
591 AC_RUN_IFELSE(
592   [
593     #include <stdio.h>
594     #include <time.h>
595     int main()
596     {
597       struct tm tm;
598       tm.__tm_gmtoff__ = 0;
599       return 0;
600     }
601   ],
602   [ AC_MSG_RESULT(yes)
603     AC_DEFINE([HAVE___TM_GMTOFF__], [], [HAVE___TM_GMTOFF__]) ],
604   [ AC_MSG_RESULT(no) ],
605   [ AC_MSG_RESULT(no) ]
606 )
607
608 # Check for dlopen() and friends
609 AC_CHECK_HEADERS(dlfcn.h,
610   [
611     AC_CHECK_LIB(dl, dlopen,
612       [
613         AC_DEFINE([HAVE_DLOPEN], [], [HAVE_DLOPEN])
614         LIBS="$LIBS -ldl"
615       ],
616       [
617         AC_CHECK_LIB(c, dlopen,
618           [
619             AC_DEFINE([HAVE_DLOPEN], [], [HAVE_DLOPEN])
620           ])
621       ])
622   ])
623
624 __SILC_ENABLE_DEBUG=""
625
626 runtimever=`echo $VERSION | sed 's/\./ /g'`
627 maj=0
628 min=0
629 bld=0
630 for v in $runtimever
631 do
632   if test $maj -eq 0; then
633     maj=$v
634     continue
635   fi
636   if test $min -eq 0; then
637     min=$v
638     continue
639   fi
640   if test $bld -eq 0; then
641     bld=$v
642     continue
643   fi
644 done
645 __RUNTIME_PACKAGE_VERSION="#define __SILC_RUNTIME_VERSION SILC_VERSION($maj,$min,$bld)"
646
647
648 ##
649 ##  Enable/disable checking
650 ##
651
652 # IPv6 support
653 AC_MSG_CHECKING(whether to enable IPv6 support)
654 AC_ARG_ENABLE(ipv6,
655   [  --enable-ipv6           enable IPv6 support],
656   [
657     case "${enableval}" in
658       yes)
659         want_ipv6=true
660         check_ipv6=false
661         summary_ipv6="yes"
662         AC_DEFINE([HAVE_IPV6], [], [HAVE_IPV6])
663         AC_MSG_RESULT(yes)
664         ;;
665       *)
666         want_ipv6=false
667         check_ipv6=false
668         summary_ipv6="no"
669         AC_MSG_RESULT(no)
670         ;;
671     esac
672   ],
673     check_ipv6=true
674   )
675
676 if test x$check_ipv6 = xtrue; then
677   summary_ipv6="no"
678   AC_TRY_COMPILE(
679     [
680       #ifdef HAVE_SYS_TYPES_H
681       #include <sys/types.h>
682       #endif
683       #ifdef HAVE_NETINET_TCP_H
684       #include <netinet/tcp.h>
685       #endif
686       #ifdef HAVE_NETDB_H
687       #include <netdb.h>
688       #endif
689       #include <sys/socket.h>
690       #ifdef HAVE_NETINET_IN_H
691       #include <netinet/in.h>
692       #endif
693     ],
694     [
695       struct sockaddr_in6 sin6;
696       int family = AF_INET6;
697     ],
698     [
699       AC_DEFINE([HAVE_IPV6], [], [HAVE_IPV6])
700       AC_MSG_RESULT(yes)
701       summary_ipv6="yes"
702     ],
703       AC_MSG_RESULT(no)
704     )
705 fi
706
707 # Memory alignment.  User can specify what alignment memory allocation and
708 # SilcStack allocation use.  Default is system default alignemnt.
709 AC_ARG_WITH(alignment,
710   [  --with-alignment=NUMBER Memory alignment in bytes],
711   [
712     AC_DEFINE_UNQUOTED([SILC_ALIGNMENT], [$withval], [SILC_ALIGNMENT])
713     AC_MSG_RESULT(Memory allocation alignment is $withval bytes)
714   ],
715   [
716     AC_DEFINE([SILC_ALIGNMENT], SILC_SIZEOF_VOID_P, [SILC_ALIGNMENT])
717   ])
718
719 # Stack trace checking
720 __SILC_ENABLE_STACKTRACE=""
721 AC_MSG_CHECKING(whether to enable stack tracing)
722 AC_ARG_ENABLE(stack-trace,
723   [  --enable-stack-trace    enable memory stack trace],
724   [
725     case "${enableval}" in
726     yes)
727       AC_MSG_RESULT(yes)
728       AC_DEFINE([SILC_STACKTRACE], [], [SILC_STACKTRACE])
729       __SILC_ENABLE_STACKTRACE="#define __SILC_ENABLE_STACKTRACE 1"
730       CFLAGS="$CFLAGS -rdynamic"
731       PC_CFLAGS="$PC_CFLAGS -rdynamic"
732       ;;
733     *)
734       AC_MSG_RESULT(no)
735       ;;
736     esac
737   ],
738     AC_MSG_RESULT(no)
739   )
740
741 #ifdef SILC_DIST_INPLACE
742 #
743 # Profiling options (never delivered to distributions)
744 #
745 AC_MSG_CHECKING(whether to enable gprof)
746 AC_ARG_ENABLE(gprof,
747   [  --enable-gprof          enable gprof profiling],
748   [
749     case "${enableval}" in
750       yes)
751         AC_MSG_RESULT(yes)
752         SILC_ADD_CFLAGS(-pg)
753         LIBS="$LIBS -pg"
754         ;;
755       *)
756         AC_MSG_RESULT(no)
757         ;;
758     esac
759   ],
760   [
761     AC_MSG_RESULT(no)
762   ])
763
764 AC_MSG_CHECKING(whether to enable gcov)
765 AC_ARG_ENABLE(gcov,
766   [  --enable-gcov           enable gcov],
767   [
768     case "${enableval}" in
769       yes)
770         AC_MSG_RESULT(yes)
771         SILC_ADD_CFLAGS(-fprofile-arcs)
772         LIBS="$LIBS -lgcov"
773         ;;
774       *)
775         AC_MSG_RESULT(no)
776         ;;
777     esac
778   ],
779   [
780     AC_MSG_RESULT(no)
781   ])
782 #endif SILC_DIST_INPLACE
783
784 # Debug checking
785 AC_MSG_CHECKING(whether to enable debugging)
786 summary_debug="no"
787 __SILC_ENABLE_DEBUG=""
788 AC_ARG_ENABLE(debug,
789   [  --enable-debug          enable debugging],
790   [
791     case "${enableval}" in
792       yes)
793         AC_MSG_RESULT(yes)
794         AC_DEFINE([SILC_DEBUG], [], [enable-debug])
795         PC_CFLAGS="$PC_CFLAGS -DSILC_DEBUG"
796         summary_debug="yes"
797         __SILC_ENABLE_DEBUG="#define __SILC_ENABLE_DEBUG 1"
798         ;;
799       *)
800         AC_MSG_RESULT(no)
801         ;;
802     esac
803   ],
804   [
805     AC_MSG_RESULT(no)
806   ])
807
808 # Disable all assembler optimizations
809 AC_MSG_CHECKING(whether to enable assembler optimizations)
810 AC_ARG_ENABLE(asm,
811   [  --disable-asm           do not use assembler optimizations],
812   [
813     AC_MSG_RESULT(no)
814     AC_DEFINE([SILC_NO_ASM], [], [SILC_NO_ASM])
815     want_asm=false
816   ],
817   [
818     AC_MSG_RESULT(yes)
819     want_asm=true
820   ])
821 AM_CONDITIONAL(SILC_NO_ASM, test x$want_asm = xfalse)
822
823 # Check for assembler
824 SILC_ASSEMBLER=""
825 have_assembler=false
826 if test x$want_asm = xtrue; then
827   AC_PATH_PROG([NASM], [nasm], [no])
828   if test "x$NASM" != "xno"; then
829     if test x$cpu_x86_64 = xtrue; then
830       SILC_ASSEMBLER="$NASM -O2 -felf64"
831     else
832       SILC_ASSEMBLER="$NASM -O2 -felf"
833     fi
834     have_assembler=true
835   fi
836
837   AC_PATH_PROG([YASM], [yasm], [no])
838   if test "x$YASM" != "xno"; then
839     if test x$cpu_x86_64 = xtrue; then
840       SILC_ASSEMBLER="$YASM -Xgnu -felf64"
841     else
842       SILC_ASSEMBLER="$YASM -Xgnu -felf"
843     fi
844     have_assembler=true
845   fi
846 fi
847 AC_SUBST(SILC_ASSEMBLER)
848
849
850 ##
851 ##  With/without checkings
852 ##
853
854 LIBSUBDIR=lib
855 LDFLAGS="-L\$(silc_top_srcdir)/lib $LDFLAGS"
856
857 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/contrib"
858 SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcutil"
859
860
861 # Check for iconv support
862 check_iconv=true
863 has_iconv=false
864 SAVE_LIBS="$LIBS"
865 SAVE_CFLAGS="$CFLAGS"
866 SAVE_LDFLAGS="$LDFLAGS"
867 SAVE_CPPFLAGS="$CPPFLAGS"
868 AC_MSG_CHECKING(whether to implicit search for libiconv)
869 AC_ARG_WITH(iconv,
870   [[  --with-iconv[=DIR]      use libiconv [search in DIR/include and DIR/lib]]],
871   [
872     case "${withval}" in
873       no)
874         AC_MSG_RESULT(no)
875         AC_CHECK_HEADERS(iconv.h,
876           [
877             AC_CHECK_FUNC(iconv, has_iconv=true)
878           ])
879         check_iconv=false
880         ;;
881       *)
882         AC_MSG_RESULT(yes)
883         if test -d $withval/include; then
884           CPPFLAGS="$CPPFLAGS -I$withval/include"
885           CFLAGS="$CFLAGS -I$withval/include"
886         fi
887         if test -d $withval/lib; then
888           LDFLAGS="$LDFLAGS -L$withval/lib"
889         fi
890         ;;
891     esac
892   ],
893   [
894     AC_MSG_RESULT(no)
895     AC_CHECK_HEADERS(iconv.h,
896       [
897         AC_CHECK_FUNCS(iconv,
898           [
899             has_iconv=true
900             check_iconv=false
901           ])
902       ])
903   ])
904
905 if test x$check_iconv = xtrue; then
906   AC_MSG_RESULT(Searching for iconv...)
907
908   # XXX
909   unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
910
911   AC_CHECK_HEADERS(iconv.h,
912     [
913       LIBS="$LIBS -liconv"
914       AC_MSG_CHECKING(for iconv in -liconv)
915       AC_TRY_LINK(
916         [
917           #include <stdlib.h>
918           #include <iconv.h>
919         ],
920         [
921           iconv_t cd = iconv_open("", "");
922           iconv(cd, NULL, NULL, NULL, NULL);
923           iconv_close(cd);
924         ],
925         [
926           echo "yes"
927           AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
928           has_iconv=true
929           check_iconv=false
930         ],
931         [
932           echo "no"
933           LIBS="$SAVE_LIBS"
934           CFLAGS="$SAVE_CFLAGS"
935           LDFLAGS="$SAVE_LDFLAGS"
936           CPPFLAGS="$SAVE_CPPFLAGS"
937         ])
938      ])
939 fi
940
941 if test x$check_iconv = xtrue; then
942   # search for iconv library..
943   SAVE_LIBS="$LIBS"
944   SAVE_CFLAGS="$CFLAGS"
945   SAVE_LDFLAGS="$LDFLAGS"
946   SAVE_CPPFLAGS="$CPPFLAGS"
947
948   for dir in `echo "/usr/local /usr/pkg /usr/contrib"`; do
949     if test x$has_iconv = xfalse; then
950       AC_MSG_RESULT(searching in $dir...)
951
952       if test -d $dir/include; then
953         CPPFLAGS="$CPPFLAGS -I$dir/include"
954         CFLAGS="$CFLAGS -I$dir/include"
955       fi
956       if test -d $dir/lib; then
957         LDFLAGS="$LDFLAGS -L$dir/lib"
958       fi
959
960       # XXX
961       unset ac_cv_header__iconv_h_ ac_cv_header_iconv_h || true
962
963       AC_CHECK_HEADERS(iconv.h,
964         [
965           LIBS="$LIBS -liconv"
966           AC_MSG_CHECKING(for iconv in -liconv)
967           AC_TRY_LINK(
968             [
969               #include <stdlib.h>
970               #include <iconv.h>
971             ],
972             [
973               iconv_t cd = iconv_open("", "");
974               iconv(cd, NULL, NULL, NULL, NULL);
975               iconv_close(cd);
976             ],
977             [
978               echo "yes"
979               has_iconv=true
980               AC_DEFINE([HAVE_ICONV], [], [Define if you have the iconv() function.])
981             ],
982             [
983               echo "no"
984               has_iconv=false
985
986               LIBS="$SAVE_LIBS"
987               CFLAGS="$SAVE_CFLAGS"
988               LDFLAGS="$SAVE_LDFLAGS"
989               CPPFLAGS="$SAVE_CPPFLAGS"
990             ])
991          ],
992          [
993            CFLAGS="$SAVE_CFLAGS"
994            LDFLAGS="$SAVE_LDFLAGS"
995            CPPFLAGS="$SAVE_CPPFLAGS"
996          ])
997       fi
998     done
999 fi
1000
1001 if test x$has_iconv = xtrue; then
1002   # (1) Some implementations of iconv won't convert from UTF-8 to UTF-8.
1003   # (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and
1004   #     obl when args 2 and 3 are 0 (fixed in glibc-2.1.3).
1005   #
1006   AC_CACHE_CHECK([whether this iconv is good enough], ac_iconv_good,
1007     AC_TRY_RUN(
1008       [
1009         #include <iconv.h>
1010         int main() {
1011           iconv_t cd;
1012         changequote(, )dnl
1013           char buf[4];
1014         changequote([, ])dnl
1015           char *ob;
1016           size_t obl;
1017           ob = buf, obl = sizeof(buf);
1018           return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) &&
1019                  (iconv(cd, 0, 0, &ob, &obl) ||
1020                  !(ob == buf && obl == sizeof(buf)) ||
1021                  iconv_close(cd)));
1022         }
1023       ],
1024       [
1025         ac_iconv_good=yes
1026       ],
1027       [
1028         ac_iconv_good=no
1029       ],
1030       [
1031         ac_iconv_good=yes
1032       ])
1033     )
1034
1035   if test x$ac_iconv_good = xno; then
1036     AC_MSG_RESULT(Try using libiconv instead.)
1037   fi
1038 fi
1039
1040 # Check for POSIX threads support
1041 AC_MSG_CHECKING(whether to search for POSIX threads)
1042 AC_ARG_WITH(pthreads,
1043   [[  --with-pthreads[=DIR]   use POSIX threads [search in DIR/include and DIR/lib]]],
1044   [
1045     case "${withval}" in
1046       no)
1047         check_threads=false
1048         ;;
1049       *)
1050         if test -d $withval/include; then
1051           CPPFLAGS="$CPPFLAGS -I$withval/include"
1052           CFLAGS="$CFLAGS -I$withval/include"
1053         fi
1054         if test -d $withval/lib; then
1055           LDFLAGS="$LDFLAGS -L$withval/lib"
1056         fi
1057
1058         check_threads=true
1059         ;;
1060     esac
1061   ])
1062
1063 if test x$check_threads = xtrue; then
1064   has_threads=false
1065   SAVE_LIBS="$LIBS"
1066   SAVE_CFLAGS="$CFLAGS"
1067   SAVE_LDFLAGS="$LDFLAGS"
1068   SAVE_CPPFLAGS="$CPPFLAGS"
1069
1070   AC_MSG_RESULT(yes)
1071   AC_CHECK_HEADERS(pthread.h,
1072     [
1073       LIBS="$LIBS -lpthread"
1074       AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
1075         [
1076           # FreeBSD
1077           case "${target}" in
1078             *-*-freebsd*)
1079               LIBS="$SAVE_LIBS -pthread"
1080               AC_CHECK_LIB(c_r, pthread_attr_init, has_threads=true, LIBS="$SAVE_LIBS")
1081               ;;
1082             *)
1083               LIBS="$SAVE_LIBS"
1084               ;;
1085           esac
1086         ])
1087     ],
1088     [
1089       # search for pthread library..
1090       for dir in `echo "/usr/local /usr/pkg /usr/contrib /usr/pkg/pthreads /usr/local/pthreads"`; do
1091         if test x$has_threads = xfalse; then
1092           AC_MSG_RESULT(searching in $dir...)
1093
1094           if test -d $dir/include; then
1095             CPPFLAGS="$CPPFLAGS -I$dir/include"
1096             CFLAGS="$CFLAGS -I$dir/include"
1097           fi
1098           if test -d $dir/lib; then
1099             LDFLAGS="$LDFLAGS -L$dir/lib"
1100           fi
1101
1102           # XXX
1103           unset ac_cv_header__pthread_h_ ac_cv_header_pthread_h || true
1104
1105           AC_CHECK_HEADERS(pthread.h,
1106             [
1107               LIBS="$LIBS -lpthread"
1108               AC_CHECK_LIB(pthread, pthread_attr_init, has_threads=true,
1109                 [
1110                   has_threads=false
1111
1112                   LIBS="$SAVE_LIBS"
1113                   CFLAGS="$SAVE_CFLAGS"
1114                   LDFLAGS="$SAVE_LDFLAGS"
1115                   CPPFLAGS="$SAVE_CPPFLAGS"
1116                 ])
1117             ],
1118             [
1119               CFLAGS="$SAVE_CFLAGS"
1120               LDFLAGS="$SAVE_LDFLAGS"
1121               CPPFLAGS="$SAVE_CPPFLAGS"
1122             ])
1123         fi
1124       done
1125     ])
1126 else
1127   AC_MSG_RESULT(no)
1128   has_threads=false
1129 fi
1130
1131 __SILC_HAVE_PTHREAD=""
1132 AM_CONDITIONAL(SILC_THREADS, test x$has_threads = xtrue)
1133 if test x$has_threads = xtrue; then
1134   CFLAGS="$CFLAGS -D_REENTRANT"
1135
1136   # XXX possibly incomplete
1137   case "${target}" in
1138     *-*-aix*)
1139       CFLAGS="$CFLAGS -D_THREAD_SAFE"
1140       if test x"$GCC" = xyes; then
1141         CFLAGS="$CFLAGS -mthreads"
1142       fi
1143       ;;
1144     *-*-freebsd*)
1145       CFLAGS="$CFLAGS -D_THREAD_SAFE"
1146       ;;
1147     *-*-sysv5uw7*)  # UnixWare 7
1148       if test "$GCC" != "yes"; then
1149         CFLAGS="$CFLAGS -Kthread"
1150       else
1151         CFLAGS="$CFLAGS -pthread"
1152       fi
1153       ;;
1154     *-dg-dgux*)  # DG/UX
1155       CFLAGS="$CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
1156       ;;
1157    esac
1158
1159   # Check for threads
1160   AC_CHECK_FUNCS(pthread_create pthread_key_create pthread_once)
1161
1162   # Check for read/write locks
1163   AC_CHECK_FUNC(pthread_rwlock_init,
1164   [
1165     AC_RUN_IFELSE(
1166       [
1167         #include <pthread.h>
1168         int main()
1169         {
1170           pthread_rwlock_t rwlock;
1171           pthread_rwlock_init(&rwlock, NULL);
1172           pthread_rwlock_destroy(&rwlock);
1173           return 0;
1174         }
1175       ],
1176       [],
1177       [
1178         # Rwlock not defined
1179         CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600"
1180       ]
1181     )
1182   ],
1183   [
1184     # Rwlock not defined
1185     CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600"
1186   ])
1187
1188   AC_DEFINE([SILC_HAVE_PTHREAD], [], [HAVE_PTHREAD])
1189   AC_DEFINE([SILC_THREADS], [], [HAVE_THREAD])
1190   __SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHREAD 1"
1191   PC_CFLAGS="$PC_CFLAGS -DSILC_THREADS"
1192 fi
1193
1194
1195 ##
1196 ## Native WIN32 compilation under cygwin
1197 ##
1198 AC_MSG_CHECKING(whether to compile native WIN32 code)
1199 AC_ARG_WITH(win32,
1200   [  --with-win32            compile native WIN32 (MinGW) code (-mno-cygwin)],
1201   [
1202     AC_MSG_RESULT(yes)
1203     AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
1204     win32_support=true
1205     CFLAGS="-mno-cygwin $CFLAGS"
1206     LIBS="$LIBS -lwsock32"
1207   ],
1208   [
1209     AC_MSG_RESULT(no)
1210     win32_support=false
1211   ])
1212 AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
1213
1214
1215 ##
1216 ## Outputs and substitutions
1217 ##
1218
1219 AC_SUBST(LIBSUBDIR)
1220 AC_SUBST(SILC_TOP_SRCDIR)
1221 AC_SUBST(LDFLAGS)
1222 AC_SUBST(LIBS)
1223 AC_SUBST(SILC_LIB_INCLUDES)
1224 AC_SUBST(PC_CFLAGS)
1225 AC_SUBST(__SILC_ENABLE_DEBUG)
1226 AC_SUBST(__SILC_ENABLE_STACKTRACE)
1227 AC_SUBST(__SILC_HAVE_PTHREAD)
1228 AC_SUBST(__RUNTIME_PACKAGE_VERSION)
1229
1230 # Native Symbian OS support (disabled by default)
1231 AM_CONDITIONAL(SILC_SYMBIAN, test xfalse = xtrue)
1232
1233 # Make enable-shared aware
1234 AM_CONDITIONAL(SILC_ENABLE_SHARED, test "$enable_shared" = yes)
1235
1236 ETCDIR=`eval echo $sysconfdir`;ETCDIR=`eval echo $ETCDIR`
1237 AC_SUBST(ETCDIR)
1238 AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR])
1239
1240 DOCDIR=`eval echo $docdir`;DOCDIR=`eval echo $DOCDIR`
1241 AC_SUBST(DOCDIR)
1242 AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
1243
1244 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
1245 AC_SUBST(INCLUDE_DEFINES_INT)
1246
1247 DATE=`date`
1248 AC_SUBST(DATE)
1249
1250
1251 #
1252 # Makefile outputs
1253 #
1254 AC_CONFIG_FILES(
1255 Makefile
1256 doc/Makefile
1257 doc/runtime.in/index.html
1258 doc/runtime.in/manual.html
1259 Makefile.defines
1260 Makefile.defines_int
1261 includes/Makefile
1262 apps/Makefile
1263 win32/Makefile
1264 )
1265
1266 AC_CONFIG_FILES(
1267 lib/Makefile
1268 lib/contrib/Makefile
1269 lib/silcutil/silcruntime.h
1270 lib/silcutil/Makefile
1271 lib/silcutil/tests/Makefile
1272 lib/silcutil/unix/Makefile
1273 lib/silcutil/win32/Makefile
1274 lib/silcutil/symbian/Makefile
1275 lib/srt.pc
1276 )
1277
1278 AC_OUTPUT
1279
1280
1281 ##
1282 ## Summary output
1283 ##
1284
1285 s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir`
1286 s_sbindir=`eval echo $sbindir`;s_sbindir=`eval echo $s_sbindir`
1287 s_mandir=`eval echo $mandir`;s_mandir=`eval echo $s_mandir`
1288 s_includedir=`eval echo $includedir`;s_includedir=`eval echo $s_includedir`
1289
1290 echo ""
1291 echo "SILC Runtime Toolkit configuration summary:"
1292 echo "------------------------------------------"
1293 echo " Target host ...................: $target"
1294 echo " Compiler ......................: $CC"
1295 echo " CFLAGS ........................: $CFLAGS"
1296 echo " LDFLAGS .......................: $LDFLAGS"
1297 echo " LIBS ..........................: $LIBS"
1298 echo ""
1299 echo " Installation prefix ...........: $prefix"
1300 echo " bin directory .................: $s_bindir"
1301 echo " sbin directory ................: $s_sbindir"
1302 echo " etc directory .................: $ETCDIR"
1303 echo " man directory .................: $s_mandir"
1304 echo " doc directory .................: $DOCDIR"
1305 echo " include directory .............: $s_includedir"
1306 echo ""
1307 echo " IPv6 support ..................: $summary_ipv6"
1308
1309 if test x$has_iconv = xfalse; then
1310   iconv_support="no"
1311 else
1312   iconv_support="yes"
1313 fi
1314 echo " Iconv support .................: $iconv_support"
1315
1316 if test x$want_asm = xfalse; then
1317   summary_asm="no"
1318 else
1319   summary_asm="yes"
1320 fi
1321 echo " Assembler optimizations .......: $summary_asm"
1322
1323 if test x$want_cc_optimizations = xfalse; then
1324   summary_cc_opt="no"
1325 else
1326   summary_cc_opt="yes"
1327 fi
1328 echo " Compiler optimizations ........: $summary_cc_opt"
1329
1330 if test x$want_cpu_optimizations = xfalse; then
1331   summary_cpu_opt="no"
1332 else
1333   summary_cpu_opt="yes"
1334 fi
1335 echo " CPU feature optimizations .....: $summary_cpu_opt"
1336
1337 threads="no"
1338 if test x$has_threads = xtrue; then
1339   threads="yes"
1340 fi
1341 echo " Multi-threads support .........: $threads"
1342 echo " Debugging enabled .............: $summary_debug"
1343 echo ""
1344 echo "Compile the sources with 'make' or 'gmake' command."