From 9281c763b3617e5a126012ae15f77ab2102448e4 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri, 30 Oct 2009 16:49:10 -0700
Subject: [PATCH 1/2] Don't run configure for unused subdirs
Prevents configure from failing if nasm can't be found when it's
not needed because --with-system-jpeg was passed
---
configure.ac | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 50ebdb6..1f9786e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,8 +10,6 @@ BUILD=`date +%Y%m%d`
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
-AC_CONFIG_SUBDIRS([common/jpeg common/zlib])
-
AC_CONFIG_HEADERS([config.h])
dnl Checks for programs.
@@ -192,7 +190,9 @@ AC_ARG_WITH([included-zlib],
[AC_SEARCH_LIBS([inflateEnd], [z], [], [INCLUDED_ZLIB=yes])])
AM_CONDITIONAL([INCLUDED_ZLIB], [ test "x$INCLUDED_ZLIB" = xyes ])
-AC_CONFIG_SUBDIRS([zlib])
+if test "x$INCLUDED_ZLIB" = xyes ; then
+ AC_CONFIG_SUBDIRS([common/zlib])
+fi
dnl Check for libjpeg library
INCLUDED_JPEG=yes
@@ -204,7 +204,9 @@ AC_ARG_WITH([system-jpeg],
[])
AM_CONDITIONAL([INCLUDED_JPEG], [ test "x$INCLUDED_JPEG" = xyes ])
-AC_CONFIG_SUBDIRS([jpeg])
+if test "x$INCLUDED_JPEG" = xyes ; then
+ AC_CONFIG_SUBDIRS([common/jpeg])
+fi
AC_CHECK_FUNCS([vsnprintf snprintf strcasecmp strncasecmp])