--- rpl/Attic/configure 2011/09/16 14:42:01 1.80 +++ rpl/Attic/configure 2011/09/16 16:37:07 1.81 @@ -1464,7 +1464,7 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-optimization set compiler flags [default=environment variables -O3] - --enable-sysv-ipcs use SystemV IPC functions [default=no] + --enable-sysv-ipcs use SystemV IPC functions [default=guessed] --enable-full-static build static RPL/2 engine [default=shared] --enable-final-encoding force final encoding [default=guessed] --enable-tex provide the TeX support [default=guessed] @@ -1888,6 +1888,48 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache @@ -1942,48 +1984,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_type -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -6003,10 +6003,83 @@ else IPCS_SYSV=yes fi else - IPCS_SYSV=no + { $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 +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ + int fd; char *sem = "/sem.test"; +fd = shm_open(sem , O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); + close(fd); + shm_unlink(sem); + return(0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + IPCS_SYSV=-UIPCS_SYSV; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + IPCS_SYSV=-DIPCS_SYSV; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +if test "$IPCS_SYSV" = "-UIPCS_SYSV"; then +REG=$LDFLAGS +LDFLAGS=-pthread +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX anonymous semaphores" >&5 +$as_echo_n "checking for POSIX anonymous semaphores... " >&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 + +int +main () +{ + sem_t sem; + if (sem_init(&sem, 1, 0) != 0) return(1); + sem_destroy(&sem); + return(0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +] +LDFLAGS=$REG +REG="" +else + SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES +fi + # Check whether --enable-full-static was given. if test "${enable_full_static+set}" = set; then : enableval=$enable_full_static; @@ -9144,8 +9217,6 @@ case $OS in Darwin) EXPORT_DYNAMIC=-Wl,-flat_namespace NESTED_FUNCTIONS=-fnested-functions - SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES - IPCS_SYSV=-UIPCS_SYSV CXXFLAGS="$CXXFLAGS -D_GLIBCXX_FULLY_DYNAMIC_STRING" ac_configure_args="$ac_configure_args --with-readline=builtin \ --disable-shared --enable-static --enable-threads \ @@ -9159,8 +9230,6 @@ case $OS in Cygwin) EXPORT_DYNAMIC=-Wl,--export-all-symbols NESTED_FUNCTIONS= - SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES - IPCS_SYSV=-UIPCS_SYSV ac_configure_args="$ac_configure_args --with-readline=builtin \ --disable-shared --enable-static --enable-threads \ CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ @@ -9173,8 +9242,6 @@ case $OS in Interix) EXPORT_DYNAMIC=-Wl,--export-all-symbols NESTED_FUNCTIONS= - SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES - IPCS_SYSV=-UIPCS_SYSV ac_configure_args="$ac_configure_args --with-readline=builtin \ --disable-shared --enable-static --enable-threads \ CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ @@ -9187,8 +9254,6 @@ case $OS in AIX) EXPORT_DYNAMIC=-Wl,--export-dynamic NESTED_FUNCTIONS= - SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES - IPCS_SYSV=-UIPCS_SYSV ac_configure_args="$ac_configure_args --with-readline=builtin \ --disable-shared --enable-static --enable-threads \ CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ @@ -9205,8 +9270,6 @@ case $OS in OS=OS2 NESTED_FUNCTIONS= EXPORT_DYNAMIC=-Zmap - SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES - IPCS_SYSV=-DIPCS_SYSV ac_configure_args="$ac_configure_args --without-readline \ --without-cairo --disable-shared --enable-static \ --enable-threads \ @@ -9223,8 +9286,6 @@ case $OS in fi; EXPORT_DYNAMIC=-Wl,--export-dynamic NESTED_FUNCTIONS= - SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES - IPCS_SYSV=-DIPCS_SYSV ac_configure_args="$ac_configure_args --with-readline=builtin \ --disable-shared --enable-static --enable-threads \ CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \ @@ -9237,13 +9298,6 @@ case $OS in SunOS) EXPORT_DYNAMIC=-Wl,--export-dynamic NESTED_FUNCTIONS= - SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES - - if test $IPCS_SYSV = no; then - IPCS_SYSV=-UIPCS_SYSV - else - IPCS_SYSV=-DIPCS_SYSV - fi ac_configure_args="$ac_configure_args --with-readline=builtin \ --disable-shared --enable-static --enable-threads \ @@ -9258,13 +9312,6 @@ case $OS in NetBSD) EXPORT_DYNAMIC=-Wl,--export-dynamic NESTED_FUNCTIONS= - SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES - - if test $IPCS_SYSV = no; then - IPCS_SYSV=-UIPCS_SYSV - else - IPCS_SYSV=-DIPCS_SYSV - fi ac_configure_args="$ac_configure_args --with-readline=builtin \ --disable-shared --enable-static --enable-threads \ @@ -9280,13 +9327,6 @@ case $OS in *) EXPORT_DYNAMIC=-Wl,--export-dynamic NESTED_FUNCTIONS= - SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES - - if test $IPCS_SYSV = no; then - IPCS_SYSV=-UIPCS_SYSV - else - IPCS_SYSV=-DIPCS_SYSV - fi ac_configure_args="$ac_configure_args --with-readline=builtin \ --disable-shared --enable-static --enable-threads \