[gnote] Use pkg-config for uuid



commit cd6c676736db1bf6cbab41265c5eccbe0d612efc
Author: Aurimas Ä?ernius <aurisc4 gmail com>
Date:   Tue May 10 21:16:43 2011 +0300

    Use pkg-config for uuid
    
    More portable way to link against this library.
    Thanks Jasper Lievisse Adriaanse.
    Fixes bug 649486.

 configure.ac       |    5 +----
 src/Makefile.am    |    3 ++-
 src/sharp/uuid.hpp |    2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 182084c..dbfbe63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,15 +70,12 @@ PKG_CHECK_MODULES(LIBXML, [libxml-2.0])
 PKG_CHECK_MODULES(LIBXSLT, [libxslt])
 PKG_CHECK_MODULES(GCONF, [gconf-2.0])
 PKG_CHECK_MODULES(PCRE, [libpcrecpp])
+PKG_CHECK_MODULES(UUID, [uuid])
 
 PKG_CHECK_EXISTS(gtkmm-2.4 >= 2.14.0,
   [AC_DEFINE(HAVE_CLASS_GTK__WIDGET_SIGNAL_POPUP_MENU, 1, [Define to 1 if class Gtk::Widget has signal_popup_menu])],
   [])
 
-dnl check for the ext2 uuid library. TODO replace it with something more portable
-AC_CHECK_HEADER(uuid/uuid.h,,[AC_MSG_ERROR("uuid header is missing")])
-AC_CHECK_LIB(uuid,uuid_unparse_lower, ,[AC_MSG_ERROR("libuuid library is missing")])
-
 AC_ARG_ENABLE([applet],
 	AS_HELP_STRING([--disable-applet],[Disable panel applet]),
 	[],[enable_applet=yes])
diff --git a/src/Makefile.am b/src/Makefile.am
index 5e8ba3e..d94b502 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,6 +11,7 @@ AM_CPPFLAGS= LIBGTKMM_CFLAGS@ @LIBGLIBMM_CFLAGS@ \
 	@LIBXSLT_CFLAGS@ \
 	@PCRE_CFLAGS@ \
 	@DBUS_CFLAGS@ \
+	@UUID_CFLAGS@ \
 	-DGNOTE_LOCALEDIR=\"@GNOTE_LOCALEDIR \" \
 	-DDATADIR=\"$(datadir)\" -DLIBDIR=\"$(libdir)\"
 
@@ -23,7 +24,7 @@ GNOTE_LIBS = libgnote.a $(top_builddir)/libtomboy/libtomboy.la \
 	@PCRE_LIBS@ \
 	@DBUS_LIBS@ \
 	@GTKSPELL_LIBS@ @GTK_LIBS@ \
-	-luuid
+	@UUID_LIBS@
 
 noinst_LIBRARIES = libgnote.a
 bin_PROGRAMS = gnote
diff --git a/src/sharp/uuid.hpp b/src/sharp/uuid.hpp
index 33fc850..0b1bc00 100644
--- a/src/sharp/uuid.hpp
+++ b/src/sharp/uuid.hpp
@@ -28,7 +28,7 @@
 #ifndef __SHARP_UUID_HPP_
 #define __SHARP_UUID_HPP_
 
-#include <uuid/uuid.h>
+#include <uuid.h>
 #include <string>
 
 namespace sharp {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]