[dia] Bug #589037: make libemf plugin optional (allow --disable-libemf)
- From: Hans Breuer <hans src gnome org>
- To: svn-commits-list gnome org
- Subject: [dia] Bug #589037: make libemf plugin optional (allow --disable-libemf)
- Date: Sun, 26 Jul 2009 14:18:12 +0000 (UTC)
commit 0c2d41ac5c09810d0e7ec4fdceae57747ebd0721
Author: Hans Breuer <hans breuer org>
Date: Sun Jul 26 16:18:42 2009 +0200
Bug #589037: make libemf plugin optional (allow --disable-libemf)
http://bugzilla.gnome.org/show_bug.cgi?id=589037
From: Gilles Dartiguelongue <eva gentoo org>
Date: Tue, 14 Jul 2009 20:17:18 +0200
Subject: [PATCH] Make libemf plugin optional.
configure.in | 38 +++++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 13 deletions(-)
---
diff --git a/configure.in b/configure.in
index cd00bc6..755853a 100644
--- a/configure.in
+++ b/configure.in
@@ -212,23 +212,35 @@ AC_SUBST(PNG_LIBS)
LIBS="${old_LIBS} ${PNG_LIBS}"
dnl check for libEMF to provide Windows Metafile plug-in on Linux
-old_CPPFLAGS="${CPPFLAGS}"
-old_CFLAGS="${CFLAGS}"
-old_LIBS="${LIBS}"
-CPPFLAGS="${CPPFLAGS} -I /usr/include/libEMF"
-AC_CHECK_HEADER(emf.h, emf_ok=yes, emf_ok=no)
-AC_CHECK_LIB(EMF, CreateEnhMetaFileWithFILEW, , emf_ok=no, -lstdc++)
-if test "$emf_ok" = yes; then
- LIBEMF_CFLAGS='-I /usr/include/libEMF'
- LIBEMF_LIBS='-lEMF -lstdc++'
- AC_DEFINE(HAVE_LIBEMF,1,[libEMF library available])
+AC_ARG_ENABLE([libemf],
+ AS_HELP_STRING([--enable-libemf], [enable plugin for windows metafile support]),
+ ,
+ enable_libemf=yes)
+
+if test "$enable_libemf" = "yes"; then
+ old_CPPFLAGS="${CPPFLAGS}"
+ old_CFLAGS="${CFLAGS}"
+ old_LIBS="${LIBS}"
+
+ CPPFLAGS="${CPPFLAGS} -I /usr/include/libEMF"
+ AC_CHECK_HEADER(emf.h, emf_ok=yes, emf_ok=no)
+ AC_CHECK_LIB(EMF, CreateEnhMetaFileWithFILEW, , emf_ok=no, -lstdc++)
+
+ if test "$emf_ok" = yes; then
+ LIBEMF_CFLAGS='-I /usr/include/libEMF'
+ LIBEMF_LIBS='-lEMF -lstdc++'
+ AC_DEFINE(HAVE_LIBEMF,1,[libEMF library available])
+ fi
+
+ CPPFLAGS="${old_CPPFLAGS}"
+ CFLAGS="${old_CFLAGS}"
+ LIBS="${old_LIBS}"
+else
+ emf_ok=no
fi
AC_SUBST(LIBEMF_CFLAGS)
AC_SUBST(LIBEMF_LIBS)
AM_CONDITIONAL(WITH_LIBEMF, test "$emf_ok" = yes)
-CPPFLAGS="${old_CPPFLAGS}"
-CFLAGS="${old_CFLAGS}"
-LIBS="${old_LIBS}"
dnl
dnl Debugging
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]