Initial Patch of Auction House bot rev. 135
[auctionmangos.git] / dep / ACE_wrappers / m4 / ace.m4
blobf045557639d4f94a3deaef9a4a4a9c85cba7ba57
1 dnl -------------------------------------------------------------------------
2 dnl       $Id: ace.m4 82523 2008-08-06 08:36:01Z johnnyw $
3 dnl
4 dnl       ace.m4
5 dnl
6 dnl       ACE M4 include file which contains ACE specific M4 macros
7 dnl       for enabling/disabling certain ACE features.
8 dnl
9 dnl -------------------------------------------------------------------------
11 dnl  Copyright (C) 1998, 1999, 2000, 2002  Ossama Othman
12 dnl
13 dnl  All Rights Reserved
14 dnl
15 dnl This library is free software; you can redistribute it and/or
16 dnl modify it under the current ACE distribution terms.
17 dnl
18 dnl This library is distributed in the hope that it will be useful,
19 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
20 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 dnl Macros that add ACE configuration options to a `configure' script.
24 dnl ACE_CONFIGURATION_OPTIONS
25 AC_DEFUN([ACE_CONFIGURATION_OPTIONS],
27  AM_CONDITIONAL([BUILD_ACE_FOR_TAO], false)
29  AC_ARG_ENABLE([ace-codecs],
30   AS_HELP_STRING(--enable-ace-codecs,build ACE with codecs support [[[yes]]]),
31   [
32    case "${enableval}" in
33     yes)
34       ace_user_enable_ace_codecs=yes
35       ;;
36     no)
37       ace_user_enable_ace_codecs=no
38       ;;
39     *)
40       AC_MSG_ERROR([bad value ${enableval} for --enable-ace-codecs])
41       ;;
42    esac
43   ],
44   [
45    ace_user_enable_ace_codecs=yes
46   ])
47  AM_CONDITIONAL([BUILD_ACE_CODECS], [test X$ace_user_enable_ace_codecs = Xyes])
49  AC_ARG_ENABLE([ace-filecache],
50   AS_HELP_STRING(--enable-ace-filecache,build ACE_Filecache support [[[yes]]]),
51   [
52    case "${enableval}" in
53     yes)
54       ace_user_enable_ace_filecache=yes
55       ;;
56     no)
57       ace_user_enable_ace_filecache=no
58       ;;
59     *)
60       AC_MSG_ERROR([bad value ${enableval} for --enable-ace-filecache])
61       ;;
62    esac
63   ],
64   [
65    dnl Enable ACE_Filecache support by default since it's never turned off
66    dnl in the ACE lib itself. Just required for some things like JAWS.
67    ace_user_enable_ace_filecache=yes
68   ])
69  AM_CONDITIONAL([BUILD_ACE_FILECACHE], [test X$ace_user_enable_ace_filecache = Xyes])
71  AC_ARG_ENABLE([ace-other],
72   AS_HELP_STRING(--enable-ace-other,build ACE with all misc pieces [[[yes]]]),
73   [
74    case "${enableval}" in
75     yes)
76       ace_user_enable_ace_other=yes
77       ;;
78     no)
79       ace_user_enable_ace_other=no
80       ;;
81     *)
82       AC_MSG_ERROR([bad value ${enableval} for --enable-ace-other])
83       ;;
84    esac
85   ],
86   [
87    ace_user_enable_ace_other=yes
88   ])
89  AM_CONDITIONAL([BUILD_ACE_OTHER], [test X$ace_user_enable_ace_other = Xyes])
91  AC_ARG_ENABLE([ace-token],
92   AS_HELP_STRING(--enable-ace-token,build ACE with tokens support [[[yes]]]),
93   [
94    case "${enableval}" in
95     yes)
96       ace_user_enable_ace_token=yes
97       ;;
98     no)
99       ace_user_enable_ace_token=no
100       ;;
101     *)
102       AC_MSG_ERROR([bad value ${enableval} for --enable-ace-token])
103       ;;
104    esac
105   ],
106   [
107    ace_user_enable_ace_token=yes
108   ])
109  AM_CONDITIONAL([BUILD_ACE_TOKEN], [test X$ace_user_enable_ace_token = Xyes])
111  AC_ARG_ENABLE([ace-uuid],
112   AS_HELP_STRING(--enable-ace-uuid,build ACE with UUID support [[[yes]]]),
113   [
114    case "${enableval}" in
115     yes)
116       ace_user_enable_ace_uuid=yes
117       ;;
118     no)
119       ace_user_enable_ace_uuid=no
120       ;;
121     *)
122       AC_MSG_ERROR([bad value ${enableval} for --enable-ace-uuid])
123       ;;
124    esac
125   ],
126   [
127    ace_user_enable_ace_uuid=yes
128   ])
129  AM_CONDITIONAL([BUILD_ACE_UUID], [test X$ace_user_enable_ace_uuid = Xyes])
131  AC_ARG_ENABLE([alloca],
132   AS_HELP_STRING(--enable-alloca,compile with alloca() support [[[no]]]),
133   [
134    case "${enableval}" in
135     yes)
136       ace_user_enable_alloca=yes
137       ;;
138     no)
139       ace_user_enable_alloca=no
140       ;;
141     *)
142       AC_MSG_ERROR([bad value ${enableval} for --enable-alloca])
143       ;;
144    esac
145   ],
146   [
147    dnl Disable alloca() support by default since its use is generally
148    dnl not recommended.
149    ace_user_enable_alloca=no
150   ])
152  AC_ARG_ENABLE([rwho],
153   AS_HELP_STRING(--enable-rwho,build the distributed rwho program [[[no]]]),
154   [
155    case "${enableval}" in
156     yes)
157       ace_user_enable_rwho=yes
158       ;;
159     no)
160       ace_user_enable_rwho=no
161       ;;
162     *)
163       AC_MSG_ERROR([bad value ${enableval} for --enable-rwho])
164       ;;
165    esac
166   ],)
167  AM_CONDITIONAL([BUILD_RWHO], [test X$ace_user_enable_rwho = Xyes])
169  AC_ARG_ENABLE([ipv4-ipv6],
170   AS_HELP_STRING(--enable-ipv4-ipv6,compile with IPv4/IPv6 migration support [[[no]]]),
171   [
172    case "${enableval}" in
173     yes)
174       AC_DEFINE(ACE_HAS_IPV6)
175       AC_DEFINE(ACE_USES_IPV4_IPV6_MIGRATION)
176       ;;
177     no)
178       ;;
179     *)
180       AC_MSG_ERROR([bad value ${enableval} for --enable-ipv4-ipv6])
181       ;;
182    esac
183   ],)
185  AC_ARG_ENABLE([ipv6],
186   AS_HELP_STRING(--enable-ipv6,compile with IPv6 support [[[no]]]),
187   [
188    case "${enableval}" in
189     yes)
190       AC_DEFINE(ACE_HAS_IPV6)
191       ace_user_enable_ipv6=yes
192       ;;
193     no)
194       ace_user_enable_ipv6=no
195       ;;
196     *)
197       AC_MSG_ERROR([bad value ${enableval} for --enable-ipv6])
198       ;;
199    esac
200   ],)
201  AM_CONDITIONAL([BUILD_IPV6], [test X$ace_user_enable_ipv6 = Xyes])
203  AC_ARG_ENABLE([log-msg-prop],
204   AS_HELP_STRING(--enable-log-msg-prop,enable threads inheriting ACE_Log_Msg properties from parent thread [[[yes]]]),
205   [
206    case "${enableval}" in
207     yes)
208       dnl nothing to do
209       ;;
210     no)
211       AC_DEFINE(ACE_THREADS_DONT_INHERIT_LOG_MSG)
212       ;;
213     *)
214       AC_MSG_ERROR([bad value ${enableval} for --enable-log-msg-prop])
215       ;;
216    esac
217   ],)
219  AC_ARG_ENABLE([logging],
220   AS_HELP_STRING(--enable-logging,enable ACE logging macros [[[yes]]]),
221   [
222    case "${enableval}" in
223     yes)
224       dnl nothing to do
225       ;;
226     no)
227       AC_DEFINE([ACE_NLOGGING])
228       ;;
229     *)
230       AC_MSG_ERROR([bad value ${enableval} for --enable-logging])
231       ;;
232    esac
233   ],)
235  AC_ARG_ENABLE([malloc-stats],
236   AS_HELP_STRING(--enable-malloc-stats,enable malloc statistics collection [[[no]]]),
237   [
238    case "${enableval}" in
239     yes)
240       AC_DEFINE([ACE_HAS_MALLOC_STATS])
241       ;;
242     no)
243       dnl nothing to do
244       ;;
245     *)
246       AC_MSG_ERROR([bad value ${enableval} for --enable-malloc-stats])
247       ;;
248    esac
249   ],)
251  AC_ARG_ENABLE([pi-pointers],
252   AS_HELP_STRING(--enable-pi-pointers,enable pos. indep. pointers [[[yes]]]),
253   [
254    case "${enableval}" in
255     yes)
256       AC_DEFINE([ACE_HAS_POSITION_INDEPENDENT_POINTERS])
257       ;;
258     no)
259       ;;
260     *)
261       AC_MSG_ERROR([bad value ${enableval} for --enable-pi-pointers])
262       ;;
263    esac
264   ],
265   [
266    AC_DEFINE([ACE_HAS_POSITION_INDEPENDENT_POINTERS])
267   ])
269  AC_ARG_ENABLE([posix-sem-timeout-emulation],
270   AS_HELP_STRING(--enable-posix-sem-timeout-emulation,enable POSIX semaphore timeout emulation [[[no]]]),
271   [
272    case "${enableval}" in
273     yes)
274       AC_DEFINE([ACE_DISABLE_POSIX_SEM_TIMEOUT_EMULATION])
275       ;;
276     no)
277       ;;
278     *)
279       AC_MSG_ERROR([bad value ${enableval} for --enable-posix-sem-timeout-emulation])
280       ;;
281    esac
282   ],)
284  AC_ARG_ENABLE([probe],
285   AS_HELP_STRING(--enable-probe,enable ACE_Timeprobes [[[no]]]),
286   [
287    case "${enableval}" in
288     yes)
289       AC_DEFINE([ACE_COMPILE_TIMEPROBES])
290       ;;
291     no)
292       ;;
293     *)
294       AC_MSG_ERROR([bad value ${enableval} for --enable-probe])
295       ;;
296    esac
297   ],)
299  AC_ARG_ENABLE([static-obj-mgr],
300   AS_HELP_STRING(--enable-static-obj-mgr,enable static Object_Manager [[[yes]]]),
301   [
302    case "${enableval}" in
303     yes)
304       dnl nothing to do
305       ;;
306     no)
307       AC_DEFINE([ACE_HAS_NONSTATIC_OBJECT_MANAGER])
308       ;;
309     *)
310       AC_MSG_ERROR([bad value ${enableval} for --enable-static-obj-mgr])
311       ;;
312    esac
313   ],)
316  AC_ARG_ENABLE([threads],
317   AS_HELP_STRING(--enable-threads,enable thread support [[[yes]]]),
318   [
319    case "${enableval}" in
320     yes)
321       ace_user_enable_threads=yes
322       ;;
323     no)
324       ace_user_enable_threads=no
325       ;;
326     *)
327       AC_MSG_ERROR([bad value ${enableval} for --enable-threads])
328       ;;
329    esac
330   ],
331   [
332     ace_user_enable_threads=yes
333   ])
334  AM_CONDITIONAL([BUILD_THREADS], [test X$ace_user_enable_threads = Xyes])
336  AC_ARG_ENABLE([pthreads],
337   AS_HELP_STRING(--enable-pthreads,enable POSIX thread (Pthreads) support [[[yes]]]),
338   [
339    case "${enableval}" in
340     yes)
341       ace_user_enable_pthreads=yes
342       ;;
343     no)
344       ace_user_enable_pthreads=no
345       ;;
346     *)
347       AC_MSG_ERROR([bad value ${enableval} for --enable-pthreads])
348       ;;
349    esac
350   ],
351   [
352     ace_user_enable_pthreads=yes
353   ])
355  AC_ARG_ENABLE([aio],
356   AS_HELP_STRING(--enable-aio,enable aio support [[[yes]]]),
357   [
358    case "${enableval}" in
359     yes)
360       ace_user_enable_aio=yes
361       ;;
362     no)
363       ace_user_enable_aio=no
364       ;;
365     *)
366       AC_MSG_ERROR([bad value ${enableval} for --enable-aio])
367       ;;
368    esac
369   ],
370   [
371     ace_user_enable_aio=yes
372   ])
374  AC_ARG_ENABLE([uithreads],
375   AS_HELP_STRING(--enable-uithreads,enable UNIX International thread support [[[no]]]),
376   [
377    case "${enableval}" in
378     yes)
379       ace_user_enable_uithreads=yes
380       ;;
381     no)
382       ace_user_enable_uithreads=no
383       ;;
384     *)
385       AC_MSG_ERROR([bad value ${enableval} for --enable-uithreads])
386       ;;
387    esac
388   ],
389   [
390     dnl The default is to disable UI threads. However, on Solaris, we
391     dnl enable it by default since it's functionality is very useful and
392     dnl has traditionally been enabled in ACE.
393     case "$host" in
394       *solaris2*)
395         ace_user_enable_uithreads=yes
396         AC_MSG_NOTICE([[--enable-uithreads enabled by default for Solaris; use --enable-uithreads=no to disable it.]])
397         ;;
398       *)
399         ace_user_enable_uithreads=no
400         ;;
401     esac
402   ])
404  AC_ARG_ENABLE([verb-not-sup],
405   AS_HELP_STRING(--enable-verb-not-sup,enable verbose ENOTSUP reports [[[no]]]),
406   [
407    case "${enableval}" in
408     yes)
409       AC_DEFINE([ACE_HAS_VERBOSE_NOTSUP])
410       ;;
411     no)
412       dnl Do nothing
413       ;;
414     *)
415       AC_MSG_ERROR([bad value ${enableval} for --enable-verb-not-sup])
416       ;;
417    esac
418   ],)
420  AC_ARG_ENABLE([rcsid],
421   AS_HELP_STRING(--enable-rcsid,compile RCS id strings into object files [[[no]]]),
422   [
423    case "${enableval}" in
424     yes)
425       ace_user_enable_rcsid=yes
426       ;;
427     no)
428       ace_user_enable_rcsid=no
429       ;;
430     *)
431       AC_MSG_ERROR([bad value ${enableval} for --enable-rcsid])
432       ;;
433    esac
434   ])
435  if test X$ace_user_enable_rcsid = Xyes; then
436    AC_DEFINE(ACE_USE_RCSID, 1,
437              [Define to 1 to embed RCS ID strings into compiled object files.])
438  fi
440  dnl The ace/config-all.h file defaults ACE_NTRACE properly, so only emit
441  dnl something if the user specifies this option.
442  AC_ARG_ENABLE([trace],
443   AS_HELP_STRING(--enable-trace,enable ACE tracing [[[no]]]),
444   [
445    case "${enableval}" in
446     yes)
447       AC_DEFINE([ACE_NTRACE],0)
448       ;;
449     no)
450       AC_DEFINE([ACE_NTRACE],1)
451       ;;
452     *)
453       AC_MSG_ERROR([bad value ${enableval} for --enable-trace])
454       ;;
455    esac
456   ],)
458  AC_ARG_ENABLE([wfmo],
459   AS_HELP_STRING(--enable-wfmo,build WFMO-using examples [[[no]]]),
460   [
461    case "${enableval}" in
462     yes)
463       ace_user_enable_wfmo=yes
464       ;;
465     no)
466       ace_user_enable_wfmo=no
467       ;;
468     *)
469       AC_MSG_ERROR([bad value ${enableval} for --enable-wfmo])
470       ;;
471    esac
472   ],
473   [
474     case "$host" in
475       *win32*)
476            ace_user_enable_wfmo=yes
477                ;;
478       *)
479            ace_user_enable_wfmo=no
480                ;;
481     esac
482   ])
483  AM_CONDITIONAL([BUILD_WFMO], [test X$ace_user_enable_wfmo = Xyes])
485  AC_ARG_ENABLE([wince],
486   AS_HELP_STRING(--enable-wince,build Windows CE/Mobile-using examples [[[no]]]),
487   [
488    case "${enableval}" in
489     yes)
490       ace_user_enable_wince=no
491       ;;
492     no)
493       ace_user_enable_wince=no
494       ;;
495     *)
496       AC_MSG_ERROR([bad value ${enableval} for --enable-wince])
497       ;;
498    esac
499   ],
500   [
501     case "$host" in
502       *win32*)
503            ace_user_enable_wince=yes
504                ;;
505       *)
506            ace_user_enable_wince=no
507                ;;
508     esac
509   ])
510  AM_CONDITIONAL([BUILD_WINCE], [test X$ace_user_enable_wince = Xyes])
512  AC_ARG_ENABLE([winregistry],
513   AS_HELP_STRING(--enable-winregistry,build Windows registry-using examples [[[no]]]),
514   [
515    case "${enableval}" in
516     yes)
517       ace_user_enable_winregistry=no
518       ;;
519     no)
520       ace_user_enable_winregistry=no
521       ;;
522     *)
523       AC_MSG_ERROR([bad value ${enableval} for --enable-winregistry])
524       ;;
525    esac
526   ],
527   [
528     case "$host" in
529       *win32*)
530            ace_user_enable_winregistry=yes
531                ;;
532       *)
533            ace_user_enable_winregistry=no
534                ;;
535     esac
536   ])
537  AM_CONDITIONAL([BUILD_WINREGISTRY], [test X$ace_user_enable_winregistry = Xyes])
539  ACE_ENABLE_FL_REACTOR
540  ACE_ENABLE_QT_REACTOR
541  ACE_ENABLE_TK_REACTOR
542  ACE_ENABLE_XT_REACTOR
543  ACE_ENABLE_FOX_REACTOR
545  # placeholder for WxWindows/wxWidgets support
546  AM_CONDITIONAL([BUILD_WXWINDOWS], false)
548  ACE_PATH_BZIP2
549  ACE_PATH_ZLIB
550  ACE_PATH_ZZIP
552  AC_ARG_ENABLE([gperf],
553   AS_HELP_STRING(--enable-gperf,compile the gperf program [[[yes]]]),
554   [
555    case "${enableval}" in
556     yes)
557       ace_user_enable_gperf=yes
558       ;;
559     no)
560       ace_user_enable_gperf=no
561       ;;
562     *)
563       AC_MSG_ERROR([bad value ${withval} for --with-gperf])
564       ;;
565    esac
566   ],
567   [
568    ace_user_enable_gperf=yes
569   ])
570  if test "$ace_user_enable_gperf" = yes; then
571    AC_DEFINE([ACE_HAS_GPERF])
572    AS_IF([test -n "$GPERF"],
573     [
574      AC_MSG_WARN([gperf program already exists])
575      AC_MSG_WARN([existing gperf may be overwritten during installation])
576     ],[])
577  fi
578  AM_CONDITIONAL([BUILD_GPERF], [test X$ace_user_enable_gperf = Xyes])
580  ACE_ENABLE_QOS
581  ACE_ENABLE_SSL
582  ACE_ENABLE_ACEXML
584  AC_ARG_WITH([tao],
585   AS_HELP_STRING(--with-tao,build TAO (the ACE ORB) [[[yes]]]),
586   [
587    case "${withval}" in
588     yes)
589       ace_user_with_tao=yes
590       ;;
591     no)
592       ace_user_with_tao=no
593       ;;
594     *)
595       AC_MSG_ERROR([bad value ${withval} for --with-tao])
596       ;;
597    esac
598   ],
599   [
600    ace_user_with_tao=yes
601   ])
603  AC_ARG_WITH([tli-device],
604   AS_HELP_STRING(--with-tli-device(=DEV),device for TCP on TLI [[/dev/tcp]]),
605   [
606    case "${withval}" in
607     yes)
608       AC_MSG_ERROR([Specify the TLI/TCP device if you use this option.])
609       ;;
610     no)
611       ;;
612     *)
613       if test -e "${withval}"; then
614         AC_DEFINE_UNQUOTED([ACE_TLI_TCP_DEVICE], ["${withval}"])
615       else
616         AC_MSG_ERROR([TLI/TCP device ${withval} does not exist.])
617       fi
618       ;;
619    esac
620   ],)
622  AC_ARG_ENABLE([reentrant],
623   AS_HELP_STRING(--enable-reentrant,enable reentrant functions [[[yes]]]),
624   [
625    case "${enableval}" in
626     yes)
627       ace_user_enable_reentrant_funcs=yes
628       ;;
629     no)
630       ace_user_enable_reentrant_funcs=no
631       ;;
632     *)
633       AC_MSG_ERROR([bad value ${enableval} for --enable-reentrant])
634       ;;
635    esac
636   ],
637   [
638    ace_user_enable_reentrant_funcs=yes
639   ])
641  AC_ARG_ENABLE([ace-examples],
642   AS_HELP_STRING(--enable-ace-examples,build ACE examples [[[yes]]]),
643   [
644    case "${enableval}" in
645     yes)
646       ace_build_examples=yes
647       ;;
648     no)
649       ace_build_examples=no
650       ;;
651     *)
652       AC_MSG_ERROR([bad value ${enableval} for --enable-ace-examples])
653       ;;
654    esac
655   ],
656   [
657    ace_build_examples=yes
658   ])
659   AM_CONDITIONAL([BUILD_EXAMPLES], [test X$ace_build_examples = Xyes])
661  AC_ARG_ENABLE([ace-tests],
662   AS_HELP_STRING(--enable-ace-tests,build ACE tests [[[yes]]]),
663   [
664    case "${enableval}" in
665     yes)
666       ace_build_tests=yes
667       ;;
668     no)
669       ace_build_tests=no
670       ;;
671     *)
672       AC_MSG_ERROR([bad value ${enableval} for --enable-ace-tests])
673       ;;
674    esac
675   ],
676   [
677    ace_build_tests=yes
678   ])
679  AM_CONDITIONAL([BUILD_TESTS], [test X$ace_build_tests = Xyes])
681  ACE_ENABLE_CDR_SWAP_ON_READ
682  ACE_ENABLE_CDR_SWAP_ON_WRITE
683  ACE_ENABLE_CDR_ALIGNMENT
684  ACE_ENABLE_REACTOR_NOTIFICATION_QUEUE
685  ACE_ENABLE_STRDUP_EMULATION
686  ACE_ENABLE_WCSDUP_EMULATION
689 AC_DEFUN([ACE_CHECK_LIB64],
691     AC_ARG_ENABLE(libsuffix,
692         AC_HELP_STRING([--enable-libsuffix],
693             [/lib directory suffix (64,32,none,auto[=default])]),
694             acelibsuff=$enableval, acelibsuff="auto")
696     if test "$acelibsuff" = "auto"; then
698 cat > conftest.cpp << _ACEOF
699 #include <iostream>
700 int main(int, char **) {
701  return 0;
703 _ACEOF
704         acelibsuff=`$CXX conftest.cpp -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
705     s,.*/lib\([[^\/]]*\)/.*,\1,
706     p
708         rm -rf conftest.*
709     fi
711     if test "$acelibsuff" = "no" || test "$acelibsuff" = "none"; then
712        acelibsuff=
713     fi
714     if test -z "$acelibsuff"; then
715         AC_MSG_RESULT([not using lib directory suffix])
716     else
717         AC_MSG_RESULT([using lib directory suffix $acelibsuff])
718     fi
721 dnl Macros that add ACE compilation options to a `configure' script.
722 dnl ACE_COMPILATION_OPTIONS
723 AC_DEFUN([ACE_COMPILATION_OPTIONS],
725  AC_ARG_ENABLE([debug],
726   AS_HELP_STRING(--enable-debug,enable debugging [[[yes]]]),
727   [
728    case "${enableval}" in
729     yes)
730       ACE_CXXFLAGS="$ACE_CXXFLAGS $DCXXFLAGS"
731       ;;
732     no)
733       AC_DEFINE([ACE_NDEBUG])
734       ;;
735     *)
736       AC_MSG_ERROR([bad value ${enableval} for --enable-debug])
737       ;;
738    esac
739   ],)
741  AC_ARG_ENABLE([exceptions],
742   AS_HELP_STRING(--enable-exceptions,enable C++ exception handling [[[yes]]]),
743   [
744    case "${enableval}" in
745     yes)
746       ace_user_enable_exceptions=yes
747       ;;
748     no)
749       ace_user_enable_exceptions=no
750       if test "$GXX" = yes; then
751         if $CXX --version | $EGREP -v '^2\.[[0-7]]' > /dev/null; then
752           ACE_CXXFLAGS="$ACE_CXXFLAGS -fno-exceptions"
753         fi
754       fi
755       ;;
756     *)
757       AC_MSG_ERROR([bad value ${enableval} for --enable-exceptions])
758       ;;
759    esac
760   ],
761   [
762    ace_user_enable_exceptions=yes
764 dnl THE FOLLOWING WAS ONLY USED WHEN DISABLING EXCEPTION SUPPORT BY
765 dnl DEFAULT.
767 dnl    if test "$GXX" = yes; then
768 dnl      if $CXX --version | $EGREP -v '^2\.[[0-7]]' > /dev/null; then
769 dnl        ACE_CXXFLAGS="$ACE_CXXFLAGS -fno-exceptions"
770 dnl      fi
771 dnl    fi
772   ])
773  AM_CONDITIONAL([BUILD_EXCEPTIONS], [test X$ace_user_enable_exceptions = Xyes])
775  AC_ARG_ENABLE([fast],
776   AS_HELP_STRING(--enable-fast,enable -fast flag (e.g. Sun C++) [[[no]]]),
777   [
778    case "${enableval}" in
779     yes)
780       ACE_CXXFLAGS="$ACE_CXXFLAGS -fast"
781       ACE_CFLAGS="$ACE_CFLAGS -fast"
782       ;;
783     no)
784       ;;
785     *)
786       AC_MSG_ERROR([bad value ${enableval} for --enable-fast])
787       ;;
788    esac
789   ],)
791  AC_ARG_ENABLE([ipo],
792   AS_HELP_STRING(--enable-ipo,enable -ipo flag (e.g. Intel C++) [[[no]]]),
793   [
794    case "${enableval}" in
795     yes)
796       ACE_CXXFLAGS="$ACE_CXXFLAGS -ipo"
797       ACE_CFLAGS="$ACE_CFLAGS -ipo"
798       ;;
799     no)
800       ;;
801     *)
802       AC_MSG_ERROR([bad value ${enableval} for --enable-ipo])
803       ;;
804    esac
805   ],)
807  AC_ARG_ENABLE([inline],
808   AS_HELP_STRING(--enable-inline,enable code inlining [[[yes]]]),
809   [
810    case "${enableval}" in
811     yes)
812       AC_DEFINE([__ACE_INLINE__])
813       ;;
814     no)
815       AC_DEFINE([ACE_NO_INLINE])
816       ;;
817     *)
818       AC_MSG_ERROR([bad value ${enableval} for --enable-inline])
819       ;;
820    esac
821   ],
822   [
823    AC_DEFINE([__ACE_INLINE__])
824   ])
826  AC_ARG_ENABLE([optimize],
827   AS_HELP_STRING(--enable-optimize,enable additional optimizations [[[yes]]]),
828   [
829    case "${enableval}" in
830     yes)
831       ace_user_enable_optimize=yes
832       ;;
833     no)
834       AC_MSG_WARN([Optimization configure support not fully implemented yet.])
835       ;;
836     *)
837       AC_MSG_ERROR([bad value ${enableval} for --enable-optimize])
838       ;;
839    esac
840   ],
841   [
842    ace_user_enable_optimize=yes
843   ])
846  AC_ARG_ENABLE([profile],
847   AS_HELP_STRING(--enable-profile,enable profiling [[[no]]]),
848   [
849    case "${enableval}" in
850     yes)
851       if test -z "$PROF"; then
852         AC_MSG_WARN([No profiling program found.  Assuming 'prof' exists.])
853         ACE_CXXFLAGS="$ACE_CXXFLAGS -p"
854         ACE_CFLAGS="$ACE_CFLAGS -p"
855       else
856         case "$PROF" in
857         gprof)
858           echo "Building with 'gprof' support"
859           ACE_CXXFLAGS="$ACE_CXXFLAGS -pg"
860           ACE_CFLAGS="$ACE_CFLAGS -pg"
861           ;;
862         prof)
863           echo "Building with 'prof' support"
864           ACE_CXXFLAGS="$ACE_CXXFLAGS -p"
865           ACE_CFLAGS="$ACE_CFLAGS -p"
866           ;;
867         *)
868           dnl We shouldn't get here.
869           AC_MSG_WARN([Assuming 'prof' exists.])
870           ACE_CXXFLAGS="$ACE_CXXFLAGS -p"
871           ACE_CFLAGS="$ACE_CFLAGS -p"
872           ;;
873         esac
874       fi
875       ;;
876     no)
877       dnl Do nothing
878       ;;
879     *)
880       AC_MSG_ERROR([bad value ${enableval} for --enable-profile])
881       ;;
882    esac
883   ],)
885  AC_ARG_ENABLE([purify],
886   AS_HELP_STRING(--enable-purify,Purify all executables [[[no]]]),
887   [
888    case "${enableval}" in
889     yes)
890       AC_CHECK_PROG([PURIFY], [purify], [purify],[])
891       if test -n "$PURIFY"; then
892         PURE_CACHE_BASE_DIR=/tmp/purifycache
893         PURE_CACHE_DIR="${PURE_CACHE_BASE_DIR}-${LOGNAME}"
894         PURE_CACHE_DIR="${PURE_CACHE_DIR}-"`basename $CXX`
895         PURELINK="$PURIFY -best-effort -chain-length=20 -cache-dir=$PURE_CACHE_DIR -fds-inuse-at-exit=no -inuse-at-exit -max_threads=100"
896         dnl Pick up Quantify directory from the users PATH.
897                     ACE_PURIFY_DIR=`type purify | sed -e 's/.* is //' -e 's%/purify'`
898         ACE_CPPFLAGS="-DACE_HAS_PURIFY -I$ACE_PURIFY_DIR"
899       else
900         AC_MSG_WARN([Purify program was not found.])
901         AC_MSG_WARN([Disabling purify support.])
902       fi
903       ;;
904     no)
905       PURELINK=""
906       ;;
907     *)
908       AC_MSG_ERROR([bad value ${enableval} for --enable-purify])
909       ;;
910    esac
911   ], PURELINK="")
913  AC_ARG_ENABLE([quantify],
914   AS_HELP_STRING(--enable-quantify,Quantify all executables [[[no]]]),
915   [
916    case "${enableval}" in
917     yes)
918       AC_CHECK_PROG([QUANTIFY], [quantify], [quantify],[])
919       if test -n "$QUANTIFY"; then
920         PURE_CACHE_BASE_DIR=/tmp/purifycache
921         PURE_CACHE_DIR="${PURE_CACHE_BASE_DIR}-${LOGNAME}"
922         PURE_CACHE_DIR="${PURE_CACHE_DIR}-"`basename $CXX`
924         PRELINK="$QUANTIFY -best-effort -max_threads=100 -cache-dir=$PURE_CACHE_DIR"
925         dnl Pick up Quantify directory from the users PATH.
926                     ACE_QUANTIFY_DIR=`type quantify | sed -e 's/.* is //' -e 's%/quantify$$%%'`
927         ACE_CPPFLAGS="-DACE_HAS_QUANTIFY -I$ACE_QUANTIFY_DIR"
928       else
929         AC_MSG_WARN([Quantify program was not found.])
930         AC_MSG_WARN([Disabling quantify support.])
931       fi
932       ;;
933     no)
934       PRELINK=""
935       ;;
936     *)
937       AC_MSG_ERROR([bad value ${enableval} for --enable-quantify])
938       ;;
939    esac
940   ], PRELINK="")
942  AC_ARG_ENABLE([repo],
943   AS_HELP_STRING(--enable-repo,use GNU template repository GNU C++ with repo patches and EGCS only [[[no]]]),
944   [
945    case "${enableval}" in
946     yes)
947       if test "$GXX" = yes; then
948         ace_user_enable_repo=yes
949         ACE_CXXFLAGS="$ACE_CXXFLAGS -frepo"
950         AC_DEFINE(ACE_HAS_GNU_REPO)
951       else
952         ace_user_enable_repo=no
953         AC_MSG_WARN([Not using GNU C++! GNU template respository disabled.])
954       fi
955       ;;
956     no)
957       ace_user_enable_repo=no
958       ;;
959     *)
960       AC_MSG_ERROR([bad value ${enableval} for --enable-repo])
961       ;;
962    esac
963   ],
964   [
965    ace_user_enable_repo=no
966   ])
968  AC_ARG_ENABLE([stdcpplib],
969   AS_HELP_STRING([--enable-stdcpplib],[enable standard C++ library [[yes]]]),
970   [
971    case "${enableval}" in
972     yes)
973       ace_user_enable_stdcpplib=yes
974       ;;
975     no)
976       ace_user_enable_stdcpplib=no
977       ;;
978     *)
979       AC_MSG_ERROR([bad value ${enableval} for --enable-stdcpplib])
980       ;;
981    esac
982   ],
983   [
984    ace_user_enable_stdcpplib=yes
985   ])
987  AC_ARG_ENABLE([uses-wchar],
988                AS_HELP_STRING([--enable-uses-wchar],
989                             [enable use of wide characters [[no]]]),
990                [case "${enableval}" in
991                  yes)
992                   AC_DEFINE([ACE_USES_WCHAR])
993                   ace_cv_user_enable_wide_char=yes
994                   ;;
995                  no)
996                   ace_cv_user_enable_wide_char=no
997                   ;;
998                  *)
999                   AC_MSG_ERROR([bad value ${enableval} for --enable-uses-wchar])
1000                   ;;
1001                 esac])
1002  AC_CACHE_CHECK([whether to use wide characters internally],
1003                 [ace_cv_user_enable_wide_char], [ace_cv_user_enable_wide_char=no])
1004  AM_CONDITIONAL([BUILD_USES_WCHAR], [test X$ace_cv_user_enable_wide_char = Xyes])
1008 # ACE_ENABLE_CDR_SWAP_ON_READ
1009 #---------------------------------------------------------------------------
1010 AC_DEFUN([ACE_ENABLE_CDR_SWAP_ON_READ],
1011 [AC_ARG_ENABLE([ace-cdr-swap-on-read],
1012                AS_HELP_STRING([--enable-ace-cdr-swap-on-read],
1013                               [configure CDR to support swap on read [[yes]]]),
1014                [case "${enableval}" in
1015                  yes)
1016                   ace_user_cdr_swap_on_read=yes
1017                   ;;
1018                  no)
1019                   ace_user_cdr_swap_on_read=no
1020                   ;;
1021                  *)
1022                   AC_MSG_ERROR(bad value ${enableval} for --enable-ace-cdr-swap-on-read)
1023                   ;;
1024                 esac],[
1025                   ace_user_cdr_swap_on_read=yes
1026                 ])
1027 if test X$ace_user_cdr_swap_on_read = Xno; then
1028   AC_DEFINE(ACE_DISABLE_SWAP_ON_READ, 1,
1029             [Define to 1 to disable swapping swapping CDR on read])
1033 # ACE_ENABLE_CDR_SWAP_ON_WRITE
1034 #---------------------------------------------------------------------------
1035 AC_DEFUN([ACE_ENABLE_CDR_SWAP_ON_WRITE],
1036 [AC_ARG_ENABLE([ace-cdr-swap-on-write],
1037                AS_HELP_STRING([--enable-ace-cdr-swap-on-write],
1038                               [configure CDR to support swap on write [[no]]]),
1039                [case "${enableval}" in
1040                  yes)
1041                   ace_user_cdr_swap_on_write=yes
1042                   ;;
1043                  no)
1044                   ace_user_cdr_swap_on_write=no
1045                   ;;
1046                  *)
1047                   AC_MSG_ERROR(bad value ${enableval} for --enable-ace-cdr-swap-on-write)
1048                   ;;
1049                 esac],[
1050                   ace_user_cdr_swap_on_write=no
1051                 ])
1052 if test X$ace_user_cdr_swap_on_write = Xyes; then
1053   AC_DEFINE(ACE_ENABLE_SWAP_ON_WRITE, 1,
1054             [Define to 1 to enable swapping swapping CDR on write])
1058 # ACE_ENABLE_CDR_ALIGNMENT
1059 #---------------------------------------------------------------------------
1060 AC_DEFUN([ACE_ENABLE_CDR_ALIGNMENT],
1061 [AC_ARG_ENABLE([ace-cdr-alignment],
1062                AS_HELP_STRING([--enable-ace-cdr-alignment],
1063                               [configure CDR to require aligned access [[yes]]]),
1064                [case "${enableval}" in
1065                  yes)
1066                   ace_user_cdr_alignment=yes
1067                   ;;
1068                  no)
1069                   ace_user_cdr_alignment=no
1070                   ;;
1071                  *)
1072                   AC_MSG_ERROR(bad value ${enableval} for --enable-ace-cdr-alignment)
1073                   ;;
1074                 esac],[
1075                   ace_user_cdr_alignment=yes
1076                 ])
1077 if test X$ace_user_cdr_alignment = Xno; then
1078   AC_DEFINE(ACE_LACKS_CDR_ALIGNMENT, 1,
1079             [Define to 1 to support unaligned CDR])
1083 # ACE_ENABLE_REACTOR_NOTIFICATION_QUEUE
1084 #---------------------------------------------------------------------------
1085 AC_DEFUN([ACE_ENABLE_REACTOR_NOTIFICATION_QUEUE],
1086 [AC_ARG_ENABLE([ace-reactor-notification-queue],
1087                AS_HELP_STRING([--enable-ace-reactor-notification-queue],
1088                               [configure Reactor to use a user-space queue for notifications [[no]]]),
1089                [case "${enableval}" in
1090                  yes)
1091                   ace_user_reactor_notification_queue=yes
1092                   ;;
1093                  no)
1094                   ace_user_reactor_notification_queue=no
1095                   ;;
1096                  *)
1097                   AC_MSG_ERROR(bad value ${enableval} for --enable-ace-reactor-notification-queue)
1098                   ;;
1099                 esac],[
1100                   ace_user_reactor_notification_queue=no
1101                 ])
1102 if test X$ace_user_reactor_notification_queue = Xyes; then
1103   AC_DEFINE([ACE_HAS_REACTOR_NOTIFICATION_QUEUE], 1,
1104             [Define to 1 to configure Reactor to use a user-space queue for notifications])
1109 # ACE_ENABLE_STRDUP_EMULATION
1110 #---------------------------------------------------------------------------
1111 AC_DEFUN([ACE_ENABLE_STRDUP_EMULATION],
1112 [AC_ARG_ENABLE([ace-strdup-emulation],
1113                AS_HELP_STRING([--enable-ace-strdup-emulation],
1114                               [use ACE's strdup emulation [[no]]]),
1115                [case "${enableval}" in
1116                  yes)
1117                   ace_user_strdup_emulation=yes
1118                   ;;
1119                  no)
1120                   ace_user_strdup_emulation=no
1121                   ;;
1122                  *)
1123                   AC_MSG_ERROR(bad value ${enableval} for --enable-ace-strdup-emulation)
1124                   ;;
1125                 esac],[
1126                   ace_user_strdup_emulation=no
1127                 ])
1128 if test X$ace_user_strdup_emulation = Xyes; then
1129   AC_DEFINE(ACE_HAS_STRDUP_EMULATION, 1,
1130             [Define to 1 use ACE's strdup() emulation])
1134 # ACE_ENABLE_WCSDUP_EMULATION
1135 #---------------------------------------------------------------------------
1136 AC_DEFUN([ACE_ENABLE_WCSDUP_EMULATION],
1137 [AC_ARG_ENABLE([ace-wcsdup-emulation],
1138                AS_HELP_STRING([--enable-ace-wcsdup-emulation],
1139                               [use ACE's wcsdup emulation [[no]]]),
1140                [case "${enableval}" in
1141                  yes)
1142                   ace_user_wcsdup_emulation=yes
1143                   ;;
1144                  no)
1145                   ace_user_wcsdup_emulation=no
1146                   ;;
1147                  *)
1148                   AC_MSG_ERROR(bad value ${enableval} for --enable-ace-wcsdup-emulation)
1149                   ;;
1150                 esac],[
1151                   ace_user_wcsdup_emulation=no
1152                 ])
1153 if test X$ace_user_wcsdup_emulation = Xyes; then
1154   AC_DEFINE(ACE_HAS_WCSDUP_EMULATION, 1,
1155             [Define to 1 use ACE's wcsdup() emulation])
1159 AC_DEFUN([ACE_ENABLE_QOS],
1160 [AC_ARG_ENABLE([qos],
1161                AS_HELP_STRING([--enable-qos],
1162                               [compile/use the ACE_QoS library [[no]]]),
1163                [case "${enableval}" in
1164                  yes)
1165                   ace_cv_user_enable_qos=yes
1166                   ;;
1167                  no)
1168                   ace_cv_user_enable_qos=no
1169                   ;;
1170                  *)
1171                   AC_MSG_ERROR(bad value ${enableval} for --enable-qos)
1172                   ;;
1173                 esac])
1174 AC_CACHE_CHECK([whether to compile/use the ACE_QoS library],
1175                [ace_cv_user_enable_qos],[ace_cv_user_enable_qos=no])
1176 AM_CONDITIONAL([BUILD_QOS], [test X$ace_cv_user_enable_qos = Xyes])
1179 AC_DEFUN([ACE_ENABLE_SSL],
1180 [AC_REQUIRE([ACE_CHECK_TLS])
1181 AC_ARG_ENABLE([ssl],
1182                AS_HELP_STRING([--enable-ssl],
1183                               [compile/use the ACE_SSL library [[yes]]]),
1184                [case "${enableval}" in
1185                  yes)
1186                   ace_cv_user_enable_ssl=yes
1187                   ;;
1188                  no)
1189                   ace_cv_user_enable_ssl=no
1190                   ;;
1191                  *)
1192                   AC_MSG_ERROR(bad value ${enableval} for --enable-ssl)
1193                   ;;
1194                 esac])
1195 AC_CACHE_CHECK([whether to compile/use the ACE_SSL library],
1196                [ace_cv_user_enable_ssl], [ace_cv_user_enable_ssl=yes])
1197 AM_CONDITIONAL([BUILD_SSL], [test X$ace_cv_user_enable_ssl = Xyes])
1200 AC_DEFUN([ACE_ENABLE_ACEXML],
1201 [AC_ARG_ENABLE([acexml],
1202                AS_HELP_STRING([--enable-acexml],
1203                               [compile/use the ACEXML library [[yes]]]),
1204                [case "${enableval}" in
1205                  yes)
1206                   ace_cv_user_enable_acexml=yes
1207                   ;;
1208                  no)
1209                   ace_cv_user_enable_acexml=no
1210                   ;;
1211                  *)
1212                   AC_MSG_ERROR(bad value ${enableval} for --enable-acexml)
1213                   ;;
1214                 esac],
1215                 [
1216                  ace_cv_user_enable_acexml=yes
1217                 ])
1218 AC_CACHE_CHECK([whether to compile/use the ACEXML library],
1219                [ace_cv_user_enable_acexml], [ace_cv_user_enable_acexml=yes])
1220 AM_CONDITIONAL([BUILD_ACEXML], [test X$ace_cv_user_enable_acexml = Xyes])
1224 # ACE_PATH_GL
1225 #---------------------------------------------------------------------------
1226 # Find OpenGL Libraries, flags, etc.
1227 AC_DEFUN([ACE_PATH_GL],
1232 # ACE_PATH_FL
1233 #---------------------------------------------------------------------------
1234 # Find FL/TK Libraries, flags, etc.
1235 AC_DEFUN([ACE_PATH_FL],
1236 [AC_REQUIRE([ACE_PATH_GL])
1237  AC_ARG_WITH([fltkconfig],
1238  AS_HELP_STRING([--with-fltkconfig=DIR],
1239                 [path to fltk-config [[automatic]]]),
1240  [ ac_fltkconfig_dir="${withval}" ])
1241  if test X"${ac_fltkconfig_dir}" = X; then
1242    AC_PATH_PROG([FLTKCONFIG], [fltk-config], [])
1243  else
1244    AC_MSG_CHECKING([whether fltk-config exists in ${ac_fltkconfig_dir}])
1245    if test -f "${ac_fltkconfig_dir}/fltk-config"; then
1246      FLTKCONFIG="${ac_fltkconfig_dir}/fltk-config"
1247      AC_MSG_RESULT([yes])
1248    else
1249      AC_MSG_RESULT([no])
1250    fi
1251  fi
1252  if test X"${FLTKCONFIG}" != X; then
1253    ACE_FLTK_CPPFLAGS=`$FLTKCONFIG --use-gl --cxxflags 2>/dev/null`
1254    ACE_FLTK_LIBS=`$FLTKCONFIG --use-gl --ldflags 2>/dev/null`
1256    AC_SUBST(ACE_FLTK_CPPFLAGS)
1257    AC_SUBST(ACE_FLTK_LIBS)
1258  fi
1262 # ACE_PATH_QT
1263 #---------------------------------------------------------------------------
1264 # Find Qt Libraries, flags, etc.
1265 AC_DEFUN([ACE_PATH_QT],
1267  ac_qt_found=no
1268  PKG_CHECK_MODULES([Qt], [qt-mt],
1269                    [ac_qt_found=yes],
1270                    [AC_MSG_RESULT([not found])])
1271  if test X"${ac_qt_found}" = Xyes; then
1272    ACE_QT_CPPFLAGS="${Qt_CFLAGS}"
1273    ACE_QT_LIBS="${Qt_LIBS}"
1274    AC_SUBST(ACE_QT_CPPFLAGS)
1275    AC_SUBST(ACE_QT_LIBS)
1277    AS_IF([test -n "$QTDIR"],
1278          [],
1279          [QTDIR=`$PKG_CONFIG --variable=prefix qt-mt 2>/dev/null`])
1280    AC_SUBST(QTDIR)
1281  fi
1285 # ACE_PATH_TCL
1286 #---------------------------------------------------------------------------
1287 # Find Tcl Libraries, flags, etc.
1288 AC_DEFUN([ACE_PATH_TCL],
1289 [AC_REQUIRE([ACE_CHECK_LIB64])
1290  AC_ARG_WITH([tclconfig],
1291  AS_HELP_STRING([--with-tclconfig=DIR],
1292                 [path to tclConfig.sh [[automatic]]]),
1293  [ ac_tclconfig_dir="${withval}" ])
1295  if test X"${ac_tclconfig_dir}" = X; then
1296    for i in `ls -d ${exec_prefix}/lib${acelibsuff} 2>/dev/null` \
1297            `ls -d ${prefix}/lib${acelibsuff} 2>/dev/null` \
1298            `ls -d /usr/local/lib${acelibsuff} 2>/dev/null` \
1299            `ls -d /usr/contrib/lib${acelibsuff} 2>/dev/null` \
1300            `ls -d /usr/lib${acelibsuff} 2>/dev/null` \
1301            `ls -d /usr/pkg/lib${acelibsuff} 2>/dev/null` \
1302            `ls -d /usr/lib${acelibsuff}/tcl8.[[43]]* 2>/dev/null` \
1303            ; do
1304        if test -f "$i/tclConfig.sh" ; then
1305            ac_tclconfig_dir=`(cd $i; pwd)`
1306            break
1307        fi
1308    done
1309  fi
1311  AC_MSG_CHECKING([whether tclConfig.sh exists in ${ac_tclconfig_dir}])
1312  if test -f "${ac_tclconfig_dir}/tclConfig.sh"; then
1313    TCLCONFIG="${ac_tclconfig_dir}/tclConfig.sh"
1314    AC_MSG_RESULT([yes])
1315  else
1316    AC_MSG_RESULT([no])
1317  fi
1319  if test X"${TCLCONFIG}" != X; then
1320    . ${TCLCONFIG}
1322    ACE_TCL_CPPFLAGS="${TCL_INCLUDE_SPEC}"
1323    eval "ACE_TCL_LIBS=\"${TCL_LIB_SPEC}\""
1325    AC_SUBST(ACE_TCL_CPPFLAGS)
1326    AC_SUBST(ACE_TCL_LIBS)
1327  fi
1331 # ACE_PATH_TK
1332 #---------------------------------------------------------------------------
1333 # Find Tk Libraries, flags, etc.
1334 AC_DEFUN([ACE_PATH_TK],
1335 [AC_REQUIRE([ACE_PATH_TCL])
1336  AC_ARG_WITH([tkconfig],
1337  AS_HELP_STRING([--with-tkconfig=DIR],
1338                 [path to tkConfig.sh [[automatic]]]),
1339  [ ac_tkconfig_dir="${withval}" ])
1340  if test X"${ac_tkconfig_dir}" = X; then
1341    if test X"${ac_tclconfig_dir}" != X && test -f ${ac_tclconfig_dir}/tkConfig.sh; then
1342      ac_tkconfig_dir=$ac_tclconfig_dir;
1343    else
1344      for i in `ls -d ${exec_prefix}/lib${acelibsuff} 2>/dev/null` \
1345              `ls -d ${prefix}/lib${acelibsuff} 2>/dev/null` \
1346              `ls -d /usr/local/lib${acelibsuff} 2>/dev/null` \
1347              `ls -d /usr/contrib/lib${acelibsuff} 2>/dev/null` \
1348              `ls -d /usr/lib${acelibsuff} 2>/dev/null` \
1349              `ls -d /usr/pkg/lib${acelibsuff} 2>/dev/null` \
1350              `ls -d /usr/lib${acelibsuff}/tk8.[[43]]* 2>/dev/null` \
1351              ; do
1352          if test -f "$i/tkConfig.sh" ; then
1353              ac_tkconfig_dir=`(cd $i; pwd)`
1354              break
1355          fi
1356      done
1357    fi
1358  fi
1360  AC_MSG_CHECKING([whether tkConfig.sh exists in ${ac_tkconfig_dir}])
1361  if test -f "${ac_tkconfig_dir}/tkConfig.sh"; then
1362    TKCONFIG="${ac_tkconfig_dir}/tkConfig.sh"
1363    AC_MSG_RESULT([yes])
1364  else
1365    AC_MSG_RESULT([no])
1366  fi
1368  if test X"${TKCONFIG}" != X; then
1369    . ${TKCONFIG}
1371    ACE_TK_CPPFLAGS="${TK_INCLUDE_SPEC} ${TK_XINCLUDES}"
1372    ACE_TK_LIBS="${TK_LIB_SPEC} ${TK_XLIBSW}"
1374    AC_SUBST(ACE_TK_CPPFLAGS)
1375    AC_SUBST(ACE_TK_LIBS)
1376  fi
1380 # ACE_PATH_XT
1381 #---------------------------------------------------------------------------
1382 # Find Xt libraries, flags, etc.
1383 AC_DEFUN([ACE_PATH_XT],
1384 [AC_REQUIRE([ACE_PATH_X11])
1386 if test "$no_x" != yes; then
1387    ACE_XT_CPPFLAGS=""
1388    ACE_XT_LDFLAGS=""
1389    ACE_XT_LIBS="-lXt"
1391    AC_SUBST(ACE_XT_CPPFLAGS)
1392    AC_SUBST(ACE_XT_LDFLAGS)
1393    AC_SUBST(ACE_XT_LIBS)
1395 AM_CONDITIONAL([BUILD_ATHENA], true)
1396 AM_CONDITIONAL([BUILD_MOTIF], false)
1400 # ACE_PATH_X11
1401 #---------------------------------------------------------------------------
1402 # Find X11 libraries, flags, etc.
1403 AC_DEFUN([ACE_PATH_X11],
1404 [AC_REQUIRE([AC_PATH_XTRA])
1406 if test "$no_x" != yes; then
1407    ACE_X11_CPPFLAGS="${X_CFLAGS}"
1408    ACE_X11_LDFLAGS="${X_LIBS}"
1409    ACE_X11_LIBS="${X_PRE_LIBS} -lX11 ${X_EXTRA_LIBS}"
1411    AC_SUBST(ACE_X11_CPPFLAGS)
1412    AC_SUBST(ACE_X11_LDFLAGS)
1413    AC_SUBST(ACE_X11_LIBS)
1416 AM_CONDITIONAL([BUILD_X11], [test X$no_x != Xyes])
1420 # ACE_PATH_BZIP2
1421 #---------------------------------------------------------------------------
1422 # Find bzip2 Libraries, flags, etc.
1423 AC_DEFUN([ACE_PATH_BZIP2],
1425 ACE_BZIP2_CPPFLAGS=""
1426 ACE_BZIP2_LDFLAGS=""
1428 dnl TODO: default to false, at least until we add a check to see if
1429 dnl the bzip2 library is usable.
1430 AC_ARG_WITH([bzip2],
1431   AS_HELP_STRING([--with-bzip2@<:@=DIR@:>@],
1432                  [root directory of bzip2 installation]),
1433   [
1434   ace_with_bzip2="${withval}"
1435   if test "${ace_with_bzip2}" != yes; then
1436        ace_bzip2_include="${ace_with_bzip2}/include"
1437        ace_bzip2_libdir="${ace_with_bzip2}/lib"
1438   fi
1439   ],[ace_with_bzip2=no])
1441 dnl TODO: let's wait and see before adding options to specify header
1442 dnl and library location separately.
1444 dnl AC_ARG_WITH([bzip2_include],
1445 dnl   AS_HELP_STRING([--with-bzip2-include=DIR],
1446 dnl              [specify exact include dir for bzip2 headers]),
1447 dnl   [ace_bzip2_include="$withval"])
1449 dnl AC_ARG_WITH([bzip2_libdir],
1450 dnl   AS_HELP_STRING([--with-bzip2-libdir=DIR],
1451 dnl              [specify exact include dir for bzip2 libraries]),
1452 dnl   [ace_bzip2_libdir="$withval"])
1454 if test "${ace_bzip2_include}"; then
1455   ACE_BZIP2_CPPFLAGS="-I$ace_bzip2_include"
1458 if test "${ace_bzip2_libdir}"; then
1459   ACE_BZIP2_LDFLAGS="-L$ace_bzip2_libdir"
1462 ACE_BZIP2_CPPFLAGS="${ACE_BZIP2_CPPFLAGS} -DBZIP2"
1464 if test "${ace_with_bzip2}" != no; then
1465   ACE_BZIP2_LIBS="-lbz2"
1466   AC_SUBST(ACE_BZIP2_CPPFLAGS)
1467   AC_SUBST(ACE_BZIP2_LDFLAGS)
1468   AC_SUBST(ACE_BZIP2_LIBS)
1470 AM_CONDITIONAL([BUILD_BZIP2], test "${ace_with_bzip2}" != no)
1474 # ACE_PATH_ZLIB
1475 #---------------------------------------------------------------------------
1476 # Find zlib Libraries, flags, etc.
1477 AC_DEFUN([ACE_PATH_ZLIB],
1479 ACE_ZLIB_CPPFLAGS=""
1480 ACE_ZLIB_LDFLAGS=""
1482 dnl TODO: default to false, at least until we add a check to see if
1483 dnl the zlib library is usable.
1484 AC_ARG_WITH([zlib],
1485   AS_HELP_STRING([--with-zlib@<:@=DIR@:>@],
1486                  [root directory of zlib installation]),
1487   [
1488   ace_with_zlib="${withval}"
1489   if test "${ace_with_zlib}" != yes; then
1490        ace_zlib_include="${ace_with_zlib}/include"
1491        ace_zlib_libdir="${ace_with_zlib}/lib"
1492   fi
1493   ],[ace_with_zlib=no])
1495 dnl TODO: let's wait and see before adding options to specify header
1496 dnl and library location separately.
1498 dnl AC_ARG_WITH([zlib_include],
1499 dnl   AS_HELP_STRING([--with-zlib-include=DIR],
1500 dnl              [specify exact include dir for zlib headers]),
1501 dnl   [ace_zlib_include="$withval"])
1503 dnl AC_ARG_WITH([zlib_libdir],
1504 dnl   AS_HELP_STRING([--with-zlib-libdir=DIR],
1505 dnl              [specify exact include dir for zlib libraries]),
1506 dnl   [ace_zlib_libdir="$withval"])
1508 if test "${ace_zlib_include}"; then
1509   ACE_ZLIB_CPPFLAGS="-I$ace_zlib_include"
1512 if test "${ace_zlib_libdir}"; then
1513   ACE_ZLIB_LDFLAGS="-L$ace_zlib_libdir"
1516 ACE_ZLIB_CPPFLAGS="${ACE_ZLIB_CPPFLAGS} -DZLIB"
1518 if test "${ace_with_zlib}" != no; then
1519   ACE_ZLIB_LIBS="-lz"
1520   AC_SUBST(ACE_ZLIB_CPPFLAGS)
1521   AC_SUBST(ACE_ZLIB_LDFLAGS)
1522   AC_SUBST(ACE_ZLIB_LIBS)
1524 AM_CONDITIONAL([BUILD_ZLIB], test "${ace_with_zlib}" != no)
1528 # ACE_PATH_ZZIP
1529 #---------------------------------------------------------------------------
1530 # Find zziplib Libraries, flags, etc.
1531 AC_DEFUN([ACE_PATH_ZZIP],
1532 [AC_REQUIRE([ACE_PATH_ZLIB])
1534 ACE_ZZIP_CPPFLAGS=""
1535 ACE_ZZIP_LDFLAGS=""
1537 dnl TODO: default to false, at least until we add a check to see if
1538 dnl the zlib library is usable.
1539 AC_ARG_WITH([zzip],
1540   AS_HELP_STRING([--with-zzip@<:@=DIR@:>@],
1541                  [root directory of zzip installation]),
1542   [
1543   ace_with_zzip="${withval}"
1544   if test "${ace_with_zzip}" != yes; then
1545        ace_zzip_include="${ace_with_zzip}/include"
1546        ace_zzip_libdir="${ace_with_zzip}/lib"
1547   fi
1548   ],[ace_with_zzip=no])
1550 dnl TODO: let's wait and see before adding options to specify header
1551 dnl and library location separately.
1553 dnl AC_ARG_WITH([zzip_include],
1554 dnl   AS_HELP_STRING([--with-zzip-include=DIR],
1555 dnl              [specify exact include dir for zzip headers]),
1556 dnl   [ace_zzip_include="$withval"])
1558 dnl AC_ARG_WITH([zzip_libdir],
1559 dnl   AS_HELP_STRING([--with-zzip-libdir=DIR],
1560 dnl              [specify exact include dir for zzip libraries]),
1561 dnl   [ace_zzip_libdir="$withval"])
1563 if test "${ace_zzip_include}"; then
1564   ACE_ZZIP_CPPFLAGS="-I$ace_zzip_include"
1567 if test "${ace_zzip_libdir}"; then
1568   ACE_ZZIP_LDFLAGS="-L$ace_zzip_libdir"
1571 ACE_ZZIP_CPPFLAGS="${ACE_ZZIP_CPPFLAGS} -DUSE_ZZIP"
1573 if test "${ace_with_zzip}" != no; then
1574   ACE_ZZIP_LIBS="-lzzip"
1575   AC_SUBST(ACE_ZZIP_CPPFLAGS)
1576   AC_SUBST(ACE_ZZIP_LDFLAGS)
1577   AC_SUBST(ACE_ZZIP_LIBS)
1579 AM_CONDITIONAL([BUILD_ZZIP], test "${ace_with_zzip}" != no)
1582 # ACE_ENABLE_FL_REACTOR
1583 #---------------------------------------------------------------------------
1584 AC_DEFUN([ACE_ENABLE_FL_REACTOR],
1585 [AC_REQUIRE([ACE_PATH_FL])
1586 AC_REQUIRE([ACE_PATH_X11])
1587 AC_ARG_ENABLE([fl-reactor],
1588                AS_HELP_STRING([--enable-fl-reactor],
1589                               [build support for the FlReactor [[no]]]),
1590                [case "${enableval}" in
1591                  yes)
1592                   AS_IF([test X"${FLTKCONFIG}" != X],
1593                         [ace_user_enable_fl_reactor=yes],
1594                         [AC_MSG_ERROR([ACE_FlReactor cannot be enabled: fltk-config not found.])])
1595                   ;;
1596                 no)
1597                   ace_user_enable_fl_reactor=no
1598                   ;;
1599                 *)
1600                   AC_MSG_ERROR([bad value ${enableval} for --enable-fl-reactor])
1601                   ;;
1602                 esac],
1603                 [
1604                  ace_user_enable_fl_reactor=no
1605                 ])
1606 AM_CONDITIONAL([BUILD_GL], [test X$ace_user_enable_fl_reactor = Xyes])
1607 AM_CONDITIONAL([BUILD_FL], [test X$ace_user_enable_fl_reactor = Xyes])
1608 AM_CONDITIONAL([BUILD_ACE_FLREACTOR],
1609                [test X$ace_user_enable_fl_reactor = Xyes])
1610 AM_CONDITIONAL([BUILD_TAO_FLRESOURCE],
1611                [test X$ace_user_enable_fl_reactor = Xyes])
1615 # ACE_ENABLE_QT_REACTOR
1616 #---------------------------------------------------------------------------
1617 AC_DEFUN([ACE_ENABLE_QT_REACTOR],
1618 [AC_REQUIRE([ACE_PATH_QT])
1619 AC_ARG_ENABLE([qt-reactor],
1620                AS_HELP_STRING([--enable-qt-reactor],
1621                               [build support for the QtReactor [[no]]]),
1622                [case "${enableval}" in
1623                  yes)
1624                   AS_IF([test X"${ac_qt_found}" = Xyes],
1625                         [ace_user_enable_qt_reactor=yes],
1626                         [AC_MSG_ERROR([ACE_QtReactor cannot be enabled: Qt not found.])])
1627                   ;;
1628                 no)
1629                   ace_user_enable_qt_reactor=no
1630                   ;;
1631                 *)
1632                   AC_MSG_ERROR([bad value ${enableval} for --enable-qt-reactor])
1633                   ;;
1634                 esac],
1635                 [
1636                  ace_user_enable_qt_reactor=no
1637                 ])
1638 AM_CONDITIONAL([BUILD_QT], [test X$ace_user_enable_qt_reactor = Xyes])
1639 AM_CONDITIONAL([BUILD_ACE_QTREACTOR],
1640                [test X$ace_user_enable_qt_reactor = Xyes])
1641 AM_CONDITIONAL([BUILD_TAO_QTRESOURCE],
1642                [test X$ace_user_enable_qt_reactor = Xyes])
1646 # ACE_ENABLE_TK_REACTOR
1647 #---------------------------------------------------------------------------
1648 AC_DEFUN([ACE_ENABLE_TK_REACTOR],
1649 [AC_REQUIRE([ACE_PATH_TK])
1650 AC_ARG_ENABLE([tk-reactor],
1651                AS_HELP_STRING([--enable-tk-reactor],
1652                               [build support for the TkReactor [[no]]]),
1653                [case "${enableval}" in
1654                  yes)
1655                   AS_IF([test X"${TCLCONFIG}" != X],
1656                         [AS_IF([test X"${TKCONFIG}" != X],
1657                                [ace_user_enable_tk_reactor=yes],
1658                                [AC_MSG_ERROR([ACE_TkReactor cannot be enabled: tkConfig not found.])])],
1659                         [AC_MSG_ERROR([ACE_TkReactor cannot be enabled: tclConfig not found.])])
1660                   ;;
1661                 no)
1662                   ace_user_enable_tk_reactor=no
1663                   ;;
1664                 *)
1665                   AC_MSG_ERROR([bad value ${enableval} for --enable-tk-reactor])
1666                   ;;
1667                 esac],
1668                 [
1669                  ace_user_enable_tk_reactor=no
1670                 ])
1671 AM_CONDITIONAL([BUILD_TK], [test X$ace_user_enable_tk_reactor = Xyes])
1672 AM_CONDITIONAL([BUILD_ACE_TKREACTOR],
1673                [test X$ace_user_enable_tk_reactor = Xyes])
1674 AM_CONDITIONAL([BUILD_TAO_TKRESOURCE],
1675                [test X$ace_user_enable_tk_reactor = Xyes])
1679 # ACE_ENABLE_XT_REACTOR
1680 #---------------------------------------------------------------------------
1681 AC_DEFUN([ACE_ENABLE_XT_REACTOR],
1682 [AC_REQUIRE([ACE_PATH_XT])
1683 AC_ARG_ENABLE([xt-reactor],
1684                AS_HELP_STRING([--enable-xt-reactor],
1685                               [build support for the XtReactor [[no]]]),
1686                [case "${enableval}" in
1687                  yes)
1688 dnl Here, if X isn't found or the user sets "--without-x" on the command
1689 dnl line, then "no_x" is set to "yes."
1690                   AS_IF([test "$no_x" != yes],
1691                         [
1692                           ace_user_enable_xt_reactor=yes
1693                         ],[
1694                           ace_user_enable_xt_reactor=no
1695                           AC_MSG_WARN([X was not found or it was disabled.])
1696                           AC_MSG_WARN([ACE_XtReactor will not be enabled.])
1697                         ])
1698                   ;;
1699                  no)
1700                   ace_user_enable_xt_reactor=no
1701                   ;;
1702                  *)
1703                   AC_MSG_ERROR([bad value ${enableval} for --enable-xt-reactor])
1704                   ;;
1705                 esac],
1706                 [
1707                   ace_user_enable_xt_reactor=no
1708                 ])
1709 AM_CONDITIONAL([BUILD_XT], [test X$ace_user_enable_xt_reactor = Xyes])
1710 AM_CONDITIONAL([BUILD_ACE_XTREACTOR],
1711                [test X$ace_user_enable_xt_reactor = Xyes])
1712 AM_CONDITIONAL([BUILD_TAO_XTRESOURCE],
1713                [test X$ace_user_enable_xt_reactor = Xyes])
1716 # ACE_PATH_FOX
1717 #---------------------------------------------------------------------------
1718 AC_DEFUN([ACE_PATH_FOX],
1719 [AC_ARG_WITH([fox-config],
1720  AS_HELP_STRING([--with-fox-config=DIR],
1721                 [path to fox-config [[automatic]]]),
1722  [ ac_fox_config_dir="${withval}" ])
1723  if test X"${ac_fox_config_dir}" = X; then
1724    AC_PATH_PROG([FOXCONFIG], [fox-config], [], [])
1725  else
1726   AC_MSG_CHECKING([whether fox-config exists in ${ac_fox_config_dir}])
1727    if test -f "${ac_fox_config_dir}/fox-config"; then
1728      FOXCONFIG="${ac_fox_config_dir}/fox-config"
1729      AC_MSG_RESULT([yes])
1730    else
1731      AC_MSG_RESULT([no])
1732    fi
1733  fi
1734  if test X"${FOXCONFIG}" != X; then
1735    ACE_FOX_CPPFLAGS=`$FOXCONFIG --cflags 2>/dev/null`
1736    ACE_FOX_LIBS=`$FOXCONFIG --libs 2>/dev/null`
1737    AC_SUBST(ACE_FOX_CPPFLAGS)
1738    AC_SUBST(ACE_FOX_LIBS)
1739  fi
1742 # ACE_ENABLE_FOX_REACTOR
1743 #---------------------------------------------------------------------------
1744 AC_DEFUN([ACE_ENABLE_FOX_REACTOR],
1745 [AC_REQUIRE([ACE_PATH_FOX])
1746 AC_ARG_ENABLE([fox-reactor],
1747                AS_HELP_STRING([--enable-fox-reactor],
1748                               [build support for the FoxReactor [[no]]]),
1749                [case "${enableval}" in
1750                  yes)
1751                    AS_IF([test X"${FOXCONFIG}" != X],
1752                          [ace_user_enable_fox_reactor=yes],
1753                          [AC_MSG_ERROR([ACE_FoxReactor cannot be enabled: fox-config not found.])])
1754                    ;;
1755                  no)
1756                    ace_user_enable_fox_reactor=no
1757                    ;;
1758                  *)
1759                    AC_MSG_ERROR([bad value ${enableval} for --enable-fox-reactor])
1760                   ;;
1761               esac],
1762                [
1763                  ace_user_enable_fox_reactor=no
1764                ])
1765 AM_CONDITIONAL([BUILD_FOX], [test X$ace_user_enable_fox_reactor = Xyes])
1766 AM_CONDITIONAL([BUILD_ACE_FOXREACTOR],
1767                [test X$ace_user_enable_fox_reactor = Xyes])
1768 AM_CONDITIONAL([BUILD_TAO_FOXRESOURCE],
1769                [test X$ace_user_enable_fox_reactor = Xyes])