| | 3371 | # Extract the first word of "iconv", so it can be a program name with args. |
|---|
| | 3372 | set dummy iconv; ac_word=$2 |
|---|
| | 3373 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
|---|
| | 3374 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } |
|---|
| | 3375 | if test "${ac_cv_path_ICONV+set}" = set; then |
|---|
| | 3376 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|---|
| | 3377 | else |
|---|
| | 3378 | case $ICONV in |
|---|
| | 3379 | [\\/]* | ?:[\\/]*) |
|---|
| | 3380 | ac_cv_path_ICONV="$ICONV" # Let the user override the test with a path. |
|---|
| | 3381 | ;; |
|---|
| | 3382 | *) |
|---|
| | 3383 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
|---|
| | 3384 | for as_dir in $PATH |
|---|
| | 3385 | do |
|---|
| | 3386 | IFS=$as_save_IFS |
|---|
| | 3387 | test -z "$as_dir" && as_dir=. |
|---|
| | 3388 | for ac_exec_ext in '' $ac_executable_extensions; do |
|---|
| | 3389 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then |
|---|
| | 3390 | ac_cv_path_ICONV="$as_dir/$ac_word$ac_exec_ext" |
|---|
| | 3391 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
|---|
| | 3392 | break 2 |
|---|
| | 3393 | fi |
|---|
| | 3394 | done |
|---|
| | 3395 | done |
|---|
| | 3396 | IFS=$as_save_IFS |
|---|
| | 3397 | |
|---|
| | 3398 | ;; |
|---|
| | 3399 | esac |
|---|
| | 3400 | fi |
|---|
| | 3401 | ICONV=$ac_cv_path_ICONV |
|---|
| | 3402 | if test -n "$ICONV"; then |
|---|
| | 3403 | { echo "$as_me:$LINENO: result: $ICONV" >&5 |
|---|
| | 3404 | echo "${ECHO_T}$ICONV" >&6; } |
|---|
| | 3405 | else |
|---|
| | 3406 | { echo "$as_me:$LINENO: result: no" >&5 |
|---|
| | 3407 | echo "${ECHO_T}no" >&6; } |
|---|
| | 3408 | fi |
|---|
| | 3409 | |
|---|
| | 3410 | |
|---|
| | 8658 | |
|---|
| | 8659 | fi |
|---|
| | 8660 | |
|---|
| | 8661 | |
|---|
| | 8662 | { echo "$as_me:$LINENO: checking for iconv_open in -liconv" >&5 |
|---|
| | 8663 | echo $ECHO_N "checking for iconv_open in -liconv... $ECHO_C" >&6; } |
|---|
| | 8664 | if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then |
|---|
| | 8665 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|---|
| | 8666 | else |
|---|
| | 8667 | ac_check_lib_save_LIBS=$LIBS |
|---|
| | 8668 | LIBS="-liconv $LIBS" |
|---|
| | 8669 | cat >conftest.$ac_ext <<_ACEOF |
|---|
| | 8670 | /* confdefs.h. */ |
|---|
| | 8671 | _ACEOF |
|---|
| | 8672 | cat confdefs.h >>conftest.$ac_ext |
|---|
| | 8673 | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| | 8674 | /* end confdefs.h. */ |
|---|
| | 8675 | |
|---|
| | 8676 | /* Override any GCC internal prototype to avoid an error. |
|---|
| | 8677 | Use char because int might match the return type of a GCC |
|---|
| | 8678 | builtin and then its argument prototype would still apply. */ |
|---|
| | 8679 | #ifdef __cplusplus |
|---|
| | 8680 | extern "C" |
|---|
| | 8681 | #endif |
|---|
| | 8682 | char iconv_open (); |
|---|
| | 8683 | int |
|---|
| | 8684 | main () |
|---|
| | 8685 | { |
|---|
| | 8686 | return iconv_open (); |
|---|
| | 8687 | ; |
|---|
| | 8688 | return 0; |
|---|
| | 8689 | } |
|---|
| | 8690 | _ACEOF |
|---|
| | 8691 | rm -f conftest.$ac_objext conftest$ac_exeext |
|---|
| | 8692 | if { (ac_try="$ac_link" |
|---|
| | 8693 | case "(($ac_try" in |
|---|
| | 8694 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
|---|
| | 8695 | *) ac_try_echo=$ac_try;; |
|---|
| | 8696 | esac |
|---|
| | 8697 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
|---|
| | 8698 | (eval "$ac_link") 2>conftest.er1 |
|---|
| | 8699 | ac_status=$? |
|---|
| | 8700 | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| | 8701 | rm -f conftest.er1 |
|---|
| | 8702 | cat conftest.err >&5 |
|---|
| | 8703 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 8704 | (exit $ac_status); } && |
|---|
| | 8705 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
|---|
| | 8706 | { (case "(($ac_try" in |
|---|
| | 8707 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
|---|
| | 8708 | *) ac_try_echo=$ac_try;; |
|---|
| | 8709 | esac |
|---|
| | 8710 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
|---|
| | 8711 | (eval "$ac_try") 2>&5 |
|---|
| | 8712 | ac_status=$? |
|---|
| | 8713 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 8714 | (exit $ac_status); }; } && |
|---|
| | 8715 | { ac_try='test -s conftest$ac_exeext' |
|---|
| | 8716 | { (case "(($ac_try" in |
|---|
| | 8717 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
|---|
| | 8718 | *) ac_try_echo=$ac_try;; |
|---|
| | 8719 | esac |
|---|
| | 8720 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
|---|
| | 8721 | (eval "$ac_try") 2>&5 |
|---|
| | 8722 | ac_status=$? |
|---|
| | 8723 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 8724 | (exit $ac_status); }; }; then |
|---|
| | 8725 | ac_cv_lib_iconv_iconv_open=yes |
|---|
| | 8726 | else |
|---|
| | 8727 | echo "$as_me: failed program was:" >&5 |
|---|
| | 8728 | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| | 8729 | |
|---|
| | 8730 | ac_cv_lib_iconv_iconv_open=no |
|---|
| | 8731 | fi |
|---|
| | 8732 | |
|---|
| | 8733 | rm -f core conftest.err conftest.$ac_objext \ |
|---|
| | 8734 | conftest$ac_exeext conftest.$ac_ext |
|---|
| | 8735 | LIBS=$ac_check_lib_save_LIBS |
|---|
| | 8736 | fi |
|---|
| | 8737 | { echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv_open" >&5 |
|---|
| | 8738 | echo "${ECHO_T}$ac_cv_lib_iconv_iconv_open" >&6; } |
|---|
| | 8739 | if test $ac_cv_lib_iconv_iconv_open = yes; then |
|---|
| | 8740 | cat >>confdefs.h <<_ACEOF |
|---|
| | 8741 | #define HAVE_LIBICONV 1 |
|---|
| | 8742 | _ACEOF |
|---|
| | 8743 | |
|---|
| | 8744 | LIBS="-liconv $LIBS" |
|---|
| | 13365 | |
|---|
| | 13366 | |
|---|
| | 13367 | |
|---|
| | 13368 | for ac_func in iconv iconvctl |
|---|
| | 13369 | do |
|---|
| | 13370 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
|---|
| | 13371 | { echo "$as_me:$LINENO: checking for $ac_func" >&5 |
|---|
| | 13372 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } |
|---|
| | 13373 | if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then |
|---|
| | 13374 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|---|
| | 13375 | else |
|---|
| | 13376 | cat >conftest.$ac_ext <<_ACEOF |
|---|
| | 13377 | /* confdefs.h. */ |
|---|
| | 13378 | _ACEOF |
|---|
| | 13379 | cat confdefs.h >>conftest.$ac_ext |
|---|
| | 13380 | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| | 13381 | /* end confdefs.h. */ |
|---|
| | 13382 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
|---|
| | 13383 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ |
|---|
| | 13384 | #define $ac_func innocuous_$ac_func |
|---|
| | 13385 | |
|---|
| | 13386 | /* System header to define __stub macros and hopefully few prototypes, |
|---|
| | 13387 | which can conflict with char $ac_func (); below. |
|---|
| | 13388 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
|---|
| | 13389 | <limits.h> exists even on freestanding compilers. */ |
|---|
| | 13390 | |
|---|
| | 13391 | #ifdef __STDC__ |
|---|
| | 13392 | # include <limits.h> |
|---|
| | 13393 | #else |
|---|
| | 13394 | # include <assert.h> |
|---|
| | 13395 | #endif |
|---|
| | 13396 | |
|---|
| | 13397 | #undef $ac_func |
|---|
| | 13398 | |
|---|
| | 13399 | /* Override any GCC internal prototype to avoid an error. |
|---|
| | 13400 | Use char because int might match the return type of a GCC |
|---|
| | 13401 | builtin and then its argument prototype would still apply. */ |
|---|
| | 13402 | #ifdef __cplusplus |
|---|
| | 13403 | extern "C" |
|---|
| | 13404 | #endif |
|---|
| | 13405 | char $ac_func (); |
|---|
| | 13406 | /* The GNU C library defines this for functions which it implements |
|---|
| | 13407 | to always fail with ENOSYS. Some functions are actually named |
|---|
| | 13408 | something starting with __ and the normal name is an alias. */ |
|---|
| | 13409 | #if defined __stub_$ac_func || defined __stub___$ac_func |
|---|
| | 13410 | choke me |
|---|
| | 13411 | #endif |
|---|
| | 13412 | |
|---|
| | 13413 | int |
|---|
| | 13414 | main () |
|---|
| | 13415 | { |
|---|
| | 13416 | return $ac_func (); |
|---|
| | 13417 | ; |
|---|
| | 13418 | return 0; |
|---|
| | 13419 | } |
|---|
| | 13420 | _ACEOF |
|---|
| | 13421 | rm -f conftest.$ac_objext conftest$ac_exeext |
|---|
| | 13422 | if { (ac_try="$ac_link" |
|---|
| | 13423 | case "(($ac_try" in |
|---|
| | 13424 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
|---|
| | 13425 | *) ac_try_echo=$ac_try;; |
|---|
| | 13426 | esac |
|---|
| | 13427 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
|---|
| | 13428 | (eval "$ac_link") 2>conftest.er1 |
|---|
| | 13429 | ac_status=$? |
|---|
| | 13430 | grep -v '^ *+' conftest.er1 >conftest.err |
|---|
| | 13431 | rm -f conftest.er1 |
|---|
| | 13432 | cat conftest.err >&5 |
|---|
| | 13433 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 13434 | (exit $ac_status); } && |
|---|
| | 13435 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
|---|
| | 13436 | { (case "(($ac_try" in |
|---|
| | 13437 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
|---|
| | 13438 | *) ac_try_echo=$ac_try;; |
|---|
| | 13439 | esac |
|---|
| | 13440 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
|---|
| | 13441 | (eval "$ac_try") 2>&5 |
|---|
| | 13442 | ac_status=$? |
|---|
| | 13443 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 13444 | (exit $ac_status); }; } && |
|---|
| | 13445 | { ac_try='test -s conftest$ac_exeext' |
|---|
| | 13446 | { (case "(($ac_try" in |
|---|
| | 13447 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
|---|
| | 13448 | *) ac_try_echo=$ac_try;; |
|---|
| | 13449 | esac |
|---|
| | 13450 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
|---|
| | 13451 | (eval "$ac_try") 2>&5 |
|---|
| | 13452 | ac_status=$? |
|---|
| | 13453 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 13454 | (exit $ac_status); }; }; then |
|---|
| | 13455 | eval "$as_ac_var=yes" |
|---|
| | 13456 | else |
|---|
| | 13457 | echo "$as_me: failed program was:" >&5 |
|---|
| | 13458 | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| | 13459 | |
|---|
| | 13460 | eval "$as_ac_var=no" |
|---|
| | 13461 | fi |
|---|
| | 13462 | |
|---|
| | 13463 | rm -f core conftest.err conftest.$ac_objext \ |
|---|
| | 13464 | conftest$ac_exeext conftest.$ac_ext |
|---|
| | 13465 | fi |
|---|
| | 13466 | ac_res=`eval echo '${'$as_ac_var'}'` |
|---|
| | 13467 | { echo "$as_me:$LINENO: result: $ac_res" >&5 |
|---|
| | 13468 | echo "${ECHO_T}$ac_res" >&6; } |
|---|
| | 13469 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
|---|
| | 13470 | cat >>confdefs.h <<_ACEOF |
|---|
| | 13471 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
|---|
| | 13472 | _ACEOF |
|---|
| | 13473 | |
|---|
| | 13474 | fi |
|---|
| | 13475 | done |
|---|