Changeset 34
- Timestamp:
- 07/11/04 11:58:14 (4 years ago)
- Files:
-
- wire/trunk/configure (modified) (6 diffs)
- wire/trunk/configure.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wire/trunk/configure
r12 r34 4238 4238 _ACEOF 4239 4239 4240 echo "$as_me:$LINENO: checking for main in -liconv" >&5 4240 echo "$as_me:$LINENO: checking for iconv" >&5 4241 echo $ECHO_N "checking for iconv... $ECHO_C" >&6 4242 if test "${ac_cv_func_iconv+set}" = set; then 4243 echo $ECHO_N "(cached) $ECHO_C" >&6 4244 else 4245 cat >conftest.$ac_ext <<_ACEOF 4246 #line $LINENO "configure" 4247 /* confdefs.h. */ 4248 _ACEOF 4249 cat confdefs.h >>conftest.$ac_ext 4250 cat >>conftest.$ac_ext <<_ACEOF 4251 /* end confdefs.h. */ 4252 /* System header to define __stub macros and hopefully few prototypes, 4253 which can conflict with char iconv (); below. 4254 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 4255 <limits.h> exists even on freestanding compilers. */ 4256 #ifdef __STDC__ 4257 # include <limits.h> 4258 #else 4259 # include <assert.h> 4260 #endif 4261 /* Override any gcc2 internal prototype to avoid an error. */ 4262 #ifdef __cplusplus 4263 extern "C" 4264 { 4265 #endif 4266 /* We use char because int might match the return type of a gcc2 4267 builtin and then its argument prototype would still apply. */ 4268 char iconv (); 4269 /* The GNU C library defines this for functions which it implements 4270 to always fail with ENOSYS. Some functions are actually named 4271 something starting with __ and the normal name is an alias. */ 4272 #if defined (__stub_iconv) || defined (__stub___iconv) 4273 choke me 4274 #else 4275 char (*f) () = iconv; 4276 #endif 4277 #ifdef __cplusplus 4278 } 4279 #endif 4280 4281 int 4282 main () 4283 { 4284 return f != iconv; 4285 ; 4286 return 0; 4287 } 4288 _ACEOF 4289 rm -f conftest.$ac_objext conftest$ac_exeext 4290 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4291 (eval $ac_link) 2>&5 4292 ac_status=$? 4293 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4294 (exit $ac_status); } && 4295 { ac_try='test -s conftest$ac_exeext' 4296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4297 (eval $ac_try) 2>&5 4298 ac_status=$? 4299 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4300 (exit $ac_status); }; }; then 4301 ac_cv_func_iconv=yes 4302 else 4303 echo "$as_me: failed program was:" >&5 4304 sed 's/^/| /' conftest.$ac_ext >&5 4305 4306 ac_cv_func_iconv=no 4307 fi 4308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 4309 fi 4310 echo "$as_me:$LINENO: result: $ac_cv_func_iconv" >&5 4311 echo "${ECHO_T}$ac_cv_func_iconv" >&6 4312 if test $ac_cv_func_iconv = yes; then 4313 : 4314 else 4315 4316 echo "$as_me:$LINENO: checking for main in -liconv" >&5 4241 4317 echo $ECHO_N "checking for main in -liconv... $ECHO_C" >&6 4242 4318 if test "${ac_cv_lib_iconv_main+set}" = set; then … … 4288 4364 if test $ac_cv_lib_iconv_main = yes; then 4289 4365 4290 LIBS="$LIBS -liconv"4291 4292 echo "$as_me:$LINENO: checking if iconv understands Unicode and ISO-8859-1" >&54366 LIBS="$LIBS -liconv" 4367 4368 echo "$as_me:$LINENO: checking if iconv understands Unicode and ISO-8859-1" >&5 4293 4369 echo $ECHO_N "checking if iconv understands Unicode and ISO-8859-1... $ECHO_C" >&6 4294 if test "$cross_compiling" = yes; then4370 if test "$cross_compiling" = yes; then 4295 4371 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling 4296 4372 See \`config.log' for more details." >&5 … … 4307 4383 /* end confdefs.h. */ 4308 4384 4309 #include <iconv.h>4310 int main(void) {4311 iconv_t conv = iconv_open("UTF-8", "ISO-8859-1");4312 if(conv == (iconv_t) -1)4313 return 1;4314 return 0;4315 }4385 #include <iconv.h> 4386 int main(void) { 4387 iconv_t conv = iconv_open("UTF-8", "ISO-8859-1"); 4388 if(conv == (iconv_t) -1) 4389 return 1; 4390 return 0; 4391 } 4316 4392 4317 4393 _ACEOF … … 4328 4404 (exit $ac_status); }; }; then 4329 4405 4330 echo "$as_me:$LINENO: result: yes" >&54406 echo "$as_me:$LINENO: result: yes" >&5 4331 4407 echo "${ECHO_T}yes" >&6 4332 4408 … … 4338 4414 ( exit $ac_status ) 4339 4415 4340 { { echo "$as_me:$LINENO: error: no" >&54416 { { echo "$as_me:$LINENO: error: no" >&5 4341 4417 echo "$as_me: error: no" >&2;} 4342 4418 { (exit 1); exit 1; }; } … … 4360 4436 env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 4361 4437 { (exit 1); exit 1; }; } 4438 4439 4440 fi 4362 4441 4363 4442 wire/trunk/configure.in
r12 r34 103 103 # Check for the iconv library 104 104 AC_CHECK_HEADERS([iconv.h], [ 105 AC_CHECK_LIB([iconv], [main], [ 106 LIBS="$LIBS -liconv" 107 108 AC_MSG_CHECKING([if iconv understands Unicode and ISO-8859-1]) 109 AC_TRY_RUN([ 110 #include <iconv.h> 111 int main(void) { 112 iconv_t conv = iconv_open("UTF-8", "ISO-8859-1"); 113 if(conv == (iconv_t) -1) 114 return 1; 115 return 0; 116 } 105 AC_CHECK_FUNC([iconv], [], [ 106 AC_CHECK_LIB([iconv], [main], [ 107 LIBS="$LIBS -liconv" 108 109 AC_MSG_CHECKING([if iconv understands Unicode and ISO-8859-1]) 110 AC_TRY_RUN([ 111 #include <iconv.h> 112 int main(void) { 113 iconv_t conv = iconv_open("UTF-8", "ISO-8859-1"); 114 if(conv == (iconv_t) -1) 115 return 1; 116 return 0; 117 } 118 ], [ 119 AC_MSG_RESULT([yes]) 120 ], [ 121 AC_MSG_ERROR([no]) 122 ]) 117 123 ], [ 118 AC_MSG_RESULT([yes]) 119 ], [ 120 AC_MSG_ERROR([no]) 121 ]) 122 ], [ 123 WR_MSG_LIB_ERROR([iconv]) 124 WR_MSG_LIB_ERROR([iconv]) 125 ]) 124 126 ]) 125 127 ], [
