Changeset 260


Ignore:
Timestamp:
Mar 16, 2007 8:50:27 AM (14 years ago)
Author:
andreasw
Message:

corrected pthread check for Mumps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/Mumps/trunk/configure

    r256 r260  
    2119521195
    2119621196  # library extension
     21197  ac_ext=c
     21198ac_cpp='$CPP $CPPFLAGS'
     21199ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     21200ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     21201ac_compiler_gnu=$ac_cv_c_compiler_gnu
     21202
     21203  echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
     21204echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
     21205if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
     21206  echo $ECHO_N "(cached) $ECHO_C" >&6
     21207else
     21208  ac_check_lib_save_LIBS=$LIBS
     21209LIBS="-lpthread  $LIBS"
     21210cat >conftest.$ac_ext <<_ACEOF
     21211/* confdefs.h.  */
     21212_ACEOF
     21213cat confdefs.h >>conftest.$ac_ext
     21214cat >>conftest.$ac_ext <<_ACEOF
     21215/* end confdefs.h.  */
     21216
     21217/* Override any gcc2 internal prototype to avoid an error.  */
     21218#ifdef __cplusplus
     21219extern "C"
     21220#endif
     21221/* We use char because int might match the return type of a gcc2
     21222   builtin and then its argument prototype would still apply.  */
     21223char pthread_create ();
     21224#ifdef F77_DUMMY_MAIN
     21225
     21226#  ifdef __cplusplus
     21227     extern "C"
     21228#  endif
     21229   int F77_DUMMY_MAIN() { return 1; }
     21230
     21231#endif
     21232int
     21233main ()
     21234{
     21235pthread_create ();
     21236  ;
     21237  return 0;
     21238}
     21239_ACEOF
     21240rm -f conftest.$ac_objext conftest$ac_exeext
     21241if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     21242  (eval $ac_link) 2>conftest.er1
     21243  ac_status=$?
     21244  grep -v '^ *+' conftest.er1 >conftest.err
     21245  rm -f conftest.er1
     21246  cat conftest.err >&5
     21247  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21248  (exit $ac_status); } &&
     21249         { ac_try='test -z "$ac_c_werror_flag"
     21250                         || test ! -s conftest.err'
     21251  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     21252  (eval $ac_try) 2>&5
     21253  ac_status=$?
     21254  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21255  (exit $ac_status); }; } &&
     21256         { ac_try='test -s conftest$ac_exeext'
     21257  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     21258  (eval $ac_try) 2>&5
     21259  ac_status=$?
     21260  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21261  (exit $ac_status); }; }; then
     21262  ac_cv_lib_pthread_pthread_create=yes
     21263else
     21264  echo "$as_me: failed program was:" >&5
     21265sed 's/^/| /' conftest.$ac_ext >&5
     21266
     21267ac_cv_lib_pthread_pthread_create=no
     21268fi
     21269rm -f conftest.err conftest.$ac_objext \
     21270      conftest$ac_exeext conftest.$ac_ext
     21271LIBS=$ac_check_lib_save_LIBS
     21272fi
     21273echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
     21274echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
     21275if test $ac_cv_lib_pthread_pthread_create = yes; then
     21276  LIBS="-lpthread $LIBS"; ADDLIBS="-lpthread $ADDLIBS"
     21277fi
     21278
     21279  ac_ext=f
     21280ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
     21281ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     21282ac_compiler_gnu=$ac_cv_f77_compiler_gnu
     21283
     21284
    2119721285  case "$CC" in
    2119821286    cl* | */cl* | CL* | */CL*)
     
    2130921397    if test -r $coin_mumpsobjdir/.MakeOk; then
    2131021398      use_mumps=BUILD
    21311     else
    21312       use_mumps=
    21313     fi
    21314   fi
    21315 fi
    21316 
    21317 if test x"$use_mumps" != x; then
    21318   # Mumps needs pthreads
    21319   ac_ext=c
     21399      # Mumps needs pthreads
     21400      ac_ext=c
    2132021401ac_cpp='$CPP $CPPFLAGS'
    2132121402ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2132321404ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2132421405
    21325   echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
     21406      echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
    2132621407echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
    2132721408if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
     
    2139921480fi
    2140021481
    21401   ac_ext=f
     21482      ac_ext=f
    2140221483ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
    2140321484ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    2140421485ac_compiler_gnu=$ac_cv_f77_compiler_gnu
    2140521486
     21487    else
     21488      use_mumps=
     21489    fi
     21490  fi
     21491fi
     21492
     21493if test x"$use_mumps" != x; then
    2140621494
    2140721495  # and we need the Fortran runtime libraries if we want to link with C/C++
Note: See TracChangeset for help on using the changeset viewer.