[gimp] configure, plug-ins: make libjpeg a hard dependency



commit 771293d402456df26abc9d3ed1fdaf5b63afc257
Author: Michael Natterer <mitch gimp org>
Date:   Sat Nov 2 22:32:18 2013 +0100

    configure, plug-ins: make libjpeg a hard dependency

 configure.ac         |   45 ++++++++++++---------------------------------
 plug-ins/Makefile.am |    9 ++-------
 2 files changed, 14 insertions(+), 40 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7f3a76d..97981fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1120,47 +1120,27 @@ AC_SUBST(TIFF_LIBS)
 # Check for libjpeg
 ###################
 
-AC_ARG_WITH(libjpeg,  [  --without-libjpeg       build without JPEG support])
-
-jpeg_ok=no
-if test "x$with_libjpeg" != xno && test -z "$JPEG_LIBS"; then
-  AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
-    jpeg_ok=yes,
-    [jpeg_ok="no (JPEG library not found)"])
-  if test "$jpeg_ok" = yes; then
-    AC_MSG_CHECKING([for jpeglib.h])
-    AC_PREPROC_IFELSE(
-      [AC_LANG_SOURCE([[
+if test -z "$JPEG_LIBS"; then
+  AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, ,
+    AC_MSG_ERROR([JPEG library not found]))
+  AC_MSG_CHECKING([for jpeglib.h])
+  AC_PREPROC_IFELSE(
+    [AC_LANG_SOURCE([[
 #include <stdio.h>
 #undef HAVE_STDDEF_H
 #undef HAVE_STDLIB_H
 #undef PACKAGE
 #undef VERSION
 #include <jpeglib.h>]])],
-      [jpeg_ok=yes],
-      [jpeg_ok="no (Can't include jpeglib.h)"])
-    AC_MSG_RESULT($jpeg_ok)
-    if test "$jpeg_ok" = yes; then
-      AC_CHECK_LIB(jpeg, jpeg_save_markers,
-      JPEG='jpeg$(EXEEXT)'; JPEG_LIBS='-ljpeg',
-      jpeg_ok="no (JPEG library is too old)")
-    else
-      jpeg_ok="no (JPEG header file not found)"
-    fi
-  fi
+    AC_MSG_RESULT([yes]),
+    AC_MSG_ERROR([JPEG header file not found]))
+  AC_CHECK_LIB(jpeg, jpeg_save_markers,
+    JPEG_LIBS='-ljpeg',
+    AC_MSG_ERROR([JPEG library is too old]))
 fi
 
-if test "x$with_libjpeg" != xno && test -z "$JPEG_LIBS"; then
-  AC_MSG_ERROR([
-*** Checks for JPEG library failed. You can build without it by passing
-*** --without-libjpeg to configure but you won't be able to use JPEGs then.])
-fi
-
-if test "x$jpeg_ok" = xyes; then
-  MIME_TYPES="$MIME_TYPES;image/jpeg"
-fi
+MIME_TYPES="$MIME_TYPES;image/jpeg"
 
-AM_CONDITIONAL(BUILD_JPEG, test "x$jpeg_ok" = xyes)
 AC_SUBST(JPEG_LIBS)
 
 
@@ -2347,7 +2327,6 @@ Optional Plug-Ins:
   Ghostscript:         $have_gs
   Help Browser:        $have_webkit
   LCMS:                $have_lcms
-  JPEG:                $jpeg_ok
   JPEG 2000:           $have_jp2
   MNG:                 $have_libmng
   OpenEXR:             $have_openexr
diff --git a/plug-ins/Makefile.am b/plug-ins/Makefile.am
index 488358a..99f6990 100644
--- a/plug-ins/Makefile.am
+++ b/plug-ins/Makefile.am
@@ -8,11 +8,6 @@ if HAVE_OPENEXR
 file_exr = file-exr
 endif
 
-if BUILD_JPEG
-file_jpeg = file-jpeg
-file_psd = file-psd
-endif
-
 if BUILD_PRINT
 print = print
 endif
@@ -58,8 +53,8 @@ SUBDIRS = \
        file-fits               \
        file-fli                \
        file-ico                \
-       $(file_jpeg)            \
-       $(file_psd)             \
+       file-jpeg               \
+       file-psd                \
        file-sgi                \
        $(file_uri)             \
        flame                   \


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