[babl] Disable babl-gen-test-pixels when random is missing



commit 20b208085ffc6124eb4c2c5b1a6ddf95927ef6be
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Sat Feb 1 20:22:49 2014 -0800

    Disable babl-gen-test-pixels when random is missing
    
    babl-gen-test-pixels is only needed to regenerate the source
    pixels and doesn't need to be run as part of the normal build
    process.

 configure.ac      |    7 +++++++
 tools/Makefile.am |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 96d4ccb..0781379 100644
--- a/configure.ac
+++ b/configure.ac
@@ -425,6 +425,13 @@ if test "x$enable_altivec" = xyes; then
 fi
 
 
+##################
+# Check for random
+##################
+have_srandom=no
+AC_CHECK_FUNC(srandom, have_srandom=yes)
+AM_CONDITIONAL([HAVE_SRANDOM], [test x$have_srandom = xyes])
+
 dnl ===========================================================================
 
 AC_CHECK_HEADERS(dl.h)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index ba233c1..f67a66e 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -3,5 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/babl
 LDADD = $(top_builddir)/babl/libbabl- BABL_API_VERSION@.la \
        $(MATH_LIB)
 
+if HAVE_SRANDOM
 noinst_PROGRAMS =              \
        babl-gen-test-pixels
+endif
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]