X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=sim%2Fcommon%2Fconfigure;h=11c0e64e6c966ad98c6ebea919a6d12906ee182d;hb=764f1408a3fa9b1991e3e18d17ea857776c1503e;hp=8fc9d0440e95bfa4f6761ca745eb9126c2b2cf59;hpb=a9cbbe6d3e713210dcb111b1fa2dacda55eab456;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/common/configure b/sim/common/configure index 8fc9d0440e..11c0e64e6c 100755 --- a/sim/common/configure +++ b/sim/common/configure @@ -3522,7 +3522,7 @@ fi # These aren't all needed yet, but will be eventually. -for ac_hdr in stdlib.h string.h strings.h time.h sys/times.h +for ac_hdr in stdlib.h string.h strings.h time.h sys/times.h sys/stat.h sys/mman.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -3562,6 +3562,61 @@ else fi done +for ac_func in mmap munmap +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3569: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + trap '' 1 2 15 cat > confcache <<\EOF