--- rpl/Attic/configure 2011/10/02 14:14:29 1.87 +++ rpl/Attic/configure 2011/10/10 10:58:10 1.91 @@ -639,6 +639,9 @@ SEMAPHORES_NOMMES NESTED_FUNCTIONS EXPORT_DYNAMIC C_STANDARD +LIB_PREFIX +WHOLE_LIB2 +WHOLE_LIB1 OS HOST GNUPLOT_COMPILATION @@ -673,9 +676,12 @@ LN_S RUNPATH PROFILAGE subdirs +PSELECT +SHARED_MEMORY LIBRPLCAS RPLCAS ABI +RPLTOOLS X_EXTRA_LIBS X_LIBS X_PRE_LIBS @@ -790,7 +796,9 @@ enable_dependency_tracking with_x with_32bits_abi with_64bits_abi -with_rplcas +enable_recursive +with_rpltools +enable_rplcas enable_optimization enable_sysv_ipcs enable_full_static @@ -1464,6 +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-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] @@ -1484,7 +1494,7 @@ Optional Packages: --with-x use the X Window System --with-32bits-abi force 32bits ABI (multilib) --with-64bits-abi force 64bits ABI (multilib) - --with-rplcas compile rplcas (default=no) + --with-rpltools specify rpltools path used for cross compilation --with-mysql=PATH specify directory for installed mysql --with-postgresql=PATH specify directory for installed postgresql --with-bourne-shell=PATH specify path for OS/2 bourne shell @@ -4838,10 +4848,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLA ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test "$F77" != gfortran -a "$F77" != gfortran-4.4; then - as_fn_error $? "Cannot find gfortran! You have to install it." "$LINENO" 5 -fi - ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -5049,7 +5055,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLA ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test "$FC" != gfortran -a "$FC" != gfortran-4.4; then +if test x"$F77" == x; then + as_fn_error $? "Cannot find gfortran! You have to install it." "$LINENO" 5 +fi + +if test x"$FC" == x; then as_fn_error $? "Cannot find gfortran! You have to install it." "$LINENO" 5 fi @@ -5946,11 +5956,45 @@ 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 : + withval=$with_rpltools; +if test "$with_rpltools" = "no" -o "$with_rpltools" = yes; then + as_fn_error $? "You have to specify rpltools path !" "$LINENO" 5 +else + RPLTOOLS=$with_rpltools +fi +else + + RPLTOOLS=\$\(top_builddir\) + + +fi + + + -# Check whether --with-rplcas was given. -if test "${with_rplcas+set}" = set; then : - withval=$with_rplcas; -if test "$with-rplcas" = "no"; then +# Check whether --enable-rplcas was given. +if test "${enable_rplcas+set}" = set; then : + enableval=$enable_rplcas; +if test "$enableval" = "no"; then RPLCAS=-URPLCAS LIBRPLCAS= else @@ -5995,16 +6039,89 @@ 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; if test "$enableval" = "no"; then - IPCS_SYSV=no + IPCS_SYSV=-UIPCS_SYSV + POSIX_IPCS=no else - IPCS_SYSV=yes + IPCS_SYSV=-DIPCS_SYSV + POSIX_IPCS=yes fi else REG=$LDFLAGS +POSIX_IPCS=guessed 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; } @@ -6053,7 +6170,7 @@ LDFLAGS=$REG fi -if test "$IPCS_SYSV" = "-UIPCS_SYSV"; then +if test "$IPCS_SYSV" = "-UIPCS_SYSV" -a "$POSIX_IPCS" = "guessed"; then REG=$LDFLAGS LDFLAGS=-pthread { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX anonymous semaphores" >&5 @@ -6224,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. @@ -9213,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 @@ -9222,7 +9346,7 @@ fi -HOST=$host +HOST=$target my_save_cflags="$CFLAGS" @@ -9324,7 +9448,6 @@ DATE=$(env LC_ALL=C date +'%A %x, %X %Z' MALLOC= case $OS in - Darwin) EXPORT_DYNAMIC=-Wl,-flat_namespace NESTED_FUNCTIONS=-fnested-functions @@ -9447,7 +9570,20 @@ case $OS in C_STANDARD=-std=gnu99 ELF= break ;; +esac + +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 @@ -9494,24 +9630,30 @@ esac -subdirs="$subdirs tools/$NCURSES" -subdirs="$subdirs tools/$READLINE" -subdirs="$subdirs tools/$GSL" -subdirs="$subdirs tools/$GPP" -subdirs="$subdirs tools/$FILE" +if test $RECURSIVE = yes; then + subdirs="$subdirs tools/$NCURSES" -subdirs="$subdirs tools/$ICONV" + subdirs="$subdirs tools/$READLINE" -subdirs="$subdirs tools/$SQLITE" + subdirs="$subdirs tools/$GSL" -subdirs="$subdirs tools/$UNITS" + subdirs="$subdirs tools/$GPP" -subdirs="$subdirs tools/$SIGSEGV" + subdirs="$subdirs tools/$FILE" + subdirs="$subdirs tools/$ICONV" + + subdirs="$subdirs tools/$SQLITE" + + subdirs="$subdirs tools/$UNITS" + + subdirs="$subdirs tools/$SIGSEGV" + +fi ac_config_files="$ac_config_files Makefile"