Changeset 2667


Ignore:
Timestamp:
Dec 1, 2012 1:55:09 PM (8 years ago)
Author:
stefan
Message:

add --disable-pthread-mumps to disable use of pthread

Location:
ThirdParty/Mumps/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/Mumps/trunk/configure

    r2666 r2667  
    10861086                          whether to link against static standard libraries
    10871087                          (libgcc, libgfortran, libstdc++)
     1088  --disable-pthread-mumps disable use of pthread library
    10881089  --enable-static[=PKGS]
    10891090                          build static libraries [default=no]
     
    35733574
    35743575# Provide some information about the compiler.
    3575 echo "$as_me:3575:" \
     3576echo "$as_me:3576:" \
    35763577     "checking for Fortran 77 compiler version" >&5
    35773578ac_compiler=`set X $ac_compile; echo $2`
     
    42114212ac_save_FFLAGS=$FFLAGS
    42124213FFLAGS="$FFLAGS $ac_verb"
    4213 (eval echo $as_me:4213: \"$ac_link\") >&5
     4214(eval echo $as_me:4214: \"$ac_link\") >&5
    42144215ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
    42154216echo "$ac_f77_v_output" >&5
     
    42894290ac_save_FFLAGS=$FFLAGS
    42904291FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
    4291 (eval echo $as_me:4291: \"$ac_link\") >&5
     4292(eval echo $as_me:4292: \"$ac_link\") >&5
    42924293ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
    42934294echo "$ac_f77_v_output" >&5
     
    50765077esac
    50775078
    5078 # check for pthread.h header file
    5079 ac_ext=c
     5079# Mumps can make use of pthreads
     5080# check for pthread.h header file and library
     5081# Check whether --enable-pthread-mumps or --disable-pthread-mumps was given.
     5082if test "${enable_pthread_mumps+set}" = set; then
     5083  enableval="$enable_pthread_mumps"
     5084  enable_pthread_mumps=$enableval
     5085else
     5086  enable_pthread_mumps=yes
     5087fi;
     5088if test $enable_pthread_mumps = yes ; then
     5089  ac_ext=c
    50805090ac_cpp='$CPP $CPPFLAGS'
    50815091ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    55785588#  hdr=""
    55795589#fi
    5580 #AC_CHECK_HEADERS([pthread.h],[],[MY_DEFS="$MY_DEFS -DWITHOUT_PTHREAD=1"],[$hdr])
     5590#AC_CHECK_HEADERS([pthread.h],[],[enable_pthread_mumps=no],[$hdr])
    55815591
    55825592for ac_header in pthread.h
     
    57265736
    57275737else
     5738  enable_pthread_mumps=no
     5739fi
     5740
     5741done
     5742
     5743
     5744fi
     5745if test $enable_pthread_mumps = yes ; then
     5746  echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
     5747echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
     5748if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
     5749  echo $ECHO_N "(cached) $ECHO_C" >&6
     5750else
     5751  ac_check_lib_save_LIBS=$LIBS
     5752LIBS="-lpthread  $LIBS"
     5753cat >conftest.$ac_ext <<_ACEOF
     5754/* confdefs.h.  */
     5755_ACEOF
     5756cat confdefs.h >>conftest.$ac_ext
     5757cat >>conftest.$ac_ext <<_ACEOF
     5758/* end confdefs.h.  */
     5759
     5760/* Override any gcc2 internal prototype to avoid an error.  */
     5761#ifdef __cplusplus
     5762extern "C"
     5763#endif
     5764/* We use char because int might match the return type of a gcc2
     5765   builtin and then its argument prototype would still apply.  */
     5766char pthread_create ();
     5767#ifdef F77_DUMMY_MAIN
     5768
     5769#  ifdef __cplusplus
     5770     extern "C"
     5771#  endif
     5772   int F77_DUMMY_MAIN() { return 1; }
     5773
     5774#endif
     5775int
     5776main ()
     5777{
     5778pthread_create ();
     5779  ;
     5780  return 0;
     5781}
     5782_ACEOF
     5783rm -f conftest.$ac_objext conftest$ac_exeext
     5784if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     5785  (eval $ac_link) 2>conftest.er1
     5786  ac_status=$?
     5787  grep -v '^ *+' conftest.er1 >conftest.err
     5788  rm -f conftest.er1
     5789  cat conftest.err >&5
     5790  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5791  (exit $ac_status); } &&
     5792         { ac_try='test -z "$ac_c_werror_flag"
     5793                         || test ! -s conftest.err'
     5794  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5795  (eval $ac_try) 2>&5
     5796  ac_status=$?
     5797  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5798  (exit $ac_status); }; } &&
     5799         { ac_try='test -s conftest$ac_exeext'
     5800  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5801  (eval $ac_try) 2>&5
     5802  ac_status=$?
     5803  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5804  (exit $ac_status); }; }; then
     5805  ac_cv_lib_pthread_pthread_create=yes
     5806else
     5807  echo "$as_me: failed program was:" >&5
     5808sed 's/^/| /' conftest.$ac_ext >&5
     5809
     5810ac_cv_lib_pthread_pthread_create=no
     5811fi
     5812rm -f conftest.err conftest.$ac_objext \
     5813      conftest$ac_exeext conftest.$ac_ext
     5814LIBS=$ac_check_lib_save_LIBS
     5815fi
     5816echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
     5817echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
     5818if test $ac_cv_lib_pthread_pthread_create = yes; then
     5819  MUMPS_PCLIBS="-lpthread $MUMPS_PCLIBS"
     5820else
     5821  enable_pthread_mumps=no
     5822fi
     5823
     5824fi
     5825if test $enable_pthread_mumps = no ; then
    57285826  MY_DEFS="$MY_DEFS -DWITHOUT_PTHREAD=1"
    57295827fi
    5730 
    5731 done
    5732 
    5733 
    57345828
    57355829MY_DEFS="$MY_DEFS -DALLOW_NON_INIT -DMUMPS_ARITH=MUMPS_ARITH_d"
     
    73607454*-*-irix6*)
    73617455  # Find out which ABI we are using.
    7362   echo '#line 7362 "configure"' > conftest.$ac_ext
     7456  echo '#line 7456 "configure"' > conftest.$ac_ext
    73637457  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    73647458  (eval $ac_compile) 2>&5
     
    93569450   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    93579451   -e 's:$: $lt_compiler_flag:'`
    9358    (eval echo "\"\$as_me:9358: $lt_compile\"" >&5)
     9452   (eval echo "\"\$as_me:9452: $lt_compile\"" >&5)
    93599453   (eval "$lt_compile" 2>conftest.err)
    93609454   ac_status=$?
    93619455   cat conftest.err >&5
    9362    echo "$as_me:9362: \$? = $ac_status" >&5
     9456   echo "$as_me:9456: \$? = $ac_status" >&5
    93639457   if (exit $ac_status) && test -s "$ac_outfile"; then
    93649458     # The compiler can only warn and ignore the option if not recognized
     
    96249718   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    96259719   -e 's:$: $lt_compiler_flag:'`
    9626    (eval echo "\"\$as_me:9626: $lt_compile\"" >&5)
     9720   (eval echo "\"\$as_me:9720: $lt_compile\"" >&5)
    96279721   (eval "$lt_compile" 2>conftest.err)
    96289722   ac_status=$?
    96299723   cat conftest.err >&5
    9630    echo "$as_me:9630: \$? = $ac_status" >&5
     9724   echo "$as_me:9724: \$? = $ac_status" >&5
    96319725   if (exit $ac_status) && test -s "$ac_outfile"; then
    96329726     # The compiler can only warn and ignore the option if not recognized
     
    97289822   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    97299823   -e 's:$: $lt_compiler_flag:'`
    9730    (eval echo "\"\$as_me:9730: $lt_compile\"" >&5)
     9824   (eval echo "\"\$as_me:9824: $lt_compile\"" >&5)
    97319825   (eval "$lt_compile" 2>out/conftest.err)
    97329826   ac_status=$?
    97339827   cat out/conftest.err >&5
    9734    echo "$as_me:9734: \$? = $ac_status" >&5
     9828   echo "$as_me:9828: \$? = $ac_status" >&5
    97359829   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    97369830   then
     
    1214512239  lt_status=$lt_dlunknown
    1214612240  cat > conftest.$ac_ext <<EOF
    12147 #line 12147 "configure"
     12241#line 12241 "configure"
    1214812242#include "confdefs.h"
    1214912243
     
    1224512339  lt_status=$lt_dlunknown
    1224612340  cat > conftest.$ac_ext <<EOF
    12247 #line 12247 "configure"
     12341#line 12341 "configure"
    1224812342#include "confdefs.h"
    1224912343
     
    1460514699   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1460614700   -e 's:$: $lt_compiler_flag:'`
    14607    (eval echo "\"\$as_me:14607: $lt_compile\"" >&5)
     14701   (eval echo "\"\$as_me:14701: $lt_compile\"" >&5)
    1460814702   (eval "$lt_compile" 2>conftest.err)
    1460914703   ac_status=$?
    1461014704   cat conftest.err >&5
    14611    echo "$as_me:14611: \$? = $ac_status" >&5
     14705   echo "$as_me:14705: \$? = $ac_status" >&5
    1461214706   if (exit $ac_status) && test -s "$ac_outfile"; then
    1461314707     # The compiler can only warn and ignore the option if not recognized
     
    1470914803   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1471014804   -e 's:$: $lt_compiler_flag:'`
    14711    (eval echo "\"\$as_me:14711: $lt_compile\"" >&5)
     14805   (eval echo "\"\$as_me:14805: $lt_compile\"" >&5)
    1471214806   (eval "$lt_compile" 2>out/conftest.err)
    1471314807   ac_status=$?
    1471414808   cat out/conftest.err >&5
    14715    echo "$as_me:14715: \$? = $ac_status" >&5
     14809   echo "$as_me:14809: \$? = $ac_status" >&5
    1471614810   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1471714811   then
     
    1627916373   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1628016374   -e 's:$: $lt_compiler_flag:'`
    16281    (eval echo "\"\$as_me:16281: $lt_compile\"" >&5)
     16375   (eval echo "\"\$as_me:16375: $lt_compile\"" >&5)
    1628216376   (eval "$lt_compile" 2>conftest.err)
    1628316377   ac_status=$?
    1628416378   cat conftest.err >&5
    16285    echo "$as_me:16285: \$? = $ac_status" >&5
     16379   echo "$as_me:16379: \$? = $ac_status" >&5
    1628616380   if (exit $ac_status) && test -s "$ac_outfile"; then
    1628716381     # The compiler can only warn and ignore the option if not recognized
     
    1638316477   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1638416478   -e 's:$: $lt_compiler_flag:'`
    16385    (eval echo "\"\$as_me:16385: $lt_compile\"" >&5)
     16479   (eval echo "\"\$as_me:16479: $lt_compile\"" >&5)
    1638616480   (eval "$lt_compile" 2>out/conftest.err)
    1638716481   ac_status=$?
    1638816482   cat out/conftest.err >&5
    16389    echo "$as_me:16389: \$? = $ac_status" >&5
     16483   echo "$as_me:16483: \$? = $ac_status" >&5
    1639016484   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1639116485   then
     
    1859018684   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1859118685   -e 's:$: $lt_compiler_flag:'`
    18592    (eval echo "\"\$as_me:18592: $lt_compile\"" >&5)
     18686   (eval echo "\"\$as_me:18686: $lt_compile\"" >&5)
    1859318687   (eval "$lt_compile" 2>conftest.err)
    1859418688   ac_status=$?
    1859518689   cat conftest.err >&5
    18596    echo "$as_me:18596: \$? = $ac_status" >&5
     18690   echo "$as_me:18690: \$? = $ac_status" >&5
    1859718691   if (exit $ac_status) && test -s "$ac_outfile"; then
    1859818692     # The compiler can only warn and ignore the option if not recognized
     
    1885818952   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1885918953   -e 's:$: $lt_compiler_flag:'`
    18860    (eval echo "\"\$as_me:18860: $lt_compile\"" >&5)
     18954   (eval echo "\"\$as_me:18954: $lt_compile\"" >&5)
    1886118955   (eval "$lt_compile" 2>conftest.err)
    1886218956   ac_status=$?
    1886318957   cat conftest.err >&5
    18864    echo "$as_me:18864: \$? = $ac_status" >&5
     18958   echo "$as_me:18958: \$? = $ac_status" >&5
    1886518959   if (exit $ac_status) && test -s "$ac_outfile"; then
    1886618960     # The compiler can only warn and ignore the option if not recognized
     
    1896219056   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1896319057   -e 's:$: $lt_compiler_flag:'`
    18964    (eval echo "\"\$as_me:18964: $lt_compile\"" >&5)
     19058   (eval echo "\"\$as_me:19058: $lt_compile\"" >&5)
    1896519059   (eval "$lt_compile" 2>out/conftest.err)
    1896619060   ac_status=$?
    1896719061   cat out/conftest.err >&5
    18968    echo "$as_me:18968: \$? = $ac_status" >&5
     19062   echo "$as_me:19062: \$? = $ac_status" >&5
    1896919063   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1897019064   then
     
    2596726061  MY_FDEFS="$MY_FDEFS -Dmetis"
    2596826062fi
    25969 
    25970 # Mumps can make use of pthreads
    25971 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
    25972 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
    25973 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
    25974   echo $ECHO_N "(cached) $ECHO_C" >&6
    25975 else
    25976   ac_check_lib_save_LIBS=$LIBS
    25977 LIBS="-lpthread  $LIBS"
    25978 cat >conftest.$ac_ext <<_ACEOF
    25979 /* confdefs.h.  */
    25980 _ACEOF
    25981 cat confdefs.h >>conftest.$ac_ext
    25982 cat >>conftest.$ac_ext <<_ACEOF
    25983 /* end confdefs.h.  */
    25984 
    25985 /* Override any gcc2 internal prototype to avoid an error.  */
    25986 #ifdef __cplusplus
    25987 extern "C"
    25988 #endif
    25989 /* We use char because int might match the return type of a gcc2
    25990    builtin and then its argument prototype would still apply.  */
    25991 char pthread_create ();
    25992 #ifdef F77_DUMMY_MAIN
    25993 
    25994 #  ifdef __cplusplus
    25995      extern "C"
    25996 #  endif
    25997    int F77_DUMMY_MAIN() { return 1; }
    25998 
    25999 #endif
    26000 int
    26001 main ()
    26002 {
    26003 pthread_create ();
    26004   ;
    26005   return 0;
    26006 }
    26007 _ACEOF
    26008 rm -f conftest.$ac_objext conftest$ac_exeext
    26009 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    26010   (eval $ac_link) 2>conftest.er1
    26011   ac_status=$?
    26012   grep -v '^ *+' conftest.er1 >conftest.err
    26013   rm -f conftest.er1
    26014   cat conftest.err >&5
    26015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    26016   (exit $ac_status); } &&
    26017          { ac_try='test -z "$ac_c_werror_flag"
    26018                          || test ! -s conftest.err'
    26019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    26020   (eval $ac_try) 2>&5
    26021   ac_status=$?
    26022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    26023   (exit $ac_status); }; } &&
    26024          { ac_try='test -s conftest$ac_exeext'
    26025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    26026   (eval $ac_try) 2>&5
    26027   ac_status=$?
    26028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    26029   (exit $ac_status); }; }; then
    26030   ac_cv_lib_pthread_pthread_create=yes
    26031 else
    26032   echo "$as_me: failed program was:" >&5
    26033 sed 's/^/| /' conftest.$ac_ext >&5
    26034 
    26035 ac_cv_lib_pthread_pthread_create=no
    26036 fi
    26037 rm -f conftest.err conftest.$ac_objext \
    26038       conftest$ac_exeext conftest.$ac_ext
    26039 LIBS=$ac_check_lib_save_LIBS
    26040 fi
    26041 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
    26042 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
    26043 if test $ac_cv_lib_pthread_pthread_create = yes; then
    26044   MUMPS_PCLIBS="-lpthread $MUMPS_PCLIBS"
    26045 fi
    26046 
    2604726063
    2604826064# Verify that we can compile Fortran 90 code
  • ThirdParty/Mumps/trunk/configure.ac

    r2329 r2667  
    8787esac
    8888
    89 # check for pthread.h header file
    90 AC_COIN_CHECK_HEADER([pthread.h],,[MY_DEFS="$MY_DEFS -DWITHOUT_PTHREAD=1"])
     89# Mumps can make use of pthreads
     90# check for pthread.h header file and library
     91AC_ARG_ENABLE([pthread-mumps],
     92  [AC_HELP_STRING([--disable-pthread-mumps],[disable use of pthread library])],
     93  [enable_pthread_mumps=$enableval],
     94  [enable_pthread_mumps=yes])
     95if test $enable_pthread_mumps = yes ; then
     96  AC_COIN_CHECK_HEADER([pthread.h],[],[enable_pthread_mumps=no])
     97fi
     98if test $enable_pthread_mumps = yes ; then
     99  AC_CHECK_LIB([pthread],[pthread_create],
     100    [MUMPS_PCLIBS="-lpthread $MUMPS_PCLIBS"],
     101    [enable_pthread_mumps=no])
     102fi
     103if test $enable_pthread_mumps = no ; then
     104  MY_DEFS="$MY_DEFS -DWITHOUT_PTHREAD=1"
     105fi
    91106
    92107MY_DEFS="$MY_DEFS -DALLOW_NON_INIT -DMUMPS_ARITH=MUMPS_ARITH_d"
     
    103118  MY_FDEFS="$MY_FDEFS -Dmetis"
    104119fi
    105 
    106 # Mumps can make use of pthreads
    107 AC_CHECK_LIB([pthread],[pthread_create],[MUMPS_PCLIBS="-lpthread $MUMPS_PCLIBS"])
    108120
    109121# Verify that we can compile Fortran 90 code
Note: See TracChangeset for help on using the changeset viewer.