|
a/src/configure |
|
b/src/configure |
|
... |
|
... |
4339 |
|
4339 |
|
4340 |
fi
|
4340 |
fi
|
4341 |
done
|
4341 |
done
|
4342 |
|
4342 |
|
4343 |
|
4343 |
|
4344 |
##### Look for iconv. We look for libiconv in ${libdir}, /opt/local/lib,
|
4344 |
##### Look for iconv. This can exist in either libc (ie: Linux, solaris) or
|
4345 |
##### /usr/local/lib then in libc (Linux, solaris). Note that there is no
|
|
|
4346 |
##### way to find libiconv in /usr/local if one exists in ${libdir} (can't
|
|
|
4347 |
##### do because the link will always succeed in this case so that if we
|
|
|
4348 |
##### put /usr/local/lib in front in this case, we may end up with using it
|
|
|
4349 |
##### even if no libiconv in there. We'd need a --with-libiconv= option
|
4345 |
##### libiconv. We'd need a --with-libiconv= option
|
4350 |
ac_ext=cpp
|
4346 |
ac_ext=cpp
|
4351 |
ac_cpp='$CXXCPP $CPPFLAGS'
|
4347 |
ac_cpp='$CXXCPP $CPPFLAGS'
|
4352 |
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
4348 |
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
4353 |
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
4349 |
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
4354 |
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
4350 |
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
4355 |
|
4351 |
|
4356 |
LIBICONV=""
|
4352 |
LIBICONV=""
|
4357 |
S_LDFLAGS=$LDFLAGS
|
4353 |
S_LDFLAGS=$LDFLAGS
|
4358 |
|
4354 |
S_CPPFLAGS=$CPPFLAGS
|
4359 |
for dir in ${libdir} /opt/local/lib /usr/local/lib ;do
|
4355 |
for dir in ${libdir} /opt/local/lib /usr/local/lib ;do
|
|
|
4356 |
CPPFLAGS="$S_CPPFLAGS -I$dir/../include"
|
|
|
4357 |
|
4360 |
LDFLAGS="$S_LDFLAGS -L$dir"
|
4358 |
LDFLAGS="$S_LDFLAGS -L$dir"
|
4361 |
unset ac_cv_lib_iconv_iconv_open
|
|
|
4362 |
|
4359 |
|
4363 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5
|
|
|
4364 |
$as_echo_n "checking for iconv_open in -liconv... " >&6; }
|
|
|
4365 |
if ${ac_cv_lib_iconv_iconv_open+:} false; then :
|
|
|
4366 |
$as_echo_n "(cached) " >&6
|
|
|
4367 |
else
|
|
|
4368 |
ac_check_lib_save_LIBS=$LIBS
|
|
|
4369 |
LIBS="-liconv $LIBS"
|
|
|
4370 |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
4360 |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
4371 |
/* end confdefs.h. */
|
4361 |
/* end confdefs.h. */
|
4372 |
|
4362 |
#include <stdlib.h>
|
4373 |
/* Override any GCC internal prototype to avoid an error.
|
4363 |
#include <iconv.h>
|
4374 |
Use char because int might match the return type of a GCC
|
|
|
4375 |
builtin and then its argument prototype would still apply. */
|
|
|
4376 |
#ifdef __cplusplus
|
|
|
4377 |
extern "C"
|
|
|
4378 |
#endif
|
|
|
4379 |
char iconv_open ();
|
|
|
4380 |
int
|
4364 |
int
|
4381 |
main ()
|
4365 |
main ()
|
4382 |
{
|
4366 |
{
|
4383 |
return iconv_open ();
|
4367 |
iconv_t cd = iconv_open("","");
|
|
|
4368 |
iconv(cd,NULL,NULL,NULL,NULL);
|
|
|
4369 |
iconv_close(cd);
|
4384 |
;
|
4370 |
;
|
4385 |
return 0;
|
4371 |
return 0;
|
4386 |
}
|
4372 |
}
|
4387 |
_ACEOF
|
4373 |
_ACEOF
|
4388 |
if ac_fn_cxx_try_link "$LINENO"; then :
|
4374 |
if ac_fn_cxx_try_link "$LINENO"; then :
|
4389 |
ac_cv_lib_iconv_iconv_open=yes
|
4375 |
LIBICONV="-L$dir";INCICONV=-I$dir/../include
|
4390 |
else
|
|
|
4391 |
ac_cv_lib_iconv_iconv_open=no
|
|
|
4392 |
fi
|
4376 |
fi
|
4393 |
rm -f core conftest.err conftest.$ac_objext \
|
4377 |
rm -f core conftest.err conftest.$ac_objext \
|
4394 |
conftest$ac_exeext conftest.$ac_ext
|
4378 |
conftest$ac_exeext conftest.$ac_ext
|
4395 |
LIBS=$ac_check_lib_save_LIBS
|
|
|
4396 |
fi
|
|
|
4397 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv_open" >&5
|
|
|
4398 |
$as_echo "$ac_cv_lib_iconv_iconv_open" >&6; }
|
|
|
4399 |
if test "x$ac_cv_lib_iconv_iconv_open" = xyes; then :
|
|
|
4400 |
LIBICONV="-L$dir -liconv";INCICONV=-I$dir/../include
|
|
|
4401 |
fi
|
|
|
4402 |
|
|
|
4403 |
if test A"$LIBICONV" != A ; then
|
4379 |
if test A"$LIBICONV" != A ; then
|
4404 |
break
|
4380 |
break
|
4405 |
fi
|
4381 |
fi
|
4406 |
done
|
|
|
4407 |
|
4382 |
|
4408 |
if test A"$LIBICONV" = A; then
|
|
|
4409 |
dir=${libdir}
|
|
|
4410 |
LDFLAGS="$S_LDFLAGS -L$dir"
|
4383 |
LDFLAGS="$S_LDFLAGS -L$dir -liconv"
|
4411 |
unset ac_cv_lib_iconv_iconv_open
|
|
|
4412 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -lc" >&5
|
|
|
4413 |
$as_echo_n "checking for iconv_open in -lc... " >&6; }
|
|
|
4414 |
if ${ac_cv_lib_c_iconv_open+:} false; then :
|
|
|
4415 |
$as_echo_n "(cached) " >&6
|
|
|
4416 |
else
|
|
|
4417 |
ac_check_lib_save_LIBS=$LIBS
|
|
|
4418 |
LIBS="-lc $LIBS"
|
|
|
4419 |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
4384 |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
4420 |
/* end confdefs.h. */
|
4385 |
/* end confdefs.h. */
|
4421 |
|
4386 |
#include <stdlib.h>
|
4422 |
/* Override any GCC internal prototype to avoid an error.
|
4387 |
#include <iconv.h>
|
4423 |
Use char because int might match the return type of a GCC
|
|
|
4424 |
builtin and then its argument prototype would still apply. */
|
|
|
4425 |
#ifdef __cplusplus
|
|
|
4426 |
extern "C"
|
|
|
4427 |
#endif
|
|
|
4428 |
char iconv_open ();
|
|
|
4429 |
int
|
4388 |
int
|
4430 |
main ()
|
4389 |
main ()
|
4431 |
{
|
4390 |
{
|
4432 |
return iconv_open ();
|
4391 |
iconv_t cd = iconv_open("","");
|
|
|
4392 |
iconv(cd,NULL,NULL,NULL,NULL);
|
|
|
4393 |
iconv_close(cd);
|
4433 |
;
|
4394 |
;
|
4434 |
return 0;
|
4395 |
return 0;
|
4435 |
}
|
4396 |
}
|
4436 |
_ACEOF
|
4397 |
_ACEOF
|
4437 |
if ac_fn_cxx_try_link "$LINENO"; then :
|
4398 |
if ac_fn_cxx_try_link "$LINENO"; then :
|
4438 |
ac_cv_lib_c_iconv_open=yes
|
4399 |
LIBICONV="-L$dir -liconv";INCICONV=-I$dir/../include
|
4439 |
else
|
|
|
4440 |
ac_cv_lib_c_iconv_open=no
|
|
|
4441 |
fi
|
4400 |
fi
|
4442 |
rm -f core conftest.err conftest.$ac_objext \
|
4401 |
rm -f core conftest.err conftest.$ac_objext \
|
4443 |
conftest$ac_exeext conftest.$ac_ext
|
4402 |
conftest$ac_exeext conftest.$ac_ext
|
4444 |
LIBS=$ac_check_lib_save_LIBS
|
4403 |
if test A"$LIBICONV" != A ; then
|
|
|
4404 |
break
|
4445 |
fi
|
4405 |
fi
|
4446 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_iconv_open" >&5
|
|
|
4447 |
$as_echo "$ac_cv_lib_c_iconv_open" >&6; }
|
|
|
4448 |
if test "x$ac_cv_lib_c_iconv_open" = xyes; then :
|
|
|
4449 |
LIBICONV=NONE;INCICONV=-I/usr/include
|
|
|
4450 |
fi
|
|
|
4451 |
|
4406 |
|
4452 |
fi
|
4407 |
done
|
4453 |
|
4408 |
|
4454 |
LDFLAGS=$S_LDFLAGS
|
4409 |
LDFLAGS=$S_LDFLAGS
|
|
|
4410 |
CPPFLAGS=$S_CPPFLAGS
|
|
|
4411 |
|
4455 |
if test A"$LIBICONV" = A ; then
|
4412 |
if test A"$LIBICONV" = A ; then
|
4456 |
as_fn_error $? "Cannot find iconv_open anywhere. Please install iconv" "$LINENO" 5
|
4413 |
as_fn_error $? "Cannot find iconv_open anywhere. Please install iconv" "$LINENO" 5
|
4457 |
exit 1
|
4414 |
exit 1
|
4458 |
fi
|
4415 |
fi
|
4459 |
if test A"$LIBICONV" = ANONE ; then
|
|
|
4460 |
LIBICONV=""
|
|
|
4461 |
fi
|
|
|
4462 |
#echo LIBICONV $LIBICONV
|
4416 |
echo LIBICONV $LIBICONV
|
4463 |
#echo INCICONV $INCICONV
|
4417 |
echo INCICONV $INCICONV
|
4464 |
|
4418 |
|
4465 |
CPPFLAGS="$CPPFLAGS $INCICONV"
|
4419 |
CPPFLAGS="$CPPFLAGS $INCICONV"
|
4466 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of inbuf parameter to iconv" >&5
|
4420 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of inbuf parameter to iconv" >&5
|
4467 |
$as_echo_n "checking for type of inbuf parameter to iconv... " >&6; }
|
4421 |
$as_echo_n "checking for type of inbuf parameter to iconv... " >&6; }
|
4468 |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
4422 |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
... |
|
... |
4492 |
$as_echo "#define RCL_ICONV_INBUF_CONST 1" >>confdefs.h
|
4446 |
$as_echo "#define RCL_ICONV_INBUF_CONST 1" >>confdefs.h
|
4493 |
|
4447 |
|
4494 |
fi
|
4448 |
fi
|
4495 |
|
4449 |
|
4496 |
|
4450 |
|
|
|
4451 |
############# Putenv
|
4497 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of string parameter to putenv" >&5
|
4452 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of string parameter to putenv" >&5
|
4498 |
$as_echo_n "checking for type of string parameter to putenv... " >&6; }
|
4453 |
$as_echo_n "checking for type of string parameter to putenv... " >&6; }
|
4499 |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
4454 |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
4500 |
/* end confdefs.h. */
|
4455 |
/* end confdefs.h. */
|
4501 |
|
4456 |
|
|
... |
|
... |
4520 |
if test X$rcl_putenv_string_const = X1 ; then
|
4475 |
if test X$rcl_putenv_string_const = X1 ; then
|
4521 |
|
4476 |
|
4522 |
$as_echo "#define PUTENV_ARG_CONST 1" >>confdefs.h
|
4477 |
$as_echo "#define PUTENV_ARG_CONST 1" >>confdefs.h
|
4523 |
|
4478 |
|
4524 |
fi
|
4479 |
fi
|
|
|
4480 |
|
4525 |
|
4481 |
|
4526 |
#### Look for Xapian
|
4482 |
#### Look for Xapian
|
4527 |
# Extract the first word of "xapian-config", so it can be a program name with args.
|
4483 |
# Extract the first word of "xapian-config", so it can be a program name with args.
|
4528 |
set dummy xapian-config; ac_word=$2
|
4484 |
set dummy xapian-config; ac_word=$2
|
4529 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
4485 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|