Deal with tr1 being gone in c0x11 compilers
This commit is contained in:
parent
0ba71e0e39
commit
e12d66865e
@ -111,3 +111,6 @@
|
||||
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#undef _LARGE_FILES
|
||||
|
||||
#undef HAVE_TR1_UNORDERED
|
||||
#undef HAVE_CXX0X_UNORDERED
|
||||
|
||||
@ -23,8 +23,9 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <tr1/unordered_set>
|
||||
#include <cstring>
|
||||
#include "unordered_defs.h"
|
||||
using namespace std;
|
||||
|
||||
#include "textsplit.h"
|
||||
#include "debuglog.h"
|
||||
@ -32,9 +33,6 @@
|
||||
#include "utf8iter.h"
|
||||
#include "uproplist.h"
|
||||
|
||||
using std::tr1::unordered_set;
|
||||
using namespace std;
|
||||
|
||||
|
||||
/**
|
||||
* Splitting a text into words. The code in this file works with utf-8
|
||||
@ -60,9 +58,9 @@ static int charclasses[charclasses_size];
|
||||
// of Unicode properties, but seems to do the job well enough in most
|
||||
// common cases
|
||||
static vector<unsigned int> vpuncblocks;
|
||||
static unordered_set<unsigned int> spunc;
|
||||
static unordered_set<unsigned int> visiblewhite;
|
||||
static unordered_set<unsigned int> sskip;
|
||||
static STD_UNORDERED_SET<unsigned int> spunc;
|
||||
static STD_UNORDERED_SET<unsigned int> visiblewhite;
|
||||
static STD_UNORDERED_SET<unsigned int> sskip;
|
||||
|
||||
class CharClassInit {
|
||||
public:
|
||||
|
||||
21
src/common/unordered_defs.h
Normal file
21
src/common/unordered_defs.h
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
#include "autoconfig.h"
|
||||
|
||||
#ifdef HAVE_CXX0X_UNORDERED
|
||||
# include <unordered_map>
|
||||
# include <unordered_set>
|
||||
using std::tr1::unordered_map;
|
||||
using std::tr1::unordered_set;
|
||||
#define STD_UNORDERED_MAP std::unordered_map
|
||||
#define STD_UNORDERED_SET std::unordered_set
|
||||
#elif defined(HAVE_TR1_UNORDERED)
|
||||
# include <tr1/unordered_map>
|
||||
# include <tr1/unordered_set>
|
||||
#define STD_UNORDERED_MAP std::tr1::unordered_map
|
||||
#define STD_UNORDERED_SET std::tr1::unordered_set
|
||||
#else
|
||||
# include <map>
|
||||
# include <set>
|
||||
#define STD_UNORDERED_MAP std::map
|
||||
#define STD_UNORDERED_SET std::set
|
||||
#endif
|
||||
491
src/configure
vendored
491
src/configure
vendored
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for Recoll 1.20.0.
|
||||
# Generated by GNU Autoconf 2.69 for Recoll 1.19.7.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@ -577,8 +577,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='Recoll'
|
||||
PACKAGE_TARNAME='recoll'
|
||||
PACKAGE_VERSION='1.20.0'
|
||||
PACKAGE_STRING='Recoll 1.20.0'
|
||||
PACKAGE_VERSION='1.19.7'
|
||||
PACKAGE_STRING='Recoll 1.19.7'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@ -650,7 +650,6 @@ X_EXTRA_LIBS
|
||||
X_LIBS
|
||||
X_PRE_LIBS
|
||||
X_CFLAGS
|
||||
CXXCPP
|
||||
XMKMF
|
||||
QMAKEPATH
|
||||
XAPIAN_CONFIG2
|
||||
@ -658,6 +657,7 @@ XAPIAN_CONFIG1
|
||||
XAPIAN_CONFIG0
|
||||
aspellProg
|
||||
fileProg
|
||||
CXXCPP
|
||||
EGREP
|
||||
GREP
|
||||
CPP
|
||||
@ -740,8 +740,8 @@ CCC
|
||||
CC
|
||||
CFLAGS
|
||||
CPP
|
||||
XMKMF
|
||||
CXXCPP'
|
||||
CXXCPP
|
||||
XMKMF'
|
||||
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@ -1282,7 +1282,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures Recoll 1.20.0 to adapt to many kinds of systems.
|
||||
\`configure' configures Recoll 1.19.7 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@ -1347,7 +1347,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of Recoll 1.20.0:";;
|
||||
short | recursive ) echo "Configuration of Recoll 1.19.7:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@ -1407,8 +1407,8 @@ Some influential environment variables:
|
||||
CC C compiler command
|
||||
CFLAGS C compiler flags
|
||||
CPP C preprocessor
|
||||
XMKMF Path to xmkmf, Makefile generator for X Window System
|
||||
CXXCPP C++ preprocessor
|
||||
XMKMF Path to xmkmf, Makefile generator for X Window System
|
||||
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
@ -1476,7 +1476,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
Recoll configure 1.20.0
|
||||
Recoll configure 1.19.7
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@ -1763,6 +1763,130 @@ $as_echo "$ac_res" >&6; }
|
||||
|
||||
} # ac_fn_c_check_header_compile
|
||||
|
||||
# ac_fn_cxx_try_cpp LINENO
|
||||
# ------------------------
|
||||
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
|
||||
ac_fn_cxx_try_cpp ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
if { { ac_try="$ac_cpp conftest.$ac_ext"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo"; } >&5
|
||||
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
|
||||
ac_status=$?
|
||||
if test -s conftest.err; then
|
||||
grep -v '^ *+' conftest.err >conftest.er1
|
||||
cat conftest.er1 >&5
|
||||
mv -f conftest.er1 conftest.err
|
||||
fi
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; } > conftest.i && {
|
||||
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
}; then :
|
||||
ac_retval=0
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_retval=1
|
||||
fi
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
as_fn_set_status $ac_retval
|
||||
|
||||
} # ac_fn_cxx_try_cpp
|
||||
|
||||
# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
|
||||
# ---------------------------------------------------------
|
||||
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
|
||||
# the include files in INCLUDES and setting the cache variable VAR
|
||||
# accordingly.
|
||||
ac_fn_cxx_check_header_mongrel ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
if eval \${$3+:} false; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if eval \${$3+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
else
|
||||
# Is the header compilable?
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
|
||||
$as_echo_n "checking $2 usability... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
ac_header_compiler=yes
|
||||
else
|
||||
ac_header_compiler=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
|
||||
$as_echo "$ac_header_compiler" >&6; }
|
||||
|
||||
# Is the header present?
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
|
||||
$as_echo_n "checking $2 presence... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
ac_header_preproc=yes
|
||||
else
|
||||
ac_header_preproc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
|
||||
$as_echo "$ac_header_preproc" >&6; }
|
||||
|
||||
# So? What about this header?
|
||||
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
|
||||
yes:no: )
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||
;;
|
||||
no:yes:* )
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
|
||||
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
|
||||
$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
|
||||
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
|
||||
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||
;;
|
||||
esac
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if eval \${$3+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
eval "$3=\$ac_header_compiler"
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
fi
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
|
||||
} # ac_fn_cxx_check_header_mongrel
|
||||
|
||||
# ac_fn_c_try_link LINENO
|
||||
# -----------------------
|
||||
# Try to link conftest.$ac_ext, and return whether this succeeded.
|
||||
@ -1922,43 +2046,6 @@ fi
|
||||
|
||||
} # ac_fn_cxx_try_link
|
||||
|
||||
# ac_fn_cxx_try_cpp LINENO
|
||||
# ------------------------
|
||||
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
|
||||
ac_fn_cxx_try_cpp ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
if { { ac_try="$ac_cpp conftest.$ac_ext"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo"; } >&5
|
||||
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
|
||||
ac_status=$?
|
||||
if test -s conftest.err; then
|
||||
grep -v '^ *+' conftest.err >conftest.er1
|
||||
cat conftest.er1 >&5
|
||||
mv -f conftest.er1 conftest.err
|
||||
fi
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; } > conftest.i && {
|
||||
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
}; then :
|
||||
ac_retval=0
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_retval=1
|
||||
fi
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
as_fn_set_status $ac_retval
|
||||
|
||||
} # ac_fn_cxx_try_cpp
|
||||
|
||||
# ac_fn_cxx_check_func LINENO FUNC VAR
|
||||
# ------------------------------------
|
||||
# Tests whether FUNC exists, setting the cache variable VAR accordingly
|
||||
@ -2029,7 +2116,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by Recoll $as_me 1.20.0, which was
|
||||
It was created by Recoll $as_me 1.19.7, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@ -4069,6 +4156,171 @@ fi
|
||||
done
|
||||
|
||||
|
||||
# Check for where to find unordered_map etc.
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
|
||||
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
|
||||
if test -z "$CXXCPP"; then
|
||||
if ${ac_cv_prog_CXXCPP+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
# Double quotes because CXXCPP needs to be expanded
|
||||
for CXXCPP in "$CXX -E" "/lib/cpp"
|
||||
do
|
||||
ac_preproc_ok=false
|
||||
for ac_cxx_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
|
||||
else
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.i conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
ac_cv_prog_CXXCPP=$CXXCPP
|
||||
|
||||
fi
|
||||
CXXCPP=$ac_cv_prog_CXXCPP
|
||||
else
|
||||
ac_cv_prog_CXXCPP=$CXXCPP
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
|
||||
$as_echo "$CXXCPP" >&6; }
|
||||
ac_preproc_ok=false
|
||||
for ac_cxx_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
|
||||
else
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.i conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
|
||||
else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
|
||||
ac_fn_cxx_check_header_mongrel "$LINENO" "tr1/unordered_map" "ac_cv_header_tr1_unordered_map" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_tr1_unordered_map" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_TR1_UNORDERED /**/" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
ac_fn_cxx_check_header_mongrel "$LINENO" "unordered_map" "ac_cv_header_unordered_map" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_unordered_map" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_CXX0X_UNORDERED /**/" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
for ac_header in sys/mount.h sys/statfs.h sys/statvfs.h sys/vfs.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
@ -4471,8 +4723,7 @@ for dir in ${libdir} /opt/local/lib /usr/local/lib;do
|
||||
CPPFLAGS="$S_CPPFLAGS -I$dir/../include"
|
||||
|
||||
LIBS="$S_LIBS -L$dir"
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
@ -4968,141 +5219,7 @@ if test X$withInotify = Xno -a X$withFam = Xno ; then
|
||||
fi
|
||||
|
||||
if test "$enableX11mon" = "yes" ; then
|
||||
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
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
|
||||
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
|
||||
if test -z "$CXXCPP"; then
|
||||
if ${ac_cv_prog_CXXCPP+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
# Double quotes because CXXCPP needs to be expanded
|
||||
for CXXCPP in "$CXX -E" "/lib/cpp"
|
||||
do
|
||||
ac_preproc_ok=false
|
||||
for ac_cxx_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
|
||||
else
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.i conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
ac_cv_prog_CXXCPP=$CXXCPP
|
||||
|
||||
fi
|
||||
CXXCPP=$ac_cv_prog_CXXCPP
|
||||
else
|
||||
ac_cv_prog_CXXCPP=$CXXCPP
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
|
||||
$as_echo "$CXXCPP" >&6; }
|
||||
ac_preproc_ok=false
|
||||
for ac_cxx_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
|
||||
else
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.i conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
|
||||
else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
|
||||
$as_echo_n "checking for X... " >&6; }
|
||||
|
||||
|
||||
@ -6367,7 +6484,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by Recoll $as_me 1.20.0, which was
|
||||
This file was extended by Recoll $as_me 1.19.7, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@ -6429,7 +6546,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
Recoll config.status 1.20.0
|
||||
Recoll config.status 1.19.7
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
@ -32,6 +32,14 @@ AC_SYS_LARGEFILE
|
||||
# OpenBSD needs sys/param.h for mount.h to compile
|
||||
AC_CHECK_HEADERS([sys/param.h])
|
||||
|
||||
# Check for where to find unordered_map etc.
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_CHECK_HEADER(tr1/unordered_map,[AC_DEFINE([HAVE_TR1_UNORDERED],
|
||||
[],["Have tr1"])],[])
|
||||
AC_CHECK_HEADER(unordered_map,[AC_DEFINE([HAVE_CXX0X_UNORDERED],
|
||||
[],["Have C++0x"])],[])
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/statvfs.h sys/vfs.h], [], [],
|
||||
[#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
|
||||
@ -19,8 +19,7 @@
|
||||
#include <math.h>
|
||||
|
||||
#include <map>
|
||||
#include <tr1/unordered_set>
|
||||
using std::tr1::unordered_set;
|
||||
#include "unordered_defs.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -362,7 +361,7 @@ int Query::Native::makeAbstract(Xapian::docid docid,
|
||||
map<unsigned int, string> sparseDoc;
|
||||
// Also remember apart the search term positions so that we can list
|
||||
// them with their snippets.
|
||||
unordered_set<unsigned int> searchTermPositions;
|
||||
STD_UNORDERED_SET<unsigned int> searchTermPositions;
|
||||
|
||||
// Remember max position. Used to stop walking positions lists while
|
||||
// populating the adjacent slots.
|
||||
|
||||
@ -31,9 +31,9 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <tr1/unordered_map>
|
||||
#include "unordered_defs.h"
|
||||
using std::string;
|
||||
using std::tr1::unordered_map;
|
||||
|
||||
#include "smallut.h"
|
||||
|
||||
/*
|
||||
@ -42,10 +42,10 @@ using std::tr1::unordered_map;
|
||||
instead according to some local rule. There will usually be very
|
||||
few of them, but they must be looked up for every translated char.
|
||||
*/
|
||||
unordered_map<unsigned short, string> except_trans;
|
||||
STD_UNORDERED_MAP<unsigned short, string> except_trans;
|
||||
static inline bool is_except_char(unsigned short c, string& trans)
|
||||
{
|
||||
unordered_map<unsigned short, string>::const_iterator it
|
||||
STD_UNORDERED_MAP<unsigned short, string>::const_iterator it
|
||||
= except_trans.find(c);
|
||||
if (it == except_trans.end())
|
||||
return false;
|
||||
|
||||
@ -34,8 +34,7 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <tr1/unordered_map>
|
||||
using std::tr1::unordered_map;
|
||||
#include "unordered_defs.h"
|
||||
using namespace std;
|
||||
|
||||
#include "smallut.h"
|
||||
@ -1157,14 +1156,14 @@ static const char *vlang_to_code[] = {
|
||||
|
||||
string langtocode(const string& lang)
|
||||
{
|
||||
static unordered_map<string, string> lang_to_code;
|
||||
static STD_UNORDERED_MAP<string, string> lang_to_code;
|
||||
if (lang_to_code.empty()) {
|
||||
for (unsigned int i = 0;
|
||||
i < sizeof(vlang_to_code) / sizeof(char *); i += 2) {
|
||||
lang_to_code[vlang_to_code[i]] = vlang_to_code[i+1];
|
||||
}
|
||||
}
|
||||
unordered_map<string,string>::const_iterator it =
|
||||
STD_UNORDERED_MAP<string,string>::const_iterator it =
|
||||
lang_to_code.find(lang);
|
||||
|
||||
// Use cp1252 by default...
|
||||
|
||||
@ -22,10 +22,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <queue>
|
||||
#include <tr1/unordered_map>
|
||||
#include <tr1/unordered_set>
|
||||
using std::tr1::unordered_map;
|
||||
using std::tr1::unordered_set;
|
||||
#include "unordered_defs.h"
|
||||
using std::queue;
|
||||
using std::string;
|
||||
|
||||
@ -216,7 +213,7 @@ public:
|
||||
// Perform the thread joins and compute overall status
|
||||
// Workers return (void*)1 if ok
|
||||
void *statusall = (void*)1;
|
||||
unordered_map<pthread_t, WQTData>::iterator it;
|
||||
STD_UNORDERED_MAP<pthread_t, WQTData>::iterator it;
|
||||
while (!m_worker_threads.empty()) {
|
||||
void *status;
|
||||
it = m_worker_threads.begin();
|
||||
@ -333,7 +330,7 @@ private:
|
||||
|
||||
// Per-thread data. The data is not used currently, this could be
|
||||
// a set<pthread_t>
|
||||
unordered_map<pthread_t, WQTData> m_worker_threads;
|
||||
STD_UNORDERED_MAP<pthread_t, WQTData> m_worker_threads;
|
||||
|
||||
// Synchronization
|
||||
queue<T> m_queue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user