Smarter fig2dev detection

LRN lrn1986 at gmail.com
Wed Mar 20 18:34:51 CET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

libgcrypt documentation fails to build when fig2dev is not available,
because fig2dev is used unconditionally.

Here's an easy fix for this, which detects fig2dev at configure time,
and uses `true' instead, if it isn't found, thus `make' and `make
install' do not fail when used on a git version of libgcrypt on
systems that do not have fig2dev. `make online' still fails if fig2dev
is missing, and images are not generated, obviously, but that target
is not really used by anyone except the maintainer.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRSfM6AAoJEOs4Jb6SI2CwEVsH/A5yHuvzBV7ladGWlF7F+WN1
Njrp/RxBaFeLaSIjdoBYphn+NKuzS3C/yD9Eg3VB99gu+D7XdnJG33I+GpevI43k
rkW47Z8DLaf5z8jb9ap+fVwiVTnAFX4bhHY6d5owb8aYfean+PeNwCVXelUdm4C3
MZ4su67OAH3m766/DXZLq0vdof0k/O6+3YNyCyHI6SWqPEKqe44KcADRhadUJw7k
X6IpCQ1Q/WciuHgiLJkRUs5d1oBvEeLHSxAkw7Zk1pIgeDzPHyp61TkL4SM+RpDw
gQGN0jdZls6nG1QmOwBjsyNV0b0G7bYvStraAxJpg0zwAv6xs9kmt8ghqNjwRsI=
=UjJ0
-----END PGP SIGNATURE-----
-------------- next part --------------
From 15cad0ff53ad39e569b796474ad534687ea33e32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986 at gmial.com>
Date: Wed, 20 Mar 2013 20:31:57 +0400
Subject: [PATCH 1/2] Smarter fig2dev detection

---
 configure.ac    | 5 +++++
 doc/Makefile.am | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7afd83d..a6d8bdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -654,6 +654,11 @@ AC_SUBST(PTH_CFLAGS)
 AC_SUBST(PTH_LIBS)
 
 #
+# Find fig2dev
+#
+AC_PATH_PROG([FIG2DEV], [fig2dev], [true])
+
+#
 # Check whether pthreads is available
 #
 AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 30330bb..42c7d4f 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -45,16 +45,16 @@ yat2m: yat2m.c
 	$(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
 
 .fig.png:
-	fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
+	$(FIG2DEV) -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
 
 .fig.jpg:
-	fig2dev -L jpg `test -f '$<' || echo '$(srcdir)/'`$< $@
+	$(FIG2DEV) -L jpg `test -f '$<' || echo '$(srcdir)/'`$< $@
 
 .fig.eps:
-	fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@
+	$(FIG2DEV) -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@
 
 .fig.pdf:
-	fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
+	$(FIG2DEV) -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
 
 yat2m-stamp: $(myman_sources)
 	@rm -f yat2m-stamp.tmp
-- 
1.7.11



More information about the Gcrypt-devel mailing list