Browse Source

Remove libuuid

Brian Aker 13 years ago
parent
commit
06aa0d1d5c
6 changed files with 14 additions and 71 deletions
  1. 12 7
      configure.ac
  2. 1 3
      examples/include.am
  3. 0 3
      libgearman-server/common.h
  4. 0 2
      libgearman/add.cc
  5. 1 1
      libgearman/include.am
  6. 0 55
      m4/pandora_have_libuuid.m4

+ 12 - 7
configure.ac

@@ -79,17 +79,14 @@ AX_LIB_CURL([7.21.7],
                                 ]
                                )
              ],
-            [
-             AC_DEFINE([HAVE_LIBCURL], [ 0 ], [libcurl support])
-             ]
-            )
+             [
+              AC_DEFINE([HAVE_LIBCURL], [ 0 ], [libcurl support])
+              ]
+             )
 
 m4_include([m4/drizzled.m4])
 WITH_LIBDRIZZLE
 
-PANDORA_REQUIRE_LIBEVENT
-PANDORA_REQUIRE_LIBUUID
-
 AX_LIB_SQLITE3
 AS_IF([test "x${WANT_SQLITE3}" = "xyes"],
       [
@@ -207,6 +204,14 @@ AX_CHECK_LIBRARY([LIBEVENT], [event.h], [event],
                   AC_MSG_ERROR([Unable to find libevent])
                   ])
 
+AX_CHECK_LIBRARY([LIBUUID], [uuid/uuid.h], [uuid], 
+                 [
+                  LIBUUID_LDFLAGS="-luuid"
+                  ],
+                 [
+                  AC_MSG_ERROR([Unable to find libuuid])
+                  ])
+
 
 AC_CONFIG_FILES([libtest/version.h])
 AC_CONFIG_FILES(Makefile

+ 1 - 3
examples/include.am

@@ -15,9 +15,7 @@ EXAMPLES_LDADD= \
 		$(BOOST_PROGRAM_OPTIONS_LIBS) \
 		libgearman/libgearman.la
 
-EXAMPLES_LD_FLAGS= \
-		   $(CLIENT_LDFLAGS) \
-		   $(LTLIBUUID)
+EXAMPLES_LD_FLAGS= $(CLIENT_LDFLAGS)
 noinst_PROGRAMS+= \
 		  examples/echo_client \
 		  examples/echo_worker \

+ 0 - 3
libgearman-server/common.h

@@ -42,9 +42,6 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_UUID_UUID_H
-#include <uuid/uuid.h>
-#endif
 
 #ifdef TIME_WITH_SYS_TIME
 # include <sys/time.h>

+ 0 - 2
libgearman/add.cc

@@ -48,9 +48,7 @@
 #include <cstring>
 #include <memory>
 
-#ifdef HAVE_UUID_UUID_H
 #include <uuid/uuid.h>
-#endif
 
 gearman_task_st *add_task(gearman_client_st& client,
                           void *context,

+ 1 - 1
libgearman/include.am

@@ -97,7 +97,7 @@ libgearman_libgearman_la_CXXFLAGS= -DBUILDING_LIBGEARMAN
 
 libgearman_libgearman_la_LDFLAGS= -version-info $(GEARMAN_LIBRARY_VERSION)
 
-libgearman_libgearman_la_LIBADD= $(LTLIBUUID)
+libgearman_libgearman_la_LIBADD= $(LIBUUID_LDFLAGS)
 
 if TARGET_LINUX
 libgearman_libgearman_la_LIBADD+= -lm

+ 0 - 55
m4/pandora_have_libuuid.m4

@@ -1,55 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for libuuid
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([_PANDORA_SEARCH_LIBUUID],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may
-  dnl not be a lib is weird.
-  AC_CHECK_HEADERS(uuid/uuid.h)
-  AC_LIB_HAVE_LINKFLAGS(uuid,,
-  [
-    #include <uuid/uuid.h>
-  ],
-  [
-    uuid_t uout;
-    uuid_generate(uout);
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBUUID, [test "x${ac_cv_libuuid}" = "xyes"])
-])
-
-AC_DEFUN([_PANDORA_HAVE_LIBUUID],[
-
-  AC_ARG_ENABLE([libuuid],
-    [AS_HELP_STRING([--disable-libuuid],
-      [Build with libuuid support @<:@default=on@:>@])],
-    [ac_enable_libuuid="$enableval"],
-    [ac_enable_libuuid="yes"])
-
-  _PANDORA_SEARCH_LIBUUID
-])
-
-
-AC_DEFUN([PANDORA_HAVE_LIBUUID],[
-  AC_REQUIRE([_PANDORA_HAVE_LIBUUID])
-])
-
-AC_DEFUN([_PANDORA_REQUIRE_LIBUUID],[
-  ac_enable_libuuid="yes"
-  _PANDORA_SEARCH_LIBUUID
-  AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[
-    PANDORA_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On RHEL 4 this can be found in e2fsprogs-devel and Fedora/RHEL 6 in libuuid-devel.])
-  ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBUUID],[
-  AC_REQUIRE([_PANDORA_REQUIRE_LIBUUID])
-])