--- rpl/Attic/configure 2011/10/05 13:14:17 1.90 +++ rpl/Attic/configure 2011/10/10 10:58:10 1.91 @@ -639,6 +639,7 @@ SEMAPHORES_NOMMES NESTED_FUNCTIONS EXPORT_DYNAMIC C_STANDARD +LIB_PREFIX WHOLE_LIB2 WHOLE_LIB1 OS @@ -675,6 +676,7 @@ LN_S RUNPATH PROFILAGE subdirs +PSELECT SHARED_MEMORY LIBRPLCAS RPLCAS @@ -794,9 +796,9 @@ enable_dependency_tracking with_x with_32bits_abi with_64bits_abi +enable_recursive with_rpltools enable_rplcas -enable_shared_memory enable_optimization enable_sysv_ipcs enable_full_static @@ -1470,8 +1472,8 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --enable-recursive recursive configuration (default=yes) --enable-rplcas compile rplcas (default=no) - --enable-shared-memory enable shared memory [default=yes] --enable-optimization set compiler flags [default=environment variables -O3] --enable-sysv-ipcs use SystemV IPC functions [default=guessed] --enable-full-static build static RPL/2 engine [default=shared] @@ -5954,6 +5956,22 @@ fi LDFLAGS="$LDFLAGS $ABI" +# Check whether --enable-recursive was given. +if test "${enable_recursive+set}" = set; then : + enableval=$enable_recursive; +if test "$enableval" = "yes"; then + RECURSIVE=yes +else + RECURSIVE=no +fi +else + + RECURSIVE=yes + + +fi + + # Check whether --with-rpltools was given. if test "${with_rpltools+set}" = set; then : @@ -5996,22 +6014,6 @@ fi -# Check whether --enable-shared-memory was given. -if test "${enable_shared_memory+set}" = set; then : - enableval=$enable_shared_memory; -if test "$enableval" = "no"; then - SHARED_MEMORY="-USHARED_MEMORY" -else - SHARED_MEMORY="-DSHARED_MEMORY" -fi -else - - SHARED_MEMORY="-USHARED_MEMORY" -fi - - - - # Check whether --enable-optimization was given. if test "${enable_optimization+set}" = set; then : enableval=$enable_optimization; @@ -6037,6 +6039,76 @@ else fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable shared memory" >&5 +$as_echo_n "checking for usable shared memory... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ + return(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + SHARED_MEMORY=-DSHARED_MEMORY; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + SHARED_MEMORY=-USHARED_MEMORY; { $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 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pselect" >&5 +$as_echo_n "checking for pselect... " >&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 + #include + #include + +int +main () +{ + + struct timespec tv; + fd_set s1, s2, s3; + tv.tv_sec=1; + tv.tv_nsec=0; + FD_SET(1, &s1); FD_SET(2, &s2); FD_SET(3, &s3); + pselect(5, &s1, &s2, &s3, &tv, NULL); + return(0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + PSELECT=-DPSELECT; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + PSELECT=-UPSELECT; { $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 + + + # Check whether --enable-sysv-ipcs was given. if test "${enable_sysv_ipcs+set}" = set; then : enableval=$enable_sysv_ipcs; @@ -6269,11 +6341,14 @@ if test "$MOTIF_SUPPORT" = "-DMOTIF_SUPP -I\$(top_builddir)/tools/$LIBXPM/include" BUILD_OPENMOTIF="$LIBXPM $OPENMOTIF" + if test $RECURSIVE = yes; then + subdirs="$subdirs tools/$LIBXPM" - subdirs="$subdirs tools/$OPENMOTIF" + subdirs="$subdirs tools/$OPENMOTIF" + fi; fi # Check whether --enable-experimental was given. @@ -9258,7 +9333,11 @@ if test "$MYGNUPLOT" = "yes"; then gunzip -c "$srcdir"/tools/$GNUPLOT.tar.gz | \ (cd "$srcdir/tools" && tar -xf -) fi - subdirs="$subdirs tools/$GNUPLOT" + + if test $RECURSIVE = yes; then + subdirs="$subdirs tools/$GNUPLOT" + + fi GNUPLOT_COMPILATION=$GNUPLOT else @@ -9497,11 +9576,13 @@ case $OS in OS2) WHOLE_LIB1="" WHOLE_LIB2="" + LIB_PREFIX="" break ;; *) WHOLE_LIB1="-Wl,-whole-archive" WHOLE_LIB2="-Wl,-no-whole-archive" + LIB_PREFIX="lib" break ;; esac @@ -9552,24 +9633,27 @@ esac -subdirs="$subdirs tools/$NCURSES" -subdirs="$subdirs tools/$READLINE" +if test $RECURSIVE = yes; then + subdirs="$subdirs tools/$NCURSES" -subdirs="$subdirs tools/$GSL" + subdirs="$subdirs tools/$READLINE" -subdirs="$subdirs tools/$GPP" + subdirs="$subdirs tools/$GSL" -subdirs="$subdirs tools/$FILE" + subdirs="$subdirs tools/$GPP" -subdirs="$subdirs tools/$ICONV" + subdirs="$subdirs tools/$FILE" -subdirs="$subdirs tools/$SQLITE" + subdirs="$subdirs tools/$ICONV" -subdirs="$subdirs tools/$UNITS" + subdirs="$subdirs tools/$SQLITE" -subdirs="$subdirs tools/$SIGSEGV" + subdirs="$subdirs tools/$UNITS" + subdirs="$subdirs tools/$SIGSEGV" + +fi ac_config_files="$ac_config_files Makefile"