Selaa lähdekoodia

configure.ac: only check once for pthread availability

Nathalie Furmento 12 vuotta sitten
vanhempi
commit
11e09ede8c
1 muutettua tiedostoa jossa 1 lisäystä ja 7 poistoa
  1. 1 7
      configure.ac

+ 1 - 7
configure.ac

@@ -146,15 +146,9 @@ esac
 if test x"$enable_native_winthreads" = xyes
 then
     CPPFLAGS+=" -I$STARPU_SRC_DIR/include/pthread_win32 "
-else
-    AC_CHECK_LIB([pthread], [pthread_create])
 fi
+AC_SEARCH_LIBS([pthread],[pthread_create],,AC_MSG_ERROR([pthread library unavailable]))
 
-AC_COMPILE_IFELSE(
-  [AC_LANG_PROGRAM([[
-    #include <pthread.h>
-  ]], [[ pthread_t t; pthread_create(&t, NULL, NULL, NULL); ]])],,
-  AC_MSG_ERROR([pthread_create unavailable]))
 AC_SEARCH_LIBS([sqrt],[m],,AC_MSG_ERROR([math library unavailable]))
 AC_HAVE_LIBRARY([ws2_32])
 AC_CHECK_FUNCS([sysconf])