changed the way we look for libiconv to make it work with macports + different mac mimeview defaults
This commit is contained in:
parent
b395f0ea0d
commit
14cf112ada
104
src/configure
vendored
104
src/configure
vendored
@ -4341,12 +4341,8 @@ fi
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
##### Look for iconv. We look for libiconv in ${libdir}, /opt/local/lib,
|
##### Look for iconv. This can exist in either libc (ie: Linux, solaris) or
|
||||||
##### /usr/local/lib then in libc (Linux, solaris). Note that there is no
|
##### libiconv. We'd need a --with-libiconv= option
|
||||||
##### way to find libiconv in /usr/local if one exists in ${libdir} (can't
|
|
||||||
##### do because the link will always succeed in this case so that if we
|
|
||||||
##### put /usr/local/lib in front in this case, we may end up with using it
|
|
||||||
##### even if no libiconv in there. We'd need a --with-libiconv= option
|
|
||||||
ac_ext=cpp
|
ac_ext=cpp
|
||||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
@ -4355,112 +4351,70 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
|||||||
|
|
||||||
LIBICONV=""
|
LIBICONV=""
|
||||||
S_LDFLAGS=$LDFLAGS
|
S_LDFLAGS=$LDFLAGS
|
||||||
|
S_CPPFLAGS=$CPPFLAGS
|
||||||
for dir in ${libdir} /opt/local/lib /usr/local/lib ;do
|
for dir in ${libdir} /opt/local/lib /usr/local/lib ;do
|
||||||
LDFLAGS="$S_LDFLAGS -L$dir"
|
CPPFLAGS="$S_CPPFLAGS -I$dir/../include"
|
||||||
unset ac_cv_lib_iconv_iconv_open
|
|
||||||
|
LDFLAGS="$S_LDFLAGS -L$dir"
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5
|
|
||||||
$as_echo_n "checking for iconv_open in -liconv... " >&6; }
|
|
||||||
if ${ac_cv_lib_iconv_iconv_open+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
ac_check_lib_save_LIBS=$LIBS
|
|
||||||
LIBS="-liconv $LIBS"
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
#include <stdlib.h>
|
||||||
/* Override any GCC internal prototype to avoid an error.
|
#include <iconv.h>
|
||||||
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 iconv_open ();
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
return iconv_open ();
|
iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_cxx_try_link "$LINENO"; then :
|
if ac_fn_cxx_try_link "$LINENO"; then :
|
||||||
ac_cv_lib_iconv_iconv_open=yes
|
LIBICONV="-L$dir";INCICONV=-I$dir/../include
|
||||||
else
|
|
||||||
ac_cv_lib_iconv_iconv_open=no
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
LIBS=$ac_check_lib_save_LIBS
|
|
||||||
fi
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv_open" >&5
|
|
||||||
$as_echo "$ac_cv_lib_iconv_iconv_open" >&6; }
|
|
||||||
if test "x$ac_cv_lib_iconv_iconv_open" = xyes; then :
|
|
||||||
LIBICONV="-L$dir -liconv";INCICONV=-I$dir/../include
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test A"$LIBICONV" != A ; then
|
if test A"$LIBICONV" != A ; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
|
||||||
if test A"$LIBICONV" = A; then
|
LDFLAGS="$S_LDFLAGS -L$dir -liconv"
|
||||||
dir=${libdir}
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
LDFLAGS="$S_LDFLAGS -L$dir"
|
|
||||||
unset ac_cv_lib_iconv_iconv_open
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -lc" >&5
|
|
||||||
$as_echo_n "checking for iconv_open in -lc... " >&6; }
|
|
||||||
if ${ac_cv_lib_c_iconv_open+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
ac_check_lib_save_LIBS=$LIBS
|
|
||||||
LIBS="-lc $LIBS"
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
#include <stdlib.h>
|
||||||
/* Override any GCC internal prototype to avoid an error.
|
#include <iconv.h>
|
||||||
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 iconv_open ();
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
return iconv_open ();
|
iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_cxx_try_link "$LINENO"; then :
|
if ac_fn_cxx_try_link "$LINENO"; then :
|
||||||
ac_cv_lib_c_iconv_open=yes
|
LIBICONV="-L$dir -liconv";INCICONV=-I$dir/../include
|
||||||
else
|
|
||||||
ac_cv_lib_c_iconv_open=no
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
LIBS=$ac_check_lib_save_LIBS
|
if test A"$LIBICONV" != A ; then
|
||||||
fi
|
break
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_iconv_open" >&5
|
fi
|
||||||
$as_echo "$ac_cv_lib_c_iconv_open" >&6; }
|
|
||||||
if test "x$ac_cv_lib_c_iconv_open" = xyes; then :
|
|
||||||
LIBICONV=NONE;INCICONV=-I/usr/include
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
done
|
||||||
|
|
||||||
LDFLAGS=$S_LDFLAGS
|
LDFLAGS=$S_LDFLAGS
|
||||||
|
CPPFLAGS=$S_CPPFLAGS
|
||||||
|
|
||||||
if test A"$LIBICONV" = A ; then
|
if test A"$LIBICONV" = A ; then
|
||||||
as_fn_error $? "Cannot find iconv_open anywhere. Please install iconv" "$LINENO" 5
|
as_fn_error $? "Cannot find iconv_open anywhere. Please install iconv" "$LINENO" 5
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if test A"$LIBICONV" = ANONE ; then
|
echo LIBICONV $LIBICONV
|
||||||
LIBICONV=""
|
echo INCICONV $INCICONV
|
||||||
fi
|
|
||||||
#echo LIBICONV $LIBICONV
|
|
||||||
#echo INCICONV $INCICONV
|
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS $INCICONV"
|
CPPFLAGS="$CPPFLAGS $INCICONV"
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of inbuf parameter to iconv" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of inbuf parameter to iconv" >&5
|
||||||
@ -4494,6 +4448,7 @@ $as_echo "#define RCL_ICONV_INBUF_CONST 1" >>confdefs.h
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
############# Putenv
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of string parameter to putenv" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of string parameter to putenv" >&5
|
||||||
$as_echo_n "checking for type of string parameter to putenv... " >&6; }
|
$as_echo_n "checking for type of string parameter to putenv... " >&6; }
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
@ -4523,6 +4478,7 @@ $as_echo "#define PUTENV_ARG_CONST 1" >>confdefs.h
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#### Look for Xapian
|
#### Look for Xapian
|
||||||
# Extract the first word of "xapian-config", so it can be a program name with args.
|
# Extract the first word of "xapian-config", so it can be a program name with args.
|
||||||
set dummy xapian-config; ac_word=$2
|
set dummy xapian-config; ac_word=$2
|
||||||
|
|||||||
@ -198,40 +198,46 @@ fi
|
|||||||
|
|
||||||
AC_CHECK_FUNCS(mkdtemp)
|
AC_CHECK_FUNCS(mkdtemp)
|
||||||
|
|
||||||
##### Look for iconv. We look for libiconv in ${libdir}, /opt/local/lib,
|
##### Look for iconv. This can exist in either libc (ie: Linux, solaris) or
|
||||||
##### /usr/local/lib then in libc (Linux, solaris). Note that there is no
|
##### libiconv. We'd need a --with-libiconv= option
|
||||||
##### way to find libiconv in /usr/local if one exists in ${libdir} (can't
|
|
||||||
##### do because the link will always succeed in this case so that if we
|
|
||||||
##### put /usr/local/lib in front in this case, we may end up with using it
|
|
||||||
##### even if no libiconv in there. We'd need a --with-libiconv= option
|
|
||||||
AC_LANG(C++)
|
AC_LANG(C++)
|
||||||
LIBICONV=""
|
LIBICONV=""
|
||||||
S_LDFLAGS=$LDFLAGS
|
S_LDFLAGS=$LDFLAGS
|
||||||
|
S_CPPFLAGS=$CPPFLAGS
|
||||||
for dir in ${libdir} /opt/local/lib /usr/local/lib ;do
|
for dir in ${libdir} /opt/local/lib /usr/local/lib ;do
|
||||||
|
CPPFLAGS="$S_CPPFLAGS -I$dir/../include"
|
||||||
|
|
||||||
LDFLAGS="$S_LDFLAGS -L$dir"
|
LDFLAGS="$S_LDFLAGS -L$dir"
|
||||||
unset ac_cv_lib_iconv_iconv_open
|
AC_TRY_LINK([#include <stdlib.h>
|
||||||
AC_CHECK_LIB(iconv, iconv_open, LIBICONV="-L$dir -liconv";INCICONV=-I$dir/../include)
|
#include <iconv.h>],
|
||||||
|
[iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);],
|
||||||
|
LIBICONV="-L$dir";INCICONV=-I$dir/../include)
|
||||||
if test A"$LIBICONV" != A ; then
|
if test A"$LIBICONV" != A ; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
LDFLAGS="$S_LDFLAGS -L$dir -liconv"
|
||||||
|
AC_TRY_LINK([#include <stdlib.h>
|
||||||
|
#include <iconv.h>],
|
||||||
|
[iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);],
|
||||||
|
LIBICONV="-L$dir -liconv";INCICONV=-I$dir/../include)
|
||||||
|
if test A"$LIBICONV" != A ; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if test A"$LIBICONV" = A; then
|
|
||||||
dir=${libdir}
|
|
||||||
LDFLAGS="$S_LDFLAGS -L$dir"
|
|
||||||
unset ac_cv_lib_iconv_iconv_open
|
|
||||||
AC_CHECK_LIB(c, iconv_open, LIBICONV=NONE;INCICONV=-I/usr/include)
|
|
||||||
fi
|
|
||||||
|
|
||||||
LDFLAGS=$S_LDFLAGS
|
LDFLAGS=$S_LDFLAGS
|
||||||
|
CPPFLAGS=$S_CPPFLAGS
|
||||||
|
|
||||||
if test A"$LIBICONV" = A ; then
|
if test A"$LIBICONV" = A ; then
|
||||||
AC_MSG_ERROR([Cannot find iconv_open anywhere. Please install iconv])
|
AC_MSG_ERROR([Cannot find iconv_open anywhere. Please install iconv])
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if test A"$LIBICONV" = ANONE ; then
|
|
||||||
LIBICONV=""
|
|
||||||
fi
|
|
||||||
#echo LIBICONV $LIBICONV
|
#echo LIBICONV $LIBICONV
|
||||||
#echo INCICONV $INCICONV
|
#echo INCICONV $INCICONV
|
||||||
|
|
||||||
@ -248,6 +254,7 @@ if test X$rcl_iconv_inbuf_const = X1 ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
############# Putenv
|
||||||
AC_MSG_CHECKING(for type of string parameter to putenv)
|
AC_MSG_CHECKING(for type of string parameter to putenv)
|
||||||
AC_TRY_COMPILE([
|
AC_TRY_COMPILE([
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -258,6 +265,7 @@ if test X$rcl_putenv_string_const = X1 ; then
|
|||||||
AC_DEFINE(PUTENV_ARG_CONST, 1, [putenv parameter is const])
|
AC_DEFINE(PUTENV_ARG_CONST, 1, [putenv parameter is const])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#### Look for Xapian
|
#### Look for Xapian
|
||||||
AC_PATH_PROG(XAPIAN_CONFIG, xapian-config, no)
|
AC_PATH_PROG(XAPIAN_CONFIG, xapian-config, no)
|
||||||
if test "$XAPIAN_CONFIG" = "no" ; then
|
if test "$XAPIAN_CONFIG" = "no" ; then
|
||||||
|
|||||||
81
src/sampleconf/mimeview.mac
Normal file
81
src/sampleconf/mimeview.mac
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
# @(#$Id: mimeview,v 1.16 2008-09-15 08:03:37 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
|
|
||||||
|
## ##########################################
|
||||||
|
# External viewers, launched by the recoll GUI when you click on a result
|
||||||
|
# 'Open' link - MAC version
|
||||||
|
# On the MAC, we basically use "open" for everything...
|
||||||
|
|
||||||
|
# Mime types which we should not uncompress if they are found gzipped or
|
||||||
|
# bzipped because the native viewer knows how to handle. These would be
|
||||||
|
# exceptions and the list is normally empty
|
||||||
|
#nouncompforviewmts =
|
||||||
|
|
||||||
|
[view]
|
||||||
|
# Pseudo entry used if the 'use desktop' preference is set in the GUI
|
||||||
|
application/x-all = open %f
|
||||||
|
|
||||||
|
[view]
|
||||||
|
|
||||||
|
application/x-kword = kword %f
|
||||||
|
application/x-abiword = abiword %f
|
||||||
|
|
||||||
|
application/pdf = open %f
|
||||||
|
application/postscript = open %f
|
||||||
|
application/x-dvi = open %f
|
||||||
|
|
||||||
|
application/x-lyx = lyx %f
|
||||||
|
application/x-scribus = scribus %f
|
||||||
|
|
||||||
|
application/msword = open %f
|
||||||
|
application/vnd.ms-excel = open %f
|
||||||
|
application/vnd.ms-powerpoint = open %f
|
||||||
|
|
||||||
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document = \
|
||||||
|
open %f
|
||||||
|
application/vnd.openxmlformats-officedocument.wordprocessingml.template = \
|
||||||
|
open %f
|
||||||
|
application/vnd.openxmlformats-officedocument.presentationml.template = \
|
||||||
|
open %f
|
||||||
|
application/vnd.openxmlformats-officedocument.presentationml.presentation = \
|
||||||
|
open %f
|
||||||
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = \
|
||||||
|
open %f
|
||||||
|
application/vnd.openxmlformats-officedocument.spreadsheetml.template =\
|
||||||
|
open %f
|
||||||
|
application/vnd.sun.xml.calc = open %f
|
||||||
|
application/vnd.sun.xml.calc.template = open %f
|
||||||
|
application/vnd.sun.xml.draw = open %f
|
||||||
|
application/vnd.sun.xml.draw.template = open %f
|
||||||
|
application/vnd.sun.xml.impress = open %f
|
||||||
|
application/vnd.sun.xml.impress.template = open %f
|
||||||
|
application/vnd.sun.xml.math = open %f
|
||||||
|
application/vnd.sun.xml.writer = open %f
|
||||||
|
application/vnd.sun.xml.writer.global = open %f
|
||||||
|
application/vnd.sun.xml.writer.template = open %f
|
||||||
|
application/vnd.wordperfect = open %f
|
||||||
|
|
||||||
|
application/x-chm = kchmviewer %f
|
||||||
|
application/x-fsdirectory = open %f
|
||||||
|
application/x-gnuinfo = xterm -e "info -f %f"
|
||||||
|
|
||||||
|
application/x-flac = open %f
|
||||||
|
audio/mpeg = open %f
|
||||||
|
application/ogg = open %f
|
||||||
|
|
||||||
|
image/jpeg = open %f
|
||||||
|
image/png = open %f
|
||||||
|
image/tiff = open %f
|
||||||
|
image/gif = open %f
|
||||||
|
|
||||||
|
image/svg+xml = inkview %f
|
||||||
|
image/vnd.djvu = djview %f
|
||||||
|
|
||||||
|
application/x-tex = open %f
|
||||||
|
text/x-tex = open %f
|
||||||
|
text/html = open %u
|
||||||
|
text/html|gnuinfo = rclshowinfo %F %(title)
|
||||||
|
text/plain = open %f
|
||||||
|
text/x-c = open %f
|
||||||
|
text/x-c+ = open %f
|
||||||
|
text/x-c++ = open %f
|
||||||
|
text/x-python = idle %f
|
||||||
Loading…
x
Reference in New Issue
Block a user