1 dnl Process with autoconf to generate configure script -*- sh -*-
3 AC_INIT(boost/config.hpp)
4 AC_PREREQ(2.13) dnl We want to use autoconf 2.13
5 AM_CONFIG_HEADER(boost/config.h)
7 dnl This is a trick to make autoheader do the right thing
8 dnl AM_CONFIG_HEADER(boost/config.h)
11 AC_VALIDATE_CACHE_SYSTEM_TYPE
13 AM_INIT_AUTOMAKE(boost, 0.1lyx)
15 ### Check for programs
19 # Work around a problem in automake 1.4: when invoking install-strip,
20 # INSTALL_PROGRAM is changed to 'install -s', and since
21 # INSTALL_SCRIPT==INSTALL_PROGRAM, we get errors with fileutils-4.0
22 # which returns an error condition when stripping fails.
23 INSTALL_SCRIPT='${INSTALL}'
25 ### we will also need a C compiler to compile GNU gettext
28 ### check for special systems
32 ### Check for program extensions (.exe or nothing)
35 ### Check for a C++ compiler
43 ####################################################
44 ####################################################
45 ####################################################
47 AC_DEFINE(BOOST_RE_AUTO_CONFIGURE, [])
48 dnl Disable any caching here
49 define([AC_CACHE_LOAD], )dnl
50 define([AC_CACHE_SAVE], )dnl
52 AC_MSG_RESULT(*** $0: regex++ configuration utility ***)
53 if test "${CXXFLAGS}" = ""; then
54 AC_MSG_RESULT(* Note: for best reliability - try \"CXXFLAGS=-treat_warnings_as_errors\" $0 )
55 AC_MSG_RESULT(* Please don't forget specifying typical CXXFLAGS you'll be using - )
56 AC_MSG_RESULT(* such as that enabling exceptions handling, etc. )
57 AC_MSG_RESULT(* Add option forcing instantiation of all templates to CXXFLAGS if possible. )
58 AC_MSG_RESULT(* Add option enabling merging of template instances between translation units)
59 AC_MSG_RESULT(* to CXXFLAGS if possible. )
61 AC_MSG_RESULT(Please stand by while exploring compiler capabilities...)
62 AC_MSG_RESULT(Be patient - this could take some time...)
65 AC_ARG_ENABLE(extension,[--enable-extension=<ext>],
68 no) AC_MSG_RESULT(Info :.cpp used as extension for tests)
71 *) AC_MSG_RESULT(Argument : .$enableval used as extension)
75 [AC_MSG_RESULT(Info : .cpp used as extension for tests)
80 AC_ARG_ENABLE(sizeof-short, [--enable-sizeof-short=<short size>], [], [enable_sizeof_short=2])
81 AC_ARG_ENABLE(sizeof-int, [--enable-sizeof-int=<int size>], [], [enable_sizeof_int=4])
82 AC_ARG_ENABLE(sizeof-long, [--enable-sizeof-long=<long size>], [], [enable_sizeof_long=4])
83 AC_ARG_ENABLE(force-cross, [--enable-force-cross forces cross compile mode])
86 # Save that, as it is being redefined several times
92 AC_MSG_CHECKING(for object file extention)
93 cat > "xyqtcz.$ac_ext" << EOF
101 if eval "$CXX $CXXFLAGS -c xyqtcz.$ac_ext"; then
102 rm -f "xyqtcz.$ac_ext"
103 ac_obj_ext=`find xyqtcz.* | sed 's/xyqtcz\(.*\)/\1/g'`
104 AC_MSG_RESULT(yes - $ac_obj_ext)
105 rm -f "xyqtcz$ac_obj_ext"
109 AC_MSG_RESULT(no - could not create or find object file, defaulting to .o)
110 rm -f "xyqtcz.$ac_ext"
115 AC_MSG_CHECKING(for executable file extention)
117 for file in /bin/sh.*
120 if test -x "$file"; then
121 ac_exe_ext=`echo "$file" | sed 's/\/bin\/sh\(.*\)/\1/g'`
126 AC_MSG_RESULT(yes - $ac_exe_ext)
132 # determine machine word sizes
133 # and set BOOST_RE_INT32 to be the
134 # equivalent of intfast32_t in <inttypes.h>
136 if test "$enable_force_cross" = "yes"; then
137 cross_compiling="yes"
138 echo forced cross compilation mode turned on
141 AC_CHECK_SIZEOF(short,"$enable_sizeof_short")
143 AC_CHECK_SIZEOF(int,"$enable_sizeof_int")
145 AC_CHECK_SIZEOF(long,"$enable_sizeof_long")
148 AC_DEFINE_UNQUOTED(BOOST_RE_SIZEOF_SHORT, [$ac_cv_sizeof_short])
149 AC_DEFINE_UNQUOTED(BOOST_RE_SIZEOF_INT, [$ac_cv_sizeof_int])
150 AC_DEFINE_UNQUOTED(BOOST_RE_SIZEOF_LONG, [$ac_cv_sizeof_long])
153 if test "$ac_cv_sizeof_int" -lt 4; then
154 if test "$ac_cv_sizeof_long" -ge 4; then
155 AC_DEFINE(BOOST_RE_INT32_LONG)
157 AC_MSG_ERROR(Cannot find any 32-bit integer type for your compiler)
166 dnl checking for compiler capabilities
167 AC_MSG_CHECKING(for basic template compatibility)
169 template <class Arg1, class Arg2, class Result>
170 struct binary_function {
171 typedef Arg1 first_argument_type;
172 typedef Arg2 second_argument_type;
173 typedef Result result_type;
176 struct plus : public binary_function<T, T, T> {
177 T operator()(const T& x, const T& y) const;
182 // link will fail if template is not instantiated
185 T plus<T>::operator()(const T& x, const T& y) const
191 // check member function is actually instantiated
195 [ac_cv_compat="yes"],
196 [AC_MSG_ERROR(Your compiler won't be able to compile this implementation. Sorry.)
199 AC_MSG_RESULT($ac_cv_compat)
201 AC_MSG_CHECKING(for exception support)
229 [AC_MSG_RESULT(yes)],
231 AC_MSG_ERROR(Sorry, without exception handling you can't compile this library)])
234 AC_ARG_ENABLE(mutable, [--disable-mutable turns off mutable support])
235 if test "$enable_mutable" = "no"; then
236 AC_DEFINE(BOOST_RE_NO_MUTABLE, [])
239 AC_MSG_CHECKING(for mutable keyword)
248 foo(int i) : val(i) {}
249 void set(int i)const;
252 void foo::set(int i)const
261 [AC_MSG_RESULT(yes)],
262 [AC_DEFINE(BOOST_RE_NO_MUTABLE, []) AC_MSG_RESULT(no)])
265 AC_MSG_CHECKING(for default template parameter support)
270 template <class T, class U = int>
283 [AC_MSG_RESULT(yes)],
284 [AC_MSG_ERROR(Sorry: you can't compile this library)])
286 AC_MSG_CHECKING(for derived default template parameter support)
295 typedef T inner_type;
298 template <class T, class U = inner<T> >
306 foo<int, inner<double> > f1;
307 foo<int, inner<int> > f2;
311 [AC_MSG_RESULT(yes)],
312 [AC_MSG_ERROR(Sorry, you can't compile this library)])
315 AC_MSG_CHECKING([for function template partial ordering])
325 int result()const { return 1; }
330 { return t.result(); }
333 int foo(const dummy<T>& )
343 [AC_MSG_RESULT(yes)],
344 [AC_DEFINE(BOOST_RE_NO_PARTIAL_FUNC_SPEC, []) AC_MSG_RESULT(no)])
346 AC_MSG_CHECKING([for template friend functions])
357 template <class T2> friend void foo(T2);
380 [AC_MSG_RESULT(yes)],
381 [AC_DEFINE(BOOST_RE_NO_TEMPLATE_FRIEND, []) AC_MSG_RESULT(no)])
385 AC_ARG_ENABLE(ms-windows, [--disable-ms-windows turns off native MS Windows support (when available)])
386 AC_ARG_ENABLE(threads, [--disable-threads turns off multi-threading support (when available)])
387 if test "$enable_ms_windows" != "no"; then
389 AC_MSG_CHECKING(for MS Windows)
394 #if defined(__GNUC__) && (__GNUC_MINOR__ == 95) && (__GNUC__ == 2)
395 #error can't mix STL code with <windows.h> due to bug in gcc2.95.x
401 int i = GetVersion();
404 AC_DEFINE(BOOST_RE_PLATFORM_WINDOWS, [])
407 enable_ms_windows="no"]
411 if test "$enable_ms_windows" != "no"; then
412 dnl Ok check for Win32, then linkage:
413 AC_MSG_CHECKING(for MS Win32)
421 InitializeCriticalSection(&cs);
422 EnterCriticalSection(&cs);
423 LeaveCriticalSection(&cs);
424 DeleteCriticalSection(&cs);
426 [AC_MSG_RESULT(yes)],
428 enable_ms_windows="no"]
432 if test "$enable_ms_windows" != "no"; then
434 if test "$CXX" != "cl"; then
435 AC_CHECK_LIB(user32, main, [LIBS="$LIBS -luser32"], [])
436 AC_CHECK_LIB(kernel32, main, [LIBS="$LIBS -lkernel32"], [])
446 InitializeCriticalSection(&cs);
447 EnterCriticalSection(&cs);
448 LeaveCriticalSection(&cs);
449 DeleteCriticalSection(&cs);
451 CharLower((LPTSTR)0);
452 LoadString(0, 0, 0, 0);
455 if test "enable_threads" != "no"; then
456 # turn on threading support:
457 AC_MSG_CHECKING(for mult-thread support)
459 AC_DEFINE(BOOST_RE_THREADS, [])
460 AC_DEFINE(BOOST_RE_PLATFORM_W32, [])
464 # bu**er, windows is present but we can't link
466 MS Win32 seems to be present, but we can't link,
467 or find the default library names for kernal32.dll
469 $0 is disabling MS Windows support, re-run $0 with
470 the environment variable "LIBS" set to the library
471 files required to re-enable Win32 support.])
472 enable_ms_windows="no"
480 if test "$iswin" != "true"; then
482 AC_MSG_CHECKING(for MS DOS)
490 [AC_DEFINE(BOOST_RE_PLATFORM_DOS, []) AC_MSG_RESULT(yes)],
496 AC_MSG_CHECKING(for bool support)
503 [AC_MSG_RESULT(yes)],
504 [AC_DEFINE(BOOST_RE_NO_BOOL,[])
508 AC_ARG_ENABLE(wstring, [--disable-wstring turns off wide character string support])
510 if test "$enable_wstring" = "no"; then
511 AC_DEFINE(BOOST_RE_NO_WCHAR_H, [])
514 AC_MSG_CHECKING(for <cwchar>)
521 [AC_MSG_RESULT(yes)],
522 [AC_DEFINE(BOOST_RE_NO_WCHAR_H,[])
527 if test "$enable_wstring" = "no"; then
528 AC_DEFINE(BOOST_RE_NO_WCTYPE_H, [])
531 AC_MSG_CHECKING(for <cwctype>)
538 [AC_MSG_RESULT(yes)],
539 [AC_DEFINE(BOOST_RE_NO_WCTYPE_H,[])
545 if test "$enable_wstring" = "no"; then
546 AC_DEFINE(BOOST_RE_NO_WCSTRING, [])
549 AC_MSG_CHECKING(for wide string functions)
552 #include "confdefs.h"
553 #ifndef BOOST_RE_NO_WCHAR_H
556 #ifndef BOOST_RE_NO_WCTYPE_H
564 template class std::basic_string<wchar_t>;
579 enable_wstring="yes",
580 [AC_DEFINE(BOOST_RE_NO_WCSTRING,[])
585 if test "$enable_wstring" != "no"; then
586 AC_MSG_CHECKING(for swprintf support)
589 #include "confdefs.h"
590 #ifndef BOOST_RE_NO_WCHAR_H
593 #ifndef BOOST_RE_NO_WCTYPE_H
601 swprintf(c, 50, L"abcd");
603 [AC_MSG_RESULT(yes)],
604 [AC_DEFINE(BOOST_RE_NO_SWPRINTF,[])
606 enable_swprintf="no")
610 AC_ARG_ENABLE(member-templates, [--disable-member-templates turns off member template class and function support])
611 if test "$enable_member_templates" = "no"; then
612 AC_DEFINE(BOOST_RE_NO_MEMBER_TEMPLATES, [])
615 AC_MSG_CHECKING(for member template classes and functions)
624 void deallocate(void*);
628 alloc(const alloc<U>&) {}
629 alloc& operator=(const alloc&);
631 alloc& operator=(const alloc<U>&)
637 typedef alloc<U> other;
644 alloc<double> da(ia);
649 [AC_MSG_RESULT(yes)],
650 [AC_DEFINE(BOOST_RE_NO_MEMBER_TEMPLATES,[])
655 AC_ARG_ENABLE(template-returns, [--disable-template-returns turns off support for templates specialised by return type])
656 if test "$enable_template_returns" = "no"; then
657 AC_DEFINE(BOOST_RE_NO_TEMPLATE_RETURNS, [])
660 AC_MSG_CHECKING(for parameterised function returns)
668 double d = coerse<double>(5);
669 int i = coerse<int>(3);
671 [AC_MSG_RESULT(yes)],
672 [AC_DEFINE(BOOST_RE_NO_TEMPLATE_RETURNS,[])
677 AC_ARG_ENABLE(int64, [--disable-int64 turns off support for 64-bit integer types])
678 if test "$enable_int64" = "no"; then
679 AC_DEFINE(BOOST_RE_INT64_T_0)
682 AC_MSG_CHECKING(for 64-bit integral type)
684 if test "$ac_cv_sizeof_short" -eq 8; then
685 AC_DEFINE(BOOST_RE_INT64_T_1)
686 AC_MSG_RESULT(yes - short)
689 if test "$ac_cv_sizeof_int" -eq 8 && test "$have_int64" != "true"; then
690 AC_DEFINE(BOOST_RE_INT64_T_2)
691 AC_MSG_RESULT(yes - int)
694 if test "$ac_cv_sizeof_long" -eq 8 && test "$have_int64" != "true"; then
695 AC_DEFINE(BOOST_RE_INT64_T_3)
696 AC_MSG_RESULT(yes - long)
699 if test "$have_int64" != "true"; then
702 #include <inttypes.h>
704 int64_t i = INT64_C(0x100000000);
708 [AC_MSG_RESULT(yes - int64_t)
710 AC_DEFINE(BOOST_RE_INT64_T_4)
715 if test "$have_int64" != "true"; then
721 long long i = 0x100000000LL;
725 [AC_MSG_RESULT(yes - long long)
727 AC_DEFINE(BOOST_RE_INT64_T_5)
733 if test "$have_int64" != "true"; then
739 __int64 i = 0x100000000i64;
743 [AC_MSG_RESULT(yes - __int64)
745 AC_DEFINE(BOOST_RE_INT64_T_6)
749 if test "$have_int64" != "true"; then
750 AC_DEFINE(BOOST_RE_INT64_T,0)
756 AC_ARG_ENABLE(messages, [--disable-messages turns off support for POSIX message categories, when available.])
757 if test "$enable_messages" = "no" || test "$enable_ms_windows" != "no"; then
758 AC_DEFINE(BOOST_RE_NO_CAT, [])
761 AC_CHECK_LIB(nl_types, catopen)
762 AC_CHECK_LIB(posix, catopen)
764 AC_MSG_CHECKING(for POSIX message categories)
767 #include <nl_types.h>
769 nl_catd message_cat = (nl_catd)-1;
772 message_cat = catopen("some_name", 0);
773 catclose(message_cat);
775 [AC_MSG_RESULT(yes)],
776 [AC_DEFINE(BOOST_RE_NO_CAT,[])
781 if test "$enable_threads" != "no" && test "$enable_ms_windows" = "no"; then
783 AC_CHECK_LIB(pthread, pthread_mutex_init)
784 AC_CHECK_LIB(posix, pthread_mutex_init)
786 AC_MSG_CHECKING(for POSIX threads)
795 pthread_mutex_init(&m, NULL);
796 pthread_mutex_lock(&m);
797 pthread_mutex_unlock(&m);
798 pthread_mutex_destroy(&m);
801 AC_DEFINE(BOOST_RE_THREADS, [])],
807 AC_ARG_ENABLE(nested-template-prefix, [--disable-nested-template-prefix turns off use of \"template\" as the nested template class access specifier.])
808 if test "$enable_nested_template_prefix" = "no" || test "$enable_member_templates" = "no"; then
809 AC_DEFINE(BOOST_RE_NESTED_TEMPLATE_DECL, [])
812 AC_MSG_CHECKING(for template nested class access)
820 void deallocate(void*);
824 alloc(const alloc<U>&) {}
825 alloc& operator=(const alloc&);
827 alloc& operator=(const alloc<U>&)
833 typedef alloc<U> other;
840 alloc<double> da(ia);
844 alloc<int>::template rebind<double>::other da2(ia);
848 AC_DEFINE(BOOST_RE_NESTED_TEMPLATE_DECL,template)
851 AC_DEFINE(BOOST_RE_NESTED_TEMPLATE_DECL,[])
857 AC_MSG_CHECKING(for explicit template instantiation)
860 #include "confdefs.h"
872 factorial<T>::factorial()
877 T factorial<T>::operator()(T t)
880 for(T i = 1; i <= t; ++i)
887 template class factorial<int>;
888 template class factorial<short>;
896 AC_DEFINE(BOOST_RE_NO_TEMPLATE_INST,[])
901 AC_ARG_ENABLE(fastcall, [--disable-fastcall turns off use __fastcall and __stdcall.])
902 if test "$enable_fastcall" = "no" || test "$enable_ms_windows" != "no"; then
903 AC_DEFINE(BOOST_RE_CALL, [])
904 AC_DEFINE(BOOST_RE_CCALL, [])
907 AC_MSG_CHECKING(for __fastcall and __stdcall)
910 void __fastcall f1(int)
914 void __stdcall f2(int)
924 AC_DEFINE(BOOST_RE_CALL, [__fastcall])
925 AC_DEFINE(BOOST_RE_CCALL, [__stdcall])
927 [AC_DEFINE(BOOST_RE_CALL, [])
928 AC_DEFINE(BOOST_RE_CCALL, [])
933 # move on to STL options:
936 AC_MSG_CHECKING(for standard library namespace)
942 #include "confdefs.h"
957 [AC_MSG_RESULT(yes - std)
958 have_std_namespace="yes"
960 [AC_MSG_RESULT(no - either STL is not present or in a non-standard namespace.)
961 AC_MSG_ERROR([Sorry, you can't compile this library unless the standard library is in namespace std.])])
963 AC_MSG_CHECKING(for <exception>)
967 #include "confdefs.h"
969 class bad_expression : public std::exception
973 bad_expression(unsigned int err) : code(err) {}
974 bad_expression(const bad_expression& e) : std::exception(e), code(e.code) {}
975 bad_expression& operator=(const bad_expression& e)
977 std::exception::operator=(e);
981 virtual const char* what()const throw();
986 std::bad_exception e3;
993 AC_DEFINE(BOOST_RE_NO_EXCEPTION_H, [])
996 AC_MSG_CHECKING(for <iterator>)
1007 AC_DEFINE(BOOST_RE_NO_ITERATOR_H, [])
1010 AC_MSG_CHECKING(for <algorithm>)
1013 #include <algorithm>
1014 #include "confdefs.h"
1025 if test "$enable_stl" != "no" && test "$need_algo" = "yes"; then
1026 AC_MSG_CHECKING(for <algo>)
1035 AC_DEFINE(BOOST_RE_USE_ALGO, [])
1037 [AC_MSG_RESULT(no - disabling STL support)
1038 AC_DEFINE(BOOST_RE_NO_STL, [])
1039 AC_DEFINE(BOOST_RE_NO_EXCEPTION_H, [])
1040 AC_DEFINE(BOOST_RE_NO_ITERATOR_H, [])
1041 AC_DEFINE(BOOST_RE_NO_MEMORY_H, [])
1042 AC_DEFINE(BOOST_RE_NO_LOCALE_H, [])
1043 AC_DEFINE(BOOST_RE_NO_STRING_H, [])
1049 AC_MSG_CHECKING(for <memory>)
1053 #include "confdefs.h"
1055 std::allocator<char> a;
1056 std::allocator<double> d(a);
1058 typedef std::allocator<char> alloc_type;
1060 alloc_type::BOOST_RE_NESTED_TEMPLATE_DECL rebind<int>::other o(a);
1067 AC_DEFINE(BOOST_RE_NO_MEMORY_H, [])
1071 if test "$enable_stl" != "no"; then
1072 AC_MSG_CHECKING(for <string>)
1076 #include "confdefs.h"
1087 AC_MSG_ERROR(Sorry: you can't compile this library without <string>)
1092 if test "$enable_stl" != "no"; then
1093 AC_MSG_CHECKING(for std::basic_string default arguments)
1097 #include "confdefs.h"
1099 std::basic_string<char> s1;
1100 std::basic_string<wchar_t> s2;
1108 AC_DEFINE(BOOST_RE_NO_STRING_DEF_ARGS, [])
1114 if test "$enable_stl" != "no"; then
1115 AC_MSG_CHECKING(for <locale>)
1119 #include "confdefs.h"
1126 ac_have_locale='yes'
1129 AC_DEFINE(BOOST_RE_NO_LOCALE_H, [])
1134 if test "$enable_stl" != "no"; then
1135 AC_MSG_CHECKING(for <iostream>)
1140 #include "confdefs.h"
1146 std::cout << "some text" << std::endl;
1151 AC_DEFINE(BOOST_RE_OLD_IOSTREAM, [])
1156 AC_MSG_CHECKING(for std::distance)
1160 #include "confdefs.h"
1165 i = std::distance(j, k);
1168 AC_DEFINE(BOOST_RE_DISTANCE_T_1)
1173 if test "$enable_stl" != "no" && test "$have_dist" != "yes"; then
1177 #include "confdefs.h"
1182 std::distance(j, k, i);
1185 AC_DEFINE(BOOST_RE_DISTANCE_T_2)
1189 AC_DEFINE(BOOST_RE_DISTANCE_T_0)
1194 if test "$enable_stl" != "no" && test "$have_si" != "yes"; then
1195 AC_MSG_CHECKING(for standard iterator syntax)
1199 #include "confdefs.h"
1203 std::iterator<std::output_iterator_tag, char, std::ptrdiff_t, char*, char&> oi;
1204 std::iterator<std::input_iterator_tag, char, std::ptrdiff_t, char*, char&> ii;
1205 std::iterator<std::forward_iterator_tag, char, std::ptrdiff_t, char*, char&> fi;
1206 std::iterator<std::bidirectional_iterator_tag, char, std::ptrdiff_t, char*, char&> bi;
1207 std::iterator<std::random_access_iterator_tag, char, std::ptrdiff_t, char*, char&> ri;
1210 AC_DEFINE(BOOST_RE_ITERATOR_T_1)
1222 if test "$enable_stl" != "no" && test "$have_si" != "yes"; then
1226 #include "confdefs.h"
1230 std::iterator<std::output_iterator_tag, char, std::ptrdiff_t> oi;
1231 std::iterator<std::input_iterator_tag, char, std::ptrdiff_t> ii;
1232 std::iterator<std::forward_iterator_tag, char, std::ptrdiff_t> fi;
1233 std::iterator<std::bidirectional_iterator_tag, char, std::ptrdiff_t> bi;
1234 std::iterator<std::random_access_iterator_tag, char, std::ptrdiff_t> ri;
1237 AC_DEFINE(BOOST_RE_ITERATOR_T_2)
1245 [AC_MSG_RESULT(no)])
1246 AC_DEFINE(BOOST_RE_ITERATOR_T_0)
1251 if test "$have_oi" != "yes"; then
1252 AC_MSG_CHECKING(for output iterator syntax)
1256 #include "confdefs.h"
1260 std::output_iterator oi;
1263 AC_DEFINE(BOOST_RE_OI_T_3)
1267 AC_DEFINE(BOOST_RE_OI_T_0)
1272 if test "$enable_stl" != "no" && test "$have_ii" != "yes"; then
1273 AC_MSG_CHECKING(for input iterator syntax)
1277 #include "confdefs.h"
1281 std::input_iterator<char, std::ptrdiff_t> oi;
1284 AC_DEFINE(BOOST_RE_II_T_3)
1291 if test "$enable_stl" != "no" && test "$have_ii" != "yes"; then
1295 #include "confdefs.h"
1299 std::input_iterator<char> oi;
1302 AC_DEFINE(BOOST_RE_II_T_4)
1306 AC_DEFINE(BOOST_RE_II_T_0)
1311 if test "$enable_stl" != "no" && test "$have_fi" != "yes"; then
1312 AC_MSG_CHECKING(for forward iterator syntax)
1316 #include "confdefs.h"
1320 std::forward_iterator<int, std::ptrdiff_t> oi;
1323 AC_DEFINE(BOOST_RE_FI_T_3)
1327 AC_DEFINE(BOOST_RE_FI_T_0)
1332 if test "$enable_stl" != "no" && test "$have_bi" != "yes"; then
1333 AC_MSG_CHECKING(for bidirectional iterator syntax)
1337 #include "confdefs.h"
1341 std::bidirectional_iterator<int, std::ptrdiff_t> oi;
1344 AC_DEFINE(BOOST_RE_BI_T_)
1348 AC_DEFINE(BOOST_RE_BI_T_0)
1353 if test "$enable_stl" != "no" && test "$have_ri" != "yes"; then
1354 AC_MSG_CHECKING(for random access iterator syntax)
1358 #include "confdefs.h"
1362 std::random_access_iterator<int, std::ptrdiff_t> oi;
1365 AC_DEFINE(BOOST_RE_RI_T_3)
1369 AC_DEFINE(BOOST_RE_RI_T_0)
1374 if test "$enable_stl" != "no"; then
1375 AC_MSG_CHECKING(for output iterator assignment)
1378 #include "confdefs.h"
1380 #ifdef BOOST_RE_OLD_IOSTREAM
1381 #include <iostream.h>
1382 std::ostream_iterator<char> a(cout);
1383 std::ostream_iterator<char> b(cout);
1386 std::ostream_iterator<char> a(std::cout);
1387 std::ostream_iterator<char> b(std::cout);
1391 #if !defined(BOOST_RE_NO_TRICKY_DEFAULT_PARAM) && !defined(BOOST_RE_NO_DEFAULT_PARAM)
1392 typedef std::list<int> list_type;
1394 typedef std::list<int, jm_def_alloc> list_type;
1399 std:: back_insert_iterator<list_type> c(v);
1400 std:: back_insert_iterator<list_type> d(v);
1410 AC_DEFINE(BOOST_RE_NO_OI_ASSIGN, [])
1420 # generate include dependencies
1424 #for file in ../../boost/re_detail/*.hpp
1426 # if test "$file" != '../../boost/re_detail/*.hpp'; then
1427 # ac_all_h="$ac_all_h ../$file"
1428 # ac_all_dep="$ac_all_dep $file"
1434 # generate source dependencies
1439 #cat ./lib/makefile.org > ./lib/makefile.in
1440 #for file in src/*.cpp src/*.c
1442 # if test "$file" != 'src/*.cpp' && test "$file" != 'src/*.c'; then
1443 # dnl echo source dependency found "$file"
1444 # ac_all_dep="$ac_all_dep $file"
1445 # ac_all_cpp="$ac_all_cpp $file"
1446 # root=`echo "$file" | sed 's/src\/\(.*\)\..*/\1/g'`
1447 # dnl echo root file name is "$root"
1448 # ac_all_o="$ac_all_o $root$ac_obj_ext"
1449 # echo >> ./lib/makefile.in
1450 # echo >> ./lib/makefile.in
1451 # echo "$root$ac_obj_ext"': $(ALL_H) '"../$file" >> ./lib/makefile.in
1452 # echo ' $(CPP) $(CPP_PROJ)'" ../$file" >> ./lib/makefile.in
1453 # echo ' $(AR) -rc lib$(LIBNAME).a'" $root$ac_obj_ext" >> ./lib/makefile.in
1457 #echo "$ac_rules" >> ./lib/makefile.in
1461 #AC_SUBST(ac_all_cpp)
1462 #AC_SUBST(ac_all_dep)
1464 #ac_regress="$ac_regress r1$ac_exe_ext"
1466 #if test "$enable_wstring" != "no"; then
1467 #ac_regress="$ac_regress r2$ac_exe_ext"
1470 #AC_SUBST(ac_regress)
1472 if test "$enable_ms_windows" = "no"; then
1473 AC_DEFINE(BOOST_RE_NO_W32, [])
1478 # OK final test for possible link time problems:
1480 cat > conf2.h << EOF
1482 #include "confdefs.h"
1494 factorial<T>::factorial()
1499 T factorial<T>::operator()(T t)
1502 for(T i = 1; i <= t; ++i)
1514 cat > conf2.cpp << EOF
1528 LIBS="conf2.cpp $old_libs"
1530 AC_MSG_CHECKING(for link time template merging)
1540 [AC_MSG_RESULT(yes)],
1541 [AC_DEFINE(BOOST_RE_NO_TEMPLATE_MERGE, [])
1543 AC_MSG_RESULT([ Warning - $0 has determined that your compiler can not merge])
1544 AC_MSG_RESULT([ template instances, you may have problems linking to libregex++.a - ])
1545 AC_MSG_RESULT([ see the FAQ for further details.])
1549 if eval "$CXX $CXXFLAGS -c conf2.cpp" && eval "ar -rc libconf2.a conf2$ac_obj_ext"; then
1550 LIBS="-L./ -lconf2 $old_libs"
1552 AC_MSG_CHECKING(for link time template merging from archive files)
1562 [AC_MSG_RESULT(yes)],
1563 [AC_DEFINE(BOOST_RE_NO_TEMPLATE_MERGE_A, [])
1565 AC_MSG_RESULT([ Warning - $0 has determined that your compiler can not merge ])
1566 AC_MSG_RESULT([ template instances, if these are located inside an archive file,])
1567 AC_MSG_RESULT([ you may have problems linking to libregex++.a - see the FAQ for])
1568 AC_MSG_RESULT([ further details.])
1574 AC_MSG_RESULT(Unable to create library archive, library may not be fully configured.)
1584 rm -f "conf2$ac_obj_ext"
1588 cat > conf2.h << EOF
1590 #include "confdefs.h"
1602 factorial<T>::factorial()
1607 T factorial<T>::operator()(T t)
1613 for(T i = 1; i <= 2; ++i)
1619 for(T i = 1; i <= 3; ++i)
1625 for(T i = 1; i <= 4; ++i)
1631 for(T i = 1; i <= 5; ++i)
1637 for(T i = 1; i <= 6; ++i)
1643 for(T i = 1; i <= 7; ++i)
1649 for(T i = 1; i <= t; ++i)
1663 cat > conf2.cpp << EOF
1677 LIBS="conf2.cpp $old_libs"
1679 AC_MSG_CHECKING(for link time template merging of switch statements)
1689 [AC_MSG_RESULT(yes)],
1690 [AC_DEFINE(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE, [])
1692 AC_MSG_RESULT([ Warning - $0 has determined that your compiler can not merge])
1693 AC_MSG_RESULT([ template instances, if those instances contain switch statements, ])
1694 AC_MSG_RESULT([ you may have problems linking to libregex++.a - ])
1695 AC_MSG_RESULT([ see the FAQ for further details.])
1708 AC_DEFINE(BOOST_RE_AUTO_CONF)
1711 #AC_MSG_RESULT($0: setting up headers...)
1713 #AC_OUTPUT(lib/makefile demo/jgrep/makefile demo/timer/makefile demo/regress/makefile makefile)
1715 #AC_MSG_RESULT($0: regex++ package tuned for use with \"${CXX}\" compiler.)
1716 #AC_MSG_RESULT($0: To restore original settings - copy jm_opt.in to ../../boost/re_detail/regex_options.hpp)
1719 #post processing cleanup:
1720 #sed 's%^[ ]*#[ ]*undef[ ][ ]*\(.*\)[ ]*$%/* #define \1 */%' ../../boost/re_detail/regex_options.hpp > jm_opt.out
1721 #cat jm_opt.out > ../../boost/re_detail/regex_options.hpp
1722 #sed 's%\(#[ ]*\)undef[ ]%\1define %' ../../boost/re_detail/regex_options.hpp > jm_opt.out
1723 #cat jm_opt.out > ../../boost/re_detail/regex_options.hpp
1754 ####################################################
1755 ####################################################
1756 ####################################################
1758 ### Finish the work.
1759 AC_OUTPUT([Makefile \
1761 libs/regex/Makefile \
1762 libs/regex/src/Makefile \