projects
/
geeqie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
18f8e33
)
fixed libjpeg in autoconf
author
Vladimir Nadvornik
<nadvornik@suse.cz>
Sat, 9 Apr 2011 17:27:43 +0000
(19:27 +0200)
committer
Vladimir Nadvornik
<nadvornik@suse.cz>
Tue, 27 Sep 2011 12:30:09 +0000
(14:30 +0200)
configure.in
patch
|
blob
|
history
po/POTFILES.in
patch
|
blob
|
history
src/image-load.c
patch
|
blob
|
history
src/image_load_jpeg.c
patch
|
blob
|
history
src/image_load_jpeg.h
patch
|
blob
|
history
diff --git
a/configure.in
b/configure.in
index
b390258
..
5cffbf5
100644
(file)
--- a/
configure.in
+++ b/
configure.in
@@
-301,7
+301,8
@@
AC_ARG_ENABLE([jpeg],
if test "x${libjpeg}" != "xno"; then
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
HAVE_JPEG=yes
if test "x${libjpeg}" != "xno"; then
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
HAVE_JPEG=yes
- JPEG_LIBS=-ljpeg,
+ JPEG_LIBS=-ljpeg
+ AC_DEFINE(HAVE_JPEG, 1, [define to enable use of custom jpeg loader]),
HAVE_JPEG=no)
else
HAVE_JPEG=disabled
HAVE_JPEG=no)
else
HAVE_JPEG=disabled
diff --git
a/po/POTFILES.in
b/po/POTFILES.in
index
607a4be
..
6863e10
100644
(file)
--- a/
po/POTFILES.in
+++ b/
po/POTFILES.in
@@
-46,6
+46,7
@@
src/history_list.c
src/image.c
src/image-load.c
src/image-overlay.c
src/image.c
src/image-load.c
src/image-overlay.c
+src/image_load_jpeg.c
src/img-view.c
src/layout.c
src/layout_config.c
src/img-view.c
src/layout.c
src/layout_config.c
diff --git
a/src/image-load.c
b/src/image-load.c
index
c28df2e
..
157756b
100644
(file)
--- a/
src/image-load.c
+++ b/
src/image-load.c
@@
-513,12
+513,14
@@
static void image_loader_stop_loader(ImageLoader *il)
static void image_loader_setup_loader(ImageLoader *il)
{
g_mutex_lock(il->data_mutex);
static void image_loader_setup_loader(ImageLoader *il)
{
g_mutex_lock(il->data_mutex);
+#ifdef HAVE_JPEG
if (il->bytes_total >= 2 && il->mapped_file[0] == 0xff && il->mapped_file[1] == 0xd8)
{
DEBUG_1("Using custom jpeg loader");
image_loader_backend_set_jpeg(&il->backend);
}
else
if (il->bytes_total >= 2 && il->mapped_file[0] == 0xff && il->mapped_file[1] == 0xd8)
{
DEBUG_1("Using custom jpeg loader");
image_loader_backend_set_jpeg(&il->backend);
}
else
+#endif
image_loader_backend_set_default(&il->backend);
il->loader = il->backend.loader_new(image_loader_area_updated_cb, image_loader_size_cb, image_loader_area_prepared_cb, il);
image_loader_backend_set_default(&il->backend);
il->loader = il->backend.loader_new(image_loader_area_updated_cb, image_loader_size_cb, image_loader_area_prepared_cb, il);
diff --git
a/src/image_load_jpeg.c
b/src/image_load_jpeg.c
index
dc79ddf
..
484da8a
100644
(file)
--- a/
src/image_load_jpeg.c
+++ b/
src/image_load_jpeg.c
@@
-39,10
+39,13
@@
#include "main.h"
#include "main.h"
+
#include "image-load.h"
#include "image_load_jpeg.h"
#include "jpeg_parser.h"
#include "image-load.h"
#include "image_load_jpeg.h"
#include "jpeg_parser.h"
+#ifdef HAVE_JPEG
+
#include <setjmp.h>
#include <jpeglib.h>
#include <jerror.h>
#include <setjmp.h>
#include <jpeglib.h>
#include <jerror.h>
@@
-489,3
+492,4
@@
void image_loader_backend_set_jpeg(ImageLoaderBackend *funcs)
+#endif
\ No newline at end of file
diff --git
a/src/image_load_jpeg.h
b/src/image_load_jpeg.h
index
d5e385a
..
b8df45e
100644
(file)
--- a/
src/image_load_jpeg.h
+++ b/
src/image_load_jpeg.h
@@
-13,7
+13,9
@@
#ifndef IMAGE_LOAD_JPEG_H
#define IMAGE_LOAD_JPEG_H
#ifndef IMAGE_LOAD_JPEG_H
#define IMAGE_LOAD_JPEG_H
+#ifdef HAVE_JPEG
void image_loader_backend_set_jpeg(ImageLoaderBackend *funcs);
void image_loader_backend_set_jpeg(ImageLoaderBackend *funcs);
+#endif
#endif
#endif