X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=configure;h=98ecf0b7f747f8d9fa12eb56bac53f34da47f593;hb=d5691e85f6c758624df014a2b4008d356518ba43;hp=a61f9971665795eebda031d34979e8eda5cd5b02;hpb=545ca11c8d228885e6514d568027b27d622f895d;p=psensor.git diff --git a/configure b/configure index a61f997..98ecf0b 100755 --- a/configure +++ b/configure @@ -659,6 +659,7 @@ PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG SENSORS_LIBS +PTHREAD_LIBS GCONF_SCHEMAS_INSTALL_FALSE GCONF_SCHEMAS_INSTALL_TRUE GCONF_SCHEMA_FILE_DIR @@ -7047,6 +7048,55 @@ fi ############### common +# Checks pthread +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (); +int +main () +{ +return pthread_create (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_create=yes +else + ac_cv_lib_pthread_pthread_create=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +fi + +PTHREAD_LIBS=-pthread + + # Checks sensors, required by psensor and psensor-server { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sensors_init in -lsensors" >&5 $as_echo_n "checking for sensors_init in -lsensors... " >&6; }