Commit 4db2960c authored by coppro's avatar coppro

Compatibility updates; Boost Regex is now statically linked, changed to <hunspell/hunspell.hxx>

parent 2112c8df
...@@ -13,9 +13,11 @@ AUTOMAKE_OPTIONS = subdir-objects ...@@ -13,9 +13,11 @@ AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = magicseteditor bin_PROGRAMS = magicseteditor
AM_CXXFLAGS = @WX_CXXFLAGS@ \$(BOOST_CXXFLAGS) -DUNICODE -I . -Wall AM_CXXFLAGS = @WX_CXXFLAGS@ \$(BOOST_CXXFLAGS) -DUNICODE -I . -Wall
AM_LDFLAGS = @WX_LIBS@ \$(BOOST_LDFLAGS) \$(BOOST_REGEX_LIB) AM_LDFLAGS = @WX_LIBS@ \$(BOOST_LDFLAGS)
magicseteditor_SOURCES = magicseteditor_LDADD = \$(BOOST_REGEX_LIB)
magicseteditor_SOURCES =
# The script used to generate is MakeAM.sh " > Makefile.am; # The script used to generate is MakeAM.sh " > Makefile.am;
......
...@@ -205,7 +205,8 @@ am_magicseteditor_OBJECTS = ./src/util/version.$(OBJEXT) \ ...@@ -205,7 +205,8 @@ am_magicseteditor_OBJECTS = ./src/util/version.$(OBJEXT) \
./src/cli/text_io_handler.$(OBJEXT) \ ./src/cli/text_io_handler.$(OBJEXT) \
./src/code_template.$(OBJEXT) ./src/code_template.$(OBJEXT)
magicseteditor_OBJECTS = $(am_magicseteditor_OBJECTS) magicseteditor_OBJECTS = $(am_magicseteditor_OBJECTS)
magicseteditor_LDADD = $(LDADD) am__DEPENDENCIES_1 =
magicseteditor_DEPENDENCIES = $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
...@@ -334,9 +335,10 @@ top_srcdir = @top_srcdir@ ...@@ -334,9 +335,10 @@ top_srcdir = @top_srcdir@
# This flag allows us to use subdirectories: # This flag allows us to use subdirectories:
AUTOMAKE_OPTIONS = subdir-objects AUTOMAKE_OPTIONS = subdir-objects
AM_CXXFLAGS = @WX_CXXFLAGS@ $(BOOST_CXXFLAGS) -DUNICODE -I . -Wall AM_CXXFLAGS = @WX_CXXFLAGS@ $(BOOST_CXXFLAGS) -DUNICODE -I . -Wall
AM_LDFLAGS = @WX_LIBS@ $(BOOST_LDFLAGS) $(BOOST_REGEX_LIB) AM_LDFLAGS = @WX_LIBS@ $(BOOST_LDFLAGS)
magicseteditor_LDADD = $(BOOST_REGEX_LIB)
# The script used to generate is MakeAM.sh # The script used to generate is MakeAM.sh
magicseteditor_SOURCES = ./src/util/version.cpp \ magicseteditor_SOURCES = ./src/util/version.cpp \
./src/util/alignment.cpp ./src/util/rotation.cpp \ ./src/util/alignment.cpp ./src/util/rotation.cpp \
./src/util/tagged_string.cpp ./src/util/spell_checker.cpp \ ./src/util/tagged_string.cpp ./src/util/spell_checker.cpp \
......
...@@ -690,14 +690,14 @@ AMDEPBACKSLASH ...@@ -690,14 +690,14 @@ AMDEPBACKSLASH
CXXDEPMODE CXXDEPMODE
am__fastdepCXX_TRUE am__fastdepCXX_TRUE
am__fastdepCXX_FALSE am__fastdepCXX_FALSE
BOOST_CPPFLAGS
BOOST_LDFLAGS
CC CC
CFLAGS CFLAGS
ac_ct_CC ac_ct_CC
CCDEPMODE CCDEPMODE
am__fastdepCC_TRUE am__fastdepCC_TRUE
am__fastdepCC_FALSE am__fastdepCC_FALSE
BOOST_CPPFLAGS
BOOST_LDFLAGS
BOOST_REGEX_LIB BOOST_REGEX_LIB
WX_CONFIG_PATH WX_CONFIG_PATH
WX_CPPFLAGS WX_CPPFLAGS
...@@ -3033,289 +3033,210 @@ fi ...@@ -3033,289 +3033,210 @@ fi
# Do not pass -O2, because that causes failures for now. # Do not pass -O2, because that causes failures for now.
CXXFLAGS=-g CXXFLAGS=-g
# Checks for libraries. # Checks for libraries.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
# Check for Boost fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
# Check whether --with-boost was given. { echo "$as_me:$LINENO: result: $CC" >&5
if test "${with_boost+set}" = set; then echo "${ECHO_T}$CC" >&6; }
withval=$with_boost;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
else else
want_boost="yes" { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi fi
if test "x$want_boost" = "xyes"; then fi
boost_lib_version_req=1.36.0 if test -z "$ac_cv_prog_CC"; then
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'` ac_ct_CC=$CC
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'` # Extract the first word of "gcc", so it can be a program name with args.
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'` set dummy gcc; ac_word=$2
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'` { echo "$as_me:$LINENO: checking for $ac_word" >&5
if test "x$boost_lib_version_req_sub_minor" = "x" ; then echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
boost_lib_version_req_sub_minor="0" if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
fi echo $ECHO_N "(cached) $ECHO_C" >&6
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` else
{ echo "$as_me:$LINENO: checking for boostlib >= $boost_lib_version_req" >&5 if test -n "$ac_ct_CC"; then
echo $ECHO_N "checking for boostlib >= $boost_lib_version_req... $ECHO_C" >&6; } ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
succeeded=no else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
if test "$ac_boost_path" != ""; then for as_dir in $PATH
BOOST_LDFLAGS="-L$ac_boost_path/lib" do
BOOST_CPPFLAGS="-I$ac_boost_path/include" IFS=$as_save_IFS
else test -z "$as_dir" && as_dir=.
for ac_boost_path_tmp in /usr /usr/local /opt ; do for ac_exec_ext in '' $ac_executable_extensions; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" ac_cv_prog_ac_ct_CC="gcc"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break; break 2
fi fi
done done
fi done
IFS=$as_save_IFS
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <boost/version.hpp>
int
main ()
{
#if BOOST_VERSION >= $WANT_BOOST_VERSION fi
// Everything is okay fi
#else ac_ct_CC=$ac_cv_prog_ac_ct_CC
# error Boost version is too old if test -n "$ac_ct_CC"; then
#endif { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
; if test "x$ac_ct_CC" = x; then
return 0; CC=""
} else
_ACEOF case $cross_compiling:$ac_tool_warned in
rm -f conftest.$ac_objext yes:)
if { (ac_try="$ac_compile" { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
case "(($ac_try" in whose name does not start with the host triplet. If you think this
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; configuration is useful to you, please write to autoconf@gnu.org." >&5
*) ac_try_echo=$ac_try;; echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 CC=$ac_ct_CC
(eval "$ac_compile") 2>conftest.er1 fi
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
succeeded=yes
found_system=yes
else else
echo "$as_me: failed program was:" >&5 CC="$ac_cv_prog_CC"
sed 's/^/| /' conftest.$ac_ext >&5
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test -z "$CC"; then
ac_ext=c if test -n "$ac_tool_prefix"; then
ac_cpp='$CPP $CPPFLAGS' # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' set dummy ${ac_tool_prefix}cc; ac_word=$2
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' { echo "$as_me:$LINENO: checking for $ac_word" >&5
ac_compiler_gnu=$ac_cv_c_compiler_gnu echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
if test "x$succeeded" != "xyes"; then fi
_version=0 fi
if test "$ac_boost_path" != ""; then if test -z "$CC"; then
BOOST_LDFLAGS="-L$ac_boost_path/lib" # Extract the first word of "cc", so it can be a program name with args.
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then set dummy cc; ac_word=$2
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do { echo "$as_me:$LINENO: checking for $ac_word" >&5
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
V_CHECK=`expr $_version_tmp \> $_version` if test "${ac_cv_prog_CC+set}" = set; then
if test "$V_CHECK" = "1" ; then echo $ECHO_N "(cached) $ECHO_C" >&6
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
{ echo "$as_me:$LINENO: We will use a staged boost library from $BOOST_ROOT" >&5
echo "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;}
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <boost/version.hpp>
int
main ()
{
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
succeeded=yes
found_system=yes
else else
echo "$as_me: failed program was:" >&5 if test -n "$CC"; then
sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi
ac_ext=c CC=$ac_cv_prog_CC
ac_cpp='$CPP $CPPFLAGS' if test -n "$CC"; then
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' { echo "$as_me:$LINENO: result: $CC" >&5
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' echo "${ECHO_T}$CC" >&6; }
ac_compiler_gnu=$ac_cv_c_compiler_gnu else
{ echo "$as_me:$LINENO: result: no" >&5
fi echo "${ECHO_T}no" >&6; }
if test "$succeeded" != "yes" ; then
if test "$_version" = "0" ; then
{ { echo "$as_me:$LINENO: error: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
echo "$as_me: error: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&2;}
{ (exit 1); exit 1; }; }
else
{ echo "$as_me:$LINENO: Your boost libraries seems to old (version $_version)." >&5
echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;}
fi
else
cat >>confdefs.h <<\_ACEOF
#define HAVE_BOOST
_ACEOF
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi fi
ac_ext=c fi
ac_cpp='$CPP $CPPFLAGS' if test -z "$CC"; then
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' if test -n "$ac_tool_prefix"; then
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' for ac_prog in cl.exe
ac_compiler_gnu=$ac_cv_c_compiler_gnu do
if test -n "$ac_tool_prefix"; then # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5 { echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then if test "${ac_cv_prog_CC+set}" = set; then
...@@ -3331,7 +3252,7 @@ do ...@@ -3331,7 +3252,7 @@ do
test -z "$as_dir" && as_dir=. test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc" ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2 break 2
fi fi
...@@ -3351,11 +3272,15 @@ echo "${ECHO_T}no" >&6; } ...@@ -3351,11 +3272,15 @@ echo "${ECHO_T}no" >&6; }
fi fi
test -n "$CC" && break
done
fi fi
if test -z "$ac_cv_prog_CC"; then if test -z "$CC"; then
ac_ct_CC=$CC ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args. for ac_prog in cl.exe
set dummy gcc; ac_word=$2 do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5 { echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
...@@ -3371,7 +3296,7 @@ do ...@@ -3371,7 +3296,7 @@ do
test -z "$as_dir" && as_dir=. test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc" ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2 break 2
fi fi
...@@ -3390,210 +3315,10 @@ else ...@@ -3390,210 +3315,10 @@ else
echo "${ECHO_T}no" >&6; } echo "${ECHO_T}no" >&6; }
fi fi
if test "x$ac_ct_CC" = x; then
CC="" test -n "$ac_ct_CC" && break
else done
case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
fi
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
for ac_prog in cl.exe
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
for ac_prog in cl.exe
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
{ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
test -n "$ac_ct_CC" && break
done
if test "x$ac_ct_CC" = x; then if test "x$ac_ct_CC" = x; then
CC="" CC=""
else else
...@@ -3837,101 +3562,545 @@ sed 's/^/| /' conftest.$ac_ext >&5 ...@@ -3837,101 +3562,545 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
char **p;
int i;
{
return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
char *s;
va_list v;
va_start (v,p);
s = g (p, va_arg (v,int));
va_end (v);
return s;
}
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
inside strings and character constants. */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
return 0;
}
_ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cc_c89=$ac_arg
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
{ echo "$as_me:$LINENO: result: none needed" >&5
echo "${ECHO_T}none needed" >&6; } ;;
xno)
{ echo "$as_me:$LINENO: result: unsupported" >&5
echo "${ECHO_T}unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
esac
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CC" am_compiler_list=
{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_CC_dependencies_compiler_type=none
fi
fi
{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
am__fastdepCC_TRUE=
am__fastdepCC_FALSE='#'
else
am__fastdepCC_TRUE='#'
am__fastdepCC_FALSE=
fi
{ echo "$as_me:$LINENO: checking for Hunspell_create in -lhunspell" >&5
echo $ECHO_N "checking for Hunspell_create in -lhunspell... $ECHO_C" >&6; }
if test "${ac_cv_lib_hunspell_Hunspell_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lhunspell $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char Hunspell_create ();
int
main ()
{
return Hunspell_create ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_hunspell_Hunspell_create=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_hunspell_Hunspell_create=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_hunspell_Hunspell_create" >&5
echo "${ECHO_T}$ac_cv_lib_hunspell_Hunspell_create" >&6; }
if test $ac_cv_lib_hunspell_Hunspell_create = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBHUNSPELL 1
_ACEOF
LIBS="-lhunspell $LIBS"
fi
# Check for Boost
# Check whether --with-boost was given.
if test "${with_boost+set}" = set; then
withval=$with_boost;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
else
want_boost="yes"
fi
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=1.37.0
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
{ echo "$as_me:$LINENO: checking for boostlib >= $boost_lib_version_req" >&5
echo $ECHO_N "checking for boostlib >= $boost_lib_version_req... $ECHO_C" >&6; }
succeeded=no
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <boost/version.hpp>
int
main ()
{
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
succeeded=yes
found_system=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
{ echo "$as_me:$LINENO: We will use a staged boost library from $BOOST_ROOT" >&5
echo "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;}
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp
fi ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF
ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
char **p;
int i;
{
return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
char *s;
va_list v;
va_start (v,p);
s = g (p, va_arg (v,int));
va_end (v);
return s;
}
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters #include <boost/version.hpp>
inside strings and character constants. */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int int
main () main ()
{ {
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
; ;
return 0; return 0;
} }
_ACEOF _ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ rm -f conftest.$ac_objext
-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile" if { (ac_try="$ac_compile"
case "(($ac_try" in case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
...@@ -3945,156 +4114,58 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ...@@ -3945,156 +4114,58 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { (exit $ac_status); } && {
test -z "$ac_c_werror_flag" || test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err test ! -s conftest.err
} && test -s conftest.$ac_objext; then } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_c89=$ac_arg
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
succeeded=yes
found_system=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
{ echo "$as_me:$LINENO: result: none needed" >&5
echo "${ECHO_T}none needed" >&6; } ;;
xno)
{ echo "$as_me:$LINENO: result: unsupported" >&5
echo "${ECHO_T}unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
esac
ac_ext=c rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS' ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CC" am_compiler_list= fi
{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 if test "$succeeded" != "yes" ; then
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "$_version" = "0" ; then
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then { { echo "$as_me:$LINENO: error: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
echo $ECHO_N "(cached) $ECHO_C" >&6 echo "$as_me: error: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&2;}
else { (exit 1); exit 1; }; }
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then else
# We make a subdir and do the tests there. Otherwise we can end up { echo "$as_me:$LINENO: Your boost libraries seems to old (version $_version)." >&5
# making bogus files that we don't know about and never remove. For echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;}
# instance it was reported that on HP-UX the gcc test will end up fi
# making a dummy file named `D' -- because `-MD' means `put the output else
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
fi
done
cd .. cat >>confdefs.h <<\_ACEOF
rm -rf conftest.dir #define HAVE_BOOST
else _ACEOF
am_cv_CC_dependencies_compiler_type=none
fi
fi fi
{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if CPPFLAGS="$CPPFLAGS_SAVED"
test "x$enable_dependency_tracking" != xno \ LDFLAGS="$LDFLAGS_SAVED"
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
am__fastdepCC_TRUE=
am__fastdepCC_FALSE='#'
else
am__fastdepCC_TRUE='#'
am__fastdepCC_FALSE=
fi fi
# Check whether --with-boost-regex was given. # Check whether --with-boost-regex was given.
if test "${with_boost_regex+set}" = set; then if test "${with_boost_regex+set}" = set; then
withval=$with_boost_regex; withval=$with_boost_regex;
...@@ -4340,6 +4411,7 @@ echo "$as_me: error: Could not link against $ax_lib !" >&2;} ...@@ -4340,6 +4411,7 @@ echo "$as_me: error: Could not link against $ax_lib !" >&2;}
LDFLAGS="$LDFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED"
fi fi
BOOST_REGEX_LIB="-Wl,-Bstatic $BOOST_REGEX_LIB -Wl,-Bdynamic"
# Check for wxWidgets # Check for wxWidgets
...@@ -6956,14 +7028,14 @@ AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim ...@@ -6956,14 +7028,14 @@ AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
CXXDEPMODE!$CXXDEPMODE$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim
am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
BOOST_CPPFLAGS!$BOOST_CPPFLAGS$ac_delim
BOOST_LDFLAGS!$BOOST_LDFLAGS$ac_delim
CC!$CC$ac_delim CC!$CC$ac_delim
CFLAGS!$CFLAGS$ac_delim CFLAGS!$CFLAGS$ac_delim
ac_ct_CC!$ac_ct_CC$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim
CCDEPMODE!$CCDEPMODE$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim
am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
BOOST_CPPFLAGS!$BOOST_CPPFLAGS$ac_delim
BOOST_LDFLAGS!$BOOST_LDFLAGS$ac_delim
BOOST_REGEX_LIB!$BOOST_REGEX_LIB$ac_delim BOOST_REGEX_LIB!$BOOST_REGEX_LIB$ac_delim
WX_CONFIG_PATH!$WX_CONFIG_PATH$ac_delim WX_CONFIG_PATH!$WX_CONFIG_PATH$ac_delim
WX_CPPFLAGS!$WX_CPPFLAGS$ac_delim WX_CPPFLAGS!$WX_CPPFLAGS$ac_delim
......
...@@ -18,10 +18,12 @@ AC_PROG_CXX ...@@ -18,10 +18,12 @@ AC_PROG_CXX
# Do not pass -O2, because that causes failures for now. # Do not pass -O2, because that causes failures for now.
CXXFLAGS=-g CXXFLAGS=-g
# Checks for libraries. # Checks for libraries.
AC_CHECK_LIB([hunspell],[Hunspell_create])
# Check for Boost # Check for Boost
AX_BOOST_BASE([1.36.0]) AX_BOOST_BASE([1.37.0])
AX_BOOST_REGEX AX_BOOST_REGEX
BOOST_REGEX_LIB="-Wl,-Bstatic $BOOST_REGEX_LIB -Wl,-Bdynamic"
# Check for wxWidgets # Check for wxWidgets
AM_OPTIONS_WXCONFIG AM_OPTIONS_WXCONFIG
......
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
#include <script/script.hpp> #include <script/script.hpp>
#include <script/context.hpp> #include <script/context.hpp>
#ifndef USE_SCRIPT_PROFILING
#define USE_SCRIPT_PROFILING 1 #define USE_SCRIPT_PROFILING 1
#endif
#if USE_SCRIPT_PROFILING #if USE_SCRIPT_PROFILING
...@@ -23,7 +25,7 @@ DECLARE_POINTER_TYPE(FunctionProfile); ...@@ -23,7 +25,7 @@ DECLARE_POINTER_TYPE(FunctionProfile);
#ifdef WIN32 #ifdef WIN32
typedef LONGLONG ProfileTime; typedef LONGLONG ProfileTime;
inline ProfileTime timer_now() { inline ProfileTime timer_now() {
LARGE_INTEGER i; LARGE_INTEGER i;
QueryPerformanceCounter(&i); QueryPerformanceCounter(&i);
...@@ -34,17 +36,25 @@ DECLARE_POINTER_TYPE(FunctionProfile); ...@@ -34,17 +36,25 @@ DECLARE_POINTER_TYPE(FunctionProfile);
QueryPerformanceFrequency(&i); QueryPerformanceFrequency(&i);
return i.QuadPart; return i.QuadPart;
} }
inline const char * mangled_name(const type_info& t) {
return t.raw_name();
}
#else #else
// clock() has nanosecond resolution on Linux // clock() has nanosecond resolution on Linux
// on any other platform, stil the best way. // on any other platform, stil the best way.
typedef clock_t ProfileTime; typedef clock_t ProfileTime;
inline ProfileTime timer_now() { inline ProfileTime timer_now() {
return clock(); return clock();
} }
inline ProfileTime timer_resolution() { inline ProfileTime timer_resolution() {
return CLOCKS_PER_SEC; return CLOCKS_PER_SEC;
} }
inline const char * mangled_name(const type_info& t) {
return t.name();
}
#endif #endif
/// Simple execution timer /// Simple execution timer
...@@ -66,17 +76,17 @@ class Timer { ...@@ -66,17 +76,17 @@ class Timer {
class FunctionProfile : public IntrusivePtrBase<FunctionProfile> { class FunctionProfile : public IntrusivePtrBase<FunctionProfile> {
public: public:
FunctionProfile(const String& name) : name(name), time_ticks(0), calls(0) {} FunctionProfile(const String& name) : name(name), time_ticks(0), calls(0) {}
String name; String name;
ProfileTime time_ticks; ProfileTime time_ticks;
UInt calls; UInt calls;
/// for each id, called children /// for each id, called children
/** we (ab)use the fact that all pointers are even to store both pointers and ids */ /** we (ab)use the fact that all pointers are even to store both pointers and ids */
map<size_t,FunctionProfileP> children; map<size_t,FunctionProfileP> children;
/// The children, sorted by time /// The children, sorted by time
void get_children(vector<FunctionProfileP>& out) const; void get_children(vector<FunctionProfileP>& out) const;
/// Time in seconds /// Time in seconds
inline double time() const { return time_ticks / (double)timer_resolution(); } inline double time() const { return time_ticks / (double)timer_resolution(); }
inline double avg_time() const { return time() / calls; } inline double avg_time() const { return time() / calls; }
......
...@@ -69,9 +69,9 @@ template <typename T> inline String to_code(const intrusive_ptr<T>& p) { ...@@ -69,9 +69,9 @@ template <typename T> inline String to_code(const intrusive_ptr<T>& p) {
class ScriptDelayedError : public ScriptValue { class ScriptDelayedError : public ScriptValue {
public: public:
inline ScriptDelayedError(const ScriptError& error) : error(error) {} inline ScriptDelayedError(const ScriptError& error) : error(error) {}
virtual ScriptType type() const;// { return SCRIPT_ERROR; } virtual ScriptType type() const;// { return SCRIPT_ERROR; }
// all of these throw // all of these throw
virtual String typeName() const; virtual String typeName() const;
virtual operator String() const; virtual operator String() const;
...@@ -105,7 +105,7 @@ struct ScriptIterator : public ScriptValue { ...@@ -105,7 +105,7 @@ struct ScriptIterator : public ScriptValue {
virtual ScriptType type() const;// { return SCRIPT_ITERATOR; } virtual ScriptType type() const;// { return SCRIPT_ITERATOR; }
virtual String typeName() const;// { return "iterator"; } virtual String typeName() const;// { return "iterator"; }
virtual CompareWhat compareAs(String&, void const*&) const; // { return COMPARE_NO; } virtual CompareWhat compareAs(String&, void const*&) const; // { return COMPARE_NO; }
/// Return the next item for this iterator, or ScriptValueP() if there is no such item /// Return the next item for this iterator, or ScriptValueP() if there is no such item
virtual ScriptValueP next(ScriptValueP* key_out = nullptr) = 0; virtual ScriptValueP next(ScriptValueP* key_out = nullptr) = 0;
virtual ScriptValueP makeIterator(const ScriptValueP& thisP) const; virtual ScriptValueP makeIterator(const ScriptValueP& thisP) const;
...@@ -128,7 +128,7 @@ class ScriptCollectionBase : public ScriptValue { ...@@ -128,7 +128,7 @@ class ScriptCollectionBase : public ScriptValue {
// Iterator over a collection // Iterator over a collection
template <typename Collection> template <typename Collection>
class ScriptCollectionIterator : public ScriptIterator { class ScriptCollectionIterator : public ScriptIterator {
public: public:
ScriptCollectionIterator(const Collection* col) : pos(0), col(col) {} ScriptCollectionIterator(const Collection* col) : pos(0), col(col) {}
virtual ScriptValueP next(ScriptValueP* key_out) { virtual ScriptValueP next(ScriptValueP* key_out) {
if (pos < col->size()) { if (pos < col->size()) {
...@@ -231,7 +231,7 @@ class ScriptCustomCollection : public ScriptCollectionBase { ...@@ -231,7 +231,7 @@ class ScriptCustomCollection : public ScriptCollectionBase {
compare_ptr = this; compare_ptr = this;
return COMPARE_AS_POINTER; return COMPARE_AS_POINTER;
} }
/// The collection as a list (contains only the values that don't have a key) /// The collection as a list (contains only the values that don't have a key)
vector<ScriptValueP> value; vector<ScriptValueP> value;
/// The collection as a map (contains only the values that have a key) /// The collection as a map (contains only the values that have a key)
...@@ -255,7 +255,7 @@ class ScriptConcatCollection : public ScriptCollectionBase { ...@@ -255,7 +255,7 @@ class ScriptConcatCollection : public ScriptCollectionBase {
compare_ptr = this; compare_ptr = this;
return COMPARE_AS_POINTER; return COMPARE_AS_POINTER;
} }
private: private:
ScriptValueP a,b; ScriptValueP a,b;
friend class ScriptConcatCollectionIterator; friend class ScriptConcatCollectionIterator;
...@@ -282,7 +282,7 @@ class ScriptObject : public ScriptValue { ...@@ -282,7 +282,7 @@ class ScriptObject : public ScriptValue {
virtual ScriptValueP getMember(const String& name) const { virtual ScriptValueP getMember(const String& name) const {
#if USE_SCRIPT_PROFILING #if USE_SCRIPT_PROFILING
Timer t; Timer t;
Profiler prof(t, (void*)typeid(T).raw_name(), _("get member of ") + type_name(*value)); Profiler prof(t, (void*)mangled_name(typeid(T)), _("get member of ") + type_name(*value));
#endif #endif
GetMember gm(name); GetMember gm(name);
gm.handle(*value); gm.handle(*value);
...@@ -346,25 +346,25 @@ class ScriptObject : public ScriptValue { ...@@ -346,25 +346,25 @@ class ScriptObject : public ScriptValue {
class ScriptClosure : public ScriptValue { class ScriptClosure : public ScriptValue {
public: public:
ScriptClosure(ScriptValueP fun) : fun(fun) {} ScriptClosure(ScriptValueP fun) : fun(fun) {}
virtual ScriptType type() const; virtual ScriptType type() const;
virtual String typeName() const; virtual String typeName() const;
virtual ScriptValueP eval(Context& ctx) const; virtual ScriptValueP eval(Context& ctx) const;
virtual ScriptValueP dependencies(Context& ctx, const Dependency& dep) const; virtual ScriptValueP dependencies(Context& ctx, const Dependency& dep) const;
/// Add a binding /// Add a binding
void addBinding(Variable v, const ScriptValueP& value); void addBinding(Variable v, const ScriptValueP& value);
/// Is there a binding for the given variable? If so, retrieve it /// Is there a binding for the given variable? If so, retrieve it
ScriptValueP getBinding(Variable v) const; ScriptValueP getBinding(Variable v) const;
/// Try to simplify this closure, returns a value if successful /// Try to simplify this closure, returns a value if successful
ScriptValueP simplify(); ScriptValueP simplify();
/// The wrapped function /// The wrapped function
ScriptValueP fun; ScriptValueP fun;
/// The default argument bindings /// The default argument bindings
vector<pair<Variable,ScriptValueP> > bindings; vector<pair<Variable,ScriptValueP> > bindings;
private: private:
/// Apply the bindings in a context /// Apply the bindings in a context
void applyBindings(Context& ctx) const; void applyBindings(Context& ctx) const;
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
//| License: GNU General Public License 2 or later (see file COPYING) | //| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+ //+----------------------------------------------------------------------------+
#ifndef HEADER_UTIL_SPELL_CHECKER #ifndef HEADER_UTIL_SPELL_CHECKER
#define HEADER_UTIL_SPELL_CHECKER #define HEADER_UTIL_SPELL_CHECKER
// ----------------------------------------------------------------------------- : Includes // ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp> #include <util/prec.hpp>
#include "hunspell.hxx" #include "hunspell/hunspell.hxx"
DECLARE_POINTER_TYPE(SpellChecker); DECLARE_POINTER_TYPE(SpellChecker);
...@@ -33,20 +33,20 @@ class SpellChecker : public Hunspell, public IntrusivePtrBase<SpellChecker> { ...@@ -33,20 +33,20 @@ class SpellChecker : public Hunspell, public IntrusivePtrBase<SpellChecker> {
static SpellChecker& get(const String& filename, const String& language); static SpellChecker& get(const String& filename, const String& language);
/// Destroy all cached SpellChecker objects /// Destroy all cached SpellChecker objects
static void destroyAll(); static void destroyAll();
/// Check the spelling of a single word /// Check the spelling of a single word
bool spell(const String& word); bool spell(const String& word);
/// Check the spelling of a single word, ignore punctuation /// Check the spelling of a single word, ignore punctuation
bool spell_with_punctuation(const String& word); bool spell_with_punctuation(const String& word);
/// Give spelling suggestions /// Give spelling suggestions
void suggest(const String& word, vector<String>& suggestions_out); void suggest(const String& word, vector<String>& suggestions_out);
private: private:
/// Convert between String and dictionary encoding /// Convert between String and dictionary encoding
wxCSConv encoding; wxCSConv encoding;
bool convert_encoding(const String& word, CharBuffer& out); bool convert_encoding(const String& word, CharBuffer& out);
SpellChecker(const char* aff_path, const char* dic_path); SpellChecker(const char* aff_path, const char* dic_path);
static map<String,SpellCheckerP> spellers; //< Cached checkers for each language static map<String,SpellCheckerP> spellers; //< Cached checkers for each language
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment