summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure29
-rw-r--r--extra/Makefile18
-rwxr-xr-xextra/exifautotran51
-rw-r--r--extra/exifautotran.113
-rw-r--r--extra/jpegexiforient.169
-rw-r--r--extra/jpegexiforient.c299
-rw-r--r--jmemansi.c30
-rw-r--r--libtool-wrap18
-rwxr-xr-xltconfig5
-rw-r--r--makefile.cfg47
10 files changed, 543 insertions, 36 deletions
diff --git a/configure b/configure
index 35c9db5..49e2c93 100755
--- a/configure
+++ b/configure
@@ -54,6 +54,19 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ unset $as_var
+ fi
+done
+
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
@@ -452,16 +465,6 @@ do
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
@@ -1529,7 +1532,8 @@ fi
if test "x$LTSHARED" != xno -o "x$LTSTATIC" != xno; then
USELIBTOOL="yes"
- LIBTOOL="./libtool"
+ LIBTOOL="./libtool-wrap"
+ chmod a+rx libtool-wrap
O="lo"
A="la"
LN='$(LIBTOOL) --mode=link $(CC)'
@@ -1559,7 +1563,7 @@ if test $USELIBTOOL = yes; then
if test "x$LTSTATIC" = xno; then
disable_static="--disable-static"
fi
- $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh
+ $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh $CHOST
fi
# Select memory manager depending on user input.
@@ -1777,6 +1781,7 @@ s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@AR@%${AR-ar}%g
s%@RANLIB@%$RANLIB%g
s%@LIBTOOL@%$LIBTOOL%g
s%@O@%$O%g
diff --git a/extra/Makefile b/extra/Makefile
new file mode 100644
index 0000000..942c647
--- /dev/null
+++ b/extra/Makefile
@@ -0,0 +1,18 @@
+INSTALL_BIN = install -m 755
+INSTALL_DATA = install -m 644
+DESTDIR =
+prefix = /usr
+bindir = $(prefix)/bin
+mandir = $(prefix)/share/man/man1
+
+all: jpegexiforient
+
+jpegexiforient: jpegexiforient.c
+ $(CC) $(CFLAGS) -o jpegexiforient jpegexiforient.c
+clean:
+ -rm -f jpegexiforient
+install:
+ $(INSTALL_BIN) jpegexiforient $(DESTDIR)$(bindir)
+ $(INSTALL_DATA) jpegexiforient.1 $(DESTDIR)$(mandir)
+ $(INSTALL_BIN) exifautotran $(DESTDIR)$(bindir)
+ $(INSTALL_DATA) exifautotran.1 $(DESTDIR)$(mandir)
diff --git a/extra/exifautotran b/extra/exifautotran
new file mode 100755
index 0000000..314d499
--- /dev/null
+++ b/extra/exifautotran
@@ -0,0 +1,51 @@
+#!/bin/sh
+# exifautotran [list of files]
+#
+# Transforms Exif files so that Orientation becomes 1
+#
+for i
+do
+ case $i in
+ -v|--version) echo "exifautotran"; exit 0;;
+ -h|--help)
+ cat <<EOF
+exifautotran [list of files]
+
+Transforms Exif files so that Orientation becomes 1
+EOF
+ exit 0;;
+ esac
+
+ case `jpegexiforient -n "$i"` in
+ 1) transform="";;
+ 2) transform="-flip horizontal";;
+ 3) transform="-rotate 180";;
+ 4) transform="-flip vertical";;
+ 5) transform="-transpose";;
+ 6) transform="-rotate 90";;
+ 7) transform="-transverse";;
+ 8) transform="-rotate 270";;
+ *) transform="";;
+ esac
+ if test -n "$transform"; then
+ echo Executing: jpegtran -copy all $transform $i >&2
+ if type mktemp >/dev/null 2>&1; then
+ tempfile=`mktemp`
+ else
+ set -C
+ tempfile=${TMPDIR-/tmp}/exifautotran.$$
+ fi
+ if test $? -ne 0; then
+ echo Error while creating temp file for $i - skipped. >&2
+ continue
+ fi
+ jpegtran -copy all $transform "$i" > "$tempfile"
+ if test $? -ne 0; then
+ echo Error while transforming $i - skipped. >&2
+ else
+ if mv "$tempfile" "$i"; then
+ jpegexiforient -1 "$i" > /dev/null
+ fi
+ fi
+ fi
+done
diff --git a/extra/exifautotran.1 b/extra/exifautotran.1
new file mode 100644
index 0000000..eeefd88
--- /dev/null
+++ b/extra/exifautotran.1
@@ -0,0 +1,13 @@
+.TH EXIFAUTOTRAN "1" "February 2005" "exifautotran" "User Commands"
+.SH NAME
+exifautotran \- Transforms Exif files so that Orientation becomes 1
+.SH DESCRIPTION
+exifautotran [list of files]
+.PP
+Take a list of files as input and transform then in place so that the
+Orientation becomes 1.
+.SH "AUTHOR"
+ Guido Vollbeding <guido@jpegclub.org>
+.SH "SEE ALSO"
+.BR jpegtran (1),
+.BR jpegexiforient (1)
diff --git a/extra/jpegexiforient.1 b/extra/jpegexiforient.1
new file mode 100644
index 0000000..987e7da
--- /dev/null
+++ b/extra/jpegexiforient.1
@@ -0,0 +1,69 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
+.TH JPEGEXIFORIENT "1" "February 2005" "jpegexiforient" "User Commands"
+.SH NAME
+jpegexiforient \- reads or writes the Exif Orientation Tag
+.SH SYNOPSIS
+.B jpegexiforient
+[\fIswitches\fR] \fIjpegfile\fR
+.SH DESCRIPTION
+
+ This is a utility program to get and set the Exif Orientation Tag.
+ It can be used together with jpegtran in scripts for automatic
+ orientation correction of digital camera pictures.
+
+ The Exif orientation value gives the orientation of the camera
+ relative to the scene when the image was captured. The relation
+ of the '0th row' and '0th column' to visual position is shown as
+ below.
+
+ Value | 0th Row | 0th Column
+ ------+-------------+-----------
+ 1 | top | left side
+ 2 | top | rigth side
+ 3 | bottom | rigth side
+ 4 | bottom | left side
+ 5 | left side | top
+ 6 | right side | top
+ 7 | right side | bottom
+ 8 | left side | bottom
+
+ For convenience, here is what the letter F would look like if it were
+ tagged correctly and displayed by a program that ignores the orientation
+ tag:
+
+ 1 2 3 4
+
+ 888888 888888 88 88
+ 88 88 88 88
+ 8888 8888 8888 8888
+ 88 88 88 88
+ 88 88 888888 888888
+
+ 5 6 7 8
+
+ 8888888888 88 88 8888888888
+ 88 88 88 88 88 88 88 88
+ 88 8888888888 8888888888 88
+
+jpegexiforient output the Exif Orientation Tag in a JPEG Exif file.
+With the options -1 .. -8, it can also be used to set the tag.
+
+.SS "OPTIONS"
+.TP
+\fB\-\-help\fR
+display this help and exit
+.TP
+\fB\-\-version\fR
+output version information and exit
+.TP
+\fB\-n\fR
+Do not output the trailing newline
+.TP
+\fB\-1\fR .. \fB\-8\fR
+Set orientation value 1 .. 8
+.SH "AUTHOR"
+ Guido Vollbeding <guido@jpegclub.org>
+.SH "SEE ALSO"
+.BR jpegtran (1),
+.BR exifautotran (1)
+
diff --git a/extra/jpegexiforient.c b/extra/jpegexiforient.c
new file mode 100644
index 0000000..40e67e3
--- /dev/null
+++ b/extra/jpegexiforient.c
@@ -0,0 +1,299 @@
+/*
+ * jpegexiforient.c
+ *
+ * This is a utility program to get and set the Exif Orientation Tag.
+ * It can be used together with jpegtran in scripts for automatic
+ * orientation correction of digital camera pictures.
+ *
+ * The Exif orientation value gives the orientation of the camera
+ * relative to the scene when the image was captured. The relation
+ * of the '0th row' and '0th column' to visual position is shown as
+ * below.
+ *
+ * Value | 0th Row | 0th Column
+ * ------+-------------+-----------
+ * 1 | top | left side
+ * 2 | top | rigth side
+ * 3 | bottom | rigth side
+ * 4 | bottom | left side
+ * 5 | left side | top
+ * 6 | right side | top
+ * 7 | right side | bottom
+ * 8 | left side | bottom
+ *
+ * For convenience, here is what the letter F would look like if it were
+ * tagged correctly and displayed by a program that ignores the orientation
+ * tag:
+ *
+ * 1 2 3 4 5 6 7 8
+ *
+ * 888888 888888 88 88 8888888888 88 88 8888888888
+ * 88 88 88 88 88 88 88 88 88 88 88 88
+ * 8888 8888 8888 8888 88 8888888888 8888888888 88
+ * 88 88 88 88
+ * 88 88 888888 888888
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+static FILE * myfile; /* My JPEG file */
+
+static unsigned char exif_data[65536L];
+
+/* Return next input byte, or EOF if no more */
+#define NEXTBYTE() getc(myfile)
+
+/* Error exit handler */
+#define ERREXIT(msg) (exit(0))
+
+/* Read one byte, testing for EOF */
+static int
+read_1_byte (void)
+{
+ int c;
+
+ c = NEXTBYTE();
+ if (c == EOF)
+ ERREXIT("Premature EOF in JPEG file");
+ return c;
+}
+
+/* Read 2 bytes, convert to unsigned int */
+/* All 2-byte quantities in JPEG markers are MSB first */
+static unsigned int
+read_2_bytes (void)
+{
+ int c1, c2;
+
+ c1 = NEXTBYTE();
+ if (c1 == EOF)
+ ERREXIT("Premature EOF in JPEG file");
+ c2 = NEXTBYTE();
+ if (c2 == EOF)
+ ERREXIT("Premature EOF in JPEG file");
+ return (((unsigned int) c1) << 8) + ((unsigned int) c2);
+}
+
+static const char * progname; /* program name for error messages */
+
+static void
+usage (FILE *out)
+/* complain about bad command line */
+{
+ fprintf(out, "jpegexiforient reads or writes the Exif Orientation Tag ");
+ fprintf(out, "in a JPEG Exif file.\n");
+
+ fprintf(out, "Usage: %s [switches] jpegfile\n", progname);
+
+ fprintf(out, "Switches:\n");
+ fprintf(out, " --help display this help and exit\n");
+ fprintf(out, " --version output version information and exit\n");
+ fprintf(out, " -n Do not output the trailing newline\n");
+ fprintf(out, " -1 .. -8 Set orientation value 1 .. 8\n");
+}
+
+/*
+ * The main program.
+ */
+
+int
+main (int argc, char **argv)
+{
+ int n_flag, set_flag;
+ unsigned int length, i;
+ int is_motorola; /* Flag for byte order */
+ unsigned int offset, number_of_tags, tagnum;
+
+ progname = argv[0];
+ if (progname == NULL || progname[0] == 0)
+ progname = "jpegexiforient"; /* in case C library doesn't provide it */
+
+ if (argc < 2) { usage(stderr); return 1; }
+
+ n_flag = 0; set_flag = 0;
+
+ i = 1;
+ while (argv[i][0] == '-') {
+ switch (argv[i][1]) {
+ case '-':
+ switch (argv[i][2]) {
+ case 'h': usage(stdout); return 0;
+ case 'v': fprintf(stdout,"jpegexiforient\n"); return 0;
+ }
+ case 'n':
+ n_flag = 1;
+ break;
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ set_flag = argv[i][1] - '0';
+ break;
+ default:
+ usage(stderr); return 1;
+ }
+ if (++i >= argc) { usage(stderr); return 1; }
+ }
+
+ if (set_flag) {
+ if ((myfile = fopen(argv[i], "rb+")) == NULL) {
+ fprintf(stderr, "%s: can't open %s\n", progname, argv[i]);
+ return 0;
+ }
+ } else {
+ if ((myfile = fopen(argv[i], "rb")) == NULL) {
+ fprintf(stderr, "%s: can't open %s\n", progname, argv[i]);
+ return 0;
+ }
+ }
+
+ /* Read File head, check for JPEG SOI + Exif APP1 */
+ for (i = 0; i < 4; i++)
+ exif_data[i] = (unsigned char) read_1_byte();
+ if (exif_data[0] != 0xFF ||
+ exif_data[1] != 0xD8 ||
+ exif_data[2] != 0xFF ||
+ exif_data[3] != 0xE1)
+ return 0;
+
+ /* Get the marker parameter length count */
+ length = read_2_bytes();
+ /* Length includes itself, so must be at least 2 */
+ /* Following Exif data length must be at least 6 */
+ if (length < 8)
+ return 0;
+ length -= 8;
+ /* Read Exif head, check for "Exif" */
+ for (i = 0; i < 6; i++)
+ exif_data[i] = (unsigned char) read_1_byte();
+ if (exif_data[0] != 0x45 ||
+ exif_data[1] != 0x78 ||
+ exif_data[2] != 0x69 ||
+ exif_data[3] != 0x66 ||
+ exif_data[4] != 0 ||
+ exif_data[5] != 0)
+ return 0;
+ /* Read Exif body */
+ for (i = 0; i < length; i++)
+ exif_data[i] = (unsigned char) read_1_byte();
+
+ if (length < 12) return 0; /* Length of an IFD entry */
+
+ /* Discover byte order */
+ if (exif_data[0] == 0x49 && exif_data[1] == 0x49)
+ is_motorola = 0;
+ else if (exif_data[0] == 0x4D && exif_data[1] == 0x4D)
+ is_motorola = 1;
+ else
+ return 0;
+
+ /* Check Tag Mark */
+ if (is_motorola) {
+ if (exif_data[2] != 0) return 0;
+ if (exif_data[3] != 0x2A) return 0;
+ } else {
+ if (exif_data[3] != 0) return 0;
+ if (exif_data[2] != 0x2A) return 0;
+ }
+
+ /* Get first IFD offset (offset to IFD0) */
+ if (is_motorola) {
+ if (exif_data[4] != 0) return 0;
+ if (exif_data[5] != 0) return 0;
+ offset = exif_data[6];
+ offset <<= 8;
+ offset += exif_data[7];
+ } else {
+ if (exif_data[7] != 0) return 0;
+ if (exif_data[6] != 0) return 0;
+ offset = exif_data[5];
+ offset <<= 8;
+ offset += exif_data[4];
+ }
+ if (offset > length - 2) return 0; /* check end of data segment */
+
+ /* Get the number of directory entries contained in this IFD */
+ if (is_motorola) {
+ number_of_tags = exif_data[offset];
+ number_of_tags <<= 8;
+ number_of_tags += exif_data[offset+1];
+ } else {
+ number_of_tags = exif_data[offset+1];
+ number_of_tags <<= 8;
+ number_of_tags += exif_data[offset];
+ }
+ if (number_of_tags == 0) return 0;
+ offset += 2;
+
+ /* Search for Orientation Tag in IFD0 */
+ for (;;) {
+ if (offset > length - 12) return 0; /* check end of data segment */
+ /* Get Tag number */
+ if (is_motorola) {
+ tagnum = exif_data[offset];
+ tagnum <<= 8;
+ tagnum += exif_data[offset+1];
+ } else {
+ tagnum = exif_data[offset+1];
+ tagnum <<= 8;
+ tagnum += exif_data[offset];
+ }
+ if (tagnum == 0x0112) break; /* found Orientation Tag */
+ if (--number_of_tags == 0) return 0;
+ offset += 12;
+ }
+
+ if (set_flag) {
+ /* Set the Orientation value */
+ if (is_motorola) {
+ exif_data[offset+2] = 0; /* Format = unsigned short (2 octets) */
+ exif_data[offset+3] = 3;
+ exif_data[offset+4] = 0; /* Number Of Components = 1 */
+ exif_data[offset+5] = 0;
+ exif_data[offset+6] = 0;
+ exif_data[offset+7] = 1;
+ exif_data[offset+8] = 0;
+ exif_data[offset+9] = (unsigned char)set_flag;
+ exif_data[offset+10] = 0;
+ exif_data[offset+11] = 0;
+ } else {
+ exif_data[offset+2] = 3; /* Format = unsigned short (2 octets) */
+ exif_data[offset+3] = 0;
+ exif_data[offset+4] = 1; /* Number Of Components = 1 */
+ exif_data[offset+5] = 0;
+ exif_data[offset+6] = 0;
+ exif_data[offset+7] = 0;
+ exif_data[offset+8] = (unsigned char)set_flag;
+ exif_data[offset+9] = 0;
+ exif_data[offset+10] = 0;
+ exif_data[offset+11] = 0;
+ }
+ fseek(myfile, (4 + 2 + 6 + 2) + offset, SEEK_SET);
+ fwrite(exif_data + 2 + offset, 1, 10, myfile);
+ } else {
+ /* Get the Orientation value */
+ if (is_motorola) {
+ if (exif_data[offset+8] != 0) return 0;
+ set_flag = exif_data[offset+9];
+ } else {
+ if (exif_data[offset+9] != 0) return 0;
+ set_flag = exif_data[offset+8];
+ }
+ if (set_flag > 8) return 0;
+ }
+
+ /* Write out Orientation value */
+ if (n_flag)
+ printf("%c", '0' + set_flag);
+ else
+ printf("%c\n", '0' + set_flag);
+
+ /* All done. */
+ return 0;
+}
diff --git a/jmemansi.c b/jmemansi.c
index 2d93e49..b0d3ee5 100644
--- a/jmemansi.c
+++ b/jmemansi.c
@@ -12,6 +12,15 @@
* is shoved onto the user.
*/
+#include <unistd.h>
+
+#ifdef __FreeBSD__
+# include <sys/types.h>
+# include <sys/sysctl.h>
+# include <sys/vmmeter.h>
+# include <vm/vm_param.h>
+#endif
+
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
@@ -157,7 +166,26 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
GLOBAL(long)
jpeg_mem_init (j_common_ptr cinfo)
{
- return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
+#ifdef _SC_AVPHYS_PAGES
+ long phys_size;
+
+ if ((phys_size = sysconf(_SC_AVPHYS_PAGES)) == -1)
+ return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
+ if ((phys_size *= sysconf(_SC_PAGESIZE)) < 0)
+ return DEFAULT_MAX_MEM;
+ return (long) (phys_size * 0.95);
+#elif defined(HAVE_SYSCTL) && defined(HW_PHYSMEM)
+ /* This works on *bsd and darwin. */
+ unsigned int physmem;
+ size_t len = sizeof physmem;
+ static int mib[2] = { CTL_HW, HW_PHYSMEM };
+
+ if (sysctl (mib, ARRAY_SIZE (mib), &physmem, &len, NULL, 0) == 0
+ && len == sizeof (physmem))
+ return (long) (physmem * 0.95);
+#endif
+
+ return DEFAULT_MAX_MEM;
}
GLOBAL(void)
diff --git a/libtool-wrap b/libtool-wrap
new file mode 100644
index 0000000..adee2f9
--- /dev/null
+++ b/libtool-wrap
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+export PATH=${PATH}:/usr/bin
+
+doit=
+for x in glibtool libtool ; do
+ if type -p ${x} > /dev/null ; then
+ doit=${x}
+ break
+ fi
+done
+
+if [ -z "${doit}" ] ; then
+ echo "Unable to locate libtool :("
+ exit 1
+fi
+
+exec ${doit} "$@"
diff --git a/ltconfig b/ltconfig
index 2347e69..a06dba0 100755
--- a/ltconfig
+++ b/ltconfig
@@ -552,7 +552,9 @@ if test -n "$pic_flag"; then
# On HP-UX, both CC and GCC only warn that PIC is supported... then they
# create non-PIC objects. So, if there were any warnings, we assume that
# PIC is not supported.
- if test -s conftest.err; then
+ # Make sure we only test warnings on HP-UX (pic_flag == +Z) or we can
+ # easily break Linux builds http://bugs.gentoo.org/70947
+ if test -s conftest.err -a "$pic_flag" = "+Z"; then
echo "$ac_t"no 1>&6
can_build_shared=no
pic_flag=
@@ -1173,7 +1175,6 @@ linux-gnu*)
else
# Only the GNU ld.so supports shared libraries on MkLinux.
case "$host_cpu" in
- powerpc*) dynamic_linker=no ;;
*) dynamic_linker='Linux ld.so' ;;
esac
fi
diff --git a/makefile.cfg b/makefile.cfg
index f25e42e..7fc97dd 100644
--- a/makefile.cfg
+++ b/makefile.cfg
@@ -11,13 +11,13 @@ VPATH = @srcdir@
# Where to install the programs and man pages.
prefix = @prefix@
exec_prefix = @exec_prefix@
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
-includedir = $(prefix)/include
+bindir = @bindir@
+libdir = @libdir@
+includedir = @includedir@
binprefix =
manprefix =
manext = 1
-mandir = $(prefix)/man/man$(manext)
+mandir = @mandir@/man$(manext)
# The name of your C compiler:
CC= @CC@
@@ -60,7 +60,8 @@ RM= rm -f
# directory creation command
MKDIR= mkdir
# library (.a) file creation command
-AR= ar rc
+AR = @AR@
+ARFLAGS = rc
# second step in .a creation (use "touch" if not needed)
AR2= @RANLIB@
# installation program
@@ -163,7 +164,7 @@ ansi2knr: ansi2knr.c
# without libtool:
libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS)
$(RM) libjpeg.a
- $(AR) libjpeg.a $(LIBOBJECTS)
+ $(AR) $(ARFLAGS) libjpeg.a $(LIBOBJECTS)
$(AR2) libjpeg.a
# with libtool:
@@ -191,25 +192,29 @@ wrjpgcom: wrjpgcom.$(O)
# Installation rules:
install: cjpeg djpeg jpegtran rdjpgcom wrjpgcom @FORCE_INSTALL_LIB@
- $(INSTALL_PROGRAM) cjpeg $(bindir)/$(binprefix)cjpeg
- $(INSTALL_PROGRAM) djpeg $(bindir)/$(binprefix)djpeg
- $(INSTALL_PROGRAM) jpegtran $(bindir)/$(binprefix)jpegtran
- $(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom
- $(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom
- $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext)
- $(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext)
- $(INSTALL_DATA) $(srcdir)/jpegtran.1 $(mandir)/$(manprefix)jpegtran.$(manext)
- $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext)
- $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext)
+ mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)
+ $(INSTALL_PROGRAM) cjpeg $(DESTDIR)$(bindir)/$(binprefix)cjpeg
+ $(INSTALL_PROGRAM) djpeg $(DESTDIR)$(bindir)/$(binprefix)djpeg
+ $(INSTALL_PROGRAM) jpegtran $(DESTDIR)$(bindir)/$(binprefix)jpegtran
+ $(INSTALL_PROGRAM) rdjpgcom $(DESTDIR)$(bindir)/$(binprefix)rdjpgcom
+ $(INSTALL_PROGRAM) wrjpgcom $(DESTDIR)$(bindir)/$(binprefix)wrjpgcom
+ $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(DESTDIR)$(mandir)/$(manprefix)cjpeg.$(manext)
+ $(INSTALL_DATA) $(srcdir)/djpeg.1 $(DESTDIR)$(mandir)/$(manprefix)djpeg.$(manext)
+ $(INSTALL_DATA) $(srcdir)/jpegtran.1 $(DESTDIR)$(mandir)/$(manprefix)jpegtran.$(manext)
+ $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(DESTDIR)$(mandir)/$(manprefix)rdjpgcom.$(manext)
+ $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(DESTDIR)$(mandir)/$(manprefix)wrjpgcom.$(manext)
install-lib: libjpeg.$(A) install-headers
- $(INSTALL_LIB) libjpeg.$(A) $(libdir)/$(binprefix)libjpeg.$(A)
+ mkdir -p $(DESTDIR)$(libdir)
+ $(INSTALL_LIB) libjpeg.$(A) $(DESTDIR)$(libdir)/$(binprefix)libjpeg.$(A)
install-headers: jconfig.h
- $(INSTALL_DATA) jconfig.h $(includedir)/jconfig.h
- $(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h
- $(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h
- $(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h
+ mkdir -p $(DESTDIR)$(includedir)
+ $(INSTALL_DATA) jconfig.h $(DESTDIR)$(includedir)/jconfig.h
+ $(INSTALL_DATA) $(srcdir)/jpegint.h $(DESTDIR)$(includedir)/jpegint.h
+ $(INSTALL_DATA) $(srcdir)/jpeglib.h $(DESTDIR)$(includedir)/jpeglib.h
+ $(INSTALL_DATA) $(srcdir)/jmorecfg.h $(DESTDIR)$(includedir)/jmorecfg.h
+ $(INSTALL_DATA) $(srcdir)/jerror.h $(DESTDIR)$(includedir)/jerror.h
clean:
$(RM) *.o *.lo libjpeg.a libjpeg.la