From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBEDu-0006Fh-OQ for qemu-devel@nongnu.org; Fri, 12 Dec 2008 15:02:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBEDu-0006FP-6f for qemu-devel@nongnu.org; Fri, 12 Dec 2008 15:02:54 -0500 Received: from [199.232.76.173] (port=35549 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBEDu-0006FJ-16 for qemu-devel@nongnu.org; Fri, 12 Dec 2008 15:02:54 -0500 Received: from savannah.gnu.org ([199.232.41.3]:40147 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LBEDt-0006P1-Gr for qemu-devel@nongnu.org; Fri, 12 Dec 2008 15:02:53 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LBEDt-00030e-3H for qemu-devel@nongnu.org; Fri, 12 Dec 2008 20:02:53 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LBEDs-00030a-Rl for qemu-devel@nongnu.org; Fri, 12 Dec 2008 20:02:53 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Fri, 12 Dec 2008 20:02:52 +0000 Subject: [Qemu-devel] [5997] Make sure to link librt if we need to. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5997 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5997 Author: aliguori Date: 2008-12-12 20:02:52 +0000 (Fri, 12 Dec 2008) Log Message: ----------- 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 Modified Paths: -------------- trunk/configure Modified: trunk/configure =================================================================== --- trunk/configure 2008-12-12 16:41:40 UTC (rev 5996) +++ trunk/configure 2008-12-12 20:02:52 UTC (rev 5997) @@ -972,6 +972,26 @@ build_docs="yes" fi +########################################## +# Do we need librt +cat > $TMPC < +#include +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 -z "$prefix" ; then prefix="c:\\\\Program Files\\\\Qemu"