summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-01-17 09:02:21 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2013-01-17 15:31:20 +0100
commit91e63e3472f7b91f227bf397f833fabc8489279b (patch)
tree4cba83a158332ff025fb00d7d36bb0ad042a3383
parent07119d1476db0a7568f79cbc855a888007dc7400 (diff)
downloadmsitools-91e63e3472f7b91f227bf397f833fabc8489279b.tar.gz
msitools-91e63e3472f7b91f227bf397f833fabc8489279b.tar.xz
msitools-91e63e3472f7b91f227bf397f833fabc8489279b.zip
build: libuuid dependency is now mandatory
This was just a hack because Fedora mingw does not have a libuuid port. It can go. And we can also always build wixl.
-rw-r--r--configure.ac20
-rw-r--r--tools/msibuild.c26
2 files changed, 12 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac
index bae431a..4d64412 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,11 +20,7 @@ IT_PROG_INTLTOOL([0.35])
AM_PATH_GLIB_2_0([2.12.0])
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 gio-2.0 >= 2.14])
PKG_CHECK_MODULES([GSF], [libgsf-1])
-PKG_CHECK_MODULES([UUID], [uuid], [uuid=yes], [uuid=no])
-AS_IF([test "$uuid" = yes],
- [AC_DEFINE([HAVE_LIBUUID], 1,
- [Define to 1 if libuuid is present on the system])],
- [AC_MSG_WARN([libuuid not found, msibuild will generate packages without a GUID])])
+PKG_CHECK_MODULES([UUID], [uuid >= 1.41.3])
LT_INIT([win32-dll disable-fast-install])
GOBJECT_INTROSPECTION_CHECK([0.9.4])
@@ -42,17 +38,7 @@ PKG_CHECK_MODULES([WIXL], [gio-2.0 >= 0.23.0
libgcab-1.0
uuid >= 1.41.3
libxml-2.0 >= 2.7
- $WIXL_UNIX],
- [wixl_ok=yes], [wixl_ok=no])
-
-AC_ARG_ENABLE([wixl],
- [AS_HELP_STRING([--disable-wixl], [do not build wixl (default=yes)])],
- [wixl=$enableval], [wixl=yes])
-
-AS_IF([test $wixl_ok = no && test $wixl != no],
- [AC_MSG_ERROR([Wixl dependencies not found])])
-
-AM_CONDITIONAL([WIXL], [test "x$wixl" != xno])
+ $WIXL_UNIX])
GETTEXT_PACKAGE=wixl
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext Package])
@@ -85,6 +71,4 @@ AC_MSG_NOTICE([
prefix: ${prefix}
c compiler: ${CC}
- uuid: ${uuid}
- wixl: ${wixl}
])
diff --git a/tools/msibuild.c b/tools/msibuild.c
index a80af2c..140e0a7 100644
--- a/tools/msibuild.c
+++ b/tools/msibuild.c
@@ -25,15 +25,15 @@
#include <sys/stat.h>
#include <libmsi.h>
#include <limits.h>
-
-#ifdef HAVE_LIBUUID
#include <uuid.h>
-#endif
#include "sqldelim.h"
static gboolean init_suminfo(LibmsiSummaryInfo *si, GError **error)
{
+ uuid_t uu;
+ char uustr[40];
+
if (!libmsi_summary_info_set_string(si, LIBMSI_PROPERTY_TITLE,
"Installation Database", error))
return FALSE;
@@ -62,19 +62,13 @@ static gboolean init_suminfo(LibmsiSummaryInfo *si, GError **error)
0, error))
return FALSE;
-#ifdef HAVE_LIBUUID
- {
- uuid_t uu;
- char uustr[40];
- uuid_generate(uu);
- uustr[0] = '{';
- uuid_unparse_upper(uu, uustr + 1);
- strcat(uustr, "}");
- if (!libmsi_summary_info_set_string(si, LIBMSI_PROPERTY_UUID,
- uustr, error))
- return FALSE;
- }
-#endif
+ uuid_generate(uu);
+ uustr[0] = '{';
+ uuid_unparse_upper(uu, uustr + 1);
+ strcat(uustr, "}");
+ if (!libmsi_summary_info_set_string(si, LIBMSI_PROPERTY_UUID,
+ uustr, error))
+ return FALSE;
return TRUE;
}