comparison configure @ 32148:9e345136c335

Simplify dynamic loader check.
author diego
date Tue, 14 Sep 2010 10:05:46 +0000
parents d02cedf3bf1c
children 0261b706dddf
comparison
equal deleted inserted replaced
32147:d02cedf3bf1c 32148:9e345136c335
3577 else 3577 else
3578 def_mman_has_map_failed='#define MAP_FAILED ((void *) -1)' 3578 def_mman_has_map_failed='#define MAP_FAILED ((void *) -1)'
3579 fi 3579 fi
3580 3580
3581 echocheck "dynamic loader" 3581 echocheck "dynamic loader"
3582 cat > $TMPC << EOF
3583 #include <stddef.h>
3584 #include <dlfcn.h>
3585 int main(void) { dlopen("", 0); dlclose(NULL); dlsym(NULL, ""); return 0; }
3586 EOF
3587 _dl=no 3582 _dl=no
3588 for _ld_tmp in "" "-ldl" ; do 3583 for _ld_dl in "" -ldl; do
3589 cc_check $_ld_tmp && _ld_dl="$_ld_tmp" && _dl=yes && break 3584 function_check dlfcn.h 'dlopen("", 0)' $_ld_dl && _ld_dl="$_ld_tmp" && _dl=yes && break
3590 done 3585 done
3591 if test "$_dl" = yes ; then 3586 if test "$_dl" = yes ; then
3592 def_dl='#define HAVE_LIBDL 1' 3587 def_dl='#define HAVE_LIBDL 1'
3593 else 3588 else
3594 def_dl='#undef HAVE_LIBDL' 3589 def_dl='#undef HAVE_LIBDL'