From 28b5b9d35ae884e37f45ec213e6b884517d32c56 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Mon, 12 Apr 2010 17:40:45 +0800 Subject: [PATCH] Fix configure problem in MacOSX --- configure.ac | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index b0b41e8..cf91f39 100644 --- a/configure.ac +++ b/configure.ac @@ -70,17 +70,19 @@ AC_CHECK_FUNCS([uuid_create], [], [ HAVE_LIBUUID=yes ], [ # uuid.pc does not exist + uuid_old_LIBS=$LIBS AC_CHECK_HEADERS(uuid/uuid.h, [ - AC_CHECK_LIB(uuid, uuid_generate, [ - LIBUUID_LIBS=-luuid + AC_SEARCH_LIBS(uuid_generate, uuid, [ + test x"$ac_cv_search_uuid_generate" != x"none required" && LIBUUID_LIBS=$ac_cv_search_uuid_generate AC_DEFINE(HAVE_LIBUUID, 1, [Define if found libuuid]) HAVE_LIBUUID=yes ], [ - AC_MSG_ERROR([Can not find libuuid and uuid_create in libc!]) + AC_MSG_ERROR([Can not find uuid_create and uuid_generate in libc or libuuid]) ]) ], [ - AC_MSG_ERROR([Can not find libuuid and uuid_create in libc!]) + AC_MSG_ERROR([Can not find uuid_create and uuid_generate in libc or libuuid]) ]) + LIBS=$uuid_old_LIBS ]) ]) -- 2.7.4