glitches in linux/solaris compil. + install
This commit is contained in:
parent
771ef0055b
commit
5b5be0c853
144
src/configure
vendored
144
src/configure
vendored
@ -1161,7 +1161,8 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##### Look for iconv in libc (Linux), or libiconv in /usr/local/lib:/usr/lib
|
##### Look for iconv. We first look for libiconv in /usr/local/lib:/usr/lib
|
||||||
|
## then in libc (Linux, solaris)
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
ac_cpp='$CPP $CPPFLAGS'
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
@ -1170,8 +1171,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||||||
|
|
||||||
LIBICONV=""
|
LIBICONV=""
|
||||||
S_LDFLAGS=$LDFLAGS
|
S_LDFLAGS=$LDFLAGS
|
||||||
dir=/usr/lib
|
dir=/usr/local/lib
|
||||||
LDFLAGS="$S_LDFLAGS -L$dir"
|
LDFLAGS="$S_LDFLAGS -L$dir"
|
||||||
|
unset ac_cv_lib_iconv_iconv_open
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
ac_cpp='$CPP $CPPFLAGS'
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
@ -1931,70 +1933,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
|||||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for iconv_open in -lc" >&5
|
echo "$as_me:$LINENO: checking for iconv_open in -liconv" >&5
|
||||||
echo $ECHO_N "checking for iconv_open in -lc... $ECHO_C" >&6
|
|
||||||
if test "${ac_cv_lib_c_iconv_open+set}" = set; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
else
|
|
||||||
ac_check_lib_save_LIBS=$LIBS
|
|
||||||
LIBS="-lc $LIBS"
|
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
|
||||||
#line $LINENO "configure"
|
|
||||||
#include "confdefs.h"
|
|
||||||
|
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
/* We use char because int might match the return type of a gcc2
|
|
||||||
builtin and then its argument prototype would still apply. */
|
|
||||||
char iconv_open ();
|
|
||||||
#ifdef F77_DUMMY_MAIN
|
|
||||||
# ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
# endif
|
|
||||||
int F77_DUMMY_MAIN() { return 1; }
|
|
||||||
#endif
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
iconv_open ();
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|
||||||
(eval $ac_link) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); } &&
|
|
||||||
{ ac_try='test -s conftest$ac_exeext'
|
|
||||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
(eval $ac_try) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); }; }; then
|
|
||||||
ac_cv_lib_c_iconv_open=yes
|
|
||||||
else
|
|
||||||
echo "$as_me: failed program was:" >&5
|
|
||||||
cat conftest.$ac_ext >&5
|
|
||||||
ac_cv_lib_c_iconv_open=no
|
|
||||||
fi
|
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
|
||||||
LIBS=$ac_check_lib_save_LIBS
|
|
||||||
fi
|
|
||||||
echo "$as_me:$LINENO: result: $ac_cv_lib_c_iconv_open" >&5
|
|
||||||
echo "${ECHO_T}$ac_cv_lib_c_iconv_open" >&6
|
|
||||||
if test $ac_cv_lib_c_iconv_open = yes; then
|
|
||||||
LIBICONV=NONE;INCICONV=-I/usr/include
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test A"$LIBICONV" = A ; then
|
|
||||||
dir=/usr/local/lib
|
|
||||||
LDFLAGS="$S_LDFLAGS -L$dir"
|
|
||||||
unset ac_cv_lib_iconv_iconv_open
|
|
||||||
echo "$as_me:$LINENO: checking for iconv_open in -liconv" >&5
|
|
||||||
echo $ECHO_N "checking for iconv_open in -liconv... $ECHO_C" >&6
|
echo $ECHO_N "checking for iconv_open in -liconv... $ECHO_C" >&6
|
||||||
if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then
|
if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
@ -2053,11 +1992,11 @@ if test $ac_cv_lib_iconv_iconv_open = yes; then
|
|||||||
LIBICONV="-L$dir -liconv";INCICONV=-I/usr/local/include
|
LIBICONV="-L$dir -liconv";INCICONV=-I/usr/local/include
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test A"$LIBICONV" = A; then
|
if test A"$LIBICONV" = A ; then
|
||||||
dir=/usr/local/lib
|
dir=/usr/lib
|
||||||
LDFLAGS="$S_LDFLAGS -L$dir"
|
LDFLAGS="$S_LDFLAGS -L$dir"
|
||||||
unset ac_cv_lib_iconv_iconv_open
|
unset ac_cv_lib_iconv_iconv_open
|
||||||
echo "$as_me:$LINENO: checking for iconv_open in -liconv" >&5
|
echo "$as_me:$LINENO: checking for iconv_open in -liconv" >&5
|
||||||
echo $ECHO_N "checking for iconv_open in -liconv... $ECHO_C" >&6
|
echo $ECHO_N "checking for iconv_open in -liconv... $ECHO_C" >&6
|
||||||
if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then
|
if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
@ -2116,6 +2055,69 @@ if test $ac_cv_lib_iconv_iconv_open = yes; then
|
|||||||
LIBICONV="-L$dir -liconv";INCICONV=-I/usr/include
|
LIBICONV="-L$dir -liconv";INCICONV=-I/usr/include
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test A"$LIBICONV" = A; then
|
||||||
|
dir=/usr/lib
|
||||||
|
LDFLAGS="$S_LDFLAGS -L$dir"
|
||||||
|
unset ac_cv_lib_iconv_iconv_open
|
||||||
|
echo "$as_me:$LINENO: checking for iconv_open in -lc" >&5
|
||||||
|
echo $ECHO_N "checking for iconv_open in -lc... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_lib_c_iconv_open+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
LIBS="-lc $LIBS"
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
#line $LINENO "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
|
||||||
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
char iconv_open ();
|
||||||
|
#ifdef F77_DUMMY_MAIN
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
# endif
|
||||||
|
int F77_DUMMY_MAIN() { return 1; }
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
iconv_open ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||||
|
(eval $ac_link) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -s conftest$ac_exeext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
ac_cv_lib_c_iconv_open=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
ac_cv_lib_c_iconv_open=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||||
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $ac_cv_lib_c_iconv_open" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_lib_c_iconv_open" >&6
|
||||||
|
if test $ac_cv_lib_c_iconv_open = yes; then
|
||||||
|
LIBICONV=NONE;INCICONV=-I/usr/include
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
LDFLAGS=$S_LDFLAGS
|
LDFLAGS=$S_LDFLAGS
|
||||||
|
|||||||
@ -14,24 +14,25 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##### Look for iconv in libc (Linux), or libiconv in /usr/local/lib:/usr/lib
|
##### Look for iconv. We first look for libiconv in /usr/local/lib:/usr/lib
|
||||||
|
## then in libc (Linux, solaris)
|
||||||
AC_LANG(C)
|
AC_LANG(C)
|
||||||
LIBICONV=""
|
LIBICONV=""
|
||||||
S_LDFLAGS=$LDFLAGS
|
S_LDFLAGS=$LDFLAGS
|
||||||
dir=/usr/lib
|
dir=/usr/local/lib
|
||||||
LDFLAGS="$S_LDFLAGS -L$dir"
|
LDFLAGS="$S_LDFLAGS -L$dir"
|
||||||
AC_CHECK_LIB(c, iconv_open, LIBICONV=NONE;INCICONV=-I/usr/include)
|
unset ac_cv_lib_iconv_iconv_open
|
||||||
|
AC_CHECK_LIB(iconv, iconv_open, LIBICONV="-L$dir -liconv";INCICONV=-I/usr/local/include)
|
||||||
if test A"$LIBICONV" = A ; then
|
if test A"$LIBICONV" = A ; then
|
||||||
dir=/usr/local/lib
|
dir=/usr/lib
|
||||||
LDFLAGS="$S_LDFLAGS -L$dir"
|
LDFLAGS="$S_LDFLAGS -L$dir"
|
||||||
unset ac_cv_lib_iconv_iconv_open
|
unset ac_cv_lib_iconv_iconv_open
|
||||||
AC_CHECK_LIB(iconv, iconv_open,
|
AC_CHECK_LIB(iconv, iconv_open, LIBICONV="-L$dir -liconv";INCICONV=-I/usr/include)
|
||||||
LIBICONV="-L$dir -liconv";INCICONV=-I/usr/local/include)
|
|
||||||
if test A"$LIBICONV" = A; then
|
if test A"$LIBICONV" = A; then
|
||||||
dir=/usr/local/lib
|
dir=/usr/lib
|
||||||
LDFLAGS="$S_LDFLAGS -L$dir"
|
LDFLAGS="$S_LDFLAGS -L$dir"
|
||||||
unset ac_cv_lib_iconv_iconv_open
|
unset ac_cv_lib_iconv_iconv_open
|
||||||
AC_CHECK_LIB(iconv, iconv_open, LIBICONV="-L$dir -liconv";INCICONV=-I/usr/include)
|
AC_CHECK_LIB(c, iconv_open, LIBICONV=NONE;INCICONV=-I/usr/include)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
LDFLAGS=$S_LDFLAGS
|
LDFLAGS=$S_LDFLAGS
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: mimetype.cpp,v 1.11 2005-11-21 14:31:24 dockes Exp $ (C) 2004 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: mimetype.cpp,v 1.12 2005-11-21 17:18:58 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TEST_MIMETYPE
|
#ifndef TEST_MIMETYPE
|
||||||
@ -17,7 +17,10 @@ using std::list;
|
|||||||
#include "smallut.h"
|
#include "smallut.h"
|
||||||
#include "idfile.h"
|
#include "idfile.h"
|
||||||
|
|
||||||
|
// Solaris8's 'file' command doesnt understand -i
|
||||||
|
#ifndef sun
|
||||||
#define USE_SYSTEM_FILE_COMMAND
|
#define USE_SYSTEM_FILE_COMMAND
|
||||||
|
#endif
|
||||||
|
|
||||||
/// Identification of file from contents. This is called for files with
|
/// Identification of file from contents. This is called for files with
|
||||||
/// unrecognized extensions (none, or not known either for indexing or
|
/// unrecognized extensions (none, or not known either for indexing or
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* -----END-LICENCE-----
|
* -----END-LICENCE-----
|
||||||
*/
|
*/
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "myhtmlparse.h"
|
#include "myhtmlparse.h"
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ include ../mk/localdefs
|
|||||||
|
|
||||||
CXXFLAGS = $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \
|
CXXFLAGS = $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \
|
||||||
-D_GNU_SOURCE \
|
-D_GNU_SOURCE \
|
||||||
|
-DPUTENV_ARG_NOT_CONST \
|
||||||
-DHAVE_VASPRINTF=1 \
|
-DHAVE_VASPRINTF=1 \
|
||||||
-DHAVE_MKDTEMP=1
|
-DHAVE_MKDTEMP=1
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
include ../mk/commondefs
|
include ../mk/commondefs
|
||||||
include ../mk/localdefs
|
include ../mk/localdefs
|
||||||
|
|
||||||
CXXFLAGS = $(COMMONCXXFLAGS) $(LOCALCXXFLAGS)
|
CXXFLAGS = $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \
|
||||||
|
-DPUTENV_ARG_NOT_CONST
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
|
|||||||
@ -58,7 +58,7 @@ else
|
|||||||
fatal "Cowardly refusing to install personal config in root's" \
|
fatal "Cowardly refusing to install personal config in root's" \
|
||||||
"home directory"
|
"home directory"
|
||||||
fi
|
fi
|
||||||
if test ! -d ${PREFIX}/share/examples/recoll ; then
|
if test ! -d ${PREFIX}/share/recoll/examples ; then
|
||||||
fatal "Global install should be performed first"
|
fatal "Global install should be performed first"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -67,13 +67,13 @@ else
|
|||||||
|
|
||||||
$HOME/.recoll already exists, no modification done.
|
$HOME/.recoll already exists, no modification done.
|
||||||
You should check for new filters or updated files in
|
You should check for new filters or updated files in
|
||||||
${PREFIX}/share/examples/recoll.
|
${PREFIX}/share/recoll/examples.
|
||||||
EOF
|
EOF
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir $HOME/.recoll || exit 1
|
mkdir $HOME/.recoll || exit 1
|
||||||
cp ${PREFIX}/share/examples/recoll/* $HOME/.recoll
|
cp ${PREFIX}/share/recoll/examples/* $HOME/.recoll
|
||||||
chmod a+x $HOME/.recoll/rcl*
|
chmod a+x $HOME/.recoll/rcl*
|
||||||
chmod +w $HOME/.recoll/recoll.conf
|
chmod +w $HOME/.recoll/recoll.conf
|
||||||
chmod +w $HOME/.recoll/mimeconf
|
chmod +w $HOME/.recoll/mimeconf
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: execmd.cpp,v 1.7 2005-11-18 13:52:48 dockes Exp $ (C) 2004 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: execmd.cpp,v 1.8 2005-11-21 17:18:58 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
#ifndef TEST_EXECMD
|
#ifndef TEST_EXECMD
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -8,7 +8,9 @@ static char rcsid[] = "@(#$Id: execmd.cpp,v 1.7 2005-11-18 13:52:48 dockes Exp $
|
|||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#ifdef PUTENV_ARG_NOT_CONST
|
||||||
|
#include <string.h>
|
||||||
|
#endif
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -191,7 +193,11 @@ int ExecCmd::doexec(const string &cmd, const list<string>& args,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (it = env.begin(); it != env.end(); it++) {
|
for (it = env.begin(); it != env.end(); it++) {
|
||||||
|
#ifdef PUTENV_ARG_NOT_CONST
|
||||||
|
::putenv(strdup(it->c_str()));
|
||||||
|
#else
|
||||||
::putenv(it->c_str());
|
::putenv(it->c_str());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
execvp(cmd.c_str(), (char *const*)argv);
|
execvp(cmd.c_str(), (char *const*)argv);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user