X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/beaedc82c29cae2d3a54f1083ebd741386677d0f..82421f638de186b984d6cf9366bf618f188ce3f9:/configure diff --git a/configure b/configure index a90532bef3..5ad548daec 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.144 . +# From configure.ac Revision: 1.146 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for simgrid 3.2-cvs. # @@ -1057,6 +1057,7 @@ Optional Packages: --with-tags[=TAGS] include additional configurations [automatic] --with-pthread Use pthread instead of ucontext. + --with-pthreads Use pthread instead of ucontext. --with-context=ucontext/pthread Use either (System V) swapcontext or pthread [default=auto]. Some influential environment variables: @@ -3732,7 +3733,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3735 "configure"' > conftest.$ac_ext + echo '#line 3736 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5565,7 +5566,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5568:" \ +echo "$as_me:5569:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6626,11 +6627,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6629: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6630: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6633: \$? = $ac_status" >&5 + echo "$as_me:6634: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6894,11 +6895,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6897: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6898: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6901: \$? = $ac_status" >&5 + echo "$as_me:6902: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6998,11 +6999,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7001: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7002: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7005: \$? = $ac_status" >&5 + echo "$as_me:7006: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9356,7 +9357,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11798: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11801: \$? = $ac_status" >&5 + echo "$as_me:11802: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11898,11 +11899,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11901: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11902: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11905: \$? = $ac_status" >&5 + echo "$as_me:11906: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13486,11 +13487,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13489: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13490: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13493: \$? = $ac_status" >&5 + echo "$as_me:13494: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13590,11 +13591,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13593: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13594: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13597: \$? = $ac_status" >&5 + echo "$as_me:13598: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15813,11 +15814,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15816: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15817: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15820: \$? = $ac_status" >&5 + echo "$as_me:15821: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16081,11 +16082,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16084: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16085: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16088: \$? = $ac_status" >&5 + echo "$as_me:16089: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16185,11 +16186,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16188: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16189: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16192: \$? = $ac_status" >&5 + echo "$as_me:16193: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -23940,6 +23941,12 @@ echo "$as_me:$LINENO: checking what kind of backend should we use" >&5 echo $ECHO_N "checking what kind of backend should we use... $ECHO_C" >&6 +# Check whether --with-pthread or --without-pthread was given. +if test "${with_pthread+set}" = set; then + withval="$with_pthread" + with_context=pthread +fi; + # Check whether --with-pthread or --without-pthread was given. if test "${with_pthread+set}" = set; then withval="$with_pthread" @@ -23964,6 +23971,7 @@ fi case $with_context in ucontext) ;; pthread) ;; + pthreads) ;; windows) ;; auto) with_context=ucontext;; *) { { echo "$as_me:$LINENO: error: --with-context must be either ucontext or pthread" >&5 @@ -23993,6 +24001,9 @@ echo "${ECHO_T}no working ucontext found. Try pthreads as a fallback" >&6 fi fi +if test "x$with_context" = "xpthreads"; then + with_context=pthread +fi if test "x$with_context" = "xpthread"; then for ac_header in pthread.h @@ -24683,74 +24694,16 @@ echo "${ECHO_T}${T_MD}Checking extra libraries dependencies...${T_ME}" >&6 SIMGRID_DEP="" GRAS_DEP="" -echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 -echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pthread_create (); -int -main () -{ -pthread_create (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_pthread_pthread_create=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_pthread_pthread_create=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 -if test $ac_cv_lib_pthread_pthread_create = yes; then - SIMGRID_DEP="-lpthread"; GRAS_DEP="-lpthread" +if test xpthread=xyes ; then + # if the pthreads are usable + if test "x$with_context" = "xpthread" ; then + # if we use them to implement the xbt_context + SIMGRID_DEP="-lpthread" + fi + # we need them in any case for the gras lib (which is multithreaded) + GRAS_DEP="-lpthread" fi - echo "$as_me:$LINENO: checking for csdp" >&5 echo $ECHO_N "checking for csdp... $ECHO_C" >&6 sdp=no