Make sure to link librt if we need to.
This is really a stop-gap. The recent thread pool changes uncovered a deeper issue with how we use librt. We really should be probing for timer_create and then conditionally enabling that code. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5997 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
3c529d9359
commit
da93a1fd49
20
configure
vendored
20
configure
vendored
|
@ -972,6 +972,26 @@ if [ -x "`which texi2html 2>/dev/null`" ] && \
|
||||||
build_docs="yes"
|
build_docs="yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# Do we need librt
|
||||||
|
cat > $TMPC <<EOF
|
||||||
|
#include <signal.h>
|
||||||
|
#include <time.h>
|
||||||
|
int main(void) { clockid_t id; return clock_gettime(id, NULL); }
|
||||||
|
EOF
|
||||||
|
|
||||||
|
rt=no
|
||||||
|
if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
|
||||||
|
:
|
||||||
|
elif $cc $ARCH_CFLAGS -o $TMPE $TMPC -lrt 2> /dev/null ; then
|
||||||
|
rt=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$rt" = "yes" ; then
|
||||||
|
# Hack, we should have a general purpose LIBS for this sort of thing
|
||||||
|
AIOLIBS="$AIOLIBS -lrt"
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$mingw32" = "yes" ; then
|
if test "$mingw32" = "yes" ; then
|
||||||
if test -z "$prefix" ; then
|
if test -z "$prefix" ; then
|
||||||
prefix="c:\\\\Program Files\\\\Qemu"
|
prefix="c:\\\\Program Files\\\\Qemu"
|
||||||
|
|
Loading…
Reference in a new issue