Another attempt to fix xxxBSD

This commit is contained in:
Michiel Broek 2007-05-27 13:02:34 +00:00
parent ea47c714cc
commit 72f8d399cb
2 changed files with 105 additions and 23 deletions

124
configure vendored
View File

@ -9397,13 +9397,9 @@ _ACEOF
fi fi
done done
{ echo "$as_me:$LINENO: checking for iconv_open" >&5
for ac_func in iconv_open echo $ECHO_N "checking for iconv_open... $ECHO_C" >&6; }
do if test "${ac_cv_func_iconv_open+set}" = set; then
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
@ -9412,12 +9408,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. /* Define iconv_open to an innocuous variant, in case <limits.h> declares iconv_open.
For example, HP-UX 11i <limits.h> declares gettimeofday. */ For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $ac_func innocuous_$ac_func #define iconv_open innocuous_iconv_open
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. which can conflict with char iconv_open (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */ <limits.h> exists even on freestanding compilers. */
@ -9427,7 +9423,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h> # include <assert.h>
#endif #endif
#undef $ac_func #undef iconv_open
/* Override any GCC internal prototype to avoid an error. /* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC Use char because int might match the return type of a GCC
@ -9435,18 +9431,18 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
#endif #endif
char $ac_func (); char iconv_open ();
/* The GNU C library defines this for functions which it implements /* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */ something starting with __ and the normal name is an alias. */
#if defined __stub_$ac_func || defined __stub___$ac_func #if defined __stub_iconv_open || defined __stub___iconv_open
choke me choke me
#endif #endif
int int
main () main ()
{ {
return $ac_func (); return iconv_open ();
; ;
return 0; return 0;
} }
@ -9485,27 +9481,111 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
eval "$as_ac_var=yes" ac_cv_func_iconv_open=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no" ac_cv_func_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
fi fi
ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_cv_func_iconv_open" >&5
{ echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_cv_func_iconv_open" >&6; }
echo "${ECHO_T}$ac_res" >&6; } if test $ac_cv_func_iconv_open = yes; then
if test `eval echo '${'$as_ac_var'}'` = yes; then :
else
{ echo "$as_me:$LINENO: checking for iconv_open in -liconv" >&5
echo $ECHO_N "checking for iconv_open in -liconv... $ECHO_C" >&6; }
if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-liconv $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
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
main ()
{
return iconv_open ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext 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>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); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (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); }; } &&
{ ac_try='test -s 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
ac_cv_lib_iconv_iconv_open=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_iconv_iconv_open=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv_open" >&5
echo "${ECHO_T}$ac_cv_lib_iconv_iconv_open" >&6; }
if test $ac_cv_lib_iconv_iconv_open = yes; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 #define HAVE_LIBICONV 1
_ACEOF _ACEOF
LIBS="-liconv $LIBS"
fi
fi fi
done
# #

View File

@ -228,7 +228,9 @@ AC_TYPE_SIGNAL
AC_FUNC_UTIME_NULL AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS(gettimeofday re_comp select) AC_CHECK_FUNCS(gettimeofday re_comp select)
AC_CHECK_FUNCS(getspnam initgroups updwtmp updwtmpx) AC_CHECK_FUNCS(getspnam initgroups updwtmp updwtmpx)
AC_CHECK_FUNCS(iconv_open) AC_CHECK_FUNC(iconv_open,,
AC_CHECK_LIB(iconv, iconv_open)
)
# #
# Check for usefull external programs # Check for usefull external programs