--- rpl/Attic/configure 2011/09/17 10:38:30 1.84 +++ rpl/Attic/configure 2011/09/21 09:09:21 1.85 @@ -6004,9 +6004,17 @@ else IPCS_SYSV=yes fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX semaphores" >&5 -$as_echo_n "checking for POSIX semaphores... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + REG=$LDFLAGS +LDFLAGS=-lrt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX semaphores and shared objects" >&5 +$as_echo_n "checking for POSIX semaphores and shared objects... " >&6; } +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -6015,17 +6023,20 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ int main () { - int fd; char *sem = "/sem.test"; + int fd; char *sem = "/test"; fd = shm_open(sem , O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); close(fd); shm_unlink(sem); + fd = sem_open(sem, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0); + close(fd); + sem_unlink(sem); return(0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_run "$LINENO"; then : IPCS_SYSV=-UIPCS_SYSV; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else @@ -6033,7 +6044,11 @@ else $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +LDFLAGS=$REG fi