aboutsummaryrefslogtreecommitdiffstats
path: root/macros
diff options
context:
space:
mode:
authorNat Friedman <nat@src.gnome.org>1999-01-06 18:00:03 +0800
committerNat Friedman <nat@src.gnome.org>1999-01-06 18:00:03 +0800
commitf8a64f51e9753345a4142275a9a4fb39606be7c5 (patch)
tree2d326b43fd484ef692d793af32c0ccf12359d418 /macros
parentc107b53ebbc014c8b42d4046714e9849d307703f (diff)
downloadgsoc2013-evolution-f8a64f51e9753345a4142275a9a4fb39606be7c5.tar
gsoc2013-evolution-f8a64f51e9753345a4142275a9a4fb39606be7c5.tar.gz
gsoc2013-evolution-f8a64f51e9753345a4142275a9a4fb39606be7c5.tar.bz2
gsoc2013-evolution-f8a64f51e9753345a4142275a9a4fb39606be7c5.tar.lz
gsoc2013-evolution-f8a64f51e9753345a4142275a9a4fb39606be7c5.tar.xz
gsoc2013-evolution-f8a64f51e9753345a4142275a9a4fb39606be7c5.tar.zst
gsoc2013-evolution-f8a64f51e9753345a4142275a9a4fb39606be7c5.zip
A new autoconf macro to check for libgnomeprint. I've never written
one of these before, so please let me know if I messed up :-) The macro is GNOME_PRINT_CHECK. svn path=/trunk/; revision=582
Diffstat (limited to 'macros')
-rw-r--r--macros/gnome-print-check.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/macros/gnome-print-check.m4 b/macros/gnome-print-check.m4
new file mode 100644
index 0000000000..ac5c608b81
--- /dev/null
+++ b/macros/gnome-print-check.m4
@@ -0,0 +1,34 @@
+dnl
+dnl GNOME_PRINT_HOOK (script-if-gnome-print-found, failflag)
+dnl
+dnl if failflag is "failure" it aborts if gnome-print is not found
+dnl
+
+AC_DEFUN([GNOME_PRINT_HOOK],[
+ AC_CHECK_LIB(gnomeprint, gnome_print_show, [
+ $1
+ AC_SUBST(GNOME_PRINT_LIB)
+ ], [
+ if test x$2 = xfailure; then
+ AC_MSG_ERROR(Could not link sample gnome-print program)
+ fi
+ ], `gnome-config --libs print`)
+
+ AC_MSG_CHECKING([for gnome-print headers])
+ AC_TRY_CPP([#include <libgnomeprint/gnome-print.h>
+ #include <libgnomeprint/gnome-printer.h>
+ #include <libgnomeprint/gnome-font.h>
+ #include <libgnomeprint/gnome-printer-dialog.h>
+ #include <libgnomeprint/gnome-text.h>],
+ gnome_print_ok=yes, gnome_print_ok=no)
+
+ AC_MSG_RESULT($gnome_print_ok)
+
+ if test x"$gnome_print_ok" = xno; then
+ AC_MSG_ERROR(Could not find gnome-print headers)
+ fi
+])
+
+AC_DEFUN([GNOME_PRINT_CHECK], [
+ GNOME_PRINT_HOOK([],failure)
+])