From aff65d54ac48e781e863cd0cd5457a904f71c031 Mon Sep 17 00:00:00 2001 From: dockes Date: Mon, 24 Nov 2008 15:47:40 +0000 Subject: [PATCH] make it easier to maintain the kio cmake by moving as much stuff as possible to autoconfig.h, merging libmime and librcl etc. --- src/Makefile.in | 7 +- src/aspell/Makefile | 3 - src/common/Makefile | 4 +- src/common/autoconfig.h.in | 5 + src/common/rclconfig.h | 4 +- src/configure | 1210 ++++++++++++++++++++++++++++++------ src/configure.ac | 2 + src/index/Makefile | 5 +- src/internfile/Makefile | 6 +- src/lib/Makefile | 68 +- src/lib/mkMake | 50 +- src/mk/Darwin | 3 +- src/mk/FreeBSD | 4 +- src/mk/OpenBSD | 3 +- src/mk/SunOS | 3 +- src/mk/commondefs | 1 - src/qt4gui/recoll.pro.in | 3 +- src/qtgui/recoll.pro.in | 3 +- src/query/Makefile | 6 +- src/unac/unac.c | 8 +- src/utils/pathut.cpp | 19 +- 21 files changed, 1167 insertions(+), 250 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index 5801fbd3..653633ff 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,4 +1,4 @@ -# @(#$Id: Makefile.in,v 1.15 2008-09-07 07:22:33 dockes Exp $ (C) 2005 J.F.Dockes +# @(#$Id: Makefile.in,v 1.16 2008-11-24 15:47:40 dockes Exp $ (C) 2005 J.F.Dockes prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -13,7 +13,6 @@ QTGUI = @QTGUI@ all: mk/sysconf common/rclversion.h cd lib; ${MAKE} - cd bincimapmime; ${MAKE} cd index; ${MAKE} recollindex cd $(QTGUI); ${QMAKE} recoll.pro; ${MAKE} depth=.. @@ -26,7 +25,6 @@ common/rclversion.h: VERSION static: mk/sysconf common/rclversion.h cd lib; ${MAKE} - cd bincimapmime; ${MAKE} cd index; rm -f recollindex; \ ${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic recollindex cd $(QTGUI); $(QMAKE) recoll.pro; \ @@ -38,7 +36,6 @@ clean: -cd index; ${MAKE} clean -cd internfile; ${MAKE} clean -cd lib; ${MAKE} clean - -cd bincimapmime; ${MAKE} clean -cd query; ${MAKE} clean -cd utils; ${MAKE} clean #cd doc/user; ${MAKE} clean @@ -59,7 +56,7 @@ distclean: clean recollinstall \ lib/*.dep common/autoconfig.h \ wasabi/Makefile wasabi/client/Makefile wasabi/server/Makefile - rm -f bincimapmime/alldeps index/alldeps lib/alldeps query/alldeps + rm -f index/alldeps lib/alldeps query/alldeps rm -rf autom4te.cache (cd qt4gui; make -f uifrom3 distclean) diff --git a/src/aspell/Makefile b/src/aspell/Makefile index 140cc39d..bdbe5cd7 100644 --- a/src/aspell/Makefile +++ b/src/aspell/Makefile @@ -18,9 +18,6 @@ $(BIGLIB): force cd $(depth)/lib;$(MAKE) force: -$(MIMELIB): - cd $(depth)/bincimapmime;$(MAKE) - depend: alldeps.stamp alldeps.stamp : $(SRCS) $(CXX) -M $(ALL_CXXFLAGS) $(SRCS) > alldeps diff --git a/src/common/Makefile b/src/common/Makefile index 32db5d44..0d14f629 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -1,4 +1,4 @@ -# @(#$Id: Makefile,v 1.14 2006-11-20 11:17:53 dockes Exp $ (C) 2005 J.F.Dockes +# @(#$Id: Makefile,v 1.15 2008-11-24 15:47:40 dockes Exp $ (C) 2005 J.F.Dockes depth = .. include $(depth)/mk/sysconf @@ -25,7 +25,7 @@ trtextsplit.o : textsplit.cpp $(CXX) $(ALL_CXXFLAGS) -DTEST_TEXTSPLIT -c -o trtextsplit.o \ textsplit.cpp -RCLCONFIG_OBJS= trrclconfig.o $(BIGLIB) $(MIMELIB) +RCLCONFIG_OBJS= trrclconfig.o $(BIGLIB) rclconfig : $(RCLCONFIG_OBJS) $(CXX) $(ALL_CXXFLAGS) -o rclconfig $(RCLCONFIG_OBJS) \ $(LIBICONV) $(LIBSYS) diff --git a/src/common/autoconfig.h.in b/src/common/autoconfig.h.in index e5bc60b5..34ceb011 100644 --- a/src/common/autoconfig.h.in +++ b/src/common/autoconfig.h.in @@ -29,3 +29,8 @@ /* mkdtemp availability */ #undef HAVE_MKDTEMP + +#undef HAVE_SYS_MOUNT_H +#undef HAVE_SYS_STATFS_H +#undef HAVE_SYS_STATVFS_H +#undef HAVE_SYS_VFS_H diff --git a/src/common/rclconfig.h b/src/common/rclconfig.h index 0aed8691..2c2fd727 100644 --- a/src/common/rclconfig.h +++ b/src/common/rclconfig.h @@ -16,7 +16,7 @@ */ #ifndef _RCLCONFIG_H_INCLUDED_ #define _RCLCONFIG_H_INCLUDED_ -/* @(#$Id: rclconfig.h,v 1.42 2008-10-08 16:15:22 dockes Exp $ (C) 2004 J.F.Dockes */ +/* @(#$Id: rclconfig.h,v 1.43 2008-11-24 15:47:40 dockes Exp $ (C) 2004 J.F.Dockes */ #include #include @@ -64,6 +64,8 @@ class RclConfig { /** Return the directory where this configuration is stored */ string getConfDir() {return m_confdir;} + /** Get the local value for /usr/local/share/recoll/ */ + const string& getDatadir() {return m_datadir;} /** Set current directory reference, and fetch automatic parameters. */ void setKeyDir(const string &dir); diff --git a/src/configure b/src/configure index d7cfea13..043b5f57 100755 --- a/src/configure +++ b/src/configure @@ -577,6 +577,42 @@ PACKAGE_STRING='Recoll 1.6' PACKAGE_BUGREPORT='' ac_unique_file="index/recollindex.cpp" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME @@ -614,7 +650,6 @@ LIBS build_alias host_alias target_alias -aspellProg CC CFLAGS LDFLAGS @@ -622,6 +657,10 @@ CPPFLAGS ac_ct_CC EXEEXT OBJEXT +CPP +GREP +EGREP +aspellProg CXX CXXFLAGS ac_ct_CXX @@ -653,6 +692,7 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CPP CXX CXXFLAGS CCC @@ -1250,6 +1290,7 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags XMKMF Path to xmkmf, Makefile generator for X Window System @@ -1702,196 +1743,6 @@ EOF exit 1 fi -# Use aspell to provide spelling expansions ? -# The default is yes. If we do find an aspell installation, we use it. Else -# we do compile the aspell module using an internal copy of aspell.h -# Only --with-aspell=no will completely disable aspell support - -# Check whether --with-aspell was given. -if test "${with_aspell+set}" = set; then - withval=$with_aspell; withAspell=$withval -else - withAspell=yes -fi - -case $withAspell in - no);; - yes) - # Extract the first word of "aspell", so it can be a program name with args. -set dummy aspell; 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_path_aspellProg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $aspellProg in - [\\/]* | ?:[\\/]*) - ac_cv_path_aspellProg="$aspellProg" # Let the user override the test with a path. - ;; - *) - 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_path_aspellProg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -aspellProg=$ac_cv_path_aspellProg -if test -n "$aspellProg"; then - { echo "$as_me:$LINENO: result: $aspellProg" >&5 -echo "${ECHO_T}$aspellProg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - ;; - *) # The argument should be the path to the aspell program - aspellProg=$withAspell - ;; -esac - -if test X$withAspell != Xno ; then - -cat >>confdefs.h <<\_ACEOF -#define RCL_USE_ASPELL 1 -_ACEOF - - if test X$aspellProg != X ; then - aspellBase=`dirname $aspellProg` - aspellBase=`dirname $aspellBase` - -cat >>confdefs.h <<_ACEOF -#define ASPELL_PROG "$aspellProg" -_ACEOF - - if test -f $aspellBase/include/aspell.h ; then - -cat >>confdefs.h <<_ACEOF -#define ASPELL_INCLUDE "$aspellBase/include/aspell.h" -_ACEOF - - else - { echo "$as_me:$LINENO: aspell support enabled but aspell package not found. Compiling with internal aspell interface file" >&5 -echo "$as_me: aspell support enabled but aspell package not found. Compiling with internal aspell interface file" >&6;} - cat >>confdefs.h <<\_ACEOF -#define ASPELL_INCLUDE "aspell-local.h" -_ACEOF - - fi - else - # aspell support enabled but no aspell install yet - { echo "$as_me:$LINENO: aspell support enabled but aspell package not found. Compiling with internal aspell interface file" >&5 -echo "$as_me: aspell support enabled but aspell package not found. Compiling with internal aspell interface file" >&6;} - cat >>confdefs.h <<\_ACEOF -#define ASPELL_INCLUDE "aspell-local.h" -_ACEOF - - fi -fi - -# Real time monitoring with FAM - -# Check whether --with-fam was given. -if test "${with_fam+set}" = set; then - withval=$with_fam; withFam=$withval -else - withFam=no -fi - -case $withFam in - no);; - yes) - for dir in /usr/local/lib ${libdir};do - if test -f $dir/libfam.so ; then famLib=$dir/libfam.so;break;fi - done - ;; - *) # The argument should be the path to the fam library - famLib=$withFam - ;; -esac - -if test X$withFam != Xno ; then - -cat >>confdefs.h <<\_ACEOF -#define RCL_MONITOR 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define RCL_USE_FAM 1 -_ACEOF - - if test X$famLib != X ; then - famLibDir=`dirname $famLib` - famBase=`dirname $famLibDir` - famBLib=`basename $famLib .so | sed -e s/lib//` - if test ! -f $famBase/include/fam.h ; then - { { echo "$as_me:$LINENO: error: fam.h not found in $famBase/include. Specify --with-fam=no to disable fam support" >&5 -echo "$as_me: error: fam.h not found in $famBase/include. Specify --with-fam=no to disable fam support" >&2;} - { (exit 1); exit 1; }; } - fi - LIBFAM="-L$famLibDir -l$famBLib" - { echo "$as_me:$LINENO: fam library directive: $LIBFAM" >&5 -echo "$as_me: fam library directive: $LIBFAM" >&6;} - -cat >>confdefs.h <<_ACEOF -#define FAM_INCLUDE "$famBase/include/fam.h" -_ACEOF - - else - { { echo "$as_me:$LINENO: error: fam library not found" >&5 -echo "$as_me: error: fam library not found" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -if test -f /usr/include/sys/inotify.h -a X$withFam = Xno ; then - inot_default=yes -else - inot_default=no -fi - -# Real time monitoring with inotify - -# Check whether --with-inotify was given. -if test "${with_inotify+set}" = set; then - withval=$with_inotify; withInotify=$withval -else - withInotify=$inot_default -fi - - -if test X$withInotify != Xno ; then - { echo "$as_me:$LINENO: enabled support for inotify monitoring" >&5 -echo "$as_me: enabled support for inotify monitoring" >&6;} - -cat >>confdefs.h <<\_ACEOF -#define RCL_MONITOR 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define RCL_USE_INOTIFY 1 -_ACEOF - -else - { echo "$as_me:$LINENO: inotify monitoring disabled" >&5 -echo "$as_me: inotify monitoring disabled" >&6;} -fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2812,6 +2663,976 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +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 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +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 + + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + 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_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f 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>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (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_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_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_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + +for ac_header in sys/mount.h sys/statfs.h sys/statvfs.h sys/vfs.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_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_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# Use aspell to provide spelling expansions ? +# The default is yes. If we do find an aspell installation, we use it. Else +# we do compile the aspell module using an internal copy of aspell.h +# Only --with-aspell=no will completely disable aspell support + +# Check whether --with-aspell was given. +if test "${with_aspell+set}" = set; then + withval=$with_aspell; withAspell=$withval +else + withAspell=yes +fi + +case $withAspell in + no);; + yes) + # Extract the first word of "aspell", so it can be a program name with args. +set dummy aspell; 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_path_aspellProg+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $aspellProg in + [\\/]* | ?:[\\/]*) + ac_cv_path_aspellProg="$aspellProg" # Let the user override the test with a path. + ;; + *) + 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_path_aspellProg="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +aspellProg=$ac_cv_path_aspellProg +if test -n "$aspellProg"; then + { echo "$as_me:$LINENO: result: $aspellProg" >&5 +echo "${ECHO_T}$aspellProg" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + ;; + *) # The argument should be the path to the aspell program + aspellProg=$withAspell + ;; +esac + +if test X$withAspell != Xno ; then + +cat >>confdefs.h <<\_ACEOF +#define RCL_USE_ASPELL 1 +_ACEOF + + if test X$aspellProg != X ; then + aspellBase=`dirname $aspellProg` + aspellBase=`dirname $aspellBase` + +cat >>confdefs.h <<_ACEOF +#define ASPELL_PROG "$aspellProg" +_ACEOF + + if test -f $aspellBase/include/aspell.h ; then + +cat >>confdefs.h <<_ACEOF +#define ASPELL_INCLUDE "$aspellBase/include/aspell.h" +_ACEOF + + else + { echo "$as_me:$LINENO: aspell support enabled but aspell package not found. Compiling with internal aspell interface file" >&5 +echo "$as_me: aspell support enabled but aspell package not found. Compiling with internal aspell interface file" >&6;} + cat >>confdefs.h <<\_ACEOF +#define ASPELL_INCLUDE "aspell-local.h" +_ACEOF + + fi + else + # aspell support enabled but no aspell install yet + { echo "$as_me:$LINENO: aspell support enabled but aspell package not found. Compiling with internal aspell interface file" >&5 +echo "$as_me: aspell support enabled but aspell package not found. Compiling with internal aspell interface file" >&6;} + cat >>confdefs.h <<\_ACEOF +#define ASPELL_INCLUDE "aspell-local.h" +_ACEOF + + fi +fi + +# Real time monitoring with FAM + +# Check whether --with-fam was given. +if test "${with_fam+set}" = set; then + withval=$with_fam; withFam=$withval +else + withFam=no +fi + +case $withFam in + no);; + yes) + for dir in /usr/local/lib ${libdir};do + if test -f $dir/libfam.so ; then famLib=$dir/libfam.so;break;fi + done + ;; + *) # The argument should be the path to the fam library + famLib=$withFam + ;; +esac + +if test X$withFam != Xno ; then + +cat >>confdefs.h <<\_ACEOF +#define RCL_MONITOR 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define RCL_USE_FAM 1 +_ACEOF + + if test X$famLib != X ; then + famLibDir=`dirname $famLib` + famBase=`dirname $famLibDir` + famBLib=`basename $famLib .so | sed -e s/lib//` + if test ! -f $famBase/include/fam.h ; then + { { echo "$as_me:$LINENO: error: fam.h not found in $famBase/include. Specify --with-fam=no to disable fam support" >&5 +echo "$as_me: error: fam.h not found in $famBase/include. Specify --with-fam=no to disable fam support" >&2;} + { (exit 1); exit 1; }; } + fi + LIBFAM="-L$famLibDir -l$famBLib" + { echo "$as_me:$LINENO: fam library directive: $LIBFAM" >&5 +echo "$as_me: fam library directive: $LIBFAM" >&6;} + +cat >>confdefs.h <<_ACEOF +#define FAM_INCLUDE "$famBase/include/fam.h" +_ACEOF + + else + { { echo "$as_me:$LINENO: error: fam library not found" >&5 +echo "$as_me: error: fam library not found" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +if test -f /usr/include/sys/inotify.h -a X$withFam = Xno ; then + inot_default=yes +else + inot_default=no +fi + +# Real time monitoring with inotify + +# Check whether --with-inotify was given. +if test "${with_inotify+set}" = set; then + withval=$with_inotify; withInotify=$withval +else + withInotify=$inot_default +fi + + +if test X$withInotify != Xno ; then + { echo "$as_me:$LINENO: enabled support for inotify monitoring" >&5 +echo "$as_me: enabled support for inotify monitoring" >&6;} + +cat >>confdefs.h <<\_ACEOF +#define RCL_MONITOR 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define RCL_USE_INOTIFY 1 +_ACEOF + +else + { echo "$as_me:$LINENO: inotify monitoring disabled" >&5 +echo "$as_me: inotify monitoring disabled" >&6;} +fi + for ac_func in mkdtemp do @@ -6110,7 +6931,6 @@ LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim -aspellProg!$aspellProg$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim @@ -6118,6 +6938,10 @@ CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +aspellProg!$aspellProg$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim @@ -6142,7 +6966,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 67; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 70; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/src/configure.ac b/src/configure.ac index e97f2aa1..ded83238 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -15,6 +15,8 @@ EOF exit 1 fi +AC_CHECK_HEADERS(sys/mount.h sys/statfs.h sys/statvfs.h sys/vfs.h) + # Use aspell to provide spelling expansions ? # The default is yes. If we do find an aspell installation, we use it. Else # we do compile the aspell module using an internal copy of aspell.h diff --git a/src/index/Makefile b/src/index/Makefile index 46f58f6b..46d3b4f1 100644 --- a/src/index/Makefile +++ b/src/index/Makefile @@ -6,7 +6,7 @@ SRCS = recollindex.cpp rclmonrcv.cpp rclmonprc.cpp all: depend $(PROGS) $(BIGLIB) -RECOLLINDEX_OBJS= recollindex.o rclmonrcv.o rclmonprc.o $(BIGLIB) $(MIMELIB) +RECOLLINDEX_OBJS= recollindex.o rclmonrcv.o rclmonprc.o $(BIGLIB) recollindex : $(RECOLLINDEX_OBJS) $(CXX) $(ALL_CXXFLAGS) -o recollindex $(RECOLLINDEX_OBJS) \ $(BSTATIC) $(LIBXAPIAN) $(LIBICONV) $(BDYNAMIC) \ @@ -40,9 +40,6 @@ $(BIGLIB): force cd $(depth)/lib;$(MAKE) force: -$(MIMELIB): - cd $(depth)/bincimapmime;$(MAKE) - depend: alldeps.stamp alldeps.stamp : $(SRCS) $(CXX) -M $(ALL_CXXFLAGS) $(SRCS) > alldeps diff --git a/src/internfile/Makefile b/src/internfile/Makefile index abbf7e1f..49a6ab73 100644 --- a/src/internfile/Makefile +++ b/src/internfile/Makefile @@ -1,4 +1,4 @@ -# @(#$Id: Makefile,v 1.3 2007-10-03 14:53:37 dockes Exp $ (C) 2005 J.F.Dockes +# @(#$Id: Makefile,v 1.4 2008-11-24 15:47:40 dockes Exp $ (C) 2005 J.F.Dockes depth = .. include $(depth)/mk/sysconf @@ -11,7 +11,7 @@ $(BIGLIB): force cd $(depth)/lib;$(MAKE) force: -INTERNFILE_OBJS= trinternfile.o $(BIGLIB) $(MIMELIB) +INTERNFILE_OBJS= trinternfile.o $(BIGLIB) internfile : $(INTERNFILE_OBJS) $(CXX) $(ALL_CXXFLAGS) -o internfile $(INTERNFILE_OBJS) \ $(LIBICONV) $(LIBSYS) @@ -19,7 +19,7 @@ trinternfile.o : internfile.cpp $(CXX) $(ALL_CXXFLAGS) -DTEST_INTERNFILE -c -o trinternfile.o \ internfile.cpp -MH_MBOX_OBJS= trmh_mbox.o $(BIGLIB) $(MIMELIB) +MH_MBOX_OBJS= trmh_mbox.o $(BIGLIB) mh_mbox : $(MH_MBOX_OBJS) $(CXX) $(ALL_CXXFLAGS) -o mh_mbox $(MH_MBOX_OBJS) \ $(LIBICONV) $(LIBSYS) diff --git a/src/lib/Makefile b/src/lib/Makefile index 51e726a8..1ab2c172 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -2,21 +2,19 @@ depth = .. include $(depth)/mk/sysconf -UNACCFLAGS = $(CFLAGS) -g -I. -I$(depth)/unac $(INCICONV) -DUNAC_VERSION=\"1.0.7\" - LIBS = librcl.a all: $(LIBS) -OBJS = rclaspell.o rclconfig.o rclinit.o textsplit.o unacpp.o csguess.o indexer.o mimetype.o htmlparse.o myhtmlparse.o mimehandler.o internfile.o mh_exec.o mh_html.o mh_mail.o mh_mbox.o mh_text.o docseq.o docseqdb.o docseqhist.o filtseq.o history.o plaintorich.o recollq.o reslistpager.o sortseq.o wasastringtoquery.o wasatorcl.o pathhash.o rcldb.o rcldoc.o rclquery.o searchdata.o stemdb.o stoplist.o base64.o conftree.o copyfile.o debuglog.o execmd.o fstreewalk.o idfile.o fileudi.o md5.o mimeparse.o pathut.o readfile.o smallut.o transcode.o wipedir.o x11mon.o -DEPS = rclaspell.dep.stamp rclconfig.dep.stamp rclinit.dep.stamp textsplit.dep.stamp unacpp.dep.stamp csguess.dep.stamp indexer.dep.stamp mimetype.dep.stamp htmlparse.dep.stamp myhtmlparse.dep.stamp mimehandler.dep.stamp internfile.dep.stamp mh_exec.dep.stamp mh_html.dep.stamp mh_mail.dep.stamp mh_mbox.dep.stamp mh_text.dep.stamp docseq.dep.stamp docseqdb.dep.stamp docseqhist.dep.stamp filtseq.dep.stamp history.dep.stamp plaintorich.dep.stamp recollq.dep.stamp reslistpager.dep.stamp sortseq.dep.stamp wasastringtoquery.dep.stamp wasatorcl.dep.stamp pathhash.dep.stamp rcldb.dep.stamp rcldoc.dep.stamp rclquery.dep.stamp searchdata.dep.stamp stemdb.dep.stamp stoplist.dep.stamp base64.dep.stamp conftree.dep.stamp copyfile.dep.stamp debuglog.dep.stamp execmd.dep.stamp fstreewalk.dep.stamp idfile.dep.stamp fileudi.dep.stamp md5.dep.stamp mimeparse.dep.stamp pathut.dep.stamp readfile.dep.stamp smallut.dep.stamp transcode.dep.stamp wipedir.dep.stamp x11mon.dep.stamp +OBJS = rclaspell.o rclconfig.o rclinit.o textsplit.o unacpp.o csguess.o indexer.o mimetype.o htmlparse.o myhtmlparse.o mimehandler.o internfile.o mh_exec.o mh_html.o mh_mail.o mh_mbox.o mh_text.o docseq.o docseqdb.o docseqhist.o filtseq.o history.o plaintorich.o recollq.o reslistpager.o sortseq.o wasastringtoquery.o wasatorcl.o pathhash.o rcldb.o rcldoc.o rclquery.o searchdata.o stemdb.o stoplist.o base64.o conftree.o copyfile.o debuglog.o execmd.o fstreewalk.o idfile.o fileudi.o md5.o mimeparse.o pathut.o readfile.o smallut.o transcode.o wipedir.o x11mon.o mime-getpart.o mime-parsefull.o mime-parseonlyheader.o mime-printbody.o mime-printdoc.o mime-printheader.o mime.o convert.o iodevice.o iofactory.o +DEPS = rclaspell.dep.stamp rclconfig.dep.stamp rclinit.dep.stamp textsplit.dep.stamp unacpp.dep.stamp csguess.dep.stamp indexer.dep.stamp mimetype.dep.stamp htmlparse.dep.stamp myhtmlparse.dep.stamp mimehandler.dep.stamp internfile.dep.stamp mh_exec.dep.stamp mh_html.dep.stamp mh_mail.dep.stamp mh_mbox.dep.stamp mh_text.dep.stamp docseq.dep.stamp docseqdb.dep.stamp docseqhist.dep.stamp filtseq.dep.stamp history.dep.stamp plaintorich.dep.stamp recollq.dep.stamp reslistpager.dep.stamp sortseq.dep.stamp wasastringtoquery.dep.stamp wasatorcl.dep.stamp pathhash.dep.stamp rcldb.dep.stamp rcldoc.dep.stamp rclquery.dep.stamp searchdata.dep.stamp stemdb.dep.stamp stoplist.dep.stamp base64.dep.stamp conftree.dep.stamp copyfile.dep.stamp debuglog.dep.stamp execmd.dep.stamp fstreewalk.dep.stamp idfile.dep.stamp fileudi.dep.stamp md5.dep.stamp mimeparse.dep.stamp pathut.dep.stamp readfile.dep.stamp smallut.dep.stamp transcode.dep.stamp wipedir.dep.stamp x11mon.dep.stamp mime-getpart.dep.stamp mime-parsefull.dep.stamp mime-parseonlyheader.dep.stamp mime-printbody.dep.stamp mime-printdoc.dep.stamp mime-printheader.dep.stamp mime.dep.stamp convert.dep.stamp iodevice.dep.stamp iofactory.dep.stamp librcl.a : $(DEPS) $(OBJS) unac.o ar ru librcl.a $(OBJS) unac.o $(RANLIB) librcl.a unac.o : $(depth)/unac/unac.c $(depth)/unac/unac.h - $(CC) $(UNACCFLAGS) -c $(depth)/unac/unac.c + $(CC) $(ALL_CXXFLAGS) -c $(depth)/unac/unac.c rclaspell.o : ../aspell/rclaspell.cpp $(CXX) $(ALL_CXXFLAGS) -c ../aspell/rclaspell.cpp rclconfig.o : ../common/rclconfig.cpp @@ -119,6 +117,26 @@ wipedir.o : ../utils/wipedir.cpp $(CXX) $(ALL_CXXFLAGS) -c ../utils/wipedir.cpp x11mon.o : ../utils/x11mon.cpp $(CXX) $(ALL_CXXFLAGS) -c ../utils/x11mon.cpp +mime-getpart.o : ../bincimapmime/mime-getpart.cc + $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-getpart.cc +mime-parsefull.o : ../bincimapmime/mime-parsefull.cc + $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-parsefull.cc +mime-parseonlyheader.o : ../bincimapmime/mime-parseonlyheader.cc + $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-parseonlyheader.cc +mime-printbody.o : ../bincimapmime/mime-printbody.cc + $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-printbody.cc +mime-printdoc.o : ../bincimapmime/mime-printdoc.cc + $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-printdoc.cc +mime-printheader.o : ../bincimapmime/mime-printheader.cc + $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-printheader.cc +mime.o : ../bincimapmime/mime.cc + $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime.cc +convert.o : ../bincimapmime/convert.cc + $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/convert.cc +iodevice.o : ../bincimapmime/iodevice.cc + $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/iodevice.cc +iofactory.o : ../bincimapmime/iofactory.cc + $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/iofactory.cc depend: $(DEPS) clean: rm -f $(OBJS) $(LIBS) $(DEPS) unac.o @@ -329,3 +347,43 @@ include smallut.dep include transcode.dep include wipedir.dep include x11mon.dep +mime-getpart.dep.stamp : ../bincimapmime/mime-getpart.cc + $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-getpart.cc > mime-getpart.dep + touch mime-getpart.dep.stamp +mime-parsefull.dep.stamp : ../bincimapmime/mime-parsefull.cc + $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-parsefull.cc > mime-parsefull.dep + touch mime-parsefull.dep.stamp +mime-parseonlyheader.dep.stamp : ../bincimapmime/mime-parseonlyheader.cc + $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-parseonlyheader.cc > mime-parseonlyheader.dep + touch mime-parseonlyheader.dep.stamp +mime-printbody.dep.stamp : ../bincimapmime/mime-printbody.cc + $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-printbody.cc > mime-printbody.dep + touch mime-printbody.dep.stamp +mime-printdoc.dep.stamp : ../bincimapmime/mime-printdoc.cc + $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-printdoc.cc > mime-printdoc.dep + touch mime-printdoc.dep.stamp +mime-printheader.dep.stamp : ../bincimapmime/mime-printheader.cc + $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-printheader.cc > mime-printheader.dep + touch mime-printheader.dep.stamp +mime.dep.stamp : ../bincimapmime/mime.cc + $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime.cc > mime.dep + touch mime.dep.stamp +convert.dep.stamp : ../bincimapmime/convert.cc + $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/convert.cc > convert.dep + touch convert.dep.stamp +iodevice.dep.stamp : ../bincimapmime/iodevice.cc + $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/iodevice.cc > iodevice.dep + touch iodevice.dep.stamp +iofactory.dep.stamp : ../bincimapmime/iofactory.cc + $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/iofactory.cc > iofactory.dep + touch iofactory.dep.stamp +include mime-getpart.dep +include mime-parsefull.dep +include mime-parseonlyheader.dep +include mime-printbody.dep +include mime-printdoc.dep +include mime-printheader.dep +include mime.dep +include convert.dep +include iodevice.dep +include iofactory.dep diff --git a/src/lib/mkMake b/src/lib/mkMake index 3e5e6690..feb2da4c 100755 --- a/src/lib/mkMake +++ b/src/lib/mkMake @@ -3,7 +3,7 @@ mk=Makefile depth=${depth:-..} -SRCS="\ +SRC_CPP="\ ${depth}/aspell/rclaspell.cpp \ ${depth}/common/rclconfig.cpp \ ${depth}/common/rclinit.cpp \ @@ -57,8 +57,20 @@ ${depth}/utils/wipedir.cpp \ ${depth}/utils/x11mon.cpp \ " +SRC_CC="\ +${depth}/bincimapmime/mime-getpart.cc \ +${depth}/bincimapmime/mime-parsefull.cc \ +${depth}/bincimapmime/mime-parseonlyheader.cc \ +${depth}/bincimapmime/mime-printbody.cc \ +${depth}/bincimapmime/mime-printdoc.cc \ +${depth}/bincimapmime/mime-printheader.cc \ +${depth}/bincimapmime/mime.cc \ +${depth}/bincimapmime/convert.cc \ +${depth}/bincimapmime/iodevice.cc \ +${depth}/bincimapmime/iofactory.cc \ +" -for c in $SRCS;do +for c in $SRC_CPP;do o=`basename $c .cpp`.o OBJS="$OBJS $o" d=`basename $c .cpp`.dep @@ -66,6 +78,14 @@ for c in $SRCS;do s=`basename $c .cpp`.dep.stamp DEPS="$DEPS $s" done +for c in $SRC_CC;do + o=`basename $c .cc`.o + OBJS="$OBJS $o" + d=`basename $c .cc`.dep + cp /dev/null $d + s=`basename $c .cc`.dep.stamp + DEPS="$DEPS $s" +done test -f $mk && chmod +w $mk @@ -74,8 +94,6 @@ cat > $mk <> $mk echo " \$(CXX) \$(ALL_CXXFLAGS) -c $c" >> $mk done +for c in $SRC_CC;do + o=`basename $c .cc`.o + echo "$o : $c" >> $mk + echo " \$(CXX) \$(ALL_CXXFLAGS) -c $c" >> $mk +done cat >> $mk <> $mk echo " \$(CXX) -M \$(ALL_CXXFLAGS) $c > $d" >> $mk echo " touch $s" >> $mk done -for c in $SRCS;do +for c in $SRC_CPP;do d=`basename $c .cpp`.dep echo "include $d" >> $mk done +for c in $SRC_CC;do + d=`basename $c .cc`.dep + s=`basename $c .cc`.dep.stamp + echo "$s : $c" >> $mk + echo " \$(CXX) -M \$(ALL_CXXFLAGS) $c > $d" >> $mk + echo " touch $s" >> $mk +done +for c in $SRC_CC;do + d=`basename $c .cc`.dep + echo "include $d" >> $mk +done diff --git a/src/mk/Darwin b/src/mk/Darwin index 79a6bc33..09ea31ad 100644 --- a/src/mk/Darwin +++ b/src/mk/Darwin @@ -1,8 +1,7 @@ include $(depth)/mk/commondefs include $(depth)/mk/localdefs -ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \ - -DSTATFS_INCLUDE="" +ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) RANLIB = ranlib LIBSYS = diff --git a/src/mk/FreeBSD b/src/mk/FreeBSD index eb19350b..480d5d90 100644 --- a/src/mk/FreeBSD +++ b/src/mk/FreeBSD @@ -1,7 +1,5 @@ include $(depth)/mk/commondefs include $(depth)/mk/localdefs -ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \ - -pthread \ - -DSTATFS_INCLUDE="" +ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) -pthread LIBSYS = diff --git a/src/mk/OpenBSD b/src/mk/OpenBSD index a6f4e7d9..bcbce000 100644 --- a/src/mk/OpenBSD +++ b/src/mk/OpenBSD @@ -2,6 +2,5 @@ include $(depth)/mk/commondefs include $(depth)/mk/localdefs ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \ - -pthread -I/usr/include \ - -DSTATFS_INCLUDE="" + -pthread -I/usr/include LIBSYS = diff --git a/src/mk/SunOS b/src/mk/SunOS index e47c760e..784c0960 100644 --- a/src/mk/SunOS +++ b/src/mk/SunOS @@ -1,8 +1,7 @@ include $(depth)/mk/commondefs include $(depth)/mk/localdefs -ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \ - -DSTATFS_INCLUDE="" +ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) CC = gcc CXX = g++ diff --git a/src/mk/commondefs b/src/mk/commondefs index 584589e2..50b1f724 100644 --- a/src/mk/commondefs +++ b/src/mk/commondefs @@ -17,7 +17,6 @@ COMMONCXXFLAGS = -I. \ PIC_CXXFLAGS = -fPIC -DPIC BIGLIB = $(depth)/lib/librcl.a -MIMELIB = $(depth)/bincimapmime/libmime.a RANLIB = test -f diff --git a/src/qt4gui/recoll.pro.in b/src/qt4gui/recoll.pro.in index 59525151..ad998192 100644 --- a/src/qt4gui/recoll.pro.in +++ b/src/qt4gui/recoll.pro.in @@ -52,8 +52,7 @@ unix { MOC_DIR = .moc OBJECTS_DIR = .obj - DEFINES += RECOLL_DATADIR='\\"@QTRECOLL_DATADIR@\\"' - LIBS += ../lib/librcl.a ../bincimapmime/libmime.a \ + LIBS += ../lib/librcl.a \ $(BSTATIC) @LIBXAPIAN@ @LIBICONV@ $(BDYNAMIC) \ -lz diff --git a/src/qtgui/recoll.pro.in b/src/qtgui/recoll.pro.in index 6b39e743..4a27a9d3 100644 --- a/src/qtgui/recoll.pro.in +++ b/src/qtgui/recoll.pro.in @@ -62,8 +62,7 @@ unix { MOC_DIR = .moc OBJECTS_DIR = .obj - DEFINES += RECOLL_DATADIR=\"@QTRECOLL_DATADIR@\" - LIBS += ../lib/librcl.a ../bincimapmime/libmime.a \ + LIBS += ../lib/librcl.a \ $(BSTATIC) @LIBXAPIAN@ @LIBICONV@ $(BDYNAMIC) \ -lz diff --git a/src/query/Makefile b/src/query/Makefile index ce771444..06d953e7 100644 --- a/src/query/Makefile +++ b/src/query/Makefile @@ -14,21 +14,21 @@ xadump : $(XADUMP_OBJS) $(CXX) $(ALL_CXXFLAGS) -o xadump $(XADUMP_OBJS) \ $(LIBICONV) $(LIBXAPIAN) $(LIBSYS) -RECOLLQ_OBJS= recollq.o $(BIGLIB) $(MIMELIB) +RECOLLQ_OBJS= recollq.o $(BIGLIB) recollq : $(RECOLLQ_OBJS) $(CXX) $(ALL_CXXFLAGS) -o recollq $(RECOLLQ_OBJS) \ $(LIBICONV) $(LIBXAPIAN) $(LIBSYS) recollq.o : recollq.cpp $(CXX) $(ALL_CXXFLAGS) -DTEST_RECOLLQ -c recollq.cpp -HISTORY_OBJS= trhist.o $(BIGLIB) $(MIMELIB) +HISTORY_OBJS= trhist.o $(BIGLIB) trhist : $(HISTORY_OBJS) $(CXX) $(ALL_CXXFLAGS) -o trhist $(HISTORY_OBJS) \ $(LIBICONV) $(LIBXAPIAN) trhist.o : history.cpp history.h $(CXX) $(ALL_CXXFLAGS) -DTEST_HISTORY -c -o trhist.o history.cpp -WASASTRINGTOQUERY_OBJS= trwasastrtoq.o $(BIGLIB) $(MIMELIB) +WASASTRINGTOQUERY_OBJS= trwasastrtoq.o $(BIGLIB) trwasastrtoq : $(WASASTRINGTOQUERY_OBJS) $(CXX) $(ALL_CXXFLAGS) -o trwasastrtoq $(WASASTRINGTOQUERY_OBJS) \ $(LIBICONV) $(LIBXAPIAN) diff --git a/src/unac/unac.c b/src/unac/unac.c index 30f56757..4ea80f9d 100644 --- a/src/unac/unac.c +++ b/src/unac/unac.c @@ -13170,7 +13170,7 @@ int unacmaybefold_string_utf16(const char* in, size_t in_length, if(out == 0) { if(debug_level >= UNAC_DEBUG_LOW) DEBUG("realloc %d bytes failed\n", out_size+1); - // *outp is still valid. Let the caller free it + /* *outp is still valid. Let the caller free it */ return -1; } } else { @@ -13302,7 +13302,7 @@ static int convert(const char* from, const char* to, /* +1 for null */ out = realloc(out, out_size + 1); if(out == 0) { - // *outp still valid, no freeing + /* *outp still valid, no freeing */ if(debug_level >= UNAC_DEBUG_LOW) DEBUG("realloc %d bytes failed\n", out_size+1); return -1; @@ -13375,8 +13375,8 @@ static int convert(const char* from, const char* to, /* +1 for null */ out_base = realloc(out_base, out_size + 1); if (out_base == 0) { - // *outp potentially not valid any more. Free here, - // and zero out + /* *outp potentially not valid any more. Free here, + * and zero out */ if(debug_level >= UNAC_DEBUG_LOW) DEBUG("realloc %d bytes failed\n", out_size+1); free(saved); diff --git a/src/utils/pathut.cpp b/src/utils/pathut.cpp index ec37fb6f..b13935ec 100644 --- a/src/utils/pathut.cpp +++ b/src/utils/pathut.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: pathut.cpp,v 1.22 2008-07-01 11:51:51 dockes Exp $ (C) 2004 J.F.Dockes"; +static char rcsid[] = "@(#$Id: pathut.cpp,v 1.23 2008-11-24 15:47:40 dockes Exp $ (C) 2004 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -41,11 +41,20 @@ using std::stack; #include "transcode.h" #include -#ifndef STATFS_INCLUDE -#define STATFS_INCLUDE +// Let's include all files where statfs can be defined and hope for no +// conflict... +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_STATFS_H +#include +#endif +#ifdef HAVE_SYS_STATVFS_H +#include +#endif +#ifdef HAVE_SYS_VFS_H +#include #endif - -#include STATFS_INCLUDE bool fsocc(const string &path, int *pc, long *blocks) {