Make fig2dev optional?

Aki Tuomi cmouse at cmouse.fi
Tue Jul 8 09:32:25 CEST 2014


Usually conditionals like these are named HAVE_FIG2DEV. Can you perhaps consider
renaming your conditional? 

Kind regards,
Aki Tuomi

On Tue, Jul 08, 2014 at 01:45:21AM -0400, Colin Davis wrote:
> Installing fig2dev is unfortunately rather difficult on OSX, since it has a lot of prerequisites, and is not bundled with homebrew.
> Unfortunately, I didn't see an easy way to bypass creating these figures, other than manually editing the Makefile every time..
> 
> I added a check, which will look to see if fig2dev is installed. If not, it doesn't add the images to BUILT_SOURCES
> There may be a cleaner way to do this, but this lets me build lib
> 
> There may well be a cleaner way to do this, but lets me build without fig2dev, while still running it if fig2dev is installed.
> 
> -CPD
> 
> 
> https://gist.githubusercontent.com/e1ven/01244536540ae08c7dc1/raw/14b91133ddf0f616856afbab49d3251291606b5f/fig2dev.patch
> From a038af5b9d747161f79ef0f28dfb848aa50fe81f Mon Sep 17 00:00:00 2001
> From: Colin Davis <e1ven at e1ven.com>
> Date: Tue, 8 Jul 2014 01:23:29 -0400
> Subject: [PATCH] Make fig2dev optional
> 
> ---
>  configure.ac    |  2 ++
>  doc/Makefile.am | 18 ++++++++++--------
>  2 files changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index c5952c7..58c276f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1334,6 +1334,8 @@ if test "$gcry_cv_cc_arm_arch_is_v6" = "yes" ; then
>       [Defined if ARM architecture is v6 or newer])
>  fi
>  
> +AC_CHECK_PROG([fig2dev], fig2dev, yes, no)
> +AM_CONDITIONAL([FOUND_FIG2DEV], [test "x$fig2dev" = xyes])
>  
>  #
>  # Check whether GCC inline assembler supports NEON instructions
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index 30330bb..782ec6a 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -17,18 +17,20 @@
>  # License along with this program; if not, write to the Free Software
>  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
>  
> -EXTRA_DIST = README.apichanges HACKING DCO \
> -	     libgcrypt-modules.eps fips-fsm.eps \
> -	     libgcrypt-modules.png fips-fsm.png \
> -             libgcrypt-modules.pdf fips-fsm.pdf \
> -	     yat2m.c
> -
> -DISTCLEANFILES = gcrypt.cps yat2m-stamp.tmp yat2m-stamp $(myman_pages)
> -CLEANFILES = yat2m
>  
> +if FOUND_FIG2DEV
>  BUILT_SOURCES = libgcrypt-modules.eps fips-fsm.eps \
>                  libgcrypt-modules.png fips-fsm.png \
>                  libgcrypt-modules.pdf fips-fsm.pdf
> +else
> +	BUILT_SOURCES = ""
> +endif
> +
> +EXTRA_DIST = README.apichanges HACKING DCO \
> +	     yat2m.c $(BUILT_SOURCES)
> +
> +DISTCLEANFILES = gcrypt.cps yat2m-stamp.tmp yat2m-stamp $(myman_pages)
> +CLEANFILES = yat2m
>  
>  info_TEXINFOS = gcrypt.texi
>  gcrypt_TEXINFOS = lgpl.texi gpl.texi libgcrypt-modules.fig fips-fsm.fig
> -- 
> 2.0.1
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Gcrypt-devel mailing list
> Gcrypt-devel at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: </pipermail/attachments/20140708/0023a03e/attachment.sig>


More information about the Gcrypt-devel mailing list