forked from smuehlst/jbig2enc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement autotools and directory structure
- Loading branch information
Showing
25 changed files
with
277 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
autom4te* | ||
test* | ||
*.o | ||
*.a | ||
Debug* | ||
Release* | ||
*.suo | ||
*.ncb | ||
*.user | ||
*.patch | ||
*.png | ||
*.jpg | ||
*.jb2 | ||
*.tiff | ||
*.tif | ||
*.exe | ||
.hg* | ||
*m4* | ||
config.* | ||
configure | ||
install-sh | ||
*.in | ||
missing | ||
ltmain.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Adam Langley <[email protected]> | ||
|
||
Contributors: | ||
Misty De Meo <[email protected]> | ||
zdenop <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
See also doc/PATENTS. | ||
|
||
Copyright 2006 Google Inc. All Rights Reserved. | ||
Author: [email protected] (Adam Langley) | ||
|
||
Copyright (C) 2006 Google Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
0.28: (not yet released) | ||
* Update to the latest Leptonica (1.68) | ||
* pdf.py now correctly retains DPI from input images (thanks to RubyPDF) | ||
* autotools support | ||
|
||
0.27: | ||
* Update to the latest Leptonica (1.58) | ||
* Fix comments in pdf.py (thanks Dan) | ||
|
||
0.26: | ||
* Update to the latest Leptonica (1.53) | ||
|
||
0.25: | ||
* Should build on Windows if you get a leptonica which does so (thanks to | ||
Dwight Kelly and a man known only as Dennis) | ||
|
||
0.24: | ||
* Update to leptonica 1.38 | ||
* Add ability to gray symbols but it's commented out because it does little | ||
good | ||
* Refinement support broke because of memory savings in leptonica | ||
|
||
0.23: | ||
* Quick release to support leptonica 1.37 (now bundled) | ||
|
||
0.22: | ||
* Added segmentation support to extract text from mixed images | ||
* Flyspeck removal disabled for now | ||
* A few minor fixes | ||
|
||
0.21: | ||
* Patch from Alberto Accomazzi to fix the pdf.py script and to output more | ||
sensible filenames in pdf mode | ||
* Symbols which are only used once are now included in a per-page dictionary | ||
(great for scans of old books) | ||
* Fixed several scale bugs (one at 65K symbols and one at 100K symbols) | ||
* Page numbers > 256 went wrong |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
First, read the file PATENTS in the same directory as this file. | ||
|
||
Fetch leptonica from its website (http://leptonica.com/) and build it. | ||
For this you will also need the standard libtiff, libpng and libjpeg. | ||
|
||
If you're running a Unix-like OS, such as Linux, BSD, Mac OS X or msys | ||
just run: | ||
|
||
./autogen.sh | ||
./configure | ||
make | ||
make install (or sudo make install) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ACLOCAL_AMFLAGS = -I m4 | ||
SUBDIRS = src doc | ||
dist_bin_SCRIPTS = pdf.py | ||
dist_doc_DATA = AUTHORS ChangeLog COPYING INSTALL NEWS README | ||
EXTRA_DIST = autogen.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
See Changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/sh | ||
|
||
# This is a simple script which is meant to help developers | ||
# better deal with the GNU autotools, specifically: | ||
# | ||
# aclocal | ||
# autoconf | ||
# automake | ||
# | ||
# The whole thing is quite complex... | ||
# | ||
# The idea is to run this collection of tools on a single platform, | ||
# typically the main development platform, running a recent version of | ||
# autoconf. In theory, if we had these tools on each platform where we | ||
# ever expected to port the software, we would never need to checkin | ||
# more than a few autotools configuration files. However, the whole | ||
# idea is to generate a configure script and associated files in a way | ||
# that is portable across platforms, so we *have* to check in a whole | ||
# bunch of files generated by all these tools. | ||
|
||
# The real source files are: | ||
# | ||
# acinclude.m4 (used by aclocal) | ||
# configure.ac (main autoconf file) | ||
# Makefile.am, */Makefile.am (automake config files) | ||
# | ||
# All the rest is auto-generated. | ||
|
||
bail_out() | ||
{ | ||
echo | ||
echo " Something went wrong, bailing out!" | ||
echo | ||
exit 1 | ||
} | ||
|
||
# --- Step 1: Generate aclocal.m4 | ||
|
||
echo "Running aclocal" | ||
aclocal || bail_out | ||
|
||
|
||
echo "Running libtoolize" | ||
libtoolize -f -c || glibtoolize -f -c || bail_out | ||
libtoolize --automake || glibtoolize --automake || bail_out | ||
|
||
# --- Step 2: Generate Makefile.in, | ||
# Using --add-missing --copy makes sure that, if these files are missing, | ||
# they are copied from the system so they can be used in a distribution. | ||
|
||
echo "Running automake --add-missing --copy" | ||
automake --add-missing -c > /dev/null || bail_out | ||
|
||
# --- Step 3: Generate configure from: | ||
# . configure.ac | ||
# | ||
|
||
echo "Running autoconf" | ||
autoconf || bail_out | ||
|
||
echo "" | ||
echo "All done." | ||
echo "To build the software now, do something like:" | ||
echo "" | ||
echo "$ ./configure [...other options]" | ||
echo "$ make" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
AC_PREREQ(2.50) | ||
AC_INIT([jbig2enc], [0.28], [[email protected]], [jbig2enc-0.28], | ||
[https://github.com/agl/jbig2enc]) | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
AM_INIT_AUTOMAKE([-Wall -Werror foreign no-dependencies]) | ||
AC_PROG_CXX | ||
AC_PROG_LIBTOOL | ||
|
||
# Release versioning | ||
GENERIC_MAJOR_VERSION=0 | ||
GENERIC_MINOR_VERSION=28 | ||
GENERIC_MICRO_VERSION=0 | ||
|
||
# API version (often = GENERIC_MAJOR_VERSION.GENERIC_MINOR_VERSION) | ||
GENERIC_API_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION | ||
GENERIC_LIBRARY_VERSION=$GENERIC_MAJOR_VERSION:$GENERIC_MINOR_VERSION | ||
AC_SUBST(GENERIC_API_VERSION) | ||
AC_SUBST(GENERIC_MAJOR_VERSION) | ||
|
||
AC_SUBST(GENERIC_LIBRARY_VERSION) | ||
PACKAGE=$GENERIC_LIBRARY_NAME | ||
AC_SUBST(GENERIC_LIBRARY_NAME) | ||
|
||
GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION | ||
GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION | ||
AC_SUBST(GENERIC_RELEASE) | ||
AC_SUBST(GENERIC_VERSION) | ||
|
||
# this should fix automake 1.12 build and compatible with automake 1.11 | ||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) | ||
|
||
# default conditional | ||
AM_CONDITIONAL(MINGW, false) | ||
|
||
############################# | ||
# | ||
# Platform specific setup | ||
# | ||
############################# | ||
AC_CANONICAL_HOST | ||
case $host_os in | ||
mingw32*) | ||
AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system]) | ||
AM_CONDITIONAL(MINGW, true) | ||
;; | ||
*) | ||
# default | ||
;; | ||
esac | ||
|
||
AC_CHECK_LIB([lept], [findFileFormatStream], [], [ | ||
echo "Error! Leptonica not detected." | ||
exit -1 | ||
]) | ||
AC_CHECK_LIB([tiff], [TIFFGetVersion], [], [ | ||
echo "Error! libtiff not detected." | ||
exit -1 | ||
]) | ||
AC_CHECK_LIB([jpeg], [jpeg_set_defaults], [], [ | ||
echo "Error! libjpeg not detected." | ||
exit -1 | ||
]) | ||
AC_CHECK_LIB([png], [png_get_io_ptr], [], [ | ||
echo "Error! libpng not detected." | ||
exit -1 | ||
]) | ||
AC_CHECK_LIB([z], [zlibVersion], [], [ | ||
echo "Error! zlib not detected." | ||
exit -1 | ||
]) | ||
AC_CHECK_LIB([m], [sqrt], [], [ | ||
echo "Error! libm not detected." | ||
exit -1 | ||
]) | ||
AC_CONFIG_FILES([ | ||
Makefile | ||
src/Makefile | ||
doc/Makefile | ||
]) | ||
AC_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist_doc_DATA = PATENTS jbig2enc.html |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
AM_CXXFLAGS = -Wall | ||
|
||
lib_LTLIBRARIES = libjbig2enc.la | ||
libjbig2enc_la_SOURCES = jbig2enc.cc jbig2arith.cc jbig2sym.cc | ||
include_HEADERS = jbig2arith.h jbig2sym.h jbig2structs.h jbig2segments.h | ||
|
||
bin_PROGRAMS = jbig2 | ||
jbig2_SOURCES = jbig2.cc | ||
jbig2_LDADD = libjbig2enc.la | ||
jbig2_LDFLAGS = -all-static | ||
|
||
if MINGW | ||
jbig2_LDADD += -lws2_32 | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.